国内流行的内容管理系统(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.

392 lines
18KB

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
  6. <title>修改专题</title>
  7. <link rel="stylesheet" href="../static/web/font/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. <link rel="stylesheet" href="../static/web/css/cropper.min.css">
  12. <script>const cfg_uplitpic_cut = '<?php echo $cfg_uplitpic_cut;?>';</script>
  13. <script src="../static/web/js/jquery.min.js"></script>
  14. <script src="../static/web/js/bootstrap.min.js"></script>
  15. <script src="../static/web/js/webajax.js"></script>
  16. <script src="../static/web/js/moment.min.js"></script>
  17. <script src="../static/web/js/daterangepicker.js"></script>
  18. <script src="js/main.js"></script>
  19. <script src="../static/web/js/cropper.min.js"></script>
  20. <script>
  21. function checkSubmit() {
  22. if (document.form1.title.value == '') {
  23. ShowMsg("请输入专题标题");
  24. document.form1.title.focus();
  25. return false;
  26. }
  27. for (i = 1; i <= 6; i++) {
  28. $val = CheckVal(i);
  29. if ($val == false) {
  30. return false;
  31. }
  32. }
  33. }
  34. function CheckVal(id) {
  35. var notename = $DE('notename' + id);
  36. var arcid = $DE('arcid' + id);
  37. if (arcid.value != "") {
  38. if (notename.value == "") {
  39. $DE('notename' + id).focus();
  40. ShowMsg('请输入' + id + '名称');
  41. return false;
  42. }
  43. }
  44. }
  45. function SelectTemplets(fname) {
  46. var pos = GetWinPos(800,600);
  47. window.open("./dialog/select_templets.php?f=" + fname, "poptempWin", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=" + pos.left + ", top=" + pos.top);
  48. }
  49. function SelectArcList(fname) {
  50. var pos = GetWinPos(800,600);
  51. window.open("content_select_list.php?f=" + fname, "selArcList", "scrollbars=yes,resizable=yes,statebar=no,width=700,height=500,left=" + pos.left + ", top=" + pos.top);
  52. }
  53. </script>
  54. </head>
  55. <body>
  56. <form name="form1" action="spec_edit.php" method="post" enctype="multipart/form-data" onSubmit="return checkSubmit();">
  57. <input type="hidden" name="id" value="<?php echo $arcRow['id']?>">
  58. <input type="hidden" name="channelid" value="<?php echo $channelid?>">
  59. <input type="hidden" name="arcrank" value="<?php echo $arcRow['arcrank']?>">
  60. <input type="hidden" name="source" value="本站">
  61. <input type="hidden" name="dopost" value="save">
  62. <table width="98%" align="center" id="needset" class="admin-border my-3">
  63. <tr>
  64. <td bgcolor="#f5f5f5" class="admin-td">发布专题</td>
  65. </tr>
  66. <tr>
  67. <td class="admin-td">
  68. <div class="alert alert-info mb-0">文档列表用“1,2,3”英文逗号分开,系统会自动排除不同节点的相同文档。关于单条记录模板里“[field:fieldname/]”标签,请参考关于系统帮助关于arclist标签</div>
  69. </td>
  70. </tr>
  71. <tr>
  72. <td class="admin-td">
  73. <table>
  74. <tr>
  75. <td width="120">专题名称:</td>
  76. <td width="400"><input type="text" name="title" id="title" value="<?php echo $arcRow['title'];?>" class="admin-input-lg"></td>
  77. <td width="120">简略标题:</td>
  78. <td><input type="text" name="shorttitle" id="shorttitle" value="<?php echo $arcRow['shorttitle'];?>" class="admin-input-sm"></td>
  79. </tr>
  80. </table>
  81. </td>
  82. </tr>
  83. <tr>
  84. <td class="admin-td">
  85. <table>
  86. <tr>
  87. <td width="120">自定义属性:</td>
  88. <td>
  89. <?php
  90. $dsql->SetQuery("SELECT * FROM `#@__arcatt` ORDER BY sortid ASC");
  91. $dsql->Execute();
  92. while($trow = $dsql->GetObject())
  93. {
  94. if ($trow->att=='j') continue;
  95. if (preg_match("#".$trow->att."#", $arcRow['flag']))
  96. echo "<label class='mr-2'><input type='checkbox' name='flags[]' id='flags{$trow->att}' value='{$trow->att}' checked='checked'> {$trow->attname}[{$trow->att}]</label>";
  97. else
  98. echo "<label class='mr-2'><input type='checkbox' name='flags[]' id='flags{$trow->att}' value='{$trow->att}'> {$trow->attname}[{$trow->att}]</label>";
  99. }
  100. ?>
  101. </td>
  102. </tr>
  103. </table>
  104. </td>
  105. </tr>
  106. <tr id="pictable">
  107. <td class="admin-td">
  108. <table>
  109. <tr>
  110. <td width="120">缩略图:</td>
  111. <td width="630">
  112. <input type="text" name="picname" id="picname" value="<?php echo $arcRow['litpic']?>" class="admin-input-lg">
  113. <label><input type="checkbox" name="ddisremote" value="1" id="ddisremote" class="l-height-28"> 远程</label>
  114. <span class="btn btn-success btn-sm fileinput-button">上传图片<input type="file" name="files[]" id="iptAddImages"></span>
  115. <button type="button" name="Submit" onclick="SelectImage('form1.picname','');" class="btn btn-success btn-sm">选择图片</button>
  116. <button type="button" id="btnClearAll" class="btn btn-success btn-sm">清空</button>
  117. </td>
  118. <td><img id="litPic" src="<?php if ($arcRow['litpic']!='') echo $arcRow['litpic']; else echo '../static/web/img/thumbnail.jpg';?>" id="litPic" class="thumbnail-md"></td>
  119. </tr>
  120. </table>
  121. </td>
  122. </tr>
  123. <tr>
  124. <td class="admin-td">
  125. <table>
  126. <tr>
  127. <td width="120">作者:</td>
  128. <td><input type="text" name="writer" id="writer" value="<?php echo $arcRow['writer']?>" class="admin-input-sm"></td>
  129. </tr>
  130. </table>
  131. </td>
  132. </tr>
  133. <tr>
  134. <td class="admin-td">
  135. <table>
  136. <tr>
  137. <td width="120">主分类:</td>
  138. <td>
  139. <?php
  140. $typeOptions = GetOptionList($arcRow["typeid"],$cuserLogin->getUserChannel(),0);
  141. echo "<select name='typeid' class='admin-input-sm'>";
  142. if ($arcRow["typeid"]=="0") echo "<option value='0' selected='1'>请选择主分类</option>";
  143. echo $typeOptions;
  144. echo "</select>";
  145. ?>
  146. <i class="btn btn-sm fa fa-search" onclick="ShowCatMap(event,this,0,'typeid')" title="快捷选择"></i>
  147. </td>
  148. </tr>
  149. </table>
  150. </td>
  151. </tr>
  152. <tr>
  153. <td class="admin-td">
  154. <table>
  155. <tr>
  156. <td width="120">关键词:</td>
  157. <td><label><input type="text" name="keywords" rows="3" id="keywords" value="<?php echo $arcRow['keywords']?>" class="admin-input-lg"></label></td>
  158. </tr>
  159. </table>
  160. </td>
  161. </tr>
  162. <tr>
  163. <td class="admin-td">
  164. <table>
  165. <tr>
  166. <td width="120">专题说明:</td>
  167. <td><textarea name="description" id="textarea" class="admin-textarea-sm"><?php echo $arcRow['description']?></textarea></td>
  168. </tr>
  169. </table>
  170. </td>
  171. </tr>
  172. <?php PrintAutoFieldsEdit(stripslashes($cInfos['fieldset']),$addRow,'autofield');?>
  173. <tr>
  174. <td class="admin-td">
  175. <table width="100%">
  176. <?php
  177. $speclisttmp = GetSysTemplets("spec_arclist.htm");
  178. $i = 1;
  179. $dtp = new DedeTagParse();
  180. $dtp->LoadSource($addRow["note"]);
  181. if (is_array($dtp->CTags)) {
  182. foreach($dtp->CTags as $tagid=>$ctag) {
  183. if ($ctag->GetName()!="specnote") continue;
  184. $notename = $ctag->GetAtt('name');
  185. $col = $ctag->GetAtt('col');
  186. $idlist = $ctag->GetAtt('idlist');
  187. $imgwidth = $ctag->GetAtt('imgwidth');
  188. $imgheight = $ctag->GetAtt('imgheight');
  189. $titlelen = $ctag->GetAtt('titlelen');
  190. $infolen = $ctag->GetAtt('infolen');
  191. $temp = trim($ctag->GetInnerText());
  192. $noteid = $ctag->GetAtt('noteid');
  193. if (empty($noteid)) $noteid = $i;
  194. $isauto = $ctag->GetAtt('isauto');
  195. if (empty($isauto)) $isauto = 0;
  196. $keywords = $ctag->GetAtt('keywords');
  197. $typeid = $ctag->GetAtt('typeid');
  198. if (empty($typeid)) $typeid = 0;
  199. $rownum = $ctag->GetAtt('rownum');
  200. if (empty($rownum)) $rownum = 40;
  201. ?>
  202. <tr>
  203. <td width="120" class="admin-td">节点<?php echo $i?>名称:</td>
  204. <td class="admin-td">
  205. <input type="text" name="notename<?php echo $i?>" id="notename<?php echo $i?>" class="admin-input-lg" value="<?php echo $notename?>">
  206. <label>节点标识:<input type="text" name="noteid<?php echo $i?>" id="noteid<?php echo $i?>" value="<?php echo $noteid?>" class="admin-input-sm"></label>
  207. </td>
  208. </tr>
  209. <tr>
  210. <td class="admin-td">文档列表:</td>
  211. <td class="admin-td">
  212. <textarea name="arcid<?php echo $i?>" onblur="CheckVal(<?php echo $i ?>)" id="arcid<?php echo $i?>" class="admin-textarea-sm"><?php echo $idlist?></textarea>
  213. <button type="button" class="btn btn-success btn-sm" name="selarc<?php echo $i?>" id="selarc<?php echo $i?>2" onclick="SelectArcList('form1.arcid<?php echo $i?>');">选择节点文档</button>
  214. </td>
  215. </tr>
  216. <tr>
  217. <td class="admin-td">文档来源:</td>
  218. <td class="admin-td">
  219. <label><input type="radio" name="isauto<?php echo $i?>" id="isauto<?php echo $i?>" value="0" <?php if ($isauto==0) echo "checked";?>> 按文档列表</label>
  220. <label><input type="radio" name="isauto<?php echo $i?>" id="isauto<?php echo $i?>" value="1" <?php if ($isauto==1) echo "checked";?>> 自动获取文档</label>
  221. <label>关键词:<input type="text" name="keywords<?php echo $i?>" value="<?php echo $keywords?>" id="keywords<?php echo $i?>" value="" size="16">(英文逗号分开)</label>
  222. <label>栏目id:<input type="text" name="typeid<?php echo $i?>" value="<?php echo $typeid?>" id="typeid<?php echo $i?>" value="0" size="4"></label>
  223. </td>
  224. </tr>
  225. <tr>
  226. <td class="admin-td">节点布局:</td>
  227. <td class="admin-td">
  228. <label>列数:<input type="text" name="col<?php echo $i?>" id="col<?php echo $i?>" value="<?php echo $col?>" class="admin-input-sm"></label>
  229. <label>图片宽:<input type="text" name="imgwidth<?php echo $i?>" id="imgwidth<?php echo $i?>" value="<?php echo $imgwidth?>" class="admin-input-sm"></label>
  230. <label>图片高:<input type="text" name="imgheight<?php echo $i?>" id="imgheight<?php echo $i?>" value="<?php echo $imgheight?>" class="admin-input-sm"></label>
  231. <label>标题长:<input type="text" name="titlelen<?php echo $i?>" id="titlelen<?php echo $i?>" value="<?php echo $titlelen?>" class="admin-input-sm"></label>
  232. <label>简介长:<input type="text" name="infolen<?php echo $i?>" id="infolen<?php echo $i?>" value="<?php echo $infolen?>" class="admin-input-sm"></label>
  233. <label>文档数:<input type="text" name="rownum<?php echo $i?>" id="rownum<?php echo $i?>" value="<?php echo $rownum?>" class="admin-input-sm"></label>
  234. </td>
  235. </tr>
  236. <tr>
  237. <td class="admin-td">应用样式:</td>
  238. <td class="admin-td"><textarea name="listtmp<?php echo $i?>" id="listtmp<?php echo $i?>" class="admin-textarea-xl"><?php echo $temp?></textarea></td>
  239. </tr>
  240. <?php
  241. $i++;
  242. }}
  243. $dtp->Clear();
  244. for ($i;$i<=$cfg_specnote;$i++)
  245. {
  246. ?>
  247. <tr>
  248. <td width="120" class="admin-td">节点<?php echo $i?>名称:</td>
  249. <td class="admin-td">
  250. <input type="text" name="notename<?php echo $i?>" id="notename<?php echo $i?>" class="admin-input-lg">
  251. <label>节点标识:<input type="text" name="noteid<?php echo $i?>" id="noteid<?php echo $i?>" class="admin-input-sm"></label>
  252. </td>
  253. </tr>
  254. <tr>
  255. <td class="admin-td">文档列表:</td>
  256. <td class="admin-td">
  257. <textarea name="arcid<?php echo $i?>" rows="3" onblur="CheckVal(<?php echo $i ?>)" id="arcid<?php echo $i?>" class="admin-textarea-sm"></textarea>
  258. <button name="selarc<?php echo $i?>" type="button" id="selarc<?php echo $i?>2" class="btn btn-success btn-sm" onclick="SelectArcList('form1.arcid<?php echo $i?>');">选择节点文档</button>
  259. </td>
  260. </tr>
  261. <tr>
  262. <td class="admin-td">文档来源:</td>
  263. <td class="admin-td">
  264. <label>栏目id:<input type="text" name="typeid<?php echo $i?>" id="_typeid<?php echo $i?>" value="0" class="admin-input-sm"></label>
  265. <label>关键词:<input type="text" name="keywords<?php echo $i?>" id="keywords<?php echo $i?>" value="" class="admin-input-lg">(空格分开)</label>
  266. <label><input type="radio" name="isauto<?php echo $i?>" id="isauto<?php echo $i?>" value="0" checked="checked"> 按文档列表</label>
  267. <label><input type="radio" name="isauto<?php echo $i?>" id="isauto<?php echo $i?>" value="1"> 自动获取文档</label>
  268. </td>
  269. </tr>
  270. <tr>
  271. <td class="admin-td">节点布局:</td>
  272. <td class="admin-td">
  273. <label>列数:<input type="text" name="col<?php echo $i?>" id="col<?php echo $i?>" value="1" class="admin-input-sm"></label>
  274. <label>图片高:<input type="text" name="imgheight<?php echo $i?>" id="imgheight<?php echo $i?>" value="90" class="admin-input-sm"></label>
  275. <label>图片宽:<input type="text" name="imgwidth<?php echo $i?>" id="imgwidth<?php echo $i?>" value="120" class="admin-input-sm"></label>
  276. <label>标题长:<input type="text" name="titlelen<?php echo $i?>" id="titlelen<?php echo $i?>" value="60" class="admin-input-sm"></label>
  277. <label>简介长:<input type="text" name="infolen<?php echo $i?>" id="infolen<?php echo $i?>" value="160" class="admin-input-sm"></label>
  278. <label>文档数:<input type="text" name="rownum<?php echo $i?>" id="rownum<?php echo $i?>" value="40" class="admin-input-sm"></label>
  279. </td>
  280. </tr>
  281. <tr>
  282. <td class="admin-td">应用样式:</td>
  283. <td class="admin-td"><textarea name="listtmp<?php echo $i?>" id="listtmp<?php echo $i?>" class="admin-textarea-xl"><?php echo $speclisttmp?></textarea></td>
  284. </tr>
  285. <?php }?>
  286. </table>
  287. </td>
  288. </tr>
  289. <tr>
  290. <td class="admin-td">
  291. <table>
  292. <tr>
  293. <td width="120" width="260">评论选项:</td>
  294. <td width="260">
  295. <label><input type="radio" name="notpost" value="0" <?php if ($arcRow['notpost']==0) echo "checked='checked'";?>> 允许评论</label>
  296. <label><input type="radio" name="notpost" value="1" <?php if ($arcRow['notpost']==1) echo "checked='checked'";?>> 禁止评论</label>
  297. <td width="120">发布选项:</td>
  298. <td>
  299. <label><input type="radio" name="ishtml" value="1" <?php if ($arcRow["ismake"]!=-1) echo "checked='checked'";?>> 生成网页</label>
  300. <label><input type="radio" name="ishtml" value="0" <?php if ($arcRow["ismake"]==-1) echo "checked='checked'";?>> 仅动态浏览</label>
  301. </td>
  302. </tr>
  303. </table>
  304. </td>
  305. </tr>
  306. <tr>
  307. <td class="admin-td">
  308. <table>
  309. <tr>
  310. <td width="120">文档排序:</td>
  311. <td width="260">
  312. <select name="sortup" id="sortup" class="admin-input-sm">
  313. <?php
  314. $subday = SubDay($arcRow["sortrank"],$arcRow["senddate"]);
  315. echo "<option value='0'>正常排序</option>";
  316. if ($subday>0) echo "<option value='$subday' selected>置顶<span class='text-primary'>$subday</span>天</option>";
  317. ?>
  318. <option value="7">置顶一周</option>
  319. <option value="30">置顶一个月</option>
  320. <option value="90">置顶三个月</option>
  321. <option value="180">置顶半年</option>
  322. <option value="360">置顶一年</option>
  323. </select>
  324. </td>
  325. <td width="120">标题颜色:</td>
  326. <td>
  327. <input type="text" name="color" id="color" class="admin-input-sm" value="<?php echo $arcRow['color']?>">
  328. <button type="button" name="modcolor" id="modcolor" value="" onclick="ShowColor(event,this)" class="btn btn-success btn-sm">选取</button>
  329. </td>
  330. </tr>
  331. </table>
  332. </td>
  333. </tr>
  334. <tr>
  335. <td class="admin-td">
  336. <table>
  337. <tr>
  338. <td width="120">专题模板:</td>
  339. <td width="260">
  340. <input type="text" name="templet" id="templet" value="<?php echo $addRow['templet']?>" class="admin-input-sm">
  341. <button type="button" name="set3" class="btn btn-success btn-sm" onclick="SelectTemplets('form1.templet');">选择</button>
  342. </td>
  343. <td width="120">文件名称:</td>
  344. <td><input type="text" name="filename" id="filename" value="<?php echo $arcRow['filename']?>" class="admin-input-sm">(不包括后缀名如.html等)
  345. </td>
  346. </tr>
  347. </table>
  348. </td>
  349. </tr>
  350. <tr>
  351. <td class="admin-td">
  352. <table>
  353. <tr>
  354. <td width="120">发布时间:</td>
  355. <td>
  356. <?php
  357. $addtime = GetDateTimeMk($arcRow["senddate"]);
  358. echo "$addtime (标准排序和生成网页名称的依据时间) <input type='hidden' name='senddate' value='".$arcRow["senddate"]."' class='admin-input-sm'>";
  359. ?>
  360. </td>
  361. </tr>
  362. </table>
  363. </td>
  364. </tr>
  365. <tr>
  366. <td class="admin-td">
  367. <table>
  368. <tr>
  369. <td width="120">更新时间:</td>
  370. <td width="260">
  371. <?php
  372. $nowtime = GetDateTimeMk($arcRow["pubdate"]);
  373. echo "<input name='pubdate' value='$nowtime' type='text' id='pubdate' class='datepicker admin-input-sm'>";
  374. ?>
  375. </td>
  376. <td width="120">浏览次数:</td>
  377. <td><input type="text" name="click" value="<?php echo $arcRow['click'];?>" class="admin-input-sm"></td>
  378. </tr>
  379. </table>
  380. </td>
  381. </tr>
  382. <tr>
  383. <td bgcolor="#f5f5f5" align="center" class="admin-td">
  384. <button type="submit" class="btn btn-success btn-sm">保存</button>
  385. <button type="button" class="btn btn-outline-success btn-sm" onclick="location.reload();">重置</button>
  386. </td>
  387. </tr>
  388. </table>
  389. </form>
  390. <script>InitPage();</script>
  391. </body>
  392. </html>