<?php
/*
  $Id: notice_list.php $
  TomatoCart Open Source Shopping Cart Solutions
  http://www.tomatocart.com

  Copyright (c) 2011 Wuxi Elootec Technology Co., Ltd

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License v2 (1991)
  as published by the Free Software Foundation.
*/

  class osC_Info_Notice_list extends osC_Template {

/* Private variables */

    var $_module = 'notice_list',
        $_group = 'info',
        $_page_title,
        $_page_contents = 'notice_list.php',
        $_page_image = 'table_background_reviews_new.gif';

/* Class constructor */

    function osC_Info_Notice_list() {
      global $osC_Language, $osC_Services, $breadcrumb, $Qnotice, $osC_Database;
      
      $Qnotice = $osC_Database->query('select * from :table_notice n, :table_notice_description nd where n.notice_id = nd.notice_id and n.notice_status = 1 and nd.language_id = :language_id');
      $Qnotice->bindTable(':table_notice', TABLE_NOTICE);
      $Qnotice->bindTable(':table_notice_description', TABLE_NOTICE_DESCRIPTION);
      $Qnotice->bindInt(':language_id', $osC_Language->getID());
      $Qnotice->setBatchLimit((isset($_GET['page']) && is_numeric($_GET['page']) ? $_GET['page'] : 1), MAX_DISPLAY_SEARCH_RESULTS);
      $Qnotice->execute();
      
      if ( $Qnotice->numberOfRows() > 0 ) {
        $this->_page_title = '公告列表';
      } else {
        $this->_page_title = $osC_Language->get('info_not_found_heading');
        $this->_page_contents = 'info_not_found.php';
      }
    }
  }
?>
