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

455 lines
23KB

  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. <script>const cfg_uplitpic_cut = '<?php echo $cfg_uplitpic_cut; ?>';</script>
  10. <script language="javascript" src="../static/web/js/jquery.min.js"></script>
  11. <script language="javascript" src="../static/web/js/webajax.js"></script>
  12. <link rel="stylesheet" href="../static/web/css/daterangepicker.css">
  13. <link rel="stylesheet" href="../static/web/css/jquery.fileupload.css">
  14. <script type="text/javascript" src="../static/web/js/moment.min.js"></script>
  15. <script type="text/javascript" src="../static/web/js/daterangepicker.js"></script>
  16. <script src="../static/web/js/bootstrap.bundle.min.js"></script>
  17. <script language='javascript' src='js/main.js'></script>
  18. <link rel="stylesheet" href="../static/web/css/cropper.min.css">
  19. <script src="../static/web/js/cropper.min.js"></script>
  20. <script language="javascript">
  21. function SelectTemplets(fname) {
  22. var pos = GetWinPos(800,600);
  23. 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);
  24. }
  25. function SelectArcList(fname) {
  26. var pos = GetWinPos(800,600);
  27. 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);
  28. }
  29. function checkSubmit() {
  30. if (document.form1.title.value == "") {
  31. ShowMsg("专题名称不能为空");
  32. return false;
  33. }
  34. for (i = 1; i <= 6; i++) {
  35. $val = CheckVal(i);
  36. if ($val == false) {
  37. return false;
  38. }
  39. }
  40. }
  41. function CheckVal(id) {
  42. var notename = $DE('notename' + id);
  43. var arcid = $DE('arcid' + id);
  44. if (arcid.value != "") {
  45. if (notename.value == "") {
  46. $DE('notename' + id).focus();
  47. ShowMsg('您的节点' + id + '名称不能为空');
  48. return false;
  49. }
  50. }
  51. }
  52. </script>
  53. <style>
  54. body{background:#fff}
  55. img{vertical-align:baseline}
  56. table{border-collapse:separate}
  57. .btn+.btn{margin-left:10px}
  58. </style>
  59. </head>
  60. <body>
  61. <form name="form1" action="spec_edit.php" enctype="multipart/form-data" method="post" onSubmit="return checkSubmit();">
  62. <input type="hidden" name="id" value="<?php echo $arcRow['id']?>">
  63. <input type="hidden" name="channelid" value="<?php echo $channelid?>">
  64. <input type="hidden" name="arcrank" value="<?php echo $arcRow['arcrank']?>">
  65. <input type="hidden" name="source" value="本站">
  66. <input type="hidden" name="dopost" value="save">
  67. <table width="98%" align="center" cellpadding="0" cellspacing="0" class="mt-3">
  68. <tr>
  69. <td width="85%" height="26"><i class="fa fa-book"></i> <a href="content_s_list.php">专题列表</a><a href="catalog_do.php?cid=<?php echo $cid?>&channelid=<?php echo $channelid?>&dopost=listArchives"></a> &gt; 修改专题</td>
  70. <td width="10%" align="right"><a href="makehtml_spec.php" class="btn btn-success btn-sm">更新HTML</a></td>
  71. </tr>
  72. </table>
  73. <table width="98%" align="center" cellpadding="0" cellspacing="0" id="head1">
  74. <tr>
  75. <td colspan="2">
  76. <table width="168" cellpadding="0" cellspacing="0">
  77. <tr>
  78. <td width="86" height="26" align="center" background="../static/web/img/itemnote1.gif">常规参数</td>
  79. <td width="86" align="center" background="../static/web/img/itemnote2.gif"><a href="javascript:;" onClick="ShowItem2()">专题文档</a></td>
  80. </tr>
  81. </table>
  82. </td>
  83. </tr>
  84. </table>
  85. <table width="98%" align="center" cellpadding="0" cellspacing="0" id="head2" style="display:none">
  86. <tr>
  87. <td colspan="2">
  88. <table width="168" height="26" cellpadding="0" cellspacing="0">
  89. <tr>
  90. <td width="86" align="center" background="../static/web/img/itemnote2.gif"><a href="javascript:;" onClick="ShowItem1()">常规参数</a></td>
  91. <td width="86" align="center" background="../static/web/img/itemnote1.gif">专题文档</td>
  92. </tr>
  93. </table>
  94. </td>
  95. </tr>
  96. </table>
  97. <table width="98%" align="center" cellpadding="2" cellspacing="2" id="needset" style="border:1px solid #dee2e6;background:#ffffff;">
  98. <tr>
  99. <td height="26" class="bline">
  100. <table width="900" cellspacing="0" cellpadding="0">
  101. <tr>
  102. <td width="90">&nbsp;专题名称:</td>
  103. <td width='400'><input name="title" type="text" id="title" value="<?php echo $arcRow['title']; ?>" style="width:380px"></td>
  104. <td width="90">&nbsp;简略标题:</td>
  105. <td><input name="shorttitle" type="text" id="shorttitle" value="<?php echo $arcRow['shorttitle']; ?>" style="width:160px"></td>
  106. </tr>
  107. </table>
  108. </td>
  109. </tr>
  110. <tr>
  111. <td width="400%" height="26" class="bline">
  112. <table width="900" cellspacing="0" cellpadding="0">
  113. <tr>
  114. <td width="90">&nbsp;自定义属性:</td>
  115. <td>
  116. <?php
  117. $dsql->SetQuery("Select * From `#@__arcatt` order by sortid asc");
  118. $dsql->Execute();
  119. while($trow = $dsql->GetObject())
  120. {
  121. if($trow->att=='j') continue;
  122. if(preg_match("#".$trow->att."#", $arcRow['flag']))
  123. echo "<label><input class='np' type='checkbox' name='flags[]' id='flags{$trow->att}' value='{$trow->att}' checked='checked'> {$trow->attname}[{$trow->att}]</label> ";
  124. else
  125. echo "<label><input class='np' type='checkbox' name='flags[]' id='flags{$trow->att}' value='{$trow->att}'> {$trow->attname}[{$trow->att}]</label> ";
  126. }
  127. ?>
  128. </td>
  129. </tr>
  130. </table>
  131. </td>
  132. </tr>
  133. <tr id="pictable">
  134. <td height="26" colspan="4" class="bline">
  135. <table width="900" cellspacing="0" cellpadding="0">
  136. <tr>
  137. <td width="90" height="90">&nbsp;缩略图:</td>
  138. <td>
  139. <input name="picname" type="text" id="picname" value="<?php echo $arcRow['litpic']?>" style="width:300px">
  140. <label><input type='checkbox' class='np' name='ddisremote' value='1'>&nbsp;远程</label>
  141. <span class="btn btn-success btn-sm fileinput-button">上传图片<input type="file" name="files[]" id="iptAddImages"></span>
  142. <button type="button" name="Submit" onClick="SelectImage('form1.picname','');" class="btn btn-success btn-sm">选择图片</button>
  143. <button id="btnClearAll" type="button" class="btn btn-success btn-sm delete">清空</button>
  144. </td>
  145. <td align="center"><img id="litPic" src="<?php if($arcRow['litpic']!='') echo $arcRow['litpic']; else echo '../static/web/img/defaultpic.jpg'; ?>" style="height:80px"></td>
  146. </tr>
  147. </table>
  148. </td>
  149. </tr>
  150. <tr>
  151. <td height="26" colspan="4" class="bline">
  152. <table width="900" cellspacing="0" cellpadding="0">
  153. <tr>
  154. <td width="90">&nbsp;责任编辑:</td>
  155. <td><input name="writer" type="text" id="writer" value="<?php echo $arcRow['writer']?>" style="width:160px"></td>
  156. </tr>
  157. </table>
  158. </td>
  159. </tr>
  160. <tr>
  161. <td height="26" colspan="4" class="bline">
  162. <table width="900" cellspacing="0" cellpadding="0">
  163. <tr>
  164. <td width="90">&nbsp;内容排序:</td>
  165. <td width="260">
  166. <select name="sortup" id="sortup" style="width:160px">
  167. <?php
  168. $subday = SubDay($arcRow["sortrank"],$arcRow["senddate"]);
  169. echo "<option value='0'>正常排序</option>";
  170. if($subday>0) echo "<option value='$subday' selected>置顶 $subday 天</option>";
  171. ?>
  172. <option value="7">置顶一周</option>
  173. <option value="30">置顶一个月</option>
  174. <option value="90">置顶三个月</option>
  175. <option value="180">置顶半年</option>
  176. <option value="360">置顶一年</option>
  177. </select>
  178. </td>
  179. <td width="90">标题颜色:</td>
  180. <td width="130"><input name="color" type="text" id="color" style="width:160px" value="<?php echo $arcRow['color']?>"></td>
  181. <td><button name="modcolor" type="button" id="modcolor" value="" onClick="ShowColor(event,this)" class="btn btn-success btn-sm">选取</button></td>
  182. </tr>
  183. </table>
  184. </td>
  185. </tr>
  186. <tr>
  187. <td height="26" colspan="4" class="bline">
  188. <table width="900" cellspacing="0" cellpadding="0">
  189. <tr>
  190. <td width="90">&nbsp;主分类:</td>
  191. <td>
  192. <?php
  193. $typeOptions = GetOptionList($arcRow["typeid"],$cuserLogin->getUserChannel(),0);
  194. echo "<select name='typeid' style='width:160px'>";
  195. if($arcRow["typeid"]=="0") echo "<option value='0' selected='1'>请选择主分类</option>";
  196. echo $typeOptions;
  197. echo "</select>";
  198. ?>
  199. <i class='btn btn-sm fa fa-search' onClick="ShowCatMap(event,this,0,'typeid')" title='快捷选择' style='cursor:pointer'></i>
  200. </td>
  201. </tr>
  202. </table>
  203. </td>
  204. </tr>
  205. <tr>
  206. <td height="26" colspan="4" class="bline">
  207. <table width="900" cellspacing="0" cellpadding="0">
  208. <tr>
  209. <td width="90">&nbsp;关键词:</td>
  210. <td><label><input type="text" name="keywords" rows="3" id="keywords" value="<?php echo $arcRow['keywords']?>" style="width:360px"></label></td>
  211. </tr>
  212. </table>
  213. </td>
  214. </tr>
  215. <tr>
  216. <td height="26" colspan="4" class="bline">
  217. <table width="900" cellspacing="0" cellpadding="0">
  218. <tr>
  219. <td width="90">&nbsp;专题说明:</td>
  220. <td><textarea name="description" id="textarea" style="width:360px;height:50px"><?php echo $arcRow['description']?></textarea></td>
  221. </tr>
  222. </table>
  223. </td>
  224. </tr>
  225. <tr>
  226. <td height="26" colspan="4" class="bline">
  227. <table width="900" cellspacing="0" cellpadding="0">
  228. <tr>
  229. <td width="90" height="26" width="260">&nbsp;评论选项:</td>
  230. <td width="260">
  231. <label><input type='radio' name='notpost' class='np' value='0' <?php if($arcRow['notpost']==0) echo " checked='1' "; ?> /> 允许评论 </label>
  232. &nbsp;
  233. <label><input type='radio' name='notpost' class='np' value='1' <?php if($arcRow['notpost']==1) echo " checked='1' "; ?> /> 禁止评论 </label>
  234. <td width="90">发布选项:</td>
  235. <td>
  236. <label><input name="ishtml" type="radio" class="np" value="1" <?php if($arcRow["ismake"]!=-1) echo " checked='1'"; ?>>
  237. 生成HTML </label>
  238. <label><input type="radio" name="ishtml" class="np" value="0" <?php if($arcRow["ismake"]==-1) echo " checked='1'"; ?>>
  239. 仅动态浏览 </label>
  240. </td>
  241. </tr>
  242. </table>
  243. </td>
  244. </tr>
  245. <tr>
  246. <td height="26" colspan="4" class="bline">
  247. <table width="900" cellspacing="0" cellpadding="0">
  248. <tr>
  249. <td width="90">&nbsp;专题模板:</td>
  250. <td width="260">
  251. <input name="templet" type="text" id="templet" value="<?php echo $addRow['templet']?>" style="width:160px">
  252. <button type="button" name="set3" class="btn btn-success btn-sm" onClick="SelectTemplets('form1.templet');">浏览</button>
  253. </td>
  254. <td width="90">&nbsp;文件名称:</td>
  255. <td><input type="text" name="filename" id="filename" value="<?php echo $arcRow['filename']?>" style="width:160px">(不包括后缀名如.html等)</td>
  256. </tr>
  257. </table>
  258. </td>
  259. </tr>
  260. <tr>
  261. <td height="26" colspan="4" class="bline">
  262. <table width="900" cellspacing="0" cellpadding="0">
  263. <tr>
  264. <td width="90">&nbsp;发布时间:</td>
  265. <td>
  266. <?php
  267. $addtime = GetDateTimeMk($arcRow["senddate"]);
  268. echo "$addtime (标准排序和生成HTML名称的依据时间) <input type='hidden' name='senddate' value='".$arcRow["senddate"]."' style='width:160px'>";
  269. ?>
  270. </td>
  271. </tr>
  272. </table>
  273. </td>
  274. </tr>
  275. <tr>
  276. <td height="26" colspan="4" class="bline">
  277. <table width="900" cellspacing="0" cellpadding="0">
  278. <tr>
  279. <td width="90">&nbsp;更新时间:</td>
  280. <td width="260">
  281. <?php
  282. $nowtime = GetDateTimeMk($arcRow["pubdate"]);
  283. echo "<input name='pubdate' value='$nowtime' type='text' id='pubdate' class='datepicker' style='width:160px'>";
  284. ?>
  285. </td>
  286. <td width="90">浏览次数:</td>
  287. <td><input type="text" name="click" value="<?php echo $arcRow['click']; ?>" style="width:160px"></td>
  288. </tr>
  289. </table>
  290. </td>
  291. </tr>
  292. <tr>
  293. <td>
  294. <?php
  295. PrintAutoFieldsEdit(stripslashes($cInfos['fieldset']),$addRow,'autofield');
  296. ?>
  297. </td>
  298. </tr>
  299. </table>
  300. <table width="98%" align="center" cellpadding="2" cellspacing="2" style="border:1px solid #dee2e6;background:#ffffff;display:none;" id="adset">
  301. <tr>
  302. <td height="26" class="bline2"> 专题节点列表:(文章列表用ID1,ID2,ID3这样形式分开,系统会自动排除不同节点的相同文章)<br>关于单条记录模板里的[field:fieldname /]标记的使用,请参考关于系统帮助关于 arclist 标记的说明</td>
  303. </tr>
  304. <tr>
  305. <td height="26">
  306. <table width="98%" cellspacing="2" cellpadding="2">
  307. <?php
  308. $speclisttmp = GetSysTemplets("spec_arclist.htm");
  309. $i = 1;
  310. $dtp = new DedeTagParse();
  311. $dtp->LoadSource($addRow["note"]);
  312. if(is_array($dtp->CTags)){
  313. foreach($dtp->CTags as $tagid=>$ctag)
  314. {
  315. if($ctag->GetName()!="specnote") continue;
  316. $notename = $ctag->GetAtt('name');
  317. $col = $ctag->GetAtt('col');
  318. $idlist = $ctag->GetAtt('idlist');
  319. $imgwidth = $ctag->GetAtt('imgwidth');
  320. $imgheight = $ctag->GetAtt('imgheight');
  321. $titlelen = $ctag->GetAtt('titlelen');
  322. $infolen = $ctag->GetAtt('infolen');
  323. $temp = trim($ctag->GetInnerText());
  324. $noteid = $ctag->GetAtt('noteid');
  325. if(empty($noteid)) $noteid = $i;
  326. $isauto = $ctag->GetAtt('isauto');
  327. if(empty($isauto)) $isauto = 0;
  328. $keywords = $ctag->GetAtt('keywords');
  329. $typeid = $ctag->GetAtt('typeid');
  330. if(empty($typeid)) $typeid = 0;
  331. $rownum = $ctag->GetAtt('rownum');
  332. if(empty($rownum)) $rownum = 40;
  333. ?>
  334. <tr bgcolor="#FBFCE2">
  335. <td width="260">节点<?php echo $i?>名称:</td>
  336. <td colspan="2">
  337. <table width="900" cellspacing="0" cellpadding="0">
  338. <tr>
  339. <td width="310"><input name="notename<?php echo $i?>" type="text" id="notename<?php echo $i?>" style="width:300px" value="<?php echo $notename?>"></td>
  340. <td width="90" align="center">节点标识:</td>
  341. <td width="200"><input name="noteid<?php echo $i?>" type="text" id="noteid<?php echo $i?>" style="width:100px" value="<?php echo $noteid?>"></td>
  342. </tr>
  343. </table>
  344. </td>
  345. </tr>
  346. <tr>
  347. <td>节点文章列表:</td>
  348. <td><textarea name="arcid<?php echo $i?>" rows="3" onblur="CheckVal(<?php echo $i ?>)" id="arcid<?php echo $i?>" style="width:90%"><?php echo $idlist?></textarea></td>
  349. <td align="center"><button class="btn btn-success btn-sm" name="selarc<?php echo $i?>" type="button" id="selarc<?php echo $i?>2" onClick="SelectArcList('form1.arcid<?php echo $i?>');">选择节点文章</button></td>
  350. </tr>
  351. <tr>
  352. <td>文档来源:</td>
  353. <td colspan="2">
  354. <label><input name="isauto<?php echo $i?>" type="radio" id="isauto<?php echo $i?>" value="0" class="np" <?php if($isauto==0) echo " checked"; ?>>
  355. 按文章列表 </label>
  356. <label><input name="isauto<?php echo $i?>" type="radio" id="isauto<?php echo $i?>" value="1" class="np" <?php if($isauto==1) echo " checked"; ?>>
  357. 自动获取文档 </label>
  358. &nbsp;
  359. <label>关键词:
  360. <input name="keywords<?php echo $i?>" type="text" value="<?php echo $keywords?>" id="keywords<?php echo $i?>" value="" size="16">(逗号分开)</label>
  361. <label>栏目ID:
  362. <input name="typeid<?php echo $i?>" type="text" value="<?php echo $typeid?>" id="typeid<?php echo $i?>" value="0" size="4"></label>
  363. </td>
  364. </tr>
  365. <tr>
  366. <td height="50" rowspan="2">节点布局:</td>
  367. <td colspan="2">列数:<input name="col<?php echo $i?>" type="text" id="col<?php echo $i?>" value="<?php echo $col?>" size="3">
  368. 图片宽:<input name="imgwidth<?php echo $i?>" type="text" id="imgwidth<?php echo $i?>" value="<?php echo $imgwidth?>" size="3">
  369. 图片高:<input name="imgheight<?php echo $i?>" type="text" id="imgheight<?php echo $i?>" value="<?php echo $imgheight?>" size="3">
  370. 标题长:
  371. <input name="titlelen<?php echo $i?>" type="text" id="titlelen<?php echo $i?>" value="<?php echo $titlelen?>" size="3">
  372. 简介长:
  373. <input name="infolen<?php echo $i?>" type="text" id="infolen<?php echo $i?>" value="<?php echo $infolen?>" size="3">
  374. 文档数:
  375. <input name="rownum<?php echo $i?>" type="text" id="rownum<?php echo $i?>" value="<?php echo $rownum?>" size="3">
  376. </td>
  377. </tr>
  378. <tr>
  379. <td colspan="2">单条记录的模板:<br><textarea name="listtmp<?php echo $i?>" rows="3" id="listtmp<?php echo $i?>" style="width:60%"><?php echo $temp?></textarea></td>
  380. </tr>
  381. <?php
  382. $i++;
  383. }}
  384. $dtp->Clear();
  385. for($i;$i<=$cfg_specnote;$i++)
  386. {
  387. ?>
  388. <tr bgcolor="#FBFCE2">
  389. <td width="113">节点
  390. <?php echo $i?>
  391. 名称:</td>
  392. <td colspan="2">
  393. <table width="900" cellspacing="0" cellpadding="0">
  394. <tr>
  395. <td width="310"><input name="notename<?php echo $i?>" type="text" id="notename<?php echo $i?>" style="width:300px"></td>
  396. <td width="90" align="center">节点标识:</td>
  397. <td width="200"><input name="noteid<?php echo $i?>" type="text" id="noteid<?php echo $i?>" style="width:100px"></td>
  398. </tr>
  399. </table>
  400. </td>
  401. </tr>
  402. <tr>
  403. <td>节点文章列表:</td>
  404. <td><textarea name="arcid<?php echo $i?>" rows="3" onblur="CheckVal(<?php echo $i ?>)" id="arcid<?php echo $i?>" style="width:90%"></textarea></td>
  405. <td align="center"><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></td>
  406. </tr>
  407. <tr>
  408. <td>文档来源:</td>
  409. <td colspan="2">
  410. <label><input name="isauto<?php echo $i?>" type="radio" id="isauto<?php echo $i?>" value="0" class="np" checked>
  411. 按文章列表</label>
  412. <label><input name="isauto<?php echo $i?>" type="radio" id="isauto<?php echo $i?>" value="1" class="np">
  413. 自动获取文档</label>
  414. &nbsp;
  415. <label>关键词:
  416. <input name="keywords<?php echo $i?>" type="text" id="keywords<?php echo $i?>" value="" size="16">(空格分开)</label>
  417. <label>栏目ID:
  418. <input name="typeid<?php echo $i?>" type="text" id="_typeid<?php echo $i?>" value="0" size="4"></label>
  419. </td>
  420. </tr>
  421. <tr>
  422. <td height="50" rowspan="2">节点布局:<br></td>
  423. <td colspan="2">列数:<input name="col<?php echo $i?>" type="text" id="col<?php echo $i?>" value="1" size="3">
  424. 图片高:<input name="imgheight<?php echo $i?>" type="text" id="imgheight<?php echo $i?>" value="90" size="3">
  425. 图片宽:<input name="imgwidth<?php echo $i?>" type="text" id="imgwidth<?php echo $i?>" value="120" size="3">
  426. 标题长:
  427. <input name="titlelen<?php echo $i?>" type="text" id="titlelen<?php echo $i?>" value="60" size="3">
  428. 简介长:
  429. <input name="infolen<?php echo $i?>" type="text" id="infolen<?php echo $i?>" value="160" size="3">
  430. 文档数:
  431. <input name="rownum<?php echo $i?>" type="text" id="rownum<?php echo $i?>" value="40" size="3">
  432. </td>
  433. </tr>
  434. <tr>
  435. <td colspan="2">单条记录的模板:<br><textarea name="listtmp<?php echo $i?>" rows="3" id="listtmp<?php echo $i?>" style="width:60%"><?php echo $speclisttmp?></textarea></td>
  436. </tr>
  437. <?php
  438. }
  439. ?>
  440. </table>
  441. </td>
  442. </tr>
  443. </table>
  444. <table width="98%" cellspacing="0" cellpadding="0" align="center" bgcolor="#f8f8f8" style="border:1px solid #dee2e6;border-top:0" class="mb-3">
  445. <tr>
  446. <td align="center" class="py-3">
  447. <button type="submit" class="btn btn-success btn-sm">保存</button>
  448. <button type="button" onClick="location.reload();" class="btn btn-success btn-sm">重置</button>
  449. </td>
  450. </tr>
  451. </table>
  452. <script language='javascript'>InitPage();</script>
  453. </form>
  454. </body>
  455. </html>