member_modelfield_list.tpl.php 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <?php defined('IN_ADMIN') or exit('No permission resources.');?>
  2. <?php include $this->admin_tpl('header', 'admin');?>
  3. <div class="pad-lr-10">
  4. <div class="table-list">
  5. <div class="bk10"></div>
  6. <form name="myform" id="myform" action="?m=member&c=member_modelfield&a=sort" method="post" onsubmit="check();return false;">
  7. <table width="100%" cellspacing="0" >
  8. <thead>
  9. <tr>
  10. <th width="70"><?php echo L('listorder')?></th>
  11. <th width="90"><?php echo L('fieldname')?></th>
  12. <th width="100"><?php echo L('cnames');?></th>
  13. <th width="100"><?php echo L('type');?></th>
  14. <th width="50"><?php echo L('must_input');?></th>
  15. <th width="50"><?php echo L('search');?></th>
  16. <th width="50"><?php echo L('listorder');?></th>
  17. <th width="50"><?php echo L('disabled');?></th>
  18. <th ><?php echo L('operations_manage');?></th>
  19. </tr>
  20. </thead>
  21. <tbody class="td-line">
  22. <?php
  23. foreach($datas as $r) {
  24. ?>
  25. <tr>
  26. <td align='center' width='70'>
  27. <input name='listorders[<?php echo $r['fieldid']?>]' type='text' size='3' value='<?php echo $r['listorder']?>' class='input-text-c'>
  28. </td>
  29. <td width='90'><?php echo $r['field']?></td>
  30. <td width="100"><?php echo $r['name']?></td>
  31. <td width="100" align='center'><?php echo $r['formtype']?></td>
  32. <td width="50" align='center'>
  33. <?php echo $r['isbase'] ? L('icon_unlock') : L('icon_locked')?></td>
  34. <td width="50" align='center'>
  35. <?php echo $r['issearch'] ? L('icon_unlock') : L('icon_locked')?></td>
  36. <td width="50" align='center'>
  37. <?php echo $r['isorder'] ? L('icon_unlock') : L('icon_locked')?></td>
  38. <td width="50" align='center'>
  39. <?php echo $r['disabled'] ? L('icon_unlock') : L('icon_locked')?></td>
  40. <td align='center'>
  41. <a href="javascript:edit(<?php echo $r['modelid']?>, <?php echo $r['fieldid']?>, '<?php echo $r['name']?>')"><?php echo L('modify')?></a> |
  42. <?php if(!$r['disabled']) {?>
  43. <a href="?m=member&c=member_modelfield&a=disable&disabled=1&fieldid=<?php echo $r['fieldid']?>&menuid=<?php echo $_GET['menuid']?>"><?php echo L('disable')?></a>
  44. <?php } else {?>
  45. <a href="?m=member&c=member_modelfield&a=disable&disabled=0&fieldid=<?php echo $r['fieldid']?>&menuid=<?php echo $_GET['menuid']?>"><?php echo L('enable')?></a>
  46. <?php }?> |
  47. <a href="javascript:confirmurl('?m=member&c=member_modelfield&a=delete&fieldid=<?php echo $r['fieldid']?>&menuid=<?php echo $_GET['menuid']?>','<?php echo L('sure_delete')?>')"><?php echo L('delete')?></a>
  48. </td>
  49. </tr>
  50. <?php } ?>
  51. </tbody>
  52. </table>
  53. <div class="btn"><input type="submit" class="button" name="dosubmit" value="<?php echo L('sort')?>"/>
  54. </div>
  55. <div id="pages"><?php if(isset($pages)){echo $pages;}?></div>
  56. </div>
  57. </div>
  58. </form>
  59. <div id="PC__contentHeight" style="display:none">160</div>
  60. <script language="JavaScript">
  61. <!--
  62. function edit(modelid, fieldid, name) {
  63. window.top.art.dialog({id:'edit'}).close();
  64. window.top.art.dialog({title:'<?php echo L('edit').L('field')?>《'+name+'》',id:'edit',iframe:'?m=member&c=member_modelfield&a=edit&modelid='+modelid+'&fieldid='+fieldid,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()});
  65. }
  66. function move(id, name) {
  67. window.top.art.dialog({id:'move'}).close();
  68. window.top.art.dialog({title:'<?php echo L('move')?>《'+name+'》',id:'move',iframe:'?m=member&c=member_model&a=move&modelid='+id,width:'700',height:'500'}, function(){var d = window.top.art.dialog({id:'move'}).data.iframe;d.document.getElementById('dosubmit').click();return false;}, function(){window.top.art.dialog({id:'move'}).close()});
  69. }
  70. function check() {
  71. if(myform.action == '?m=member&c=member_model&a=delete') {
  72. var ids='';
  73. $("input[name='modelid[]']:checked").each(function(i, n){
  74. ids += $(n).val() + ',';
  75. });
  76. if(ids=='') {
  77. window.top.art.dialog({content:'<?php echo L('plsease_select').L('member_model')?>',lock:true,width:'200',height:'50',time:1.5},function(){});
  78. return false;
  79. }
  80. }
  81. myform.submit();
  82. }
  83. //-->
  84. </script>
  85. </body>
  86. </html>