<?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.
*/



?>

<h1><?php echo '公告列表'; ?></h1>

<?php

  while ($Qnotice->next()) {
?>
  <div class="moduleBox">

    <h6><span style="float: right;"><?php echo osC_DateTime::getShort($Qnotice->value('notice_date_added')); ?></span><?php echo osc_link_object(osc_href_link(FILENAME_INFO, 'notice&notice_id=' . $Qnotice->valueInt('notice_id')), $Qnotice->value('notice_name')); ?></h6>

    <div class="content">


  <?php

      if (!osc_empty($Qnotice->value('notice_image'))) {

        echo osc_link_object(osc_href_link(FILENAME_INFO, 'notice&notice_id=' . $Qnotice->valueInt('notice_id')), $osC_Image->show($Qnotice->value('notice_image'), $Qnotice->value('notice_name'), 'style="float: left;margin: 5px 10px 5px 5px"', '', 'notice'));

      }

  ?>
    <p>
      <?php
        $description = strip_tags($Qnotice->value('notice_description'));
        echo mb_substr($description, 0, 100, 'utf-8') . ((mb_strlen($description, 'utf-8') >= 100) ? '..' : '');
      ?>
    </p>

      <div style="clear: both;"></div>
    </div>

  </div>

  

<?php
  }

?>

  <div class="listingPageLinks">

    <span style="float: right;"><?php echo $Qnotice->getBatchPageLinks('page', osc_get_all_get_params(array('x', 'y'))); ?></span>

  

    <?php echo $Qnotice->getBatchTotalPages($osC_Language->get('result_set_number_of_articles')); ?>

  </div>

<div class="submitFormButtons" style="text-align: right;">

  <?php echo osc_link_object(osc_href_link(FILENAME_DEFAULT), osc_draw_image_button('button_continue.gif', $osC_Language->get('button_continue'))); ?>

</div>