[ Index ]
 

Code source de CMS made simple 1.0.5

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

title

Body

[fermer]

/modules/News/ -> action.print.php (source)

   1  <?php
   2          if (!isset($gCms)) exit;
   3  
   4          $detailpage = '';
   5          if (isset($params['detailpage']))
   6          {
   7              $manager =& $gCms->GetHierarchyManager();
   8              $node =& $manager->sureGetNodeByAlias($params['detailpage']);
   9              if (isset($node))
  10              {
  11                  $content =& $node->GetContent();
  12                  if (isset($content))
  13                  {
  14                      $detailpage = $content->Id();
  15                  }
  16              }
  17              else
  18              {
  19                  $node =& $manager->sureGetNodeById($params['detailpage']);
  20                  if (isset($node))
  21                  {
  22                      $detailpage = $params['detailpage'];
  23                  }
  24              }
  25          }
  26  
  27          $query = "SELECT mn.*, mnc.news_category_name FROM ".cms_db_prefix()."module_news mn LEFT OUTER JOIN ".cms_db_prefix()."module_news_categories mnc ON mnc.news_category_id = mn.news_category_id WHERE status = 'published' AND news_id = ?";
  28          $row = $db->GetRow($query, array($params['articleid']));
  29  
  30          if ($row)
  31          {
  32              $onerow = new stdClass();
  33  
  34              $onerow->id = $row['news_id'];
  35              $onerow->title = $row['news_title'];
  36              $onerow->content = $row['news_data'];
  37              $onerow->summary = $row['summary'];
  38              $onerow->postdate = $row['news_date'];
  39              $onerow->startdate = $row['start_time'];
  40              $onerow->enddate = $row['end_time'];
  41              $onerow->category = $row['news_category_name'];
  42  
  43              $this->smarty->assign_by_ref('entry', $onerow);
  44          }
  45  
  46          echo $this->ProcessTemplate('articleprint.tpl');
  47  
  48  # vim:ts=4 sw=4 noet
  49  ?>


Généré le : Tue Apr 3 18:50:37 2007 par Balluche grâce à PHPXref 0.7