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

📄 abc.java

📁 本系统分两部分管理,前台用于文章发布和用户文章发表,后台有管理员审核和不同权限的用户管理,具有高稳定性和安全性。整个站的全部数据逻辑运算完全有beans封装, 具有界面简洁、功能强大、操作方便等特点。
💻 JAVA
字号:
package com.ntsky;import java.sql.*;import java.util.*;import com.ntsky.common.*;import com.ntsky.database.*;import com.ntsky.persistence.*;public class abc {    private SQLDBOperator sdbo=null;    public void insSql(int myOther,int classId,int kindId,String headTitle,String content,String connect,String author,String editor,String newsFrom,int hits,int top,int state,int tag,String newsTime){        ResultSet rs=null;        if (sdbo==null)            sdbo = SQLDBOperator.getInstance("Connection");        String strSql = "insert into news(myOther,classId,kindId,headTitle,content,connect,author,editor,newsFrom,hits,top,state,tag,newsTime) values("+myOther+",'"+classId+"','"+kindId+"','"+headTitle+"','"+content+"','"+connect+"','"+author+"','"+editor+"','"+newsFrom+"',"+hits+","+top+","+state+","+tag+",'"+newsTime+"');";        try{            rs = sdbo.executeQuery(strSql);        }        catch(Exception sqlE){            System.out.print("NewsShow topNews() " +sqlE.getMessage());            Debug.writeLog("NewsShow topNews(), Exception Occured ! Info :" + sqlE.getLocalizedMessage());        }        finally{            sdbo.Close();        }    }    /**     *     */    public void insSql1(String userName,String passWd,int sex,String question,String answer,String emailAddr,String qq,String http,String regTime){        ResultSet rs=null;        if (sdbo==null)            sdbo = SQLDBOperator.getInstance("Connection");        String strSql = "insert into newsusr(userName,passWd,sex,question,answer,emailAddr,qq,http,regTime) values('"+userName+"','"+passWd+"',"+sex+",'"+question+"','"+answer+"','"+emailAddr+"','"+qq+"','"+http+"','"+regTime+"');";        try{            rs = sdbo.executeQuery(strSql);        }        catch(Exception sqlE){            System.out.print("NewsShow topNews() " +sqlE.getMessage());            Debug.writeLog("NewsShow topNews(), Exception Occured ! Info :" + sqlE.getLocalizedMessage());        }        finally{            sdbo.Close();        }    }    public void insql2(int noteId,String userName,String email,String qq,String url,String headTitle,String content,String image,String noteTime){        ResultSet rs=null;        if (sdbo==null)            sdbo = SQLDBOperator.getInstance("Connection");        String strSql = "insert into NOTEGuest(noteId,userName,email,qq,url,headTitle,content,image,noteTime) values('"+noteId+"','"+userName+"','"+email+"','"+qq+"','"+url+"','"+headTitle+"','"+content+"','"+image+"','"+noteTime+"');";        try{            rs = sdbo.executeQuery(strSql);        }        catch(Exception sqlE){            System.out.print("NewsShow topNews() " +sqlE.getMessage());            Debug.writeLog("NewsShow topNews(), Exception Occured ! Info :" + sqlE.getLocalizedMessage());        }        finally{            sdbo.Close();        }    }}

⌨️ 快捷键说明

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