home *** CD-ROM | disk | FTP | other *** search
/ Internet Magazine 2003 May / INTERNET103.ISO / pc / software / windows / building / php_nuke / html / modules / your_account / navbar.php < prev   
Encoding:
PHP Script  |  2002-09-16  |  3.9 KB  |  93 lines

  1. <?php
  2.  
  3. if (is_user($user)) {
  4.  
  5. require_once("mainfile.php");
  6. get_lang("Your_Account");
  7.  
  8. function menuimg($gfile) {
  9.     $ThemeSel = get_theme();
  10.     if (file_exists("themes/$ThemeSel/images/menu/$gfile")) {
  11.     $menuimg = "themes/$ThemeSel/images/menu/$gfile";
  12.     } else {
  13.     $menuimg = "modules/Your_Account/images/$gfile";
  14.     }
  15.     return($menuimg);
  16. }
  17.  
  18. function nav($main_up=0) {
  19.     global $module_name;
  20.     $handle=opendir('themes');
  21.     while ($file = readdir($handle)) {
  22.     if ( (!ereg("[.]",$file)) ) {
  23.         $thmcount++;
  24.     }
  25.     }
  26.     closedir($handle);
  27.     echo "<table border=\"0\" width=\"100%\" align=\"center\"><tr><td width=\"10%\">";
  28.  
  29.     $menuimg = menuimg("info.gif");
  30.     echo "<font class=\"content\">"
  31.     ."<center><a href=\"modules.php?name=Your_Account&op=edituser\"><img src=\"$menuimg\" border=\"0\" alt=\""._CHANGEYOURINFO."\" title=\""._CHANGEYOURINFO."\"></a><br>"
  32.     ."<a href=\"modules.php?name=Your_Account&op=edituser\">"._CHANGEYOURINFO."</a>"
  33.     ."</center></font></td>";
  34.  
  35.     $menuimg = menuimg("home.gif");
  36.     echo "<td width=\"10%\"><font class=\"content\">"
  37.     ."<center><a href=\"modules.php?name=Your_Account&op=edithome\"><img src=\"$menuimg\" border=\"0\" alt=\""._CHANGEHOME."\" title=\""._CHANGEHOME."\"></a><br>"
  38.     ."<a href=\"modules.php?name=Your_Account&op=edithome\">"._CHANGEHOME."</a>"
  39.     ."</center></form></font></td>";
  40.  
  41.     $menuimg = menuimg("comments.gif");
  42.     echo "<td width=\"10%\"><font class=\"content\">"
  43.     ."<center><a href=\"modules.php?name=Your_Account&op=editcomm\"><img src=\"$menuimg\" border=\"0\" alt=\""._CONFIGCOMMENTS."\" title=\""._CONFIGCOMMENTS."\"></a><br>"
  44.     ."<a href=\"modules.php?name=Your_Account&op=editcomm\">"._CONFIGCOMMENTS."</a>"
  45.     ."</center></form></font></td>";
  46.  
  47.     if (is_active("WebMail")) {
  48.     $menuimg = menuimg("mail.gif");
  49.     echo "<td width=\"10%\"><font class=\"content\">"
  50.         ."<center><a href=\"modules.php?name=WebMail\"><img src=\"$menuimg\" border=\"0\" alt=\""._WEBMAIL."\" title=\""._WEBMAIL."\"></a><br>"
  51.         ."<a href=\"modules.php?name=WebMail\">"._WEBMAIL."</a>"
  52.         ."</center></form></font></td>";
  53.     }
  54.  
  55.     if (is_active("Private_Messages")) {
  56.     $menuimg = menuimg("messages.gif");
  57.     echo "<td width=\"10%\"><font class=\"content\">"
  58.         ."<center><a href=\"modules.php?name=Private_Messages\"><img src=\"$menuimg\" border=\"0\" alt=\""._PRIVATEMESSAGES."\" title=\""._PRIVATEMESSAGES."\"></a><br>"
  59.         ."<a href=\"modules.php?name=Private_Messages\">"._MESSAGES."</a>"
  60.         ."</center></form></font></td>";
  61.     }
  62.  
  63.     if (is_active("Journal")) {
  64.     $menuimg = menuimg("journal.gif");
  65.     echo "<td width=\"10%\"><font class=\"content\">"
  66.         ."<center><a href=\"modules.php?name=Journal&file=edit\"><img src=\"$menuimg\" border=\"0\" alt=\"Journal\" title=\"Journal\"></a><br>"
  67.         ."<a href=\"modules.php?name=Journal&file=edit\">Journal</a>"
  68.         ."</center></form></font></td>";
  69.     }
  70.  
  71.     if ($thmcount > 1) {
  72.     $menuimg = menuimg("themes.gif");
  73.     echo "<td width=\"10%\"><font class=\"content\">"
  74.         ."<center><a href=\"modules.php?name=Your_Account&op=chgtheme\"><img src=\"$menuimg\" border=\"0\" alt=\""._SELECTTHETHEME."\" title=\""._SELECTTHETHEME."\"></a><br>"
  75.         ."<a href=\"modules.php?name=Your_Account&op=chgtheme\">"._SELECTTHETHEME."</a>"
  76.         ."</center></form></font></td>";
  77.     }
  78.  
  79.     $menuimg = menuimg("exit.gif");
  80.     echo "<td width=\"10%\"><font class=\"content\">"
  81.     ."<center><a href=\"modules.php?name=Your_Account&op=logout\"><img src=\"$menuimg\" border=\"0\" alt=\""._LOGOUTEXIT."\" title=\""._LOGOUTEXIT."\"></a><br>"
  82.     ."<a href=\"modules.php?name=Your_Account&op=logout\">"._LOGOUTEXIT."</a>"
  83.     ."</center></form></font>";
  84.  
  85.     echo "</td></tr></table>";
  86.     if ($main_up != 1) {
  87.     echo "<br><center>[ <a href=\"modules.php?name=Your_Account\">"._RETURNACCOUNT."</a> ]</center>\n";
  88.     }
  89. }
  90.  
  91. }
  92.  
  93. ?>