asi esta el index.php
<?php
######################################################################
# PHP-NUKE: Advanced Content Management System
# ============================================
#
# Copyright (c) 2002 by Francisco Burzi ([email protected])
# http://phpnuke.org
#
# NaviNuke 2.0.2 for PHP-NUKE
# Copyright (c) 2003 by Miguel Hugo
# http://www.miguelo.org
#
# file: modules/NaviNuke/index.php
#
# This program is free software. You can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License.
######################################################################
if (!eregi("modules.php", $PHP_SELF)) {
die ("You can't access this MALDITO file directly..."
}
$index = 0;
require_once("mainfile.php"
include("modules/NaviNuke/functions.php"
#######################################################################
$start = sql_query("select * from ".$prefix."_navinuke_cfg", $dbi);
if (!$start){
startnavinuke();
}
#######################################################################
function theindex() {
global $mparent, $amenutext, $prefix, $dbi, $td,
$bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $module_name, $info, $titel,$multilang,
$linkadmin, $admin, $user, $view, $www, $nukeurl;
$titel = ""._WELCOMETONAVINUKE."";
#$info = ""._INFOWELCOMETONAVINUKE."";
menunavi();
$module_name = basename(dirname(__FILE__));
$pics = "modules/$module_name/pic";
$update = sql_query("select view from ".$prefix."_navinuke_menu", $dbi);
if (!$update){
echo " <br>\n";
echo "<br>";
footnavi();
}
//Config
$result = sql_query("SELECT poshor, posvert, menuheight, hBar, colormenu, colorwindow, colorlink, shadow1, shadow2, multilang, linkadmin FROM ".$prefix."_navinuke_cfg", $dbi);
list($poshor, $posvert, $menuheight, $hBar, $colormenu, $colorwindow, $colorlink, $shadow1, $shadow2, $multilang, $linkadmin) = mysql_fetch_row($result);
##VIEW
if (!is_user($user)) {$bview = "2";}
if (is_user($user) and !is_admin($admin)){$bview = "3";}
if ( is_admin($admin)) {$bview = "4";}
echo "<table cellspacing=\"1\" align=\"center\" border=\"0\">\n"
."<tr><td width=\"5\"> </td><td width=\"40\"> </td><td width=\"20\"> </td>"
."<td width=\"20\"> </td><td> </td><td> </td></tr>";
//MENUS START
$menu2 = sql_query("SELECT menuid, activ, pos, pic, menutext, parent, view FROM ".$prefix."_navinuke_menu where (view < $bview) order by pos", $dbi);
while (list($menuid, $activ, $pos, $mpic, $amenutext, $mparent, $view) = mysql_fetch_row($menu2)){
include("modules/NaviNuke/language/navi-lang.php"
if ($activ == "1"{
echo "<tr bgcolor=\"$bgcolor2\"><td>";
if ($view == "1" { echo ""._NNVALL.""; }
else if ($view == "2" { echo ""._NNVUSERS.""; }
else if ($view == "3" { echo ""._NNVADMIN.""; }
echo "<td bgcolor=\"$bgcolor2\">";
if (!$pic = 0){echo "<img src=\"modules/NaviNuke/pic/$mpic\" border=\"0\">";}
echo "<td bgcolor=\"$bgcolor2\" colspan=\"2\"><b>$amenutext</b></td>"
."<td bgcolor=\"$bgcolor2\"><b>$mparent</b></td><td width=\"100\"></td> \n";
if (is_admin($admin)) {
echo "<td nowrap>
<a href=\"admin.php?op=editMenu&menuid=$menuid\"><img src=\"modules/$module_name/images/edit.gif\" width=\"19\" height=\"17\" border=\"0\" alt=\""._EDIT." $amenutext\"></a> ";
echo "<a href=\"admin.php?op=delMenu&menuid=$menuid\"><img src=\"modules/$module_name/images/del.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\""._DEL." $amenutext\">";
}
} else {
echo "<tr bgcolor=\"$bgcolor2\"><td>";
if ($view == "1" { echo ""._NNVALL.""; }
else if ($view == "2" { echo ""._NNVUSERS.""; }
else if ($view == "3" { echo ""._NNVADMIN.""; }
echo "<td bgcolor=\"$bgcolor2\">";
if ($pic){echo "<img src=\"modules/NaviNuke/pic/$mpic\" border=\"0\">";}
echo "<td bgcolor=\"$bgcolor2\" colspan=\"2\"><b>$amenutext</b></td>"
."<td bgcolor=\"$bgcolor2\"><b>$mparent</b></td><td width=\"100\" bgcolor=\"#C0C0C0\"><b><marquee>"._NOACTIV."</marquee></b></td> \n";
if (is_admin($admin)) {
echo "<td nowrap>
<a href=\"admin.php?op=editMenu&menuid=$menuid\"><img src=\"modules/$module_name/images/edit.gif\" width=\"19\" height=\"17\" border=\"0\" alt=\""._EDIT." $amenutext\"></a> ";
echo "<a href=\"admin.php?op=delMenu&menuid=$menuid\"><img src=\"modules/$module_name/images/del.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\""._DEL." $amenutext\">";
}
}
//SUBMENUS CONSTRUCCION
$resultsparent = sql_query("SELECT submenuid, child, activ, pic, submenutext, submenuurl, sparent, subparent, view FROM
".$prefix."_navinuke_submenu where sparent='$mparent' and (view < $bview) " , $dbi);
while (list($bsubmenuid, $bchild, $bactiv, $bpic, $bsubmenutext, $bsubmenuurl, $bsparent, $bsubparent, $view) = mysql_fetch_row($resultsparent)){
include("modules/NaviNuke/language/navi-lang.php"
echo "<tr><td>";
if ($bactiv == "1"{
if ($view == "1" { echo ""._NNVALL.""; }
else if ($view == "2" { echo ""._NNVUSERS.""; }
else if ($view == "3" { echo ""._NNVADMIN.""; }
echo "<td><td bgcolor=\"$bgcolor4\">";
} else {
if ($view == "1" { echo ""._NNVALL.""; }
else if ($view == "2" { echo ""._NNVUSERS.""; }
else if ($view == "3" { echo ""._NNVADMIN.""; }
echo "<td><img src=\"modules/NaviNuke/pic/admin.gif\" alt=\""._NOACTIV."\" border=\"0\"><td>";
}
if ($bpic) {
echo " <img height=\"15\" src=\"modules/NaviNuke/pic/$bpic\" border=\"0\">";
} else {
echo "";
}
if ($bactiv == "1"{
echo "<td width=\"150\" bgcolor=\"$bgcolor4\">";
} else {
echo "<td width=\"150\" bgcolor=\"#C0C0C0\">";
}
if (!$bchild) {
// Link Traslate Google
$www = getenv("REQUEST_URI"
$bsubmenuurl = ereg_replace("#WWWW", "http://216.239.35.120/translate_c?hl=es&langpair=es%7Cen&u=$nukeurl$www", $bsubmenuurl);
echo "<a href=\"$bsubmenuurl\">$bsubmenutext</a></td><td>\n";
if (is_admin($admin)) {
echo "<td></td><td nowrap> <a href=\"admin.php?op=editSubmenu&submenuid=$bsubmenuid\">\n"
."<img src=\"modules/$module_name/images/edit.gif\" width=\"19\" height=\"17\" border=\"0\" alt=\""._EDIT."\"></a> \n"
."<a href=\"admin.php?op=delSubmenu&submenuid=$bsubmenuid\"><img src=\"modules/$module_name/images/del.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\""._DEL."\"><tr>";
}
} else {
echo "<b>$bsubmenutext</b></td><td bgcolor=\"$bgcolor4\"> <b><i>$bsubparent</i></b> <img src=\"modules/NaviNuke/images/sub.gif\" border=\"0\"></td><td>\n";
if (is_admin($admin)) {
echo "<td nowrap> <a href=\"admin.php?op=editSubmenu&submenuid=$bsubmenuid\">\n"
."<img src=\"modules/$module_name/images/edit.gif\" width=\"19\" height=\"17\" border=\"0\" alt=\""._EDIT."\"></a> \n"
."<a href=\"admin.php?op=delSubmenu&submenuid=$bsubmenuid\"><img src=\"modules/$module_name/images/del.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\""._DEL."\"><tr>";
}
} //$bchild
# LANGUAGE
##############################################################
if (($multilang == "1" and ($bsubparent == "lang")
{
$handle=opendir('language');
while ($file = readdir($handle)) {
if (ereg("^lang\-(.+)\.php", $file, $matches)) {
$langFound = $matches[1];
$languageslist .= "$langFound ";
}
}
closedir($handle);
$languageslist = eregi_replace("Array","", $languageslist);
$languageslist = explode(" ", $languageslist);
sort($languageslist);
for ($i=0; $i < sizeof($languageslist); $i++) {
if($languageslist[$i]!="" {
echo "<tr><td></td><td></td><td></td><td>";
echo "<td> <a href=\"";
$www = getenv("REQUEST_URI"
echo "$www";
if (eregi("\?", $www)) {
echo "&";
}else {
echo "?";
}
echo "newlang=$languageslist[$i]\"><img src=images/language/flag-$languageslist[$i].png width=\"30\" height=\"16\" border=\"0\" alt=\"$languageslist[$i]\"> $languageslist[$i]</a></td></tr>\n";
}
}
}
#########################################
$resultchild = sql_query("SELECT childid, activ, pic, childmenutext, childurl, childparent, view FROM ".$prefix."_navinuke_child
where childparent='$bsubparent' and (view < $bview) " , $dbi);
while (list($cchildid, $ccactiv, $cpic, $cchildmenutext, $cchildurl, $cchildparent, $view) = mysql_fetch_row($resultchild))
{
include("modules/NaviNuke/language/navi-lang.php"
echo "<tr><td></td><td>";
if ($view == "1" { echo ""._NNVALL.""; }
else if ($view == "2" { echo ""._NNVUSERS.""; }
else if ($view == "3" { echo ""._NNVADMIN.""; }
echo "</td><td></td><td>";
if ($ccactiv == "1"{
echo "<td bgcolor=\"\" ><td bgcolor=\"$bgcolor4\">";
} else {
echo "<td bgcolor=\"#C0C0C0\">"._NOACTIV."<td bgcolor=\"#C0C0C0\" >";
}
if ($cpic) {
echo "<nobr><img height=\"15\" src=\"modules/NaviNuke/pic/$cpic\" border=\"0\"> <a href=\"$cchildurl\">$cchildmenutext</a>\n";
if (is_admin($admin)) {
echo "<td nowrap> <a href=\"admin.php?op=editChild&childid=$cchildid\">\n"
."<img src=\"modules/$module_name/images/edit.gif\" width=\"19\" height=\"17\" border=\"0\" alt=\""._EDIT." $cchildmenutext\"></a> \n"
."<a href=\"admin.php?op=delChild&childid=$cchildid\"><img src=\"modules/$module_name/images/del.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\""._DEL." $cchildmenutext\">";
}
}else {
echo "<a href=\"$cchildurl\">$cchildmenutext</a>\n";
if (is_admin($admin)) {
echo "<td nowrap> <a href=\"admin.php?op=editChild&childid=$cchildid\">\n"
."<img src=\"modules/$module_name/images/edit.gif\" width=\"19\" height=\"17\" border=\"0\" alt=\""._EDIT." $cchildmenutext\"></a> \n"
."<a href=\"admin.php?op=delChild&childid=$cchildid\"><img src=\"modules/$module_name/images/del.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\""._DEL." $cchildmenutext\">";
}
}
}
} //Submenus
} //menus
echo "</table>";
echo "<br>";
footnavi();
#include("footer.php"
}
##########################################################################
switch ($op) {
default:
theindex();
break;
case "start":
start();
break;
case "install":
install();
break;
case "save":
save($sendeid);
break;
case "wsave":
wsave();
break;
case "add":
Add();
break;
case "del":
DelDatum($sendeid);
break;
case "Configure":
Configure();
break;
case "update":
update();
break;
case "ConfigSave":
ConfigSave($xposhor, $xposvert, $xmenuheight, $xhBar, $xmultilang, $xxm1, $xxm2, $xxm3, $xxm4, $xxm5, $xxm6, $xxm7, $xxm8, $xmenu1, $xmenu2, $xmenu3, $xmenu4, $xmenu5, $xmenu6, $xmenu7, $xmenu8, $xmenutext1a, $xmenutext1b, $xmenutext1c, $xmenutext1d, $xmenutext1e, $xmenutext1f, $xmenutext1g, $xmenutext1h, $xmenutext1i, $xmenutext1j, $xmenutext1aurl, $xmenutext1burl, $xmenutext1curl, $xmenutext1durl, $xmenutext1eurl, $xmenutext1furl, $xmenutext1gurl, $xmenutext1hurl, $xmenutext1iurl, $xmenutext1jurl);
break;
}
?>