link_list.tpl.php 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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. <table width="100%" cellspacing="0" class="search-form">
  8. <tbody>
  9. <tr>
  10. <td><div class="explain-col">
  11. <?php echo L('all_linktype')?>: &nbsp;&nbsp; <a href="?m=link&c=link"><?php echo L('all')?></a> &nbsp;&nbsp;
  12. <a href="?m=link&c=link&typeid=0">默认分类</a>&nbsp;
  13. <?php
  14. if(is_array($type_arr)){
  15. foreach($type_arr as $typeid => $type){
  16. ?><a href="?m=link&c=link&typeid=<?php echo $typeid;?>"><?php echo $type;?></a>&nbsp;
  17. <?php }}?>
  18. </div>
  19. </td>
  20. </tr>
  21. </tbody>
  22. </table>
  23. <form name="myform" id="myform" action="?m=link&c=link&a=listorder" method="post" >
  24. <div class="table-list">
  25. <table width="100%" cellspacing="0">
  26. <thead>
  27. <tr>
  28. <th width="35" align="center"><input type="checkbox" value="" id="check_box" onclick="selectall('linkid[]');"></th>
  29. <th width="35" align="center"><?php echo L('listorder')?></th>
  30. <th><?php echo L('link_name')?></th>
  31. <th width="12%" align="center"><?php echo L('logo')?></th>
  32. <th width="10%" align="center"><?php echo L('typeid')?></th>
  33. <th width='10%' align="center"><?php echo L('link_type')?></th>
  34. <th width="8%" align="center"><?php echo L('status')?></th>
  35. <th width="12%" align="center"><?php echo L('operations_manage')?></th>
  36. </tr>
  37. </thead>
  38. <tbody>
  39. <?php
  40. if(is_array($infos)){
  41. foreach($infos as $info){
  42. ?>
  43. <tr>
  44. <td align="center" width="35"><input type="checkbox" name="linkid[]" value="<?php echo $info['linkid']?>"></td>
  45. <td align="center" width="35"><input name='listorders[<?php echo $info['linkid']?>]' type='text' size='3' value='<?php echo $info['listorder']?>' class="input-text-c"></td>
  46. <td><a href="<?php echo $info['url'];?>" title="<?php echo L('go_website')?>" target="_blank"><?php echo new_html_special_chars($info['name'])?></a> </td>
  47. <td align="center" width="12%"><?php if($info['linktype']==1){?><?php if($info['passed']=='1'){?><img src="<?php echo $info['logo'];?>" width=83 height=31><?php } else echo $info['logo'];}?></td>
  48. <td align="center" width="10%"><?php echo $type_arr[$info['typeid']];?></td>
  49. <td align="center" width="10%"><?php if($info['linktype']==0){echo L('word_link');}else{echo L('logo_link');}?></td>
  50. <td width="8%" align="center"><?php if($info['passed']=='0'){?><a
  51. href='?m=link&c=link&a=check&linkid=<?php echo $info['linkid']?>'
  52. onClick="return confirm('<?php echo L('pass_or_not')?>')"><font color=red><?php echo L('audit')?></font></a><?php }else{echo L('passed');}?></td>
  53. <td align="center" width="12%"><a href="###"
  54. onclick="edit(<?php echo $info['linkid']?>, '<?php echo new_addslashes(new_html_special_chars($info['name']))?>')"
  55. title="<?php echo L('edit')?>"><?php echo L('edit')?></a> | <a
  56. href='?m=link&c=link&a=delete&linkid=<?php echo $info['linkid']?>'
  57. onClick="return confirm('<?php echo L('confirm', array('message' => new_addslashes(new_html_special_chars($info['name']))))?>')"><?php echo L('delete')?></a>
  58. </td>
  59. </tr>
  60. <?php
  61. }
  62. }
  63. ?>
  64. </tbody>
  65. </table>
  66. </div>
  67. <div class="btn">
  68. <input name="dosubmit" type="submit" class="button"
  69. value="<?php echo L('listorder')?>">&nbsp;&nbsp;<input type="submit" class="button" name="dosubmit" onClick="document.myform.action='?m=link&c=link&a=delete'" value="<?php echo L('delete')?>"/></div>
  70. <div id="pages"><?php echo $pages?></div>
  71. </form>
  72. </div>
  73. <script type="text/javascript">
  74. function edit(id, name) {
  75. window.top.art.dialog({id:'edit'}).close();
  76. window.top.art.dialog({title:'<?php echo L('edit')?> '+name+' ',id:'edit',iframe:'?m=link&c=link&a=edit&linkid='+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()});
  77. }
  78. function checkuid() {
  79. var ids='';
  80. $("input[name='linkid[]']:checked").each(function(i, n){
  81. ids += $(n).val() + ',';
  82. });
  83. if(ids=='') {
  84. window.top.art.dialog({content:"<?php echo L('before_select_operations')?>",lock:true,width:'200',height:'50',time:1.5},function(){});
  85. return false;
  86. } else {
  87. myform.submit();
  88. }
  89. }
  90. //向下移动
  91. function listorder_up(id) {
  92. $.get('?m=link&c=link&a=listorder_up&linkid='+id,null,function (msg) {
  93. if (msg==1) {
  94. //$("div [id=\'option"+id+"\']").remove();
  95. alert('<?php echo L('move_success')?>');
  96. } else {
  97. alert(msg);
  98. }
  99. });
  100. }
  101. </script>
  102. </body>
  103. </html>