announce_list.tpl.php 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. defined('IN_ADMIN') or exit('No permission resources.');
  3. include $this->admin_tpl('header', 'admin');
  4. ?>
  5. <div class="pad-lr-10">
  6. <form name="myform" action="?m=announce&c=admin_announce&a=listorder" method="post">
  7. <div class="table-list">
  8. <table width="100%" cellspacing="0">
  9. <thead>
  10. <tr>
  11. <th width="35" align="center"><input type="checkbox" value="" id="check_box" onclick="selectall('aid[]');"></th>
  12. <th align="center"><?php echo L('title')?></th>
  13. <th width="68" align="center"><?php echo L('startdate')?></th>
  14. <th width='68' align="center"><?php echo L('enddate')?></th>
  15. <th width='68' align="center"><?php echo L('inputer')?></th>
  16. <th width="50" align="center"><?php echo L('hits')?></th>
  17. <th width="120" align="center"><?php echo L('inputtime')?></th>
  18. <th width="69" align="center"><?php echo L('operations_manage')?></th>
  19. </tr>
  20. </thead>
  21. <tbody>
  22. <?php
  23. if(is_array($data)){
  24. foreach($data as $announce){
  25. ?>
  26. <tr>
  27. <td align="center">
  28. <input type="checkbox" name="aid[]" value="<?php echo $announce['aid']?>">
  29. </td>
  30. <td><?php echo $announce['title']?></td>
  31. <td align="center"><?php echo $announce['starttime']?></td>
  32. <td align="center"><?php echo $announce['endtime']?></td>
  33. <td align="center"><?php echo $announce['username']?></td>
  34. <td align="center"><?php echo $announce['hits']?></td>
  35. <td align="center"><?php echo date('Y-m-d H:i:s', $announce['addtime'])?></td>
  36. <td align="center">
  37. <?php if ($_GET['s']==1) {?><a href="?m=announce&c=index&a=show&aid=<?php echo $announce['aid']?>" title="<?php echo L('preview')?>" target="_blank"><?php }?><?php echo L('index')?><?php if ($_GET['s']==1) {?></a><?php }?> |
  38. <a href="javascript:edit('<?php echo $announce['aid']?>', '<?php echo safe_replace($announce['title'])?>');void(0);"><?php echo L('edit')?></a>
  39. </td>
  40. </tr>
  41. <?php
  42. }
  43. }
  44. ?>
  45. </tbody>
  46. </table>
  47. <div class="btn"><label for="check_box"><?php echo L('selected_all')?>/<?php echo L('cancel')?></label>
  48. <?php if($_GET['s']==1) {?><input name='submit' type='submit' class="button" value='<?php echo L('cancel_all_selected')?>' onClick="document.myform.action='?m=announce&c=admin_announce&a=public_approval&passed=0'"><?php } elseif($_GET['s']==2) {?><input name='submit' type='submit' class="button" value='<?php echo L('pass_all_selected')?>' onClick="document.myform.action='?m=announce&c=admin_announce&a=public_approval&passed=1'"><?php }?>&nbsp;&nbsp;
  49. <input name="submit" type="submit" class="button" value="<?php echo L('remove_all_selected')?>" onClick="document.myform.action='?m=announce&c=admin_announce&a=delete';return confirm('<?php echo L('affirm_delete')?>')">&nbsp;&nbsp;</div> </div>
  50. <div id="pages"><?php echo $this->db->pages;?></div>
  51. </form>
  52. </div>
  53. </body>
  54. </html>
  55. <script type="text/javascript">
  56. function edit(id, title) {
  57. window.top.art.dialog({id:'edit'}).close();
  58. window.top.art.dialog({title:'<?php echo L('edit_announce')?>--'+title, id:'edit', iframe:'?m=announce&c=admin_announce&a=edit&aid='+id ,width:'700px',height:'500px'}, function(){var d = window.top.art.dialog({id:'edit'}).data.iframe;
  59. var form = d.document.getElementById('dosubmit');form.click();return false;}, function(){window.top.art.dialog({id:'edit'}).close()});
  60. }
  61. </script>