Brak opisu
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.

add.htm 9.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  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="bodystyle" style="min-width:auto;">
  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 class="page" style="min-width:auto;">
  14. <div class="fixed-bar">
  15. <div class="item-title"><a class="back_xin" href="javascript:history.back();" title="返回"><i class="iconfont e-fanhui"></i></a>
  16. <div class="subject">
  17. <h3>新增广告</h3>
  18. <h5></h5>
  19. </div>
  20. <ul class="tab-base nc-row">
  21. <li><a href="javascript:void(0);" data-index='1' class="tab current"><span>常规选项</span></a></li>
  22. <li><a href="javascript:void(0);" data-index='2' class="tab"><span>高级选项</span></a></li>
  23. </ul>
  24. </div>
  25. </div>
  26. <form class="form-horizontal" id="post_form" action="{:U('Other/add')}" method="post">
  27. <!-- 常规信息 -->
  28. <div class="ncap-form-default tab_div_1">
  29. <dl class="row">
  30. <dt class="tit">
  31. <label for="title"><em>*</em>广告名称</label>
  32. </dt>
  33. <dd class="opt">
  34. <input type="text" name="title" placeholder="" id="title" class="input-txt">
  35. <span class="err"></span>
  36. <p class="notic">有规则填写便于自己识别与记忆</p>
  37. </dd>
  38. </dl>
  39. <dl class="row">
  40. <dt class="tit">
  41. <label for="title"><em>*</em>广告位置</label>
  42. </dt>
  43. <dd class="opt">
  44. <select name="pid" id="pid">
  45. <option value="0">--请选择--</option>
  46. {volist name="ad_position" id="vo"}
  47. <option value="{$vo.id}" {eq name="$pid" value="$vo.id"}selected{/eq}>{$vo.title}&nbsp;({$vo.width}*{$vo.height})</option>
  48. {/volist}
  49. </select>
  50. <span class="err"></span>
  51. <p class="notic">请先新增广告位置,再进行广告发布</p>
  52. </dd>
  53. </dl>
  54. <dl class="row">
  55. <dt class="tit" colspan="2">
  56. <label>广告类型</label>
  57. </dt>
  58. <dd class="opt">
  59. <div id="gcategory">
  60. <select name="media_type" class="input-sm" class="form-control">
  61. {volist name="ad_media_type" id="vo"}
  62. <option value="{$key}">{$vo}</option>
  63. {/volist}
  64. </select>
  65. </div>
  66. </dd>
  67. </dl>
  68. <dl class="row">
  69. <dt class="tit">
  70. <label>广告链接</label>
  71. </dt>
  72. <dd class="opt">
  73. <input type="text" name="links" placeholder="http://" value="" class="input-txt">
  74. <span class="err"></span>
  75. <p class="notic"></p>
  76. </dd>
  77. </dl>
  78. <dl class="row">
  79. <dt class="tit">
  80. <label>广告图片</label>
  81. </dt>
  82. <dd class="opt">
  83. <div class="input-file-show div_litpic_local">
  84. <span class="show">
  85. <a id="img_a" target="_blank" class="nyroModal" rel="gal" href="javascript:void(0);">
  86. <i id="img_i" class="fa fa-picture-o" onmouseover="" onmouseout="layer.close(layer_tips);"></i>
  87. </a>
  88. </span>
  89. <span class="type-file-box">
  90. <input type="text" id="litpic_local" name="litpic_local" value="" class="type-file-text" autocomplete="off">
  91. <input type="button" name="button" id="button1" value="选择上传..." class="type-file-button">
  92. <input class="type-file-file" onClick="GetUploadify(1,'','allimg','img_call_back')" size="30" hidefocus="true" nc_type="change_site_logo"
  93. title="点击前方预览图可查看大图,点击按钮选择文件并提交表单后上传生效">
  94. </span>
  95. </div>
  96. <input type="text" id="litpic_remote" name="litpic_remote" value="" placeholder="http://" class="input-txt" style="display: none;">
  97. &nbsp;
  98. <label><input type="checkbox" name="is_remote" id="is_remote" value="1" onClick="clickRemote(this, 'litpic');">远程图片</label>
  99. <span class="err"></span>
  100. <p class="notic">请填写图片链接,或上传图片格式文件,具体像素大小视网站模板而定</p>
  101. </dd>
  102. </dl>
  103. </div>
  104. <!-- 常规信息 -->
  105. <!-- 高级参数 -->
  106. <div class="ncap-form-default tab_div_2" style="display:none;">
  107. <!-- <dl class="row">
  108. <dt class="tit">
  109. <label for="author">排序</label>
  110. </dt>
  111. <dd class="opt">
  112. <input type="text" name="sort_order" value="100" id="sort_order" class="input-txt">
  113. <span class="err"></span>
  114. <p class="notic">越小越靠前</p>
  115. </dd>
  116. </dl> -->
  117. <dl class="row">
  118. <dt class="tit">
  119. <label>新窗口打开</label>
  120. </dt>
  121. <dd class="opt">
  122. <div class="onoff">
  123. <label for="target1" class="cb-enable selected">是</label>
  124. <label for="target0" class="cb-disable">否</label>
  125. <input id="target1" name="target" value="1" type="radio" checked="checked">
  126. <input id="target0" name="target" value="0" type="radio">
  127. </div>
  128. <p class="notic"></p>
  129. </dd>
  130. </dl>
  131. <dl class="row">
  132. <dt class="tit">
  133. <label>备注信息</label>
  134. </dt>
  135. <dd class="opt">
  136. <textarea class="span12 ckeditor" id="post_content" name="intro" title=""></textarea>
  137. <span class="err"></span>
  138. <p class="notic"></p>
  139. </dd>
  140. </dl>
  141. </div>
  142. <!-- 高级参数 -->
  143. <div class="ncap-form-default">
  144. <div class="bot">
  145. <a href="JavaScript:void(0);" onclick="check_submit();" class="ncap-btn-big ncap-btn-green" id="submitBtn">确认提交</a>
  146. </div>
  147. </div>
  148. </form>
  149. </div>
  150. <script type="text/javascript">
  151. $(function () {
  152. //选项卡切换列表
  153. $('.tab-base').find('.tab').click(function(){
  154. $('.tab-base').find('.tab').each(function(){
  155. $(this).removeClass('current');
  156. });
  157. $(this).addClass('current');
  158. var tab_index = $(this).data('index');
  159. $(".tab_div_1, .tab_div_2").hide();
  160. $(".tab_div_"+tab_index).show();
  161. });
  162. });
  163. var url="{:U('Ueditor/index',array('savepath'=>'allimg'))}";
  164. var ue = UE.getEditor('post_content',{
  165. serverUrl :url,
  166. zIndex: 999,
  167. initialFrameWidth: "100%", //初化宽度
  168. initialFrameHeight: 500, //初化高度
  169. focus: false, //初始化时,是否让编辑器获得焦点true或false
  170. maximumWords: 99999,
  171. removeFormatAttributes: 'class,style,lang,width,height,align,hspace,valign',//允许的最大字符数 'fullscreen',
  172. pasteplain:false, //是否默认为纯文本粘贴。false为不使用纯文本粘贴,true为使用纯文本粘贴
  173. autoHeightEnabled: false,
  174. toolbars: ueditor_toolbars
  175. });
  176. // 判断输入框是否为空
  177. function check_submit(){
  178. if($('input[name=title]').val() == ''){
  179. layer.msg('广告名称不能为空!', {icon: 2,time: 1000});
  180. $('input[name=title]').focus();
  181. return false;
  182. }
  183. if($('#pid').val() == 0){
  184. layer.msg('请选择位置!', {icon: 2,time: 1000});
  185. $('#pid').focus();
  186. return false;
  187. }
  188. layer_loading('正在处理');
  189. $('#post_form').submit();
  190. }
  191. function img_call_back(fileurl_tmp)
  192. {
  193. $("#litpic_local").val(fileurl_tmp);
  194. $("#img_a").attr('href', fileurl_tmp);
  195. $("#img_i").attr('onmouseover', "layer_tips=layer.tips('<img src="+fileurl_tmp+" class=\\'layer_tips_img\\'>',this,{tips: [1, '#fff']});");
  196. }
  197. </script>
  198. {include file="public/footer" /}