| Server IP : 10.200.247.200 / Your IP : 216.73.217.19 Web Server : Apache System : Linux synergy-usa-sites 6.8.0-138-generic #138-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 31 22:41:49 UTC 2026 x86_64 User : jeremy ( 1001) PHP Version : 8.4.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/usa_sites/usafundingapplications.org/vsa/ |
Upload File : |
<?php
/*
Copyright (c) 2007-present InnAnTech Industries
Author: Dave Guindon
Web: www.VirtualSmartAgent.com
Support: www.DaveGuindonSupport.com
Please send bug reports, suggestions and/or feedback to the support
website given above.
Virtual Smart Agent is a commercial software. Any distribution is strictly prohibited
unless a resale rights license was delivered along with this software.
*/
include('modfiles/db.php');
include('myauth.php');
include('globals.php');
include('charts/charts.php');
include('charts/chartfunctions.php');
include('charts/tables.php');
include('charts/html_table.class.php');
$cid = $_SESSION['cid'];
$periodtype = $_POST['periodtype'];
if($periodtype == 'period'){
$p = $_POST['selectperiod'];
$r = GetPeriod1($p);
$sd = $r[0];
$ed = $r[1];
$radiochecked[0]=' checked="checked"';
}else if($periodtype == 'range'){
$d1 = $_POST['d1']; $m1 = $_POST['m1']; $y1 = $_POST['y1'];
$d2 = $_POST['d2']; $m2 = $_POST['m2']; $y2 = $_POST['y2'];
$nw = time();
$sd = mktime(0,0,0,$m1,$d1,$y1);
$ed = mktime(23,59,59,$m2,$d2,$y2);
if ($ed > $nw){
$ed = $nw;
$m2 = date('n');
$d2 = date('j');
$y2 = date('Y');
}
$radiochecked[1]=' checked="checked"';
}else{
//defaults
$r = GetPeriod1(1);
$sd = $r[0];
$ed = $r[1];
$y1 = date('Y');
$y2 = date('Y');
$m1 = 1;
$m2 = 1;
$radiochecked[0]=' checked="checked"';
}
//update period select
if ((!isset($p))||($p=='')){$p=1;}
for($i=1;$i<=8;$i++){$psel[$i]='';}
$psel[$p] = ' selected="selected"';
$y1options = WriteYearOptions(5,$y1);
$y2options = WriteYearOptions(5,$y2);
$m1options = WriteMonthOptions($m1);
$m2options = WriteMonthOptions($m2);
$d1options = WriteDayOptions($m1,$d1);
$d2options = WriteDayOptions($m2,$d2);
//check if there is a date error using the range option
if($sd > $ed){
$errors = '<br><br><strong><font color="#FF0000">The start date must be before the ending date.<br>Check your dates and try again.</font></strong>';
}
//deal with the checkboxes here
if ($_POST['generatebutton']){
$pageviewscheck = $_POST['pageviewscheck'];
$inititationscheck = $_POST['inititationscheck'];
$interactionscheck = $_POST['interactionscheck'];
$clickscheck = $_POST['clickscheck'];
$salescheck = $_POST['salescheck'];
$emailscheck = $_POST['emailscheck'];
//validate. If nothing is checked, then default to initiations, interations, clicks, and sales
if (($pageviewscheck!='1')&&($inititationscheck!='1')&&($interactionscheck!='1')&&($clickscheck!='1')&&($salescheck!='1')&&($emailscheck!='1')){
$inititationscheck = '1';
$interactionscheck = '1';
$clickscheck = '1';
$salescheck = '1';
}
//build post string
$checks = "$pageviewscheck|$inititationscheck|$interactionscheck|$clickscheck|$salescheck|$emailscheck";
//set checkboxes
if ($pageviewscheck == '1'){ $pageviewscheck_checked = 'checked="checked"'; }
if ($inititationscheck == '1'){ $inititationscheck_checked = 'checked="checked"'; }
if ($interactionscheck == '1'){ $interactionscheck_checked = 'checked="checked"'; }
if ($clickscheck == '1'){ $clickscheck_checked = 'checked="checked"'; }
if ($salescheck == '1'){ $salescheck_checked = 'checked="checked"'; }
if ($emailscheck == '1'){ $emailscheck_checked = 'checked="checked"'; }
}else{
$pageviewscheck_checked = '';
$inititationscheck_checked = 'checked="checked"';
$interactionscheck_checked = 'checked="checked"';
$clickscheck_checked = 'checked="checked"';
$salescheck_checked = 'checked="checked"';
$emailscheck_checked = '';
$checks = "|1|1|1|1|";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<LINK href="style.css" type=text/css rel=stylesheet>
<script type="text/javascript" src="dates.js"></script>
<title>Virtual Agent Control Panel</title>
</head>
<body>
<?php echo $menu; ?>
<table width="700" border="0" align="center" cellpadding="10" cellspacing="0" bgcolor="#FFFFFF" class="admin_grey_border">
<tr>
<td><div align="center"><strong>Daily Statistics</strong><?php echo $errors; ?></div></td>
</tr>
<tr>
<td>
<form name="statsform" action="reports.php" method="post">
<table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td><table width="274" border="0" align="left" cellpadding="2" cellspacing="0">
<tr>
<td width="9%">Period:</td>
<td width="9%"><input name="periodtype" type="radio" value="period"<?php echo $radiochecked[0]; ?> /></td>
<td width="91%"><label>
<select name="selectperiod" id="selectperiod" style="width: 200px">
<option value="1"<?php echo $psel[1]; ?>>Today</option>
<option value="2"<?php echo $psel[2]; ?>>Yesterday</option>
<option value="3"<?php echo $psel[3]; ?>>Last 7 Days</option>
<option value="4"<?php echo $psel[4]; ?>>This Month</option>
<option value="5"<?php echo $psel[5]; ?>>Last Month</option>
<option value="6"<?php echo $psel[6]; ?>>This Year</option>
<option value="7"<?php echo $psel[7]; ?>>Last Year</option>
<option value="8"<?php echo $psel[8]; ?>>All Time</option>
</select>
</label></td>
</tr>
<tr>
<td valign="top">Range:</td>
<td valign="top"><input type="radio" name="periodtype" value="range"<?php echo $radiochecked[1]; ?> />
<br /></td>
<td><table width="60" border="0" cellspacing="0" cellpadding="1">
<tr>
<td width="8%"><select name="m1" style="width: 65px" onchange="setDays('1')">
<?php echo $m1options; ?>
</select> </td>
<td width="8%"><select name="d1" style="width: 65px">
<?php echo $d1options; ?>
</select></td>
<td width="8%"><select name="y1" style="width: 65px" onchange="setDays('1')"><?php echo $y1options; ?>
</select></td>
</tr>
<tr>
<td><select name="m2" style="width: 65px" onchange="setDays('2')">
<?php echo $m2options; ?>
</select></td>
<td><select name="d2" style="width: 65px">
<?php echo $d2options; ?>
</select></td>
<td><select name="y2" style="width: 65px" onchange="setDays('2')"><?php echo $y2options; ?>
</select></td>
</tr>
</table> </td>
</tr>
<tr>
<td colspan="3" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td width="8%"><input name="pageviewscheck" type="checkbox" id="pageviewscheck" value="1" <?php echo $pageviewscheck_checked;?> /></td>
<td width="22%">pageviews</td>
<td width="8%"><input name="inititationscheck" type="checkbox" id="inititationscheck" value="1" <?php echo $inititationscheck_checked;?> /></td>
<td width="20%">Initiations</td>
<td width="8%"><input name="interactionscheck" type="checkbox" id="interactionscheck" value="1" <?php echo $interactionscheck_checked;?> /></td>
<td width="34%">Interactions</td>
</tr>
<tr>
<td><input name="clickscheck" type="checkbox" id="clickscheck" value="1" <?php echo $clickscheck_checked;?> /></td>
<td>Clicks</td>
<td><input name="salescheck" type="checkbox" id="salescheck" value="1" <?php echo $salescheck_checked;?> /></td>
<td>Sales</td>
<td><input name="emailscheck" type="checkbox" id="emailscheck" value="1" <?php echo $emailscheck_checked;?> /></td>
<td>Emails</td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="3" valign="top"><hr class="grey_dashed" /></td>
</tr>
<tr>
<td colspan="3" valign="top"><div align="center">
<input type="submit" name="generatebutton" id="generatebutton" value="Generate Report" />
</div></td>
</tr>
</table>
<table width="251" border="0" align="right" cellpadding="2" cellspacing="0">
<tr>
<td colspan="2"><strong>Legend</strong></td>
</tr>
<tr>
<td width="32">OPR:</td>
<td width="211" nowrap="nowrap">Optin rate = emails/Initiations</td>
</tr>
<tr>
<td>CTR:</td>
<td nowrap="nowrap">Click through rate = clicks/Initiations</td>
</tr>
<tr>
<td>CNV:</td>
<td nowrap="nowrap">Sale conversion = sales/clicks</td>
</tr>
</table>
<br /></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><div align="center">
<?php
$uid = time();
$loc = $_SESSION['install'].'charts/';
$w = 600;
$h = 250;
$phpsource = $loc."dochart.php?sd=".$sd."&ed=".$ed."&w=".$w."&h=".$h."&cid=".$cid."&uid=".$uid.'&ch='.$checks;
?>
<script src="ie_click.js" type="text/javascript"></script>
<script type="text/javascript">write_object(
<?php
echo "\"";
echo InsertChart($loc."charts.swf",$loc."charts_library",$phpsource,$w,$h,'FFFFFF');
echo "\"";
?>
);</script>
<noscript>
<?php
echo InsertChart($loc."charts.swf",$loc."charts_library",$phpsource,$w,$h,'FFFFFF');
?>
</noscript>
</div></td>
</tr>
<tr>
<td><?php echo doReportsTable($cid,$sd,$ed); ?></td>
</tr>
</table>
</form>
</td>
</tr>
<tr>
<td><div align="center"><?php echo $copyright; ?><?php echo $bottomlinks; ?></div></td>
</tr>
</table>
<?php echo $cbottom; ?>
</body>
</html>