<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="inc/ubbcode.asp"-->
<!--#include file="inc/function.asp"-->
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/Conn_User.asp"-->
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
<style type="text/css">
<!--
body {
	margin-left: 10px;
	margin-top: 10px;
	margin-right: 10px;
	margin-bottom: 10px;
	background-color: #f2f2f2;
}
-->
</style>
<link href="new/css.CSS" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.STYLE1 {
	color: #FFFFFF;
	font-weight: bold;
}
-->
</style>
<SCRIPT language=javascript>
function unselectall()
{
    if(document.myform.chkAll.checked){
	document.myform.chkAll.checked = document.myform.chkAll.checked&0;
    } 	
}

function CheckAll()
  {
   if (document.form1.Content.value=="")
  {
    alert("每个用户最多添加10个分类！");
	document.form1.Content.focus();
	return false;
  }
  return true; 
  }
function ConfirmDel()
{
     alert("每个用户最多添加10个分类！");
}

</SCRIPT>
</head>

<body>
<table width="157" height="350" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top">
      
        <table width="140" height="23" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td><img src="user/www.gif" width="84" height="11" /></td>
          </tr>
      </table>
        <table width='100%' height="3" border='0' cellpadding='0' cellspacing='0'>
          <tr>
            <td></td>
          </tr>
      </table>
        <table width='100%' border='0' cellspacing='0' cellpadding='0'>
          <tr>
            <td height="6" align="center"><img src="user/tops.gif" width="149" height="9" /></td>
          </tr>
        </table>
        <%userid=request("userid")
set rs=server.createobject("adodb.recordset")
sql="select * from [user] where userid="&userid&" order by userid desc"
rs.open sql,Conn_User,1,1
usernamed=rs("username")

rs.close
set rs=nothing
%>
        <%
set rsp=server.createobject("adodb.recordset")
rsp.open "select * from PhotoClass where username='"&usernamed&"' order by classID desc",conn,1,1
%>
        <%if rsp.recordcount=0 then%>
    
      <table width="149" height="25" border="0" align="center" cellpadding="0" cellspacing="0"  class="hero2">
        <tr>
          
          <td width="149" align="center" bgcolor="#F7F7F7" class="hero"><table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="25" align="center"><img src="user/ico_folders_orange.gif" width="13" height="11" /></td><td width="125" align="left"><font color="#1F3174">暂无分类</font></td>
            </tr>
          </table></td>
        </tr>
      </table>
      <%else%>
      <%
dim i
i=rsp.recordcount
do while not rsp.eof 
%>
<%
if request("action")<>"" and request("action")="modify" then
%>
<table width="149" height="25" border="0" align="center" cellpadding="0" cellspacing="0" class="hero2">
  <tr>
    <td height="28" align="center" bgcolor="#F7F7F7" class="hero"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <form action="classmodifysave.asp" method="post" name="form" id="form" >
        <tr>
          <td width="25" align="center"><img src="user/ico_folders_orange.gif" width="13" height="11" /></td>
          <td align="left"><input name="classname" type="text" size="12" maxlength="20" value="<%=rsp("classname")%>" class="save" />
              <input name="classid" type="hidden" size="12" maxlength="30" value="<%=rsp("classid")%>" />
            <input name="userid" type="hidden" size="12" maxlength="30" value="<%=userid%>" />
            
            <input type="image" name="imageField" src="user/ps_0816_save.gif" /></td>
        </tr>
      </form>
    </table></td>
  </tr>
</table>
<%else%>
      <table width="149" height="25" border="0" align="center" cellpadding="0" cellspacing="0"  class="hero2">
        <tr>
          <td width="149" align="center" bgcolor="#f9f9f9" class="hero"><table width="142" border="0" align="left" cellpadding="0" cellspacing="0">
              <tr>
                <td width="25" align="center"><img src="user/ico_folders_orange.gif" width="13" height="11" /></td>
                <td width="125" align="left"><table width='100%' height="2" border='0' cellpadding='0' cellspacing='0'>
                  <tr>
                    <td></td>
                  </tr>
                </table><a href="photo.asp?userid=<%=userid %>&classid=<%=rsp("classid")%>" target="dd"><font color="#1F3174" class="no"><%=rsp("classname")%></font></a></td>
              </tr>
          </table></td>
        </tr>
      </table>
      
<%end if%>      
	  <%rsp.movenext
loop%>
      <%end if%>
      <%rsp.close
set rsp=nothing
%>
<%
if request("action")<>"" and request("action")="add" then
%>
<table width="149" height="25" border="0" align="center" cellpadding="0" cellspacing="0"  class="hero2">
  <tr>
    <td height="28" align="center" bgcolor="#f9f9f9" class="hero"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <form action="userclasssave.asp" method="post" name="form" id="form" >
        <tr>
          <td width="25" align="center"><img src="user/ico_folders_orange.gif" width="13" height="11" /></td>
          <td align="left"><input name="classname" type="text" size="12" maxlength="30" class="save" />
              <input name="userid" type="hidden" size="12" maxlength="30" value="<%=userid%>" /><input type="image" name="imageField2" src="user/ps_0816_save.gif" /></td>
        </tr>
      </form>
    </table></td>
  </tr>
</table>
<%else
end if%>
<table width='100%' border='0' cellspacing='0' cellpadding='0'>
  <tr>
    <td height="6" align="center"><img src="user/ends.gif" width="149" height="10" /></td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="30"><table border="0" align="right" cellpadding="0" cellspacing="0">
      <tr>
        <td height="10"><a href="pic.asp?userid=<%=userid %>" target=content><font class="no">列表显示</font></a>&nbsp;</td>
        <td width="14"><img src="user/lf_right.gif" width="7" height="5" /></td>
      </tr>
    </table></td>
  </tr>
</table></td>
  </tr>

</table>
<%
	  userid=request("userid")
	
	  if CheckUserLogined()=true then
	  UserNamed=Request.Cookies("asp163")("UserName")
	 
	 set userq=server.createobject("adodb.recordset")
sql="select * from [user] where UserName='"&UserNamed&"' order by userid desc"
userq.open sql,Conn_User,1,1

	  
	  userw=userq("userid")
	 
	  If cint(userw)=cint(userid) then
	  
	  %>
<table width="150" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="20" align="right"><img src="user/ps_0816_new.gif" width="13" height="11" /></td>
    <td><%if i=>10 then%><a href="#" onClick="return ConfirmDel();">添加</a><%else%><a href="userphotos.asp?userid=<%=userid%>&amp;action=add">添加</a><%end if%></td>
    <td width="15"><img src="user/ps_0816_mend.gif" width="13" height="11" /></td>
    <td><a href="userphotos.asp?userid=<%=userid%>&amp;action=modify">修改</a></td>
    <td width="15"><img src="user/ps_0816_delete.gif" width="13" height="11" /></td>
    <td><a href="classdel.asp?userid=<%=userid%>&amp;action=del">删除</a></td>
  </tr>
</table>
<%else%>


	  <%end if%>
<%
	  else
	  end if
	  %>
	  
</body>
</html>
