keylink_list.tpl.php 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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" id="myform" action="?m=admin&c=keylink&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('keylinkid[]');"></th>
  13. <th width="30%"><?php echo L('keyword_name')?></th>
  14. <th ><?php echo L('link_url')?></th>
  15. <th width="120"><?php echo L('operations_manage')?></th>
  16. </tr>
  17. </thead>
  18. <tbody>
  19. <?php
  20. if(is_array($infos)){
  21. foreach($infos as $info){
  22. ?>
  23. <tr>
  24. <td align="center">
  25. <input type="checkbox" name="keylinkid[]" value="<?php echo $info['keylinkid']?>">
  26. </td>
  27. <td width="30%" align="left"><span class="<?php echo $info['style']?>"><?php echo $info['word']?></span> </td>
  28. <td align="center"><?php echo $info['url']?></td>
  29. <td align="center"><a href="javascript:edit(<?php echo $info['keylinkid']?>, '<?php echo new_addslashes($info['word'])?>')"><?php echo L('edit')?></a> | <a href="javascript:confirmurl('?m=admin&c=keylink&a=delete&keylinkid=<?php echo $info['keylinkid']?>', '<?php echo L('keylink_confirm_del')?>')"><?php echo L('delete')?></a> </td>
  30. </tr>
  31. <?php
  32. }
  33. }
  34. ?></tbody>
  35. </table>
  36. <div class="btn">
  37. <a href="#" onClick="javascript:$('input[type=checkbox]').attr('checked', true)"><?php echo L('selected_all')?></a>/<a href="#" onClick="javascript:$('input[type=checkbox]').attr('checked', false)"><?php echo L('cancel')?></a>
  38. <input type="submit" name="submit" class="button" value="<?php echo L('remove_all_selected')?>" onClick="return confirm('<?php echo L('badword_confom_del')?>')" />
  39. </div>
  40. <div id="pages"><?php echo $pages?></div>
  41. </div>
  42. </form>
  43. </div>
  44. </body>
  45. </html>
  46. <script type="text/javascript">
  47. function edit(id, name) {
  48. window.top.art.dialog({id:'edit'}).close();
  49. window.top.art.dialog({title:'<?php echo L('keylink_edit')?> '+name+' ',id:'edit',iframe:'?m=admin&c=keylink&a=edit&keylinkid='+id,width:'450',height:'130'}, 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()});
  50. }
  51. function checkuid() {
  52. var ids='';
  53. $("input[name='keylinkid[]']:checked").each(function(i, n){
  54. ids += $(n).val() + ',';
  55. });
  56. if(ids=='') {
  57. window.top.art.dialog({content:'<?php echo L('badword_pleasechose')?>',lock:true,width:'200',height:'50',time:1.5},function(){});
  58. return false;
  59. } else {
  60. myform.submit();
  61. }
  62. }
  63. </script>