Location: PHPKode > projects > phpBannerEx > menu.inc
<?
#################################################################################################
#
#  project           	: phpBannerEx
#  filename          	: menu.inc
#  last modified by  	: 
#  e-mail            	: hide@address.com
#  purpose           	: Show the menu ....
#
#################################################################################################

if ($show_languages) {
  $langselect.="<td align=\"left\" valign=\"middle\" width=\"1\">\n";

  echo"
<SCRIPT LANGUAGE=\"JavaScript\"><!--

function changelang(newlang) {
  exit=false;
  site = \"?lang=\"+(newlang);
  top.location.href=site;
}

//--></SCRIPT>";

  $langselect.="<form action=\"$PHP_SELF\" name=\"lang\" method=\"POST\">\n";
  $langselect.="<select name=\"lang\" onchange=\"changelang(this.options[this.selectedIndex].value)\">";
  $langselect.="<option value=\"0\"> English</option>\n";

  $res = db_query("SELECT * FROM lang");

  while($row = mysql_fetch_array($res)) {
    if ($row[ln_id]==$lang) {
      $selected="SELECTED";
    } else {
      $selected="";
    }
    $langselect.= "<option value=\"$row[ln_id]\" $selected>$row[ln_name]</option>\n";
  }
  $langselect.="</select></form></td>";
}


#  The Main-Section
#################################################################################################
if(isset($lang)) {
  $param = "?lang=$lang";
}

echo" <table class=\"menu\" align=\"center\" border=\"0\" width=\"100%\">\n";
echo"   <tr>\n";
echo"    $langselect";
echo"    <td>\n";
echo"     <a href=\"index.php$param\" onclick=\"exit=false\" onmouseover=\"window.status='".get_msg(homepagedesc,$lang)."'; return true;\" onmouseout=\"window.status=''; return true;\">".get_msg(homepage,$lang)."</a>\n";
echo"     $menu_separator<a href=\"addsite.php$param\" onclick=\"exit=false\" onmouseover=\"window.status='".get_msg(addsitedesc,$lang)."'; return true;\" onmouseout=\"window.status=''; return true;\">".get_msg(addsite,$lang)."</a>\n";
echo"     $menu_separator<a href=\"editsite.php$param\" onclick=\"exit=false\" onmouseover=\"window.status='".get_msg(editsitedesc,$lang)."'; return true;\" onmouseout=\"window.status=''; return true;\">".get_msg(editsite,$lang)."</a>\n";
echo"     $menu_separator<a href=\"user.php$param&act=mod_user_form\" onclick=\"exit=false\" onmouseover=\"window.status='".get_msg(edituserdesc,$lang)."'; return true;\" onmouseout=\"window.status=''; return true;\">".get_msg(edituser,$lang)."</a>\n";
echo"     $menu_separator<a href=\"help.php$param\" onclick=\"exit=false\" onmouseover=\"window.status='".get_msg(helpsitedesc,$lang)."'; return true;\" onmouseout=\"window.status=''; return true;\">".get_msg(helpsite,$lang)."</a>\n";
echo"     $menu_separator<a href=\"logout.php$param\" onclick=\"exit=false\" onmouseover=\"window.status='".get_msg(logoutdesc,$lang)."'; return true;\" onmouseout=\"window.status=''; return true;\">".get_msg(logout,$lang)."</a>\n";
echo"    </td>\n";
echo"   </tr>\n";
echo" </table>\n";

// Spacer Table
echo" <table align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"10\" height=6>\n";
echo"   <tr><td>\n";
echo"   </td></tr>\n";
echo" </table>\n";

?>
Return current item: phpBannerEx