index.html 1.9 KB

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