add_ptxl.asp

来自「网络办公系统源码」· ASP 代码 · 共 95 行

ASP
95
字号
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../../config.asp"-->
<!--#include file="../checklogin.asp"-->
<%
act=request.QueryString("act")
uname=CheckInfuse(trim(request.Form("uname")),len(trim(request.Form("uname"))))'sql过滤
email=CheckInfuse(trim(request.Form("email")),len(trim(request.Form("email"))))
tel=CheckInfuse(trim(request.Form("tel")),len(trim(request.Form("tel"))))
mobile=CheckInfuse(trim(request.Form("mobile")),len(trim(request.Form("mobile"))))
address=CheckInfuse(trim(request.Form("address")),len(trim(request.Form("address"))))
zhiwu=CheckInfuse(trim(request.Form("zhiwu")),len(trim(request.Form("zhiwu"))))
company=CheckInfuse(trim(request.Form("company")),len(trim(request.Form("company"))))
uid=session("adminid")
sql="insert into oa_txl(uid,uname,email,tel,mobile,address,zhiwu,company) " & _
"values("&uid&",'"&uname&"','"&email&"','"&tel&"','"&mobile&"','"&address&"','"&zhiwu&"','"&company&"')"

if act="add" then 
	conn.execute(sql)
	call Message("添加成功","p_txl.asp")	
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<link href="../img/css1.css" type=text/css rel=stylesheet>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.style1 {color: #FFFFFF}
.style4 {color: #FFFFFF; font-weight: bold; }
-->
</style>
</head>
<body>
<form name="myform" id="myform" method="post" action="add_ptxl.asp?act=add" onSubmit="return CheckForm();">
<table width="99%"  border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#F2F2F2" class="tabel1">
  <tr align="right">
    <td width="17%" height="25" align="left" bgcolor="#CC0000"><span class="style1"><strong>添加个人通讯录</strong></span></td>
    <td height="25" colspan="4" bgcolor="#CC0000"><input name="Submit" type="button" class="bon" id="Submit4" value="公司通讯录" onClick="window.location.href='txl.asp'">
      <input name="Submit" type="button" class="bon" id="Submit4" value="个人通讯录" onClick="window.location.href='p_txl.asp'">
      <input name="Submit" type="button" class="bon" id="Submit4" value="增加个人通讯录" onClick="window.location.href='add_ptxl.asp'"></td>
    </tr>
  <tr bgcolor="#F2F2F2">
    <td height="25" colspan="5" align="center"></td>
  </tr>
  <tr bgcolor="#CC6633">
    <td height="25" colspan="5" align="center"><span class="style4">输入联系人信息</span></td>
    </tr>
  <tr>
    <td height="25" colspan="5" align="center">免费版不支持此功能,请购买正式版。<br>
      网址:http://www.hokilly.com<br>
      演示:http://www.hokilly.com/demo/hokilly_oa90/<br>
      咨询QQ:15916190<br>
      电话:13915064582</td>
  </tr>
</table>
</form>
</body>
</html>
<script language="javascript">
function CheckForm()
{
    var objFrm=document.myform;
	if(objFrm.uname.value=="")
	{
		alert("请输入联系人姓名!");
		objFrm.uname.focus();
		return false;
	}
	if(objFrm.tel.value=="")
	{
		alert("请输入联系人电话!");
		objFrm.tel.focus();
		return false;
	}
	if(objFrm.mobile.value=="")
	{
		alert("请输入联系人手机!");
		objFrm.mobile.focus();
		return false;
	}
	
	return true;

}
</script>

⌨️ 快捷键说明

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