| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184 | 
							- {Template header}
 
- <body>
 
- <div class="warp">
 
- <div class="title winnone">资料分类管理 - 修改</div>
 
- <form>
 
- <ul class="setting-UMeditor">
 
-     
 
- <li>
 
- 分类:<select name="class" class="select">
 
- {loop $studyclass as $val}
 
- <option value="{$val['id']}" {if $study['class'] == $val['id']}selected="selected"{/if}>{$val['title']}</option>
 
- {/loop}</select>
 
- </li>
 
- <li>
 
- <em>标题:</em>
 
- <input class="must" value="{$study['title']}" name="title" type="text" >
 
- </li>
 
- <li class="length">
 
- <em>平台:</em>
 
- <div class="checkbox">
 
- {loop $plat_list as $key=>$val}
 
-     {if in_array($key,$plat_ids)}
 
-         <span class="ckrows"><label><input name="type" checked type="checkbox" value="{$key}"><font>{$val}</font></label></span>
 
-     {else}
 
-         <span class="ckrows"><label><input name="type"  type="checkbox" value="{$key}"><font>{$val}</font></label></span>
 
-     {/if}
 
-     
 
-  {/loop}  
 
- </div>
 
- </li>
 
- <li class="length" >
 
- <em>文档:</em>
 
- <input value="{$study['wdurl']}" name="wdurl" type="hidden">
 
- <font class="scwd">点击上传文档</font>
 
- <font class="wdxz">
 
- {if $study['wdurl'] != ''}<a href="{$study['wdurl']}" download="{$study['wdurl']}" style="color:#F33"><i class="fa fa-file-text"></i> 下载文档</a>  <font class='delwd'>X</font>
 
- {/if}
 
- </font>
 
- </li>
 
- <div style="clear:both;"></div>
 
- </ul>
 
- <div class="editor-wrapper">
 
-     <textarea id="newsEditor" name="content" ></textarea>
 
-  </div>
 
- <input id="hide" type="text" style='opacity: 0'>
 
- <input  type="hidden" name="id" value="{$study['id']}" />
 
- <div class="button"><font class="datasave_tmp" onclick="tijiao()">提 交</font> <font class="fh">关 闭</font></div>
 
- </div>
 
- <div style="display:none;">
 
- <input id="upload-file" name="files" accept="image/xls,image/xlsx" type="file">
 
- </div>
 
- </form>
 
- <script type="text/javascript" src="/style/ueditor/ueditor.config.js"></script>
 
- <script type="text/javascript" src="/style/ueditor/ueditor.all.js"></script>
 
- <script>var addedit="/study/edit/";var rowsurl="/study/rows/";var scwd = "/fullorderexcel/scwd";
 
- let ue = UE.getEditor('newsEditor');
 
- ue.ready(function(){
 
-     ue.setContent('{$study["content"]}')
 
- })
 
- function tijiao() {
 
-     //alert($("form").serialize())
 
- 	$(".ts p").html("<i class='fa fa-2x fa-cog fa-spin'></i>   正在添加中,请稍后...");
 
- 	$(".ts").show();
 
- 	var f = "";
 
- 	var e = "";
 
- 	$(".select").each(function() {
 
- 		f = f + $(this).attr("name") + "=" + $(this).children("option:selected").val() + "&";
 
- 	});
 
- 	$("input:text").each(function() {
 
- 		str2 = $(this).val().replace(/\</g, "<");
 
- 		str2 = str2.replace(/\>/g, ">");
 
- 		str2 = str2.replace(/\+/g, "%2B");
 
- 		str2 = str2.replace(/&/g, "%26");
 
- 		f = f + $(this).attr("name") + "=" + str2 + "&";
 
- 	});
 
- 	$("input:password").each(function() {
 
- 		f = f + $(this).attr("name") + "=" + $(this).val() + "&";
 
- 	});
 
- 	$("input:hidden").each(function() {
 
- 		f = f + $(this).attr("name") + "=" + $(this).val() + "&";
 
- 	});
 
- 	if ($("#content").length > 0) {
 
- 		var vl = $("#content").html().replace(/\+/g, "%2B");
 
- 		vl = vl.replace(/\&/g, "%26");
 
- 		f = f + "content=" + encodeURI(vl) + "&";
 
- 	}
 
- 	$("textarea").each(function() {
 
- 		var str2 = $(this).val().replace(/\+/g, "%2B");
 
- 		var str2 = str2.replace(/&/g, "%26");
 
- 		f = f + $(this).attr("name") + "=" + str2 + "&";
 
- 	});
 
- 	if ($(".scimg img").length > 0 || $(".scimg video").length > 0) {
 
- 		var a = '';
 
- 		for (var b = 0; b < $(".scimg .upimg img").length; b++) {
 
- 			a = a + $(".scimg .upimg img")[b].src + "|";
 
- 		}
 
- 		for (var b = 0; b < $(".scimg .upimg video").length; b++) {
 
- 			a = a + $('.scimg .upimg video')[b].src + "|";
 
- 		}
 
- 		var a = a.replace(/\+/g, "%2B");
 
- 		var a = a.replace(/&/g, "%26");
 
- 		f = f + "img=" + a + "&";
 
- 	}
 
- 	for (i = 0; i < $(".checkbox").length; i++) {
 
- 		var checkid = "";
 
- 		var checkname = "";
 
- 		$(".checkbox:eq(" + i + ") .ckrows input:checked").each(function() {
 
- 			checkname = $(this).attr("name");
 
- 			checkid = checkid + $(this).val() + ",";
 
- 		});
 
- 		if (checkname == "") {
 
- 			$(".ts p").text($(".checkbox:eq(" + i + ")").prevAll("em").text() + "为必填项");
 
- 			$(".ts").show();
 
- 			setTimeout('$(".ts").fadeOut()', 600);
 
- 			return false;
 
- 		}
 
- 		f = f + checkname + "=" + checkid + "&";
 
- 	}
 
- 	for (i = 0; i < $(".checkboxfbt").length; i++) {
 
- 		var checkid = "";
 
- 		var checkname = "";
 
- 		$(".checkboxfbt:eq(" + i + ") .ckrows input:checked").each(function() {
 
- 			checkname = $(this).attr("name");
 
- 			checkid = checkid + $(this).val() + ",";
 
- 		});
 
- 		if (checkname != "") {
 
- 			f = f + checkname + "=" + checkid + "&";
 
- 		}
 
- 	}
 
- 	var ab = 0;
 
- 	$(".must").each(function() {
 
- 		if ($.trim($(this).val()).length == 0) {
 
- 			$(this).css("border", "1px solid #F66");
 
- 			ab = ab + 1;
 
- 		}
 
- 	});
 
- 	if (ab > 0) {
 
- 		$(".ts p").text("红框为必填项");
 
- 		$(".ts").show();
 
- 		setTimeout('$(".ts").fadeOut()', 600);
 
- 		return false;
 
- 	}
 
- 	
 
- 	
 
- 	$.ajax({
 
- 		url: addedit,
 
- 		data: $("form").serialize(),
 
- 		type: "POST",
 
- 		dataType: "json",
 
- 		success: function(a) {
 
- 			if (a && a.success) {
 
- 				$(".ts").hide();
 
- 				$(".express p:eq(0)").html(a.msg + "是否关闭?");
 
- 				$(".express p:eq(1)").html(
 
- 					"<font class='fh'>确 定</font><font class='esc'>取 消</font>");
 
- 				$(".express").show();
 
- 			} else {
 
- 				$(".ts").hide();
 
- 				$(".ts p").html(a.msg);
 
- 				$(".ts").fadeIn();
 
- 				setTimeout('$(".ts").fadeOut()', 800);
 
- 			}
 
- 		}
 
- 	});
 
- }
 
- </script>
 
- <script type="text/javascript" src="{$theme}js/ajaxupload.3.5.js"></script>
 
- {Template footer}
 
 
  |