国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

ad_add.htm 11KB

2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>">
  5. <title>增加广告</title>
  6. <link rel="stylesheet" href="../static/web/css/bootstrap.min.css">
  7. <link rel="stylesheet" href="../static/web/font/css/font-awesome.min.css">
  8. <link rel="stylesheet" href="../static/web/css/admin.css">
  9. <link rel="stylesheet" href="../static/web/css/daterangepicker.css">
  10. <script src="../static/web/js/jquery.min.js" language="javascript" type="text/javascript"></script>
  11. <script type="text/javascript" src="../static/web/js/moment.min.js"></script>
  12. <script type="text/javascript" src="../static/web/js/daterangepicker.js"></script>
  13. <script language="javascript">
  14. function checkSubmit() {
  15. if (document.form1.tagname.value == "") {
  16. alert("广告标识不能为空");
  17. document.form1.tagname.focus();
  18. return false;
  19. }
  20. }
  21. $(document).ready(function () {
  22. $('.datepicker').daterangepicker({
  23. "singleDatePicker": true,
  24. "autoApply": true,
  25. "showDropdowns": true,
  26. "linkedCalendars": false,
  27. "timePicker": true,
  28. "timePicker24Hour": true,
  29. //"timePickerSeconds": true,
  30. "showCustomRangeLabel": false,
  31. ranges: {
  32. '今日': [moment(), moment()],
  33. '昨日': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
  34. '本月': [moment().startOf('month'), moment().startOf('month')],
  35. '上月': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').startOf('month')]
  36. },
  37. "locale": {
  38. format: 'YYYY-MM-DD HH:mm',
  39. applyLabel: '确定',
  40. cancelLabel: '取消',
  41. daysOfWeek: ['日', '一', '二', '三', '四', '五', '六'],
  42. monthNames: ['一月', '二月', '三月', '四月', '五月', '六月',
  43. '七月', '八月', '九月', '十月', '十一月', '十二月'],
  44. firstDay: 1
  45. }
  46. }, function (start) {
  47. $(this).val(start.format("YYYY-MM-DD HH:mm"));
  48. });
  49. })
  50. </script>
  51. <style>
  52. .typetab {
  53. text-align: left;
  54. }
  55. .typetab ul {
  56. list-style: none;
  57. }
  58. .typetab ul li {
  59. float: left;
  60. margin: 5px 5px 0px;
  61. width: 64px;
  62. height: 26px;
  63. line-height: 26px;
  64. background: url(../static/web/img/adtype_link.gif) no-repeat scroll 0px 0px;
  65. text-align: center;
  66. cursor: pointer;
  67. }
  68. .typetab ul .act {
  69. background: url(../static/web/img/adtype_act.gif) no-repeat scroll 0px 0px;
  70. }
  71. .i_table {
  72. border: 1px solid #eee;
  73. }
  74. </style>
  75. </head>
  76. <body>
  77. <form action="ad_add.php" method="post" name="form1" onSubmit="return checkSubmit()">
  78. <table width="98%" cellpadding="3" cellspacing="1" align="center" class="table maintable mt-3 mb-3">
  79. <tr>
  80. <td height="26" background="../static/web/img/tbg.gif" style="padding-left:10px"><a href="ad_main.php">广告管理</a> &gt; 增加广告位置</td>
  81. </tr>
  82. <tr>
  83. <td>
  84. <table width="100%" cellspacing="4" cellpadding="4" class="table table-borderless">
  85. <input name="normbody[style]" type="hidden" value="code" id="adstyle">
  86. <input type="hidden" name="_csrf_token" value="<?php echo $GLOBALS['csrf_token']; ?>">
  87. <input type='hidden' name='dopost' value='save'>
  88. <tr>
  89. <td height="26" colspan="3">广告代码的调用方法:{dede:myad name='广告位标识'/} </td>
  90. </tr>
  91. <tr>
  92. <td height="26">广告位标识:</td>
  93. <td colspan="2"><input name="tagname" type="text" id="tagname" class="iptxt" style="width:260px">(使用英文或数字表示的简洁标识)</td>
  94. </tr>
  95. <tr>
  96. <td height="26">广告分类:</td>
  97. <td colspan="2">
  98. <select name='clsid' id="clsid" style='width:160px'>
  99. <option value='0'>默认分类</option>
  100. <?php echo $option; ?>
  101. </select>
  102. </td>
  103. </tr>
  104. <tr>
  105. <td height="26">广告投放范围:</td>
  106. <td colspan="2"><?php
  107. $tl = new TypeLink(0);
  108. $typeOptions = $tl->GetOptionArray(0,0,0);
  109. echo "<select name='typeid' style='width:160px'>";
  110. echo "<option value='0' selected>投放在没有同名标识的所有栏目</option>";
  111. echo $typeOptions;
  112. echo "</select>";
  113. ?>
  114. <br>
  115. (如果在所选栏目找不到指定标识的广告内容,系统会自动搜索父栏目)</td>
  116. </tr>
  117. <tr>
  118. <td height="26">广告位名称:</td>
  119. <td colspan="2"><input name="adname" type="text" id="adname" class="iptxt" style="width:260px"></td>
  120. </tr>
  121. <tr>
  122. <td height="26">时间限制:</td>
  123. <td colspan="2">
  124. <input name="timeset" type="radio" class="np" value="0" checked='1' id="notimelimit">
  125. <label for="notimelimit">永不过期</label>
  126. <input type="radio" name="timeset" class="np" value="1" id="timelimit">
  127. <label for="timelimit">在设内时间内有效</label>
  128. </td>
  129. </tr>
  130. <tr>
  131. <td height="26">投放时间:</td>
  132. <td colspan="2">从
  133. <input name="starttime" type="text" id="starttime" value="<?php echo $startDay?>" class='iptxt datepicker' style="width:160px">
  134. <input name="endtime" type="text" id="endtime" value="<?php echo $endDay?>" class='iptxt datepicker' style="width:160px">
  135. </td>
  136. </tr>
  137. <tr>
  138. <td height="80">广告内容:</td>
  139. <td width="70%">
  140. <div class="typetab">
  141. <ul id="changeTab">
  142. <li id="t_code" class="act">代码</li>
  143. <li id="t_txt">文字</li>
  144. <li id="t_img">图片</li>
  145. <li id="t_flash">Flash</li>
  146. </ul>
  147. <div style="clear:both"></div>
  148. </div>
  149. <div id='advert'></div>
  150. </td>
  151. <td width="10%"></td>
  152. </tr>
  153. <tr>
  154. <td height="80">过期显示内容:</td>
  155. <td><textarea name="expbody" rows="10" id="expbody" style="width:80%;height:100px"></textarea></td>
  156. <td></td>
  157. </tr>
  158. <tr>
  159. <td colspan="3" align="center" class="py-3"><button type="submit" class="btn btn-success btn-sm">保存</button></td>
  160. </tr>
  161. </table>
  162. </td>
  163. </tr>
  164. </table>
  165. </form>
  166. <div style="display:none" id="formtxt">
  167. <div class="content" id="code" style="display:none">
  168. <table width="80%" cellpadding="3" cellspacing="1" class="i_table">
  169. <tr class="b">
  170. <td width="260">广告代码:<br>
  171. 请填写广告代码,支持html代码</td>
  172. <td><textarea name="normbody[htmlcode]" style="width:380px;height:100px"></textarea></td>
  173. </tr>
  174. </table>
  175. </div>
  176. <div class="content" id="txt" style="display:none">
  177. <table width="80%" cellpadding=3 cellspacing=1 class='i_table'>
  178. <tr>
  179. <td class="b" width="260">文字内容 *</td>
  180. <td class="b"><input type="text" name="normbody[title]" value="" class="iptxt" style="width:360px"></td>
  181. </tr>
  182. <tr>
  183. <td class="b">文字链接 *</td>
  184. <td class="b"><input type="text" name="normbody[link]" value="" class="iptxt" style="width:360px"></td>
  185. </tr>
  186. <tr>
  187. <td class="b">文字颜色</td>
  188. <td class="b"><input type="text" name="normbody[color]" value="" class="iptxt" style="width:360px"></td>
  189. </tr>
  190. <tr>
  191. <td class="b">文字大小</td>
  192. <td class="b"><input type="text" name="normbody[size]" value="" class="iptxt" style="width:360px"></td>
  193. </tr>
  194. </table>
  195. </div>
  196. <div class="content" id="img" style="display:none">
  197. <table width="80%" cellpadding=3 cellspacing=1 class='i_table'>
  198. <tr>
  199. <td class="b" width="260">图片地址 *</td>
  200. <td class="b"><input type="text" name="normbody[url]" value="" class="iptxt" style="width:360px"></td>
  201. </tr>
  202. <tr>
  203. <td class="b">图片链接 *</td>
  204. <td class="b"><input type="text" name="normbody[link]" value="" class="iptxt" style="width:360px"></td>
  205. </tr>
  206. <tr>
  207. <td class="b">图片宽度</td>
  208. <td class="b"><input type="text" name="normbody[width]" value="" class="iptxt" style="width:360px"></td>
  209. </tr>
  210. <tr>
  211. <td class="b">图片高度</td>
  212. <td class="b"><input type="text" name="normbody[height]" value="" class="iptxt" style="width:360px"></td>
  213. </tr>
  214. <tr>
  215. <td class="b">图片描述</td>
  216. <td class="b"><input type="text" name="normbody[descrip]" value="" class="iptxt" style="width:360px"></td>
  217. </tr>
  218. </table>
  219. </div>
  220. <div class="content" id="flash" style="display:none">
  221. <table width="80%" cellpadding=3 cellspacing=1 class='i_table'>
  222. <tr>
  223. <td class="b" width="260">flash链接</td>
  224. <td class="b"><input type="text" name="normbody[link]" value="" class="iptxt" style="width:360px"></td>
  225. </tr>
  226. <tr>
  227. <td class="b">flash宽度</td>
  228. <td class="b"><input type="text" name="normbody[width]" value="" class="iptxt" style="width:360px"></td>
  229. </tr>
  230. <tr>
  231. <td class="b">flash高度</td>
  232. <td class="b"><input type="text" name="normbody[height]" value="" class="iptxt" style="width:360px"></td>
  233. </tr>
  234. </table>
  235. </div>
  236. </div>
  237. <script language="JavaScript">
  238. (function ($) {
  239. function showcode(idName) {
  240. $("#advert").html("").html($("#formtxt>#" + idName).html());
  241. $("#adstyle").val(idName);
  242. }
  243. showcode('code');
  244. $("#changeTab>li").click(function () {
  245. var tabLi = $(this);
  246. var thistab = tabLi[0].id;
  247. $(".content").each(function () {
  248. if ("t_" + $(this)[0].id == thistab) {
  249. $("#changeTab>li").removeClass("act");
  250. $("#t_" + $(this)[0].id).addClass("act");
  251. showcode($(this)[0].id);
  252. }
  253. })
  254. })
  255. })(jQuery);
  256. </script>
  257. </body>
  258. </html>