vote_list.tpl.php 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <?php
  2. defined('IN_ADMIN') or exit('No permission resources.');
  3. $show_dialog = 1;
  4. include $this->admin_tpl('header', 'admin');
  5. ?>
  6. <div class="pad-lr-10">
  7. <form name="myform" action="?m=vote&c=vote&a=delete" method="post" onsubmit="checkuid();return false;">
  8. <div class="table-list">
  9. <table width="100%" cellspacing="0">
  10. <thead>
  11. <tr>
  12. <th width="35" align="center"><input type="checkbox" value="" id="check_box" onclick="selectall('subjectid[]');"></th>
  13. <th><?php echo L('title')?></th>
  14. <th width="40" align="center"><?php echo L('vote_num')?></th>
  15. <th width="68" align="center"><?php echo L('startdate')?></th>
  16. <th width="68" align="center"><?php echo L('enddate')?></th>
  17. <th width='68' align="center"><?php echo L('inputtime')?></th>
  18. <th width="180" align="center"><?php echo L('operations_manage')?></th>
  19. </tr>
  20. </thead>
  21. <tbody>
  22. <?php
  23. if(is_array($infos)){
  24. foreach($infos as $info){
  25. ?>
  26. <tr>
  27. <td align="center"><input type="checkbox"
  28. name="subjectid[]" value="<?php echo $info['subjectid']?>"></td>
  29. <td><a href="?m=vote&c=index&a=show&show_type=1&subjectid=<?php echo $info['subjectid']?>&siteid=<?php echo $info['siteid'];?>" title="<?php echo L('check_vote')?>" target="_blank"><?php echo $info['subject'];?></a> <font color=red><?php if($info['enabled']==0)echo L('lock'); ?></font></td>
  30. <td align="center"><font color=blue><?php echo $info['votenumber']?></font> </td>
  31. <td align="center"><?php echo $info['fromdate'];?></td>
  32. <td align="center"><?php echo $info['todate'];?></td>
  33. <td align="center"><?php echo date("Y-m-d",$info['addtime']);?></td>
  34. <td align="center"><a href='###'
  35. onclick="statistics(<?php echo $info['subjectid']?>, '<?php echo new_addslashes($info['subject'])?>')"> <?php echo L('statistics')?></a>
  36. | <a href="###"
  37. onclick="edit(<?php echo $info['subjectid']?>, '<?php echo new_addslashes($info['subject'])?>')"
  38. title="<?php echo L('edit')?>"><?php echo L('edit')?></a> | <a href="javascript:call(<?php echo new_addslashes($info['subjectid'])?>);void(0);"><?php echo L('call_js_code')?></a> | <a
  39. href='?m=vote&c=vote&a=delete&subjectid=<?php echo new_addslashes($info['subjectid'])?>'
  40. onClick="return confirm('<?php echo L('vote_confirm_del')?>')"><?php echo L('delete')?></a>
  41. </td>
  42. </tr>
  43. <?php
  44. }
  45. }
  46. ?>
  47. </tbody>
  48. </table>
  49. <div class="btn"><a href="#"
  50. onClick="javascript:$('input[type=checkbox]').attr('checked', true)"><?php echo L('selected_all')?></a>/<a
  51. href="#"
  52. onClick="javascript:$('input[type=checkbox]').attr('checked', false)"><?php echo L('cancel')?></a>
  53. <input name="submit" type="submit" class="button"
  54. value="<?php echo L('remove_all_selected')?>"
  55. onClick="return confirm('<?php echo L('vote_confirm_del')?>')">&nbsp;&nbsp;</div>
  56. <div id="pages"><?php echo $pages?></div>
  57. </form>
  58. </div>
  59. <script type="text/javascript">
  60. function edit(id, name) {
  61. window.top.art.dialog({id:'edit'}).close();
  62. window.top.art.dialog({title:'<?php echo L('edit')?> '+name+' ',id:'edit',iframe:'?m=vote&c=vote&a=edit&subjectid='+id,width:'700',height:'450'}, function(){var d = window.top.art.dialog({id:'edit'}).data.iframe;var form = d.document.getElementById('dosubmit');form.click();return false;}, function(){window.top.art.dialog({id:'edit'}).close()});
  63. }
  64. function statistics(id, name) {
  65. window.top.art.dialog({id:'statistics'}).close();
  66. window.top.art.dialog({title:'<?php echo L('statistics')?> '+name+' ',id:'edit',iframe:'?m=vote&c=vote&a=statistics&subjectid='+id,width:'700',height:'350'}, function(){var d = window.top.art.dialog({id:'statistics'}).data.iframe;var form = d.document.getElementById('dosubmit');form.click();return false;}, function(){window.top.art.dialog({id:'statistics'}).close()});
  67. }
  68. function call(id) {
  69. window.top.art.dialog({id:'call'}).close();
  70. window.top.art.dialog({title:'<?php echo L('vote')?><?php echo L('linkage_calling_code','','admin');?>', id:'call', iframe:'?m=vote&c=vote&a=public_call&subjectid='+id, width:'600px', height:'470px'}, function(){window.top.art.dialog({id:'call'}).close();}, function(){window.top.art.dialog({id:'call'}).close();})
  71. }
  72. function checkuid() {
  73. var ids='';
  74. $("input[name='subjectid[]']:checked").each(function(i, n){
  75. ids += $(n).val() + ',';
  76. });
  77. if(ids=='') {
  78. window.top.art.dialog({content:'<?php echo L('before_select_operation')?>',lock:true,width:'200',height:'50',time:1.5},function(){});
  79. return false;
  80. } else {
  81. myform.submit();
  82. }
  83. }
  84. </script>
  85. </body>
  86. </html>