⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 edit.asp

📁 功能齐全的oa系统
💻 ASP
字号:
<%option explicit%>
<%
Response.Expires = -1
Response.AddHeader "Pragma","no-cache"
Response.AddHeader "Cache-Control","no-cache,must-revalidate"
%>
<!--#include virtual ="/Include/DataEnvi.asp"-->
<!--#include virtual = "/Include/String.asp"-->
<%
	Dim ObjDB,ObjRS,StrSQL
	Dim objRSFlow,strDefaultFlowID
	Dim IntID
	Dim C

	IntID = Request.QueryString("ID")
	Set ObjDB = Server.CreateObject("Adodb.Connection")
	OpenDB ObjDB

	Set C = Server.CreateObject ("CMS2003.DBHandle")
	C.Init (ObjDB)
	
	StrSQL = "Select * From t_OA_Work_ComMessage_Templet where ID = " & IntID
	Set ObjRS = C.view (StrSQL)
	
	If Request.Form.Count > 0 Then
		Call C.Edit(IntID,"_","t_OA_Work_ComMessage_Templet")
		Response.Redirect "List.asp"
	End If
	
	ObjDB.Close 
	Set ObjDB = Nothing	

Sub Main
%>
	<script language=javascript>
	var isSetOK = false
	var isHTML = 1
	function setIsHTML(t){
		TBody1.style.display = "none"
		TBody2.style.display = "none"
		if(t==0)TBody1.style.display = ""
		if(t==1)TBody2.style.display = ""
		isHTML = t
	}


	function GetHTML(){
		var tmpHTML = frameBody.getHTML()
		if(isHTML==1)
		document.forms[0]._Templet.value = tmpHTML;
		else
		document.forms[0]._Templet.value = document.forms[0].textBody.value;
	}

	</script>

	<table class=Ltable cellspacing=1 cellpadding=3 height=100%>
	<tr class=LHtr>
	<td width=15%>浏览文章</td>
	<td width=85%></td>
	</tr>
	<form action="" onsubmit="GetHTML();return(CheckForm(this))" method="post" id=form1 name=form1>
	<input value="" type=hidden name="_Templet">
	<tr class=Ltr>
		<td>模板标题</td>
		<td><input type="text"  class=Input Check=1 Show="模板标题" name="_TempletTitle" value="<%=ObjRS("TempletTitle")%>"></td>
	</tr>
	<tr class=Ltr>
		<td>创建时间</td>
		<td><input type="text" class=Input onclick="InputDate(this)" readonly name="_CreateTime" value=<%=ObjRS("CreateTime")%>></td>
	</tr>
	<tr class=Ltr>
	<td>模板格式:</td>
	<td><input type=radio name=_IsHtml value="0" <%If Not ObjRS("IsHTML") Then Response.Write " checked "%> onclick=setIsHTML(0)>普通文本<input type=radio <%If ObjRS("IsHTML") Then Response.Write " checked "%>  name=_IsHtml value="1" onclick=setIsHTML(1)>多格式</td>
	</tr>
	<tr class=Ltr id=TBody1 height=100%>
	<td colspan=2><textarea style="width=100%;height=100%" name="textBody" class=textbody><%=ObjRS("Templet")%></textarea></td>
	</tr>

	<tr class=Ltr id=TBody2 height=100%>
	<td colspan=2><iframe style="width=100%;height=100%" src="../../../Include/HTMLEditor.asp" class=textbody1 frameborder=0 id=frameBody></iframe></td>
	</tr>
	<tr class=Ltr>
		<td colspan=2><input type="submit" class=Button value="确    定" id=submit1 name=submit1><input type="button" class=Button value="取    消"onclick="history.go(-1)" id=button1 name=button1></td>
	</tr>
	</form>
	</table>
	
<%
	If ObjRS("IsHTML") Then
%>
	<script language=javascript>

	function CheckIsLoadOK(){
		if(frameBody.IsLoadOK&&(!isSetOK)){
			frameBody.setHTML("<%=Replace(ObjRS("Templet"),Chr(34),"\"&Chr(34))%>")
			isSetOK = true
		}
		setTimeout("CheckIsLoadOK()",500)
	}

	function ChangeBody(){
		var tmpHTML = frameBody.getHTML()
		document.forms[0]._Templet.value = tmpHTML;
	}

	CheckIsLoadOK()
	TBody1.style.display = "none"
	</script>
<%
	Else
%>
	<script language=javascript>
	function ChangeBody(){
		document.forms[0]._Templet.value = document.forms[0].Templet1.value;
	}
	TBody2.style.display = "none"
	</script>
<%
	End If
%>
<%
End Sub
%>
<!-- #include file="templet.asp" -->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -