sitemodel_manage.tpl.php 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. defined('IN_ADMIN') or exit('No permission resources.');
  3. include $this->admin_tpl('header','admin');?>
  4. <div class="pad-lr-10">
  5. <div class="table-list">
  6. <table width="100%" cellspacing="0" >
  7. <thead>
  8. <tr>
  9. <th width="100">modelid</th>
  10. <th width="100"><?php echo L('model_name');?></th>
  11. <th width="100"><?php echo L('tablename');?></th>
  12. <th ><?php echo L('description');?></th>
  13. <th width="100"><?php echo L('status');?></th>
  14. <th width="100"><?php echo L('items');?></th>
  15. <th width="230"><?php echo L('operations_manage');?></th>
  16. </tr>
  17. </thead>
  18. <tbody>
  19. <?php
  20. foreach($datas as $r) {
  21. $tablename = $r['name'];
  22. ?>
  23. <tr>
  24. <td align='center'><?php echo $r['modelid']?></td>
  25. <td align='center'><?php echo $tablename?></td>
  26. <td align='center'><?php echo $r['tablename']?></td>
  27. <td align='center'>&nbsp;<?php echo $r['description']?></td>
  28. <td align='center'><?php echo $r['disabled'] ? L('icon_locked') : L('icon_unlock')?></td>
  29. <td align='center'><?php echo $r['items']?></td>
  30. <td align='center'><a href="?m=content&c=sitemodel_field&a=init&modelid=<?php echo $r['modelid']?>&menuid=<?php echo $_GET['menuid']?>"><?php echo L('field_manage');?></a> | <a href="javascript:edit('<?php echo $r['modelid']?>','<?php echo addslashes($tablename);?>')"><?php echo L('edit');?></a> | <a href="?m=content&c=sitemodel&a=disabled&modelid=<?php echo $r['modelid']?>&menuid=<?php echo $_GET['menuid']?>"><?php echo $r['disabled'] ? L('field_enabled') : L('field_disabled');?></a> | <a href="javascript:;" onclick="model_delete(this,'<?php echo $r['modelid']?>','<?php echo L('confirm_delete_model',array('message'=>addslashes($tablename)));?>',<?php echo $r['items']?>)"><?php echo L('delete')?></a> | <a href="?m=content&c=sitemodel&a=export&modelid=<?php echo $r['modelid']?>&menuid=<?php echo $_GET['menuid']?>""><?php echo L('export');?></a></td>
  31. </tr>
  32. <?php } ?>
  33. </tbody>
  34. </table>
  35. <div id="pages"><?php echo $pages;?>
  36. </div>
  37. </div>
  38. <script type="text/javascript">
  39. <!--
  40. window.top.$('#display_center_id').css('display','none');
  41. function edit(id, name) {
  42. window.top.art.dialog({id:'edit'}).close();
  43. window.top.art.dialog({title:'<?php echo L('edit_model');?>《'+name+'》',id:'edit',iframe:'?m=content&c=sitemodel&a=edit&modelid='+id,width:'580',height:'420'}, 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()});
  44. }
  45. function model_delete(obj,id,name,items){
  46. if(items) {
  47. alert('<?php echo L('model_does_not_allow_delete');?>');
  48. return false;
  49. }
  50. window.top.art.dialog({content:name, fixed:true, style:'confirm', id:'model_delete'},
  51. function(){
  52. $.get('?m=content&c=sitemodel&a=delete&modelid='+id+'&pc_hash='+pc_hash,function(data){
  53. if(data) {
  54. $(obj).parent().parent().fadeOut("slow");
  55. }
  56. })
  57. },
  58. function(){});
  59. };
  60. //-->
  61. </script>
  62. </body>
  63. </html>