Filter:   InfoImg
download business-check.php
Language: PHP
LOC: 86
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 (!$order)
	$order="ExpireDate";

$sql = "SELECT MasterAccounts.CustomerID as ID, FirstName, LastName, Login, ExpireDate, AutoBill,MaxConnectTime,
	StartMinutes,
	EndMinutes,
	TO_DAYS(ExpireDate)-TO_DAYS(now()) as tdays,
	TO_DAYS(now()) - TO_DAYS(LastUse) as ldays
	FROM MasterAccounts, SubAccounts
	WHERE MasterAccounts.CustomerID = SubAccounts.CustomerID
	AND AccountType='business'
	ORDER BY $order DESC";

$res = mysql_query($sql);


?><HTML>
<HEAD>
</HEAD>
<BODY bgcolor=white>
<BR>
<H2>Business Accounts.</H2>
<TABLE border=0>
<TR><TH>Name</TH><TH>Login</TH>
<TH><A HREF="IPAD-check.php?order=ExpireDate">Expire Date</A></TH>
<TH><A Href="IPAD-check.php?order=MaxConnectTime">MaxCon</A></TH>
<th>Times</th>
<TH>Last Payment</TH></TR>
<?

while ($row = mysql_fetch_array($res)){
	if ($i++%2)
		$bgcolor="#EEEEEE";
	else
		$bgcolor="#FFFFFF";
	print "<TR bgcolor=$bgcolor>";
	print "<TD><A HREF=\"user.php?ID=$row[ID]\">$row[FirstName] $row[LastName]</TD>";
	print "<TD>$row[Login]</TD>";
	if ($row[tdays] < 1){
		$fontcolor = "RED";
	}else{
		$fontcolor = "BLACK";
	}
	
	if ($row[tdays] > 31){
		$fontcolor = "BLUE";
	}

	

	print "<TD><FONT COLOR=$fontcolor>$row[ExpireDate] ($row[tdays])";
	if ($row[ldays]>30)
		print " <IMG SRC=\"sad.gif\"> ";
	print "</TD>";

	#if ($row[AutoBill] > 0){
	#	$asql = "SELECT PlanName FROM PlanTypes WHERE PlanID = $row[AutoBill]";
	#	$ares = mysql_query($asql);
	#	print mysql_error();
	#	print "<TD>".mysql_result($ares,0)."</TD>";
	#}else{
	#	print "<TD><B>No AutoBill!</B></TD>";
	#}

	print "<TD>$row[MaxConnectTime]</TD>";

	print "<TD>";
	$mins = $row[StartMinutes]%60;
	if ($mins < 10)
        	$mins = '0'.intval($mins);

	echo intval($row[StartMinutes]/60).":".$mins;
	print " - ";
	$mins = $row[EndMinutes]%60;
	if ($mins < 10)
        	$mins = '0'.intval($mins);
	
	echo intval($row[EndMinutes]/60).":".$mins;

	print "</TD><TD>";
	$psql = "SELECT to_days(now()) - to_days(PaymentDate), Purchase
		FROM Payments 
		WHERE CustomerID=$row[ID]
		ORDER BY PaymentDate DESC
		LIMIT 1";
	$pres = mysql_query($psql);
	if (mysql_num_rows($pres)){
		$prow = mysql_fetch_row($pres);
		print "$prow[1] ($prow[0])";
	}else{
		print '&nbsp;';
	}
	print "</TD>";	

	print "</tr>\n";

}
?></TABLE>

<IMG SRC="sad.gif"> indicates an account that has not been used in 30 days.

</body>
</html>