[ Index ]
 

Code source de e107 0.7.8

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/ -> print.php (source)

   1  <?php
   2  /*
   3  + ----------------------------------------------------------------------------+
   4  |     e107 website system
   5  |
   6  |     ©Steve Dunstan 2001-2002
   7  |     http://e107.org
   8  |     jalist@e107.org
   9  |
  10  |     Released under the terms and conditions of the
  11  |     GNU General Public License (http://gnu.org).
  12  |
  13  |     $Source: /cvsroot/e107/e107_0.7/print.php,v $
  14  |     $Revision: 1.15 $
  15  |     $Date: 2007/02/13 22:25:16 $
  16  |     $Author: e107coders $
  17  +----------------------------------------------------------------------------+
  18  */
  19  require_once ("class2.php");
  20  $HEADER="";
  21  $FOOTER="";
  22  $CUSTOMHEADER = "";
  23  $CUSTOMFOOTER = "";
  24  
  25  
  26  $qs = explode(".", e_QUERY);
  27  if ($qs[0] == "") {
  28      header("location:".e_BASE."index.php");
  29       exit;
  30  }
  31  $source = $qs[0];
  32  $parms = intval($qs[1]);
  33  unset($qs);
  34  
  35  
  36  if(strpos($source,'plugin:') !== FALSE)
  37  {
  38      $plugin = substr($source,7);
  39      if(file_exists(e_PLUGIN.$plugin."/e_emailprint.php"))
  40      {
  41          include_once(e_PLUGIN.$plugin."/e_emailprint.php");
  42          $print_text = print_item($parms);
  43  //        define("e_PAGETITLE", $plugin);
  44      }
  45      else
  46      {
  47          echo "file missing.";
  48          exit;
  49      }
  50  }
  51  else
  52  {
  53      $con = new convert;
  54      $sql->db_Select("news", "*", "news_id='{$parms}'");
  55      $row = $sql->db_Fetch();
  56      extract($row);
  57      define("e_PAGETITLE", $news_title);
  58      $news_body = $tp->toHTML($news_body, TRUE);
  59      $news_extended = $tp->toHTML($news_extended, TRUE);
  60      if ($news_author == 0)
  61      {
  62          $a_name = "e107";
  63          $category_name = "e107 welcome message";
  64      }
  65      else
  66      {
  67          $sql->db_Select("news_category", "category_id, category_name", "category_id='{$news_category}'");
  68          list($category_id, $category_name) = $sql->db_Fetch();
  69          $sql->db_Select("user", "user_id, user_name", "user_id='{$news_author}'");
  70          list($a_id, $a_name) = $sql->db_Fetch();
  71      }
  72      $news_datestamp = $con->convert_date($news_datestamp, "long");
  73      $print_text = "<span style=\"font-size: 13px; color: black; font-family: tahoma, verdana, arial, helvetica; text-decoration: none\">
  74      <b>".LAN_PRINT_135.": ".$news_title."</b>
  75      <br />
  76      (".LAN_PRINT_86." ".$tp->toHTML($category_name,FALSE,"defs").")
  77      <br />
  78      ".LAN_PRINT_94." ".$a_name."<br />
  79      ".$news_datestamp."
  80      <br /><br />".
  81      $news_body;
  82  
  83      if ($news_extended != ""){ $print_text .= "<br /><br />".$news_extended; }
  84      if ($news_source != ""){ $print_text .= "<br /><br />".$news_source; }
  85      if ($news_url != ""){ $print_text .= "<br />".$news_url; }
  86  
  87      $print_text .= "<br /><br /></span><hr />".
  88      LAN_PRINT_303.SITENAME."
  89      <br />
  90      ( http://".$_SERVER['HTTP_HOST'].e_HTTP."news.php?extend.".$news_id." )
  91      ";
  92  }
  93  
  94  
  95  if(defined("TEXTDIRECTION") && TEXTDIRECTION == "rtl"){
  96      $align = 'right';
  97  }else{
  98      $align = 'left';
  99  }
 100  
 101  // Header down here to give us a chance to set a page title
 102  require_once(HEADERF);
 103  
 104  echo "
 105  <div style='background-color:white'>
 106  <div style='text-align:".$align."'>".$tp->parseTemplate("{LOGO}", TRUE)."</div><hr /><br />
 107  <div style='text-align:".$align."'>".$print_text."</div><br /><br />
 108  <form action=''><div style='text-align:center'><input type='button' value='".LAN_PRINT_307."' onclick='window.print()' /></div></form></div>";
 109  
 110  require_once(FOOTERF);
 111  
 112  ?>


Généré le : Sun Apr 1 01:23:32 2007 par Balluche grâce à PHPXref 0.7