コード例 #1
0
 @RequestMapping(value = "/topic/search*.jhtml")
 public String searchSubmit(Integer pageNo, HttpServletRequest request, ModelMap model) {
   CmsSite site = CmsUtils.getSite(request);
   FrontUtils.frontData(request, model, site);
   String keywords = RequestUtils.getQueryParam(request, "keywords");
   String forumIdStr = RequestUtils.getQueryParam(request, "forumId");
   Integer forumId = 0;
   if (forumIdStr != null && StringUtils.isNotBlank(forumIdStr)) {
     forumId = Integer.parseInt(forumIdStr);
   }
   model.put("keywords", keywords);
   model.put("forumId", forumId);
   FrontUtils.frontPageData(request, model);
   return FrontUtils.getTplPath(request, site, TPLDIR_SPECIAL, SEARCH_RESULT);
 }
コード例 #2
0
ファイル: DataAct.java プロジェクト: Chenghongchao/jeecms
 @RequestMapping(value = "/data/v_rename.do")
 public String renameInput(HttpServletRequest request, ModelMap model) {
   String name = RequestUtils.getQueryParam(request, "name");
   String origName = name.substring(Constants.BACKUP_PATH.length());
   model.addAttribute("origName", origName);
   return "data/rename";
 }
コード例 #3
0
ファイル: DataAct.java プロジェクト: Chenghongchao/jeecms
 @RequestMapping("/data/o_delete_single.do")
 public String deleteSingle(
     HttpServletRequest request, ModelMap model, HttpServletResponse response) {
   // TODO 输入验证
   String name = RequestUtils.getQueryParam(request, "name");
   int count = resourceMng.delete(new String[] {name});
   log.info("delete Resource {}, count {}", name, count);
   cmsLogMng.operating(request, "resource.log.delete", "filename=" + name);
   return listBackUpFiles(model, request, response);
 }
コード例 #4
0
ファイル: MysqlDataAct.java プロジェクト: muyutingfeng/jeecms
 @RequiresPermissions("data:o_delete_single")
 @RequestMapping("/mysql/data/o_delete_single.do")
 public String deleteSingle(
     HttpServletRequest request, ModelMap model, HttpServletResponse response) {
   String name = RequestUtils.getQueryParam(request, "name");
   WebErrors errors = validateDelete(new String[] {name}, request);
   if (errors.hasErrors()) {
     return errors.showErrorPage(model);
   }
   int count = resourceMng.delete(new String[] {name});
   log.info("delete Resource {}, count {}", name, count);
   cmsLogMng.operating(request, "resource.log.delete", "filename=" + name);
   return listBackUpFiles(model, request, response);
 }
コード例 #5
0
ファイル: RegisterAct.java プロジェクト: bgarrels/cxldemo
 @RequestMapping(value = "/email_unique.jspx")
 public void emailUnique(HttpServletRequest request, HttpServletResponse response) {
   String email = RequestUtils.getQueryParam(request, "email");
   // email为空,返回false。
   if (StringUtils.isBlank(email)) {
     ResponseUtils.renderJson(response, "false");
     return;
   }
   // email存在,返回false。
   if (unifiedUserMng.emailExist(email)) {
     ResponseUtils.renderJson(response, "false");
     return;
   }
   ResponseUtils.renderJson(response, "true");
 }
コード例 #6
0
 @RequestMapping(value = "/username_unique.jspx")
 public void usernameUnique(HttpServletRequest request, HttpServletResponse response) {
   String username = RequestUtils.getQueryParam(request, "username");
   // 用户名为空,返回false。
   if (StringUtils.isBlank(username)) {
     ResponseUtils.renderJson(response, "false");
     return;
   }
   // 用户名存在,返回false。
   if (unifiedUserMng.usernameExist(username)) {
     ResponseUtils.renderJson(response, "false");
     return;
   }
   ResponseUtils.renderJson(response, "true");
 }
コード例 #7
0
ファイル: RegisterAct.java プロジェクト: bgarrels/cxldemo
 @RequestMapping(value = "/username_unique.jspx")
 public void usernameUnique(HttpServletRequest request, HttpServletResponse response) {
   String username = RequestUtils.getQueryParam(request, "username");
   // 用户名为空,返回false。
   if (StringUtils.isBlank(username)) {
     ResponseUtils.renderJson(response, "false");
     return;
   }
   CmsSite site = CmsUtils.getSite(request);
   CmsConfig config = site.getConfig();
   // 保留字检查不通过,返回false。
   if (!config.getMemberConfig().checkUsernameReserved(username)) {
     ResponseUtils.renderJson(response, "false");
     return;
   }
   // 用户名存在,返回false。
   if (unifiedUserMng.usernameExist(username)) {
     ResponseUtils.renderJson(response, "false");
     return;
   }
   ResponseUtils.renderJson(response, "true");
 }