Backup/Discuz.Data/DataProvider/Statistics.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Text;
using System.Data;
using Discuz.Common;
namespace Discuz.Data
{
public class Statistics
{
/// <summary>
/// 获得统计列
/// </summary>
/// <returns>统计列</returns>
public static DataTable GetStatisticsRow()
{
return DatabaseProvider.GetInstance().GetStatisticsRow();
}
/// <summary>
/// 获取指定版块中的主题帖子统计数据
/// </summary>
/// <param name="fid"></param>
/// <param name="topiccount"></param>
/// <param name="postcount"></param>
/// <param name="todaypostcount"></param>
public static void GetAllForumStatistics(out int topiccount, out int postcount, out int todaypostcount)
{
topiccount = 0;
postcount = 0;
todaypostcount = 0;
IDataReader reader = DatabaseProvider.GetInstance().GetAllForumStatistics();
while (reader.Read())
{
topiccount = TypeConverter.ObjectToInt(reader["topiccount"], 0);
postcount = TypeConverter.ObjectToInt(reader["postcount"], 0);
todaypostcount = TypeConverter.ObjectToInt(reader["todaypostcount"], 0);
}
reader.Close();
}
/// <summary>
/// 获取指定版块中的主题帖子统计数据
/// </summary>
/// <param name="fid"></param>
/// <param name="topiccount"></param>
/// <param name="postcount"></param>
/// <param name="todaypostcount"></param>
public static void GetForumStatistics(int fid, out int topiccount, out int postcount, out int todaypostcount)
{
topiccount = 0;
postcount = 0;
todaypostcount = 0;
IDataReader reader = DatabaseProvider.GetInstance().GetForumStatistics(fid);
while (reader.Read())
{
topiccount = TypeConverter.ObjectToInt(reader["topiccount"], 0);
postcount = TypeConverter.ObjectToInt(reader["postcount"], 0);
后面还有 28 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
