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

if ($show_languages) {
  $langselect.="<td align=\"left\" 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=\"adm.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=\"adm_log.php$param\" onclick=\"exit=false\" onmouseover=\"window.status='".get_msg(logdesc,$lang)."'; return true;\" onmouseout=\"window.status=''; return true;\">".get_msg('log',$lang)."</a>\n";
echo"     $menu_separator<a href=\"adm_var.php$param\" onclick=\"exit=false\" onmouseover=\"window.status='".get_msg(variablesdesc,$lang)."'; return true;\" onmouseout=\"window.status=''; return true;\">".get_msg(variables,$lang)."</a>\n";
echo"     $menu_separator<a href=\"adm_lang.php$param\" onclick=\"exit=false\" onmouseover=\"window.status='".get_msg(messagesdesc,$lang)."'; return true;\" onmouseout=\"window.status=''; return true;\">".get_msg(messages,$lang)."</a>\n";
echo"     $menu_separator<a href=\"adm_conf.php$param\" onclick=\"exit=false\" onmouseover=\"window.status='".get_msg(configdesc,$lang)."'; return true;\" onmouseout=\"window.status=''; return true;\">".get_msg(config,$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