Без опису
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562
  1. {include file="public/layout" /}
  2. {eq name="$editor.editor_select" value="1"}
  3. {load href="__PUBLIC__/plugins/Ueditor/ueditor.config.js" /}
  4. {load href="__PUBLIC__/plugins/Ueditor/ueditor.all.min.js" /}
  5. {load href="__PUBLIC__/plugins/Ueditor/lang/zh-cn/zh-cn.js" /}
  6. {else/}
  7. {load href="__PUBLIC__/plugins/ckeditor/ckeditor.js" /}
  8. {/eq}
  9. <body class="bodysy-w">
  10. <div id="toolTipLayer" style="position: absolute; z-index: 9999; display: none; visibility: visible; left: 95px; top: 573px;"></div>
  11. <div id="append_parent"></div>
  12. <div id="ajaxwaitid"></div>
  13. <div id="geduan_div" class="h10"></div>
  14. <div id="page_div" class="page min-hg-c mb-20" style="min-width:auto;box-shadow:none;">
  15. <div class="fixed-bar">
  16. <div class="item-title">
  17. {include file="public/callback_page_1" /}<!-- 返回箭头 -->
  18. <a class="back_sz" href="javascript:void(0);" data-href="{:url('Article/help')}" onclick="openHelpframe(this, '设置与帮助', '500px', '100%', 'r');" title="设置与帮助"><i class="iconfont e-shezhi-tongyong"></i></a>
  19. <div class="subject">
  20. <h3>发布文档</h3>
  21. <h5></h5>
  22. </div>
  23. <ul class="tab-base nc-row">
  24. <li><a href="javascript:void(0);" data-index='1' class="tab current"><span>基础内容</span></a></li>
  25. <li><a href="javascript:void(0);" data-index='2' class="tab"><span>SEO优化</span></a></li>
  26. <li><a href="javascript:void(0);" data-index='3' class="tab"><span>更多设置</span></a></li>
  27. <!-- #weapp_demontrate_li# -->
  28. <!-- #weapp_li# -->
  29. </ul>
  30. </div>
  31. </div>
  32. <form class="form-horizontal" id="post_form" action="{:url('Article/add')}" method="post">
  33. <!-- 常规信息 -->
  34. <div class="ncap-form-default tab_div_1">
  35. <dl class="row">
  36. <dt class="tit">
  37. <label for="title"><em>*</em>文档标题</label>
  38. </dt>
  39. <dd class="opt">
  40. <input type="text" name="title" value="" id="title" class="input-txt" maxlength="200" {eq name="$channelRow.is_repeat_title" value="0"} oninput="check_title_repeat(this,0);" {/eq}>
  41. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  42. 副标题:<input type="text" name="subtitle" value="" id="subtitle" class="w200">
  43. <span class="err"></span>
  44. <p class="notic"></p>
  45. </dd>
  46. </dl>
  47. <dl class="row">
  48. <dt class="tit">
  49. <label for="title"><em>*</em>栏目分类</label>
  50. </dt>
  51. <dd class="opt">
  52. <select name="typeid" id="typeid">
  53. <option value="0">请选择栏目…</option>
  54. {$arctype_html}
  55. </select>
  56. <span class="err"></span>
  57. <p class="notic">谨慎切换,自定义字段的内容会随着栏目切换而清空,在保存之前不受影响!</p>
  58. </dd>
  59. </dl>
  60. {notempty name='$global.web_stypeid_open'}
  61. <dl class="row">
  62. <dt class="tit">
  63. <label for="stypeid">副栏目分类</label>
  64. </dt>
  65. <dd class="opt">
  66. <input type="hidden" name="stypeid" id="stypeid" value="" class="input-txt" onkeyup="this.value=this.value.replace(/[^\d\,]/g,'');" onpaste="this.value=this.value.replace(/[^\d\,]/g,'');">
  67. &nbsp;<a href="javascript:void(0);" data-channel="{$channeltype}" onclick="select_stypeid(this);" class="ncap-btn ncap-btn-green">选择副栏目</a>
  68. <span class="err"></span>
  69. <p class="notic">支持同频道模型的栏目</p>
  70. <div id="stypeid_txt" class="pt5"></div>
  71. </dd>
  72. </dl>
  73. {/notempty}
  74. <dl class="row">
  75. <dt class="tit">
  76. <label>文档属性</label>
  77. </dt>
  78. <dd class="opt">
  79. {volist name="archives_flags" id="vo"}
  80. <label><input type="checkbox" name="{$vo.flag_fieldname}" value="1">{$vo.flag_name}<!-- [{$vo.flag_attr}] --></label>&nbsp;
  81. {/volist}
  82. <span class="err"></span>
  83. <p class="notic">如需管理,请点击右上角设置与帮助按钮</p>
  84. </dd>
  85. </dl>
  86. <dl class="row none dl_jump">
  87. <dt class="tit">
  88. <label>跳转网址</label>
  89. </dt>
  90. <dd class="opt">
  91. <input type="text" value="" name="jumplinks" id="jumplinks" class="input-txt" placeholder="http://">
  92. <span class="err"></span>
  93. <p class="notic">请输入完整的URL网址(包含http或https),设置后访问该条信息将直接跳转到设置的网址</p>
  94. </dd>
  95. </dl>
  96. <dl class="row" style="z-index:2;">
  97. <dt class="tit">
  98. <label>文档标签</label>
  99. </dt>
  100. <dd class="opt">
  101. <input type="text" value="" name="tags" id="tags" class="input-txt" placeholder="多个标签之间以逗号隔开" autocomplete="off" oninput="get_common_tagindex_input(this);" onfocus="$('#often_tags').hide();" onkeyup="this.value=this.value.replace(/[\,]/g,',');" onpaste="this.value=this.value.replace(/[\,]/g,',')">&nbsp;
  102. <a href="javascript:void(0);" onclick="get_common_tagindex(this);">显示常用标签</a>&nbsp;<img id="tag_loading" src="__STATIC__/common/images/loading.gif" style="display: none;" />
  103. <div class="often_tags" id="often_tags" data-opt="add" style="display: none;"></div>
  104. <div class="often_tags" id="often_tags_input" style="display: none;"></div>
  105. <input type="hidden" id="tags_click_count">
  106. </dd>
  107. </dl>
  108. <dl class="row {empty name="$global.web_citysite_open"} none {/empty} ">
  109. <dt class="tit">
  110. <label for="title">所属区域</label>
  111. </dt>
  112. <dd class="opt">
  113. <select name="province_id" id="province_id" onchange="set_city_list(0);">
  114. <option value="0">全国</option>
  115. {volist name=':get_site_province_list()' id='vo'}
  116. <option value="{$vo.id}" {eq name="$Request.param.province_id" value="$vo.id" } selected="true" {/eq}>{$vo.name}</option>
  117. {/volist}
  118. </select>
  119. <select name="city_id" id="city_id" class="none ml5" onchange="set_area_list(0);">
  120. <option value="">--请选择--</option>
  121. </select>
  122. <select name="area_id" id="area_id" class="none ml5">
  123. <option value="">--请选择--</option>
  124. </select>
  125. <span class="err"></span>
  126. <p class="notic"></p>
  127. </dd>
  128. </dl>
  129. <dl class="row">
  130. <dt class="tit">
  131. <label>封面图片</label>
  132. </dt>
  133. <dd class="opt">
  134. <div class="input-file-show div_litpic_local">
  135. <span class="show">
  136. <a id="img_a" target="_blank" class="nyroModal" rel="gal" href="javascript:void(0);">
  137. <i id="img_i" class="fa fa-picture-o" onmouseover="" onmouseout="layer.close(layer_tips);"></i>
  138. </a>
  139. </span>
  140. <span class="type-file-box">
  141. <input type="text" id="litpic_local" name="litpic_local" value="" class="type-file-text" autocomplete="off">
  142. <input type="button" name="button" id="button1" value="选择上传..." class="type-file-button">
  143. <input class="type-file-file" onClick="GetUploadify(1,'','allimg','img_call_back')" size="30" hidefocus="true" nc_type="change_site_logo"
  144. title="点击前方预览图可查看大图,点击按钮选择文件并提交表单后上传生效">
  145. </span>
  146. </div>
  147. <input type="text" id="litpic_remote" name="litpic_remote" value="" placeholder="http://" class="input-txt" onKeyup="keyupRemote(this, 'litpic');" style="display: none;">
  148. &nbsp;
  149. <label><input type="checkbox" name="is_remote" id="is_remote" value="1" onClick="clickRemote(this, 'litpic');">远程图片</label>
  150. <span class="err"></span>
  151. <p class="notic">当没有手动上传图片时候,会自动提取正文的第一张图片作为缩略图</p>
  152. </dd>
  153. </dl>
  154. <div class="{if condition='empty($channelRow.data.is_article_pay)'} none {/if}">
  155. <dl class="row">
  156. <dt class="tit">
  157. <label>付费限制</label>
  158. </dt>
  159. <dd class="opt">
  160. <label class="curpoin"><input type="radio" name="restric_type" value="0" checked="checked">免费</label>&nbsp;&nbsp;
  161. <label class="curpoin"><input type="radio" name="restric_type" value="1">付费</label>&nbsp;&nbsp;
  162. <label class="curpoin"><input type="radio" name="restric_type" value="2">指定会员</label>&nbsp;&nbsp;
  163. <label class="curpoin"><input type="radio" name="restric_type" value="3">会员付费</label>&nbsp;&nbsp;
  164. </dd>
  165. </dl>
  166. <dl class="row none" id="dl_arc_level_id">
  167. <dt class="tit">
  168. <label><em>*</em>会员等级</label>
  169. </dt>
  170. <dd class="opt">
  171. <select name="arc_level_id" id="arc_level_id">
  172. {volist name="users_level" id="vo"}
  173. <option value="{$vo.level_id}" level_value="{$vo.level_value}">{$vo.level_name}</option>
  174. {/volist}
  175. </select>
  176. <label id="no_vip_pay_label"><input type="checkbox" name="no_vip_pay" id="no_vip_pay" value="1" onClick="clickNoVipPay(this);">开启非会员付费</label>
  177. <p class="notic">包括等于或高于指定的会员等级</p>
  178. </dd>
  179. </dl>
  180. <dl class="row none" id="dl_users_price">
  181. <dt class="tit">
  182. <label for="users_price"><em>*</em>购买价格</label>
  183. </dt>
  184. <dd class="opt">
  185. <input type="text" name="users_price" id="users_price" class="input-txt" autocomplete="off" style="width: 100px !important;text-align: right;" onkeyup="this.value=this.value.replace(/[^\d\.]/g,'');" onpaste="this.value=this.value.replace(/[^\d\.]/g,'')">&nbsp;元
  186. <span class="err"></span>
  187. <p class="notic"></p>
  188. </dd>
  189. </dl>
  190. <div class="none" id="div_free_html">
  191. <dl class="row" id="dl_part_free">
  192. <dt class="tit">
  193. <label for="title"><em>*</em>免费内容</label>
  194. </dt>
  195. <dd class="opt">
  196. <label class="curpoin"><input type="radio" name="part_free" value="0" checked onclick="change_part_free(this);">不预览</label>&nbsp;
  197. <label class="curpoin"><input type="radio" name="part_free" value="2" onclick="change_part_free(this);">自动截取</label>&nbsp;
  198. <label class="curpoin"><input type="radio" name="part_free" value="1" onclick="change_part_free(this);">手工录入 <span class="none" id="part_free_span" style="color: red;">[编辑]</span></label>&nbsp;
  199. <span class="err"></span>
  200. <p class="notic"></p>
  201. </dd>
  202. </dl>
  203. <dl class="row none" id="dl_size">
  204. <dt class="tit">
  205. <label for="size">大小</label>
  206. </dt>
  207. <dd class="opt">
  208. <input type="text" name="size" value="1024" id="size" class="input-txt" maxlength="100" autocomplete="off" style="width: 100px !important;text-align: right;" onkeyup="this.value=this.value.replace(/[^\d\.]/g,'');" onpaste="this.value=this.value.replace(/[^\d\.]/g,'')">&nbsp;字节(1024字节=1KB)
  209. <span class="err"></span>
  210. <p class="notic"></p>
  211. </dd>
  212. </dl>
  213. </div>
  214. </div>
  215. {include file="archives/get_field_addonextitem" /}
  216. </div>
  217. <!-- 常规信息 -->
  218. <!-- SEO参数 -->
  219. <div class="ncap-form-default tab_div_2" style="display:none;">
  220. <dl class="row">
  221. <dt class="tit">
  222. <label for="seo_title">SEO标题</label>
  223. </dt>
  224. <dd class="opt">
  225. <input type="text" value="" name="seo_title" id="seo_title" class="input-txt">
  226. <span class="err"></span>
  227. <p class="notic">一般不超过80个字符,为空时系统自动构成,可以到 <a href="{:url('Seo/index', array('inc_type'=>'seo'))}">SEO设置 - SEO基础</a> 中设置构成规则。</p>
  228. </dd>
  229. </dl>
  230. <dl class="row">
  231. <dt class="tit">
  232. <label>SEO关键词</label>
  233. </dt>
  234. <dd class="opt">
  235. <textarea rows="5" cols="60" id="seo_keywords" name="seo_keywords" style="height:20px;"></textarea>
  236. <span class="err"></span>
  237. <p class="notic">一般不超过100个字符,多个关键词请用英文逗号(,)隔开,建议3到5个关键词。</p>
  238. </dd>
  239. </dl>
  240. <dl class="row">
  241. <dt class="tit">
  242. <label>SEO描述</label>
  243. </dt>
  244. <dd class="opt">
  245. <textarea rows="5" cols="60" id="seo_description" name="seo_description" style="height:54px;" class="keywordsTextarea" onkeyup="monitorInputStr();" onkeypress="monitorInputStr();"></textarea>
  246. <span class="err"></span>
  247. <p class="notic">一般不超过100个字符,不填写时系统自动提取正文的前100个字符</p>
  248. <p class="notic2 none" id="beenWritten">你已输入<span id="beenWrittenStr">0</span>个字符</p>
  249. </dd>
  250. </dl>
  251. </div>
  252. <!-- SEO参数 -->
  253. <!-- 其他参数 -->
  254. <div class="ncap-form-default tab_div_3" style="display:none;">
  255. <dl class="row">
  256. <dt class="tit">
  257. <label for="author">作者</label>
  258. </dt>
  259. <dd class="opt">
  260. <input type="text" value="{$Think.session.admin_info.pen_name|default='小编'}" name="author" id="author" class="input-txt">
  261. <span class="err"></span>
  262. <p class="notic">设置作者默认名称(将同步至管理员笔名)</p>
  263. </dd>
  264. </dl>
  265. <dl class="row dl_origin">
  266. <dt class="tit">
  267. <label>来源</label>
  268. </dt>
  269. <dd class="opt origin-hot">
  270. <input type="text" value="{$system_originlist_0}" name="origin" id="origin" class="input-txt" onclick="searchOrigin(this);" autocomplete="off">
  271. <div class="origin-hot-list" style="display: none;" id="search_keywords_list_origin"></div>
  272. <textarea id="system_originlist_str" style="display: none;">{$system_originlist_str}</textarea>
  273. <span class="setting" onclick="set_originlist();">设置</span>
  274. <span class="err"></span>
  275. <p class="notic">为空时默认“网络”</p>
  276. </dd>
  277. </dl>
  278. <dl class="row">
  279. <dt class="tit">
  280. <label>点击数</label>
  281. </dt>
  282. <dd class="opt">
  283. <input type="text" value="{$rand_arcclick}" name="click" id="click" class="input-txt">
  284. <span class="err"></span>
  285. <p class="notic"></p>
  286. </dd>
  287. </dl>
  288. <dl class="row">
  289. <dt class="tit">
  290. <label>阅读权限</label>
  291. </dt>
  292. <dd class="opt">
  293. <select name="arcrank" id="arcrank" {if $admin_info.role_id > 0 && $auth_role_info.check_oneself < 1} disabled="disabled" {/if}>
  294. {volist name="arcrank_list" id="vo"}
  295. <option value="{$vo.rank}" {if $admin_info.role_id > 0 && $auth_role_info.check_oneself < 1 && $vo.rank==-1} selected="selected" {/if}>{$vo.name}</option>
  296. {/volist}
  297. </select>
  298. <span class="err"></span>
  299. <p class="notic"></p>
  300. </dd>
  301. </dl>
  302. <!-- #weapp_UsersGroup_content_users_id={$field.users_id}#--><!-- #weapp_UsersGroup_content# -->
  303. <dl class="row">
  304. <dt class="tit">
  305. <label for="articleForm">发布时间</label>
  306. </dt>
  307. <dd class="opt">
  308. <input type="text" class="input-txt" id="add_time" name="add_time" value="{php}echo date('Y-m-d H:i:s'){/php}" autocomplete="off">
  309. <span class="add-on input-group-addon">
  310. <i class="glyphicon glyphicon-calendar fa fa-calendar"></i>
  311. </span>
  312. <span class="err"></span>
  313. </dd>
  314. </dl>
  315. <dl class="row">
  316. <dt class="tit">
  317. <label for="tempview">文档模板</label>
  318. </dt>
  319. <dd class="opt">
  320. <select name="tempview" id="tempview">
  321. {volist name='$templateList' id='vo'}
  322. <option value="{$vo}" {eq name='$vo' value='$tempview'}selected{/eq}>{$vo}</option>
  323. {/volist}
  324. </select>
  325. <input type="hidden" name="type_tempview" value="{$tempview}" />
  326. <span class="err"></span>
  327. </dd>
  328. </dl>
  329. <dl class="row {notin name='$seo_pseudo' value='2,3'}no-grey{/notin}" >
  330. <dt class="tit">
  331. <label>自定义文件名</label>
  332. </dt>
  333. <dd class="opt">
  334. <input type="text" {notin name='$seo_pseudo' value='2,3'}readonly="readonly" title="动态模式下不支持自定义文档url"{/notin} value="" name="htmlfilename" id="htmlfilename" autocomplete="off" onkeyup="this.value=this.value.replace(/[^\u4E00-\u9FA5\w\-]/g,'-');" onpaste="this.value=this.value.replace(/[^\u4E00-\u9FA5\w\-]/g,'-');" class="input-txt {notin name='$seo_pseudo' value='2,3'}no-drop{/notin}">.html
  335. <span class="err"></span>
  336. <p class="notic">自定义文件名可由字母、数字、下划线(_)、连接符(-)等符号组成,除此之外其他字符将自动转为连接符(-)</p>
  337. </dd>
  338. </dl>
  339. </div>
  340. <!-- 其他参数 -->
  341. <!-- #weapp_div# -->
  342. <div class="ncap-form-default">
  343. <div class="bot2">
  344. <textarea name="free_content" id="free_content" style="display: none;"></textarea>
  345. <input type="hidden" name="gourl" value="{$gourl|default=''}">
  346. <input type="hidden" name="editor_addonFieldExt" id="editor_addonFieldExt" value="">
  347. <a href="JavaScript:void(0);" onclick="check_submit();" class="ncap-btn-big ncap-btn-green" id="submitBtn">确认提交</a>
  348. {include file="public/callback_page_2" /}<!-- 返回按钮 -->
  349. </div>
  350. </div>
  351. </form>
  352. </div>
  353. <script type="text/javascript">
  354. layui.use('laydate', function() {
  355. var laydate = layui.laydate;
  356. laydate.render({
  357. elem: '#add_time'
  358. ,type: 'datetime'
  359. });
  360. })
  361. $(function () {
  362. try {
  363. var web_citysite_open = {$global['web_citysite_open']|default=0};
  364. var site_province_id = {$site_province_id|default=0};
  365. var site_city_id = {$site_city_id|default=0};
  366. var site_area_id = {$site_area_id|default=0};
  367. if (web_citysite_open > 0 && site_province_id > 0) {
  368. $('select[name=province_id]').val(site_province_id);
  369. set_city_list(site_city_id);
  370. set_area_list(site_area_id);
  371. }
  372. }catch(e){}
  373. //选项卡切换列表
  374. $('.tab-base').find('.tab').click(function(){
  375. $('.tab-base').find('.tab').each(function(){
  376. $(this).removeClass('current');
  377. });
  378. $(this).addClass('current');
  379. var tab_index = $(this).data('index');
  380. $(".tab_div_1, .tab_div_2, .tab_div_3").hide();
  381. $(".tab_div_body").hide();
  382. $(".tab_div_"+tab_index).show();
  383. layer.closeAll();
  384. });
  385. $('input[name=is_jump]').click(function(){
  386. if ($(this).is(':checked')) {
  387. $('.dl_jump').show();
  388. } else {
  389. $('.dl_jump').hide();
  390. }
  391. });
  392. var dftypeid = {$typeid|default='0'};
  393. $('#typeid').change(function(){
  394. var current_channel = $(this).find('option:selected').data('current_channel');
  395. if (0 < $(this).val() && {$channeltype} != current_channel) {
  396. showErrorMsg('请选择对应模型的栏目!');
  397. $(this).val(dftypeid);
  398. } else if ({$channeltype} == current_channel) {
  399. layer.closeAll();
  400. }
  401. GetAddonextitem(1, $(this).val(), {$channeltype}, 0, true);
  402. });
  403. $(document).click(function(){
  404. $('#often_tags').hide();
  405. $('#often_tags_input').hide();
  406. event.stopPropagation();
  407. });
  408. $('#often_tags').click(function(){
  409. $('#often_tags').show();
  410. event.stopPropagation();
  411. });
  412. $('input[name=tags]').keyup(function(){
  413. var tags = $.trim($(this).val());
  414. $('#seo_keywords').val(tags);
  415. });
  416. $('input[name=restric_type]').click(function(){
  417. $('#dl_arc_level_id').hide();
  418. $('#dl_users_price').hide();
  419. $('#no_vip_pay_label').hide();
  420. $('#div_free_html').hide();
  421. var restric_type = $(this).val();
  422. $('#arc_level_id').find('option:eq(0)').attr('selected',true);
  423. if (0 < restric_type) {
  424. $('#div_free_html').show();
  425. }
  426. if (-1 < $.inArray(restric_type, ['1','3'])) {
  427. $('#dl_users_price').show();
  428. }
  429. if (-1 < $.inArray(restric_type, ['2','3'])) {
  430. $('#dl_arc_level_id').show();
  431. if (2 == restric_type) {
  432. $('#no_vip_pay_label').show();
  433. if ($('#no_vip_pay').is(':checked')){
  434. $('#dl_users_price').show();
  435. }
  436. }
  437. }
  438. });
  439. });
  440. // 判断输入框是否为空
  441. function check_submit(){
  442. if($.trim($('input[name=title]').val()) == ''){
  443. $($('.tab-base').find('.tab')[0]).trigger('click');
  444. showErrorMsg('标题不能为空!');
  445. $('input[name=title]').focus();
  446. return false;
  447. }
  448. if ($('#typeid').val() == 0) {
  449. $($('.tab-base').find('.tab')[0]).trigger('click');
  450. showErrorMsg('请选择栏目…!');
  451. $('#typeid').focus();
  452. return false;
  453. }
  454. var restric_type = $('input[name=restric_type]:checked').val();
  455. if ( restric_type == 1 || restric_type == 3 || (restric_type == 2 && $('#no_vip_pay').is(':checked'))){
  456. var users_price = $('#users_price').val();
  457. if (parseFloat(users_price).toString() == "NaN") {
  458. users_price = 0;
  459. }
  460. if (0 == users_price || users_price == '') {
  461. showErrorMsg('购买价格不能为空或0');
  462. $('#users_price').focus();
  463. return false;
  464. } else {
  465. var exp = /^(([1-9]\d*)|\d)(\.\d{1,2})?$/;
  466. if (!exp.test(users_price)) {
  467. showErrorMsg('购买价格格式不正确!');
  468. $('#users_price').focus();
  469. return false;
  470. }
  471. }
  472. }
  473. var htmlfilename = $.trim($('input[name=htmlfilename]').val());
  474. if (htmlfilename != '') {
  475. var exp = /^\d{1,}$/;
  476. if (exp.test(htmlfilename)) {
  477. showErrorAlert('自定义文件名不能纯数字,会与文档ID冲突!');
  478. $('input[name=htmlfilename]').focus();
  479. return false;
  480. }
  481. }
  482. layer_loading('正在处理');
  483. if(!ajax_check_htmlfilename())
  484. {
  485. layer.closeAll();
  486. showErrorMsg('同栏目下,自定义文件名已存在!');
  487. $('input[name=htmlfilename]').focus();
  488. return false;
  489. }
  490. setTimeout(function (){
  491. editor_auto_210607();
  492. $('#post_form').submit();
  493. }, 1);
  494. }
  495. function img_call_back(fileurl_tmp)
  496. {
  497. $("#litpic_local").val(fileurl_tmp);
  498. $("#img_a").attr('href', fileurl_tmp);
  499. $("#img_i").attr('onmouseover', "layer_tips=layer.tips('<img src="+fileurl_tmp+" class=\\'layer_tips_img\\'>',this,{tips: [1, '#fff']});");
  500. $("input[name=is_litpic]").attr('checked', true); // 自动勾选属性[图片]
  501. }
  502. function change_part_free(e) {
  503. if (1 == $(e).val()){
  504. $('#dl_size').hide();
  505. $('#part_free_span').show();
  506. open_free_content();
  507. }else if (2 == $(e).val()){
  508. $('#part_free_span').hide();
  509. $('#dl_size').show();
  510. } else{
  511. $('#part_free_span').hide();
  512. $('#dl_size').hide();
  513. }
  514. }
  515. function open_free_content() {
  516. var url = "{:url('Article/free_content')}";
  517. layer.open({
  518. type: 2,
  519. title:'请输入预览内容',
  520. shade: layer_shade,
  521. area: ['90%', '90%'], //宽高
  522. content: url
  523. });
  524. }
  525. function clickNoVipPay(obj) {
  526. if ($(obj).is(':checked')) {
  527. $('#dl_users_price').show();
  528. } else {
  529. $('#dl_users_price').hide();
  530. }
  531. }
  532. </script>
  533. <script>
  534. try{
  535. var mt20_1649209614 = sessionStorage.getItem("mt20_1649209614");
  536. if (mt20_1649209614 == 1){
  537. $("#geduan_div").removeClass("h10");
  538. }else{
  539. $("#geduan_div").addClass("h10");
  540. }
  541. }catch(e){}
  542. </script>
  543. {include file="public/footer" /}