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

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