国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

126 lines
4.9KB

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
  6. <title>修改广告</title>
  7. <link rel="stylesheet" href="/static/web/css/font-awesome.min.css">
  8. <link rel="stylesheet" href="/static/web/css/bootstrap.min.css">
  9. <link rel="stylesheet" href="/static/web/css/admin.css">
  10. <link rel="stylesheet" href="/static/web/css/daterangepicker.css">
  11. <script src="/static/web/js/jquery.min.js"></script>
  12. <script src="/static/web/js/moment.min.js"></script>
  13. <script src="/static/web/js/daterangepicker.js"></script>
  14. </head>
  15. <body>
  16. <ol class="breadcrumb">
  17. <li class="breadcrumb-item"><a href="index_body.php">后台面板</a></li>
  18. <li class="breadcrumb-item"><a href="ad_main.php">广告管理</a></li>
  19. <li class="breadcrumb-item active">修改广告</li>
  20. </ol>
  21. <div class="card shadow-sm">
  22. <div class="card-header">修改广告</div>
  23. <div class="card-body">
  24. <form name="form1" action="ad_edit.php" method="post" enctype="multipart/form-data">
  25. <input type="hidden" name="aid" value="<?php echo $aid?>">
  26. <input type="hidden" name="dopost" value="saveedit">
  27. <input type="hidden" name="_csrf_token" value="<?php echo $GLOBALS['csrf_token'];?>">
  28. <div class="table-responsive">
  29. <table class="table table-borderless">
  30. <tbody>
  31. <tr>
  32. <td width="260">广告名称</td>
  33. <td><input type="text" name="adname" id="adname" value="<?php echo $row['adname']?>" class="admin-input-lg" required></td>
  34. </tr>
  35. <tr>
  36. <td>广告标记</td>
  37. <td><?php echo $row['tagname'];?></td>
  38. </tr>
  39. <tr>
  40. <td>广告分类</td>
  41. <td>
  42. <select name="clsid" id="clsid" class="admin-input-sm">
  43. <option value="0">默认分类</option>
  44. <?php echo $option;?>
  45. </select>
  46. </td>
  47. </tr>
  48. <tr>
  49. <td>投放范围</td>
  50. <td>
  51. <?php
  52. $tl = new TypeLink(0);
  53. $typeOptions = $tl->GetOptionArray($row['typeid'],0,0);
  54. echo "<select name='typeid' class='admin-input-sm'>";
  55. echo "<option value='0' selected>没有同名标记所有栏目</option>";
  56. echo $typeOptions;
  57. echo "</select>";
  58. ?>
  59. <span>(栏目找不到指定广告标记,则自动搜索父栏目)</span>
  60. </td>
  61. </tr>
  62. <tr>
  63. <td>时间限制</td>
  64. <td>
  65. <label><input type="radio" name="timeset" value="0" <?php if ($row['timeset']==0) echo 'checked';?>> 不限时间</label>
  66. <label><input type="radio" name="timeset" value="1" <?php if ($row['timeset']==1) echo 'checked';?>> 限制时间</label>
  67. </td>
  68. </tr>
  69. <tr>
  70. <td>投放时间</td>
  71. <td>
  72. <label>从:<input type="text" name="starttime" id="starttime" value="<?php echo GetDateTimeMk($row['starttime'])?>" class="datepicker admin-input-sm"></label>
  73. <label>到:<input type="text" name="endtime" id="endtime" value="<?php echo GetDateTimeMk($row['endtime'])?>" class="datepicker admin-input-sm"></label>
  74. </td>
  75. </tr>
  76. <tr>
  77. <td>广告内容</td>
  78. <td><textarea name="normbody" id="normbody" class="admin-textarea-xl"><?php echo dede_htmlspecialchars(stripslashes($row['normbody']))?></textarea></td>
  79. </tr>
  80. <tr>
  81. <td>过期内容</td>
  82. <td><textarea name="expbody" id="expbody" class="admin-textarea-xl"><?php echo dede_htmlspecialchars($row['expbody'])?></textarea></td>
  83. </tr>
  84. <tr>
  85. <td colspan="2" align="center">
  86. <button type="submit" class="btn btn-success btn-sm">保存</button>
  87. <button type="reset" class="btn btn-outline-success btn-sm">重置</button>
  88. </td>
  89. </tr>
  90. </tbody>
  91. </table>
  92. </div>
  93. </form>
  94. </div>
  95. </div>
  96. <script>
  97. $(document).ready(function() {
  98. $('.datepicker').daterangepicker({
  99. "singleDatePicker": true,
  100. "autoApply": true,
  101. "showDropdowns": true,
  102. "linkedCalendars": false,
  103. "timePicker": true,
  104. "timePicker24Hour": true,
  105. "showCustomRangeLabel": false,
  106. ranges: {
  107. '今日': [moment(), moment()],
  108. '昨日': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
  109. '本月': [moment().startOf('month'), moment().startOf('month')],
  110. '上月': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').startOf('month')]
  111. },
  112. "locale": {
  113. format: 'YYYY-MM-DD HH:mm',
  114. applyLabel: '确定',
  115. cancelLabel: '取消',
  116. daysOfWeek: ['日', '一', '二', '三', '四', '五', '六'],
  117. monthNames: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
  118. firstDay: 1
  119. }
  120. }, function(start) {
  121. $(this).val(start.format("YYYY-MM-DD HH:mm"));
  122. });
  123. });
  124. </script>
  125. </body>
  126. </html>