index.html 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. {// 引入标签库 }
  2. <tagLib name="html" />
  3. <include file="Public:header" />
  4. <script>
  5. function del(id)
  6. {
  7. if(!id)
  8. {
  9. idBox = $(".key:checked");
  10. if(idBox.length == 0)
  11. {
  12. alert(LANG['DELETE_EMPTY_WARNING']);
  13. return;
  14. }
  15. idArray = new Array();
  16. $.each( idBox, function(i, n){
  17. idArray.push($(n).val());
  18. });
  19. id = idArray.join(",");
  20. }
  21. if(confirm(LANG['CONFIRM_DELETE']))
  22. $.ajax({
  23. url: ROOT+"?"+VAR_MODULE+"="+MODULE_NAME+"&"+VAR_ACTION+"=del_admin&id="+id,
  24. data: "ajax=1",
  25. dataType: "json",
  26. success: function(obj){
  27. alert(obj.info);
  28. func();
  29. function func(){
  30. if(obj.status==1){
  31. location.href=location.href;
  32. }
  33. }
  34. }
  35. });
  36. }
  37. </script>
  38. <div class="main">
  39. <div class="main_title_list"><div class="list-line-ico"></div>{$main_title}</div>
  40. <div class="blank10"></div>
  41. <html:list
  42. id="dataTable"
  43. style="dataTable"
  44. name="role"
  45. checkbox="true"
  46. action="true"
  47. datasource="list"
  48. show="id:{%ID}|90px,name:{%NAME}:edit,is_effect|get_is_effect=$role['id']:{%IS_EFFECT}"
  49. actionlist="edit:{%EDIT}, del:{%DEL}" />
  50. <table class="dataTable">
  51. <tbody>
  52. <td colspan="7">
  53. <input type="button" class="button button-add" value="{%ADD}" onclick="add();" />
  54. <input type="button" class="button button-del" value="{%DEL}" onclick="del();" />
  55. </td>
  56. </tbody>
  57. </table>
  58. <div class="blank5"></div>
  59. <div class="page">{$page}</div>
  60. </div>
  61. <include file="Public:footer" />