注册 登录 欢迎您访问极限源码网:专注各类网站源码下载。

织梦基础知识

该栏目分享织梦建站的基础知识,从织梦CMS的安装,到织梦标签的常规调用,以及织梦的常见问题答疑都有涉及。

当前位置:网站首页 > 建站学院 > 织梦教程 >

Dedecms V5.5后台首页信息统计代码分享

极限源码 2019-04-11 19:19 织梦教程

Dedecms V5.5后台首页信息统计代码分享

 

以下为引用的内容:

/*--------------------------------- 

载入右边内容 

function _getRightSide() { } 

---------------------------------*/ 

else if($dopost=='getRightSide') 

$query = " Select count(*) as dd From `dede_member` "; 

$row1 = $dsql->GetOne($query); 

$query = " Select count(*) as dd From `dede_feedback` "; 

$row2 = $dsql->GetOne($query); 

 

$chArrNames = array(); 

$query = "Select id, typename From `dede_channeltype` "; 

$dsql->Execute('c', $query); 

while($row = $dsql->GetArray('c')) 

$chArrNames[$row['id']] = $row['typename']; 

 

$query = "Select count(channel) as dd, channel From `dede_arctiny` group by channel "; 

$allArc = 0; 

$chArr = array(); 

$dsql->Execute('a', $query); 

while($row = $dsql->GetArray('a')) 

$allArc += $row['dd']; 

$row['typename'] = $chArrNames[$row['channel']]; 

$chArr[] = $row; 

 

$query = "Select arc.id, arc.arcrank, arc.title, arc.channel, ch.editcon From `dede_archives` arc 

left join `dede_channeltype` ch on ch.id = arc.channel 

where arc.arcrank<>-2 order by arc.id desc limit 0, 6 "; 

$arcArr = array(); 

$dsql->Execute('m', $query); 

while($row = $dsql->GetArray('m')) 

$arcArr[] = $row; 

AjaxHead(); 

?> 

<dl class='dbox'> 

<dt class='rside'> 

<div class='l'>信息统计</div> 

</dt> 

<dd class='intable'> 

<table width="100%" class="dboxtable"> 

<tr> 

<td width='50%' class='nline'> 会员数: </td> 

<td class='nline'> <?php echo $row1['dd']; ?> </td> 

</tr> 

<tr> 

<td class='nline'> 文档数: </td> 

<td class='nline'> <?php echo $allArc; ?> </td> 

</tr> 

<?php 

foreach($chArr as $row) 

?> 

<tr> 

<td class='nline'> <?php echo $row['typename']; ?>: </td> 

<td class='nline'> <?php echo $row['dd']; ?> </td> 

</tr> 

<?php 

?> 

<tr> 

<td> 评论数: </td> 

<td> <?php echo $row2['dd']; ?> </td> 

</tr> 

</table> 

</dd> 

</dl>


    服务项目

    源码下载

    关于我们

    极限源码网| https://www.jxym.net

    极限源码网(JXYM.NET)由一批热爱网页设计、敢于追求梦想、努力付诸行动的热火青年联合打造,在我们的努力之下,让您拥有一个全方位的源码下载平台