Пример #1
0
 /*    */ @RequestMapping({"/visitViews.jsp"})
 /*    */ public void visitViews(HttpServletRequest request, HttpServletResponse response)
       /*    */ {
   /* 21 */ Site site = ContextTools.getSite(request);
   /* 22 */ String url = ServicesUtils.getQueryParam(request, "url");
   /* 23 */ String ip = ServicesUtils.getIpAddr(request);
   /* 24 */ String cookie = ContextTools.getIdentityCookie(request, response);
   /* 25 */ this.statisticsService.save(site, url, ip, cookie);
   /*    */ }
Пример #2
0
 /*    */ public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
     /*    */ throws IOException, ServletException
       /*    */ {
   /* 41 */ Site site = getSite(request);
   /* 42 */ ContextTools.setSite(site);
   /* 43 */ ContextTools.setSite(request, site);
   /* 44 */ chain.doFilter(request, response);
   /* 45 */ ContextTools.resetSite();
   /*    */ }
Пример #3
0
 /*     */ @RequestMapping(
     value = {"/lockTheme.jsp"},
     method = {org.springframework.web.bind.annotation.RequestMethod.POST})
 /*     */ public String lockTheme(
     Integer[] themeId,
     Date lockTime,
     String reason,
     Integer pn,
     HttpServletRequest request,
     HttpServletResponse response,
     ModelMap model)
       /*     */ {
   /* 128 */ if (themeId != null) {
     /* 129 */ User user = ContextTools.getUser(request);
     /* 130 */ Theme theme = null;
     /* 131 */ for (Integer tid : themeId) {
       /* 132 */ theme = this.themeService.findById(tid);
       /* 133 */ if (theme == null) {
         /* 134 */ return ViewTools.pageNotFound(response);
         /*     */ }
       /* 136 */ if (user == null) {
         /* 137 */ return ViewTools.showLogin(request, model, /* 138 */ "必须登录才可以进行锁定操作!");
         /*     */ }
       /* 140 */ if (user.getAdmin() == null) {
         /* 141 */ return ViewTools.pageNotFound(response);
         /*     */ }
       /* 143 */ this.themeService.lockTheme(tid, user.getId(), lockTime, reason);
       /*     */ }
     /* 145 */ if ((pn != null) && (pn.intValue() > 1)) {
       /* 146 */ return "redirect:" + theme.getForum().getUrl(pn);
       /*     */ }
     /* 148 */ return "redirect:" + theme.getForum().getUrl();
     /*     */ }
   /* 150 */ return ViewTools.pageNotFound(response);
   /*     */ }
Пример #4
0
 /*     */ @RequestMapping(
     value = {"/essenaTheme.jsp"},
     method = {org.springframework.web.bind.annotation.RequestMethod.POST})
 /*     */ public String essenaTheme(
     Integer[] themeId,
     Date essenaTime,
     String reason,
     Integer pn,
     HttpServletRequest request,
     HttpServletResponse response,
     ModelMap model)
       /*     */ {
   /*  68 */ if (themeId != null) {
     /*  69 */ User user = ContextTools.getUser(request);
     /*  70 */ Theme theme = null;
     /*  71 */ for (Integer tid : themeId) {
       /*  72 */ theme = this.themeService.findById(tid);
       /*  73 */ if (theme == null) {
         /*  74 */ return ViewTools.pageNotFound(response);
         /*     */ }
       /*  76 */ if (user == null) {
         /*  77 */ return ViewTools.showLogin(request, model, /*  78 */ "必须登录才可以进行精华操作!");
         /*     */ }
       /*  80 */ if (user.getAdmin() == null) {
         /*  81 */ return ViewTools.pageNotFound(response);
         /*     */ }
       /*  83 */ this.themeService.essenaTheme(tid, user.getId(), essenaTime, reason);
       /*     */ }
     /*  85 */ if ((pn != null) && (pn.intValue() > 1)) {
       /*  86 */ return "redirect:" + theme.getForum().getUrl(pn);
       /*     */ }
     /*  88 */ return "redirect:" + theme.getForum().getUrl();
     /*     */ }
   /*  90 */ return ViewTools.pageNotFound(response);
   /*     */ }
Пример #5
0
 /*     */ @RequestMapping(
     value = {"/deleteTheme.jsp"},
     method = {org.springframework.web.bind.annotation.RequestMethod.POST})
 /*     */ public String deleteTheme(
     Integer[] themeId,
     String reason,
     Integer pn,
     HttpServletRequest request,
     HttpServletResponse response,
     ModelMap model)
       /*     */ {
   /* 242 */ if (themeId != null) {
     /* 243 */ User user = ContextTools.getUser(request);
     /* 244 */ Theme theme = null;
     /* 245 */ for (Integer tid : themeId) {
       /* 246 */ theme = this.themeService.findById(tid);
       /* 247 */ if (theme == null) {
         /* 248 */ return ViewTools.pageNotFound(response);
         /*     */ }
       /* 250 */ if (user == null) {
         /* 251 */ return ViewTools.showLogin(request, model, /* 252 */ "必须登录才可以进行删除操作!");
         /*     */ }
       /* 254 */ if (user.getAdmin() == null) {
         /* 255 */ return ViewTools.pageNotFound(response);
         /*     */ }
       /* 257 */ this.postsService.deleteTheme(tid, user.getId(), reason);
       /*     */ }
     /* 259 */ if ((pn != null) && (pn.intValue() > 1)) {
       /* 260 */ return "redirect:" + theme.getForum().getUrl(pn);
       /*     */ }
     /* 262 */ return "redirect:" + theme.getForum().getUrl();
     /*     */ }
   /* 264 */ return ViewTools.pageNotFound(response);
   /*     */ }
Пример #6
0
 /*     */ @RequestMapping(
     value = {"/shieldUser.jsp"},
     method = {org.springframework.web.bind.annotation.RequestMethod.POST})
 /*     */ public String shieldUser(
     Integer userId,
     Integer themeId,
     Date shieldTime,
     String reason,
     Integer pn,
     HttpServletRequest request,
     HttpServletResponse response,
     ModelMap model)
       /*     */ {
   /* 271 */ UserForum uf = this.userForumService.findById(userId);
   /* 272 */ User user = ContextTools.getUser(request);
   /* 273 */ if (uf == null) {
     /* 274 */ return ViewTools.pageNotFound(response);
     /*     */ }
   /* 276 */ if (user == null) {
     /* 277 */ return ViewTools.showLogin(request, model, "必须登录才可以进行屏蔽会员操作!");
     /*     */ }
   /* 279 */ if (user.getAdmin() == null) {
     /* 280 */ return ViewTools.pageNotFound(response);
     /*     */ }
   /* 282 */ Theme theme = this.themeService.findById(themeId);
   /* 283 */ if (theme == null) {
     /* 284 */ return ViewTools.pageNotFound(response);
     /*     */ }
   /* 286 */ this.userForumService.shieldUserForum(userId, shieldTime);
   /* 287 */ if ((pn != null) && (pn.intValue() > 1)) {
     /* 288 */ return "redirect:" + theme.getUrl(pn);
     /*     */ }
   /* 290 */ return "redirect:" + theme.getUrl();
   /*     */ }
Пример #7
0
 /*     */ @RequestMapping(
     value = {"/shieldPosts.jsp"},
     method = {org.springframework.web.bind.annotation.RequestMethod.POST})
 /*     */ public String shieldPosts(
     Integer postsId,
     String reason,
     Integer pn,
     HttpServletRequest request,
     HttpServletResponse response,
     ModelMap model)
       /*     */ {
   /* 215 */ Posts posts = this.postsService.findById(postsId);
   /* 216 */ User user = ContextTools.getUser(request);
   /* 217 */ if (posts == null) {
     /* 218 */ return ViewTools.pageNotFound(response);
     /*     */ }
   /* 220 */ if (user == null) {
     /* 221 */ return ViewTools.showLogin(request, model, "必须登录才可以进行屏蔽操作!");
     /*     */ }
   /* 223 */ if (user.getAdmin() == null) {
     /* 224 */ return ViewTools.pageNotFound(response);
     /*     */ }
   /* 226 */ if (posts.getFloor().intValue() == 1)
     /* 227 */ this.postsService.shieldTheme(
         posts.getTheme().getId(), user.getId(), /* 228 */ reason);
   /*     */ else {
     /* 230 */ this.postsService.shieldPosts(postsId, user.getId(), reason);
     /*     */ }
   /* 232 */ if ((pn != null) && (pn.intValue() > 1)) {
     /* 233 */ return "redirect:" + posts.getTheme().getUrl(pn);
     /*     */ }
   /* 235 */ return "redirect:" + posts.getTheme().getUrl();
   /*     */ }
Пример #8
0
 /*     */ @RequestMapping(
     value = {"/moveTheme.jsp"},
     method = {org.springframework.web.bind.annotation.RequestMethod.POST})
 /*     */ public String moveTheme(
     Integer[] themeId,
     Integer forumId,
     String reason,
     Integer pn,
     HttpServletRequest request,
     HttpServletResponse response,
     ModelMap model)
       /*     */ {
   /* 157 */ if (themeId != null) {
     /* 158 */ User user = ContextTools.getUser(request);
     /* 159 */ Theme theme = null;
     /* 160 */ for (Integer tid : themeId) {
       /* 161 */ theme = this.themeService.findById(tid);
       /* 162 */ if (theme == null) {
         /* 163 */ return ViewTools.pageNotFound(response);
         /*     */ }
       /* 165 */ if (user == null) {
         /* 166 */ return ViewTools.showLogin(request, model, /* 167 */ "必须登录才可以进行移动操作!");
         /*     */ }
       /* 169 */ if (user.getAdmin() == null) {
         /* 170 */ return ViewTools.pageNotFound(response);
         /*     */ }
       /* 172 */ this.themeService.moveTheme(tid, user.getId(), forumId, reason);
       /*     */ }
     /* 174 */ if ((pn != null) && (pn.intValue() > 1)) {
       /* 175 */ return "redirect:" + theme.getForum().getUrl(pn);
       /*     */ }
     /* 177 */ return "redirect:" + theme.getForum().getUrl();
     /*     */ }
   /* 179 */ return ViewTools.pageNotFound(response);
   /*     */ }
Пример #9
0
 /*    */ @RequestMapping({"/board/list.jsp"})
 /*    */ public String list(
     Integer pageNo,
     Integer count,
     HttpServletRequest request,
     HttpServletResponse response,
     ModelMap model)
       /*    */ {
   /* 69 */ Site site = ContextTools.getSite(request);
   /* 70 */ Page page =
       this.service.getPage(
           null,
           site.getId(),
           Boolean.valueOf(true),
           null,
           null,
           /* 71 */ pageNo.intValue(),
           count.intValue());
   /* 72 */ model.addAttribute("page", page);
   /* 73 */ ViewTools.frontData(request, model, site);
   /* 74 */ response.setHeader("Cache-Control", "no-cache");
   /* 75 */ response.setContentType("text/json;charset=UTF-8");
   /* 76 */ return ViewTools.getTplPath(
       null, site.getSolutionPath(), /* 77 */ "common/tags", "board_list");
   /*    */ }
Пример #10
0
 /* 36 */ @RequiresPermissions({"admin:workflow:list"})
 /*    */ @RequestMapping({"/workflow/v_list.do"})
 /*    */ public String list(Integer pageNo, HttpServletRequest request, ModelMap model) {
   Site site = ContextTools.getSite(request);
   /* 37 */ List list = this.roleService.getListBySite(site.getId());
   /* 38 */ model.addAttribute("list", list);
   /* 39 */ return "docCenter/config/workflow/list";
 }
Пример #11
0
 /*    */ @RequiresPermissions({"admin:workflow:save"})
 /*    */ @RequestMapping({"/workflow/o_save.do"})
 /*    */ public String save(
     WorkFlow bean, Integer[] step, Integer[] roleIds, HttpServletRequest request, ModelMap model)
       /*    */ {
   /* 46 */ Site site = ContextTools.getSite(request);
   /* 47 */ bean = this.service.save(bean, site, step, roleIds);
   /* 48 */ log.info("save WorkFlow id={}", bean.getId());
   /* 49 */ return "redirect:v_list.do";
   /*    */ }
Пример #12
0
 /*    */ @RequiresPermissions({"admin:keyword:save"})
 /*    */ @RequestMapping({"/keyword/o_save.do"})
 /*    */ public String save(Keyword bean, HttpServletRequest request, ModelMap model) {
   /* 38 */ Site site = ContextTools.getSite(request);
   /* 39 */ bean = this.service.save(bean, site);
   /* 40 */ log.info("save Keyword id={}", bean.getId());
   /* 41 */ this.logService.operating(
       request, "添加关键字", "id=" + bean.getId() + ";name=" + /* 42 */ bean.getName());
   /* 43 */ model.addAttribute("msg", "关键字添加成功!");
   /* 44 */ return list();
   /*    */ }
Пример #13
0
 /*    */ @RequestMapping(
     value = {"/messageboard.jsp"},
     method = {org.springframework.web.bind.annotation.RequestMethod.GET})
 /*    */ public String input(HttpServletRequest request, ModelMap model) /*    */ {
   /* 42 */ Site site = ContextTools.getSite(request);
   /* 43 */ List typeList = this.typeService.getList(site.getId(), null, /* 44 */ null);
   /* 45 */ model.addAttribute("typeList", typeList);
   /* 46 */ ViewTools.frontData(request, model, site);
   /* 47 */ return ViewTools.getTplPath(
       request, site.getSolutionPath(), /* 48 */ "extrafunc/board", "tpl.boardInput");
   /*    */ }
Пример #14
0
 /*    */ @RequestMapping({"/workflow/o_ajax_find.do"})
 /*    */ public String workflowFind(
     Integer id, HttpServletRequest request, HttpServletResponse response, ModelMap model)
       /*    */ {
   /* 92 */ Site site = ContextTools.getSite(request);
   /* 93 */ WorkFlow wf = this.service.findById(id);
   /* 94 */ List list = this.roleService.getListBySite(site.getId());
   /* 95 */ model.addAttribute("list", list);
   /* 96 */ model.addAttribute("wf", wf);
   /* 97 */ response.setHeader("Cache-Control", "no-cache");
   /* 98 */ response.setContentType("text/json;charset=UTF-8");
   /* 99 */ return "docCenter/config/workflow/stepData";
   /*    */ }
Пример #15
0
 /*    */ @RequestMapping({"/keyword/jsonData.do"})
 /*    */ public String dataPageByJosn(
     String name,
     Integer departId,
     String sortname,
     String sortorder,
     HttpServletRequest request,
     HttpServletResponse response,
     ModelMap model)
       /*    */ {
   /* 62 */ Site site = ContextTools.getSite(request);
   /* 63 */ List list =
       this.service.getListBySiteId(site.getId(), false, /* 64 */ false, sortname, sortorder);
   /* 65 */ model.addAttribute("list", list);
   /* 66 */ response.setHeader("Cache-Control", "no-cache");
   /* 67 */ response.setContentType("text/json;charset=UTF-8");
   /* 68 */ return "dataCenter/docData/keyword/listdata";
   /*    */ }
Пример #16
0
 /*    */ @RequestMapping({"/workflow/jsonData.do"})
 /*    */ public String dataPageByJosn(
     String sortname,
     String sortorder,
     Integer page,
     Integer pagesize,
     HttpServletRequest request,
     HttpServletResponse response,
     ModelMap model)
       /*    */ {
   /* 65 */ Site site = ContextTools.getSite(request);
   /* 66 */ Page p =
       this.service.getPage(
           site.getId(), sortname, /* 67 */ sortorder, page.intValue(), pagesize.intValue());
   /* 68 */ model.addAttribute("p", p);
   /* 69 */ response.setHeader("Cache-Control", "no-cache");
   /* 70 */ response.setContentType("text/json;charset=UTF-8");
   /* 71 */ return "docCenter/config/workflow/dataJson";
   /*    */ }
Пример #17
0
 @RequestMapping(
     value = {"/messageboard.jsp"},
     method = {org.springframework.web.bind.annotation.RequestMethod.POST})
 public void submit(
     String title,
     String name,
     String mobile,
     String email,
     String address,
     String zipcode,
     Integer typeId,
     String content,
     HttpServletRequest request,
     HttpServletResponse response)
     throws JSONException {
   Site site = ContextTools.getSite(request);
   JSONObject json = new JSONObject();
   this.service.save(title, name, mobile, email, address, zipcode, typeId, content, site);
   json.put("success", true);
   json.put("status", 1);
   ResponseUtils.renderJson(response, json.toString());
 }
Пример #18
0
 /*     */ @RequestMapping(
     value = {"/lightTheme.jsp"},
     method = {org.springframework.web.bind.annotation.RequestMethod.POST})
 /*     */ public String lightTheme(
     Integer[] themeId,
     String color,
     Boolean bold,
     Boolean italic,
     Date lightTime,
     String reason,
     Integer pn,
     HttpServletRequest request,
     HttpServletResponse response,
     ModelMap model)
       /*     */ {
   /*  98 */ if (themeId != null) {
     /*  99 */ User user = ContextTools.getUser(request);
     /* 100 */ Theme theme = null;
     /* 101 */ for (Integer tid : themeId) {
       /* 102 */ theme = this.themeService.findById(tid);
       /* 103 */ if (theme == null) {
         /* 104 */ return ViewTools.pageNotFound(response);
         /*     */ }
       /* 106 */ if (user == null) {
         /* 107 */ return ViewTools.showLogin(request, model, /* 108 */ "必须登录才可以进行高亮操作!");
         /*     */ }
       /* 110 */ if (user.getAdmin() == null) {
         /* 111 */ return ViewTools.pageNotFound(response);
         /*     */ }
       /* 113 */ this.themeService.lightTheme(
           tid, user.getId(), color, bold, italic, /* 114 */ lightTime, reason);
       /*     */ }
     /* 116 */ if ((pn != null) && (pn.intValue() > 1)) {
       /* 117 */ return "redirect:" + theme.getForum().getUrl(pn);
       /*     */ }
     /* 119 */ return "redirect:" + theme.getForum().getUrl();
     /*     */ }
   /* 121 */ return ViewTools.pageNotFound(response);
   /*     */ }
Пример #19
0
 /*     */ @RequestMapping(
     value = {"/topTheme.jsp"},
     method = {org.springframework.web.bind.annotation.RequestMethod.POST})
 /*     */ public String topTheme(
     Integer[] themeId,
     Integer topLevel,
     Date topTime,
     String reason,
     Integer pn,
     HttpServletRequest request,
     HttpServletResponse response,
     ModelMap model)
       /*     */ {
   /*  38 */ if (themeId != null) {
     /*  39 */ User user = ContextTools.getUser(request);
     /*  40 */ Theme theme = null;
     /*  41 */ for (Integer tid : themeId) {
       /*  42 */ theme = this.themeService.findById(tid);
       /*  43 */ if (theme == null) {
         /*  44 */ return ViewTools.pageNotFound(response);
         /*     */ }
       /*  46 */ if (user == null) {
         /*  47 */ return ViewTools.showLogin(request, model, /*  48 */ "必须登录才可以进行置顶操作!");
         /*     */ }
       /*  50 */ if (user.getAdmin() == null) {
         /*  51 */ return ViewTools.pageNotFound(response);
         /*     */ }
       /*  53 */ this.themeService.topTheme(
           tid, user.getId(), topLevel, topTime, /*  54 */ reason);
       /*     */ }
     /*  56 */ if ((pn != null) && (pn.intValue() > 1)) {
       /*  57 */ return "redirect:" + theme.getForum().getUrl(pn);
       /*     */ }
     /*  59 */ return "redirect:" + theme.getForum().getUrl();
     /*     */ }
   /*  61 */ return ViewTools.pageNotFound(response);
   /*     */ }