c73ca1c7cf7e4c6134f578f64c7d5cad.php 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <?php /*a:2:{s:79:"/data/web/mall.valimart.net/app/admin/view/articleclass/article_class_edit.html";i:1657785096;s:61:"/data/web/mall.valimart.net/app/admin/view/public/header.html";i:1657785098;}*/ ?>
  2. <!DOCTYPE html>
  3. <html>
  4. <head>
  5. <meta charset="utf-8">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  7. <title><?php echo htmlentities((isset($html_title) && ($html_title !== '')?$html_title:config('ds_config.site_name'))); ?><?php echo htmlentities(lang('system_backend')); ?></title>
  8. <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  9. <link rel="stylesheet" href="<?php echo htmlentities(ADMIN_SITE_ROOT); ?>/css/admin.css">
  10. <link rel="stylesheet" href="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/js/jquery-ui/jquery-ui.min.css">
  11. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/jquery-2.1.4.min.js"></script>
  12. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/jquery.validate.min.js"></script>
  13. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/jquery.cookie.js"></script>
  14. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/common.js"></script>
  15. <script src="<?php echo htmlentities(ADMIN_SITE_ROOT); ?>/js/admin.js"></script>
  16. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/js/jquery-ui/jquery-ui.min.js"></script>
  17. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/js/jquery-ui/jquery.ui.datepicker-zh-CN.js"></script>
  18. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/perfect-scrollbar.min.js"></script>
  19. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/layer/layer.js"></script>
  20. <script type="text/javascript">
  21. var BASESITEROOT = "<?php echo htmlentities(BASE_SITE_ROOT); ?>";
  22. var ADMINSITEROOT = "<?php echo htmlentities(ADMIN_SITE_ROOT); ?>";
  23. var BASESITEURL = "<?php echo htmlentities(BASE_SITE_URL); ?>";
  24. var HOMESITEURL = "<?php echo htmlentities(HOME_SITE_URL); ?>";
  25. var ADMINSITEURL = "<?php echo htmlentities(ADMIN_SITE_URL); ?>";
  26. </script>
  27. </head>
  28. <body>
  29. <div id="append_parent"></div>
  30. <div id="ajaxwaitid"></div>
  31. <div class="page">
  32. <div class="fixed-empty"></div>
  33. <form id="article_class_form" method="post" name="articleClassForm">
  34. <table class="ds-default-table">
  35. <tbody>
  36. <tr class="noborder">
  37. <td colspan="2" class="required">
  38. <label class="validation" for="ac_name"><?php echo htmlentities(lang('ac_name')); ?>:</label>
  39. </td>
  40. </tr>
  41. <tr class="noborder">
  42. <td class="vatop rowform">
  43. <input type="text" value="<?php echo htmlentities((isset($class_array['ac_name']) && ($class_array['ac_name'] !== '')?$class_array['ac_name']:'')); ?>" name="ac_name" id="ac_name" class="txt">
  44. </td>
  45. <td class="vatop tips"><?php echo htmlentities(lang('ac_name_tips')); ?></td>
  46. </tr>
  47. <?php if(empty($class_array) || (($class_array instanceof \think\Collection || $class_array instanceof \think\Paginator ) && $class_array->isEmpty())): ?>
  48. <tr>
  49. <td colspan="2" class="required">
  50. <label for="parent_id"><?php echo htmlentities(lang('article_class_add_sup_class')); ?>:</label>
  51. </td>
  52. </tr>
  53. <tr class="noborder">
  54. <td class="vatop rowform">
  55. <select name="ac_parent_id" id="ac_parent_id">
  56. <option value="0"><?php echo htmlentities(lang('ds_please_choose')); ?>...</option>
  57. <?php if(!(empty($parent_list) || (($parent_list instanceof \think\Collection || $parent_list instanceof \think\Paginator ) && $parent_list->isEmpty()))): if(is_array($parent_list) || $parent_list instanceof \think\Collection || $parent_list instanceof \think\Paginator): if( count($parent_list)==0 ) : echo "" ;else: foreach($parent_list as $key=>$v): ?>
  58. <option <?php if($ac_parent_id == $v['ac_id']): ?>selected='selected'<?php endif; ?> value="<?php echo htmlentities($v['ac_id']); ?>"><?php echo $v['ac_name']; ?></option>
  59. <?php endforeach; endif; else: echo "" ;endif; ?>
  60. <?php endif; ?>
  61. </select>
  62. </td>
  63. <td class="vatop tips"><?php echo htmlentities(lang('article_class_add_sup_class_notice')); ?></td>
  64. </tr>
  65. <?php endif; ?>
  66. <tr>
  67. <td colspan="2" class="required">
  68. <label for="ac_sort"><?php echo htmlentities(lang('ds_sort')); ?>:</label>
  69. </td>
  70. </tr>
  71. <tr class="noborder">
  72. <td class="vatop rowform">
  73. <input type="text" value="<?php echo htmlentities((isset($class_array['ac_sort']) && ($class_array['ac_sort'] !== '')?$class_array['ac_sort']:'')); ?>" name="ac_sort" id="ac_sort" class="txt"></td>
  74. <td class="vatop tips"><?php echo htmlentities(lang('article_class_add_update_sort')); ?></td>
  75. </tr>
  76. </tbody>
  77. <tfoot>
  78. <tr class="tfoot">
  79. <td colspan="15" >
  80. <input class="btn" type="submit" value="<?php echo htmlentities(lang('ds_submit')); ?>"/>
  81. </td>
  82. </tr>
  83. </tfoot>
  84. </table>
  85. </form>
  86. </div>
  87. <script>
  88. $(document).ready(function () {
  89. $('#article_class_form').validate({
  90. errorPlacement: function (error, element) {
  91. error.appendTo(element.parent().parent().prev().find('td:first'));
  92. },
  93. rules: {
  94. ac_name: {
  95. required: true,
  96. remote: {
  97. url: ADMINSITEURL + '/Articleclass/Ajax/branch/check_class_name',
  98. type: 'get',
  99. data: {
  100. ac_name: function () {
  101. return $('#ac_name').val();
  102. },
  103. ac_parent_id: function () {
  104. return $('#ac_parent_id').val();
  105. },
  106. ac_id: "<?php echo htmlentities((isset($class_array['ac_id']) && ($class_array['ac_id'] !== '')?$class_array['ac_id']:'')); ?>"
  107. }
  108. }
  109. },
  110. ac_sort: {
  111. number: true,
  112. range : [0,255]
  113. }
  114. },
  115. messages: {
  116. ac_name: {
  117. required: "<?php echo htmlentities(lang('article_class_add_name_null')); ?>",
  118. remote: "<?php echo htmlentities(lang('article_class_add_name_exists')); ?>"
  119. },
  120. ac_sort: {
  121. number: "<?php echo htmlentities(lang('article_class_add_sort_int')); ?>",
  122. range: '<?php echo htmlentities(lang('ds_range_0_255')); ?>'
  123. }
  124. }
  125. });
  126. });
  127. </script>