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

ad_add.htm 11KB

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