<!--#include file="pysjzx_conn.asp"-->
<!--#include file="session.asp"-->

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<%
id=trim(request("id"))
girlid=trim(request("girlid"))
action=request.QueryString("action")
select case action
case "add"
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from pict",conn,1,3
rs.AddNew
rs("girlpic")=trim(request("girlpic"))
rs("id")=id
rs.Update
rs.Close
set rs=nothing
response.Redirect "managegirl2.asp?id="&id
case "edit"
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from pict where girlid="&girlid,conn,1,3
rs("girlpic")=trim(request("girlpic"))
rs.update
rs.close
response.Redirect "managegirl2.asp?id="&id
rs.close
set rs=nothing
case "del"
conn.execute "delete from pict where girlid="&girlid
response.Redirect "managegirl2.asp?id="&id
rs.close
set rs=nothing
end select


	 set rs2=server.createobject("adodb.recordset")
	rs2.open "select * from pic where id="&id,conn,1,1
		 set rs=server.createobject("adodb.recordset")
	rs.open "select * from pict where id="&id&" order by girlid desc",conn,1,1
		  %>
<div align="center">
<table cellpadding="3" cellspacing="1" border="1" width="100%" class="tableBorder" style="border-collapse: collapse" bordercolor="#C0C0C0">
  <tr> 
    <td class="tableHeaderText" colspan=4 height=25 bgcolor="#E8F1FF" align=center>
	<span ><%=rs2("girlname")%></span></td>
  </tr>

<%
		
				
  				if rs.eof And rs.bof then
%>
			  <tr> 
    <td class="tableHeaderText" colspan=4 height=25 bgcolor="#F7F7F7">
	<p align="center">
	暂无记录请添加</td>
  </tr>
  
<%
response.write "</table>"
   				else

			%>
  <form name="formpub" method="post" action="managegirl2.asp?action=edit&id=<%=id%>">
  <%=girlid%>
    <tr> 
      <td class="forumRowHighlight" width="11%" bgcolor="#F7F7F7"> <div align="center">ID</div></td>
      <td class="forumRowHighlight" width="40%" bgcolor="#F7F7F7"> 
		<p align="center">图片地址</td>
      <td class="forumRowHighlight" width="15%" bgcolor="#F7F7F7"> 
		<p align="center"><span lang="zh-cn">预览信息</span></td>
      <td class="forumRowHighlight" width="15%" bgcolor="#F7F7F7" > <div align="center">选 择</div></td>
    </tr>
    <%do while not rs.eof%>
    <tr> 
      <td class="forumRowHighlight" bgcolor="#F7F7F7" ><div align="center"><%=trim(rs("girlid"))%></div></td>
      <td class="forumRowHighlight" bgcolor="#F7F7F7" > <div align="center"><input type=hidden name="girlid" value="<%=rs("girlid")%>" >
		<input name="girlpic" type="text"  id="girlpic<%=pysjzx_i%>"  size="30" value=<%=rs("girlpic")%>><%
					ServerName1=Cstr(Request.ServerVariables("HTTP_REFERER"))
					%>
		<input  type="button" name="Submit3" value="上传图片" onClick="window.open('../Up_byshopPic2.asp?formname=formpub&editname=girlpic<%=pysjzx_i%>&byshopuppath=upload/girl&filelx=jpg&picclass=2&ServerName1=<%=ServerName1%>','','status=no,scrollbars1=no,top=20,left=110,width=420,height=165')" class="go-wenbenkuang"></div></td>
      <td class="forumRowHighlight" bgcolor="#F7F7F7" > 
		<p align="center"><span lang="zh-cn"><a href="../<%=rs("girlpic")%>" target=_blank>
		<img border="0" src="../<%=rs("girlpic")%>" width="65" height="65" ></a></span></td>
      <td class="forumRowHighlight" width="15%" bgcolor="#F7F7F7" > <div align="center"> 
          <p align="center"> 
			<input class="button" type="submit" name="Submit1" value="修 改"> &nbsp;<a href=managegirl2.asp?action=del&id=<%=id%>&girlid=<%=rs("girlid")%>>删除</a></div></td>
    </tr>
    <%
			rs.movenext
		  loop
		  end if
		  rs.close
		  set rs=nothing
		  %>
    </form>
</table>
</div>

<br>
</body>
</html>
<form action="managegirl2.asp?action=add&id=<%=id%>" name="myform"  method=post >
<div align="center">
<table cellpadding="3" cellspacing="1" border="1" width="100%" class="tableBorder" id="table1" style="border-collapse: collapse" bordercolor="#C0C0C0">
  <tr> 
    <td class="forumRowHighlight" height=25  bgcolor="#E8F1FF" colspan="2">
    <p align="center">添加</td>
  </tr>
  <tr> 
    <td class="forumRowHighlight" height=25 bgcolor="#F7F7F7">
    图片地址</td>
    <td class="forumRowHighlight" height=25 bgcolor="#F7F7F7">
		<input name="girlpic" type="text" id="girlpic"  size="30"><%
					ServerName1=Cstr(Request.ServerVariables("HTTP_REFERER"))
					%> <input  type="button" name="Submit2" value="上传图片" onClick="window.open('../Up_byshopPic2.asp?formname=myform&editname=girlpic&byshopuppath=upload/girl&filelx=jpg&picclass=2&ServerName1=<%=ServerName1%>','','status=no,scrollbars1=no,top=20,left=110,width=420,height=165')" class="go-wenbenkuang"></td>
  </tr>
  <tr> 
    <td class="forumRowHighlight" height=25 colspan="2" bgcolor="#F7F7F7">
    <input type=hidden name=id value=<%=rs2("id")%>>
	<p align="center"> 
          <input class="button" type="submit" name="Submit0" value="添加">
											<input type="button" value="返回上一页" onClick="javascript:history.go(-1)" class="unnamed5" name="button"></td>
  </tr>
  </form>
</table>
</div>

<%rs2.close 
set rs2=nothing%>