• 大小: 7.21MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-10-17
  • 语言: Java
  • 标签: 11  

资源简介

web课设程序代码,可以运行,网站流量统计,jsp页面

资源截图

代码片段和文件信息


package feng;
import java.sql.*;
import java.io.*;
import java.util.*;
import java.awt.Toolkit;
import java.awt.*;
public class jdbc {
Connection conn = null ;//设置你的数据库用户名和密码:
String use = ““ ;
String pass = ““ ; 
public java.sql.Connection getConn(){
try{
     Class.forName(“sun.jdbc.odbc.JdbcOdbcDriver“);
     String url=“jdbc:odbc:driver={Microsoft Access Driver (*.mdb)};DBQ=C:/Program Files/Apache Software Foundation/Tomcat 5.0/webapps/count/count.mdb“;   //注意修改路径
     conn= DriverManager.getConnection(urlusepass);
    }
    catch(Exception e){
  e.printStackTrace();
    }
    return this.conn ;
}
public String ex_chinese(String str){
     if(str==null){    str  =““ ;    }
     else{
         try {
        str = new String(str.getBytes(“iso-8859-1“)“gb2312“) ;
         }
         catch (Exception ex) {       }
     }
     return str ;
  }

public String gettime() {
    String datestr =  ““ ;
    try {
    java.text.DateFormat df = new java.text.SimpleDateFormat(“yyyy-MM-dd HH“) ;
  datestr = df.format(new java.util.Date()) ;
    }
   catch (Exception ex) {   }
   return datestr ;
  }

  public String getHour() {
    String datestr =  ““ ;
    try {
    java.text.DateFormat df = new java.text.SimpleDateFormat(“H“) ;
    datestr = df.format(new java.util.Date()) ;
   }
    catch(Exception ex) {    }
    return datestr ;
  }
     public String getMonth() {
    String datestr =  ““ ;
    try {
    java.text.DateFormat df = new java.text.SimpleDateFormat(“yyyy-M“) ;
    datestr = df.format(new java.util.Date()) ;
    }
    catch (Exception ex) {   }
    return datestr ;
  }
   public String getStrMonth() {
   String datestr =  ““ ;
    try {
    java.text.DateFormat df = new java.text.SimpleDateFormat(“M“) ;
    datestr = df.format(new java.util.Date()) ;     }
    catch (Exception ex) {    }
    return datestr ;
  }
   public String getStrDay() {
    String datestr =  ““ ;
    try {
   java.text.DateFormat df = new java.text.SimpleDateFormat(“d“) ;
    datestr = df.format(new java.util.Date()) ;
    }
    catch (Exception ex) {    }
    return datestr ;
  }
            public String getDay() {
    String datestr =  ““ ;
    try {
    java.text.DateFormat df = new java.text.SimpleDateFormat(“yyyy-M-d“) ;
    datestr = df.format(new java.util.Date()) ;    }
    catch (Exception ex) {    }
    return datestr ;
  }
  public String getWeek() {
    String datestr =  ““ ;
    try {
    java.text.DateFormat df = new java.text.SimpleDateFormat(“E“) ;
    datestr = df.format(new java.util.Date()) ;     }
    catch (Exception ex) {    }
    return datestr ;
 }
 public int getTime1ToTime2(String Time1) {
    String StrDate=Time1;
int i=StrDate.indexOf(“-“);
String ip1=StrDate.substring(0i);
StrDate=StrDate.substring(i+1StrDate.length());
i=StrDate.indexOf(“-“);
St

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2012-10-19 17:54  网站流量统计web(jsp)源代码\
     目录           0  2012-10-19 17:54  网站流量统计web(jsp)源代码\count\
     文件        6418  2012-01-07 11:13  网站流量统计web(jsp)源代码\count\FAddress.jsp
     文件        6422  2012-01-07 10:46  网站流量统计web(jsp)源代码\count\FBrowser.jsp
     文件        6548  2012-01-07 11:14  网站流量统计web(jsp)源代码\count\FCounter.jsp
     文件        6246  2012-01-07 11:14  网站流量统计web(jsp)源代码\count\FIpone.jsp
     文件        6465  2012-01-07 11:14  网站流量统计web(jsp)源代码\count\FIptwo.jsp
     文件        6496  2012-01-07 11:15  网站流量统计web(jsp)源代码\count\FReferer.jsp
     文件        6391  2012-01-07 11:16  网站流量统计web(jsp)源代码\count\FScreen.jsp
     文件        6418  2012-01-07 11:16  网站流量统计web(jsp)源代码\count\FSystem.jsp
     文件        3841  2012-01-09 09:03  网站流量统计web(jsp)源代码\count\FVisitor.jsp
     文件        1955  2012-01-07 12:05  网站流量统计web(jsp)源代码\count\Fuserdata.jsp
     目录           0  2012-10-19 17:54  网站流量统计web(jsp)源代码\count\Image\
     文件          91  2003-04-17 23:10  网站流量统计web(jsp)源代码\count\Image\Bar.gif
     文件         829  2003-02-11 14:32  网站流量统计web(jsp)源代码\count\Image\Bar1.gif
     文件         881  2003-02-11 14:32  网站流量统计web(jsp)源代码\count\Image\Failure.gif
     文件       21640  2003-02-11 18:21  网站流量统计web(jsp)源代码\count\Image\Header.gif
     文件         272  2003-03-15 02:02  网站流量统计web(jsp)源代码\count\Image\OK代替.GIF
     文件         879  2003-02-11 14:32  网站流量统计web(jsp)源代码\count\Image\Success.gif
     文件         650  2003-03-20 20:18  网站流量统计web(jsp)源代码\count\Image\ok.gif
     文件        1306  2003-03-19 09:33  网站流量统计web(jsp)源代码\count\Image\oka.gif
     文件         633  2003-03-23 17:29  网站流量统计web(jsp)源代码\count\link.CSS
     文件        6655  2012-01-07 11:18  网站流量统计web(jsp)源代码\count\StatDay.jsp
     文件        6740  2012-01-07 11:29  网站流量统计web(jsp)源代码\count\StatMonth.jsp
     文件        6857  2012-01-07 11:18  网站流量统计web(jsp)源代码\count\StatWeek.jsp
     文件        6684  2012-01-07 11:18  网站流量统计web(jsp)源代码\count\StatYear.jsp
     目录           0  2012-01-09 10:26  网站流量统计web(jsp)源代码\count\WEB-INF\
     目录           0  2012-01-09 10:26  网站流量统计web(jsp)源代码\count\WEB-INF\classes\
     目录           0  2012-10-19 17:54  网站流量统计web(jsp)源代码\count\WEB-INF\classes\feng\
     文件        4902  2012-01-06 09:54  网站流量统计web(jsp)源代码\count\WEB-INF\classes\feng\jdbc.class
     文件        6130  2012-01-06 09:51  网站流量统计web(jsp)源代码\count\WEB-INF\classes\feng\jdbc.java
............此处省略60个文件信息

评论

共有 条评论