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

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