📄 contentmanage.cs
字号:
}
public static IList<SpecialCommonModelInfo> GetCommonModelInfoListBySpecialId(int startRowIndexId, int maxNumberRows, int specialId, ContentSortType sortType, int status)
{
string roleIds = "";
if (!PEContext.Current.Admin.IsSuperAdmin)
{
roleIds = PEContext.Current.Admin.Roles;
}
return dal.GetCommonModelInfoListBySpecialId(startRowIndexId, maxNumberRows, specialId, sortType, status, roleIds);
}
public static IList<SpecialCommonModelInfo> GetCommonModelInfoListBySpecialIdOrSpecialCategoryId(int startRowIndexId, int maxNumberRows, int specialId, int specialCategoryId, ContentSortType sortType, int status)
{
IList<SpecialCommonModelInfo> list = new List<SpecialCommonModelInfo>();
if ((specialCategoryId > 0) && (specialId == 0))
{
return GetCommonModelInfoListBySpecialCategoryId(startRowIndexId, maxNumberRows, specialCategoryId, sortType, status);
}
return GetCommonModelInfoListBySpecialId(startRowIndexId, maxNumberRows, specialId, sortType, status);
}
public static IList<CommonModelInfo> GetCommonModelInfoListByUserName(int startRowIndexId, int maxNumberRows, string userName, int nodeId, ContentSortType sortType, int status, string title)
{
string nodeArrChildId = GetNodeArrChildId(nodeId);
return dal.GetCommonModelInfoListByUserName(startRowIndexId, maxNumberRows, userName, nodeArrChildId, sortType, status, title);
}
public static DataTable GetContentDataById(int generalId)
{
return dal.GetContentDataById(generalId);
}
public static DataSet GetContentList(int modelId, string nodeIds)
{
return dal.GetContentList(modelId, nodeIds);
}
public static int GetContentNodeId(int generalId)
{
return dal.GetContentNodeId(generalId);
}
public static DataTable GetCountByEditorAndMonth(int nodeId, string editor, DateTime beginDate, DateTime endDate)
{
return dal.GetCountByEditorAndMonth(nodeId, editor, beginDate, endDate);
}
public static DataTable GetCountByInputerAndMonth(int nodeId, string userName, DateTime beginDate, DateTime endDate)
{
return dal.GetCountByInputerMonth(nodeId, userName, beginDate, endDate);
}
public static DataTable GetCountByNodeAndEditor(int nodeId, string editor, DateTime beginDate, DateTime endDate)
{
return dal.GetCountByNodeAndEditor(nodeId, editor, beginDate, endDate);
}
public static DataTable GetCountByNodeAndInputer(int nodeId, string userName, DateTime beginDate, DateTime endDate)
{
return dal.GetCountByNodeAndInputer(nodeId, userName, beginDate, endDate);
}
public static DataTable GetCountByNodeAndMonth(int nodeId, DateTime beginDate, DateTime endDate)
{
return dal.GetCountByNodeAndMonth(nodeId, beginDate, endDate);
}
public static IList<CommonModelInfo> GetCreateHtmlCommonModelInfoList(int startRowIndexId, int maxNumberRows, int nodeId, int created, ContentSortType sortType, bool isEshop)
{
string nodeArrChildId = GetNodeArrChildId(nodeId);
return dal.GetCreateHtmlCommonModelInfoList(startRowIndexId, maxNumberRows, nodeArrChildId, created, sortType, isEshop);
}
private static DataRow[] GetDataRow(DataTable dataTable, string filter)
{
if (!string.IsNullOrEmpty(filter))
{
return dataTable.Select(filter);
}
return dataTable.Select();
}
private static FieldInfo GetFieldInfoByName(IList<FieldInfo> fieldList, string name)
{
foreach (FieldInfo info in fieldList)
{
if (string.Compare(info.FieldName, name, true) == 0)
{
return info;
}
}
return new FieldInfo(true);
}
public static string GetGeneralIdArrByNodeId(string nodeIds, int status)
{
if (!DataValidator.IsValidId(nodeIds))
{
return string.Empty;
}
return dal.GetGeneralIdArrByNodeId(nodeIds, status);
}
public static DataTable GetHitsDataById(int generalId)
{
return dal.GetHitsDataById(generalId);
}
public static IList<CommonModelInfo> GetInfoList(int generalId)
{
return dal.GetInfoList(generalId);
}
public static DataTable GetNewContentData(DataTable dataTable)
{
DataRow[] dataRow = GetDataRow(dataTable, "FieldName = 'nodeid'");
DataRow[] rowArray2 = GetDataRow(dataTable, "FieldName = 'infoid'");
string str = dataRow[0]["FieldValue"].ToString();
string str2 = rowArray2[0]["FieldValue"].ToString();
StringBuilder builder = new StringBuilder("");
string[] strArray = str2.Split(new char[] { ',' });
for (int i = 0; i < strArray.Length; i++)
{
if (str != strArray[i])
{
builder.Append(strArray[i]);
builder.Append(",");
}
}
if (builder.Length < 1)
{
rowArray2[0]["FieldValue"] = "";
return dataTable;
}
builder.Remove(builder.Length - 1, 1);
rowArray2[0]["FieldValue"] = builder.ToString();
return dataTable;
}
public static CommonModelInfo GetNextInfo(int nodeId, int generalId)
{
return dal.GetNextInfo(nodeId, generalId);
}
private static string GetNodeArrChildId(int nodeId)
{
string arrChildId = string.Empty;
if (nodeId > 0)
{
arrChildId = PowerEasy.Contents.Nodes.GetCacheNodeById(nodeId).ArrChildId;
}
return arrChildId;
}
public static CommonModelInfo GetPrevInfo(int nodeId, int generalId)
{
return dal.GetPrevInfo(nodeId, generalId);
}
public static IList<CommonModelInfo> GetSearchContentList(int startRowIndexId, int maxNumberRows, int nodeId, ContentSortType sortType, int status, string searchType, string keyword)
{
string nodeIds = "";
string roles = "";
CommonMethod(nodeId, ref nodeIds, ref roles);
string cacheContentModelIdList = ModelManager.GetCacheContentModelIdList();
return dal.GetSearchContentList(startRowIndexId, maxNumberRows, nodeIds, cacheContentModelIdList, sortType, status, roles, searchType, DataSecurity.FilterBadChar(keyword));
}
public static string GetStatusShow(string status)
{
int num = DataConverter.CLng(status);
switch (num)
{
case -3:
return "回收站中";
case -2:
return "退稿";
case -1:
return "草稿";
case 0:
return "待审核";
case 0x63:
return "终审通过";
}
return "审核中";
}
public static int GetTodayPublicInfoCountByUserName(string userName)
{
return dal.GetTodayPublicInfoCountByUserName(userName);
}
public static int GetTotalOfCommentedCommonModelInfo(int nodeId, int type)
{
return dal.GetTotalOfCommonModelInfo();
}
public static int GetTotalOfCommentedCommonModelInfoByUserName(int nodeId, int type, string userName)
{
return dal.GetTotalOfCommonModelInfo();
}
public static int GetTotalOfCommonModelInfo(int nodeId, ContentSortType sortType, int status)
{
return dal.GetTotalOfCommonModelInfo();
}
public static int GetTotalOfCommonModelInfo(int nodeId, ContentSortType sortType, int status, string searchType, string keyword)
{
return dal.GetTotalOfCommonModelInfo();
}
public static int GetTotalOfCommonModelInfoBySigninLog(string userName)
{
return dal.GetTotalOfCommonModelInfo();
}
public static int GetTotalOfCommonModelInfoBySigninType(int nodeId, int signinType, ContentSortType sortType, int status, string searchType, string keyword)
{
return dal.GetTotalOfCommonModelInfo();
}
public static int GetTotalOfCommonModelInfoBySpecialCategoryId(int specialCategoryId, ContentSortType sortType, int status)
{
return dal.GetTotalOfCommonModelInfoBySpecialCategoryId();
}
public static int GetTotalOfCommonModelInfoBySpecialId(int specialId, ContentSortType sortType, int status)
{
return dal.GetTotalOfCommonModelInfoBySpecialId();
}
public static int GetTotalOfCommonModelInfoBySpecialIdOrSpecialCategoryId(int specialId, int specialCategoryId, ContentSortType sortType, int status)
{
if ((specialCategoryId > 0) && (specialId == 0))
{
return GetTotalOfCommonModelInfoBySpecialCategoryId(specialCategoryId, sortType, status);
}
return GetTotalOfCommonModelInfoBySpecialId(specialId, sortType, status);
}
public static int GetTotalOfCommonModelInfoByUserName(string userName, int nodeId, ContentSortType sortType, int status, string title)
{
return dal.GetTotalOfCommonModelInfo();
}
public static int GetTotalOfCreateHtmlCommonModelInfo(int nodeId, int created, ContentSortType sortType, bool isEshop)
{
return dal.GetTotalOfCommonModelInfo();
}
public static DataTable GetUserContentDataById(int generalId)
{
string userName = PEContext.Current.User.UserName;
return dal.GetUserContentDataById(generalId, userName);
}
private static string PathReplaceLable(string content)
{
string input = content;
string pattern = @"{PE\.SiteConfig\.ApplicationPath\/}";
foreach (Match match in Regex.Matches(input, pattern, RegexOptions.IgnoreCase))
{
input = input.Replace(match.Value, SiteConfig.SiteInfo.VirtualPath);
}
pattern = @"{PE\.SiteConfig\.uploaddir\/}";
foreach (Match match2 in Regex.Matches(input, pattern, RegexOptions.IgnoreCase))
{
input = input.Replace(match2.Value, SiteConfig.SiteOption.UploadDir);
}
return input;
}
private static void PresentExp(CommonModelInfo commonInfo, int status)
{
UserInfo usersByUserName = Users.GetUsersByUserName(commonInfo.Inputer);
if (!usersByUserName.IsNull)
{
UserPurviewInfo userPurview = usersByUserName.UserPurview;
if (userPurview.IsNull)
{
userPurview.MaxPublicInfoOneDay = -1;
userPurview.GetExp = 1;
}
if (userPurview.GetExp == 0)
{
userPurview.GetExp = 1;
}
int num = PowerEasy.Contents.Nodes.GetCacheNodeById(commonInfo.NodeId).Settings.PresentExp * userPurview.GetExp;
if ((status == 0x63) && (commonInfo.Status < 0x63))
{
usersByUserName.UserExp += num;
usersByUserName.PostItems++;
}
if ((commonInfo.Status == 0x63) && (status < 0x63))
{
usersByUserName.UserExp -= num;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -