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

  1. <?php
  2.  
  3. /************************************************************************/
  4. /* PHP-NUKE: Web Portal 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("block-Ephemerids.php",$PHP_SELF)) {
  16.     Header("Location: index.php");
  17.     die();
  18. }
  19.  
  20. global $prefix, $multilingual, $currentlang, $dbi;
  21.  
  22. if ($multilingual == 1) {
  23.     $querylang = "AND elanguage='$currentlang'";
  24. } else {
  25.     $querylang = "";
  26. }
  27.  
  28. $today = getdate();
  29. $eday = $today[mday];
  30. $emonth = $today[mon];
  31. $result = sql_query("select yid, content from ".$prefix."_ephem where did='$eday' AND mid='$emonth' $querylang", $dbi);
  32. $title = ""._EPHEMERIDS."";
  33. $content = "<b>"._ONEDAY."</b><br>";
  34. while(list($yid, $e_content) = sql_fetch_row($result, $dbi)) {
  35.     if ($cnt==1) {
  36.     $boxstuff .= "<br><br>";
  37.     }
  38.     $content .= "<b>$yid</b><br>";
  39.     $content .= "$e_content";
  40.     $cnt = 1;
  41. }
  42.  
  43. ?>