马上注册,免费下载更多dz插件网资源。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
调用最新主题- $new=DB::fetch_all("SELECT tid,subject FROM ".DB::table('forum_thread')." ORDER BY `dateline` desc LIMIT 0,1;");
复制代码
调用最新主题封面图- $img=DB::fetch_all("SELECT a.subject,a.tid,b.attachment FROM ".DB::table("forum_thread")." a LEFT JOIN ".DB::table("forum_threadimage")." b on b.tid=a.tid WHERE a.`attachment`=2 ORDER BY a.`dateline` DESC LIMIT 0,5");
复制代码
调用当前登录用户阅读权限- $read=DB::result(DB::query("SELECT b.readaccess FROM ".DB::table('common_member')." a left join ".DB::table('common_usergroup_field')." b on b.groupid=a.groupid WHERE a.`uid`= '$_G[uid]'"));
复制代码
调用常用统计数据- //获取VERSION、RELEASE$version = unserialize($_G['setting']['cloudaddons_newversion']);//获取站长用户名$name = DB::result_first("select username from ".DB::table("common_member")." where uid = 1");//获取建站时间$time = DB::result_first("select regdate from ".DB::table("common_member")." where uid = 1");//获取模板个数$templates = DB::result_first("select count(styleid) from ".DB::table("common_style")."");//获取插件个数$plugins = DB::result_first("select count(pluginid) from ".DB::table("common_plugin")."");//获取会员人数$users = DB::result_first("select count(uid) from ".DB::table("common_member")."");//获取临时会员人数$guests = DB::result_first("select count(conopenid) from ".DB::table("common_connect_guest")."");//获取会员总人数$all_users = $users + $guests;//获取管理团队人数$admins = DB::result_first("select count(uid) from ".DB::table("common_member")." where groupid in (1,2)");//获取最新注册会员$newuser = DB::result_first("select username from ".DB::table("common_member")." order BY regdate desc");//获取发帖会员人数$post_posts = DB::result_first("select count(uid) from ".DB::table("common_member_count")." where posts > 0 ");//获取发表主题会员人数$post_threads = DB::result_first("select count(uid) from ".DB::table("common_member_count")." where threads > 0 ");//获取版块数$forums = DB::result_first("select count(fid) from ".DB::table("forum_forum")." where type = 'forum' and status in (0,1)");//获取总帖数$posts = DB::result_first("select count(pid) from ".DB::table("forum_post")."");//获取主题数$threads = DB::result_first("select count(tid) from ".DB::table("forum_thread")."");//获取精华主题数$digest = DB::result_first("select count(digest) from ".DB::table("forum_thread")." where digest > 0");//获取高亮主题数$highlight = DB::result_first("select count(highlight) from ".DB::table("forum_thread")." where highlight > 0");//获取置顶主题数$displayorder = DB::result_first("select count(displayorder) from ".DB::table("forum_thread")." where displayorder > 0");//获取附件主题数$attachment = DB::result_first("select count(tid) from ".DB::table("forum_thread")." where attachment > 0");//获取待审核主题数$moderate_threads = DB::result_first("select count(id) from ".DB::table("forum_thread_moderate")." where status = 0");//获取已忽略主题数$moderate_ignore_threads = DB::result_first("select count(id) from ".DB::table("forum_thread_moderate")." where status = 1");//获取待审核回复数$moderate_posts = DB::result_first("select count(id) from ".DB::table("forum_post_moderate")." where status = 0");//获取已忽略回复数$moderate_ignore_posts = DB::result_first("select count(id) from ".DB::table("forum_post_moderate")." where status = 1");//获取主题回收站数$recyclebin_threads = DB::result_first("select count(tid) from ".DB::table("forum_thread")." where displayorder = -1");//获取回复回收站数$recyclebin_posts = DB::result_first("select count(tid) from ".DB::table("forum_post")." where invisible = -5");//获取访问总数$views = DB::result_first("select sum(views) from ".DB::table("forum_thread")."");//获取回复总数$replies = DB::result_first("select sum(replies) from ".DB::table("forum_thread")."");//获取支持总数$recommend_add = DB::result_first("select sum(recommend_add) from ".DB::table("forum_thread")."");//获取反对总数$recommend_sub = DB::result_first("select sum(recommend_sub) from ".DB::table("forum_thread")."");//获取收藏总数$favtimes = DB::result_first("select sum(favtimes) from ".DB::table("forum_thread")."");//获取分享总数$sharetimes = DB::result_first("select sum(sharetimes) from ".DB::table("forum_thread")."");//获取会员:男性$users_man = DB::result_first("select count(uid) from ".DB::table("common_member_profile")." where gender = 1 ");//获取会员:女性$users_woman = DB::result_first("select count(uid) from ".DB::table("common_member_profile")." where gender = 2 ");//获取会员:80后$users_80 = DB::result_first("select count(uid) from ".DB::table("common_member_profile")." where birthyear > 1980 and birthyear < 1989 ");
复制代码
©DZ插件网所发布的一切资源仅限用于学习和研究目的;不得将上述内容用于商业或者非法用途,否则,一切后果请用户自负。 网站部分内容来源于网络,版权争议与本站无关。您必须在下载后的24个小时之内,从您的电脑中彻底删除上述内容。如果您喜欢该程序,请支持正版软件,得到更好的正版服务。 您在本站任何的赞助购买、下载、查阅、回复等行为等均表示接受并同意签订《DZ插件网免责声明协议》。 如有侵权请邮件与我们联系处理: discuzaddons@vip.qq.com 并出示相关证明以便删除。敬请谅解!
|
|