<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312" />
<TITLE>首页幻灯效果设置</TITLE>
<link rel="stylesheet" href="Images/Admin.css">
<script language="javascript" src="../Script/Admin.js"></script>
<style type="text/css">
<!--
.STYLE1 {color: #2f2f2f}
.STYLE2 {color: #FF0000}
-->
</style>
</HEAD>
<!--#include file="../Include/Const.asp" -->
<!--#include file="../Include/ConnSiteData.asp" -->

<!--#include file="CheckAdmin.asp"-->
<%
if Instr(session("AdminPurview"),"|36,")=0 then 
  response.write ("<font color='red')>你不具有该管理模块的操作权限，请返回！</font>")
  response.end
end if
'========判断是否具有管理权限
%>
<body>
<%
select case request.QueryString("Action")
  case "ModifyPass"
    SaveNewPass
  case else
end select
%>
<br>
<table class="tableborder" width="95%" border="0" align="center" cellpadding="3" cellspacing="1">
  <tr>
    <th><strong><span class="STYLE1">首页幻灯效果设置</span></font><span style="color: #2f2f2f"> (<span class="STYLE2">推荐图片最佳尺寸为 983*200 像素 使用.jpg格式图片</span>)</span></strong></th>
  </tr>
  <tr>
    <td height="24" align="center" nowrap="nowrap"  class="forumrow"><table width="560" height="240" border="0" align="left" cellpadding="2" cellspacing="1" bgcolor="#ffffff" class="tableborder">
      <%set rs=server.createobject("adodb.recordset")
  rs.open "select * from liangjing_Flash",conn,1,3
  %>
      <form method="POST" action="editnewflash.asp" name="myform">
        <tr>
          <td height="25" align="center" bgcolor="#EFF7FF">幻灯图片地址1：
            <input class="smallInput" name="pic1" size="60" value="<%=rs("pic1")%>"></td>
        </tr>
        <tr bgcolor="#EFF7FF">
          <td><div align="center">
              <iframe style="top:2px" ID="UploadFiles" src="upload_Photo.asp?PhotoUrlID=7" frameborder=0 scrolling=no width="475" height="21"></iframe>
          </div></td>
        </tr>
        <tr>
          <td height="25" align="center" bgcolor="#EFF7FF">中文简要说明1：
            <input class="smallInput" name="movie1" size="60" value="<%=rs("movie1")%>"></td>
        </tr>
        <tr>
          <td height="25" align="center" bgcolor="#EFF7FF"><p>英文简要说明1：
            <input class="smallInput" name="movie11" size="60" value="<%=rs("movie11")%>">
          </p></td>
        </tr>
        <tr>
          <td height="25" align="center" bgcolor="#EFF7FF">幻灯图片地址2：
            <input class="smallInput" name="pic2" size="60" value="<%=rs("pic2")%>"></td>
        </tr>
        <tr>
          <td bgcolor="#EFF7FF"><div align="center">
              <iframe style="top:2px" ID="UploadFiles" src="upload_Photo.asp?PhotoUrlID=8" frameborder=0 scrolling=no width="475" height="21"></iframe>
          </div></td>
        </tr>
        <tr>
          <td height="25" align="center" bgcolor="#EFF7FF">中文简要说明2：
            <input class="smallInput" name="movie2" size="60" value="<%=rs("movie2")%>"></td>
        </tr>
        <tr>
          <td height="25" align="center" bgcolor="#EFF7FF">英文简要说明2：
            <input class="smallInput" name="movie22" size="60" value="<%=rs("movie22")%>"></td>
        </tr>
        <tr>
          <td height="25" align="center" bgcolor="#EFF7FF">幻灯图片地址3：
            <input class="smallInput" name="pic3" size="60" value="<%=rs("pic3")%>"></td>
        </tr>
        <tr>
          <td bgcolor="#EFF7FF"><div align="center">
              <iframe style="top:2px" ID="UploadFiles" src="upload_Photo.asp?PhotoUrlID=9" frameborder=0 scrolling=no width="475" height="21"></iframe>
          </div></td>
        </tr>
        <tr>
          <td height="25" align="center" bgcolor="#EFF7FF">中文简要说明3：
            <input class="smallInput" name="movie3" size="60" value="<%=rs("movie3")%>"></td>
        </tr>
        <tr>
          <td height="25" align="center" bgcolor="#EFF7FF">英文简要说明3：
            <input class="smallInput" name="movie33" size="60" value="<%=rs("movie33")%>"></td>
        </tr>
       
        <tr>
          <td bgcolor="#EFF7FF"></td>
        </tr>
        <tr>
          <td height="15" colspan="2" align="center" bgcolor="#EFF7FF"><input type="submit" value=" 修 改 " name="cmdok" class="buttonface">
              <input type="reset" value=" 重 写 " name="cmdcancel" class="buttonface"></td>
        </tr>
      </form>
      <%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
    </table></td>
  </tr>
</table>
<br>
<table class="tableborder" width="95%" border="0" align="center" cellpadding="3" cellspacing="1">

</table>
</body>
</html> 

<%
function SaveNewPass()
  dim LoginName,rs,sql 
  LoginName=request.QueryString("LoginName")
  set rs = server.createobject("adodb.recordset")
  sql="select * from wygkcndiv_Admin where AdminName='"&LoginName&"'"
  rs.open sql,conn,1,3
  if rs.bof and rs.eof then
    response.write "读取数据库记录出错！"
    response.end
  else
	if len(trim(Request.Form("NewPassword")))<6 or len(trim(Request.Form("NewPassword")))>20  then
      response.write "<script language=javascript> alert('管理员密码必填，且字符数为6-20位！');history.back(-1);</script>"
      response.end
    end if
	if Request.Form("NewPassword")<>Request.Form("vNewPassword") then 
      response.write "<script language=javascript> alert('两次输入的密码不一样！');history.back(-1);</script>"
      response.end
	end if
	rs("Password")=Md5(Request.Form("NewPassword"))  
    rs.update
    rs.close
    set rs=nothing 
  end if
  response.write "你的管理密码已成功修改，请牢记[&nbsp;<font color='red'>"&trim(Request.Form("NewPassword"))&"</font>&nbsp;]！"
  response.end
end function
%>
