大冶分类信息网 www.qudaye.com 招聘,求职,商铺展示,交友,二手交易,同城活动。免费发布- supesite后台首页加未审核统计功能 详解
- 为方便站长第一时间看到未审核的模型信息,现在在后台首页补充这个功能!
- 修改admin/admin_index.php 文档
- 将$statistics = array(
- 'sitekey' => $sitekey,
- 'version' => S_VER,
- 'release' => S_RELEASE,
- 'php' => PHP_VERSION,
- 'mysql' => $_SGLOBAL['db']->result($_SGLOBAL['db']->query("SELECT VERSION()"), 0),
- 'dbsize' => $dbsize,
- 'charset' => $_SC['charset'],
- 'sitename' => preg_replace('/[\'"\s]/s', '', $_SCONFIG['sitename']),
- 'adnum' => getcount('ads', array()),
- 'announcementnum' => getcount('announcements', array()),
- 'attachmentnum' => getcount('attachments', array()),
- 'forumnum' => getcount('forums', array()),
- 'categorynum' => getcount('categories', array()),
- 'channelnum' => getcount('channels', array()),
- 'friendlinknum' => getcount('friendlinks', array()),
- 'membernum' => getcount('members', array()),
- 'modelnum' => getcount('models', array()),
- 'pollnum' => getcount('polls', array()),
- 'reportnum' => getcount('reports', array()),
- 'robotnum' => getcount('robots', array()),
- 'spacecommentnum' => getcount('spacecomments', array()),
- 'spaceitemnum' => getcount('spaceitems', array()),
- 'tagnum' => getcount('tags', array()),
- 'usergroupnum' => getcount('usergroups', array())
- );
- 复制代码替换为$modelsfoldersql = 'SELECT m.modelalias, count(*) as recodernum FROM '.tname('modelfolders').' mf
- LEFT JOIN '.tname('models').' m ON (m.mid = mf.mid)
- WHERE folder=1 GROUP BY mf.mid';
- $modelsquery = $_SGLOBAL['db']->query($modelsfoldersql );
- $mfarr = array();
- while($v = $_SGLOBAL['db']->fetch_array($modelsquery))
- {
- $mfarr[$v['modelalias']] = $v['recodernum'] ;
- }
-
- $statistics = array(
- 'sitekey' => $sitekey,
- 'version' => S_VER,
- 'release' => S_RELEASE,
- 'php' => PHP_VERSION,
- 'mysql' => $_SGLOBAL['db']->result($_SGLOBAL['db']->query("SELECT VERSION()"), 0),
- 'dbsize' => $dbsize,
- 'charset' => $_SC['charset'],
- 'sitename' => preg_replace('/[\'"\s]/s', '', $_SCONFIG['sitename']),
- 'adnum' => getcount('ads', array()),
- 'announcementnum' => getcount('announcements', array()),
- 'attachmentnum' => getcount('attachments', array()),
- 'forumnum' => getcount('forums', array()),
- 'categorynum' => getcount('categories', array()),
- 'channelnum' => getcount('channels', array()),
- 'friendlinknum' => getcount('friendlinks', array()),
- 'membernum' => getcount('members', array()),
- 'modelnum' => getcount('models', array()),
- 'pollnum' => getcount('polls', array()),
- 'reportnum' => getcount('reports', array()),
- 'robotnum' => getcount('robots', array()),
- 'spacecommentnum' => getcount('spacecomments', array()),
- 'spaceitemnum' => getcount('spaceitems', array()),
- 'tagnum' => getcount('tags', array()),
- 'usergroupnum' => getcount('usergroups', array()),
- 'mfarr' => $mfarr
- );
- 复制代码修改admin/tpl/index.htm文档
- 在<li>全部采集器数: $statistics[robotnum]</li>
- 复制代码后面补充<li>模型待审核: <!--{loop $statistics['mfarr'] $key $value}-->
- {$key}:{$value};
- <!--{/loop}--></li>
- 复制代码
- 直接覆盖就下载下面的
复制代码 |