<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../Include/Connect.asp"-->
<!--#include file="FCKeditor/fckeditor.asp" -->
<%
photoid=Checkstr(request.querystring("photoid"))
if photoid="" then
response.redirect("../default.asp")
end if

set rs = server.CreateObject("adodb.recordset")
sql="select * from Show5_ALLPhoto where PhotoID="&photoid&""
rs.open sql,cn,1,1
if rs("Username") <> session("username") then
response.redirect("http://www.show5.net")
else
%>
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="../CSS/Hompy/hompy.css" type=text/css rel=stylesheet>
<title></title>
<SCRIPT language="javascript">
<!--
function formcheck()
{

	if(photoedit.photogroup.value == "")
	{
		alert("请选择像册分类！");
		photoedit.photogroup.focus();
	}
　　else if(photoedit.topic.value == "")
	{
		alert("请填写像册标题！");
		photoedit.topic.focus();
	}
　　else if(photoedit.filename.value == "")
	{
		alert("请上传照片！");
	}
	else if(photoedit.content.value == "")
	{
		alert("请填写照片简介！");
		photoedit.content.focus();
	}
	else
	{
		document.photoedit.submit();
	}

}
//-->
</SCRIPT>
</head>
<body  oncontextmenu="window.event.returnValue=false" onselectstart="return false">
<TABLE cellSpacing=0 cellPadding=0 width=473 border=0>
  <TBODY>
    <TR> 
      <TD height=33 valign="top"> 
        <div align="center"> 
          <table width="97%" border="0" cellspacing="0" cellpadding="0">
            <TR> 
              <TD width="397" height=25 class="orange2_b">编辑照片</TD>
              <TD width="62" class=font_gray9b>&nbsp;</TD>
            </TR>
            <TR> 
              <TD height=1 colspan="2" bgColor=#dddddd></TD>
            </TR>
          </table>
        </div></TD>
    </TR>
    <TR> 
      <TD height=24><div align="center"> 
<table width="97%"  border="0" cellspacing="0" cellpadding="0">
<form name="photoedit" action="photoedit_save.asp" method="post" >
<input name="photoid" type="hidden" value="<%=photoid%>">
<input name="username" type="hidden" value="<%=rs("Username")%>">
  <tr>
    <td><TABLE cellSpacing=0 cellPadding=0 width=97% border=0>
                    <TBODY>
                    <TR>
                      <TD 
                      style="BORDER-RIGHT: #ffffff 1px solid; BORDER-LEFT: #ffffff 1px solid" 
                      bgColor=#bcbcbc height=1></TD></TR>
                    <TR>
                      <TD 
                      style="BORDER-RIGHT: #bcbcbc 1px solid; BORDER-LEFT: #bcbcbc 1px solid" 
                      align=middle>
                        <TABLE cellSpacing=0 cellPadding=0 width=458 border=0>
                          <TBODY>
                          <TR>
                            <TD width=59 height=28>
                              <DIV align=center>文件夹</DIV></TD>
                            <TD width=260><SELECT name=photogroup> 
<%
set rs_pgroup = server.CreateObject("adodb.recordset")
sql="select * from Show5_Photogroup where Username='"&session("username")&"'"
rs_pgroup.open sql,cn
do while not rs_pgroup.eof
%> 
                                <OPTION value=<%=rs_pgroup("GroupID")%> <%if rs_pgroup("GroupID")=rs("GroupID") then%> selected <%end if%>><%=rs_pgroup("Groupname")%></OPTION>
<%
rs_pgroup.movenext
loop
rs_pgroup.close
set rs_pgroup=nothing
%>
								</SELECT> </TD></TR>
                          <TR>
                            <TD class=li_x_02 colSpan=3 height=1></TD></TR>
                          <TR>
                            <TD width=59 height=28>
                              <DIV align=center>题目</DIV></TD>
                            <TD width=260><INPUT name=topic class=input style="WIDTH: 240px; HEIGHT: 21px" value="<%=rs("Topic")%>" maxLength=30> </TD></TR>
                          <TR>
                            <TD class=li_x_02 colSpan=3 height=1></TD></TR>
                          <TR>
                            <TD width=59 height=28><DIV align=center>文件名</DIV></TD>
                            <TD width=260><INPUT name=filename class=input style="WIDTH: 150px; HEIGHT: 21px" value="<%=rs("Filename")%>" maxLength=30 readonly></TD>
                                <TD class=p9><font color="#FF0000">* 文件名不可修改</font></TD>
                            </TR></TBODY></TABLE>
                        <DIV id=imgview style="DISPLAY: none">
                        <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
                          <TBODY>
                          <TR>
                            <TD class=li_x_02 height=1></TD></TR></TBODY></TABLE>
                          </DIV>
                        <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
                          <TBODY>
                          <TR>
                            <TD class=li_x_02 height=1></TD></TR></TBODY></TABLE>
                        <%
Dim oFCKeditor
Set oFCKeditor = New FCKeditor
oFCKeditor.BasePath = "FCKeditor/"

oFCKeditor.ToolbarSet = "Upphoto"
oFCKeditor.Width = "100%"
oFCKeditor.Height = "200"
oFCKeditor.Value = ""&rs("Content")&""
oFCKeditor.Create "content"
%></TD>
                      </TR>
                    <TR>
          <TD 
                      style="BORDER-RIGHT: #ffffff 1px solid; BORDER-LEFT: #ffffff 1px solid" 
                      bgColor=#bcbcbc height=1></TD></TR></TBODY></TABLE>
          <table width="97%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="62%" height="27" align="right" style="PADDING-LEFT: 6px"><img src="../Images/Hompy/Bt_goback.gif" width="39" height="18" align="absmiddle"> &nbsp;<A href="javascript:formcheck();"><img src="../Images/Hompy/Bt_confirm.gif" width="39" height="18" border="0" align="absmiddle"></a></td>
  </tr>
</table></td>
  </tr>
</form>
<%
end if
%>
</table>
<table width="97%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="62%" height="27" align="center">&nbsp;</td>
  </tr>
</table>
   </div></TD>
    </TR>
  </TBODY>
</TABLE>
</body>
</html>
