<?php defined('ByFeiWa') or exit('Access Invalid!');?>

<div class="wrap">
  <div class="tabmenu">
    <?php include template('layout/submenu');?>
  </div>
  <form id="list_form" method="get">
    <table class="ncm-search-table">
      <input type="hidden" id='app' name='app' value='member_inform' />
      <input type="hidden" id='feiwa' name='feiwa' value='inform_list' />
      <tr>
        <td></td>
        <td class="w100 tr"><select name="select_inform_state">
            <option value="0" <?php if (!$_GET['select_inform_state'] == '0'){echo 'selected=true';}?>> <?php echo $lang['inform_state_all']; ?> </option>
            <option value="1" <?php if ($_GET['select_inform_state'] == '1'){echo 'selected=true';}?>> <?php echo $lang['inform_state_unhandle'];?> </option>
            <option value="2" <?php if ($_GET['select_inform_state'] == '2'){echo 'selected=true';}?>> <?php echo $lang['inform_state_handled'];?> </option>
          </select></td>
        <td class="w70 tc"><label class="submit-border">
            <input type="submit" class="submit" value="<?php echo $lang['feiwa_search'];?>" />
          </label></td>
      </tr>
    </table>
  </form>
  <table class="ncm-default-table">
    <thead>
      <tr>
        <th class="w10"></th>
        <th colspan="2"><?php echo $lang['inform_goods_name'];?></th>
        <th class="w240">&nbsp;</th>
        <th class="w120"><?php echo $lang['inform_datetime'];?></th>
        <th class="w120"><?php echo $lang['inform_state'];?><?php echo $lang['inform_handle_type'];?></th>
        <th class="w110"><?php echo $lang['feiwa_handle'];?></th>
      </tr>
    </thead>
    <?php if (count($output['list'])>0) { ?>
    <tbody>
      <?php foreach($output['list'] as $val) {?>
      <tr class="bd-line">
        <td></td>
        <td class="w50"><div class="pic-thumb"><a href="<?php echo urlMall('goods', 'index', array('goods_id'=>$val['inform_goods_id']));?>" target="_blank"><img src="<?php echo cthumb($val['inform_goods_image'],60,$val['inform_store_id']);?>" onMouseOver="toolTip('<img src=<?php echo cthumb($val['inform_goods_image'],160,$val['inform_store_id']); ?>>')" onMouseOut="toolTip()"/></a></div></td>
        <td class="tl"><dl class="goods-name">
            <dt><a href="<?php echo urlMall('goods', 'index', array('goods_id'=>$val['inform_goods_id']));?>" target="_blank"> <?php echo $val['inform_goods_name']; ?> </a></dt>
            <dd>商家：<a href="<?php echo urlMall('show_store','index',array('store_id'=>$val['inform_store_id']));?>"><?php echo $val['inform_store_name']; ?></a> </dd>
          </dl></td>
        <td class="tl"><p><?php echo $lang['inform_type'];?>：<?php echo $val['inform_subject_type_name'];?></p>
          <p><?php echo $lang['inform_subject'];?>：<?php echo $val['inform_subject_content'];?></td>
        <td><?php echo date("Y-m-d",$val['inform_datetime']);?></td>
        <td><p>
            <?php
                          if($val['inform_state']==='1') echo $lang['inform_state_unhandle'];
                          if($val['inform_state']==='2') echo $lang['inform_state_handled'];
                      ?>
          </p>
          <p>
            <?php
                          if($val['inform_handle_type']==='1') echo $lang['inform_handle_type_unuse'];
                          if($val['inform_handle_type']==='2') echo $lang['inform_handle_type_venom'];
                          if($val['inform_handle_type']==='3') echo $lang['inform_handle_type_valid'];
                      ?>
          </p></td>
        <td class="ncm-table-handle"><span><a href="index.php?app=member_inform&feiwa=inform_info&inform_id=<?php echo $val['inform_id']; ?>" class="btn-bluejeans"><i class="icon-eye-open"></i>
          <p><?php echo $lang['feiwa_view'];?></p>
          </a></span>
          <?php if($val['inform_state']==='1') { ?>
          <span><a class="btn-bittersweet" href="javascript:void(0)" onclick="ajax_get_confirm('<?php echo $lang['inform_cancel_confirm'];?>', 'index.php?app=member_inform&feiwa=inform_cancel&inform_id=<?php echo $val['inform_id']; ?>');"><i class="icon-ban-circle"></i>
          <p><?php echo $lang['feiwa_cancel']; ?></p>
          </a></span>
          <?php } ?></td>
      </tr>
      <?php }?>
      <?php } else { ?>
      <tr>
        <td colspan="20" class="norecord"><div class="warning-option"><i>&nbsp;</i><span><?php echo $lang['no_record'];?></span></div></td>
      </tr>
      <?php } ?>
    </tbody>
    <tfoot>
      <?php  if (count($output['list'])>0) { ?>
      <tr>
        <td colspan="20"><div class="pagination"><?php echo $output['show_page'];?></div></td>
      </tr>
      <?php } ?>
    </tfoot>
  </table>
</div>
