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

📄 hompy.jsp

📁 一个练习JAVA的例子程序 一个练习JAVA的例子程序
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312" %><%@ page import="jasp.buildin.*, jasp.vbs.*, jasp.util.*" %><%@ page extends="jasp.servlet.JspBase" %><%  try {    jspinit(request,response,application,out,"jasp0");%><%     Session.setCodePage(936);    variant username = new variant();    jasp.adodb.Recordset rs = null;    String sql = "";    variant themeid = new variant();    jasp.adodb.Recordset rs_userpic = null;%><%@ include file="../include/connect.jsp" %><%    username.set(checkstr(new variant(Request.QueryString("Username"))));    if (username.equals(new variant(""))) {        Response.Redirect("../default.jsp");    }    rs = new jasp.adodb.Recordset();    sql = "select * from iisALLUser where Username='" + username + "'";    rs.Open(sql, cn, 1, 3);    if (rs.getEOF() || rs.getBOF()) {        Response.Write("系统无此用户");        Response.Redirect("../default.jsp");        Response.End();    } else {        themeid.set(rs.getItem("ThemeID").getValue());        rs.setItem("TotalVisit", rs.getItem("TotalVisit").getValue().add(new variant(1)));        rs.Update();        rs.Close();        rs = (jasp.adodb.Recordset)null;    }    if (Session.getItem("Username").unequals(username) && Session.getItem("Username").unequals(new variant(""))) {        rs = new jasp.adodb.Recordset();        sql = "select * from iisVisitRecord where RecordID is null";        rs.Open(sql, cn, 1, 3);        rs.AddNew();        rs.setItem("Username", username);        rs.setItem("Visituser", Session.getItem("Username"));        rs.Update();        rs.Close();        rs = (jasp.adodb.Recordset)null;    }%><html><head><META http-equiv="Content-Type" content="text/html; charset=GB2312"><LINK href="../CSS/Hompy/hompy.css" type=text/css rel=stylesheet><title><%= username %>的个人秀</title><script language="JavaScript" type="text/JavaScript"><!--function winOpen(Url,width,height,scrollbar,resize){ow = width;oh = height;os = scrollbar;or = resize;var xposition=0; var yposition=0;if ((parseInt(navigator.appVersion) >= 4 ))  {    xposition = (screen.width - width) / 2;    yposition = (screen.height - height-25) / 2;  }  window.open (Url,"","width ="+ow+",height="+oh+",scrollbars = "+os+",resizable="+or+",left="+xposition+",top="+yposition );}//--></script><script language="JavaScript" type="text/JavaScript"><!--function MM_reloadPage(init) {  //reloads the window if Nav4 resized  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();}MM_reloadPage(true);//--></script></head><body leftMargin=0 topMargin=0 marginheight="0" marginwidth="0"  oncontextmenu="window.event.returnValue=false" onselectstart="return false"><TABLE style="BACKGROUND-IMAGE: url(../Theme/<%= themeid %>.gif)" height=630 cellSpacing=0 cellPadding=0 width=950 border=0>  <TBODY>  <TR>    <TD width=20 height=20></TD>    <TD width=730 height=20></TD>    <TD width=26 height=20></TD>    <TD width=163 height=20></TD>    <TD width=11 height=20></TD></TR>  <TR>    <TD width=20 height=546></TD>    <TD vAlign=top width=730 height=546><IFRAME name=main_body       marginWidth=0 marginHeight=0 src="main_index.jsp?username=<%= username %>" frameBorder=0       width=730 scrolling=no height=546 allowTransparency></IFRAME></TD>    <TD width=27 height=546></TD>      <TD vAlign=top width=163 height=546><TABLE cellSpacing=0 cellPadding=0 width=165 border=0>        <TBODY>        <TR>          <TD height=7></TD></TR>        <TR>              <TD height=22class="table_blueborder" align="center"> <font color=#0066ff size=4px><b><a href="../default.jsp">去秀吧</a></b></font></TD>            </TR>        <TR>          <TD height=5></TD></TR>        <TR>              <TD height=49>                 <TABLE height=55 cellSpacing=0 cellPadding=0 width=165 border=0>                  <TBODY>                    <TR>                       <TD height="54" align="center">                         <IFRAME                   name=player_window src="czplayer/exobud.jsp?username=<%= username %>"                   frameBorder=0 width=165 scrolling=no               height=55></IFRAME></TD>                    </TR></TBODY></TABLE></TD></TR>        <TR>          <TD height=3></TD></TR>        <TR>              <TD align=middle height=10><table width="163" border="0" cellspacing="0" cellpadding="0">                  <tr>                    <td><img src="../Images/Hompy/right_stop.gif" width="163" height="4"></td>                  </tr>                  <tr>                    <td height="116" bgcolor="#FFFFFF" align="center" valign="top"><table width="148" border="0" cellspacing="0" cellpadding="0">                        <tr>                          <td style="HEIGHT: 20px; BORDER-BOTTOM: #cecfce 1px dotted" class="orange2_b"><img src="../Images/Hompy/bbs_ic003.gif" width="16" height="16" align="absmiddle"> 最近访客</td>                        </tr>                        <tr>                          <td height="96" align="center"><marquee behavior="scroll" scrolldelay=50 loop scrollamount=1 width=140 height=80 truespeed direction=up><%    rs = new jasp.adodb.Recordset();    sql = "select Visituser from iisVisitRecord where Username='" + username + "' group by Visituser";    rs.Open(sql, cn, 1, 1);    if (rs.getEOF() || rs.getBOF()) {        Response.Write("暂无访客!");    } else {        while (!(rs.getEOF())) {%>							<table width="143" height="46" border="0" cellpadding="0" cellspacing="0">                              <tr>                                <td width="61" align="center"><%            rs_userpic = new jasp.adodb.Recordset();            sql = "select * from iisALLUser where Username='" + rs.getItem("Visituser").getValue() + "'";            rs_userpic.Open(sql, cn, 1, 3);            if (rs_userpic.getItem("Userpic").getValue().equals(new variant("user_photo.gif")) || rs_userpic.getItem("Userpic").getValue().equals(new variant(""))) {%>                                  <img src="Userpic/showimg.gif" width="68" height="52"> <%            } else {%>                                  <a href="../Hompy/hompy.jsp?username=<%= rs.getItem("Visituser").getValue() %>" target="_blank"><img src="../Userpic/<%= rs_userpic.getItem("Username").getValue() %>/<%= rs_userpic.getItem("Userpic").getValue() %>" width="68" height="52" border="0"></a> <%            }%>								</td>                                <td width="76" valign="bottom"><%            if (rs_userpic.getItem("sex").getValue().equals(new variant(0))) {                Response.Write("<img src='../Images/Hompy/minihompya_10.gif' width='15' height='12' align='absmiddle'>");            } else {                Response.Write("<img src='../Images/Hompy/minihompya_11.gif' width='15' height='12' align='absmiddle'>");            }%>								<a href=/Hompy/hompy.jsp?username=<%= rs.getItem("Visituser").getValue() %> target="_blank"><%= rs_userpic.getItem("Nickname").getValue() %></a></td>                              </tr>                            </table><%            rs_userpic.Close();            rs_userpic = (jasp.adodb.Recordset)null;            rs.MoveNext();        }    }    rs.Close();    rs = (jasp.adodb.Recordset)null;%>                            </marquee></td>                        </tr>                      </table></td>                  </tr>                  <tr>                    <td><img src="../Images/Hompy/right_sbottom.gif" width="163" height="4"></td>                  </tr>                </table> </TD>            </TR>        <TR>          <TD height=3></TD></TR>        <TR>          <TD align=middle height=6>            <TABLE cellSpacing=1 cellPadding=0 width=163 border=0>              <TBODY>              <TR>                      <TD><A href="random.jsp" target="_blank"><IMG src="../Images/Hompy/btn_randomhome.gif" width="94" height="22" border=0></A></TD>                      <TD><%    if (Session.getItem("Username").equals(new variant(""))) {%>					  <a href="javascript:;" onClick="javascript:winOpen('userlogin.jsp', 288, 122, 'no','no')"><IMG src="../Images/Hompy/btn_login.gif" width="65" height="22" border=0></a><%    } else {%><a href="logout.jsp?returnuser=<%= username %>"><IMG src="../Images/Hompy/btn_logout.gif" width="65" height="22" border=0></a><%    }%></TD>                    </TR></TBODY></TABLE></TD></TR>        <TR>          <TD height=6></TD></TR></TBODY></TABLE></TD>    <TD width=10 height=546></TD></TR>  <TR>    <TD width=20 height=64></TD>    <TD width=730 height=64></TD>    <TD width=26 height=64></TD>    <TD width=163 height=64></TD>    <TD width=11 height=64></TD></TR></TBODY></TABLE></body></html><%    End();    } catch(Exception ex) {         printStackTrace(ex);    } %>

⌨️ 快捷键说明

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