Exemplo n.º 1
0
  public String getClassNavigation(String classid, String lessonid) {
    String s_navigation;
    beanGetdata bgd = new beanGetdata();
    s_navigation = getClassNavigation(classid);

    bgd.executeSelect("SELECT class_name FROM t_class WHERE class_id = '" + classid + "'");
    s_navigation =
        s_navigation
            + "&gt;<A href=\"chapterList?reload=true&classid="
            + classid
            + "\" target=left>"
            + bgd.getFieldValue("class_name", 0)
            + "</A>";

    if (!lessonid.endsWith("000")) {
      lessonid = lessonid.substring(0, 3) + "000";
      bgd.executeSelect(
          "SELECT lesson_name FROM t_lesson WHERE class_id = '"
              + classid
              + "' AND lesson_id = '"
              + lessonid
              + "'");
      s_navigation =
          s_navigation
              + "&gt;<A href=\"chapterList?action=showDetail&classid="
              + classid
              + "&lessonid="
              + lessonid
              + "\">"
              + bgd.getFieldValue("lesson_name", 0)
              + "</A>";
    }
    return s_navigation;
  }
Exemplo n.º 2
0
 public String getSignature(String userid) {
   beanGetdata bgd = new beanGetdata();
   bgd.executeSelect("select signature from t_user where user_id = '" + userid + "'");
   if (bgd.getRowCount() < 1) {
     return "";
   } else {
     return "<BR><BR>------------------------------------------------------------------------------------<BR>"
         + strFormat(bgd.getFieldValue(1, 0));
   }
 }
Exemplo n.º 3
0
 public String getDBDate() {
   beanGetdata getData = new beanGetdata();
   getData.executeSelect(
       "SELECT getdate() AS getdate FROM t_code WHERE code_id = '0000' AND code_value = '0001'");
   return getData.getFieldValue("getdate", 0);
 }
Exemplo n.º 4
0
 // 获取用户权限
 public String getUserRight(String userid) {
   beanGetdata bgd = new beanGetdata();
   bgd.executeSelect("select user_right from t_user where user_id = '" + userid + "'");
   if (bgd.getRowCount() == 0) return "0";
   return bgd.getFieldValue("user_right", 0);
 }
Exemplo n.º 5
0
 // 判断是不是管理员
 public boolean isAdmin(String userid) {
   beanGetdata bgd = new beanGetdata();
   bgd.executeSelect("select user_right from t_user where user_id = '" + userid + "'");
   if (bgd.getRowCount() == 0) return false;
   return isMenuShow(parseRight("6"), bgd.getFieldValue("user_right", 0));
 }