锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久久久久久亚洲Av无码,亚洲va无码专区国产乱码,亚洲精品av无码喷奶水糖心http://www.tkk7.com/nakupenda77/鎶鏈崥瀹?/description>zh-cnThu, 10 Jul 2025 03:09:08 GMTThu, 10 Jul 2025 03:09:08 GMT60涓涓畝鍗曠殑鍏充簬鏉冮檺鍒ゆ柇鐧婚檰鐨刯avaBean鏂囦歡http://www.tkk7.com/nakupenda77/archive/2012/05/26/379292.htmlL榪佸L榪佸Sat, 26 May 2012 12:06:00 GMThttp://www.tkk7.com/nakupenda77/archive/2012/05/26/379292.htmlhttp://www.tkk7.com/nakupenda77/comments/379292.htmlhttp://www.tkk7.com/nakupenda77/archive/2012/05/26/379292.html#Feedback1http://www.tkk7.com/nakupenda77/comments/commentRss/379292.htmlhttp://www.tkk7.com/nakupenda77/services/trackbacks/379292.htmlpackage userce;

import java.sql.*;
import java.io.*;
import java.util.*;
public class UserCheck {
  Connection con;
  ResultSet rs;
  public UserCheck() { }
  public Connection getConnect(){銆//榪炴帴鏁版嵁搴撶殑錛屼笉鐢ㄥ湪澶氳浜嗗惂
   try{
        Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
        }
   catch(ClassNotFoundException e){}
        String url = "jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=flDataSource";
        String name = "sa";//寤鴻璁捐鏁版嵁搴撴椂錛屼笉瑕佺敤榛樿鐨剆a,鍙互寤虹珛涓涓湁鎿嶄綔鏉冮檺鐨勭敤鎴鳳紱
        String pass = "sa";
    try{
        con = DriverManager.getConnection(url,name,pass);
        }
    catch(SQLException e){}
        return con;
  }
 public  boolean userExist(String username){
    Connection con=null;
    PreparedStatement ps=null;
    ResultSet rs=null;
    boolean occupied=true;
    try{
       String sqlquery="select *from Userlist where username=?";
       con=this.getConnect();
       //this.getConnect()=getConnect();//鍏充簬this 鐨勭敤娉曪紝鎴戝埌鐜板湪鐞嗚В鐨勪篃涓嶆槸澶忓交錛屾垜榪欐牱鐢紝鍦ㄥ疄闄呮搷浣滀腑鏄氳繃鐨勶紝濡傛灉鏈変笉濡ヤ箣澶勶紝璇烽珮鎵嬫寚鏁欙紟
       ps=con.prepareStatement(sqlquery);
       ps.setString(2,username);
       rs=ps.executeQuery();
       if(!rs.next())
         occupied=false;
    }
    catch(SQLException e){
       e.printStackTrace();
    }
    finally{
      if(rs!=null) try{rs.close();}
                   catch(SQLException ignore){}
      if(ps!=null) try{ps.close();}
                   catch(SQLException ignore){}
      if(con!=null) try{con.close();}
                   catch(SQLException ignore){}
    }
    return occupied;
 }
public boolean isValidUser(String username,String userpwd){//姝ゅ嚱鏁扮敤鏉ュ垽鏂槸鍚︽湁姝ょ敤鎴?鍏跺疄寰堝ソ鐞嗚В鎴戝畾涔夋垚boolean鍨嬶紝灝卞彲浠ユ牴鎹繑鍥炲兼潵榪涜涓涓?lt;jsp:forword錛濓紓mmm.jsp錛?gt;.
   Connection con=null;
   PreparedStatement ps=null;
   ResultSet rs=null;
   boolean isValid=false;
   try{
      String sqlquery="select *from Userlist where username=? and userpwd=?";
      con=this.getConnect();
      ps=con.prepareStatement(sqlquery);
      ps.setString(1,username);
      ps.setString(2,userpwd);
      rs=ps.executeQuery();
      if(rs.next())
        isValid=true;
   }
   catch(SQLException e){
      e.printStackTrace();
   }
   finally{
         if(rs!=null) try{rs.close();}
                      catch(SQLException ignore){}
         if(ps!=null) try{ps.close();}
                      catch(SQLException ignore){}
         if(con!=null) try{con.close();}
                      catch(SQLException ignore){}
   }
   return isValid;
 }
  public int getUserPri(String username){  //嬈℃柟娉曟垜鐢ㄦ潵鏍規嵁浼犲叆鐨勫弬鏁幫細username錛堟垜璁劇疆session鏃訛紝鐢ㄧ殑涔熸槸username,鏍規嵁媯绱㈡暟鎹簱涓殑0錛?鏍囧織浣嶏紝鏉ュ垽鏂敤鎴風殑鏉冮檺錛岃繖鏍峰氨鍙互榪涜鐩稿簲鐨勬搷浣滐紟錛?br />    Connection con=null;
    PreparedStatement ps=null;
    ResultSet rs=null;
    int pri=0;
    try{
      String sqlquery="select variety from Userlist where username=? ";
      con=this.getConnect();
      ps=con.prepareStatement(sqlquery);
      ps.setString(1,username);
      rs=ps.executeQuery();
      if(rs.next())
        pri=rs.getInt("variety");
    }
    catch(SQLException e){
        e.printStackTrace();
    }
    finally{
       if(rs!=null) try{rs.close();}
                    catch(SQLException ignore){}
       if(ps!=null) try{ps.close();}
                    catch(SQLException ignore){}
       if(con!=null) try{con.close();}
                    catch(SQLException ignore){}

    }
    return pri;
  }
}



]]>
主站蜘蛛池模板: 任你躁在线精品免费| 精品97国产免费人成视频| 18以下岁毛片在免费播放| 国产V亚洲V天堂A无码| 91成人免费观看在线观看| 亚洲国产综合无码一区| 99久久免费国产特黄| 亚洲国产精品高清久久久| 久久这里只精品99re免费| 亚洲妓女综合网99| 最近中文字幕免费mv视频8| 亚洲国产精华液2020| 国产精品久久香蕉免费播放| 亚洲av日韩专区在线观看| 四虎影院永久免费观看| eeuss影院www天堂免费| 亚洲国产一二三精品无码| 亚洲免费在线视频观看| 亚洲狠狠成人综合网| 亚洲国产婷婷香蕉久久久久久| 天堂在线免费观看| 337p日本欧洲亚洲大胆精品555588| 无码国产精品一区二区免费式影视| 中文字幕亚洲情99在线| 亚洲精品成人区在线观看| 丁香花在线视频观看免费 | mm1313亚洲精品无码又大又粗| 免费精品国产自产拍在线观看| 亚洲αv在线精品糸列| 日本zzzzwww大片免费| 亚洲AV无码片一区二区三区| 亚洲欧洲中文日韩久久AV乱码| 久久午夜夜伦鲁鲁片无码免费| 亚洲卡一卡二卡乱码新区| 国产亚洲精品免费视频播放| **一级毛片免费完整视| 美女18一级毛片免费看| 亚洲国产二区三区久久| 日本免费人成黄页网观看视频| 久久国产免费观看精品| 亚洲国产区男人本色|