<!-- #include file="include/onlogin.asp" -->
<!-- #include file="include/conn.asp" -->
<link rel=stylesheet href='images/csk3000.css' type=text/css><script langiage=javascript src='style/mouse_on_title.js'></script>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta copy="CSK3000..电.影.系.统">
<title></title>
<style>
td{font-size:9pt;line-height:140%} 
</style>
</head>

<body topmargin="1" leftmargin="1" background="../images/bg.gif">
<%tit="<a href='admin_video.asp?action='>影片列表</a>&nbsp;┋&nbsp;" & _
    "<a href='admin_video.asp?action=addsever'>添加影片</a>&nbsp;┋&nbsp;" & _
    "<a href='admin_video.asp?action=addserv'>添加服务器</a>&nbsp;┋&nbsp;<a href='admin_vsort.asp'>影片分类</a>｜<A href=admin_video_error.asp>错误电影</A>｜<a href=admin_video_move.asp>批量转移</a>｜<a href=admin_video_url.asp>批量转换</a>"
response.write header(18,tit)
  titt="电影数据库批量修改"
response.write admin_bar(titt,1,"99%")
if request("type")="save" then
i=0
Set rs= Server.CreateObject("ADODB.Recordset")
if request("t")="url" then
  if request("lx")="电影图片" then
	sql="select * from video where pic like '"&request("oldurl")&"%'"
	rs.open sql,conn,1,3
	do while not rs.EOF
	rs("pic")=replace(rs("pic"),""&request("oldurl")&"",""&request("newurl")&"")
	rs.update
    i=i+1
	rs.MoveNext
	loop
	rs.close
  elseif request("lx")="电影地址" then
	sql="select * from videourl where url like '"&request("oldurl")&"%'"
	rs.open sql,conn,1,3
	do while not rs.EOF
	rs("url")=replace(rs("url"),""&request("oldurl")&"",""&request("newurl")&"")
	rs.update
    i=i+1
	rs.MoveNext
	loop
	rs.close
  elseif request("lx")="电影价钱" then
	sql="select * from video where emoney like '%"&request("oldurl")&"%'"
	rs.open sql,conn,1,3
	do while not rs.EOF
	rs("emoney")=replace(rs("emoney"),""&request("oldurl")&"",""&request("newurl")&"")
	rs.update
    i=i+1
	rs.MoveNext
	loop
	rs.close
  elseif request("lx")="电影发布人" then
	sql="select * from video where username like '%"&request("oldurl")&"%'"
	rs.open sql,conn,1,3
	do while not rs.EOF
	rs("username")=replace(rs("username"),""&request("oldurl")&"",""&request("newurl")&"")
	rs.update
    i=i+1
	rs.MoveNext
	loop
	rs.close
  elseif request("lx")="领衔主演" then
	sql="select * from video where name like '%"&request("oldurl")&"%'"
	rs.open sql,conn,1,3
	do while not rs.EOF
	rs("name")=replace(rs("name"),""&request("oldurl")&"",""&request("newurl")&"")
	rs.update
    i=i+1
	rs.MoveNext
	loop
	rs.close
  end if
elseif request("t")="error" then
	sql="select * from videofile where file like '"&request("errorurl")&"%' order by downid"
	rs.open sql,conn,1,1
	if not rs.EOF then
	do while not rs.EOF 
	  if rs("downid")<>oldid then
	    sqqq=sqqq&""&rs("downid")&", "
	  end if
	  oldid=rs("downid")
	rs.MoveNext
	loop
	end if
	rs.close
	if sqqq<>"" then
    conn.Execute("update video set error="&request("error")&" where id in ("&sqqq&")")
    end if
end if
set rs=nothing
conn.close
set conn=nothing
end if%>
<table border="0" cellspacing="1" style="border-collapse: collapse" width="100%" bgcolor="#555555">
  <tr>
    <td width="100%" bgcolor="#F4F4F4">
    <b>数据库</b><font color="#000080"><b>字符转换</b></font><font color="#808080"> 连接从第一个字符起计</font></td>
  </tr>
  <tr>
    <td width="100%" bgcolor="#FFFFFF">
    <div align="right">
    <table border="0" cellspacing="0" style="border-collapse: collapse" width="90%">
      <form name=pwd method="post" action="admin_video_url.asp?type=save&t=url">
      <%if request("type")="save" and request("t")="url" then%>
      <tr>
        <td width="100%">成功:将<B><%=i%></B>个<Br>有关<font color="#FF0000"><%=request("oldurl")%>***</font>的"<%=request("lx")%>&quot;<br>全部转换为<font color="#FF0000"><%=request("newurl")%>***</font></td>
      </tr>
      <%end if%>
      <tr>
        <td width="100%">请选择要转换的类型：<select size="1" name="lx">
          <option value="" selected></option>
          <option value="电影图片">电影图片</option>
          <option value="电影地址">下载地址</option>
          <option value="电影价钱">电影价钱</option>
          <option value="电影发布人">发布人</option>
          <option value="领衔主演">领衔主演</option>
        </select></td>
      </tr>
      <tr>
        <td width="100%">将全部现有内容部份：<input type="text" size=57 name="oldurl" value="<%=request("oldurl")%>"></td>
      </tr>
      <tr>
        <td width="100%">
        <p align="center">↓</td>
      </tr>
      <tr>
        <td width="100%">　　　　　　转换为：<input size=57 name="newurl" value="<%=request("newurl")%>"></td>
      </tr>
      <tr>
        <td width="100%">
        <p align="center">    
    <input name="change" value="确认转换" type="submit"></td>
      </tr>
     </form>
    </table>
    </div>
    </td>
  </tr>
  <tr>
    <td width="100%" bgcolor="#F4F4F4" background="images/bg1.gif">　</td>
  </tr>
  </table>
</body>
</html><%response.write admin_bar(titt,2,"99%")
response.write ender()%>