📄 sysconfbean.java
字号:
+" COLOR:"+(String)hash.get("txt_h")+"; FONT-FAMILY: 仿宋,宋体; TEXT-DECORATION: none\r\n"
+"}\r\n"
+"h:link\r\n"
+"{\r\n"
+" COLOR:"+(String)hash.get("txt_h_link")+";TEXT-DECORATION: none\r\n"
+"}\r\n"
+"h:hover\r\n"
+"{\r\n"
+" COLOR:"+(String)hash.get("txt_h_hover")+";TEXT-DECORATION: none\r\n"
+"}\r\n"
+"h:unknown\r\n"
+"{\r\n"
+" COLOR:#FFFFFF;TEXT-DECORATION: none\r\n"
+"}\r\n"
+".f_lefttitle\r\n"
+"{\r\n"
+" COLOR:"+(String)hash.get("txt_f_lefttitle")+";font-size:15pt; font-weight: 1; font-family: FONT-FAMILY: 'song', 'MS Shell Dlg','宋体';\r\n"
+"}\r\n"
+".f_title\r\n"
+"{\r\n"
+" COLOR:"+(String)hash.get("txt_f_title")+";\r\n"
+"}\r\n"
+".f_login\r\n"
+"{\r\n"
+" COLOR:"+(String)hash.get("txt_f_login")+";\r\n"
+"}\r\n"
+".f_pic\r\n"
+"{\r\n"
+" COLOR:"+(String)hash.get("txt_f_pic")+";\r\n"
+"}\r\n"
+".f_title\r\n"
+"{\r\n"
+" COLOR:"+(String)hash.get("txt_f_title")+";\r\n"
+"}\r\n"
+".f_topic\r\n"
+"{\r\n"
+" COLOR:"+(String)hash.get("txt_f_topic")+";\r\n"
+"}\r\n"
+".f_query\r\n"
+"{\r\n"
+" COLOR:"+(String)hash.get("txt_f_query")+";\r\n"
+"}\r\n"
+".f_list1\r\n"
+"{\r\n"
+" COLOR:"+(String)hash.get("txt_f_list1")+";\r\n"
+"}\r\n"
+".f_list2\r\n"
+"{\r\n"
+" COLOR:"+(String)hash.get("txt_f_list2")+";\r\n"
+"}\r\n"
+".f_list\r\n"
+"{\r\n"
+" COLOR:"+(String)hash.get("txt_f_list")+";\r\n"
+"}\r\n"
+".bg_line\r\n"
+"{\r\n"
+" background-color::"+(String)hash.get("txt_bg_line")+";\r\n"
+"}\r\n"
+".bg_line1\r\n"
+"{\r\n"
+" background-color::"+(String)hash.get("txt_bg_line1")+";\r\n"
+"}\r\n"
+".bg_pic\r\n"
+"{\r\n"
+" background-color::"+(String)hash.get("txt_bg_pic")+";\r\n"
+"}\r\n"
+".bg_topic\r\n"
+"{\r\n"
+" background-color::"+(String)hash.get("txt_bg_topic")+";\r\n"
+"}\r\n"
+".bg_left\r\n"
+"{\r\n"
+" background-color::"+(String)hash.get("txt_bg_left")+";\r\n"
+"}\r\n"
+".bg_query\r\n"
+"{\r\n"
+" background-color::"+(String)hash.get("txt_bg_query")+";\r\n"
+"}\r\n"
+".bg_right\r\n"
+"{\r\n"
+" background-color::"+(String)hash.get("txt_bg_right")+";\r\n"
+"}\r\n"
+".bg_child\r\n"
+"{\r\n"
+" background-color::"+(String)hash.get("txt_bg_child")+";\r\n"
+"}\r\n"
+".flyline\r\n"
+"{\r\n"
+" background-color::"+(String)hash.get("txt_flyline")+";\r\n"
+"}\r\n"
+".flybg1\r\n"
+"{\r\n"
+" background-color::"+(String)hash.get("txt_flybg1")+";\r\n"
+"}\r\n"
+".flybg2\r\n"
+"{\r\n"
+" background-color::"+(String)hash.get("txt_flybg2")+";\r\n"
+"}\r\n"
+".flyfont1\r\n"
+"{\r\n"
+" background-color::"+(String)hash.get("txt_flyfont1")+";\r\n"
+"}\r\n"
+".flyfont2\r\n"
+"{\r\n"
+" background-color::"+(String)hash.get("txt_flyfont2")+";\r\n"
+"}\r\n"
+"\r\n\r\n\r\n.fashion\r\n"
+"{\r\n"
+"BACKGROUND: D0E7FF; border:1 solid #CCCCCC; COLOR: #000000; FONT-SIZE: 9pt; FONT-STYLE: normal; FONT-VARIANT: normal; FONT-WEIGHT: normal; HEIGHT: 18px; LINE-HEIGHT: normal\r\n"
+"}\r\n"
+".txtframe\r\n"
+"{\r\n"
+" border-style: double; border-color: #CCCCCC\r\n"
+"}\r\n"
+".chkfashion\r\n"
+"{\r\n"
+" border-style: double; border-color: #3399FF\r\n"
+"}\r\n"
+".selectfashion\r\n"
+"{\r\n"
+" border-style: double;border-color: #CCCCCC; FONT-SIZE: 9pt;\r\n"
+"}"
);
}
//追加一个字符串
protected void appendCssStr(String file,String str)
{
DealFile df = new DealFile();
df.connFIS(file);
str = df.readCHStr()+str;
df.closeFIS();
df.connFOS(file);
df.writeCHStr(str);
df.closeFOS();
}
//取得css文件中颜色值
public Hashtable getCSSCOLOR(String path,String cssfile)
{
Hashtable hash = new Hashtable();
DealFile df = new DealFile();
df.connFIS(path+cssfile);
hash.put("txt_a_link",df.substring("A:link","COLOR:",7).toUpperCase());
hash.put("txt_a_hover",df.substring("A:hover","COLOR:",7).toUpperCase());
hash.put("txt_a_visited",df.substring("A:visited","COLOR:",7).toUpperCase());
hash.put("txt_h",df.substring("h","COLOR:",7).toUpperCase());
hash.put("txt_h_link",df.substring("h:link","COLOR:",7).toUpperCase());
hash.put("txt_h_hover",df.substring("h:hover","COLOR:",7).toUpperCase());
hash.put("txt_h_visited",df.substring("h:visited","COLOR:",7).toUpperCase());
hash.put("txt_h_unknown",df.substring("h:unknown","COLOR:",7).toUpperCase());
hash.put("txt_f_lefttitle",df.substring("f_lefttitle","COLOR:",7).toUpperCase());
hash.put("txt_f_title",df.substring("f_title","COLOR:",7).toUpperCase());
hash.put("txt_f_login",df.substring("f_login","COLOR:",7).toUpperCase());
hash.put("txt_f_pic",df.substring("f_pic","COLOR:",7).toUpperCase());
hash.put("txt_f_topic",df.substring("f_topic","COLOR:",7).toUpperCase());
hash.put("txt_f_query",df.substring("f_query","COLOR:",7).toUpperCase());
hash.put("txt_f_list1",df.substring("f_list1","COLOR:",7).toUpperCase());
hash.put("txt_f_list2",df.substring("f_list2","COLOR:",7).toUpperCase());
hash.put("txt_f_list",df.substring("f_list","COLOR:",7).toUpperCase());
hash.put("txt_bg_line",df.substring("bg_line","background-color:",7).toUpperCase());
hash.put("txt_bg_line1",df.substring("bg_line1","background-color:",7).toUpperCase());
hash.put("txt_bg_pic",df.substring("bg_pic","background-color:",7).toUpperCase());
hash.put("txt_bg_topic",df.substring("bg_topic","background-color:",7).toUpperCase());
hash.put("txt_bg_left",df.substring("bg_left","background-color:",7).toUpperCase());
hash.put("txt_bg_query",df.substring("bg_query","background-color:",7).toUpperCase());
hash.put("txt_bg_right",df.substring("bg_right","background-color:",7).toUpperCase());
hash.put("txt_bg_child",df.substring("bg_child","background-color:",7).toUpperCase());
hash.put("txt_flyline",df.substring("flyline","background-color:",7).toUpperCase());
hash.put("txt_flybg1",df.substring("flybg1","background-color:",7).toUpperCase());
hash.put("txt_flybg2",df.substring("flybg2","background-color:",7).toUpperCase());
hash.put("txt_flyfont1",df.substring("flyfont1","COLOR:",7).toUpperCase());
hash.put("txt_flyfont2",df.substring("flyfont2","COLOR:",7).toUpperCase());
df.closeFIS();
return hash;
}
public String getBMBH(String strPersonNO)//取得当前人员所在部门的部门编号new
{
String sql = "";
String name = "";
sql = " select BMBH from news.ZZ_ZGB where ZGBH = '"+strPersonNO+"'";
ResultSet rs = selectRecord(sql);
Statement stmt = null;
try{
if(rs.next())
name = ds.toString(rs.getString("BMBH"));
}catch(Exception e){System.out.println("运行时出错:"+e);}
finally{
if(rs!=null)try{ stmt = rs.getStatement(); rs.close();}catch(Exception e){System.out.println("关闭记录集rs时出错"+e);}
if(stmt!=null) try{stmt.close();}catch(Exception e){System.out.println("关闭声明时statement出错"+e);}
}
return name;
}
public String isWho(String zgbh)
{//判断当前人员的身份new
String bmno = getBMBH(zgbh);
String sql = "";
String admin="",ws="";
if(bmno!=null && !bmno.equals(""))
sql = " select GLYZWBH,WSZWBH from news.ZZ_BMB where BMBH = '"+bmno+"'";
ResultSet rs = selectRecord(sql);
Statement stmt = null;
try{
if(rs.next())
{
admin = ds.toString(rs.getString("GLYZWBH"));
ws = ds.toString(rs.getString("WSZWBH"));
if(admin.equals(zgbh) || (admin.equals(zgbh) && ws.equals(zgbh)))
return "bmadmin";
else if(ws.equals(zgbh))
return "bmws";
}
}catch(Exception e){System.out.println("运行时出错:"+e);}
finally{
if(rs!=null)try{ stmt = rs.getStatement(); rs.close();}catch(Exception e){System.out.println("关闭记录集rs时出错"+e);}
if(stmt!=null) try{stmt.close();}catch(Exception e){System.out.println("关闭声明时statement出错"+e);}
}
return "person";
}
//是否可以给文章发表评论
public int setCom(String id)
{
String sql = "";
Vector vect = new Vector();
vect.add("COMCONFB");
vect.add(addVector("ISFREE",id,"CHAR"));
sql = "select * from news.COMCONFB";
ResultSet rs = selectRecord(sql);
Statement stmt = null;
try{
if(!rs.next())
return insertRecord(vect);
}catch(Exception e){System.out.println("运行时出错:"+e);}
finally{
if(rs!=null)try{ stmt = rs.getStatement(); rs.close();}catch(Exception e){System.out.println("关闭记录集rs时出错"+e);}
if(stmt!=null) try{stmt.close();}catch(Exception e){System.out.println("关闭声明时statement出错"+e);}
}
sql = "update news.COMCONFB set ISFREE = "+id+"";
executeUpdate(sql);
return 0;
}
public static void main(String args[])
{
SysConfBean mb = new SysConfBean();
//mb.setType(16);
//mb.setID("1");
System.out.println("begin\r\n\r\n");
Hashtable hash= new Hashtable();
//hash.put("Num","3");
//hash.put("Height","120");
//hash.put("Width","120");
//hash.put("Num","20");
//hash.put("IsShowtime","1");
//hash.put("STYLE","蔚蓝");
//hash.put("FILENAME","css1.css");
//hash.put("ISNOW","1");
//mb.setFtp("zouchen:0680@ftp:192.168.0.63");
//mb.addCss(hash);
//mb.setMain(hash);
//mb.setPic(hash);
//String path= "D:";
hash.put("BODY","BODY {"+"\r"+" FONT-SIZE: 14px"+"\r"+"}");
hash.put("TABLE","TABLE {FONT-SIZE: 12px}");
//mb.newCssFile(hash,path);
//System.out.println(mb.getData());
//System.out.println(mb.toName("1"));
//System.out.println(mb.getCSSCOLOR("css1.css"));
mb.initMain();
System.out.println("\r\n\r\nend");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -