<!--#include file="conn.asp"-->
<!--#include file="inc/md5.asp"-->
<!--#include file="bbsuser.asp"-->
<!--#include file="inc/publicfun.asp"-->
<%
userid=request.cookies("clubuser_id")
%>
<!--#include file="memberinfo.asp"-->
<%
if request("act")="y"  then
   'bbs_blog_type=1,1为网络贴图标志
   photo_name=request("photo_name")
   posturl=request("posturl")
   sql="select top 1 * from ftblog_type where userid="&userid&" and blogphoto=1 and blogtype='"&photo_name&"'"
   set rs=server.createobject("adodb.recordset")
   rs.open sql,conn,1,3
   if not rs.eof then
      sign=rs("sign")
   end if
   rs.close
   sql="insert into ftbbs_upload (upload_pic,file_type,upload_size,userid,pic_note,photo_name,sign,bbs_blog_type,clubuser_id) values('"&posturl&"',1,0,'"&username&"','"&photo_note&"','"&photo_name&"',"&sign&",1,"&userid&")"
   conn.Execute(sql)
end if
%>
<html><head><meta http-equiv=content-type content="text/html; charset=gb2312">
</head>
<script language="javascript">
<!--
	function check(form)
	{	
    if (form.photo_name.value=="")
    	{
    		alert("请选择你的相册名称！");
    		form.photo_name.focus();
    		return false;
  	}
    if (form.posturl.value==""||form.posturl.value=="http://")
    	{
    		alert("请填写相片的URL地址！");
    		form.posturl.focus();
    		return false;
  	}
    return true;
	}
//-->
</script>
<body>
<center>
<title>上传相册</title>
<link rel="stylesheet" type="text/css" href="<%=cssfile%>">
<!--#include file="usernav.asp" -->
<div id="main" align="left">
<script language=javascript src="js/windowsize.js"></script>
	<div id="header">
	<div class="lc"><div class="rc"></div></div>
	<div class="tit"><a href="home.asp?userid=<%=userid%>" class="titlink" title="<%=username%>的空间"><%=username%></a></div>
	<div class="desc"><%=homepagetitle%></div>
	<div id="tabline">&nbsp;</div>
	<div id="tab"><a href="home.asp?userid=<%=userid%>" class="on">主页</a><a href="boker.asp?userid=<%=userid%>">博客</a><span>|</span><a href="myphoto.asp?userid=<%=userid%>">相册</a><span>|</span><a href="myinfo.asp?userid=<%=userid%>">个人档案</a>
	</div>
</div>
<div class="stage">
<table width="100%" border="0" cellspacing="0" cellpadding="0" id="layout">
<tr>
<td valign="top" class="c2t3">
<div id="mod_profile" class="mod" rel="drag">
<!--#include file="usercalog.asp" -->
</div>
</td>
          <td valign="top" class="c2t1"> 
            <div id="mod_bloglist" class="mod" rel="drag">
                <table width="77%" border="0" align="center" class="maintbbg" cellspacing="1" cellpadding="2">
                  <form name="form1" method="post" action="" onsubmit="return check(this)">
				  <tr class="f12bg"> 
                    <td height="50" colspan="2"> <div align="center"><strong>上 
                        传 相 片</strong></div></td>
                  </tr>
                  <tr class="f12bg"> 
                    <td height="30">
<div align="right">相册名称：</div></td>
                    <td height="25">
					<select name="photo_name" id="photo_name">
                        <%
sql="select * from ftblog_type where userid="&userid&" and blogphoto=1 order by indate desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
do while not rs.eof
%>
                        <option value="<%=rs("blogtype")%>"><%=rs("blogtype")%></option>
                        <%
rs.movenext
loop
rs.close
%>
                      </select>
                      <a href="blog_group.asp?nav=a">创建相册</a></td>
                  </tr>
                  <tr> 
                    <td width="23%" height="11" class="maintbtr3" valign="middle"> 
                      <div align="right">相片URL：</div></td>
                    <td width="77%" height="30" class="maintbtr3"><input name="posturl" type="text" id="posturl" value="http://" size="35"> 
                    </td>
                  </tr>
                  <tr> 
                    <td width="23%" height="11" class="maintbtr3" valign="middle"> 
                      <div align="right">相片说明：</div></td>
                    <td width="77%" height="30" class="maintbtr3"><input name="photo_note" type="text" id="photo_note" size="35" maxlength="30"> 
                    </td>
                  </tr>
                  <tr> 
                    <td height="50" colspan="2" class="maintbtr3"> <div align="center">
                        <input name="act" type="hidden" id="act" value="y">
                        <input type="submit" name="Submit" value="提交相片" class=button>
                      </div></td>
                  </tr>
				</form>
                </table>
			</div>

</td>
</tr></table>
</div>
</div>
<br><center>
<!--#include file="tail.asp" -->
</center>
</center>
</body>
</html>
<%closedb%>