get_votelist.tpl.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. <div class="table-list">
  8. <table width="100%" cellspacing="0">
  9. <thead>
  10. <tr>
  11. <th><?php echo L('title')?></th>
  12. <th width="14%" align="center"><?php echo L('startdate')?></th>
  13. <th width="14%" align="center"><?php echo L('enddate')?></th>
  14. <th width='20%' align="center"><?php echo L('inputtime')?></th>
  15. </tr>
  16. </thead>
  17. <tbody>
  18. <?php
  19. if(is_array($infos)){
  20. foreach($infos as $info){
  21. ?>
  22. <tr onclick="return_id(<?php echo $info['subjectid'];?>, '<?php echo addslashes($info['subject'])?>')" style="cursor:hand" title="<?php echo L('check_select')?>">
  23. <td><?php if($target=='dialog') {?><input type='radio' id="voteid_<?php echo $info['subjectid']?>" name="subjectid"><?php } echo $info['subject']?></td>
  24. <td ><?php echo $info['fromdate'];?></td>
  25. <td ><?php echo $info['todate'];?></td>
  26. <td ><?php echo date("Y-m-d h-i",$info['addtime']);?></td>
  27. </tr>
  28. <?php
  29. }
  30. }
  31. ?>
  32. </tbody>
  33. </table>
  34. <input type="hidden" name="msg_id" id="msg_id">
  35. <div id="pages"><?php echo $this->pages?></div>
  36. </div>
  37. <SCRIPT LANGUAGE="JavaScript">
  38. <!--
  39. function return_id(voteid, title) {
  40. <?php if ($target=='dialog') {?>
  41. $('#voteid_'+voteid).attr('checked', 'true');
  42. $('#msg_id').val('vote|'+voteid+'|'+title);
  43. <?php }?>
  44. window.top.$('#voteid').val(voteid);<?php if(!$target) {?>window.top.art.dialog({id:'selectid'}).close(); <?php }?>
  45. }
  46. //-->
  47. </SCRIPT>
  48. </body>
  49. </html>