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

📄 addcompany.asp

📁 网络办公系统源码
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../config.asp"-->
<!--#include file="checklogin.asp"-->

<%
if  ChkAdmin("sys_addcompany")=False then
   call message("您没有添加公司信息的权限","back")
   call endexit()
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="../oaadmin/img/css1.css" type=text/css rel=stylesheet>
<SCRIPT language=JavaScript src="../inc/meizzDate.js"></SCRIPT>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.style1 {
	color: #FFFFFF;
	font-weight: bold;
}
-->
</style>
</head>
<%
id=replace(request.QueryString("id"),"'","")
act=request.QueryString("act")

company=trim(request.Form("company"))
url=trim(request.Form("url"))
star_time=trim(request.Form("star_time"))
end_time=trim(request.Form("end_time"))
cname=trim(request.Form("cname"))
tel=trim(request.Form("tel"))


insql="insert into oa_company(company,url,star_time,end_time,cname,tel) "& _
"values('"&company&"','"&url&"','"&star_time&"','"&end_time&"','"&cname&"','"&tel&"')"

upsql="update oa_company set company='"&company&"',url='"&url&"',star_time='"&star_time&"'"& _
",end_time='"&end_time&"',cname='"&cname&"',tel='"&tel&"' where id="&request.Form("ids")
	
	if act="add" then
		conn.execute(insql)
		call Message("发布成功","companylist.asp")
	elseif act="edit" then
		conn.execute(upsql)
		call Message("修改成功","companylist.asp")
	end if
%>
<body>
<%
 if act="" then
%>
<table width="99%"  border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#F2F2F2" class="tabel1">
  <form name="form1" method="post" action="addcompany.asp?act=add">
  <tr align="center">
    <td height="25" colspan="2" bgcolor="#CC0000"><span class="style1">添加公司信息</span></td>
    </tr>

  <tr bgcolor="#F9F9F9">
    <td width="13%" height="25" align="center"> 公司名称</td>
    <td width="87%" height="25" align="left"><input name="company" type="text" class="tabel1" id="company" size="50">
      *</td>
    </tr>
  
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center">联系人</td>
    <td height="25" align="left"><input name="cname" type="text" class="tabel1" id="cname" value=""></td>
  </tr>
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center">联系电话</td>
    <td height="25" align="left"><input name="tel" type="text" class="tabel1" id="tel" value=""></td>
  </tr>
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center">注册日期</td>
    <td height="25" align="left"><input name="star_time" type="text" class="tabel1" id="star_time"  onFocus="setday(this)"></td>
  </tr>
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center">到期日期</td>
    <td height="25" align="left"><input name="end_time" type="text" class="tabel1" id="end_time"  onFocus="setday(this)"></td>
  </tr>
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center"> 公司网址</td>
    <td height="25" align="left"><input name="url" type="text" class="tabel1" id="url" value="www.">
      (不加htt://)</td>
    </tr>
  <tr bgcolor="#F9F9F9">
    <td height="25" colspan="2" align="center"><input name="Submit2" type="submit" class="bon" value="提交">
 
  <input name="Submit3" type="reset" class="bon" value="重置">
  <span class="style1"><font style="font-size:15px ">  
  <input name="Submit" type="button" class="bon" value="返回上页" onClick="window.history.go(-1)">
  </font></span></td>
  </tr></form>
</table>
<%
elseif act="edits" then
	if  ChkAdmin("oa_managecompany")=False then
  		call message("您没有管理公司客户信息的权限","back")
   		call endexit()
	end if

sqle="select * from oa_company where id="&id
set rs=conn.execute(sqle)
if not rs.eof then
	company1=trim(rs("company"))
	url1=trim(rs("url"))
	star_time1=trim(rs("star_time"))
	end_time1=trim(rs("end_time"))
	cname1=trim(rs("cname"))
	tel1=trim(rs("tel"))
end if
rs.close
set rs=nothing
%>
<table width="99%"  border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#F2F2F2" class="tabel1">
  <form name="form1" method="post" action="addcompany.asp?act=edit">
    <tr align="center">
      <td height="25" colspan="2" bgcolor="#CC0000"><span class="style1">修改公司信息</span></td>
    </tr>
    <tr bgcolor="#F9F9F9">
      <td width="13%" height="25" align="center"> 公司名称</td>
      <td width="87%" height="25" align="left"><input name="company" type="text" class="tabel1" id="company" size="50" value="<%=company1%>">
        *</td>
    </tr>
    <tr bgcolor="#F9F9F9">
      <td height="25" align="center">联系人</td>
      <td height="25" align="left"><input name="cname" type="text" class="tabel1" id="cname" value="<%=cname1%>"></td>
    </tr>
    <tr bgcolor="#F9F9F9">
      <td height="25" align="center">联系电话</td>
      <td height="25" align="left"><input name="tel" type="text" class="tabel1" id="tel" value="<%=tel1%>"></td>
    </tr>
    <tr bgcolor="#F9F9F9">
      <td height="25" align="center">注册日期</td>
      <td height="25" align="left"><input name="star_time" type="text" class="tabel1" id="star_time"  onFocus="setday(this)" value="<%=star_time1%>"></td>
    </tr>
    <tr bgcolor="#F9F9F9">
      <td height="25" align="center">到期日期</td>
      <td height="25" align="left"><input name="end_time" type="text" class="tabel1" id="end_time"  onFocus="setday(this)" value="<%=end_time1%>"></td>
    </tr>
    <tr bgcolor="#F9F9F9">
      <td height="25" align="center"> 公司网址</td>
      <td height="25" align="left"><input name="url" type="text" class="tabel1" id="url" value="<%=url1%>">
        (不加htt://)</td>
    </tr>
    <tr bgcolor="#F9F9F9">
      <td height="25" colspan="2" align="center"><input name="Submit" type="submit" class="bon" id="Submit" value="修改">
         
          <input name="Submit32" type="reset" class="bon" value="重置">
          <span class="style1"><font style="font-size:15px ">  
          <input name="Submit4" type="button" class="bon" value="返回上页" onClick="window.history.go(-1)">
          <input name="ids" type="hidden" id="ids" value="<%=id%>">
</font></span></td>
    </tr>
  </form>
</table>
<%

end if
	set conn=nothing

%>
</body>
</html>

⌨️ 快捷键说明

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