home *** CD-ROM | disk | FTP | other *** search
/ Internet Magazine 2003 May / INTERNET103.ISO / pc / software / windows / building / php_nuke / html / footer.php < prev    next >
Encoding:
PHP Script  |  2002-09-16  |  2.9 KB  |  76 lines

  1. <?php
  2.  
  3. /************************************************************************/
  4. /* PHP-NUKE: Advanced Content Management System                         */
  5. /* ============================================                         */
  6. /*                                                                      */
  7. /* Copyright (c) 2002 by Francisco Burzi                                */
  8. /* http://phpnuke.org                                                   */
  9. /*                                                                      */
  10. /* This program is free software. You can redistribute it and/or modify */
  11. /* it under the terms of the GNU General Public License as published by */
  12. /* the Free Software Foundation; either version 2 of the License.       */
  13. /************************************************************************/
  14.  
  15. if (eregi("footer.php",$PHP_SELF)) {
  16.     Header("Location: index.php");
  17.     die();
  18. }
  19.  
  20. $footer = 1;
  21.  
  22. function footmsg() {
  23.     global $foot1, $foot2, $foot3, $copyright, $totaltime, $starttime;
  24.     $mtime = microtime();
  25.     $mtime = explode(" ",$mtime);
  26.     $mtime = $mtime[1] + $mtime[0];
  27.     $endtime = $mtime;
  28.     $totaltime = ($endtime - $starttime);
  29.     $totaltime = ""._PAGEGENERATION." ".substr($totaltime,0,5)." "._SECONDS."";
  30.     echo "<font class=\"footmsg\">\n";
  31.     if ($foot1 != "") {
  32.     echo "$foot1<br>\n";
  33.     }
  34.     if ($foot2 != "") {
  35.     echo "$foot2<br>\n";
  36.     }
  37.     if ($foot3 != "") {
  38.     echo "$foot3<br>\n";
  39.     }
  40.     // DO NOT REMOVE THE FOLLOWING COPYRIGHT LINE. YOU'RE NOT ALLOWED TO REMOVE NOR EDIT THIS.
  41.     echo "$copyright<br>$totaltime<br>\n</font>\n";
  42. }
  43.  
  44. function foot() {
  45.     global $prefix, $user_prefix, $dbi, $index, $user, $cookie, $storynum, $user, $cookie, $Default_Theme, $foot1, $foot2, $foot3, $foot4, $home, $module, $name;
  46.     if ($home == 1) {
  47.     blocks(Down);
  48.     }
  49.     if ($module == 1 AND file_exists("modules/$name/copyright.php")) {
  50.     $cpname = ereg_replace("_", " ", $name);
  51.     echo "<div align=\"right\"><a href=\"javascript:openwindow()\">$cpname ©</a></div>";
  52.     }
  53.     themefooter();
  54.     if (is_user($user) AND !ereg("Private_Messages", $_SERVER[REQUEST_URI])) {
  55.     $uname = $cookie[1];
  56.     $popres = sql_query("SELECT uid, popmeson FROM ".$user_prefix."_users where uname='$uname'", $dbi);
  57.     list($uid, $popmeson) = sql_fetch_row($popres, $dbi);
  58.     if ($popmeson == 1) {
  59.         $messres = sql_query("SELECT * FROM ".$prefix."_priv_msgs where to_userid='$uid' and read_msg='0'", $dbi);
  60.             $messnum = sql_num_rows($messres, $dbi);
  61.             if ($messnum == 1) {
  62.             echo "<script language=\"javascript\">{ alert('"._YOUHAVEONEMSG."'); }</script>";
  63.             }
  64.             if ($messnum > 1) {
  65.             echo "<script language=\"javascript\">{ alert('"._YOUHAVE." $messnum "._NEWPMSG."'); }</script>";
  66.             }
  67.     }
  68.     }
  69.     echo "</body>\n"
  70.     ."</html>";
  71.     die();
  72. }
  73.  
  74. foot();
  75.  
  76. ?>