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

📄 web_educate_add.asp

📁 直接附加数据库! 修改 Include/ Class_Main.asp 为自己信息 后台admin admin 绍兴人才网程序
💻 ASP
字号:
<!--#include file="../Include/Class_Conn.asp" -->
<!--#include file="../Include/Class_Main.asp" -->
<!--#include file="../Include/Class_Pass.asp" -->
<!--#include file="Web_Session.asp" -->
<% 
Dim Action,Comid,PageNo
Dim TypeId,TypeName,News
'//检测是否跨站
Call Check_url()
'//检测管理员是否有权限操作该页面
If Instr(1,Session("Web_Power"),"143") <= 0 Then 
  Call CloseDB()
  Response.write "对不起!您没有访问该页面的权限..."
  Response.End()
End If

Action = Request.QueryString("action")
If Action = "submit" Then Call Submit() '//调用保存数据的函数

 %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<link href="../CSS/css.css" rel="stylesheet" type="text/css">
</head>
<script language="JavaScript" src="../js/School_Register2.js"></script>
<body leftmargin="0" topmargin="0">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td height="5"></td>
  </tr>
  <tr> 
    <td height="25" bgcolor="fb7a03">&nbsp;<font color="#FFFFFF">::<strong>添加培训机构</strong></font></td>
  </tr>
</table>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="5"></td>
  </tr>
</table>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1">
  <tr> 
    <td align="left"><table width="80%" border="0" align="left" cellpadding="0" cellspacing="0">
        <form action="?action=submit" name="reg" method="POST" onSubmit="return check_reg();">
          <tr> 
            <td align="center"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#f1b5a1">
                <tr> 
                  <td valign="top" bgcolor="#FFFFFF"> <TABLE cellSpacing=0 cellPadding=0 width=99% align=center 
            border=0>
                      <TBODY>
                        <TR> 
                          <TD class=font-14 height=3></TD>
                        </TR>
                        <TR> 
                          <TD class=font-14 bgColor=#ff7800 height=21> <FONT style="MARGIN-TOP: 2px; MARGIN-LEFT: 10px" color=#ffffff><strong>基本资料</strong></FONT></TD>
                        </TR>
                        <TR> 
                          <TD bgColor=#e2e2e2 height=2></TD>
                        </TR>
                      </TBODY>
                    </TABLE>
                    <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
                      <tr bgcolor="#fff7f0"> 
                        <td width="17%" height="30" align="right"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 培训机构名称:</td>
                        <td height="30"> 
                          <input name="schoolname" type="text" id="schoolname" size="50" maxlength="50" style="width:200px;">
                        </td>
                      </tr>
                      <tr> 
                        <td height="30" align="right">机构类型:</td>
                        <td height="30">
<select name="properity" id="properity" style="width:120px;">
                            <option value="10">国有企业</option>
                            <option value="20">民营企业</option>
                            <option value="30">外商独资企业</option>
                            <option value="40">合资企业</option>
                            <option value="50">股份制企业</option>
                            <option value="60">集体企业</option>
                            <option value="70">事业单位</option>
                            <option value="80">社会团体</option>
                            <option value="90">行政机关</option>
                            <option value="100">其他类别</option>
                            <option value="110">高等院校</option>
                          </select></td>
                      </tr>
                      <tr> 
                        <td height="30" align="right" bgcolor="#fff7f0"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 成立年份:</td>
                        <td height="30" bgcolor="#fff7f0"> <input name="set_year" type="text" size="4" maxlength="4">
                          年</td>
                      </tr>
                      <tr> 
                        <td height="30" align="right"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 现有资产:</td>
                        <td height="30"> <input name="reg_currency" type="text" size="25" maxlength="25" style="width:100px;">
                          万元 
                          <select name="currencytype" id="currencytype" style="width:80px;">
                            <option value="1">人民币</option>
                            <option value="2">美元</option>
                            <option value="3">欧元</option>
                            <option value="4">英镑</option>
                            <option value="5">港币</option>
                            <option value="6">台币</option>
                          </select> </td>
                      </tr>
                      <tr> 
                        <td height="30" align="right" bgcolor="#fff7f0"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 教职工人数:</td>
                        <td height="30" bgcolor="#fff7f0"> <select name="workers" id="workers" style="width:100px;">
                            <OPTION value=9>10人以下</OPTION>
                            <OPTION value=49>10~50人</OPTION>
                            <OPTION value=199>50~200人</OPTION>
                            <OPTION value=499>200~500人</OPTION>
                            <OPTION value=999>500~1000人</OPTION>
                            <OPTION value=1000>1000人以上</OPTION>
                          </select></td>
                      </tr>
                      <tr> 
                        <td height="30" align="right"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 所在地区:</td>
                        <td height="30"> <!--#include file="../Include/Class_Locus.asp" --> </td>
                      </tr>
                      <tr> 
                        <td height="30" align="right" bgcolor="#fff7f0"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 培训机构简介:</td>
                        <td height="30" bgcolor="#fff7f0"> 
                          <table width="99%" border="0" cellspacing="0" cellpadding="0">
                            <tr> 
                              <td width="70%"><textarea name="school_memo" cols="50" rows="8" id="school_memo"></textarea></td>
                              <td>&nbsp;</td>
                            </tr>
                          </table></td>
                      </tr>
                    </table>
                    <TABLE cellSpacing=0 cellPadding=0 width=99% align=center 
            border=0>
                      <TBODY>
                        <TR> 
                          <TD class=font-14 height=3></TD>
                        </TR>
                        <TR> 
                          <TD class=font-14 bgColor=#ff7800 height=21> <FONT style="MARGIN-TOP: 2px; MARGIN-LEFT: 10px" color=#ffffff><strong>联系方式</strong></FONT></TD>
                        </TR>
                        <TR> 
                          <TD bgColor=#e2e2e2 height=2></TD>
                        </TR>
                      </TBODY>
                    </TABLE>
                    <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
                      <tr> 
                        <td width="17%" height="30" align="right"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 联系人:</td>
                        <td height="30"> <input name="contactperson" type="text" size="30" maxlength="30" style="width:120px;"> 
                          <font color="#50463d">请输入正确联系人,以方便可以及时联系,如:王小姐或张先生</font></td>
                      </tr>
                      <tr> 
                        <td width="17%" height="30" align="right" bgcolor="#fff7f0"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 联系电话:</td>
                        <td height="30" bgcolor="#fff7f0"><input name="phone" type="text" id="phone" style="width:120px;" size="30" maxlength="30"> 
                          <font color="#50463d"> [固定电话号码,如:010-82615888] </font> 
                        </td>
                      </tr>
                      <tr> 
                        <td height="30" align="right">传真号码:</td>
                        <td height="30"><input name="fax" type="text" id="fax" style="width:120px;" size="30" maxlength="30"> 
                        </td>
                      </tr>
                      <tr> 
                        <td height="30" align="right" bgcolor="#fff7f0"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 电子邮件:</td>
                        <td height="30" bgcolor="#fff7f0"> <input name="email" type="text" id="email"  style="width:200px;" value="<%= Email %>" size="50"> 
                        </td>
                      </tr>
                      <tr> 
                        <td height="30" align="right">网站地址:</td>
                        <td height="30"> <input name="webhome" type="text" size="50" style="width:200px;" value="http://"></td>
                      </tr>
                      <tr> 
                        <td height="30" align="right" bgcolor="#fff7f0"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 邮政编码:</td>
                        <td height="30" bgcolor="#fff7f0"> <input name="zipcode" type="text" size="6" maxlength="6" style="width:120px;"> 
                        </td>
                      </tr>
                      <tr> 
                        <td height="30" align="right"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 通讯地址:</td>
                        <td height="30"> <input name="address" type="text" size="100" style="width:260px;">
                          如:北京市海淀区成府路××号 </td>
                      </tr>
                    </table></td>
                </tr>
              </table></td>
          </tr>
          <tr> 
            <td height="40" align="center"> 
              <input type="submit" name="Submit" value=" 添 加 " style="height:30px;"> 
            </td>
          </tr>
        </form>
      </table></td>
</tr>
</table>
</body>
</html>
<% 
Sub Submit() '保存企业基本数据

Randomize timer
Znum = Cint(8999*Rnd+1000)
Schid = Cls_WebKey&gen_key(10)&Znum  '//会员ID

LastIp = Request.Servervariables("Remote_Addr")
Email  = Replace_Text(Request.Form("email"))

Set Rs = Server.createobject("ADODB.recordset")
Rs.open "Select Email,Schid From [pH_Educate_Base] Where  Email='"&Email&"' or Schid='"&Schid&"'",conn,1,1
if not rs.eof or not rs.bof then
	if  rs("Schid")=Schid then
        CloseRs
        CloseDb
		response.write "<script >alert('"&Cls_WebName&" 提示:\n\n对不起,你的帐号已经使用了,请重新选择帐号并继续注册...');history.back(-1);</script>"
		response.end
    end if
    if rs("Email") = Email then
        CloseRs
        CloseDb
		response.write "<script >alert('"&Cls_WebName&" 提示:\n\n对不起,系统中有同名的邮箱,请重新选择邮箱并继续注册...');history.back(-1);</script>"
	  response.end
    end if

end if 


'//提交数据
SchoolName                 = Replace_Text(Request.Form("SchoolName"))
Properity                  = Replace_Text(Request.Form("Properity"))
Set_Year                   = Replace_Text(Request.Form("Set_Year"))
Reg_Currency               = Replace_Text(Request.Form("Reg_Currency"))
CurrencyType               = Replace_Text(Request.Form("CurrencyType"))
Workers                    = Replace_Text(Request.Form("Workers"))
School_Memo                = Replace_Text(Request.Form("School_Memo"))
ContactPerson              = Replace_Text(Request.Form("ContactPerson"))
Phone                      = Replace_Text(Request.Form("Phone"))
Fax                        = Replace_Text(Request.Form("Fax"))
Locus_Area                 = Replace_Text(Request.Form("x_suozaidi"))
Locus_City                 = Replace_Text(Request.Form("x_suozaidi1"))
Address                    = Replace_Text(Request.Form("Address"))
ZipCode                    = Replace_Text(Request.Form("ZipCode"))
WebHome                    = Replace_Text(Request.Form("WebHome"))


If School_Memo <> "" Then School_Memo = Replace(School_Memo,Chr(13),"<br>")

SQL = "Insert Into [pH_Educate_Base] (Schid,SchoolName,Properity,Set_Year,Reg_Currency,CurrencyType,Workers,School_Memo,ContactPerson,Phone,Fax,WebHome,ZipCode,Email,Address,Locus_Area,Locus_City,RegDate,LastIp,LastDate,LastUpdate_Time,LoginCount,VipFlag,ViewClicks,Websub) Values ('"&Schid&"','"&SchoolName&"',"&Properity&","&Set_Year&","&Reg_Currency&","&CurrencyType&","&Workers&",'"&School_Memo&"','"&ContactPerson&"','"&Phone&"','"&Fax&"','"&WebHome&"','"&ZipCode&"','"&Email&"','"&Address&"','"&Locus_Area&"','"&Locus_City&"','"&Now()&"','"&LastIp&"','"&Now()&"','"&Now()&"',0,2,0,'www')"
'SQL = "Insert Into [pH_Educate_Base] (Properity) Values ("&Properity&")"
Conn.Execute(SQL)


 Response.Write "<script>alert('操作完成');location.href='Web_Educate_All.asp';</script>"
 Response.End()
End Sub


'//关闭数据库连接
CloseDB

 %>

⌨️ 快捷键说明

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