?? mail_template_add.asp
字號:
<%
'OA 表單生成器1.0
'功能:增加郵件模板
'參數:request.form("addedit_subed")="true"#表單提交;
%>
<!--#include file="../inc/Secure.asp"-->
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/Const.asp"-->
<%
'response.buffer=false
'------------------------------------------------設置參數
LoginID=trim(session("LoginID")) : if LoginID="" then LoginID=0 '當前用戶ID
'------------------------------------------------
'------------------------------------------------增加記錄
table="tbioaMail_template" '表名
if request.form("addedit_subed")="true" then
'表單提交后
'接受錄入參數
input_title=Request.Form("input_title")'模板標題
input_body=Request.Form("input_body")'模板內容
'添加時使用的字段
field1=array("title","body","sdate","userid")
value1=array(input_title,input_body,date(),LoginID)
for i=0 to ubound(field1)
value1(i)=replace(value1(i),"'","''")
next
sql = "INSERT INTO " & table & " (" & Join(field1, ",") & ") VALUES ('" & Join(value1, "','") & "')"
oConn.Execute sql
word="<p>郵件模板已成功提交!</p><p><img border=0 src=../images/icon_show.gif align=left width=16 height=16><a href=mail_template_add.asp>繼續提交</a>"
end if
'------------------------------------------------
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../css/main.css" type=text/css>
<title>main</title>
<script src="../js/Popup.js"></script>
<script src="../js/front_chec.js"></script>
<script language="JavaScript">
<!--
function require(form){
if (!checnull(form.input_title,"請填寫模板標題!")) return false;
form.input_body.value=editor.save()
if (form.input_body.value=="") {alert("請填寫模板內容!"); return false;}
return true;
}
-->
</script>
</head>
<body topmargin="10" leftmargin="10">
<!--#include file="mail_template_menu.html"-->
<hr width="100%" size=1 color="#000000">
<br>
<div align="center">
<table width="100%" cellspacing="1" cellpadding="2" class="tab">
<tr>
<td width="100%" class="tdTop">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td class="tdTop">
<p align="left"><img border="0" src="../images/icon_title.gif" align="left">增加郵件模板</p>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="25%" class="td1">
<% if request.form("addedit_subed")="true" then %>
<table border="0" width="100%" cellspacing="10" cellpadding="0">
<tr>
<td width="36%">
<p align="right"><img border="0" src="../images/edit.gif" width="32" height="32">
</td>
<td width="64%"><p> </p>
<%=word%>
</td>
</tr>
<tr>
<td width="100%" colspan="2">
</td>
</tr>
</table>
<% else %>
<form name="eventfrm" method="POST" action="" onSubmit="return require(this)">
<input type=hidden name="addedit_subed" value="true">
<table border="0" width="100%" cellspacing="10" cellpadding="0">
<tr>
<td valign="top" nowrap>模板標題:
<input type="text" name="input_title" value="<%=show_title%>" size="40" maxlength="250" class="input"> <font COLOR="RED">*</font>
</td>
</tr>
<tr>
<td valign="top" nowrap>模板內容:<br>
<input type=hidden name="input_body" value="">
<iframe id="editor" src="../inc/editor.asp" width="100%" height="400" scrolling="yes" style="border: 1 solid #000000"></iframe>
</td>
</tr>
<tr>
<td width="100%">
<input type="submit" value="確定" name="B1" class="button0" onmouseout=className="button0" onmouseover=className="button1"> <input type="reset" value="全部重寫" name="B2" class="button0" onmouseout=className="button0" onmouseover=className="button1">
</td>
</tr>
</table>
</form>
<% end if %>
</td>
</tr>
<tr>
<td width="25%" class="tdBottom">
</td>
</tr>
</table>
</div>
</body>
</html>
<%'釋放對象變量
oConn.close
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -