top.jsp
上传用户:szlmxq
上传日期:2014-01-31
资源大小:740k
文件大小:5k
源码类别:

Applet

开发平台:

Java

  1. <%@ page contentType="text/html;charset=GBK" language="java" import="java.sql.*" errorPage="" %>
  2. <html>
  3. <head>
  4. <link href="css.css" rel="stylesheet" type="text/css">
  5. <%!
  6. boolean IsMail(String user_mail){
  7. int index=user_mail.indexOf("@");
  8. int index2=user_mail.indexOf(".");
  9. if(index==-1 || index2==-1)
  10. return false;
  11. else return true;
  12. }
  13. public String getStr(String str)
  14. {
  15.   try
  16. {
  17. String temp_p=str;
  18. byte[] temp_t=temp_p.getBytes("ISO8859-1");
  19. String temp=new String(temp_t);
  20. return temp;
  21. }
  22. catch(Exception e)
  23. {
  24. e.printStackTrace();
  25.  }
  26. return "null";
  27. }
  28. %>
  29. <%!
  30.  int Cint(String cint)
  31.    {
  32.     try {
  33.   int n;
  34.       n= Integer.parseInt(cint);
  35.   return n;
  36.         }
  37.        catch (NumberFormatException e) {
  38.                  return 0;
  39.         }
  40. }
  41. %>
  42. <jsp:useBean id="mdb" class="ckstudio.db.faq" scope="page"/>
  43. <script>
  44.   function openbag(id) { window.open("basket.jsp?hw_id="+id,"","height=420,width=460,left=190,top=10,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no");} 
  45. </script>
  46. <script language="javascript">
  47. function openScript(url, width, height){
  48. var Win = window.open(url,"openScript",'width=' + width + ',height=' + height + ',resizable=1,scrollbars=yes,menubar=no,status=yes' );
  49. }
  50. </script>
  51. <title>
  52. <%
  53. //得到标题栏信息
  54. String sql="select top 1 * from system";
  55. ResultSet rs;
  56.  rs=mdb.executeQuery(sql);
  57. if(rs.next()){   
  58. %>
  59. <%=rs.getString("web")%> - <%=rs.getString("sitename")%>
  60. <%
  61. }
  62. else{
  63. out.print("ckstudio");
  64. }
  65. %>
  66. </title></head> 
  67. <body onLoad="if(event.shiftKey){location.href='a/'}" topmargin="0" leftmargin="0">
  68. <table align="center" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="778"><tr><td>
  69.      <table border="0" height="28" style="border-collapse: collapse" bordercolor="#111111" cellpadding="0" cellspacing="0"><tr>
  70.           <td width="98" align="center" height="28" background="img/main.gif"> <a href="index.jsp">主页</a></td>
  71.      <!--set rs2=server.createobject("adodb.recordset") 
  72.         sql2="select * from sort" 
  73.         rs2.open sql2,conn,3,3 
  74.         do while not rs2.eof
  75.          -->
  76.   <%
  77.   rs.close();
  78.   sql="select * from sort order by sort_id asc";
  79.    rs=mdb.executeQuery(sql);
  80.    int a=0;
  81.   while(rs.next()){ 
  82.   a=a+1;
  83. %>
  84.          
  85.          <td width="98" align="center" height="28" background="img/main.gif"><a href="sort.jsp?sort_id=<%=rs.getInt("sort_id")%>"><%=rs.getString("sort_name")%></a></td>
  86.           <%
  87.  if(a>=6)
  88.  break;
  89.  }
  90.   rs.close();
  91.               %> 
  92.   <td width="98" align="center" height="28" background="img/main.gif">
  93.      <a target="_blank" href="http://www.freedown.net/forum">客户论坛</a></td></tr></table>
  94. </td></tr></table>
  95.       
  96. <div align="center">
  97.   <center>
  98.       
  99. <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1" background="img/1right.gif" height="20">
  100.   <tr><td align="center"> <a href="ding2.jsp">订单投诉</a>
  101. | <a href="fuwu-baozheng.jsp">客户服务</a>
  102. | <a href="fukuan-fangshi.jsp">付款方式</a>
  103. | <a href="allnews.jsp">新闻中心</a>
  104. | <a href="javascript:openScript('subpass.jsp',460,300)">我的订单</a>
  105. | <a href="javascript:openScript('buy.jsp',460,300)">购物车</a>
  106. | <a href="javascript:openScript('cash.jsp',460,300)">收银台</a>
  107. <!-- dim rs,sql
  108.           set rs=server.createobject("adodb.recordset")
  109.           sql="select * from sort"
  110.           rs.open sql,conn,3,3
  111.           if rs.eof then
  112.           response.write ""
  113.           end if
  114.           do while not rs.eof
  115.           %>
  116.                 <!--rs.movenext
  117.           loop
  118.           rs.close-->
  119. <%
  120.  
  121.   if((String)session.getValue("user_name")!=null) 
  122.     {
  123. %>
  124. | <a href=javascript:openScript('modify.jsp',500,340)>更改资料</a>
  125. | <a href="quit.jsp">退出</a>&nbsp;&nbsp;
  126. <%
  127.     }else
  128.     {
  129. %>
  130. | 更改资料 | 退出&nbsp;&nbsp;
  131. <%
  132.     }
  133. %>
  134. <!--
  135. 显示时间
  136. -->
  137. <script src="http://www.jspshop.cn/jspt/mystat.asp"></script>
  138. <script language="JavaScript">
  139. <!--
  140. todayDate = new Date();
  141. date = todayDate.getDate();
  142. month= todayDate.getMonth() +1;
  143. year= todayDate.getYear();
  144. document.write("今天是")
  145. if(navigator.appName == "Netscape")
  146. {
  147.     document.write("<font color=#ff0000>");
  148. document.write(1900+year);
  149. document.write("</font ");
  150. document.write("年");
  151. document.write("<font color=#ff0000>");
  152. document.write(month);
  153. document.write("</font ");
  154. document.write("月");
  155. document.write("<font color=#ff0000>");
  156. document.write(date);
  157. document.write("</font ");
  158. document.write("日");
  159. }
  160. if(navigator.appVersion.indexOf("MSIE") != -1)
  161. {
  162. document.write("<font color=#ff0000>");
  163. document.write(year);
  164. document.write("</font>");
  165. document.write("年");
  166. document.write("<font color=#ff0000>");
  167. document.write(month);
  168. document.write("</font>");
  169. document.write("月");
  170. document.write("<font color=#ff0000>");
  171. document.write(date);
  172. document.write("</font>");
  173. document.write("日");
  174. }
  175. //--> 
  176.     </script></td></tr></table>
  177.   </center>
  178. </div>
  179. </HTML>