<%
	Class skwebM
	Public Function skweb_NoRormMXList(ModeID)'读取系统字段输出
	 Dim RSObj
	  Set RSObj=skweboa.SK_axe("Select * from Table_skweb  Where ModeID=" & ModeID & " and skweboa=1  order by OrderID desc,ID asc")
	  	Do While Not RSObj.Eof
			skweb_NoRormMXList=skweb_NoRormMXList &"<tr>"&vbCrLf&"<td width=""13%"" align=""right"">"&RSObj("Title")&"：</td>"&vbCrLf&"<td>"&ListField(RSObj)&"</td>"&vbCrLf&"</tr>"&vbCrLf
		RSObj.MoveNext
		Loop
	  RSObj.Close:Set RSObj=Nothing
	 skweb_NoRormMXList=vbCrLf&skweb_NoRormMXList& vbCrLf 
	End function
	Public Function skweb_MXEdit(ModeID,ID)'表现方式.输出模型
	 Dim RS
	  Set RS=skweboa.SK_axe("Select * from Table_skweb  Where ModeID=" & ModeID & "  and skweboa=1 order by OrderID desc,ID asc")
	  	Do While Not RS.Eof
			skweb_MXEdit=skweb_MXEdit &"<tr>"&vbCrLf&"<td   align=""right"">"&RS("Title")&"：</td>"&vbCrLf&"<td>"&EditField(RS,ModeID,ID)&"</td></tr>"&vbCrLf		
		RS.MoveNext
		Loop
	  RS.Close:Set RS=Nothing
	 skweb_MXEdit=vbCrLf&skweb_MXEdit& vbCrLf 
	End function

	Public Function skwebUser_MXList(ModeID)'读取系统字段输出
	 Dim RSObj
	  Set RSObj=skweboa.SK_axe("Select * from Table_skweb  Where ModeID=" & ModeID & " and skweboa=1   order by OrderID desc,ID asc")
	  	Do While Not RSObj.Eof
			skwebUser_MXList=skwebUser_MXList &"<tr>"&vbCrLf&"<th width=""20%""  ><strong> "&RSObj("Title")&"：</strong><br /></td>"&vbCrLf&"<td>"&ListField(RSObj)&"</td>"&vbCrLf&"</tr>"&vbCrLf&vbCrLf
		RSObj.MoveNext
		Loop
	  RSObj.Close:Set RSObj=Nothing
	 skwebUser_MXList=vbCrLf&skwebUser_MXList& vbCrLf 
	End function

	Function ReplaceForm(ModeID,SK_Template_content_output)
	If Trim(SK_Template_content_output)="" Then Exit Function 
 		Dim MX_Arr,K
		MX_Arr=skweboa.SK_Return_Mode(ModeID,1)
		If IsArray(MX_Arr) Then
		  For K=0 To Ubound(MX_Arr,2)
 			  SK_Template_content_output = Replace(SK_Template_content_output,"{$" & MX_Arr(0,K) & "}","")
			  SK_Template_content_output = Replace(SK_Template_content_output,"{$" & MX_Arr(0,K) & "_title}",tip_skweb(ModeID,MX_Arr(0,K)))
		  Next
		End If
		ReplaceForm=SK_Template_content_output
	End Function

	Function ReplaceFormEdit(ModeID,id,SK_Template_content_output)
	If Trim(SK_Template_content_output)="" Then Exit Function 
 		Dim MX_Arr,K
		MX_Arr=skweboa.SK_Return_Mode(ModeID,1)
		If IsArray(MX_Arr) Then
		  For K=0 To Ubound(MX_Arr,2)
  			  SK_Template_content_output = Replace(SK_Template_content_output,"{$" & MX_Arr(0,K) & "}",PrintModeEdit(ModeID,id,MX_Arr(0,K)))
			  SK_Template_content_output = Replace(SK_Template_content_output,"{$" & MX_Arr(0,K) & "_title}",tip_skweb(ModeID,MX_Arr(0,K)))
		  Next
		End If
		ReplaceFormEdit=SK_Template_content_output
	End Function


	Function PrintModeEdit(ModeID,id,FieldName)
		 Dim RSObj
		  Set RSObj=skweboa.SK_axe("Select * from Table_skweb  Where ModeID=" & ModeID & " and FieldName='"&FieldName&"'  order by OrderID asc,ID Desc")
			If Not rsobj.eof Then 
				PrintModeEdit=EditFieldlist(RSObj,ModeID,id)
			Else
				PrintModeEdit=""
			End If 
			
		  RSObj.Close:Set RSObj=Nothing
	End Function 
	

	Function EditFieldlist(RSObj,ModeID,id)
		Dim rs1,FieldName
	  Set RS1=skweboa.SK_axe("Select * from "&skweboa.SK_Mroot(ModeID,2)&"  Where id="&id&"")
	 FieldName= RSObj("FieldName")
 	EditFieldlist=RS1(FieldName)
	End Function 

	Function tip_skweb(ModeID,FieldName)
		  Dim RSObj
		  Set RSObj=skweboa.SK_axe("Select * from Table_skweb  Where ModeID=" & ModeID & " and FieldName='"&FieldName&"'  order by OrderID asc,ID Desc")
			If Not rsobj.eof Then 
				If rsobj("IsNotNull")="0" Then 
					tip_skweb="  <font color=red title=""必填"">*</font>  "&rsobj("Description")
				Else
					tip_skweb="  "&rsobj("Description")
				End If 
			Else
				tip_skweb=""
			End If 
	End Function 
	Function ListField(RSObj)
		Dim i,TitleTypeArr,checked,IsNotNull
		Dim arrtitle,arrvalue,titles

		If rsobj("IsNotNull")="0" Then 
			IsNotNull=" <font color=red title=""必填"">*</font> "&rsobj("Description")
		Else
			IsNotNull=""&rsobj("Description")
		End If 
 	    Select Case RSObj("FieldType")
		   Case "TextType"   '单行文本
				ListField= "<input class=""ainput"" type=""text"" title="""&RSObj("Description")&""" name="""&RSObj("FieldName")&""" size="""&RSObj("width")&""" value="""&RSObj("Type_Default")&""">"&IsNotNull
				
		   Case "MultipleTextType" '多行文本
				ListField= "<textarea title="""&RSObj("Description")&"""  class=""ainput"" name="""&RSObj("FieldName")&""" style=""height:"&RSObj("height")&"px;width:"&RSObj("width")&"px;"">"&RSObj("Type_Default")&"</textarea>"&IsNotNull	
		   Case "MultipleHtmlType"  '文本编辑器
		   if  RSObj("skupload")=0 then 
				ListField="<script>var "&RSObj("FieldName")&"; KindEditor.ready(function(K) { "&RSObj("FieldName")&" = K.create('textarea[name="""&RSObj("FieldName")&"""]', { fileManagerJson :'"&MyDbPath&"SKCMS/upload/file_manager_json.asp',allowFileManager : true, uploadJson : '"&MyDbPath&"SKCMS/upload/upload_json.asp',newlineTag :'br' , width : '"&RSObj("width")&"', height : '"&RSObj("height")&"'});});</script> <textarea id='"&RSObj("FieldName")&"' name='"&RSObj("FieldName")&"' >"&RSObj("Type_Default")&"</textarea>  "&IsNotNull
			else 
			ListField="<script>var "&RSObj("FieldName")&"; KindEditor.ready(function(K) { "&RSObj("FieldName")&" = K.create('textarea[name="""&RSObj("FieldName")&"""]', { fileManagerJson :'"&MyDbPath&"SKCMS/upload/file_manager_json.asp',allowFileManager : true,newlineTag :'br' , width : '"&RSObj("width")&"', height : '"&RSObj("height")&"',items : ['source', '|', 'undo', 'redo',  '|', 'image', 'flash' , 'media' ,'table', 'link', 'unlink','clearhtml', '|', 'fontsize', 'forecolor', 'hilitecolor','bold', '|', 'fullscreen', 'preview']});});</script> <textarea id='"&RSObj("FieldName")&"' name='"&RSObj("FieldName")&"' >"&RSObj("Type_Default")&"</textarea>    "&IsNotNull
			end if 			
		   Case "RadioType" '单选项
				TitleTypeArr=Split(RSObj("Content"), vbCrLf)
				If RSObj("Type_Type")=0 Then 
				  ListField= ListField&"<select  name="""&RSObj("FieldName")&""">"
				  For I = 0 To UBound(TitleTypeArr)
					arrtitle=Split(TitleTypeArr(I),"-")
					If  UBound(arrtitle)="1" Then 
						titles=arrtitle(0)
						arrvalue=arrtitle(1)
					ElseIf  TitleTypeArr(I)<>"" Then 
					titles=arrtitle(0)
					arrvalue=arrtitle(0)
					Else
						Exit for
					End If 
					If RSObj("Type_Default")=arrvalue Then checked="selected" Else checked=""
					ListField = ListField & "<option value='" & arrvalue & "' "&checked&">" & titles & "</option>"& vbCrLf
				  Next
					ListField= ListField&" </select>"&IsNotNull
				Else
				  For I = 0 To UBound(TitleTypeArr)
				
					arrtitle=Split(TitleTypeArr(I),"-")
					If  UBound(arrtitle)="1" Then 
						titles=arrtitle(0)
						arrvalue=arrtitle(1)
					ElseIf  TitleTypeArr(I)<>"" Then 
					titles=arrtitle(0)
					arrvalue=arrtitle(0)
					Else
						Exit for
					End If 
					
					If RSObj("Type_Default")=arrvalue Then checked="checked" Else checked=""
					ListField = ListField &"<label for="""&RSObj("FieldName")&i&"""> <input  class='Ainput' id="""&RSObj("FieldName")&i&""" type=""radio""  name="""&RSObj("FieldName")&""" value="""&arrvalue&""" "&checked&" />"&titles&"&nbsp;&nbsp;</label>" 
				  Next
				    ListField = ListField&IsNotNull
				End If 
				
				
		   Case "ListBoxType" '多选项
 				TitleTypeArr=Split(RSObj("Content"), vbCrLf)
				If RSObj("Type_Type")=0 Then 
				  For I = 0 To UBound(TitleTypeArr)
					arrtitle=Split(TitleTypeArr(I),"-")
					If  UBound(arrtitle)="1" Then 
						titles=arrtitle(0)
						arrvalue=arrtitle(1)
					ElseIf  TitleTypeArr(I)<>"" Then 
					titles=arrtitle(0)
					arrvalue=arrtitle(0)
					Else
						Exit for
					End If 
					If RSObj("Type_Default")=arrvalue Then checked="checked" Else checked=""
					ListField = ListField &"<label for="""&RSObj("FieldName")&i&"""> <input  class='Ainput' id="""&RSObj("FieldName")&i&""" type=""checkbox""  name="""&RSObj("FieldName")&""" value="""&arrvalue&""" "&checked&" />"&titles&"&nbsp;&nbsp;</label>"& vbCrLf
				  Next
				  ListField = ListField&IsNotNull
				Else
				  ListField= ListField&"<select  size=""4""   style=""width:300px;height:126px""  name="""&RSObj("FieldName")&""" multiple>"
				  For I = 0 To UBound(TitleTypeArr)
					arrtitle=Split(TitleTypeArr(I),"-")
					If  UBound(arrtitle)="1" Then 
						titles=arrtitle(0)
						arrvalue=arrtitle(1)
					ElseIf  TitleTypeArr(I)<>"" Then 
					titles=arrtitle(0)
					arrvalue=arrtitle(0)
					Else
						Exit for
					End If 
					If RSObj("Type_Default")=arrvalue Then checked="checked" Else checked=""
					ListField = ListField & "<option value=""" & arrvalue & """ "&checked&">" & vbCrLf& titles & "</option>"& vbCrLf

				  Next
					ListField= ListField&" </select>"&IsNotNull
				End If 
		   Case "DateType"
				ListField= ListField&"<input class=""ainput"" name="""&RSObj("FieldName")&""" type=""text"" id="""&RSObj("FieldName")&""" value=""""  onClick=WdatePicker();  >"&IsNotNull
				
				
				
		   Case "PicType"   '图片上传
 			 	If RSObj("Type_Type")="0" Then    '上传一张图片
						  ListField= "<div id="""&RSObj("FieldName")&"_idbox""></div><input class=""ainput""  name="""&RSObj("FieldName")&""" ID="""&RSObj("FieldName")&"""  type=""hidden""  value="""&RSObj("Type_Default")&""" size=""40"">  <input type=""button"" id="""&RSObj("FieldName")&"btn"" class=""btnupload""  value=""上传图片"" />  "&IsNotNull
						  
						  
				Elseif  RSObj("Type_Type")="3" Then  '文件上传
				    ListField="  <input class=""ainput left""  name="""&RSObj("FieldName")&""" ID="""&RSObj("FieldName")&"""  type=""text""  value="""&RSObj("Type_Default")&""" size=""40"">  <input type=""button"" id="""&RSObj("FieldName")&"btn"" class=""btnupload""  value=""上传文件"" />  	  "&IsNotNull
				Else
				
				    If RSObj("Type_Type")="2" Then  '影音视频上传
				    ListField="    <textarea  class='ainput'   name="""&RSObj("FieldName")&""" ID="""&RSObj("FieldName")&""" style=""height:50px;width:95%;"" id='text2' style='vertical-align:middle;'>"&RSObj("Type_Default")&"</textarea>  <input type=""button""   class=""btnuploadD""  onClick=""SK_openBrWindow('"&RSObj("FieldName")&"')""  value=""上传影音文件"" />  <input type=""button"" id="""&RSObj("FieldName")&"browse""  class=""btnupload"" value=""浏览服务器"" />    "&IsNotNull
						      		  
						      		  
				    Else      '批量上传图片
					
						ListField="   <script type='text/javascript'>var "&RSObj("FieldName")&"_pid="&RSObj("ID")&"00;function "&RSObj("FieldName")&"_DelUpFiles("&RSObj("FieldName")&"_pid){var "&RSObj("FieldName")&"_p=$('#pic'+"&RSObj("FieldName")&"_pid).val();if("&RSObj("FieldName")&"_p!==''){};$('#sk_Zthumbshow'+"&RSObj("FieldName")&"_pid).remove()};function "&RSObj("FieldName")&"_addImage(bigsrc,smallsrc,text){var "&RSObj("FieldName")&"_newImgDiv=document.createElement('div');var "&RSObj("FieldName")&"_delstr='';"&RSObj("FieldName")&"_delstr='<a href=javascript:"&RSObj("FieldName")&"_DelUpFiles('+"&RSObj("FieldName")&"_pid+') style=color:#ff6600>[删除]</a>';"&RSObj("FieldName")&"_newImgDiv.className='thumbshow';"&RSObj("FieldName")&"_newImgDiv.id='sk_Zthumbshow'+"&RSObj("FieldName")&"_pid;document.getElementById('"&RSObj("FieldName")&"_thumbnails').appendChild("&RSObj("FieldName")&"_newImgDiv);"&RSObj("FieldName")&"_newImgDiv.innerHTML='<a href='+bigsrc+' target=_blank><span id=show'+"&RSObj("FieldName")&"_pid+'></span></a>';"&RSObj("FieldName")&"_newImgDiv.innerHTML+='<div style=margin-top:10px;text-align:left>'+"&RSObj("FieldName")&"_delstr+' <input type=hidden class=ainput  name="""&RSObj("FieldName")&"""  id=pic'+"&RSObj("FieldName")&"_pid+' value=""'+bigsrc+'|'+smallsrc+'|'+text+'"" /> </div>';var "&RSObj("FieldName")&"_newImg=document.createElement('img');"&RSObj("FieldName")&"_newImg.style.margin='5px';document.getElementById('show'+"&RSObj("FieldName")&"_pid).appendChild("&RSObj("FieldName")&"_newImg);if("&RSObj("FieldName")&"_newImg.filters){try{"&RSObj("FieldName")&"_newImg.filters.item('DXImageTransform.Microsoft.Alpha').opacity=0}catch(e){"&RSObj("FieldName")&"_newImg.style.filter='progid:DXImageTransform.Microsoft.Alpha(opacity='+0+')'}}else{"&RSObj("FieldName")&"_newImg.style.opacity=0};"&RSObj("FieldName")&"_newImg.onload=function(){fadeIn("&RSObj("FieldName")&"_newImg,0)};"&RSObj("FieldName")&"_newImg.src=smallsrc;"&RSObj("FieldName")&"_pid++}</script>      <div id="""&RSObj("FieldName")&"_thumbnails"" class=""skplimg""></div> <input type='hidden' name='"&RSObj("FieldName")&"' id='"&RSObj("FieldName")&"'>       <input type=""button"" id="""&RSObj("FieldName")&"btn"" class=""btnupload""  value=""上传文件"" />  <input type=""button"" id="""&RSObj("FieldName")&"browse""  class=""btnupload"" value=""浏览服务器"" /> "&IsNotNull
                    End If 
				End If 
		   
		   
		   Case "FileType" '文件
				ListField= "<input class='Ainput'  name="""&RSObj("FieldName")&""" type=""text""  value="""&RSObj("Type_Default")&""" size=""40""><iframe src=""../Upload_Admin.asp?ModeID=1&instr=1&instrname="&RSObj("FieldName")&"&YNContent=1&file=yes&amp;instrct=content"" name=""image"" width='75%' height=""25"" scrolling=""No"" frameborder=""0"" id=""image""></iframe>"&IsNotNull
				
		   Case "NumberType" '数字
				ListField= "<input class=""ainput""  type=""text"" name="""&RSObj("FieldName")&""" size="""&RSObj("width")&""" value="""&RSObj("Type_Default")&""">"&IsNotNull
		 
		   Case "RadomType" '随机数
				ListField= "<input class=""ainput""  type=""text"" name="""&RSObj("FieldName")&""" size=""25""  value="""&RSObj("Type_Default")&""&skweboa.SK_MakeRandom(RSObj("Type_Type"))&""">"&IsNotNull
		
		   Case "MapType" '地图

				 ListField="  <script type='text/javascript'>var mapvar=document.getElementById('map_z').value;if(mapvar>0){document.getElementById('emarked_img').src='../adminimages/modify_note.gif'};function "&RSObj("FieldName")&"doEmark(){var open_url='../sksysy/googleapi.asp?x="&RSObj("FieldName")&"1&y="&RSObj("FieldName")&"2&z="&RSObj("FieldName")&"3';window.open(open_url,'_blank','height=530, width=700, top=70, left=170, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no')}</script>  经度 <input type='text' name='"&RSObj("FieldName")&"' id='"&RSObj("FieldName")&"1' size='15' value='' class='ainput' />  纬度<input type='text' name='"&RSObj("FieldName")&"' id='"&RSObj("FieldName")&"2' size='15' value=''  class='ainput' />  缩放级别<input type='text' name='"&RSObj("FieldName")&"' id='"&RSObj("FieldName")&"3' size='15' value=''  class='ainput' />  <a href='javascript:"&RSObj("FieldName")&"doEmark()'><span id='emarked_text'><img src='../adminimages/biaozhu.gif' align='absmiddle' border='0' id='emarked_img'/></span></a>     "&IsNotNull

		   Case else
				ListField= "<font color=red>该字段错误</font>"
		   End Select 
	End Function 

	Function EditField(RSObj,ModeID,id)
		Dim i,IsNotNull,TitleTypeArr,checked,rs1,FieldName
		Dim arrtitle,arrvalue,titles
	  Set RS1=skweboa.SK_axe("Select * from "&skweboa.SK_Mroot(ModeID,2)&"  Where id="&id&"")
	  FieldName= RSObj("FieldName")
	
		If rsobj("IsNotNull")="0" Then 
			IsNotNull="  <font color=red title=""必填"">*</font>  "&rsobj("Description")
		Else
			IsNotNull="  "&rsobj("Description")
		End If 
		 
		 Select Case RSObj("FieldType") 
		 
		   Case "TextType"
				EditField= "<input class=""ainput"" title="""&RSObj("Description")&""" type=""text"" name="""&RSObj("FieldName")&""" size="""&RSObj("width")&""" value="""&RS1(FieldName)&""">"&IsNotNull& vbCrLf 
		
		   Case "MultipleTextType"
				EditField= "<textarea title="""&RSObj("Description")&""" name="""&RSObj("FieldName")&""" class=""ainput"" style=""height:"&RSObj("height")&"px;width:"&RSObj("width")&"px;"">"&RS1(FieldName)&"</textarea>"&IsNotNull& vbCrLf 
		 
		 

		 
		  Case "MultipleHtmlType"  '文本编辑器
		   if  RSObj("skupload")=0 then 
				EditField=" <script>var "&RSObj("FieldName")&"; KindEditor.ready(function(K) { "&RSObj("FieldName")&" = K.create('textarea[name="""&RSObj("FieldName")&"""]', { fileManagerJson :'"&MyDbPath&"SKCMS/upload/file_manager_json.asp',allowFileManager : true, uploadJson : '"&MyDbPath&"SKCMS/upload/upload_json.asp',newlineTag :'br' , width : '"&RSObj("width")&"', height : '"&RSObj("height")&"'});});</script> <textarea id='"&RSObj("FieldName")&"' name='"&RSObj("FieldName")&"' >"&RS1(FieldName)&"</textarea>   "&IsNotNull
			else 
			EditField=" <script>var "&RSObj("FieldName")&"; KindEditor.ready(function(K) { "&RSObj("FieldName")&" = K.create('textarea[name="""&RSObj("FieldName")&"""]', { fileManagerJson :'"&MyDbPath&"SKCMS/upload/file_manager_json.asp',allowFileManager : true,newlineTag :'br' , width : '"&RSObj("width")&"', height : '"&RSObj("height")&"',items : ['source', '|', 'undo', 'redo',  '|', 'image', 'flash' , 'media' ,'table', 'link', 'unlink','clearhtml', '|', 'fontsize', 'forecolor', 'hilitecolor','bold', '|', 'fullscreen', 'preview']});});</script> <textarea id='"&RSObj("FieldName")&"' name='"&RSObj("FieldName")&"' >"&RS1(FieldName)&"</textarea>   "&IsNotNull
			end if 	
		 
		 
		 
		 
		 
		 
		 
		   Case "RadioType"
				TitleTypeArr=Split(RSObj("Content"), vbCrLf)
				If RSObj("Type_Type")=0 Then 
				  EditField= EditField&"<select  name="""&RSObj("FieldName")&""">"
				  For I = 0 To UBound(TitleTypeArr)
					arrtitle=Split(TitleTypeArr(I),"-")
					If  UBound(arrtitle)="1" Then 
						titles=arrtitle(0)
						arrvalue=arrtitle(1)
					ElseIf  TitleTypeArr(I)<>"" Then 
					titles=arrtitle(0)
					arrvalue=arrtitle(0)
					Else
						Exit for
					End If 

					If RS1(FieldName)=arrvalue Then checked="selected" Else checked=""
					EditField = EditField & "<option value='" & arrvalue & "' "&checked&">" & titles & "</option>"& vbCrLf
				  Next
					EditField= EditField&" </select>"&IsNotNull& vbCrLf 
				Else
				  For I = 0 To UBound(TitleTypeArr)
					arrtitle=Split(TitleTypeArr(I),"-")
					If  UBound(arrtitle)="1" Then 
						titles=arrtitle(0)
						arrvalue=arrtitle(1)
					ElseIf  TitleTypeArr(I)<>"" Then 
					titles=arrtitle(0)
					arrvalue=arrtitle(0)
					Else
						Exit for
					End If 
					
					
					If RS1(FieldName)=arrvalue Then checked="checked" Else checked=""
					EditField = EditField &"<label for="""&RSObj("FieldName")&i&"""> <input  id="""&RSObj("FieldName")&i&""" type=""radio""  name="""&RSObj("FieldName")&""" value="""&arrvalue&""" "&checked&" />"&titles&"&nbsp;&nbsp;</label>"& vbCrLf
				  Next
				    EditField = EditField&IsNotNull
				End If 
				
		   Case "ListBoxType"
				TitleTypeArr=Split(RSObj("Content"), vbCrLf)
				If RSObj("Type_Type")=0 Then 
				  For I = 0 To UBound(TitleTypeArr)
				
					arrtitle=Split(TitleTypeArr(I),"-")
					If  UBound(arrtitle)="1" Then 
						titles=arrtitle(0)
						arrvalue=arrtitle(1)
					ElseIf  TitleTypeArr(I)<>"" Then 
					titles=arrtitle(0)
					arrvalue=arrtitle(0)
					Else
						Exit for
					End If 
					If skweboa.SK_FoundInArr(RS1(FieldName),arrvalue,",")=true Then checked="checked" Else checked=""
					EditField = EditField &"<label for="""&RSObj("FieldName")&i&""">  <input  id="""&RSObj("FieldName")&i&""" type=""checkbox""  name="""&RSObj("FieldName")&""" value="""&arrvalue&""" "&checked&" />"&titles&"&nbsp;&nbsp;</label>"& vbCrLf
				  Next
				  EditField = EditField&IsNotNull
				Else
				    EditField= EditField&"<select  size=""4""   style=""width:300px;height:126px""  name="""&RSObj("FieldName")&""" multiple>"
				  For I = 0 To UBound(TitleTypeArr)
					arrtitle=Split(TitleTypeArr(I),"-")
					If  UBound(arrtitle)="1" Then 
						titles=arrtitle(0)
						arrvalue=arrtitle(1)
					ElseIf  TitleTypeArr(I)<>"" Then 
					titles=arrtitle(0)
					arrvalue=arrtitle(0)
					Else
						Exit for
					End If 
					If skweboa.SK_FoundInArr(RS1(FieldName),arrvalue,",")=true Then checked="selected" Else checked=""
					EditField = EditField & "<option value=""" & arrvalue & """ "&checked&">" & vbCrLf& titles & "</option>"& vbCrLf
				  Next
					EditField= EditField&" </select>"&IsNotNull
				End If 
				
				
		   Case "DateType"
				EditField= EditField&"<input class=""ainput"" name="""&RSObj("FieldName")&""" type=""text"" id="""&RSObj("FieldName")&""" value="&RS1(FieldName)&" onClick=WdatePicker();  >"&IsNotNull
		  
		   Case "PicType"
			
 			 	If RSObj("Type_Type")="0" Then   '上传一张图片
                       if RS1(FieldName)<>"" then 
					    edbox="<a href="""&RS1(FieldName)&""" target=""_blank"" title=""查看"" ><img src="""&RS1(FieldName)&"""  onload=""javascript:DrawImage(this,100,100);"" ></a> <a href=javascript:delpicurl("""&RSObj("FieldName")&""") >删除</a> "
					   end if

						 EditField=	" <div id="""&RSObj("FieldName")&"_idbox""> "&edbox&"</div><input class=""ainput""  name="""&RSObj("FieldName")&""" ID="""&RSObj("FieldName")&"""  type=""hidden""  value="""&RS1(FieldName)&""" size=""40"">  <input type=""button"" id="""&RSObj("FieldName")&"btn"" class=""btnupload""  value=""上传图片"" /> "&IsNotNull
						  
						  				  
			  Elseif  RSObj("Type_Type")="3" Then  '文件上传
				    EditField="   <input class=""ainput left""  name="""&RSObj("FieldName")&""" ID="""&RSObj("FieldName")&"""  type=""text""  value="""&RS1(FieldName)&""" size=""40"">  <input type=""button"" id="""&RSObj("FieldName")&"btn"" class=""btnupload""  value=""上传文件"" />      "&IsNotNulll
						 
				Else
				 	  If RSObj("Type_Type")="2" Then  '视频上传
				    EditField=" <textarea  class='ainput'   name="""&RSObj("FieldName")&""" ID="""&RSObj("FieldName")&""" style=""height:50px;width:95%;"" id='text2' style='vertical-align:middle;'>"&RS1(FieldName)&"</textarea>  <input type=""button""   class=""btnuploadD""  onClick=""SK_openBrWindow('"&RSObj("FieldName")&"')""  value=""上传影音文件"" />  <input type=""button"" id="""&RSObj("FieldName")&"browse"" class=""btnupload""  value=""浏览服务器"" />      "&IsNotNull

				    Else      '批量修改上传图片
					
						EditField="  <script type='text/javascript'>var "&RSObj("FieldName")&"_pid="&RSObj("ID")&"00;function "&RSObj("FieldName")&"_DelUpFiles("&RSObj("FieldName")&"_pid){var "&RSObj("FieldName")&"_p=$('#pic'+"&RSObj("FieldName")&"_pid).val();if("&RSObj("FieldName")&"_p!==''){};$('#sk_Zthumbshow'+"&RSObj("FieldName")&"_pid).remove()};function "&RSObj("FieldName")&"_addImage(bigsrc,smallsrc,text){var "&RSObj("FieldName")&"_newImgDiv=document.createElement('div');var "&RSObj("FieldName")&"_delstr='';"&RSObj("FieldName")&"_delstr='<a href=javascript:"&RSObj("FieldName")&"_DelUpFiles('+"&RSObj("FieldName")&"_pid+') style=color:#ff6600>[删除]</a>';"&RSObj("FieldName")&"_newImgDiv.className='thumbshow';"&RSObj("FieldName")&"_newImgDiv.id='sk_Zthumbshow'+"&RSObj("FieldName")&"_pid;document.getElementById('"&RSObj("FieldName")&"_thumbnails').appendChild("&RSObj("FieldName")&"_newImgDiv);"&RSObj("FieldName")&"_newImgDiv.innerHTML='<a href='+bigsrc+' target=_blank><span id=show'+"&RSObj("FieldName")&"_pid+'></span></a>';"&RSObj("FieldName")&"_newImgDiv.innerHTML+='<div style=margin-top:10px;text-align:left>'+"&RSObj("FieldName")&"_delstr+' <input type=hidden class=ainput  name="""&RSObj("FieldName")&"""  id=pic'+"&RSObj("FieldName")&"_pid+' value=""'+bigsrc+'|'+smallsrc+'|'+text+'"" /> </div>';var "&RSObj("FieldName")&"_newImg=document.createElement('img');"&RSObj("FieldName")&"_newImg.style.margin='5px';document.getElementById('show'+"&RSObj("FieldName")&"_pid).appendChild("&RSObj("FieldName")&"_newImg);if("&RSObj("FieldName")&"_newImg.filters){try{"&RSObj("FieldName")&"_newImg.filters.item('DXImageTransform.Microsoft.Alpha').opacity=0}catch(e){"&RSObj("FieldName")&"_newImg.style.filter='progid:DXImageTransform.Microsoft.Alpha(opacity='+0+')'}}else{"&RSObj("FieldName")&"_newImg.style.opacity=0};"&RSObj("FieldName")&"_newImg.onload=function(){fadeIn("&RSObj("FieldName")&"_newImg,0)};"&RSObj("FieldName")&"_newImg.src=smallsrc;"&RSObj("FieldName")&"_pid++}</script>      <div id="""&RSObj("FieldName")&"_thumbnails"" class=""skplimg""></div> <input type='hidden' name='"&RSObj("FieldName")&"' id='"&RSObj("FieldName")&"'>  <input type=""button"" id="""&RSObj("FieldName")&"btn"" class=""btnupload""  value=""上传文件"" />  <input type=""button"" id="""&RSObj("FieldName")&"browse""  class=""btnupload"" value=""浏览服务器"" />   	<script type='text/javascript'>$(document).ready(function(){"&RSObj("FieldName")&"_IniPicUrl()});function "&RSObj("FieldName")&"_IniPicUrl(){var "&RSObj("FieldName")&"_IniPicUrl='"&RS1(FieldName)&"';var "&RSObj("FieldName")&"_PicUrlArr=null;if("&RSObj("FieldName")&"_IniPicUrl!=''){"&RSObj("FieldName")&"_PicUrlArr="&RSObj("FieldName")&"_IniPicUrl.split(',');for(var i=1;i<"&RSObj("FieldName")&"_PicUrlArr.length+0;i++){"&RSObj("FieldName")&"_addImage("&RSObj("FieldName")&"_PicUrlArr[i-1].split('|')[0],"&RSObj("FieldName")&"_PicUrlArr[i-1].split('|')[1],"&RSObj("FieldName")&"_PicUrlArr[i-1].split('|')[2])}}} </script> "&IsNotNull
						
                    End If 
				End If 
				
 		   Case "FileType"
				EditField= "<input  name="""&RSObj("FieldName")&""" type=""text""  value="""&RS1(FieldName)&""" class='Ainput' size=""40""><iframe src=""../Upload_Admin.asp?ModeID=1&instr=1&instrname="&RSObj("FieldName")&"&YNContent=1&file=yes&amp;instrct=content"" name=""image"" width='75%' height=""25"" scrolling=""No"" frameborder=""0"" id=""image""></iframe>"&IsNotNull
		   Case "NumberType" '数字
				EditField= "<input class='ainput' type=""text"" name="""&RSObj("FieldName")&""" size="""&RSObj("width")&""" value="""&RS1(FieldName)&""">"&IsNotNull
		   Case "RadomType" '随机数
				EditField= "<input class='ainput' type=""text"" name="""&RSObj("FieldName")&""" size=""25""  value="""&RS1(FieldName)&""">"&IsNotNull
		Case "MapType" '地图
			SKDmap = split(RS1(FieldName),",")	
			   EditField="  <script type='text/javascript'>var mapvar=document.getElementById('map_z').value;if(mapvar>0){document.getElementById('emarked_img').src='../adminimages/modify_note.gif'};function "&RSObj("FieldName")&"doEmark(){var open_url='../sksysy/googleapi.asp?x="&RSObj("FieldName")&"1&y="&RSObj("FieldName")&"2&z="&RSObj("FieldName")&"3';window.open(open_url,'_blank','height=530, width=700, top=70, left=170, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no')}</script>  经度 <input type='text' name='"&RSObj("FieldName")&"' id='"&RSObj("FieldName")&"1' size='15' value='"&SKDmap(0)&"' class='ainput' />  纬度<input type='text' name='"&RSObj("FieldName")&"' id='"&RSObj("FieldName")&"2' size='15' value='"&SKDmap(1)&"'  class='ainput' />  缩放级别<input type='text' name='"&RSObj("FieldName")&"' id='"&RSObj("FieldName")&"3' size='15' value='"&SKDmap(2)&"'  class='ainput' />  <a href='javascript:"&RSObj("FieldName")&"doEmark()'><span id='emarked_text'><img src='../adminimages/biaozhu.gif' align='absmiddle' border='0' id='emarked_img'/></span></a>     "&IsNotNull
				 
				 
		   Case else
				EditField= "<font color=red>该字段错误</font>"
		   End Select 
	  RS1.Close:Set RS1=Nothing
	End Function 

End Class 
	Dim M
	Set M = New skwebM
%>