download cvimage.php
Language: PHP
LOC: 63
Project Info
Total ISP(total-isp)
Server: SourceForge
Type: cvs
...orge\t\total‑isp\total‑isp\
   abn.php
   addnew.php
   addnote.php
   addpay.php
   addsub.php
   addtime.php
   aliasadd.php
   answer.php
   approvelink.php
   ask.php
   autobill.php
   autobillpost.php
   backuplink.php
   batchtax.php
   Blocks-check.php
   Blocks-oldmail.php
   buildmenu.php
   business-check.php
   buytime.php
   cachemgr.php
   callanalysis.php
   calls.php
   callweekall.php
   ccemail.php
   changes.php
   checkmail.php
   cli.php
   clicheck.php
   config.php
   createwebdir.php
   credit.php
   creditpost.php
   cvimage.php
   dbspec.sql
   dealer.php
   dealeredit.php
   dealereditsave.php
   dealermenu.php
   dealerspecial-check.php
   dealerspecial.php
   dealersummary.php
   dig.php
   dnstest.php
   domainadd.php
   dschurn.php
   dsused.php
   edit.php
   editadd.php
   emailip.php
   expire.php
   extraadd.php
   faq.php
   firstpayments.php
   fixedip.dat
   fixedip.ph
   fixedip.php
   frames.php
   frconten.php
   frmain.php
   getcall.php
   gstinc.inc.php
   gsttest.php
   hms.inc.php
   index.php
   invoicepost.php
   invoices.php
   IPAD-check.php
   ipadmail.dat
   jump.php
   kick.php
   kickall.php
   killed.php
   lastaccess.php
   lastcall.php
   lastpasswords.php
   list.php
   listpay.php
   listpurchase-cash.php
   listpurchase-cheque.php
   listpurchase-code.php
   listpurchase-dupes.php
   listpurchase-exact.php
   listpurchase-group.php
   listpurchase-summary.php
   listpurchase-supplier.php
   ...purchase-unapproved.php
   listpurchase.php
   lm.inc.php
   loginfail.php
   mail.php
   mailadd.php
   mailusr.php
   monthpurch.php
   mysql.inc.php
   names.php
   newcustomer.php
   nextcall.php
   nosubs.php
   orphans.php
   password.php
   payimage.php
   payment.php
   payreport.php
   payview.php
   pdf-daily-sum.php
   pdfprint.inc.php
   permanent-check.php
   phpinfo.php
   phptest.php
   ping.php
   purchase-delete.php
   purchaseedit.php
   purchaseindex.php
   purchasing.php
   qchar.php
   radiususers.php
   radtest.php
   reallysure.php
   recall.php
   redir.php
   report.php
   reseller-check.php
   resellview.php
   sampledata.sql
   searchfaq.php
   searchfaqres.php
   sendmail.php
   staff.php
   subedit.php
   subeditadd.php
   submituser.php
   subnames.php
   taxpdf.php
   testbatch.php
   testpdf-day.php
   testpost.php
   testtaxpdf.php
   testuser.php
   testwho.php
   thundermail.php
   tigris.php
   time1.inc.php
   timetest.php
   top.php
   unanswered.php
   unlimited-3mth-check.php
   unlimited-check.php
   unlimited-stats.php
   unlimitedpartition.php
   uploadmailhdr.php
   user.php
   viewnotes.php
   visp.inc.php
   webadd.php
   weblinks.php
   WebSite-check.php
   weeknotes.php
   weekuser.php
   who.php
   whoip.php
   whoverify.php

<?
include "./auth.inc.php";

if (!$week)
	$week = 'week(now())';

$top=300;

$sql =  "select count(*), floor(Tstamp/300) as i,hour(Tstamp) as h, year(Tstamp) 
	FROM radacct 
	WHERE WeekNumber=$week 
	AND AcctStatusType='Stop' 
	GROUP BY i";

$res = mysql_query($sql);
$n = mysql_num_rows($res);

#find the top value
while ($row=mysql_fetch_row($res)){
	if ($row[0]>$topc)
		$topc = $row[0];
	
}


mysql_data_seek($res,0);

$img = imagecreate($n,$top+20);
$white = ImageColorAllocate($img, 255,255,255);
$red = ImageColorAllocate($img, 255,0,0);
$green = ImageColorAllocate($img,128,255,128);
$black = ImageColorAllocate($img,0,0,0);
$grey = ImageColorAllocate($img,128,128,128);

$previous = $top;
$mprevious = $top;

while ($row=mysql_fetch_row($res)){

	#hack for year 2000 hard coded - fixme
	if ($row[3] != 2000)
		break;

	$i++;
	$height = intval($top*$row[0]/$topc);
	imageline($img,$i,$top,$i,$top-$height,$green);
	
	$weekavg+=$row[0];
	$mavg+=$row[0];	

	if ($row[2] != $month){
		if ($row[2]==0){
			$tip=15;
		}elseif($row[2]==12){
			$tip=10;
		}else
			$tip=5;

                imageline($img,$i,$top,$i,$top+$tip,$black);
                $month=$row[2];
		
                $mheight=$top-intval(($mavg/30)*$top/$topc);

		imageline($img,$i-30,$mprevious,$i,$mheight,$grey);
                $mprevious=$mheight;
                $mavg=0;		

        }

	#if ($i%7 == 0){
	#	$wheight=$top-intval(($weekavg/7)*$top/$topc);
	#	imageline($img,$i-7,$previous,$i,$wheight,$red);
	#	$previous=$wheight;
	#	$weekavg=0;
	#}

}

imagegif($img,'cv.gif');
?>
<img src="cv.gif">
<BR>
Peak value is <? echo $topc ?>
<BR>
This data represents call Stop records, not the number of users online, and is sampled at 5 minute intervals.




About Koders | Resources | Downloads | Support | Black Duck | Submit Project | Terms of Service | DMCA | Privacy Policy | Site Map| Contact Us