block_list.tpl.php 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. defined('IN_ADMIN') or exit('No permission resources.');
  3. include $this->admin_tpl('header', 'admin');
  4. ?>
  5. <div class="pad_10">
  6. <div class="table-list">
  7. <table width="100%" cellspacing="0">
  8. <thead>
  9. <tr>
  10. <th><?php echo L('name')?></th>
  11. <th width="80"><?php echo L('type')?></th>
  12. <th><?php echo L('display_position')?></th>
  13. <th width="150"><?php echo L('operations_manage')?></th>
  14. </tr>
  15. </thead>
  16. <tbody>
  17. <?php
  18. if(is_array($list)):
  19. foreach($list as $v):
  20. ?>
  21. <tr>
  22. <td align="center"><?php echo $v['name']?></td>
  23. <td align="center"><?php if($v['type']==1) {echo L('code');} else {echo L('table_style');}?></td>
  24. <td align="center"><?php echo $v['pos']?></td>
  25. <td align="center"><a href="javascript:block_update(<?php echo $v['id']?>, '<?php echo $v['name']?>')"><?php echo L('updates')?></a> | <a href="javascript:edit(<?php echo $v['id']?>, '<?php echo $v['name']?>')"><?php echo L('edit')?></a> | <a href="?m=block&c=block_admin&a=del&id=<?php echo $v['id']?>" onclick="return confirm('<?php echo L('confirm', array('message'=>$v['name']))?>')"><?php echo L('delete')?></a></td>
  26. </tr>
  27. <?php
  28. endforeach;
  29. endif;
  30. ?>
  31. </tbody>
  32. </table>
  33. </div>
  34. </div>
  35. <div id="pages"><?php echo $pages?></div>
  36. <div id="closeParentTime" style="display:none"></div>
  37. <script type="text/javascript">
  38. <!--
  39. if(window.top.$("#current_pos").data('clicknum')==1 || window.top.$("#current_pos").data('clicknum')==null) {
  40. parent.document.getElementById('display_center_id').style.display='';
  41. parent.document.getElementById('center_frame').src = '?m=content&c=content&a=public_categorys&type=add&from=block&pc_hash=<?php echo $_SESSION['pc_hash'];?>';
  42. window.top.$("#current_pos").data('clicknum',0);
  43. }
  44. function block_update(id, name) {
  45. window.top.art.dialog({id:'edit'}).close();
  46. window.top.art.dialog({title:'<?php echo L('edit')?>《'+name+'》',id:'edit',iframe:'?m=block&c=block_admin&a=block_update&id='+id,width:'700',height:'500'}, function(){var d = window.top.art.dialog({id:'edit'}).data.iframe;d.document.getElementById('dosubmit').click();return false;}, function(){window.top.art.dialog({id:'edit'}).close()});
  47. }
  48. function edit(id, name) {
  49. window.top.art.dialog({id:'edit'}).close();
  50. window.top.art.dialog({title:'<?php echo L('edit')?>《'+name+'》',id:'edit',iframe:'?m=block&c=block_admin&a=edit&id='+id,width:'700',height:'500'}, function(){var d = window.top.art.dialog({id:'edit'}).data.iframe;d.document.getElementById('dosubmit').click();return false;}, function(){window.top.art.dialog({id:'edit'}).close()});
  51. }
  52. //-->
  53. </script>
  54. </body>
  55. </html>