home *** CD-ROM | disk | FTP | other *** search
/ PC World 2005 April / PCWorld_2005-04_cd.bin / akce / web / unitednuke / unitednuke.exe / html / modules / AvantGo / print.php < prev   
PHP Script  |  2004-01-10  |  3KB  |  76 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("modules.php", $_SERVER['PHP_SELF'])) {
  16.     die ("You can't access this file directly...");
  17. }
  18. require_once("mainfile.php");
  19. $module_name = basename(dirname(__FILE__));
  20. get_lang($module_name);
  21.  
  22. if(!isset($sid)) {
  23.     exit();
  24. }
  25.  
  26. function PrintPage($sid) {
  27.     global $site_logo, $nukeurl, $sitename, $datetime, $prefix, $db;
  28.     $sid = intval(trim($sid));
  29.     $row = $db->sql_fetchrow($db->sql_query("SELECT title, time, hometext, bodytext, topic, notes FROM ".$prefix."_stories WHERE sid='$sid'"));
  30.     $title = $row['title'];
  31.     $time = $row['time'];
  32.     $hometext = $row['hometext'];
  33.     $bodytext = $row['bodytext'];
  34.     $topic = $row['topic'];
  35.     $notes = $row['notes'];
  36.     $row2 = $db->sql_fetchrow($db->sql_query("SELECT topictext FROM ".$prefix."_topics WHERE topicid='$topic'"));
  37.     $topictext = $row2['topictext'];
  38.     formatTimestamp($time);
  39.     echo "
  40.     <html>
  41.     <head>
  42.     <title>$sitename - $title</title>
  43.     <META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset="._CHARSET."\">
  44.     </head>
  45.     <body bgcolor=\"#ffffff\" text=\"#000000\">
  46.     <table border=\"0\" align=\"center\"><tr><td>
  47.     <table border=\"0\" width=\"640\" cellpadding=\"0\" cellspacing=\"1\" bgcolor=\"#000000\"><tr><td>
  48.     <table border=\"0\" width=\"640\" cellpadding=\"20\" cellspacing=\"1\" bgcolor=\"#ffffff\"><tr><td>
  49.     <center>
  50.     <img src=\"images/$site_logo\" border=\"0\" alt=\"\"><br><br>
  51.     <font class=\"content\">
  52.     <b>$title</b></font><br>
  53.     <font class=tiny><b>"._PDATE."</b> $datetime<br><b>"._PTOPIC."</b> $topictext</font><br><br>
  54.     </center>
  55.     <font class=\"content\">
  56.     $hometext<br><br>
  57.     $bodytext<br><br>
  58.     $notes<br><br>
  59.     </font>
  60.     </td></tr></table></td></tr></table>
  61.     <br><br><center>
  62.     <font class=\"content\">
  63.     "._COMESFROM." $sitename<br>
  64.     <a href=\"$nukeurl\">$nukeurl</a><br><br>
  65.     "._THEURL."<br>
  66.     <a href=\"$nukeurl/modules.php?name=News&file=article&sid=$sid\">$nukeurl/modules.php?name=News&file=article&sid=$sid</a>
  67.     </font>
  68.     </td></tr></table>
  69.     </body>
  70.     </html>
  71.     ";
  72. }
  73.  
  74. PrintPage($sid);
  75.  
  76. ?>