<!--#include file="conn.asp"-->
<!--#include file="check.asp"-->
<!--#include file="train_info.asp"-->
<!--#include file="../inc/char.asp"-->
<!--#include file="../inc/md5.asp"-->
<!--#include file="../inc/setup.asp"-->
<!--#include file="../inc/sql.asp"-->
<%
	End If
	action=ReplaceBadChar(Trim(Request.QueryString("action")))
	if action="pwd" then
		tname=ReplaceBadChar(Request.Cookies("admin_train_name"))
		
		old=Trim(Request.Form("old"))
		old_pwd=mistake(old)
		
		new1=Trim(Request.Form("new1"))
		pwd=mistake(new1)
			
		Set rs = Server.CreateObject("ADODB.Recordset")
		sql="select * from train where tname='"&tname&"' and pwd='"&old_pwd&"'"
		rs.open sql,conn,2,3
		if not rs.eof then
			rs("pwd")=pwd
			rs.update
		else
			response.write"<SCRIPT language=JavaScript>alert('旧密码错误');"
			response.write"javascript:history.go(-1)</SCRIPT>"
			response.end
		end if
		email=rs("email")
		rs.close
		set rs=nothing
		
			
		Set rs = Server.CreateObject("ADODB.Recordset")
		sql="select * from sendmail"
		rs.open sql,conn,1,1
		if rs("open1")=0 then
			mailaddress=rs("mailaddress")
			mailusername=rs("mailusername")
			mailuserpass=rs("mailuserpass")
			mailname=rs("mailname")
			mailsend=rs("mailsend")
		
		
			'发送邮件
			'if Forum_Setting(47)=1 then
			On Error Resume Next
			'发送注册邮件
			topic="["&homename&"]信息：您在"&homename&"的修改密码的资料"
			
			mailbody="<html>"
			mailbody=mailbody & "<title>用户信息</title>"
			mailbody=mailbody & "<body>"
			mailbody=mailbody & "<TABLE border=0 width='95%' align=center><TBODY><TR>"
			mailbody=mailbody & "<TD valign=middle align=top>"
			mailbody=mailbody & ""&Request.Cookies("admin_train_name")&"，您好：<br><br>"
			mailbody=mailbody & "您在"&homename&"注册的帐号信息发生改变，下面是你最新的帐号信息！<br>"
			mailbody=mailbody & "下面是您在"&homename&"的注册信息：<br><br>"
			mailbody=mailbody & "注册名："&Request.Cookies("admin_train_name")&"<br>"
			mailbody=mailbody & "密  码："&Trim(Request.Form("new1"))&"<br>"
			mailbody=mailbody & "网站地址：<a href='"&homeurl&"' target='_blank'>"&homeurl&"</a><br><br>"
			mailbody=mailbody & ""&rs("mailtext")&"<br><br><br>"
			mailbody=mailbody & "<center><font color=red>再次感谢您注册"&homename&"</font>"
			mailbody=mailbody & "</TD></TR></TBODY></TABLE><br><hr width=95% size=1>"
			mailbody=mailbody & "</body>"
			mailbody=mailbody & "</html>"
			rs.close
			
			Set JMail=Server.CreateObject("JMail.Message")
			JMail.Charset="gb2312"
			JMail.ContentType = "text/html"
			jmail.from = mailsend
			jmail.silent = true
			jmail.Logging = true
			jmail.FromName = mailname
			jmail.mailserverusername = mailusername
			jmail.mailserverpassword = mailuserpass
			jmail.AddRecipient email
			jmail.body=mailbody
			JMail.Subject=topic
			if not jmail.Send ( mailaddress ) then
				SendMail=""
			else
				SendMail="OK"
			end if
			if SendMail="OK" then
				sendmsg="<p>· 您的注册信息已经发往您的邮箱，请注意查收!</p>"
			else
				sendmsg="<p>· 系统出错，注册信息资料未能发送到您的邮箱!</p>"
			end if
			'response.write mailbody
			'end if
		else
			rs.close
		end if
		
		response.write"<SCRIPT language=JavaScript>alert('您的操作已经完成，现在为您返回');"
		response.write"this.location.href='index.asp';</SCRIPT>"
		response.end
		
		conn.close
		set conn=nothing
	end if
	
	if action="answer" then
		tname=ReplaceBadChar(Request.Cookies("admin_train_name"))
		
		question=ReplaceBadChar(Trim(Request.Form("question")))
		answer1=ReplaceBadChar(Trim(Request.Form("answer1")))
		
			
		Set rs = Server.CreateObject("ADODB.Recordset")
		sql="select * from train where tname='"&tname&"'"
		rs.open sql,conn,2,3
		if not rs.eof then
			rs("question")=question
			rs("answer")=answer1
			rs.update
		else
			response.write"<SCRIPT language=JavaScript>alert('旧密码错误');"
			response.write"javascript:history.go(-1)</SCRIPT>"
			response.end
		end if
		email=rs("email")
		rs.close
		set rs=nothing
		
		Set rs = Server.CreateObject("ADODB.Recordset")
		sql="select * from sendmail"
		rs.open sql,conn,1,1
		if rs("open1")=0 then
			mailaddress=rs("mailaddress")
			mailusername=rs("mailusername")
			mailuserpass=rs("mailuserpass")
			mailname=rs("mailname")
			mailsend=rs("mailsend")
		
		
			'发送邮件
			'if Forum_Setting(47)=1 then
			On Error Resume Next
			'发送注册邮件
			topic="您在"&homename&"的修改密码保护问题的资料"
			
			mailbody="<html>"
			mailbody=mailbody & "<title>用户信息</title>"
			mailbody=mailbody & "<body>"
			mailbody=mailbody & "<TABLE border=0 width='95%' align=center><TBODY><TR>"
			mailbody=mailbody & "<TD valign=middle align=top>"
			mailbody=mailbody & ""&Request.Cookies("admin_train_name")&"，您好：<br><br>"
			mailbody=mailbody & "您在"&homename&"注册的帐号信息发生改变，下面是你最新的帐号信息！<br>"
			mailbody=mailbody & "下面是您在"&homename&"的注册信息：<br><br>"
			mailbody=mailbody & "注册名："&Request.Cookies("admin_train_name")&"<br>"
			mailbody=mailbody & "密码保护问题："&question&"<br>"
			mailbody=mailbody & "密码保护答案："&answer1&"<br>"
			mailbody=mailbody & "网站地址：<a href='"&homeurl&"' target='_blank'>"&homeurl&"</a><br><br>"
			mailbody=mailbody & ""&rs("mailtext")&"<br><br><br>"
			mailbody=mailbody & "<center><font color=red>再次感谢您注册"&homename&"</font>"
			mailbody=mailbody & "</TD></TR></TBODY></TABLE><br><hr width=95% size=1>"
			mailbody=mailbody & "</body>"
			mailbody=mailbody & "</html>"
			
			rs.close
			
			Set JMail=Server.CreateObject("JMail.Message")
			JMail.Charset="gb2312"
			JMail.ContentType = "text/html"
			jmail.from = mailsend
			jmail.silent = true
			jmail.Logging = true
			jmail.FromName = mailname
			jmail.mailserverusername = mailusername
			jmail.mailserverpassword = mailuserpass
			jmail.AddRecipient email
			jmail.body=mailbody
			JMail.Subject=topic
			if not jmail.Send ( mailaddress ) then
				SendMail=""
			else
				SendMail="OK"
			end if
			if SendMail="OK" then
				sendmsg="<p>· 您的注册信息已经发往您的邮箱，请注意查收!</p>"
			else
				sendmsg="<p>· 系统出错，注册信息资料未能发送到您的邮箱!</p>"
			end if
			'response.write mailbody
			'end if
		else
			rs.close
		end if
		response.write"<SCRIPT language=JavaScript>alert('您的操作已经完成，现在为您返回');"
		response.write"this.location.href='index.asp';</SCRIPT>"
		response.end
		conn.close
		set conn=nothing
	end if
	
	if action="changename" then
		tname=ReplaceBadChar(Request.Cookies("admin_train_name"))
		
		newname=ReplaceBadChar(Trim(Request.Form("newname")))
		newname1=ReplaceBadChar(Trim(Request.Form("newname1")))
		if newname<>newname1 then
			response.write"<SCRIPT language=JavaScript>alert('您两次输入的用户名不相同，请确认后重来');"
			response.write"javascript:history.go(-1)</SCRIPT>"
			response.end
		end if
		Set rs = Server.CreateObject("ADODB.Recordset")
		sql="select * from train where tname='"&tname&"'"
		rs.open sql,conn,2,3
		if rs.eof then
			response.write"<SCRIPT language=JavaScript>alert('非法操作');"
			response.write"this.location.href='login.asp';</SCRIPT>"
			response.end
		else
			Set rs1 = Server.CreateObject("ADODB.Recordset")
			sql1="select * from train where tname='"&newname&"'"
			rs1.open sql1,conn,1,1
			if not rs1.eof then
				response.write"<SCRIPT language=JavaScript>alert('该用户名已存在，请重来');"
				response.write"javascript:history.go(-1)</SCRIPT>"
				response.end
			else
				rs("tname")=newname
				rs.update
			end if
			rs1.close
			set rs1=nothing
		end if
		email=rs("email")
		rs.close
		set rs=nothing
		
		Response.Cookies("admin_train_name")=newname
		Response.Cookies("admin_train_name").expires=(now()+1/24)
		
		Set rs = Server.CreateObject("ADODB.Recordset")
		sql="select * from sendmail"
		rs.open sql,conn,1,1
		if rs("open1")=0 then
			mailaddress=rs("mailaddress")
			mailusername=rs("mailusername")
			mailuserpass=rs("mailuserpass")
			mailname=rs("mailname")
			mailsend=rs("mailsend")
		
		
			'发送邮件
			'if Forum_Setting(47)=1 then
			On Error Resume Next
			'发送注册邮件
			topic="您在"&homename&"的修改密码保护问题的资料"
			
			mailbody="<html>"
			mailbody=mailbody & "<title>用户信息</title>"
			mailbody=mailbody & "<body>"
			mailbody=mailbody & "<TABLE border=0 width='95%' align=center><TBODY><TR>"
			mailbody=mailbody & "<TD valign=middle align=top>"
			mailbody=mailbody & ""&Request.Cookies("admin_train_name")&"，您好：<br><br>"
			mailbody=mailbody & "您在"&homename&"注册的帐号信息发生改变，下面是你最新的帐号信息！<br>"
			mailbody=mailbody & "下面是您在"&homename&"的帐号信息：<br><br>"
			mailbody=mailbody & "注册名："&Request.Cookies("admin_train_name")&"<br>"
			mailbody=mailbody & "网站地址：<a href='"&homeurl&"' target='_blank'>"&homeurl&"</a><br><br>"
			mailbody=mailbody & ""&rs("mailtext")&"<br><br><br>"
			mailbody=mailbody & "<center><font color=red>再次感谢您注册"&homename&"</font>"
			mailbody=mailbody & "</TD></TR></TBODY></TABLE><br><hr width=95% size=1>"
			mailbody=mailbody & "</body>"
			mailbody=mailbody & "</html>"
			
			rs.close
			
			Set JMail=Server.CreateObject("JMail.Message")
			JMail.Charset="gb2312"
			JMail.ContentType = "text/html"
			jmail.from = mailsend
			jmail.silent = true
			jmail.Logging = true
			jmail.FromName = mailname
			jmail.mailserverusername = mailusername
			jmail.mailserverpassword = mailuserpass
			jmail.AddRecipient email
			jmail.body=mailbody
			JMail.Subject=topic
			if not jmail.Send ( mailaddress ) then
				SendMail=""
			else
				SendMail="OK"
			end if
			if SendMail="OK" then
				sendmsg="<p>· 您的注册信息已经发往您的邮箱，请注意查收!</p>"
			else
				sendmsg="<p>· 系统出错，注册信息资料未能发送到您的邮箱!</p>"
			end if
			'response.write mailbody
			'end if
		else
			rs.close
		end if
		response.write"<SCRIPT language=JavaScript>alert('您的操作已经完成，现在为您返回');"
		response.write"this.location.href='index.asp';</SCRIPT>"
		response.end
		conn.close
		set conn=nothing
	end if
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title><%=homename%>--机构管理中心首页</title>
<link href="images/Style_company.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript">
    <!--
    var Browser_isIE = window.ActiveXObject ? true : false;
    var GpArray = new Array("index.asp","manage.asp", "pwd.asp", "publish_new.asp", "whkc.asp", "sign.asp?type=ask", "sign.asp?type=join", "tmoney.asp", "mail_box.asp", "../html/train/<%=Request.Cookies("admin_train_id")%>/","pay_list.asp","Card_list.asp", "login_out.asp");
    function MO_0(obj)
    {
        obj.className = "menu_td2";
    }
    
    function MU_0(obj)
    {
        obj.className = "menu_td";
    }
    function Gp(pIndex)
    {
        location.href = GpArray[pIndex];
    }
    function Gout()
    {
        if(confirm("提示：确定要退出系统？")){ location.href = "login_out.asp";}
    }
function check()
{
   if(checkspace(document.userinfo.old.value)) {
	document.userinfo.old.focus();
    alert("对不起，请填写原密码！");
	return false;
  }
   if(checkspace(document.userinfo.new1.value)) {
	document.userinfo.new1.focus();
    alert("对不起，请填写新密码！");
	return false;
  }
   if(checkspace(document.userinfo.new2.value)) {
	document.userinfo.new2.focus();
    alert("对不起，请填写确认密码！");
	return false;
  }
  if(document.userinfo.new1.value != document.userinfo.new2.value) {
	document.userinfo.new2.focus();
	document.userinfo.new1.value = '';
	document.userinfo.new2.value = '';
    alert("两次输入的新密码不同，请重新输入！");
	return false;
  }
}
function checkspace(checkstr) {
  var str = '';
  for(i = 0; i < checkstr.length; i++) {
    str = str + ' ';
  }
  return (str == checkstr);
}
function checkuser()
{
   if(checkspace(document.changeanswer.question.value)) {
	document.changeanswer.question.focus();
    alert("对不起，请填写密码提问！");
	return false;
  }
   if(checkspace(document.changeanswer.answer1.value)) {
	document.changeanswer.answer1.focus();
    alert("对不起，请填写新的密码提示问题的答案！");
	return false;
  }
   if(checkspace(document.changeanswer.answer2.value)) {
	document.changeanswer.answer2.focus();
    alert("对不起，请再次填写新的密码提示问题的答案！");
	return false;
  }
  if(document.changeanswer.answer1.value != document.changeanswer.answer2.value) {
	document.changeanswer.answer1.focus();
	document.changeanswer.answer1.value = '';
	document.changeanswer.answer2.value = '';
    alert("两次输入的答案不同，请重新输入！");
	return false;
  }
}
function checkname()
{
   if(checkspace(document.changename.newname.value)) {
	document.changename.newname.focus();
    alert("对不起，请填写新用户名！");
	return false;
  }
  if(document.changename.newname.value != document.changename.newname1.value) {
	document.changename.newname.focus();
	document.changename.newname.value = '';
	document.changename.newname1.value = '';
    alert("两次输入的新用户名不同，请重新输入！");
	return false;
  }
}
//-->
</script>
<style type="text/css">
    .menu_span {line-height:31px;padding:12px 5px 12px 48px; margin-left:15px;}
</style>
</head>
<body>
    <div id="body">
    <div id="top">
    <div class="top_logo"></div>
    <div class="top_gochat"><img src="images/c_chat.gif" /> <font id="KfChatState" color="white">您的帐号状态(<b><% If hideuser=0 Then Response.Write("公开") else Response.Write("隐藏")%></b>)</font><font color="white"> 审核状态(<b><% If zhuangtai=1 Then Response.Write("已审核") else Response.Write("未审核")%></b>)</font></div>
    <div class="top_userinfo">用户名：<u><%= Request.Cookies("admin_train_name") %></u>　　机构名称：<u><%= Request.Cookies("train_name") %></u>　　登陆次数：<%= dlnum %></div>
    <div class="img_logout"><input type="button" value="" class="btn_out" onclick="Gout()" title="退出" /></div>
    </div>
    <div id="main">
    <div id="left">
    <div id="left_menu" class="m_c">
    <div class="part_title">功 能 菜 单</div>
    <div style="width:100%;line-height:18px; margin-bottom:5px;">
    <table cellpadding="0" cellspacing="4" border="0" width="95%" style="text-align:left; margin:0 auto;">
    <tr>
        <td class="menu_td" onmouseover="MO_0(this)" onmouseout="MU_0(this)" onclick="Gp(0)">
            <span class="menu_span" style="background:url(images/c_menu_def_s.gif) 0px 6px no-repeat;">管理首页</span></td>
    </tr>
    <tr>
        <td class="menu_td" onmouseover="MO_0(this)" onmouseout="MU_0(this)" onclick="Gp(1)">
            <span class="menu_span" style="background:url(images/c_menu_0_s.gif) 0px 6px no-repeat;">基本设置</span></td>
    </tr>
    <tr>
        <td class="menu_td" onmouseover="MO_0(this)" onmouseout="MU_0(this)" onclick="Gp(2)">
            <span class="menu_span" style="background:url(images/c_menu_1_s.gif) 0px 6px no-repeat;color:#C33;">帐号维护</span></td>
    </tr>
    <tr>
        <td class="menu_td" onmouseover="MO_0(this)" onmouseout="MU_0(this)" onclick="Gp(3)">
        <span class="menu_span" style="background:url(images/c_menu_lw_s.gif) 0px 6px no-repeat;">发布课程</span></td>
    </tr>
    <tr>
        <td class="menu_td" onmouseover="MO_0(this)" onmouseout="MU_0(this)" onclick="Gp(4)">
        <span class="menu_span" style="background:url(images/c_menu_addr_s.gif) 0px 6px no-repeat;">课程管理</span></td>
    </tr>
    <tr>
        <td style="background-color:#F0F0F0;" height="1"></td>
    </tr>
    <tr>
        <td class="menu_td" onmouseover="MO_0(this)" onmouseout="MU_0(this)" onclick="Gp(5)">
            <span class="menu_span" style="background:url(images/c_menu_2_s.gif) 0px 6px no-repeat;">咨询列表</span></td>
    </tr>
    <tr>
        <td class="menu_td" onmouseover="MO_0(this)" onmouseout="MU_0(this)" onclick="Gp(6)">
            <span class="menu_span" style="background:url(images/c_menu_3_s.gif) 0px 6px no-repeat;">报名列表</span></td>
    </tr>
    <tr>
        <td class="menu_td" onmouseover="MO_0(this)" onmouseout="MU_0(this)" onclick="Gp(7)">
            <span class="menu_span" style="background:url(images/c_menu_4_s.gif) 0px 6px no-repeat;">帐户管理</span></td>
    </tr>
    <tr>
        <td class="menu_td" onmouseover="MO_0(this)" onmouseout="MU_0(this)" onclick="Gp(8)">
            <span class="menu_span" style="background:url(images/c_menu_5_s.gif) 0px 6px no-repeat;">站内信箱</span></td>
    </tr>
    <tr>
        <td class="menu_td" onmouseover="MO_0(this)" onmouseout="MU_0(this)" onclick="Gp(9)">
            <span class="menu_span" style="background:url(images/c_menu_style_s.gif) 0px 6px no-repeat;">机构预览</span></td>
    </tr>
    <tr>
        <td class="menu_td" onmouseover="MO_0(this)" onmouseout="MU_0(this)" onclick="Gp(10)">
            <span class="menu_span" style="background:url(images/new_1.jpg) 0px 6px no-repeat;">支付记录</span></td>
    </tr>
    <tr>
        <td class="menu_td" onmouseover="MO_0(this)" onmouseout="MU_0(this)" onclick="Gp(11)">
            <span class="menu_span" style="background:url(images/new_2.jpg) 0px 6px no-repeat;">购卡记录</span></td>
    </tr>
    <tr>
        <td class="menu_td" onmouseover="MO_0(this)" onmouseout="MU_0(this)" onclick="Gp(12)">
            <span class="menu_span" style="background:url(images/c_menu_6_s.gif) 0px 6px no-repeat;">退出系统</span></td>
    </tr>
    </table>
    </div>
    </div>
    <div style="margin-top:10px;">技术支持：<a href="http://www.wishcn.com" target="_blank" title="网愿科技">网愿科技</a></div>
    </div>
    <div id="right">
<div class="part_title">&nbsp; >> <%= Request.Cookies("admin_train_name") %> 欢迎进入-培训会员管理中心首页</div>
    <table cellpadding="3" cellspacing="0" border="1" rules="all" bordercolor="#6699cc" width="100%" class="tde">
      <thead>
        <tr class="tde_head">
          <td width="33%" height="23px" align="left">&nbsp;密码维护</td>
          <td width="33%" align="left">&nbsp;维护密码提示问题与答案</td>
		  <td width="34%" align="left">&nbsp;修改登陆用户名</td>
        </tr>
      </thead>
      <tbody>
        <tr class="tde_head">
          <td height="153">
		  <form action="?action=pwd" method="post" name="userinfo" onsubmit="return check()">
		  <table width="100%" height="100%" border="0" cellpadding="5" bordercolor="#F9F9F9">
            <tr>
              <td width="34%" height="23" align="right">用 户 名:</td>
              <td width="66%"><%= Request.Cookies("admin_train_name") %></td>
              </tr>
            <tr>
              <td height="24" align="right">旧 密 码: </td>
              <td valign="middle"><input name="old" type="password" class="input" id="address2" size="20" /></td>
              </tr>

            <tr>
              <td height="25" align="right">新 密 码:</td>
              <td><input name="new1" type="password" class="input" id="address" size="20"></td>
            </tr>
            <tr>
              <td height="22" align="right">重复新密码:</td>
              <td><input name="new2" type="password" class="input" id="site" size="20" /></td>
              </tr>
            <tr>
              <td height="25" colspan="2" align="center">
                <input name="Submit" type="submit" class="INPUT_index" id="Submit" style="height:23px;width:70px;" value="修 改" />
&nbsp;                <input name="Reset" type="button" class="INPUT_index" id="Reset" style="FONT-SIZE: 12px; FONT-FAMILY: 宋体; HEIGHT: 23px;width:70px;" value="取 消" onClick="javascript:window.location.href='index.asp';"/></td>
              </tr>
          </table>
		  </form>
		  </td>
          <td><form action="?action=answer" method="post" name="changeanswer" onsubmit="return checkuser()">
              <table width="100%" height="100%" border="0" cellpadding="5" bordercolor="#F9F9F9">
                <tr>
                  <td width="39%" height="23" align="right">用&nbsp;&nbsp;户&nbsp;&nbsp;名:</td>
                  <td width="61%"><%= Request.Cookies("admin_train_name") %></td>
                </tr>
                <tr>
                  <td height="24" align="right">新提示问题:</td>
                  <td valign="middle"><input name="question" type="text" class="input" id="question" size="20" /></td>
                </tr>
                <tr>
                  <td height="25" align="right">问题的答案:</td>
                  <td><input name="answer1" type="text" class="input" id="answer1" size="20" /></td>
                </tr>
                <tr>
                  <td height="22" align="right">重复问题答案:</td>
                  <td><input name="answer2" type="text" class="input" id="answer2" size="20" /></td>
                </tr>
                <tr>
                  <td height="35" colspan="2" align="center"><input name="Submit" type="submit" class="INPUT_index" id="Submit2" style="height:23px;width:70px;" value=" 修  改 " />
                    &nbsp;
                    <input name="Reset2" type="button" class="INPUT_index" id="Reset2" style="FONT-SIZE: 12px; FONT-FAMILY: 宋体; HEIGHT: 23px;width:70px;" value="  取   消  " onclick="javascript:window.location.href='index.asp';"/></td>
                  </tr>
              </table>
          </form>
		  </td>
		  
		  <td><form action="?action=changename" method="post" name="changename" onsubmit="return checkname()">
              <table width="100%" height="100%" border="0" cellpadding="5" bordercolor="#F9F9F9">
                <tr>
                  <td width="37%" height="34" align="right">用&nbsp;&nbsp;户&nbsp;&nbsp;名:</td>
                  <td width="63%"><%= Request.Cookies("admin_train_name") %></td>
                </tr>
                <tr>
                  <td height="34" align="right">新&nbsp;用户&nbsp;名:</td>
                  <td valign="middle"><input name="newname" type="text" class="input" id="newname" size="20" /></td>
                </tr>
                <tr>
                  <td height="34" align="right">重复新用户名:</td>
                  <td><input name="newname1" type="text" class="input" id="newname1" size="20" /></td>
                </tr>
                <tr>
                  <td height="42" colspan="2" align="center"><input name="Submit" type="submit" class="INPUT_index" id="Submit2" style="height:23px;width:70px;" value="  修    改  " />
                    &nbsp;
                    <input name="Reset2" type="button" class="INPUT_index" id="Reset2" style="FONT-SIZE: 12px; FONT-FAMILY: 宋体; HEIGHT: 23px;width:70px;" value="  取   消  " onclick="javascript:window.location.href='index.asp';"/></td>
                  </tr>
              </table>
          </form></td>
        </tr>
      </tbody>
    </table>
	<br>
<script language="JavaScript">
<!--
function getFileExtension(filePath) { //v1.0
  fileName = ((filePath.indexOf('/') > -1) ? filePath.substring(filePath.lastIndexOf('/')+1,filePath.length) : filePath.substring(filePath.lastIndexOf('\\')+1,filePath.length));
  return fileName.substring(fileName.lastIndexOf('.')+1,fileName.length);
}
function checkFileUpload(form,extensions) { //v1.0
  document.MM_returnValue = true;
  if (extensions && extensions != '') {
    for (var i = 0; i<form.elements.length; i++) {
      field = form.elements[i];
      if (field.type.toUpperCase() != 'FILE') continue;
      if (field.value == '') {
        alert('文件框中必须保证已经有文件被选中!');
        document.MM_returnValue = false;field.focus();break;
      }
      if (extensions.toUpperCase().indexOf(getFileExtension(field.value).toUpperCase()) == -1) {
        alert('这种文件类型不允许上传!.\n只有以下类型的文件才被允许上传: ' + extensions + '.\n请选择别的文件并重新上传.');
        document.MM_returnValue = false;field.focus();break;
  } } }
}
//-->
</script>
    <table cellpadding="3" cellspacing="0" border="1" rules="all" bordercolor="#6699cc" width="100%" class="tde">
      <thead>
        <tr class="tde_head">
          <td align="left" height="23px">&nbsp;机构展示图片设置</td>
        </tr>
      </thead>
      <tbody>
        <tr class="tde_head">
          <td><table width="766" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td background="images/wishcn_per_bg.gif"><div align="center">
      <table width="95%" align="center" border="0" cellpadding="3" cellspacing="0">
        <tr>
          <td align="left" valign="top" class="p1"><span style="line-height:140%"><FONT color=#0000ff>如何使您的展示照片显示达到最佳效果？</FONT><BR>
1、将照片尺寸设置为<STRONG>260(宽)*2000(高)</STRONG>像素。（图片标准尺寸）<BR>
2、<FONT color=#333333>图片大小不能超过</FONT><STRONG>500</STRONG><FONT color=#333333>K</FONT>。
<br>
3、所传照片一律为JPG、JPEG、或GIF格式。如果您没有扫描仪，可以将照片邮寄给我们，我们免费为您服务。</span></td>
        </tr>
      </table>
      <table width="95%" border="0" align="center" cellpadding="4" cellspacing="0">
		<form name="form1" method="post" action="photosave.asp" enctype="multipart/form-data" onSubmit="checkFileUpload(this,'GIF,JPG,JPEG');return document.MM_returnValue">
          <tr>
            <td height="1"></td>
          </tr>
          <tr>
            <td height="40" align="center">上传机构展示照片：
               <INPUT type="file" class="f11" name="file1" size="23">
              
             <input type=submit name="submit" value="上　传" class=anniu >
            </td>
          </tr>

          <tr>
            <td align="center"><img src="../getphoto.asp?id=<%= Request.Cookies("admin_train_id") %>&folder=train" width="260" height="200" border="1" name="preview" id="preview"></td>
          </tr>
        </form>
        <tr>
          <td height="1" background="../images/point_h.gif"></td>
        </tr>
      </table>
    </div></td>
  </tr>

</table></td>
        </tr>
      </tbody>
    </table>
    </div>
    </div>
    </div>
</body>
</html>
