Package com.jeecms.cms.entity.main

Examples of com.jeecms.cms.entity.main.CmsUser


      return UploadResponse.getInvalidResourceTypeError(request);
    }
    if (!UploadUtils.isValidPath(currentFolderStr)) {
      return UploadResponse.getInvalidCurrentFolderError(request);
    }
    CmsUser user = CmsUtils.getUser(request);
    // 未登录,无权上传图片
    if (user == null) {
      log.warn("member fck upload warn: not logged in.");
      return UploadResponse.getFileUploadDisabledError(request);
    }
View Full Code Here


  @RequestMapping(value = "/member/collection_list.jspx")
  public String collection_list(String queryTitle, Integer queryChannelId,
      Integer pageNo, HttpServletRequest request,
      HttpServletResponse response, ModelMap model) {
    CmsSite site = CmsUtils.getSite(request);
    CmsUser user = CmsUtils.getUser(request);
    FrontUtils.frontData(request, model, site);
    MemberConfig mcfg = site.getConfig().getMemberConfig();
    // 没有开启会员功能
    if (!mcfg.isMemberOn()) {
      return FrontUtils.showMessage(request, model, "member.memberClose");
    }
    if (user == null) {
      return FrontUtils.showLogin(request, model, site);
    }
    Pagination p = contentMng.getPageForCollection(site.getId(), user
        .getId(), cpn(pageNo), CookieUtils.getPageSize(request));
    model.addAttribute("pagination", p);
    if (!StringUtils.isBlank(queryTitle)) {
      model.addAttribute("queryTitle", queryTitle);
    }
View Full Code Here

  @RequestMapping(value = "/member/collect.jspx")
  public void collect(Integer cId, Integer operate,
      HttpServletRequest request, HttpServletResponse response,
      ModelMap model) throws JSONException {
    CmsUser user = CmsUtils.getUser(request);
    JSONObject object = new JSONObject();
    if (user == null) {
      object.put("result", false);
    } else {
      object.put("result", true);
View Full Code Here

  @RequestMapping(value = "/member/collect_exist.jspx")
  public void collect_exist(Integer cId, HttpServletRequest request,
      HttpServletResponse response, ModelMap model) throws JSONException {
    CmsSite site = CmsUtils.getSite(request);
    FrontUtils.frontData(request, model, site);
    CmsUser user = CmsUtils.getUser(request);
    JSONObject object = new JSONObject();
    FrontUtils.frontData(request, model, site);
    if (user == null) {
      object.put("result", false);
    } else {
      if (user.getCollectContents().contains(contentMng.findById(cId))) {
        object.put("result", true);
      } else {
        object.put("result", false);
      }
    }
View Full Code Here

      Boolean mark,
      @RequestParam(value = "uploadFile", required = false) MultipartFile file,
      HttpServletRequest request, ModelMap model) {
    WebErrors errors = validate(filename, file, request);
    CmsSite site = CmsUtils.getSite(request);
    CmsUser user = CmsUtils.getUser(request);
    FrontUtils.frontData(request, model, site);
    MemberConfig mcfg = site.getConfig().getMemberConfig();
    if (!mcfg.isMemberOn()) {
      return FrontUtils.showMessage(request, model, "member.memberClose");
    }
View Full Code Here

    model.addAttribute("imgSrcPath", imgSrcPath);
    model.addAttribute("zoomWidth", zoomWidth);
    model.addAttribute("zoomHeight", zoomHeight);
    model.addAttribute("uploadNum", uploadNum);
    CmsSite site = CmsUtils.getSite(request);
    CmsUser user = CmsUtils.getUser(request);
    FrontUtils.frontData(request, model, site);
    MemberConfig mcfg = site.getConfig().getMemberConfig();
    if (!mcfg.isMemberOn()) {
      return FrontUtils.showMessage(request, model, "member.memberClose");
    }
View Full Code Here

   */
  @RequestMapping(value = "/member/mycomments.jspx")
  public String mycomments(Integer pageNo, HttpServletRequest request,
      HttpServletResponse response, ModelMap model) {
    CmsSite site = CmsUtils.getSite(request);
    CmsUser user = CmsUtils.getUser(request);
    FrontUtils.frontData(request, model, site);
    MemberConfig mcfg = site.getConfig().getMemberConfig();
    // 没有开启会员功能
    if (!mcfg.isMemberOn()) {
      return FrontUtils.showMessage(request, model, "member.memberClose");
    }
    if (user == null) {
      return FrontUtils.showLogin(request, model, site);
    }
    Pagination pagination = commentMng.getPageForMember(site.getId(), null,
        user.getId(), null, null, null, null, true, cpn(pageNo),
        CookieUtils.getPageSize(request));
    model.addAttribute("pagination", pagination);
    return FrontUtils.getTplPath(request, site.getSolutionPath(),
        TPLDIR_COMMENT, COMMENT_LIST);
  }
View Full Code Here

   */
  @RequestMapping(value = "/member/comment_replay.jspx")
  public String guestbook_replay(Integer id, String nextUrl,HttpServletRequest request,
      HttpServletResponse response, ModelMap model) {
    CmsSite site = CmsUtils.getSite(request);
    CmsUser user = CmsUtils.getUser(request);
    FrontUtils.frontData(request, model, site);
    MemberConfig mcfg = site.getConfig().getMemberConfig();
    // 没有开启会员功能
    if (!mcfg.isMemberOn()) {
      return FrontUtils.showMessage(request, model, "member.memberClose");
View Full Code Here

   */
  @RequestMapping(value = "/member/news_comments.jspx")
  public String news_comments(Integer pageNo, HttpServletRequest request,
      HttpServletResponse response, ModelMap model) {
    CmsSite site = CmsUtils.getSite(request);
    CmsUser user = CmsUtils.getUser(request);
    FrontUtils.frontData(request, model, site);
    MemberConfig mcfg = site.getConfig().getMemberConfig();
    // 没有开启会员功能
    if (!mcfg.isMemberOn()) {
      return FrontUtils.showMessage(request, model, "member.memberClose");
    }
    if (user == null) {
      return FrontUtils.showLogin(request, model, site);
    }
    Pagination pagination = commentMng.getPageForMember(site.getId(), null,
        null, user.getId(), null, null, null, true, cpn(pageNo),
        CookieUtils.getPageSize(request));
    model.addAttribute("pagination", pagination);
    return FrontUtils.getTplPath(request, site.getSolutionPath(),
        TPLDIR_COMMENT, COMMENT_MNG);
  }
View Full Code Here

  @RequestMapping(value = "/member/comment_delete.jspx")
  public String delete(Integer commentId, Integer userId, String ip,
      Integer pageNo, String nextUrl, HttpServletRequest request,
      HttpServletResponse response, ModelMap model) {
    CmsSite site = CmsUtils.getSite(request);
    CmsUser user = CmsUtils.getUser(request);
    FrontUtils.frontData(request, model, site);
    MemberConfig mcfg = site.getConfig().getMemberConfig();
    // 没有开启会员功能
    if (!mcfg.isMemberOn()) {
      return FrontUtils.showMessage(request, model, "member.memberClose");
    }
    if (user == null) {
      return FrontUtils.showLogin(request, model, site);
    }
    // 删除单条评论
    CmsComment bean;
    if (commentId != null) {
      bean = commentMng.deleteById(commentId);
      log.info("delete CmsComment id={}", bean.getId());
    } else {
      // 依据评论人或者评论ip删除评论
      List<CmsComment> comments = commentMng.getListForDel(site.getId(),
          user.getId(), userId, ip);
      for (int i = 0; i < comments.size(); i++) {
        bean = comments.get(i);
        commentMng.deleteById(comments.get(i).getId());
        log.info("delete CmsComment id={}", bean.getId());
      }
View Full Code Here

TOP

Related Classes of com.jeecms.cms.entity.main.CmsUser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.