⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 showpic.asp

📁 校友通讯系统
💻 ASP
字号:
<%@ Language=VBScript %>
<%if not session("user_session_id")=Session.SessionID then%>
<SCRIPT LANGUAGE=javascript>
 parent.window.location.href="default.asp"
</SCRIPT>
<%end if%>
<HTML>
<HEAD>
<TITLE>校友录-班级相册:::</TITLE>
<link rel=stylesheet type=text/css href=style/style.css>
 <%Dim sql,i,rst,sname
   sql="delete from photo where subject is null"
  session("cn").execute (sql)

  %>
<script>
function openScript(url,width,height){
	var Win = window.open(url,"openScript",'width='+width+',height='+height+',resizable=1,scrollbars=yes,menubar=no,status=no' );
}
function tolow(s){
   var digits="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
   var digits2="abcdefghijklmnopqrstuvwxyz";
   var i=0,t=-1;
   var returnstr="";
   var slength=s.length;
   var c=""
 for(i=0;i<slength;i++)
   { t=-1
     c=s.charAt(i);
     t=digits.indexOf(c)
     if (t!=-1)
     { 
      c=digits2.charAt(t)
      }
    returnstr+=c;
   }
return returnstr
}
function checkpic(thefrm){
var shuoming=thefrm.shuoming.value
if (shuoming==""){
  alert("请输入照片的说明")
  thefrm.shuoming.focus()
  return  false;
  }
  var filename=thefrm.picfile.value
filename=tolow(filename)
if(filename==""){
alert("请点击”浏览…“按钮选择要上传的图片!")
thefrm.picfile.focus();
return false;
}
if(filename.indexOf(".gif")==-1&&filename.indexOf(".bmp")==-1&&filename.indexOf(".jpg")==-1){
alert("请上传Internet允许的格式,如“.jpg”、“.gif”、“.bmp”格式!")
return false
}
return true;
}
</script>
<body leftMargin=0 topMargin=0 >
<!--#include file="inc/top.asp"-->
<table width="750" height="400" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td valign=top width=100> 
    </td>
    <td valign=top width="500"> <br>
      <br>
      <table cellpadding=6 cellspacing=1 border=1 width=500 bgcolor=#80b060 bordercolor=#80b060 bordercolorlight=#F4FAED  bordercolordark=#F4FAED>
        <tr> 
          <td colspan=2 valign=middle align=center bgcolor="#F4FAED">>> 
            <B>班级相册</B> << <font face=宋体>&nbsp;</font></td>
          <td width="101" valign=middle align=center bgcolor="#F4FAED">相册中照片数:<font color=blue> 
            <%
				set rs=session("cn").execute ("select count(*) from photo")
				Response.Write rs(0)
				rs.close()
				Dim  classid
               sql="select photo.picid,photo.subject,photo.pubtime,ec.sname,photo.studentid,photo.liuyanshu,photo.dianji,ec.studentid from photo,ec where ec.studentid=photo.studentid order by photo.pubtime desc"
               set rs=Server.CreateObject ("ADODB.Recordset")
               rs.open sql,session("cn"),1
               const pagesize=8
            rs.PageSize=pagesize
            topage=rs.PageCount 
            curpage=Request.QueryString("curpage")
            if len(curpage)>8 then curpage=rs.PageCount
            if isNumeric(curpage) then 
               curpage=clng(curpage)
               if curpage<1 then curpage=1
               if curpage>rs.PageCount then curpage=rs.PageCount
            else 
               curpage=1
            end if
            
           
           rs.AbsolutePage=curpage 
				%>
            </font></td>
          <td colspan=2 bgcolor="#F4FAED" align="right"> 
            <div align="center">共<font color=#0000ff><%=rs.PageCount%></font>页 
              当前第<font color=#0000ff><%=curpage%></font>页 每页<font color=#0000ff><%=pagesize%></font>幅相片 
              <%if curpage<>1 then%>
              <A title=首页 href="showpic.asp?curpage=1"><font face="webdings" color="#0033FF">9</font></A> 
              <%else%>
              <A title=首页 href="#"><font face="webdings" color="#0033FF">9</font></A> 
              <%end if%>
              <%for i=1 to topage%>
              <a title="第<%=i%>页" href="showpic.asp?curpage=<%=i%>"><%=i%></a> 
              <%Next%>
              <%if curpage<>topage then%>
              <A title=尾页 href="showpic.asp?curpage=<%=topage%>"><FONT face=webdings>:</FONT></A> 
              <%else%>
              <A title=尾页 href="#"><FONT face=webdings>:</FONT></A> 
              <%end if%>
            </div>
          </td>
        </tr>
        <tr> 
          <td align=center nowrap width="103" bgcolor="#A9D46D"><b>照片说明</b></td>
          <td align=center nowrap width="64" bgcolor="#A9D46D"><b>提供者</b></td>
          <td align=center nowrap width="101" bgcolor="#A9D46D"><b>人气</b></td>
          <td align=center nowrap width="71" bgcolor="#A9D46D"><b>上载时间</b></td>
          <td align=center nowrap width="83" bgcolor="#A9D46D"><b>操作</b></td>
        </tr>
        <%
		
                 
			   For i=1 to rs.PageSize
	                    if rs.EOF then exit for%>
        <tr> 
          <td align="center" height="39" width="103" bgcolor="#e3f1d1"> <a href="javascript:openScript('viewphoto.asp?starid=<%=rs(0)%>')"><%=rs(1)%></a> 
          </td>
          <td align=center height="39" width="64" bgcolor="#e3f1d1"><a href="javascript:openScript('profile.asp?action=showdetail&name=<%=rs(4)%>',420,320)"><%=rs(3)%></a> 
          </td>
          <td align=center height="39" width="101" bgcolor="#e3f1d1"><%=rs(5)%>/<%=rs(6)%></td>
          <td align=center height="39" width="71" bgcolor="#e3f1d1"><%=rs(2)%></td>
          <td align=center height="39" width="83" bgcolor="#e3f1d1"> 
            <%if ecid=rs(4) then %>
            <a href="delphoto.asp?starid=<%=rs(0)%>" onclick="javascript:return confirm('这个操作将删除这个照片和相关的留言.\n你真的要删除吗?')">删除</a> 
            <%else%>
            删除 
            <%end if%>
          </td>
        </tr>
        <%
               rs.movenext
               next
                 rs.close
                 set rs=nothing%>
        <tr> 
          <td colspan=5 align=right nowrap height="22" bgcolor="#A9D46D">&nbsp; </td>
        </tr>
      </table>
     <form action= UPPIC2.ASP name=form3 enctype="multipart/form-data" method="post" onsubmit="return checkpic(this);">
                    
        <table border="0" cellspacing="1" width="500" cellpadding="4">
         
                        
            <td height="75" colspan=2 valign="top"><font color=#284654><span 
            style="FONT-SIZE: 9pt"><b>注意事项:</b><br>
              仅接受.jpg、.bmp 和.gif格式的图片,大小不超过<font color="brown">1.5M</font>。<br>
              </span></font></td>
                      </tr>
                      <tr> 
                        
            <td colspan=2>
              <table width="100%" border="0">
               
                <tr>
                  <td height="14" align="right"> 说 明:</td>
                  <td height="14"><input name="shuoming" type="text" id="shuoming" size="20" maxlength="20"></td>
                </tr>
                <tr> 
                  <td height="14" width="35%" align="right">浏 览:</td>
                  <td height="14" width="65%"> <input type="file" name="picfile"> 
                  </td>
                </tr>
               
                <tr> 
                  <td width="35%">&nbsp;</td>
                  <td width="65%">&nbsp;</td>
                </tr>
                <tr> 
                  <td colspan="2" align="center">
                   <input style="WIDTH: 90px; HEIGHT: 20px" type="submit" 
                   value="开始上载" name="upsubmit"> 
                  </td>
                </tr>
              </table>
            </td>
          </tr>                      
        </table>
      </form>
    </td>
  </tr>
</table>
<br>
     

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -