Example #1
0
 // get site name
 public List getSiteInfo() {
   String sql = "select * from system ";
   DBO dbo = new DBO();
   dbo.open();
   try {
     rs = dbo.executeQuery(sql);
     rs.next();
     list = new ArrayList();
     list.add(rs.getString("sitename")); // 0
     list.add(rs.getString("url")); // 1
     list.add(rs.getString("keyword")); // 2
     list.add(rs.getString("description")); // 3
     list.add(rs.getString("email")); // 4
     list.add(rs.getString("state")); // 5
     list.add(rs.getString("reasons")); // 6
     list.add(rs.getString("record")); // 7
     list.add(rs.getString("copyright")); // 8
     return list;
   } catch (Exception e) {
     e.printStackTrace();
     return list;
   } finally {
     dbo.close();
   }
 }
Example #2
0
 // get site infomation
 public List getSystem() {
   String sql = "select * from system ";
   DBO dbo = new DBO();
   dbo.open();
   try {
     rs = dbo.executeQuery(sql);
     rs.next();
     list = new ArrayList();
     list.add(rs.getString(2));
     list.add(rs.getString(3));
     list.add(rs.getString(4));
     list.add(rs.getString(5));
     list.add(rs.getString(6));
     list.add(rs.getString(7));
     list.add(rs.getString(8));
     list.add(rs.getString(9));
     list.add(rs.getString(10));
     list.add(rs.getString(11));
     return list;
   } catch (Exception e) {
     e.printStackTrace();
     return list;
   } finally {
     dbo.close();
   }
 }
Example #3
0
 // get system dir
 public String getDir() {
   String sql = "select dir from system ";
   DBO dbo = new DBO();
   dbo.open();
   try {
     rs = dbo.executeQuery(sql);
     rs.next();
     String dir = rs.getString(1);
     return dir;
   } catch (Exception e) {
     e.printStackTrace();
     return null;
   } finally {
     dbo.close();
   }
 }