private string Module_List() { string tmpstr = ""; string tmpastr, tmprstr, tmptstr; int tpage = cls.getNum(request.querystring("page"), 0); string tkeyword = cls.getSafeString(request.querystring("keyword")); tmpstr = jt.itake("default.list", "tpl"); tmprstr = ""; tmpastr = cls.ctemplate(ref tmpstr, "{@}"); string tsqlstr = "select * from ("; string tnsearch = cls.getString(jt.itake("config.nsearch", "cfg")); string[] tnsearchAry = tnsearch.Split(','); for (int ti = 0; ti < tnsearchAry.Length; ti ++) { string tnGenreAryString = tnsearchAry[ti]; string tdatabase = cls.getString(jt.itake("global." + tnGenreAryString + ":config.ndatabase", "cfg")); string tfpre = cls.getString(jt.itake("global." + tnGenreAryString + ":config.nfpre", "cfg")); if (!cls.isEmpty(tdatabase)) tsqlstr += "select " + cls.cfnames(tfpre, "id") + " as un_id," + cls.cfnames(tfpre, "topic") + " as un_topic," + cls.cfnames(tfpre, "time") + " as un_time,'" + tnGenreAryString + "' as un_genre from " + tdatabase + " where " + cls.cfnames(tfpre, "hidden") + "=0 and " + cls.cfnames(tfpre, "lng") + "=" + cls.getNum(config.nlng, 0) + " union all "; } if (tsqlstr.IndexOf(" union all ") != -1) tsqlstr = cls.getLRStr(tsqlstr, " union all ", "leftr"); tsqlstr +=") t0 where un_topic like '%" + tkeyword + "%'"; tsqlstr += " order by un_time desc"; pagi pagi; pagi = new pagi(); pagi.db = db; pagi.sqlstr = tsqlstr; pagi.pagenum = tpage; pagi.rslimit = cls.getNum(jt.itake("config.nlisttopx", "cfg")); pagi.pagesize = cls.getNum(jt.itake("config.npagesize", "cfg")); pagi.Init(); object[] tArys = pagi.getDataAry(); if (tArys != null) { for (int tis = 0; tis < tArys.Length; tis ++) { tmptstr = tmpastr; object[,] tAry = (object[,])tArys[tis]; for (int ti = 0; ti < tAry.GetLength(0); ti ++) { tAry[ti, 0] = (object)cls.getLRStr((string)tAry[ti, 0], "un_", "rightr"); tmptstr = tmptstr.Replace("{$" + cls.toString(tAry[ti, 0]) + "}", encode.htmlencode(cls.toString(tAry[ti, 1]))); } config.rsAry = tAry; tmptstr = jt.creplace(tmptstr); tmprstr += tmptstr; } } tmpstr = tmpstr.Replace(config.jtbccinfo, tmprstr); tmpstr = tmpstr.Replace("{$-genre}", config.ngenre); tmpstr = tmpstr.Replace("{$-lng}", cls.toString(config.nlng)); tmpstr = tmpstr.Replace("{$pagi.pagenum}", cls.toString(pagi.pagenum)); tmpstr = tmpstr.Replace("{$pagi.pagenums}", cls.toString(pagi.pagenums)); tmpstr = jt.creplace(tmpstr); return tmpstr; }
private string Module_List() { string tmpstr = ""; string tmpastr, tmprstr, tmptstr; int tpage = cls.getNum(request.querystring("page"), 0); string tkeyword = cls.getSafeString(request.querystring("keyword")); int tfid = cls.getNum(request.querystring("fid"), 0); ac.cntitle(jt.itake("default.nav_list", "lng")); tmpstr = jt.itake("default.list", "tpl"); tmprstr = ""; tmpastr = cls.ctemplate(ref tmpstr, "{@}"); string tdatabase = cls.getString(jt.itake("config.ndatabase", "cfg")); string tfpre = cls.getString(jt.itake("config.nfpre", "cfg")); string tidfield = cls.cfnames(tfpre, "id"); string tsqlstr = "select * from " + tdatabase + " where " + cls.cfnames(tfpre, "hidden") + "=0 and " + cls.cfnames(tfpre, "keyword") + "='" + tkeyword + "' and " + cls.cfnames(tfpre, "fid") + "=" + tfid + " order by " + cls.cfnames(tfpre, "time") + " desc"; pagi pagi; pagi = new pagi(); pagi.db = db; pagi.sqlstr = tsqlstr; pagi.pagenum = tpage; pagi.rslimit = cls.getNum(jt.itake("config.nlisttopx", "cfg")); pagi.pagesize = cls.getNum(jt.itake("config.npagesize", "cfg")); pagi.Init(); object[] tArys = pagi.getDataAry(); if (tArys != null) { for (int tis = 0; tis < tArys.Length; tis ++) { tmptstr = tmpastr; object[,] tAry = (object[,])tArys[tis]; for (int ti = 0; ti < tAry.GetLength(0); ti ++) { tAry[ti, 0] = (object)cls.getLRStr((string)tAry[ti, 0], tfpre, "rightr"); tmptstr = tmptstr.Replace("{$" + cls.toString(tAry[ti, 0]) + "}", encode.htmlencode(cls.toString(tAry[ti, 1]))); } config.rsAry = tAry; tmptstr = jt.creplace(tmptstr); tmprstr += tmptstr; } } tmpstr = tmpstr.Replace(config.jtbccinfo, tmprstr); tmpstr = tmpstr.Replace("{$-genre}", config.ngenre); tmpstr = tmpstr.Replace("{$-lng}", cls.toString(config.nlng)); tmpstr = tmpstr.Replace("{$pagi.pagenum}", cls.toString(pagi.pagenum)); tmpstr = tmpstr.Replace("{$pagi.pagenums}", cls.toString(pagi.pagenums)); tmpstr = jt.creplace(tmpstr); return tmpstr; }
private string Module_MyList() { string tmpstr = ""; string tmpastr, tmprstr, tmptstr; int tpage = cls.getNum(request.querystring("page")); string tnfgenre = cls.getString(jt.itake("config.nfgenre", "cfg")); tmpstr = jt.itake("default.mylist", "tpl"); tmprstr = ""; tmpastr = cls.ctemplate(ref tmpstr, "{@}"); string tdatabase = cls.getString(jt.itake("config.ndatabase", "cfg")); string tfpre = cls.getString(jt.itake("config.nfpre", "cfg")); string tsqlstr = "select * from " + tdatabase + " where " + cls.cfnames(tfpre, "uid") + "=" + account.nuserid + " order by " + cls.cfnames(tfpre, "time") + " desc"; pagi pagi; pagi = new pagi(); pagi.db = db; pagi.sqlstr = tsqlstr; pagi.pagenum = tpage; pagi.rslimit = cls.getNum(jt.itake("config.nlisttopx", "cfg")); pagi.pagesize = cls.getNum(jt.itake("config.npagesize", "cfg")); pagi.Init(); object[] tArys = pagi.getDataAry(); if (tArys != null) { for (int tis = 0; tis < tArys.Length; tis ++) { tmptstr = tmpastr; object[,] tAry = (object[,])tArys[tis]; for (int ti = 0; ti < tAry.GetLength(0); ti ++) { tAry[ti, 0] = (object)cls.getLRStr((string)tAry[ti, 0], tfpre, "rightr"); tmptstr = tmptstr.Replace("{$" + cls.toString(tAry[ti, 0]) + "}", encode.htmlencode(cls.toString(tAry[ti, 1]))); } tmprstr += tmptstr; } } tmpstr = tmpstr.Replace(config.jtbccinfo, tmprstr); tmpstr = tmpstr.Replace("{$pagi.pagenum}", cls.toString(pagi.pagenum)); tmpstr = tmpstr.Replace("{$pagi.pagenums}", cls.toString(pagi.pagenums)); tmpstr = tmpstr.Replace("{$-defmenu}", account.getDefMenuHtml()); tmpstr = tmpstr.Replace("{$-nfgenre}", encode.htmlencode(tnfgenre)); tmpstr = tmpstr.Replace("{$-npassport}", cls.getLRStr(jt.itake("config.naccount", "cfg"), "/", "left")); tmpstr = jt.creplace(tmpstr); return tmpstr; }
private string Module_List() { string tmpstr = ""; string tmpastr, tmprstr, tmptstr; int tpage = cls.getNum(request.querystring("page")); string tfield = cls.getSafeString(request.querystring("field")); string tkeyword = cls.getSafeString(request.querystring("keyword")); tmpstr = jt.itake("manage-interface.list", "tpl"); tmprstr = ""; tmpastr = cls.ctemplate(ref tmpstr, "{@}"); string tdatabase = cls.getString(jt.itake("global.config.admin-ndatabase", "cfg")); string tfpre = cls.getString(jt.itake("global.config.admin-nfpre", "cfg")); string tsqlstr = "select * from " + tdatabase + " where 1=1"; if (tfield == "username") tsqlstr += " and " + cls.cfnames(tfpre, "username") + " like '%" + tkeyword + "%'"; if (tfield == "lock") tsqlstr += " and " + cls.cfnames(tfpre, "lock") + "=" + cls.getNum(tkeyword); if (tfield == "id") tsqlstr += " and " + cls.cfnames(tfpre, "id") + "=" + cls.getNum(tkeyword); tsqlstr += " order by " + cls.cfnames(tfpre, "time") + " desc"; pagi pagi; pagi = new pagi(); pagi.db = db; pagi.sqlstr = tsqlstr; pagi.pagenum = tpage; pagi.rslimit = cls.getNum(jt.itake("config.nlisttopx", "cfg")); pagi.pagesize = cls.getNum(jt.itake("config.npagesize", "cfg")); pagi.Init(); object[] tArys = pagi.getDataAry(); if (tArys != null) { for (int tis = 0; tis < tArys.Length; tis ++) { tmptstr = tmpastr; object[,] tAry = (object[,])tArys[tis]; for (int ti = 0; ti < tAry.GetLength(0); ti ++) { tAry[ti, 0] = (object)cls.getLRStr((string)tAry[ti, 0], tfpre, "rightr"); tmptstr = tmptstr.Replace("{$" + cls.toString(tAry[ti, 0]) + "}", encode.htmlencode(cls.toString(tAry[ti, 1]))); } tmprstr += tmptstr; } } tmpstr = tmpstr.Replace(config.jtbccinfo, tmprstr); tmpstr = tmpstr.Replace("{$pagi.pagenum}", cls.toString(pagi.pagenum)); tmpstr = tmpstr.Replace("{$pagi.pagenums}", cls.toString(pagi.pagenums)); tmpstr = jt.creplace(tmpstr); tmpstr = config.ajaxPreContent + tmpstr; return tmpstr; }
public string Module_Detail() { string tmpstr = ""; string tmpastr, tmprstr, tmptstr; string tNLng = config.nlng; string tNGenre = config.ngenre; int tId = cls.getNum(request.querystring("id"), 0); int tCtPage = cls.getNum(request.querystring("ctpage"), 0); int tClass = cls.getNum(request.querystring("class"), -1); string tdatabase = cls.getString(jt.itake("config.ndatabase-category", "cfg")); string tfpre = cls.getString(jt.itake("config.nfpre-category", "cfg")); string tidfield = cls.cfnames(tfpre, "id"); string tdatabaseT = cls.getString(jt.itake("config.ndatabase-topic", "cfg")); string tfpreT = cls.getString(jt.itake("config.nfpre-topic", "cfg")); string tidfieldT = cls.cfnames(tfpreT, "id"); string tsqlstr = "select * from " + tdatabase + "," + tdatabaseT + " where " + tdatabaseT + "." + cls.cfnames(tfpreT, "fid") + "=0 and " + tdatabaseT + "." + tidfieldT + "=" + tId + " and " + tdatabaseT + "." + cls.cfnames(tfpreT, "class") + "=" + tdatabase + "." + tidfield; object[] tArys = db.getDataAry(tsqlstr); if (tArys != null) { object[,] tAry = (object[,])tArys[0]; ac.cntitle(cls.toString(db.getValue(tAry, cls.cfnames(tfpre, "topic")))); ac.cntitle(cls.toString(db.getValue(tAry, cls.cfnames(tfpreT, "topic")))); string tForumManager = cls.toString(db.getValue(tAry, cls.cfnames(tfpre, "manager"))); string tCheckManager = PP_CheckManager(tForumManager); if (tCheckManager == "0") tmpstr = com.webMessage(jt.itake("manager.popedom-error-1", "lng")); else { tmpstr = jt.itake("manager.detail", "tpl"); tmprstr = ""; tmpastr = cls.ctemplate(ref tmpstr, "{@}"); string tsqlstrT = "select * from " + tdatabaseT + " where (" + cls.cfnames(tfpreT, "fid") + "=" + tId + " or " + tidfieldT + "=" + tId + ") order by " + cls.cfnames(tfpreT, "fid") + " asc," + cls.cfnames(tfpreT, "time") + " asc"; pagi pagi; pagi = new pagi(); pagi.db = db; pagi.sqlstr = tsqlstrT; pagi.pagenum = tCtPage; pagi.rslimit = cls.getNum(jt.itake("config.nlisttopx", "cfg")); pagi.pagesize = cls.getNum(jt.itake("config.npagesize-2", "cfg")); pagi.Init(); object[] tArysT = pagi.getDataAry(); if (tArysT != null) { for (int tis = 0; tis < tArysT.Length; tis ++) { tmptstr = tmpastr; object[,] tAryT = (object[,])tArysT[tis]; string tAuid = cls.toString(db.getValue(tAryT, cls.cfnames(tfpreT, "auid"))); string tAuthor = cls.toString(db.getValue(tAryT, cls.cfnames(tfpreT, "author"))); string tEditUserName = cls.toString(db.getValue(tAryT, cls.cfnames(tfpreT, "edit_username"))); string tEditTime = cls.toString(db.getValue(tAryT, cls.cfnames(tfpreT, "edit_time"))); string tTopicHidden = cls.toString(db.getValue(tAryT, cls.cfnames(tfpreT, "hidden"))); for (int ti = 0; ti < tAryT.GetLength(0); ti ++) { tAryT[ti, 0] = (object)cls.getLRStr((string)tAryT[ti, 0], tfpreT, "rightr"); tmptstr = tmptstr.Replace("{$-" + cls.toString(tAryT[ti, 0]) + "}", encode.htmlencode(cls.toString(tAryT[ti, 1]))); } config.rsbAry = tAryT; string tEditInfo = ""; if (!cls.isEmpty(tEditUserName)) { tEditInfo = jt.itake("default.txt-edit-info", "lng"); tEditInfo = tEditInfo.Replace("[username]", tEditUserName); tEditInfo = tEditInfo.Replace("[time]", cls.formatDate(tEditTime)); } string tAuthorFaceURLString = ""; string tAuthorFace = cls.toString(account.getUserInfo("face", tAuid)); string tAuthorFaceU = cls.toString(account.getUserInfo("face_u", tAuid)); string tAuthorFaceURL = cls.toString(account.getUserInfo("face_url", tAuid)); if (tAuthorFaceU == "1") tAuthorFaceURLString = tAuthorFaceURL; else tAuthorFaceURLString = cls.getActualRoute(jt.itake("config.naccount", "cfg")) + "/" + config.imagesRoute + "/face/" + tAuthorFace + ".gif"; tmptstr = tmptstr.Replace("{$-p-floor}", cls.toString(((pagi.pagenum - 1) * pagi.pagesize) + tis + 1)); tmptstr = tmptstr.Replace("{$-p-edit-info}", encode.htmlencode(tEditInfo)); tmptstr = tmptstr.Replace("{$-author-face}", encode.htmlencode(tAuthorFaceURLString)); tmptstr = tmptstr.Replace("{$-author-group}", encode.htmlencode(cls.toString(account.getUserInfo("group", tAuid)))); tmptstr = tmptstr.Replace("{$-author-integral}", encode.htmlencode(cls.toString(account.getUserInfo("integral", tAuid)))); tmptstr = tmptstr.Replace("{$-author-time}", encode.htmlencode(cls.toString(account.getUserInfo("time", tAuid)))); tmptstr = tmptstr.Replace("{$-author-sign}", encode.htmlencode(cls.toString(account.getUserInfo("sign", tAuid)))); //****************************************************************************// string tTopicStateString = ""; if (tTopicHidden == "1") tTopicStateString += jt.itake("manager.txt-state-hidden", "lng") + " "; tmptstr = tmptstr.Replace("{$-p-state-strings}", encode.htmlencode(tTopicStateString)); //****************************************************************************// tmptstr = jt.creplace(tmptstr); tmprstr += tmptstr; } } tmpstr = tmpstr.Replace(config.jtbccinfo, tmprstr); tmpstr = tmpstr.Replace("{$pagi.pagenum}", cls.toString(pagi.pagenum)); tmpstr = tmpstr.Replace("{$pagi.pagenums}", cls.toString(pagi.pagenums)); tmpstr = tmpstr.Replace("{$-topHtml}", PP_GetTopHtml(cls.toString(tClass))); tmpstr = tmpstr.Replace("{$-nusername}", encode.htmlencode(account.nusername)); //****************************************************************************// tmpstr = tmpstr.Replace("{$id}", encode.htmlencode(cls.toString(db.getValue(tAry, cls.cfnames(tfpreT, "id"))))); tmpstr = tmpstr.Replace("{$topic}", encode.htmlencode(cls.toString(db.getValue(tAry, cls.cfnames(tfpreT, "topic"))))); tmpstr = tmpstr.Replace("{$class}", encode.htmlencode(cls.toString(db.getValue(tAry, cls.cfnames(tfpreT, "class"))))); tmpstr = tmpstr.Replace("{$time}", encode.htmlencode(cls.toString(db.getValue(tAry, cls.cfnames(tfpreT, "time"))))); tmpstr = jt.creplace(tmpstr); } } return tmpstr; }
public string Module_List() { string tmpstr = ""; string tmpastr, tmprstr, tmptstr; string tNLng = config.nlng; string tNGenre = config.ngenre; string tAtt = cls.getString(request.querystring("att")); int tpage = cls.getNum(request.querystring("page"), 0); int tClass = cls.getNum(request.querystring("class"), -1); string tdatabase = cls.getString(jt.itake("config.ndatabase-category", "cfg")); string tfpre = cls.getString(jt.itake("config.nfpre-category", "cfg")); string tidfield = cls.cfnames(tfpre, "id"); string tsqlstr = "select * from " + tdatabase + " where " + cls.cfnames(tfpre, "hidden") + "=0 and " + cls.cfnames(tfpre, "fid") + "<>0 and " + cls.cfnames(tfpre, "lng") + "=" + tNLng + " and " + tidfield + "=" + tClass; object[] tArys = db.getDataAry(tsqlstr); if (tArys != null) { object[,] tAry = (object[,])tArys[0]; ac.cntitle(cls.toString(db.getValue(tAry, cls.cfnames(tfpre, "topic")))); string tForumManager = cls.toString(db.getValue(tAry, cls.cfnames(tfpre, "manager"))); string tCheckManager = PP_CheckManager(tForumManager); if (tCheckManager == "0") tmpstr = com.webMessage(jt.itake("manager.popedom-error-1", "lng")); else { tmpstr = jt.itake("manager.list", "tpl"); for (int ti = 0; ti < tAry.GetLength(0); ti ++) { tAry[ti, 0] = (object)cls.getLRStr((string)tAry[ti, 0], tfpre, "rightr"); tmpstr = tmpstr.Replace("{$" + cls.toString(tAry[ti, 0]) + "}", encode.htmlencode(cls.toString(tAry[ti, 1]))); } config.rsAry = tAry; tmprstr = ""; tmpastr = cls.ctemplate(ref tmpstr, "{@}"); string tControlString = "select"; if (tCheckManager == "999") tControlString += ",htop"; tControlString += ",top,elite,lock,hidden"; tdatabase = cls.getString(jt.itake("config.ndatabase-topic", "cfg")); tfpre = cls.getString(jt.itake("config.nfpre-topic", "cfg")); tidfield = cls.cfnames(tfpre, "id"); tsqlstr = "select * from " + tdatabase + " where " + cls.cfnames(tfpre, "class") + "=" + tClass + " and " + cls.cfnames(tfpre, "fid") + "=0"; if (tAtt == "elite") tsqlstr += " and " + cls.cfnames(tfpre, "elite") + "=1"; if (tAtt == "lock") tsqlstr += " and " + cls.cfnames(tfpre, "lock") + "=1"; if (tAtt == "top") tsqlstr += " and " + cls.cfnames(tfpre, "top") + "=1"; if (tAtt == "htop") tsqlstr += " and " + cls.cfnames(tfpre, "htop") + "=1"; if (tAtt == "hidden") tsqlstr += " and " + cls.cfnames(tfpre, "hidden") + "=1"; tsqlstr += " order by " + cls.cfnames(tfpre, "htop") + " desc," + cls.cfnames(tfpre, "top") + " desc," + cls.cfnames(tfpre, "last_time") + " desc"; pagi pagi; pagi = new pagi(); pagi.db = db; pagi.sqlstr = tsqlstr; pagi.pagenum = tpage; pagi.rslimit = cls.getNum(jt.itake("config.nlisttopx", "cfg")); pagi.pagesize = cls.getNum(jt.itake("config.npagesize-2", "cfg")); pagi.Init(); object[] tArysT = pagi.getDataAry(); if (tArysT != null) { for (int tis = 0; tis < tArysT.Length; tis ++) { tmptstr = tmpastr; object[,] tAryT = (object[,])tArysT[tis]; string tTopicHTop = cls.toString(db.getValue(tAryT, cls.cfnames(tfpre, "htop"))); string tTopicTop = cls.toString(db.getValue(tAryT, cls.cfnames(tfpre, "top"))); string tTopicElite = cls.toString(db.getValue(tAryT, cls.cfnames(tfpre, "elite"))); string tTopicLock = cls.toString(db.getValue(tAryT, cls.cfnames(tfpre, "lock"))); string tTopicHidden = cls.toString(db.getValue(tAryT, cls.cfnames(tfpre, "hidden"))); for (int ti = 0; ti < tAryT.GetLength(0); ti ++) { tAryT[ti, 0] = (object)cls.getLRStr((string)tAryT[ti, 0], tfpre, "rightr"); tmptstr = tmptstr.Replace("{$-" + cls.toString(tAryT[ti, 0]) + "}", encode.htmlencode(cls.toString(tAryT[ti, 1]))); } string tTopicStateString = ""; if (tTopicHTop == "1") tTopicStateString += jt.itake("manager.txt-state-htop", "lng") + " "; if (tTopicTop == "1") tTopicStateString += jt.itake("manager.txt-state-top", "lng") + " "; if (tTopicElite == "1") tTopicStateString += jt.itake("manager.txt-state-elite", "lng") + " "; if (tTopicLock == "1") tTopicStateString += jt.itake("manager.txt-state-lock", "lng") + " "; if (tTopicHidden == "1") tTopicStateString += jt.itake("manager.txt-state-hidden", "lng") + " "; tmptstr = tmptstr.Replace("{$-p-state-strings}", encode.htmlencode(tTopicStateString)); tmptstr = tmptstr.Replace("{$-p-topic}", PP_FormatTopic(encode.htmlencode(cls.toString(db.getValue(tAryT, "topic"))), encode.htmlencode(cls.toString(db.getValue(tAryT, "color"))), encode.htmlencode(cls.toString(db.getValue(tAryT, "strong"))))); config.rsbAry = tAryT; tmptstr = jt.creplace(tmptstr); tmprstr += tmptstr; } } tmpstr = tmpstr.Replace(config.jtbccinfo, tmprstr); tmpstr = tmpstr.Replace("{$pagi.pagenum}", cls.toString(pagi.pagenum)); tmpstr = tmpstr.Replace("{$pagi.pagenums}", cls.toString(pagi.pagenums)); tmpstr = tmpstr.Replace("{$-genre}", tNGenre); tmpstr = tmpstr.Replace("{$-lng}", cls.toString(tNLng)); tmpstr = tmpstr.Replace("{$-class}", cls.toString(tClass)); tmpstr = tmpstr.Replace("{$-att}", encode.htmlencode(tAtt)); tmpstr = tmpstr.Replace("{$-controlstring}", cls.toString(tControlString)); tmpstr = tmpstr.Replace("{$-topHtml}", PP_GetTopHtml(cls.toString(tClass))); tmpstr = jt.creplace(tmpstr); } } else tmpstr = com.webMessage(jt.itake("manager.notexist-error-1", "lng")); tmpstr = jt.creplace(tmpstr); return tmpstr; }
public string Module_Blacklist() { string tmpstr = ""; string tmpastr, tmprstr, tmptstr; string tNLng = config.nlng; string tNGenre = config.ngenre; int tpage = cls.getNum(request.querystring("page"), 0); int tClass = cls.getNum(request.querystring("class"), -1); string tdatabase = cls.getString(jt.itake("config.ndatabase-category", "cfg")); string tfpre = cls.getString(jt.itake("config.nfpre-category", "cfg")); string tidfield = cls.cfnames(tfpre, "id"); string tsqlstr = "select * from " + tdatabase + " where " + cls.cfnames(tfpre, "hidden") + "=0 and " + cls.cfnames(tfpre, "fid") + "<>0 and " + cls.cfnames(tfpre, "lng") + "=" + tNLng + " and " + tidfield + "=" + tClass; object[] tArys = db.getDataAry(tsqlstr); if (tArys != null) { object[,] tAry = (object[,])tArys[0]; ac.cntitle(cls.toString(db.getValue(tAry, cls.cfnames(tfpre, "topic")))); string tForumManager = cls.toString(db.getValue(tAry, cls.cfnames(tfpre, "manager"))); string tCheckManager = PP_CheckManager(tForumManager); if (tCheckManager == "0") tmpstr = com.webMessage(jt.itake("manager.popedom-error-1", "lng")); else { tmpstr = jt.itake("manager.blacklist", "tpl"); for (int ti = 0; ti < tAry.GetLength(0); ti ++) { tAry[ti, 0] = (object)cls.getLRStr((string)tAry[ti, 0], tfpre, "rightr"); tmpstr = tmpstr.Replace("{$" + cls.toString(tAry[ti, 0]) + "}", encode.htmlencode(cls.toString(tAry[ti, 1]))); } config.rsAry = tAry; tmprstr = ""; tmpastr = cls.ctemplate(ref tmpstr, "{@}"); tdatabase = cls.getString(jt.itake("config.ndatabase-blacklist", "cfg")); tfpre = cls.getString(jt.itake("config.nfpre-blacklist", "cfg")); tidfield = cls.cfnames(tfpre, "id"); tsqlstr = "select * from " + tdatabase + " where " + cls.cfnames(tfpre, "fid") + "=" + tClass + " order by " + tidfield + " desc"; pagi pagi; pagi = new pagi(); pagi.db = db; pagi.sqlstr = tsqlstr; pagi.pagenum = tpage; pagi.rslimit = cls.getNum(jt.itake("config.nlisttopx", "cfg")); pagi.pagesize = cls.getNum(jt.itake("config.npagesize", "cfg")); pagi.Init(); object[] tArysB = pagi.getDataAry(); if (tArysB != null) { for (int tis = 0; tis < tArysB.Length; tis ++) { tmptstr = tmpastr; object[,] tAryB = (object[,])tArysB[tis]; for (int ti = 0; ti < tAryB.GetLength(0); ti ++) { tAryB[ti, 0] = (object)cls.getLRStr((string)tAryB[ti, 0], tfpre, "rightr"); tmptstr = tmptstr.Replace("{$-" + cls.toString(tAryB[ti, 0]) + "}", encode.htmlencode(cls.toString(tAryB[ti, 1]))); } config.rsbAry = tAryB; tmptstr = jt.creplace(tmptstr); tmprstr += tmptstr; } } tmpstr = tmpstr.Replace(config.jtbccinfo, tmprstr); tmpstr = tmpstr.Replace("{$pagi.pagenum}", cls.toString(pagi.pagenum)); tmpstr = tmpstr.Replace("{$pagi.pagenums}", cls.toString(pagi.pagenums)); tmpstr = tmpstr.Replace("{$-genre}", tNGenre); tmpstr = tmpstr.Replace("{$-lng}", cls.toString(tNLng)); tmpstr = tmpstr.Replace("{$-class}", cls.toString(tClass)); tmpstr = tmpstr.Replace("{$-topHtml}", PP_GetTopHtml(cls.toString(tClass))); tmpstr = jt.creplace(tmpstr); } } return tmpstr; }
private string Module_List() { string tmpstr = ""; string tmpastr, tmprstr, tmptstr; string tNLng = config.nlng; string tNGenre = config.ngenre; int tpage = cls.getNum(request.querystring("page"), 0); int tClass = cls.getNum(request.querystring("class"), -1); string tKeyword = cls.getSafeString(request.querystring("keyword")); string tdatabase = cls.getString(jt.itake("config.ndatabase-category", "cfg")); string tfpre = cls.getString(jt.itake("config.nfpre-category", "cfg")); string tidfield = cls.cfnames(tfpre, "id"); string tsqlstr = "select * from " + tdatabase + " where " + cls.cfnames(tfpre, "hidden") + "=0 and " + cls.cfnames(tfpre, "fid") + "<>0 and " + cls.cfnames(tfpre, "lng") + "=" + tNLng + " and " + tidfield + "=" + tClass; object[] tArys = db.getDataAry(tsqlstr); if (tArys != null) { object[,] tAry = (object[,])tArys[0]; ac.cntitle(cls.toString(db.getValue(tAry, cls.cfnames(tfpre, "topic")))); string tForumID = cls.toString(db.getValue(tAry, cls.cfnames(tfpre, "id"))); string tForumIType = cls.toString(db.getValue(tAry, cls.cfnames(tfpre, "itype"))); string tForumPopedom = cls.toString(db.getValue(tAry, cls.cfnames(tfpre, "popedom"))); if (!PP_CheckPopedom(tForumPopedom)) tmpstr = com.webMessages(jt.itake("default.popedom-error-1", "lng"), "-1"); else { tmpstr = jt.itake("default.list", "tpl"); for (int ti = 0; ti < tAry.GetLength(0); ti ++) { tAry[ti, 0] = (object)cls.getLRStr((string)tAry[ti, 0], tfpre, "rightr"); tmpstr = tmpstr.Replace("{$" + cls.toString(tAry[ti, 0]) + "}", encode.htmlencode(cls.toString(tAry[ti, 1]))); } config.rsAry = tAry; tmprstr = ""; tmpastr = cls.ctemplate(ref tmpstr, "{@}"); tmptstr = tmpastr; //****************************************************************************// string tmp2astr, tmp2rstr, tmp2tstr; tmp2rstr = ""; tmp2astr = cls.ctemplate(ref tmptstr, "{@@}"); string tsqlstr2 = "select * from " + tdatabase + " where " + cls.cfnames(tfpre, "hidden") + "=0 and " + cls.cfnames(tfpre, "fid") + "=" + tForumID + " order by " + cls.cfnames(tfpre, "order") + " asc"; object[] tArys2 = db.getDataAry(tsqlstr2); if (tArys2 != null) { for (int tis2 = 0; tis2 < tArys2.Length; tis2 ++) { tmp2tstr = tmp2astr; string tnForumStateString = "0"; string tnForumNumNoteNewString = "0"; object[,] tAry2 = (object[,])tArys2[tis2]; string tnForumIType = cls.toString(db.getValue(tAry2, cls.cfnames(tfpre, "itype"))); string tnForumPopedom = cls.toString(db.getValue(tAry2, cls.cfnames(tfpre, "popedom"))); string tnForumNumNoteNew = cls.toString(db.getValue(tAry2, cls.cfnames(tfpre, "num_note_new"))); string tnForumLastTime = cls.toString(db.getValue(tAry2, cls.cfnames(tfpre, "last_time"))); if (cls.formatDate(tnForumLastTime, 1) == cls.formatDate(cls.getDate(), 1)) { tnForumStateString = "1"; tnForumNumNoteNewString = tnForumNumNoteNew; } for (int ti2 = 0; ti2 < tAry2.GetLength(0); ti2 ++) { tAry2[ti2, 0] = (object)cls.getLRStr((string)tAry2[ti2, 0], tfpre, "rightr"); tmp2tstr = tmp2tstr.Replace("{$-" + cls.toString(tAry2[ti2, 0]) + "}", encode.htmlencode(cls.toString(tAry2[ti2, 1]))); } config.rsbAry = tAry2; //**************************************************************// string tmp3astr, tmp3rstr, tmp3tstr; tmp3rstr = ""; tmp3astr = cls.ctemplate(ref tmp2tstr, "{@@@}"); tmp3tstr = tmp3astr; if (PP_CheckPopedom(tnForumPopedom)) { if (tnForumIType != "99") tmp3tstr = cls.getLRStr(tmp3tstr, "{@-@-@}", "left"); else tmp3tstr = cls.getLRStr(tmp3tstr, "{@-@-@}", "right"); } else { tnForumStateString = "2"; tmp3tstr = cls.getLRStr(tmp3tstr, "{@-@-@}", "right"); } tmp3rstr += tmp3tstr; tmp2tstr = tmp2tstr.Replace(config.jtbccinfo, tmp3rstr); //**************************************************************// tmp2tstr = tmp2tstr.Replace("{$-p-state}", tnForumStateString); tmp2tstr = tmp2tstr.Replace("{$-p-num_note_new}", tnForumNumNoteNewString); tmp2tstr = jt.creplace(tmp2tstr); tmp2rstr += tmp2tstr; } } if (cls.isEmpty(tmp2rstr)) tmptstr = ""; else tmptstr = tmptstr.Replace(config.jtbccinfo, tmp2rstr); //****************************************************************************// tmprstr += tmptstr; tmpstr = tmpstr.Replace(config.jtbccinfo, tmprstr); //############################################################################// tmprstr = ""; tmpastr = cls.ctemplate(ref tmpstr, "{~}"); tmptstr = tmpastr; if (tForumIType == "99") tmptstr = ""; else { string tmp4astr, tmp4rstr, tmp4tstr; tmp4rstr = ""; tmp4astr = cls.ctemplate(ref tmptstr, "{~~}"); tdatabase = cls.getString(jt.itake("config.ndatabase-topic", "cfg")); tfpre = cls.getString(jt.itake("config.nfpre-topic", "cfg")); tidfield = cls.cfnames(tfpre, "id"); string tsqlstr4 = "select * from " + tdatabase + " where (" + cls.cfnames(tfpre, "htop") + "=1 or " + cls.cfnames(tfpre, "class") + "=" + tClass + ") and " + cls.cfnames(tfpre, "fid") + "=0 and " + cls.cfnames(tfpre, "hidden") + "=0"; if (!cls.isEmpty(tKeyword)) tsqlstr4 += " and " + cls.cfnames(tfpre, "topic") + " like '%" + tKeyword + "%'"; tsqlstr4 += " order by " + cls.cfnames(tfpre, "htop") + " desc," + cls.cfnames(tfpre, "top") + " desc," + cls.cfnames(tfpre, "last_time") + " desc"; pagi pagi; pagi = new pagi(); pagi.db = db; pagi.sqlstr = tsqlstr4; pagi.pagenum = tpage; pagi.rslimit = cls.getNum(jt.itake("config.nlisttopx", "cfg")); pagi.pagesize = cls.getNum(jt.itake("config.npagesize", "cfg")); pagi.Init(); object[] tArys4 = pagi.getDataAry(); if (tArys4 != null) { for (int tis = 0; tis < tArys4.Length; tis ++) { tmp4tstr = tmp4astr; object[,] tAry4 = (object[,])tArys4[tis]; for (int ti = 0; ti < tAry4.GetLength(0); ti ++) { tAry4[ti, 0] = (object)cls.getLRStr((string)tAry4[ti, 0], tfpre, "rightr"); tmp4tstr = tmp4tstr.Replace("{$-" + cls.toString(tAry4[ti, 0]) + "}", encode.htmlencode(cls.toString(tAry4[ti, 1]))); } string t4PNewClass = "hidden"; long t4nTimeStamp = cls.getUnixStamp(); long t4TimeStamp = cls.toInt64(cls.toString(db.getValue(tAry4, "timestamp"))); if (t4nTimeStamp - t4TimeStamp < 86400) t4PNewClass = "absmiddle"; tmp4tstr = tmp4tstr.Replace("{$-p-new-class}", t4PNewClass); tmp4tstr = tmp4tstr.Replace("{$-p-topic}", PP_FormatTopic(encode.htmlencode(cls.toString(db.getValue(tAry4, "topic"))), encode.htmlencode(cls.toString(db.getValue(tAry4, "color"))), encode.htmlencode(cls.toString(db.getValue(tAry4, "strong"))), encode.htmlencode(tKeyword))); tmp4tstr = tmp4tstr.Replace("{$-p-icon}", PP_GetTopicIcon(encode.htmlencode(cls.toString(db.getValue(tAry4, "htop"))), encode.htmlencode(cls.toString(db.getValue(tAry4, "top"))), encode.htmlencode(cls.toString(db.getValue(tAry4, "lock"))), encode.htmlencode(cls.toString(db.getValue(tAry4, "elite"))), encode.htmlencode(cls.toString(db.getValue(tAry4, "count"))))); tmp4tstr = tmp4tstr.Replace("{$-p-last-time}", PP_FormatLastTime(cls.toString(db.getValue(tAry4, "last_time")))); config.rscAry = tAry4; tmp4rstr += tmp4tstr; } } tmptstr = tmptstr.Replace(config.jtbccinfo, tmp4rstr); tmptstr = tmptstr.Replace("{$pagi.pagenum}", cls.toString(pagi.pagenum)); tmptstr = tmptstr.Replace("{$pagi.pagenums}", cls.toString(pagi.pagenums)); string tPagiURL = com.pagi(cls.toString(pagi.pagenum), cls.toString(pagi.pagenums), com.iurl("type=page;key=" + cls.toString(tClass) + ";page=[~page]"), "cutepage"); if (!cls.isEmpty(tKeyword)) tPagiURL = com.pagi(cls.toString(pagi.pagenum), cls.toString(pagi.pagenums), encode.htmlencode(config.nurlpre + config.nuri + "?type=list&class=" + cls.toString(tClass) + "&keyword=" + encode.urlencode(tKeyword) + "&page=[~page]"), "cutepage"); tmptstr = tmptstr.Replace("{$pagi.url}", tPagiURL); } tmprstr += tmptstr; tmpstr = tmpstr.Replace(config.jtbccinfo, tmprstr); tmpstr = tmpstr.Replace("{$-genre}", tNGenre); tmpstr = tmpstr.Replace("{$-lng}", cls.toString(tNLng)); tmpstr = tmpstr.Replace("{$-class}", cls.toString(tClass)); tmpstr = tmpstr.Replace("{$-topHtml}", PP_GetTopHtml(cls.toString(tClass))); tmpstr = jt.creplace(tmpstr); } } else tmpstr = com.webMessage(jt.itake("default.notexist-error-1", "lng")); return tmpstr; }
private string Module_Detail() { string tmpstr = ""; string tmpastr, tmprstr, tmptstr; string tNLng = config.nlng; int tId = cls.getNum(request.querystring("id"), 0); int tCtPage = cls.getNum(request.querystring("ctpage"), 0); string tdatabase = cls.getString(jt.itake("config.ndatabase-category", "cfg")); string tfpre = cls.getString(jt.itake("config.nfpre-category", "cfg")); string tidfield = cls.cfnames(tfpre, "id"); string tdatabaseT = cls.getString(jt.itake("config.ndatabase-topic", "cfg")); string tfpreT = cls.getString(jt.itake("config.nfpre-topic", "cfg")); string tidfieldT = cls.cfnames(tfpreT, "id"); string tsqlstr = "select * from " + tdatabase + "," + tdatabaseT + " where " + tdatabaseT + "." + cls.cfnames(tfpreT, "fid") + "=0 and " + tdatabaseT + "." + cls.cfnames(tfpreT, "hidden") + "=0 and " + tdatabaseT + "." + tidfieldT + "=" + tId + " and " + tdatabaseT + "." + cls.cfnames(tfpreT, "class") + "=" + tdatabase + "." + tidfield; object[] tArys = db.getDataAry(tsqlstr); if (tArys != null) { object[,] tAry = (object[,])tArys[0]; ac.cntitle(cls.toString(db.getValue(tAry, cls.cfnames(tfpre, "topic")))); ac.cntitle(cls.toString(db.getValue(tAry, cls.cfnames(tfpreT, "topic")))); string tForumLock = cls.toString(db.getValue(tAry, cls.cfnames(tfpreT, "lock"))); string tForumVoteId = cls.toString(db.getValue(tAry, cls.cfnames(tfpreT, "voteid"))); string tForumIType = cls.toString(db.getValue(tAry, cls.cfnames(tfpre, "itype"))); string tForumManager = cls.toString(db.getValue(tAry, cls.cfnames(tfpre, "manager"))); string tForumPopedom = cls.toString(db.getValue(tAry, cls.cfnames(tfpre, "popedom"))); int tClass = cls.getNum(cls.toString(db.getValue(tAry, cls.cfnames(tfpreT, "class"))), 0); if (tForumIType == "1" && !cls.cinstr(tForumManager, account.nusername, ",")) tForumLock = "1"; if (!PP_CheckPopedom(tForumPopedom)) tmpstr = com.webMessages(jt.itake("default.popedom-error-1", "lng"), "-1"); else { db.Execute("update " + tdatabaseT + " set " + cls.cfnames(tfpreT, "count") + "=" + cls.cfnames(tfpreT, "count") + "+1 where " + tidfieldT + "=" + tId); tmpstr = jt.itake("default.detail", "tpl"); tmprstr = ""; tmpastr = cls.ctemplate(ref tmpstr, "{@vote@}"); if (tForumVoteId != "0") { int tVoteCount = 0; string[,] tVoteAry = null; string tVoteTopic = ""; string tVoteType = ""; string tVoteDay = ""; string tVoteTime = ""; string tVoteEndTime = ""; string tdatabaseVt = cls.getString(jt.itake("config.ndatabase-vote", "cfg")); string tfpreVt = cls.getString(jt.itake("config.nfpre-vote", "cfg")); string tidfieldVt = cls.cfnames(tfpreVt, "id"); string tdatabaseVtd = cls.getString(jt.itake("config.ndatabase-vote-data", "cfg")); string tfpreVtd = cls.getString(jt.itake("config.nfpre-vote-data", "cfg")); string tidfieldVtd = cls.cfnames(tfpreVtd, "id"); string tsqlstrVt = "select * from " + tdatabaseVt + "," + tdatabaseVtd + " where " + tdatabaseVt + "." + tidfieldVt + "=" + tdatabaseVtd + "." + cls.cfnames(tfpreVtd, "fid") + " and " + tdatabaseVt + "." + tidfieldVt + "=" + cls.getNum(tForumVoteId, 0); object[] tArysVt = db.getDataAry(tsqlstrVt); if (tArysVt != null) { for (int tis = 0; tis < tArysVt.Length; tis ++) { object[,] tAryVt = (object[,])tArysVt[tis]; if (tis == 0) { tVoteTopic = cls.toString(db.getValue(tAryVt, cls.cfnames(tfpreVt, "topic"))); tVoteType = cls.toString(db.getValue(tAryVt, cls.cfnames(tfpreVt, "type"))); tVoteTime = cls.toString(db.getValue(tAryVt, cls.cfnames(tfpreVt, "time"))); tVoteDay = cls.toString(db.getValue(tAryVt, cls.cfnames(tfpreVt, "day"))); if (tVoteDay == "-1") tVoteEndTime = jt.itake("default.vote-noexp", "lng"); else tVoteEndTime = cls.formatUnixStampDate(cls.getUnixStamp(tVoteTime) + (cls.toInt64(tVoteDay) * 86400)); } string[,] tmpAry = new string[1, 3]; tmpAry[0, 0] = cls.toString(db.getValue(tAryVt, tidfieldVtd)); tmpAry[0, 1] = cls.toString(db.getValue(tAryVt, cls.cfnames(tfpreVtd, "topic"))); tmpAry[0, 2] = cls.toString(db.getValue(tAryVt, cls.cfnames(tfpreVtd, "count"))); tVoteCount += cls.getNum(cls.toString(db.getValue(tAryVt, cls.cfnames(tfpreVtd, "count"))), 0); tVoteAry = cls.mergeAry(tVoteAry, tmpAry); } } if (tVoteAry != null) { tmptstr = tmpastr; string tmp2astr, tmp2rstr, tmp2tstr; tmp2rstr = ""; tmp2astr = cls.ctemplate(ref tmptstr, "{@vote@data@}"); for (int tis = 0; tis < tVoteAry.GetLength(0); tis ++) { tmp2tstr = tmp2astr; int tCPerNum = cls.getNum(cls.cper(cls.getNum(tVoteAry[tis, 2], 0), tVoteCount), 0); string tCPerNumD = "block"; if (tCPerNum == 0) tCPerNumD = "none"; tmp2tstr = tmp2tstr.Replace("{$-o-id}", encode.htmlencode(tVoteAry[tis, 0])); tmp2tstr = tmp2tstr.Replace("{$-o-topic}", encode.htmlencode(tVoteAry[tis, 1])); tmp2tstr = tmp2tstr.Replace("{$-o-per}", encode.htmlencode(cls.toString(tCPerNum))); tmp2tstr = tmp2tstr.Replace("{$-o-per-d}", encode.htmlencode(tCPerNumD)); tmp2rstr += tmp2tstr; } tmptstr = tmptstr.Replace(config.jtbccinfo, tmp2rstr); tmptstr = tmptstr.Replace("{$-id}", encode.htmlencode(tForumVoteId)); tmptstr = tmptstr.Replace("{$-topic}", encode.htmlencode(tVoteTopic)); tmptstr = tmptstr.Replace("{$-type}", encode.htmlencode(tVoteType == "0" ? "radio": "checkbox")); tmptstr = tmptstr.Replace("{$-day}", encode.htmlencode(tVoteDay)); tmptstr = tmptstr.Replace("{$-count}", encode.htmlencode(cls.toString(tVoteCount))); tmptstr = tmptstr.Replace("{$-endtime}", encode.htmlencode(tVoteEndTime)); tmprstr += tmptstr; } } tmpstr = tmpstr.Replace(config.jtbccinfo, tmprstr); //****************************************************************************// tmprstr = ""; tmpastr = cls.ctemplate(ref tmpstr, "{@}"); string tsqlstrT = "select * from " + tdatabaseT + " where " + cls.cfnames(tfpreT, "hidden") + "=0 and (" + cls.cfnames(tfpreT, "fid") + "=" + tId + " or " + tidfieldT + "=" + tId + ") order by " + cls.cfnames(tfpreT, "fid") + " asc," + cls.cfnames(tfpreT, "time") + " asc"; pagi pagi; pagi = new pagi(); pagi.db = db; pagi.sqlstr = tsqlstrT; pagi.pagenum = tCtPage; pagi.rslimit = cls.getNum(jt.itake("config.nlisttopx", "cfg")); pagi.pagesize = cls.getNum(jt.itake("config.npagesize-2", "cfg")); pagi.Init(); object[] tArysT = pagi.getDataAry(); if (tArysT != null) { for (int tis = 0; tis < tArysT.Length; tis ++) { tmptstr = tmpastr; object[,] tAryT = (object[,])tArysT[tis]; string tAuid = cls.toString(db.getValue(tAryT, cls.cfnames(tfpreT, "auid"))); string tAuthor = cls.toString(db.getValue(tAryT, cls.cfnames(tfpreT, "author"))); string tEditUserName = cls.toString(db.getValue(tAryT, cls.cfnames(tfpreT, "edit_username"))); string tEditTime = cls.toString(db.getValue(tAryT, cls.cfnames(tfpreT, "edit_time"))); for (int ti = 0; ti < tAryT.GetLength(0); ti ++) { tAryT[ti, 0] = (object)cls.getLRStr((string)tAryT[ti, 0], tfpreT, "rightr"); tmptstr = tmptstr.Replace("{$-" + cls.toString(tAryT[ti, 0]) + "}", encode.htmlencode(cls.toString(tAryT[ti, 1]))); } config.rsbAry = tAryT; string tEditInfo = ""; if (!cls.isEmpty(tEditUserName)) { tEditInfo = jt.itake("default.txt-edit-info", "lng"); tEditInfo = tEditInfo.Replace("[username]", tEditUserName); tEditInfo = tEditInfo.Replace("[time]", cls.formatDate(tEditTime)); } string tAuthorFaceURLString = ""; string tAuthorFace = cls.toString(account.getUserInfo("face", tAuid)); string tAuthorFaceU = cls.toString(account.getUserInfo("face_u", tAuid)); string tAuthorFaceURL = cls.toString(account.getUserInfo("face_url", tAuid)); if (tAuthorFaceU == "1") tAuthorFaceURLString = tAuthorFaceURL; else tAuthorFaceURLString = cls.getActualRoute(jt.itake("config.naccount", "cfg")) + "/" + config.imagesRoute + "/face/" + tAuthorFace + ".gif"; tmptstr = tmptstr.Replace("{$-p-floor}", cls.toString(((pagi.pagenum - 1) * pagi.pagesize) + tis + 1)); tmptstr = tmptstr.Replace("{$-p-edit-info}", encode.htmlencode(tEditInfo)); tmptstr = tmptstr.Replace("{$-author-face}", encode.htmlencode(tAuthorFaceURLString)); tmptstr = tmptstr.Replace("{$-author-group}", encode.htmlencode(cls.toString(account.getUserInfo("group", tAuid)))); tmptstr = tmptstr.Replace("{$-author-email}", encode.htmlencode(cls.toString(account.getUserInfo("email", tAuid)))); tmptstr = tmptstr.Replace("{$-author-integral}", encode.htmlencode(cls.toString(account.getUserInfo("integral", tAuid)))); tmptstr = tmptstr.Replace("{$-author-time}", encode.htmlencode(cls.toString(account.getUserInfo("time", tAuid)))); tmptstr = tmptstr.Replace("{$-author-sign}", encode.htmlencode(cls.toString(account.getUserInfo("sign", tAuid)))); tmptstr = tmptstr.Replace("{$-p-account-pm-url}", cls.getActualRoute(cls.getLRStr(jt.itake("config.naccount", "cfg"), "/", "leftr")) + "/message/?type=manage&mtype=add&ruusername="******"1"; if (tForumLock == "1" || cls.isEmpty(account.nusername)) tnUserReply = "0"; tmpstr = com.crValcodeTpl(tmpstr); tmpstr = com.crValHtml(tmpstr, tnUserReply, "{@reply@}"); tmpstr = tmpstr.Replace("{$pagi.pagenum}", cls.toString(pagi.pagenum)); tmpstr = tmpstr.Replace("{$pagi.pagenums}", cls.toString(pagi.pagenums)); //****************************************************************************// string tnBackurlCtPage = cls.toString(pagi.pagenums); if (cls.getNum(jt.itake("config.nlisttopx", "cfg")) != pagi.rscount) { if ((pagi.rscount % pagi.pagesize) == 0) tnBackurlCtPage = cls.toString(pagi.pagenums + 1); } tmpstr = tmpstr.Replace("{$-backurl-ctpage}", tnBackurlCtPage); //****************************************************************************// tmpstr = tmpstr.Replace("{$-topHtml}", PP_GetTopHtml(cls.toString(tClass))); tmpstr = tmpstr.Replace("{$-nusername}", encode.htmlencode(account.nusername)); //****************************************************************************// tmpstr = tmpstr.Replace("{$id}", encode.htmlencode(cls.toString(db.getValue(tAry, cls.cfnames(tfpreT, "id"))))); tmpstr = tmpstr.Replace("{$topic}", encode.htmlencode(cls.toString(db.getValue(tAry, cls.cfnames(tfpreT, "topic"))))); tmpstr = tmpstr.Replace("{$class}", encode.htmlencode(cls.toString(db.getValue(tAry, cls.cfnames(tfpreT, "class"))))); tmpstr = tmpstr.Replace("{$time}", encode.htmlencode(cls.toString(db.getValue(tAry, cls.cfnames(tfpreT, "time"))))); tmpstr = jt.creplace(tmpstr); } } return tmpstr; }
private string Module_List() { string tmpstr = ""; string tmpastr, tmprstr, tmptstr; int tpage = cls.getNum(request.querystring("page")); int tfid = cls.getNum(request.querystring("fid"), 0); tmpstr = jt.itake("manage_category-interface.list", "tpl"); tmprstr = ""; tmpastr = cls.ctemplate(ref tmpstr, "{@}"); string tdatabase = cls.getString(jt.itake("config.ndatabase-category", "cfg")); string tfpre = cls.getString(jt.itake("config.nfpre-category", "cfg")); string tsqlstr = "select * from " + tdatabase + " where " + cls.cfnames(tfpre, "lng") + "=" + admin.slng + " and " + cls.cfnames(tfpre, "fid") + "=" + tfid + " order by " + cls.cfnames(tfpre, "order") + " asc"; pagi pagi; pagi = new pagi(); pagi.db = db; pagi.sqlstr = tsqlstr; pagi.pagenum = tpage; pagi.rslimit = cls.getNum(jt.itake("config.nlisttopx", "cfg")); pagi.pagesize = cls.getNum(jt.itake("config.npagesize", "cfg")); pagi.Init(); object[] tArys = pagi.getDataAry(); if (tArys != null) { for (int tis = 0; tis < tArys.Length; tis ++) { tmptstr = tmpastr; object[,] tAry = (object[,])tArys[tis]; for (int ti = 0; ti < tAry.GetLength(0); ti ++) { tAry[ti, 0] = (object)cls.getLRStr((string)tAry[ti, 0], tfpre, "rightr"); tmptstr = tmptstr.Replace("{$" + cls.toString(tAry[ti, 0]) + "}", encode.htmlencode(cls.toString(tAry[ti, 1]))); } tmprstr += tmptstr; } } tmpstr = tmpstr.Replace(config.jtbccinfo, tmprstr); tmpstr = tmpstr.Replace("{$-genre}", config.ngenre); tmpstr = tmpstr.Replace("{$-lng}", cls.toString(admin.slng)); tmpstr = tmpstr.Replace("{$-fid}", cls.toString(tfid)); tmpstr = tmpstr.Replace("{$-naccount}", cls.toString(jt.itake("config.naccount", "cfg"))); tmpstr = tmpstr.Replace("{$pagi.pagenum}", cls.toString(pagi.pagenum)); tmpstr = tmpstr.Replace("{$pagi.pagenums}", cls.toString(pagi.pagenums)); tmpstr = tmpstr.Replace("{$category.FaCatHtml}", PP_GetFaCatHtml(jt.itake("manage_category-interface.data_fa_category", "tpl"), admin.slng, tfid)); tmpstr = jt.creplace(tmpstr); tmpstr = config.ajaxPreContent + tmpstr; return tmpstr; }
private string Module_List() { string tmpstr = ""; string tmpastr, tmprstr, tmptstr; int tpage = cls.getNum(request.querystring("page"), 0); int tnclstype = cls.getNum(jt.itake("config.nclstype", "cfg"), 0); int tClass = cls.getNum(request.querystring("class"), -1); string tClassIn = cls.toString(tClass); if (tClassIn == "-1") tClassIn = ""; else ac.cntitle(category.getClassText(config.ngenre, cls.toInt32(config.nlng), tClass)); if (tnclstype == 1) tClassIn = category.getClassChildIds(config.ngenre, cls.toInt32(config.nlng), cls.toString(tClass)); tmpstr = jt.itake("default.list", "tpl"); tmprstr = ""; tmpastr = cls.ctemplate(ref tmpstr, "{@}"); string tdatabase = cls.getString(jt.itake("config.ndatabase", "cfg")); string tfpre = cls.getString(jt.itake("config.nfpre", "cfg")); string tidfield = cls.cfnames(tfpre, "id"); string tsqlstr = "select * from " + tdatabase + " where " + cls.cfnames(tfpre, "hidden") + "=0 and " + cls.cfnames(tfpre, "lng") + "=" + config.nlng; if (!cls.isEmpty(tClassIn)) tsqlstr += " and " + cls.cfnames(tfpre, "class") + " in (" + tClassIn + ")"; tsqlstr += " order by " + cls.cfnames(tfpre, "time") + " desc"; pagi pagi; pagi = new pagi(); pagi.db = db; pagi.sqlstr = tsqlstr; pagi.pagenum = tpage; pagi.rslimit = cls.getNum(jt.itake("config.nlisttopx", "cfg")); pagi.pagesize = cls.getNum(jt.itake("config.npagesize", "cfg")); pagi.Init(); object[] tArys = pagi.getDataAry(); if (tArys != null) { for (int tis = 0; tis < tArys.Length; tis ++) { tmptstr = tmpastr; object[,] tAry = (object[,])tArys[tis]; for (int ti = 0; ti < tAry.GetLength(0); ti ++) { tAry[ti, 0] = (object)cls.getLRStr((string)tAry[ti, 0], tfpre, "rightr"); tmptstr = tmptstr.Replace("{$" + cls.toString(tAry[ti, 0]) + "}", encode.htmlencode(cls.toString(tAry[ti, 1]))); } config.rsAry = tAry; tmptstr = jt.creplace(tmptstr); tmprstr += tmptstr; } } tmpstr = tmpstr.Replace(config.jtbccinfo, tmprstr); tmpstr = tmpstr.Replace("{$-genre}", config.ngenre); tmpstr = tmpstr.Replace("{$-lng}", cls.toString(config.nlng)); tmpstr = tmpstr.Replace("{$-class}", cls.toString(tClass)); tmpstr = tmpstr.Replace("{$pagi.pagenum}", cls.toString(pagi.pagenum)); tmpstr = tmpstr.Replace("{$pagi.pagenums}", cls.toString(pagi.pagenums)); tmpstr = jt.creplace(tmpstr); return tmpstr; }
private string Module_List() { string tmpstr = ""; string tmpastr, tmprstr, tmptstr; int tpage = cls.getNum(request.querystring("page")); string tfield = cls.getSafeString(request.querystring("field")); string tkeyword = cls.getSafeString(request.querystring("keyword")); string tnav = cls.getSafeString(request.querystring("hspan")); tmpstr = jt.itake("manage.list", "tpl"); tmprstr = ""; tmpastr = cls.ctemplate(ref tmpstr, "{@}"); string tdatabase = cls.getString(jt.itake("global.config.sys->upload-ndatabase", "cfg")); string tfpre = cls.getString(jt.itake("global.config.sys->upload-nfpre", "cfg")); string tsqlstr = "select * from " + tdatabase + " where " + cls.cfnames(tfpre, "id") + ">0"; if (tfield == "filename") tsqlstr += " and " + cls.cfnames(tfpre, "filename") + " like '%" + tkeyword + "%'"; if (tfield == "genre") tsqlstr += " and " + cls.cfnames(tfpre, "genre") + " like '%" + tkeyword + "%'"; if (tfield == "valid") tsqlstr += " and " + cls.cfnames(tfpre, "valid") + "=" + cls.getNum(tkeyword); if (tfield == "id") tsqlstr += " and " + cls.cfnames(tfpre, "id") + "=" + cls.getNum(tkeyword); tsqlstr += " order by " + cls.cfnames(tfpre, "time") + " desc"; pagi pagi; pagi = new pagi(); pagi.db = db; pagi.sqlstr = tsqlstr; pagi.pagenum = tpage; pagi.rslimit = cls.getNum(jt.itake("config.nlisttopx", "cfg")); pagi.pagesize = cls.getNum(jt.itake("config.npagesize", "cfg")); pagi.Init(); object[] tArys = pagi.getDataAry(); if (tArys != null) { for (int tis = 0; tis < tArys.Length; tis++) { tmptstr = tmpastr; object[,] tAry = (object[,])tArys[tis]; for (int ti = 0; ti < tAry.GetLength(0); ti++) { tAry[ti, 0] = (object)cls.getLRStr((string)tAry[ti, 0], tfpre, "rightr"); tmptstr = tmptstr.Replace("{$" + cls.toString(tAry[ti, 0]) + "}", encode.htmlencode(cls.toString(tAry[ti, 1]))); } string tFileType = (string)db.getValue(tAry, "filename"); tFileType = cls.getLRStr(tFileType, ".", "right"); tFileType = tFileType.ToLower(); tmptstr = tmptstr.Replace("{$-filetype}", tFileType); tmptstr = tmptstr.Replace("{$-vlreason}", PP_GetVLReason((int)db.getValue(tAry, "valid"), (int)db.getValue(tAry, "vlreason"))); tmprstr += tmptstr; } } tmpstr = tmpstr.Replace(config.jtbccinfo, tmprstr); tmpstr = jt.creplace(tmpstr); #region �������˷�ҳ pagi_plus pagi_plus = new pagi_plus(pagi); string pagerUrl = config.nuri + "?"; if (!cls.isEmpty(tfield)) pagerUrl += string.Format("{0}field={1}", pagerUrl.EndsWith("?") ? "" : "&", tfield); if (!cls.isEmpty(tkeyword)) pagerUrl += string.Format("{0}keyword={1}", pagerUrl.EndsWith("?") ? "" : "&", tkeyword); if (!cls.isEmpty(tnav)) pagerUrl += string.Format("{0}hspan={1}", pagerUrl.EndsWith("?") ? "" : "&", tnav); pagerUrl += pagerUrl.EndsWith("?") ? "page=[$page]" : "&page=[$page]"; string pager = pagi_plus.pager(pagerUrl, 9); tmpstr = tmpstr.Replace("{$pager}", pager); tmpstr = tmpstr.Replace("{$page}", cls.toString(pagi.pagenum)); #endregion string tmpstrp = jt.itake("manage.public", "tpl"); tmpstr = tmpstrp.Replace("{$content}", tmpstr); tmpstr = jt_plus.creplace(tmpstr); return tmpstr; }
private string Module_List() { //���ղ��� string tgenre = cls.getSafeString(request.querystring("genre")); if (cls.isEmpty(tgenre)) tgenre = Sub_GetDefaultGenre(); int tfid = cls.getNum(request.querystring("fid"), 0); int tpage = cls.getNum(request.querystring("page")); string tnav = cls.getSafeString(request.querystring("hspan")); //��ȡģ�������������HTML string tmpstr = ""; string tmpastr, tmprstr, tmptstr; tmpstr = jt.itake("manage.list", "tpl"); tmprstr = ""; tmpastr = cls.ctemplate(ref tmpstr, "{@}"); string tdatabase = cls.getString(jt.itake("global.config.sys->category-ndatabase", "cfg")); string tfpre = cls.getString(jt.itake("global.config.sys->category-nfpre", "cfg")); string tsqlstr = "select * from " + tdatabase + " where " + cls.cfnames(tfpre, "lng") + "=" + admin.slng + " and " + cls.cfnames(tfpre, "genre") + "='" + tgenre + "' and " + cls.cfnames(tfpre, "fid") + "=" + tfid + " order by " + cls.cfnames(tfpre, "order") + " asc"; pagi pagi; pagi = new pagi(); pagi.db = db; pagi.sqlstr = tsqlstr; pagi.pagenum = tpage; pagi.rslimit = cls.getNum(jt.itake("config.nlisttopx", "cfg")); pagi.pagesize = cls.getNum(jt.itake("config.npagesize", "cfg")); pagi.Init(); object[] tArys = pagi.getDataAry(); if (tArys != null) { for (int tis = 0; tis < tArys.Length; tis++) { tmptstr = tmpastr; object[,] tAry = (object[,])tArys[tis]; for (int ti = 0; ti < tAry.GetLength(0); ti++) { tAry[ti, 0] = (object)cls.getLRStr((string)tAry[ti, 0], tfpre, "rightr"); tmptstr = tmptstr.Replace("{$" + cls.toString(tAry[ti, 0]) + "}", encode.htmlencode(cls.toString(tAry[ti, 1]))); } tmprstr += tmptstr; } } tmpstr = tmpstr.Replace(config.jtbccinfo, tmprstr); #region ��ҳ pagi_plus pagi_plus = new pagi_plus(pagi); string pagerUrl = config.nuri + "?"; if (!cls.isEmpty(tgenre)) pagerUrl += string.Format("{0}genre={1}", pagerUrl.EndsWith("?") ? "" : "&", tgenre); if (tfid != 0) pagerUrl += string.Format("{0}fid={1}", pagerUrl.EndsWith("?") ? "" : "&", tfid); if (!cls.isEmpty(tnav)) pagerUrl += string.Format("{0}hspan={1}", pagerUrl.EndsWith("?") ? "" : "&", tnav); pagerUrl += pagerUrl.EndsWith("?") ? "page=[$page]" : "&page=[$page]"; string pager = pagi_plus.pager(pagerUrl, 9); tmpstr = tmpstr.Replace("{$pager}", pager); tmpstr = tmpstr.Replace("{$page}", cls.toString(pagi.pagenum)); #endregion tmpstr = tmpstr.Replace("{$category.FaCatHtml}", category.getFaCatHtml(jt.itake("manage.data_fa_category", "tpl"), tgenre, admin.slng, tfid)); tmpstr = jt.creplace(tmpstr); string tmpstrp = jt.itake("manage.public", "tpl"); tmpstrp = tmpstrp.Replace("{$content}", tmpstr); tmpstr = jt_plus.creplace(tmpstrp); tmpstr = tmpstr.Replace("{$selcolumn}", Sub_Selcolumn(tgenre)); tmpstr = tmpstr.Replace("{$genre}", tgenre); tmpstr = tmpstr.Replace("{$fid}", tfid.ToString()); return tmpstr; }
private string Module_List() { string tmpstr = ""; string tmpastr, tmprstr, tmptstr; int tpage = cls.getNum(request.querystring("page")); int tnclstype = cls.getNum(jt.itake("config.nclstype", "cfg"), 0); int tClass = cls.getNum(request.querystring("class"), -1); string tClassIn = admin.getMyClassIn(config.ngenre, admin.slng, tnclstype, tClass); string tfield = cls.getSafeString(request.querystring("field")); string tkeyword = cls.getSafeString(request.querystring("keyword")); tmpstr = jt.itake("manage-interface.list", "tpl"); tmprstr = ""; tmpastr = cls.ctemplate(ref tmpstr, "{@}"); string tdatabase = cls.getString(jt.itake("config.ndatabase", "cfg")); string tfpre = cls.getString(jt.itake("config.nfpre", "cfg")); string tsqlstr = "select * from " + tdatabase + " where " + cls.cfnames(tfpre, "lng") + "=" + admin.slng; if (tfield == "topic") tsqlstr += " and " + cls.cfnames(tfpre, "topic") + " like '%" + tkeyword + "%'"; if (tfield == "commendatory") tsqlstr += " and " + cls.cfnames(tfpre, "commendatory") + "=" + cls.getNum(tkeyword); if (tfield == "hidden") tsqlstr += " and " + cls.cfnames(tfpre, "hidden") + "=" + cls.getNum(tkeyword); if (tfield == "id") tsqlstr += " and " + cls.cfnames(tfpre, "id") + "=" + cls.getNum(tkeyword); if (!cls.isEmpty(tClassIn)) tsqlstr += " and " + cls.cfnames(tfpre, "class") + " in (" + tClassIn + ")"; tsqlstr += " order by " + cls.cfnames(tfpre, "time") + " desc"; pagi pagi; pagi = new pagi(); pagi.db = db; pagi.sqlstr = tsqlstr; pagi.pagenum = tpage; pagi.rslimit = cls.getNum(jt.itake("config.nlisttopx", "cfg")); pagi.pagesize = cls.getNum(jt.itake("config.npagesize", "cfg")); pagi.Init(); object[] tArys = pagi.getDataAry(); if (tArys != null) { for (int tis = 0; tis < tArys.Length; tis ++) { tmptstr = tmpastr; object[,] tAry = (object[,])tArys[tis]; for (int ti = 0; ti < tAry.GetLength(0); ti ++) { tAry[ti, 0] = (object)cls.getLRStr((string)tAry[ti, 0], tfpre, "rightr"); tmptstr = tmptstr.Replace("{$" + cls.toString(tAry[ti, 0]) + "}", encode.htmlencode(cls.toString(tAry[ti, 1]))); } tmprstr += tmptstr; } } tmpstr = tmpstr.Replace(config.jtbccinfo, tmprstr); tmpstr = tmpstr.Replace("{$-genre}", config.ngenre); tmpstr = tmpstr.Replace("{$-lng}", cls.toString(admin.slng)); tmpstr = tmpstr.Replace("{$pagi.pagenum}", cls.toString(pagi.pagenum)); tmpstr = tmpstr.Replace("{$pagi.pagenums}", cls.toString(pagi.pagenums)); tmpstr = tmpstr.Replace("{$category.FaCatHtml}", category.getFaCatHtml(jt.itake("manage-interface.data_fa_category", "tpl"), config.ngenre, admin.slng, tClass)); tmpstr = jt.creplace(tmpstr); tmpstr = config.ajaxPreContent + tmpstr; return tmpstr; }