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

381 lines
17KB

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="<?php echo $cfg_soft_lang; ?>">
  5. <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
  6. <title>修改文章</title>
  7. <link rel="stylesheet" href="../static/web/css/bootstrap.min.css">
  8. <link rel="stylesheet" href="../static/web/font/css/font-awesome.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/jquery.fileupload.css">
  12. <link rel="stylesheet" href="../static/web/css/cropper.min.css">
  13. <script>const cfg_uplitpic_cut = '<?php echo $cfg_uplitpic_cut; ?>';</script>
  14. <script src="../static/web/js/jquery.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="js/handlers.js"></script>
  20. <script src="../static/web/js/bootstrap.bundle.min.js"></script>
  21. <script src="../static/web/js/cropper.min.js"></script>
  22. <style>
  23. table{border-collapse:separate}
  24. .albCt img{cursor:pointer}
  25. .multipic{border:1px dashed #FC6}
  26. .albCt{border-bottom:1px dashed #FC0;margin-bottom:10px;padding-bottom:10px}
  27. </style>
  28. <script>
  29. var swfu = null;
  30. var arctype = 'article';
  31. function checkSubmit() {
  32. if (document.form1.title.value == '') {
  33. ShowMsg('文章标题不能为空');
  34. document.form1.title.focus();
  35. return false;
  36. }
  37. }
  38. </script>
  39. </head>
  40. <body>
  41. <table width="98%" align="center" cellpadding="0" cellspacing="0" class="mt-3">
  42. <tr>
  43. <td width="60%"><i class="fa fa-book"></i> <a href="catalog_do.php?cid=<?php echo $arcRow['typeid']?>&channelid=<?php echo $channelid?>&dopost=listArchives">文章列表</a> &gt; 修改文章</td>
  44. <td width="30%" align="right"><?php echo $backurl; ?><a class="btn btn-success btn-sm" href="catalog_main.php">栏目管理</a></td>
  45. </tr>
  46. </table>
  47. <table width="98%" align="center" cellpadding="0" cellspacing="0" id="head1">
  48. <tr>
  49. <td colspan="2">
  50. <table cellpadding="0" cellspacing="0">
  51. <tr>
  52. <td width="84" height="28" align="center" bgcolor="#FBFCE2">常规信息</td>
  53. <td width="84" align="center" bgcolor="#f8f8f8"><a href="javascript:;" onClick="ShowItem2()">高级参数</a></td>
  54. </tr>
  55. </table>
  56. </td>
  57. </tr>
  58. </table>
  59. <table width="98%" align="center" cellpadding="0" cellspacing="0" id="head2" style="display:none">
  60. <tr>
  61. <td colspan="2">
  62. <table cellpadding="0" cellspacing="0">
  63. <tr>
  64. <td width="84" align="center" bgcolor="#f8f8f8"><a href="javascript:;" onClick="ShowItem1()">常规信息</a></td>
  65. <td width="84" height="28" align="center" bgcolor="#FBFCE2">高级参数</td>
  66. </tr>
  67. </table>
  68. </td>
  69. </tr>
  70. </table>
  71. <form name="form1" action="article_edit.php" enctype="multipart/form-data" method="post" onSubmit="return checkSubmit();">
  72. <input type="hidden" name="dopost" value="save">
  73. <input type="hidden" name="channelid" value="<?php echo $channelid?>">
  74. <input type="hidden" name="id" value="<?php echo $aid?>">
  75. <table width="98%" align="center" cellpadding="2" cellspacing="2" id="needset" style="border:1px solid #dee2e6">
  76. <tr>
  77. <td colspan="2" class="bline">
  78. <table width="900" cellspacing="0" cellpadding="0">
  79. <tr>
  80. <td width="90"> 文章标题:</td>
  81. <td width="400"><input type="text" name="title" id="title" value="<?php echo $arcRow['title']; ?>" style="width:390px"></td>
  82. <td width="90">简略标题:</td>
  83. <td><input type="text" name="shorttitle" id="shorttitle" value="<?php echo $arcRow['shorttitle']; ?>" style="width:160px"></td>
  84. </tr>
  85. </table>
  86. </td>
  87. </tr>
  88. <tr>
  89. <td width="100%" colspan="2" class="bline">
  90. <table width="900" cellspacing="0" cellpadding="0">
  91. <tr>
  92. <td width="90"> 自定义属性:</td>
  93. <td>
  94. <?php
  95. $dsql->SetQuery("SELECT * FROM `#@__arcatt` ORDER BY sortid ASC");
  96. $dsql->Execute();
  97. while($trow = $dsql->GetObject())
  98. {
  99. if($trow->att=='j')
  100. {
  101. $jumpclick = " onclick='ShowUrlTr()'";
  102. } else {
  103. $jumpclick = '';
  104. }
  105. if(preg_match("#".$trow->att."#", $arcRow['flag']))
  106. {
  107. echo "<label class='mr-1'><input type='checkbox' name='flags[]' id='flags{$trow->att}' value='{$trow->att}' {$jumpclick} checked='checked'> {$trow->attname}[{$trow->att}]</label>";
  108. } else {
  109. echo "<label class='mr-1'><input type='checkbox' name='flags[]' id='flags{$trow->att}' value='{$trow->att}' {$jumpclick}> {$trow->attname}[{$trow->att}]</label>";
  110. }
  111. }
  112. ?>
  113. </td>
  114. </tr>
  115. </table>
  116. </td>
  117. </tr>
  118. <tr>
  119. <td colspan="2" class="bline" id="redirecturltr" style="display:<?php echo (empty($addRow['redirecturl']) ? 'none' : 'block'); ?>">
  120. <table width="900" cellspacing="0" cellpadding="0">
  121. <tr>
  122. <td width="90"> 跳转网址:</td>
  123. <td><input type="text" name="redirecturl" id="redirecturl" value="<?php echo $addRow['redirecturl']?>" style="width:300px"></td>
  124. </tr>
  125. </table>
  126. </td>
  127. </tr>
  128. <tr>
  129. <td width="100%" colspan="2" class="bline">
  130. <table width="900" cellspacing="0" cellpadding="0">
  131. <tr>
  132. <td width="90"> Tag标签:</td>
  133. <td><input type="text" name="tags" id="tags" value="<?php echo $tags; ?>" style="width:300px">(','号分开,单个标签小于12字节)</td>
  134. <td width="60">权重:</td>
  135. <td><input type="text" name="weight" id="weight" value="<?php echo $arcRow['weight']; ?>" style="width:60px">(越小越靠前)</td>
  136. </tr>
  137. </table>
  138. </td>
  139. </tr>
  140. <tr id="pictable">
  141. <td colspan="2" class="bline">
  142. <table width="900" cellspacing="0" cellpadding="0">
  143. <tr>
  144. <td width="90"> 缩略图:</td>
  145. <td>
  146. <input type="text" name="picname" id="picname" value="<?php echo $arcRow['litpic']?>" style="width:300px">
  147. <label><input type="checkbox" name="ddisremote" value="1" id="ddisremote"> 远程</label>
  148. <span class="btn btn-success btn-sm fileinput-button">上传图片<input type="file" name="files[]" id="iptAddImages"></span>
  149. <button type="button" name="Submit" onClick="SelectImage('form1.picname','');" class="btn btn-success btn-sm">选择图片</button>
  150. <button type="button" id="btnClearAll" class="btn btn-success btn-sm delete">清空</button>
  151. </td>
  152. <td align="center">
  153. <img id="litPic" src="<?php if($arcRow['litpic']!='') echo $arcRow['litpic']; else echo '../static/web/img/defaultpic.jpg'; ?>" style="max-width:100px;max-height:80px">
  154. </td>
  155. </tr>
  156. </table>
  157. </td>
  158. </tr>
  159. <tr>
  160. <td colspan="2" class="bline">
  161. <table width="900" cellspacing="0" cellpadding="0">
  162. <tr>
  163. <td width="90"> 来源:</td>
  164. <td width="260">
  165. <input type="text" name="source" id="source" value="<?php echo $arcRow['source']?>" style="width:160px">
  166. <button type="button" name="selsource" id="selsource" class="btn btn-success btn-sm">选择</button>
  167. </td>
  168. <td width="60">作者:</td>
  169. <td>
  170. <input type="text" name="writer" id="writer" value="<?php echo $arcRow['writer']?>" style="width:160px">
  171. <button type="button" name="selwriter" id="selwriter" class="btn btn-success btn-sm">选择</button>
  172. </td>
  173. </tr>
  174. </table>
  175. </td>
  176. </tr>
  177. <tr>
  178. <td colspan="2" class="bline">
  179. <table width="900" cellspacing="0" cellpadding="0">
  180. <tr>
  181. <td width="90"> 发布栏目:</td>
  182. <td width="360">
  183. <?php
  184. $typeOptions = GetOptionList($arcRow['typeid'],$cuserLogin->getUserChannel(),$channelid);
  185. echo "<select name='typeid' id='typeid' style='width:160px'>";
  186. if($arcRow["typeid"]=="0") echo "<option value='0' selected>请选择栏目</option>";
  187. echo $typeOptions;
  188. echo "</select>";
  189. ?>
  190. <i class="btn btn-sm fa fa-search" onClick="ShowCatMap(event,this,<?php echo $channelid; ?>,'typeid','<?php echo $arcRow['typeid']; ?>')" title="快捷选择" style="cursor:pointer"></i>
  191. </td>
  192. <td width="90">消费金币:</td>
  193. <td><input type="text" name="money" id="money" value="<?php echo $arcRow['money']?>" style="width:160px"></td>
  194. </tr>
  195. </table>
  196. </td>
  197. </tr>
  198. <?php
  199. if($cfg_need_typeid2=='Y') {
  200. ?>
  201. <tr>
  202. <td colspan="2" class="bline">
  203. <table width="900" cellspacing="0" cellpadding="0">
  204. <tr>
  205. <td width="90"> 副栏目:</td>
  206. <td>
  207. <span id="typeid2ct"></span>
  208. <input type="text" name="typeid2" id="typeid2" value="<?php echo ($arcRow['typeid2']=='0'?'':$arcRow['typeid2']); ?>" style="width:160px">
  209. <i class="btn btn-sm fa fa-search" style="cursor:pointer" onClick="ShowCatMap(event,this,<?php echo $channelid; ?>,'typeid2','<?php echo $arcRow['typeid2']; ?>')" title="选择副栏目"></i>
  210. </td>
  211. </tr>
  212. </table>
  213. </td>
  214. </tr>
  215. <?php
  216. }
  217. ?>
  218. <tr>
  219. <td class="bline">
  220. <table width="900" cellspacing="0" cellpadding="0">
  221. <tr>
  222. <td width="90"> 关键词:</td>
  223. <td><input type="text" name="keywords" id="keywords" value="<?php echo $arcRow['keywords']?>" style="width:360px"></td>
  224. </tr>
  225. </table>
  226. </td>
  227. </tr>
  228. <tr>
  229. <td class="bline">
  230. <table width="900" cellspacing="0" cellpadding="0">
  231. <tr>
  232. <td width="90"> 描述:</td>
  233. <td><textarea name="description" id="description" style="width:360px;height:50px"><?php echo $arcRow['description']?></textarea></td>
  234. </tr>
  235. </table>
  236. </td>
  237. </tr>
  238. <tr>
  239. <td width="100%" colspan="2" class="bline">
  240. <table width="900" cellspacing="0" cellpadding="0">
  241. <tr>
  242. <td width="90"> 附加选项:</td>
  243. <td>
  244. <label><input type="checkbox" name="remote" id="remote" value="1" <?php if($cfg_rm_remote=='Y') echo 'checked="1"'; ?>> 下载远程图片和资源</label>
  245. <label><input type="checkbox" name="autolitpic" id="autolitpic" value="1" <?php if($cfg_arc_autopic=='Y') echo 'checked="1"'; ?>> 提取第一个图片为缩略图</label>
  246. </td>
  247. </tr>
  248. </table>
  249. </td>
  250. </tr>
  251. <tr>
  252. <td colspan="2"><?php PrintAutoFieldsEdit(stripslashes($cInfos['fieldset']),$addRow,'autofield'); ?></td>
  253. </tr>
  254. <tr>
  255. <td width="100%"><?php GetEditor("body",stripcslashes($addRow['body']),450); ?></td>
  256. <td width="260" align="center" id="mPic" style="display:none"></td>
  257. </tr>
  258. </table>
  259. <!--高级参数-->
  260. <table width="98%" align="center" cellpadding="2" cellspacing="2" id="adset" style="border:1px solid #dee2e6;display:none">
  261. <tr>
  262. <td colspan="4" class="bline">
  263. <table width="900" cellspacing="0" cellpadding="0">
  264. <tr>
  265. <td width="90"> 评论选项:</td>
  266. <td width="260">
  267. <label><input type="radio" name="notpost" value="0" <?php if($arcRow['notpost']==0) echo "checked='1'"; ?>> 允许评论</label>
  268. <label><input type="radio" name="notpost" value="1" <?php if($arcRow['notpost']==1) echo "checked='1'"; ?>> 禁止评论</label>
  269. </td>
  270. <td width="90">发布选项:</td>
  271. <td>
  272. <label><input type="radio" name="ishtml" value="1" <?php if($arcRow["ismake"]!=-1) echo "checked"; ?>> 生成网页</label>
  273. <label><input type="radio" name="ishtml" value="0" <?php if($arcRow["ismake"]==-1) echo "checked"; ?>> 仅动态浏览</label>
  274. </td>
  275. </tr>
  276. </table>
  277. </td>
  278. </tr>
  279. <tr>
  280. <td class="bline">
  281. <table width="900" cellspacing="0" cellpadding="0">
  282. <tr>
  283. <td width="90"> 文章排序:</td>
  284. <td width="260">
  285. <select name="sortup" id="sortup" style="width:160px">
  286. <?php
  287. $subday = SubDay($arcRow["sortrank"],$arcRow["pubdate"]);
  288. echo "<option value='0'>正常排序</option>";
  289. if($subday>0) echo "<option value='$subday' selected>置顶 $subday 天</option>";
  290. ?>
  291. <option value="7">置顶一周</option>
  292. <option value="30">置顶一个月</option>
  293. <option value="90">置顶三个月</option>
  294. <option value="180">置顶半年</option>
  295. <option value="360">置顶一年</option>
  296. </select>
  297. </td>
  298. <td width="90">标题颜色:</td>
  299. <td>
  300. <input type="text" name="color" id="color" value="<?php echo $arcRow['color']?>" style="width:160px">
  301. <button type="button" name="modcolor" id="modcolor" onClick="ShowColor(event,this)" class="btn btn-success btn-sm">选取</button>
  302. </td>
  303. </tr>
  304. </table>
  305. </td>
  306. </tr>
  307. <tr>
  308. <td class="bline">
  309. <table width="900" cellspacing="0" cellpadding="0">
  310. <tr>
  311. <td width="90"> 阅读权限:</td>
  312. <td width="260">
  313. <select name="arcrank" id="arcrank" style="width:160px">
  314. <option value="<?php echo $arcRow['arcrank']?>"><?php echo $arcRow["rankname"]?></option>
  315. <?php
  316. $urank = $cuserLogin->getUserRank();
  317. $dsql->SetQuery("Select * from `#@__arcrank` where adminrank<='$urank'");
  318. $dsql->Execute();
  319. while($row = $dsql->GetObject()){
  320. echo "<option value='".$row->rank."'>".$row->membername."</option>";
  321. }
  322. ?>
  323. </select>
  324. </td>
  325. <td width="90">文件名称:</td>
  326. <td><input type="text" name="filename" id="filename" value="<?php echo $arcRow['filename']?>" style="width:160px">(不包括后缀名如.html等)</td>
  327. <td>
  328. <?php
  329. if(isset($cfg_tamplate_rand) && $cfg_tamplate_rand==1)
  330. {
  331. ?>
  332. 模板选择:
  333. <select name="templet" id="templet" style="width:160px">
  334. <?php
  335. foreach($cfg_tamplate_arr as $k=>$v)
  336. {
  337. $v = trim($v);
  338. echo ($v==$addRow['templet'] ? "<option value='$v' selected>$v</option>":"<option value='$v'>$v</option>");
  339. }
  340. ?>
  341. </select>
  342. <?php
  343. } else {
  344. echo "<input type='hidden' name='templet' value='{$addRow['templet']}'>";
  345. }
  346. ?>
  347. </td>
  348. </tr>
  349. </table>
  350. </td>
  351. </tr>
  352. <tr>
  353. <td height="70" class="bline">
  354. <table width="900" cellspacing="0" cellpadding="0">
  355. <tr>
  356. <td width="90"> 更新时间:</td>
  357. <td width="260"><?php
  358. $nowtime = GetDateTimeMk(time());
  359. echo "<input type='text' name='pubdate' value='$nowtime' id='pubdate' class='datepicker' style='width:160px'>";
  360. ?>
  361. </td>
  362. <td width="90">浏览次数:</td>
  363. <td><input type="text" name="click" value="<?php echo $arcRow['click']; ?>" style="width:160px"></td>
  364. </tr>
  365. </table>
  366. </td>
  367. </tr>
  368. </table>
  369. <table width="98%" cellspacing="0" cellpadding="0" align="center" bgcolor="#f8f8f8" style="border:1px solid #dee2e6;border-top:0" class="mb-3">
  370. <tr>
  371. <td align="center" class="py-2">
  372. <button type="submit" class="btn btn-success btn-sm">保存</button>
  373. <button type="button" onClick="location.reload();" class="btn btn-success btn-sm">重置</button>
  374. </td>
  375. </tr>
  376. </table>
  377. <script>InitPage();</script>
  378. </form>
  379. <div id="__tmpbody" style="display:none"></div>
  380. </body>
  381. </html>