<!--#include file="conn/conn_index.asp"-->
<!--#include file="inc/char.asp"-->
<!--#include file="inc/setup.asp"-->
<!--#include file="inc/sql.asp"-->
<%
	end if
	action=ReplaceBadChar(Trim(Request("action")))
	if action="save" then
		tid=ReplaceBadChar(Trim(Request.Form("tid")))
		sid=ReplaceBadChar(Trim(Request.Form("id")))
		ttype1=ReplaceBadChar(Trim(Request.Form("signup_mode")))
		if ttype1=1 then
			ttype=0
		else
			ttype1=1
		end if
		tname=ReplaceBadChar(Trim(Request.Form("compellation")))
		phone=ReplaceBadChar(Trim(Request.Form("phone")))
		email=ReplaceBadChar(Trim(Request.Form("email")))
		address=ReplaceBadChar(Trim(Request.Form("address")))
		code=ReplaceBadChar(Trim(Request.Form("postcode")))
		notice=ReplaceBadChar(Trim(Request.Form("content")))
		
		set rs=server.createobject("adodb.recordset")
		sql="select * from train_join" 
		rs.open sql,conn,2,3
		rs.addnew
		rs("tid")=tid
		rs("sid")=sid
		rs("ttype")=ttype
		rs("tname")=tname
		rs("phone")=phone
		rs("email")=email
		rs("address")=address
		rs("code")=code
		rs("notice")=notice
		rs("stime")=now()
		rs("zhuangtai")=0
		rs.update
		response.write"<SCRIPT language=JavaScript>alert('提交成功，感谢您的支持');"
		response.write"javascript:history.go(-1)</SCRIPT>"
		response.end
		rs.close
		set rs=nothing
	end if
	id=int(ReplaceBadChar(Trim(Request.QueryString("id"))))
%>
<body topmargin="0" leftmargin="0" oncontextmenu=self.event.returnValue=false>
<link href="images/train/train.css" rel="stylesheet" type="text/css">
<table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#AFAFAF">
      <tr>
        <td bgcolor="#FFFFFF">
		<table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td height="26"><img src="images/train/train_bit.gif" width="5" height="15" align="absmiddle"> 该校所有培训信息 </td>
          </tr>
          <tr>
            <td height="1" background="images/train/xuxian.gif"><img src="images/train/space.gif" width="1" height="1"></td>
          </tr>
          <tr>
            <td>
			<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<%
	set rs=server.createobject("adodb.recordset")
	sql1="select * from train_subject where tid="&id&" and zhuangtai=1 and hidesubject=0"
	rs.open sql1,conn,1,1
	if rs.eof then
		Response.Write("暂时还没有此机构的培训课程信息")
	else
		do while not rs.eof
%>	
              <tr>
                <td height="23"><font color="#FF0000">·</font><font color="#FF0000"><a href="html/train/<%= id %>/<%= rs("id") %>.html" target="_blank"><%= rs("tsname") %></a></font> </td>
              </tr>
<%
		rs.movenext
		loop
	end if
	rs.close
	set rs=nothing
	conn.close
	set conn=nothing
%>
            </table>
			</td>
          </tr>
          <tr>
            <td height="1" background="images/train/xuxian.gif"><img src="images/train/space.gif" width="1" height="1"></td>
          </tr>
        </table></td>
      </tr>
    </table>
</body>
</HTML>
