<?php
$rs=new COM("adodb.recordset");
$rs->open("select P_PictureClassID,COUNT(*) from [PictureData] where op='是' and P_Recycle=0 and p_sb='报告书' group BY [P_PictureClassID] order by COUNT(*) DESC ",$conn,1,3);
$i=0;
?>
<?php while(! $rs->eof)
{ $s= $rs->Fields(0);
$n= $rs->Fields(1);
?>
pgCitys[<?php echo $i?>] = '<?php switch($s){
case "1";
echo $sl="榆林市";
break;
case "2";
echo $sl="榆阳区";
break;
case "3";
echo $sl="神木县";
break;
case "4";
echo $sl="府谷县";
break;
case "5";
echo $sl="靖边县";
break;
case "8";
echo $sl="横山县";
break;
case "10";
echo $sl="子洲县";
break;
case "12";
echo $sl="吴堡县";
break;
case "13";
echo $sl="米脂县";
break;
case "14";
echo $sl="定边县";
break;
case "15";
echo $sl="绥德县";
break;
case "16";
echo $sl="佳县";
break;
case "17";
echo $sl="清涧县";
break;
}
?>';
pgNums[<?php echo $i ?>] ='<?php echo $n; ?>';
<?
$rs->MoveNext(); $i++;
}
$rs->Close();
?>
<?php
$rs=new COM("adodb.recordset");
$rs->open("select P_PictureClassID,COUNT(*) from [PictureData] where op='是' and P_Recycle=0 and p_sb='报告表' group BY [P_PictureClassID] order by COUNT(*) DESC ",$conn,1,3);
$i=0;
?>
<?php while(! $rs->eof)
{ $s= $rs->Fields(0);
$n= $rs->Fields(1);
?>
ghCitys[<?php echo $i?>] = '<?php switch($s){
case "1";
echo $sl="榆林市";
break;
case "2";
echo $sl="榆阳区";
break;
case "3";
echo $sl="神木县";
break;
case "4";
echo $sl="府谷县";
break;
case "5";
echo $sl="靖边县";
break;
case "8";
echo $sl="横山县";
break;
case "10";
echo $sl="子洲县";
break;
case "12";
echo $sl="吴堡县";
break;
case "13";
echo $sl="米脂县";
break;
case "14";
echo $sl="定边县";
break;
case "15";
echo $sl="绥德县";
break;
case "16";
echo $sl="佳县";
break;
case "17";
echo $sl="清涧县";
break;
}
?>';
ghNums[<?php echo $i ?>] ='<?php echo $n; ?>';
<?
$rs->MoveNext(); $i++;
}
$rs->Close();
?>
</SCRIPT>
<META name=GENERATOR content="MSHTML 8.00.6001.18702"></HEAD>
<BODY style="BACKGROUND: none transparent scroll repeat 0% 0%">
<TABLE width=453 border=0 align=center
cellPadding=0 cellSpacing=0 style="FONT-SIZE: 12px; MARGIN-RIGHT: 0px">
<TBODY>
<TR>
<TD width="80%">
<DIV id=pieChart></DIV></TD>
<TD>
<DIV
style="BORDER-BOTTOM: #c0c0c0 1px solid; BORDER-LEFT: #c0c0c0 1px solid; WIDTH: 110px; HEIGHT: 252px; MARGIN-LEFT: 20px; FONT-SIZE: 12px; OVERFLOW: hidden; BORDER-TOP: #c0c0c0 1px solid; BORDER-RIGHT: #c0c0c0 1px solid"
id=pgxmList></DIV>
<DIV
style="BORDER-BOTTOM: #c0c0c0 1px solid; BORDER-LEFT: #c0c0c0 1px solid; WIDTH: 110px; DISPLAY: none; HEIGHT: 252px; FONT-SIZE: 12px; OVERFLOW: hidden; BORDER-TOP: #c0c0c0 1px solid; BORDER-RIGHT: #c0c0c0 1px solid"
id=ghxmList></DIV>
<DIV
style="BORDER-BOTTOM: #c0c0c0 1px solid; BORDER-LEFT: #c0c0c0 1px solid; WIDTH: 110px; DISPLAY: none; HEIGHT: 252px; FONT-SIZE: 12px; OVERFLOW: hidden; BORDER-TOP: #c0c0c0 1px solid; BORDER-RIGHT: #c0c0c0 1px solid"
id=ysxmList></DIV></TD></TR></TBODY></TABLE>
<SCRIPT>
var pie=new Pie3D('pieChart',240,220,'2012年统计-----截止日期:<?php $rs->open("select * from [PictureData] where [op]='是' and [P_Recycle]=0 order by [D_Content] desc",$conn,1,3);
$d1=$rs->Fields(17)->value;;echo $d1; $rs->Close(); ?>');
dcake=new Array("报告书",<? $rs=new COM("adodb.recordset");
$rs->open("select * from [PictureData] where [op]='是' and [p_sb]='报告书' and [P_Recycle]=0 order by [P_ID] desc",$conn,1,3);
?>
<?php echo $rs->recordCount(); ?>
<?php $rs->Close();?>,"#ff3300");
pie.Cakes[0]=dcake;
dcake=new Array("报告表",<? $rs=new COM("adodb.recordset");
$rs->open("select * from [PictureData] where [op]='是' and [p_sb]='报告表' and [P_Recycle]=0 order by [P_ID] desc",$conn,1,3);
?>
<?php echo $rs->recordCount(); ?>
<?php $rs->Close();?>,"#3399CC");
pie.Cakes[1]=dcake;
//验收项目为零时不显示
/*
for(var i=0;i<3;i++){
dcake=new Array(citys[i],25,xxColor[i]);
pie.Cakes[i]=dcake;
}
*/
pie.draw();
function pieClicked(idx){
if(idx == 1){
document.getElementById("pgxmList").style.display = 'block';
document.getElementById("ghxmList").style.display = 'none';
document.getElementById("ysxmList").style.display = 'none';
}else if(idx == 2){
document.getElementById("pgxmList").style.display = 'none';
document.getElementById("ghxmList").style.display = 'block';
document.getElementById("ysxmList").style.display = 'none';
}else{
document.getElementById("pgxmList").style.display = 'none';
document.getElementById("ghxmList").style.display = 'none';
document.getElementById("ysxmList").style.display = 'block';
}
}
var xmtjPGStep = 11;
var pgidx = 0;
function replaceDiv(){
var cont = "";
if(pgidx == pgCitys.length){
pgidx = 0;
xmtjPGStep = 11;
}
if(xmtjPGStep > pgCitys.length){
xmtjPGStep = pgCitys.length;
}
cont += '<div id="pgxmCont" style="font-size:12px;border-bottom:1px solid #c0c0c0;text-align:center;width:110px;height:20px;font-weight:bold;">报告书</div>';
for(var i = pgidx ; i < xmtjPGStep; i ++){
cont += '<div style="font-size:12px;height:21px;border-bottom:1px solid #c0c0c0; "><div class="tj_div_left">'+pgCitys[i]+'</div><div class="tj_div_right">'+pgNums[i]+'</div></div>';
pgidx = i + 1;
}
cont += '</div>';
document.getElementById("pgxmList").innerHTML = cont;
xmtjPGStep *= 2;
}
if(pgCitys){
replaceDiv();
setInterval(replaceDiv,3000);
}
var xmtjGHStep = 11;
var ghidx = 0;
function replaceGHDiv(){
var cont = "";
if(ghidx == ghCitys.length){
ghidx = 0;
xmtjGHStep = 11;
}
if(xmtjGHStep > ghCitys.length){
xmtjGHStep = ghCitys.length;
}
cont += '<div id="ghxmCont" style="font-size:12px;border-bottom:1px solid #c0c0c0;text-align:center;width:110px;height:20px;font-weight:bold;">报告表</div>';
for(var i = ghidx ; i < xmtjGHStep; i ++){
cont += '<div style="font-size:12px;height:21px;border-bottom:1px solid #c0c0c0; "><div class="tj_div_left">'+ghCitys[i]+'</div><div class="tj_div_right">'+ghNums[i]+'</div></div>';
ghidx = i + 1;
}
cont += '</div>';
document.getElementById("ghxmList").innerHTML = cont;
xmtjGHStep *= 2;
}
if(ghCitys){
replaceGHDiv();
setInterval(replaceGHDiv,3000);
}
var xmtjYSStep = 11;
var ysidx = 0;
function replaceYSDiv(){
var cont = "";
if(ysidx == ysCitys.length){
ysidx = 0;
xmtjYSStep = 11;
}
if(xmtjYSStep > ysCitys.length){
xmtjYSStep = ysCitys.length;
}
cont += '<div id="ysxmCont" style="font-size:12px;border-bottom:1px solid #c0c0c0;text-align:center;width:110px;height:20px;font-weight:bold;">报告书</div>';
for(var i = ysidx ; i < xmtjYSStep; i ++){
cont += '<div style="font-size:12px;height:21px;border-bottom:1px solid #c0c0c0; "><div class="tj_div_left">'+ysCitys[i]+'</div><div class="tj_div_right">'+ysNums[i]+'</div></div>';
ysidx = i + 1;
}
cont += '</div>';
document.getElementById("ysxmList").innerHTML = cont;
xmtjYSStep *= 2;
}
if(ysCitys){
replaceYSDiv();
setInterval(replaceYSDiv,3000);
}
</SCRIPT>
</BODY></HTML>