<!--#include file="../Include/Class_Conn.asp" -->
<!--#include file="../Include/Class_Main.asp" -->
<!--#include file="../Public/School_Cookies.asp" -->
<% 
Dim Schid,Username,Tmp
Dim Cmd,Rs,Action
Dim SchoolName,Properity,BannerFile,Set_Year,Reg_Currency,CurrencyType,Workers,School_Memo
Dim ContactPerson,Phone,Fax,WebHome,ZipCode,Email,Address,Locus_Area,Locus_City
Action = Request.QueryString("action")
If Action = "submit" Then Call Submit() '//调用保存数据的函数

'//获取会员登陆的标记
If Not IsArray(Session("School")) Then 
 Response.write "<script>alert('-登录后才能进行该操作！-');location.href='../Public/MemberLogin.asp';</script>"
Else
 Username  = Session("School")(0)
 Schid     = Session("School")(2)
End if

'//调用存储过程
Set Cmd = Server.CreateObject("ADODB.Command")
Cmd.ActiveConnection = Conn
Cmd.CommandText = "Sch_BasicInfo"
Cmd.CommandType = 4
Cmd.Parameters.Append Cmd.CreateParameter("@Schid",200,1,30)
Cmd.Parameters("@Schid") = Schid
Set Rs = Cmd.Execute
If Rs.Eof Then
 CloseRs
 Set Cmd = Nothing
 CloseDB
 Response.write "没有找到会员资料！"
 Response.End()
End if

Tmp = Rs.GetRows() '//将数据填充到数组

'//0院校名,1院校性质,2图片文件,3成立年份,4现有资产,5资金类型,6人员数目,7介绍,8联系人,9电话,10传真,11网站,12邮政编码,13邮件地址,14通信地址,15所在省份,16城市
'//如 Tmp(0,0) 表示院校名称
CloseRs
Set Cmd = Nothing

'//功能代码
SchoolName              = Tmp(0,0)
Properity               = Tmp(1,0)
BannerFile              = Tmp(2,0)
Set_Year                = Tmp(3,0)
Reg_Currency            = Tmp(4,0)
CurrencyType            = Tmp(5,0)
Workers                 = Tmp(6,0)
School_Memo             = Tmp(7,0)
ContactPerson           = Tmp(8,0)
Phone                   = Tmp(9,0)
Fax                     = Tmp(10,0)
WebHome                 = Tmp(11,0)
ZipCode                 = Tmp(12,0)
Email                   = Tmp(13,0)
Address                 = Tmp(14,0)
Locus_Area              = Tmp(15,0)
Locus_City              = Tmp(16,0)

If School_Memo <> "" Then School_Memo = Replace(School_Memo,"<br>",Chr(13))
SchoolType = Cls_SchoolType(Properity)
 %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="../Css/Style.css" type=text/css rel=stylesheet>
<title><%= Cls_WebName %> -- 院校会员管理中心 -- 基本信息</title>
</head>
<body>
<table width="950" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center" bgcolor="#FFFFFF">
      <!--#include file="../Header/School_User.asp" --> <table width="950" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
        <tr> 
          <td height="4"></td>
        </tr>
      </table>
      <table width="950" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
        <tr> 
          <td width="175" valign="top"> 
            <!--#include file="../Lefter/School_All.asp" -->
          </td>
          <td width="5">&nbsp;</td>
          <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td height="25"><img src="../Images/icon.gif" width="11" height="11" align="absmiddle"> 
                  <%= SchoolName %> [<%= SchoolType %>]</td>
              </tr>
            </table>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <form action="?action=submit" name="edit" method="post" onSubmit="return form_check();">
                <tr> 
                  <td><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="eeeeee">
                      <tr> 
                        <td bgcolor="#FFFFFF"><table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
                            <tr> 
                              <td height="2"></td>
                            </tr>
                          </table>
                          <table width="99%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="eeeeee">
                            <tr> 
                              <td height="25" bgcolor="f5f5f5"><b><font color="#000000">&nbsp;基本信息</font></b></td>
                            </tr>
                          </table>
                          <table width="99%" border="0" align="center" cellpadding="0" cellspacing="1">
                            <tr> 
                              <td width="18%" height="25" align="right"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 院校名称：</td>
                              <td height="25"><input name="schoolname" type="text" id="schoolname" size="50" maxlength="50" style="width:200px;" value="<%= Schoolname %>">
                                如：北京大学</td>
                            </tr>
                            <tr> 
                              <td width="18%" height="25" align="right" bgcolor="f9f9f9"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 成立年份：</td>
                              <td height="25" bgcolor="f9f9f9"><input name="set_year" type="text" size="4" maxlength="4" value="<%= Set_year %>">
                                年</td>
                            </tr>
                            <tr> 
                              <td height="25" align="right"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 现有资产：</td>
                              <td height="25"><input name="reg_currency" type="text" size="25" maxlength="25" style="width:100px;"  value="<%= Reg_currency %>">
                                万元 
                                <select name="currencytype" id="currencytype" style="width:80px;">
                                  <option value="1" <% If Currencytype = 1 Then Response.write "Selected" %>>人民币</option>
                                  <option value="2" <% If Currencytype = 2 Then Response.write "Selected" %>>美元</option>
                                  <option value="3" <% If Currencytype = 3 Then Response.write "Selected" %>>欧元</option>
                                  <option value="4" <% If Currencytype = 4 Then Response.write "Selected" %>>英镑</option>
                                  <option value="5" <% If Currencytype = 5 Then Response.write "Selected" %>>港币</option>
                                  <option value="6" <% If Currencytype = 6 Then Response.write "Selected" %>>台币</option>
                                </select></td>
                            </tr>
                            <tr> 
                              <td height="25" align="right" bgcolor="f9f9f9"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 教职工人数：</td>
                              <td height="25" bgcolor="f9f9f9"><select name="workers" id="workers" style="width:100px;">
                                  <OPTION value=9 <% If Workers = 9 Then Response.write "Selected" %>>10人以下</OPTION>
                                  <OPTION value=49 <% If Workers = 49 Then Response.write "Selected" %>>10～50人</OPTION>
                                  <OPTION value=199 <% If Workers = 199 Then Response.write "Selected" %>>50～200人</OPTION>
                                  <OPTION value=499 <% If Workers = 499 Then Response.write "Selected" %>>200～500人</OPTION>
                                  <OPTION value=999 <% If Workers = 999 Then Response.write "Selected" %>>500～1000人</OPTION>
                                  <OPTION value=1000 <% If Workers = 1000 Then Response.write "Selected" %>>1000人以上</OPTION>
                                </select></td>
                            </tr>
                            <tr> 
                              <td height="25" align="right"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 所在地区：</td>
                              <td height="25"><!--#include file="../Include/Class_Locus2.asp" --></td>
                            </tr>
                            <tr> 
                              <td height="25" align="right" bgcolor="f9f9f9"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 院校简介：</td>
                              <td height="25" bgcolor="f9f9f9"><table width="99%" border="0" cellspacing="0" cellpadding="0">
                                  <tr> 
                                    <td width="75%"> 
                                      <textarea name="school_memo" cols="45" rows="8" id="school_memo"><%= school_memo %></textarea></td>
                                    <td><font color="#50463d">最大字符数5000,请尽可能详细填写资料，以确保贵院校资料顺利通过本网审核！包括：院校基本资料+招生和就业情况等</font></td>
                                  </tr>
                                </table></td>
                            </tr>
                          </table>
                          <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
                            <tr> 
                              <td height="2"></td>
                            </tr>
                          </table>
                          <table width="99%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="eeeeee">
                            <tr> 
                              <td height="25" bgcolor="f5f5f5"><b><font color="#000000">&nbsp;联系方式</font></b></td>
                            </tr>
                          </table>
                          <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
                            <tr> 
                              <td width="18%" height="25" align="right"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 联系人：</td>
                              <td height="25"><input name="contactperson" type="text" size="30" maxlength="30" style="width:120px;" value="<%= Contactperson %>">
                                <font color="#50463d">请输入正确联系人，以方便可以及时联系</font></td>
                            </tr>
                            <tr> 
                              <td width="18%" height="25" align="right" bgcolor="f9f9f9"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 联系电话：</td>
                              <td height="25" bgcolor="f9f9f9"><input name="phone" type="text" id="phone" style="width:120px;" size="30" maxlength="30" value="<%= Phone %>"> 
                                <font color="#50463d"> [固定电话号码，如：010-82615888] 
                                </font></td>
                            </tr>
                            <tr> 
                              <td height="25" align="right">传真号码：</td>
                              <td height="25"><input name="fax" type="text" id="fax" style="width:120px;" size="30" maxlength="30" value="<%= Fax %>"></td>
                            </tr>
                            <tr> 
                              <td height="25" align="right" bgcolor="f9f9f9"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 电子邮件：</td>
                              <td height="25" bgcolor="f9f9f9"><input name="email" type="text" id="email"  style="width:200px;" value="<%= Email %>" size="50"></td>
                            </tr>
                            <tr> 
                              <td height="25" align="right">网站地址：</td>
                              <td height="25"><input name="webhome" type="text" size="50" style="width:200px;" value="<%= Webhome %>"></td>
                            </tr>
                            <tr> 
                              <td height="25" align="right" bgcolor="f9f9f9"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 邮政编码：</td>
                              <td height="25" bgcolor="f9f9f9"><input name="zipcode" type="text" size="6" maxlength="6" style="width:120px;"  value="<%= Zipcode %>"></td>
                            </tr>
                            <tr>
                              <td height="25" align="right"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 通讯地址：</td>
                              <td height="25"><input name="address" type="text" size="100" style="width:260px;" value="<%= Address %>">
                                如：北京市海淀区成府路××号 </td>
                            </tr>
                          </table>
                          <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
                            <tr> 
                              <td height="2"></td>
                            </tr>
                          </table></td>
                      </tr>
                    </table></td>
                </tr>
                <tr> 
                  <td height="40" align="center"> <input type="submit" name="Submit" value=" 保存信息 " style="height:35px;"> 
                  </td>
                </tr>
              </form>
            </table></td>
        </tr>
      </table> 
      </td>
  </tr>
</table>
<table width="950" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td align="center" bgcolor="#FFFFFF">
      <!--#include file="../Include/Footer.asp" -->
    </td>
  </tr>
</table>
</body>
</html>
<% 
Sub Submit() '保存企业基本数据
 Check_Url() '//跨站提交数据检测
 Schid                   = Session("School")(2)
 SchoolName              = Replace_Text(Request.Form("SchoolName"))
 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"))
 WebHome                 = Replace_Text(Request.Form("WebHome"))
 ZipCode                 = Replace_Text(Request.Form("ZipCode"))
 Email                   = Replace_Text(Request.Form("Email"))
 Address                 = Replace_Text(Request.Form("Address"))
 Locus_Area              = Replace_Text(Request.Form("x_suozaidi"))
 Locus_City              = Replace_Text(Request.Form("x_suozaidi1"))


 If School_Memo <> "" Then School_Memo = Replace(School_Memo,Chr(13),"<br>")
 
 SQL = "Update [pH_School_Base] Set SchoolName='"&SchoolName&"',Set_Year="&Set_Year&",Reg_Currency="&Reg_Currency&",CurrencyType="&CurrencyType&",Workers="&Workers&",School_Memo='"&School_Memo&"',ContactPerson='"&ContactPerson&"',Phone='"&Phone&"',Fax='"&Fax&"',WebHome='"&WebHome&"',ZipCode='"&ZipCode&"',Email='"&Email&"',Address='"&Address&"',Locus_Area='"&Locus_Area&"',Locus_City='"&Locus_City&"',LastUpdate_Time=getdate() Where Schid='"&Schid&"'"
 Conn.Execute(SQL)
 
 Response.redirect "Sch_BasicInfo.asp"
End Sub


'//关闭数据库连接
CloseDB
 %>
