A
download callweekall.php
Language: PHP
LOC: 120
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 (!$n)
	$n=20;

if (!$order)
	$order='top';

if (!$type)
	$type='bytes';

if (!$year)
	$year=date("Y");

if ($archive)
        $radacct = 'radacctarchive';
else
        $radacct = 'radacct';

$red=56000000;


function weekofyear() {
        $d = 1;
        while (date("w",mktime(0,0,0,1,$d,date("Y"))) != 1) {
                $d++;
        };
        return(floor((date("z")-$d+7)/7.0)+1);
}


if (!$week)
	$week=weekofyear()-1;

?>
<HTML>
<HEAD></HEAD>
<BODY bgcolor=white>
<FORM>
<P><SELECT NAME=order><option value="top"<?
	if ($order=='top')
		print " selected";
?>>Top</option>
<option value="bottom""<?
        if ($order=='bottom')
                print " selected";
?>>Bottom</option> 
</SELECT>
 
<INPUT TYPE=TEXT SIZE=4 NAME=n value="<? echo $n ?>"> 

<SELECT NAME="type">
<option value="bytes"<? if ($type=='bytes') print " SELECTED"; ?>>Downloaders</option>
<option value="ibytes"<? if ($type=='ibytes') print " SELECTED"; ?>>Uploaders</option>
<option value="atime"<? if ($type=='atime') print " SELECTED"; ?>>Time Users</option>
<option value="calls"<? if ($type=='calls') print " SELECTED"; ?>>Callers</option>

</SELECT>
for Week
<INPUT TYPE=TEXT Name=week SIZE=2 VALUE="<? echo $week ?>">

Year 
<SELECT NAME="year">
<option value="1998"<? if ($year=='1998') print " selected"; ?>>1998</option>
<option value="1999"<? if ($year=='1999') print " selected"; ?>>1999</option>
<option value="2000"<? if ($year=='2000') print " selected"; ?>>2000</option>
<option value="2001"<? if ($year=='2001') print " selected"; ?>>2001</option>

</SELECT>
Payments
<input type=checkbox name=recentpay <? if ($recentpay) print "checked"; ?>>

<INPUT TYPE=SUBMIT VALUE="Change">
<?
include "./hms.inc.php";
include "./mysql.inc.php";

if ($order=='top')
	$DESC='DESC';
else
	$DESC='';


$sql="SELECT UserName, sum(AcctOutputOctets) as bytes,
sum(AcctSessionTime) as atime, sum(AcctInputOctets) as ibytes, count(UserName) as calls, AccountType 
FROM $radacct, SubAccounts WHERE WeekNumber=$week AND YEAR(realtime)=$year And Login=UserName GROUP BY UserName ORDER BY
$type $DESC
LIMIT $n";

$result=mysql_query($sql);
?><TABLE border=1>
<TR><TH>UserName</TH><TH>Account Type</TH><TH>MB Out</TH><TH>Time</TH><TH>%33.6</TH><TH>Mb In</TH><TH>Calls</TH>
<? if ($recentpay) print "<TD>Days since last Payment</TD>"; ?>
</TR>
<?
while ($row=mysql_fetch_row($result)){
	print "<TR>";
	print "<TD><A HREF=\"jump.php?username=$row[0]\">$row[0]</A></TD>";
	print "<TD>$row[5]</TD><TD>";
	if ($row[1] > $red)
		print "<FONT COLOR=RED>";
	print intval($row[1]/1000000);
	print "</TD><TD>";
	print hhms($row[2]);
	print "</TD><TD>";
	if ($row[2])
	$percent=intval(100*($row[1]/$row[2])/4200);
	if ($percent>40)
		print "<FONT COLOR=RED>";
	print $percent." %";
	if ($row[1])
	printf("<FONT SIZE=-2> (%01.2f)",$row[3]/$row[1]);
	print "</TD><TD>";
	print intval($row[3]/1000000);
	print "</TD><TD>";
	print $row[4];
	print "</TD>";
	if ($recentpay){
		#look for payments in the last week?
		$psql = "SELECT TO_DAYS(now())-TO_DAYS(PaymentDate), Purchase FROM Payments, SubAccounts 
		WHERE SubAccounts.CustomerID=Payments.CustomerID
		AND Login='$row[0]' ORDER BY PaymentDate DESC LIMIT 1";
		$pres = mysql_query($psql);
		#print mysql_error();
		if (mysql_num_rows($pres)){
			$ndays = mysql_result($pres,0);
			print "<TD>";
			if ($ndays < 9)
				print "($ndays) ".mysql_result($pres,0,1);
			else
				print $ndays;
			print "</TD>";
		}
	}
	print "</TR>";

}
?>
</TABLE>

<A HREF="cvimage.php?week=<? echo $week ?>">See Call Volume Graph</A> 

</BODY>
</HTML>

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