国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

342 строки
18KB

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
  6. <title>修改专题</title>
  7. <link rel="stylesheet" href="/static/web/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="/static/web/js/cropper.min.js"></script>
  19. <script src="/static/web/js/admin.main.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. <div class="container-fluid">
  57. <ol class="breadcrumb">
  58. <li class="breadcrumb-item"><a href="index_body.php">后台面板</a></li>
  59. <li class="breadcrumb-item"><a href="content_s_list.php">专题列表</a></li>
  60. <li class="breadcrumb-item active">修改专题</li>
  61. </ol>
  62. <div class="card shadow-sm">
  63. <div class="card-header">修改<?php echo $arcRow['title'];?>专题</div>
  64. <div class="card-body">
  65. <form name="form1" action="spec_edit.php" method="post" enctype="multipart/form-data">
  66. <input type="hidden" name="id" value="<?php echo $arcRow['id']?>">
  67. <input type="hidden" name="channelid" value="<?php echo $channelid?>">
  68. <input type="hidden" name="arcrank" value="<?php echo $arcRow['arcrank']?>">
  69. <input type="hidden" name="source" value="本站">
  70. <input type="hidden" name="dopost" value="save">
  71. <div class="table-responsive">
  72. <table class="table table-borderless">
  73. <tbody>
  74. <tr>
  75. <td width="160">专题名称</td>
  76. <td width="650"><input type="text" name="title" id="title" value="<?php echo $arcRow['title'];?>" class="admin-input-lg" required></td>
  77. <td width="160">简略标题</td>
  78. <td><input type="text" name="shorttitle" id="shorttitle" value="<?php echo $arcRow['shorttitle'];?>" class="admin-input-sm"></td>
  79. </tr>
  80. <tr>
  81. <td>自定义属性</td>
  82. <td colspan="3">
  83. <?php
  84. $dsql->SetQuery("SELECT * FROM `#@__arcatt` ORDER BY sortid ASC");
  85. $dsql->Execute();
  86. while($trow = $dsql->GetObject())
  87. {
  88. if ($trow->att=='j') continue;
  89. if (preg_match("#".$trow->att."#", $arcRow['flag']))
  90. echo "<label><input type='checkbox' name='flags[]' id='flags{$trow->att}' value='{$trow->att}' checked> {$trow->attname}[{$trow->att}]</label> ";
  91. else
  92. echo "<label><input type='checkbox' name='flags[]' id='flags{$trow->att}' value='{$trow->att}'> {$trow->attname}[{$trow->att}]</label> ";
  93. }
  94. ?>
  95. </td>
  96. </tr>
  97. <tr id="pictable">
  98. <td>缩略图</td>
  99. <td colspan="3">
  100. <input type="text" name="picname" id="picname" value="<?php echo $arcRow['litpic']?>" class="admin-input-lg">
  101. <label><input type="checkbox" name="ddisremote" value="1" id="ddisremote"> 远程图片</label>
  102. <span class="btn btn-success btn-sm opt-button">上传<input type="file" name="files[]" id="iptAddImages"></span>
  103. <button type="button" onclick="SelectImage('form1.picname','');" class="btn btn-success btn-sm">选择</button>
  104. <button type="button" id="btnClearAll" class="btn btn-success btn-sm">清空</button>
  105. <img id="litPic" src="<?php if ($arcRow['litpic']!='') echo $arcRow['litpic']; else echo '/static/web/img/thumbnail.jpg';?>" id="litPic" class="thumbnail-md ml-3">
  106. </td>
  107. </tr>
  108. <tr>
  109. <td>作者</td>
  110. <td colspan="3"><input type="text" name="writer" id="writer" value="<?php echo $arcRow['writer']?>" class="admin-input-sm"></td>
  111. </tr>
  112. <tr>
  113. <td>主分类</td>
  114. <td colspan="3">
  115. <?php
  116. $typeOptions = GetOptionList($arcRow["typeid"],$cuserLogin->getUserChannel(),0);
  117. echo "<select name='typeid' class='admin-input-sm'>";
  118. if ($arcRow["typeid"]=="0") echo "<option value='0' selected='1'>请选择主分类</option>";
  119. echo $typeOptions;
  120. echo "</select>";
  121. ?>
  122. <a href="javascript:ShowCatMap(event,this,0,'typeid');" class="btn btn-success btn-sm">选择</a>
  123. </td>
  124. </tr>
  125. <tr>
  126. <td>关键词</td>
  127. <td class="3">
  128. <label><input type="text" name="keywords" rows="3" id="keywords" value="<?php echo $arcRow['keywords']?>" class="admin-input-lg"></label>
  129. <label><input type="checkbox" name="autokey" id="autokey" value="1" <?php if ($cfg_arc_autokeyword=='Y') echo 'checked';?>> 自动获取</label>
  130. <button type="button" onclick="SelectKeywords('form1.keywords');" class="btn btn-success btn-sm">选择</button>
  131. </td>
  132. </tr>
  133. <tr>
  134. <td>专题说明</td>
  135. <td colspan="3"><textarea name="description" id="textarea" class="admin-textarea-sm"><?php echo $arcRow['description']?></textarea></td>
  136. </tr>
  137. <?php PrintAutoFieldsEdit(stripslashes($cInfos['fieldset']),$addRow,'autofield');?>
  138. <tr>
  139. <td colspan="4">
  140. <table class="table">
  141. <tbody>
  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 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?>" class="admin-input-sm">(英文逗号隔开)</label>
  188. <label>栏目id:<input type="text" name="typeid<?php echo $i?>" value="<?php echo $typeid?>" id="typeid<?php echo $i?>" class="admin-input-sm" value="0"></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 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?>" 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. </tbody>
  253. </table>
  254. </td>
  255. </tr>
  256. <tr>
  257. <td>评论选项</td>
  258. <td>
  259. <label><input type="radio" name="notpost" value="0" <?php if ($arcRow['notpost']==0) echo 'checked';?>> 允许评论</label>
  260. <label><input type="radio" name="notpost" value="1" <?php if ($arcRow['notpost']==1) echo 'checked';?>> 禁止评论</label>
  261. <td>发布选项</td>
  262. <td>
  263. <label><input type="radio" name="ishtml" value="1" <?php if ($arcRow["ismake"]!=-1) echo 'checked';?>> 静态浏览</label>
  264. <label><input type="radio" name="ishtml" value="0" <?php if ($arcRow["ismake"]==-1) echo 'checked';?>> 动态浏览</label>
  265. </td>
  266. </tr>
  267. <tr>
  268. <td>文档排序</td>
  269. <td>
  270. <select name="sortup" id="sortup" class="admin-input-sm">
  271. <?php
  272. $subday = SubDay($arcRow["sortrank"],$arcRow["senddate"]);
  273. echo "<option value='0'>正常排序</option>";
  274. if ($subday>0) echo "<option value='$subday' selected>置顶".$subday."天</option>";
  275. ?>
  276. <option value="7">置顶一周</option>
  277. <option value="30">置顶一个月</option>
  278. <option value="90">置顶三个月</option>
  279. <option value="180">置顶半年</option>
  280. <option value="360">置顶一年</option>
  281. </select>
  282. </td>
  283. <td>标题颜色</td>
  284. <td>
  285. <input type="text" name="color" id="color" class="admin-input-sm" value="<?php echo $arcRow['color']?>">
  286. <button type="button" name="modcolor" id="modcolor" onclick="ShowColor(event,this);" class="btn btn-success btn-sm">选择</button>
  287. </td>
  288. </tr>
  289. <tr>
  290. <td>专题模板</td>
  291. <td>
  292. <input type="text" name="templet" id="templet" value="<?php echo $addRow['templet']?>" class="admin-input-sm">
  293. <button type="button" class="btn btn-success btn-sm" onclick="SelectTemplets('form1.templet');">选择</button>
  294. </td>
  295. <td>文件名称</td>
  296. <td><input type="text" name="filename" id="filename" value="<?php echo $arcRow['filename']?>" class="admin-input-sm">(不包括文件扩展名)</td>
  297. </tr>
  298. <tr>
  299. <td>发布时间</td>
  300. <td>
  301. <?php
  302. $addtime = GetDateTimeMk($arcRow["senddate"]);
  303. echo "$addtime <input type='hidden' name='senddate' value='".$arcRow["senddate"]."' class='admin-input-sm'>";
  304. ?>
  305. </td>
  306. </tr>
  307. <tr>
  308. <td>发布时间</td>
  309. <td>
  310. <?php
  311. $notime = GetDateTimeMk($arcRow["pubdate"]);
  312. echo "<input type='text' name='pubdate' value='$notime' id='pubdate' class='datepicker admin-input-sm'>";
  313. ?>
  314. </td>
  315. <td>更新时间</td>
  316. <td>
  317. <?php
  318. $nowtime = GetDateTimeMk(time());
  319. echo "<input type='text' name='senddate' value='$nowtime' id='senddate' class='datepicker admin-input-sm'>";
  320. ?>
  321. </td>
  322. </tr>
  323. <tr>
  324. <td>浏览次数</td>
  325. <td><input type="text" name="click" value="<?php echo $arcRow['click'];?>" class="admin-input-sm"></td>
  326. </tr>
  327. <tr>
  328. <td colspan="4" align="center">
  329. <button type="submit" class="btn btn-success btn-sm">保存</button>
  330. <button type="reset" class="btn btn-outline-success btn-sm">重置</button>
  331. </td>
  332. </tr>
  333. </tbody>
  334. </table>
  335. </div>
  336. </form>
  337. </div>
  338. </div>
  339. </div>
  340. <script>InitPage();</script>
  341. </body>
  342. </html>