| 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/usagrantapplications.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.
*/
//first check if db has been installed
if (!file_exists('modfiles/db.php')){
clearstatcache;
header('location: install.php');
}
include('myauth.php');
include('modfiles/db.php');
include('globals.php');
include('charts/charts.php');
include('charts/chartfunctions.php');
include('charts/tables.php');
include('charts/html_table.class.php');
include('panelfunctions.php');
//used for news feed
if ($shownews == true){
$sn = $_GET['sn'];
if ((isset($sn))&&($sn!='')){
$sql = "UPDATE $settingsTable SET newsfeed='$sn'";
mysql_query($sql,$conn);mysql_error()?(print(mysql_error())):'';
$newsfeed = $sn;
}else{
$sql = "SELECT * FROM $settingsTable";
$result = mysql_query($sql,$conn);mysql_error()?(print(mysql_error())):'';
$settings = mysql_fetch_assoc($result);
$newsfeed = $settings['newsfeed'];
}
if ($newsfeed == '1'){
if (url_exists($blogfeed)){
include('rss_feed_reader.php');
$max_items = 5;
$rss = new mod_rss();
// for array output
$direct_output = false;
$rssdata = $rss->parser($blogfeed, $max_items, $direct_output);
$news = '';
foreach($rssdata as $value){
if ($value['title'] != ''){
$title = $value['title'];
$link = $value['link'];
$date = $value['date'];
$stamp = strtotime($date);
$date = date('d/m/y',$stamp);
$news .= '<p>('.$date.') <strong>'.$title.'</strong> [<a href="'.$link.'" target="_blank">Read</a>]</p>'."\n";
}
}
if ($news == ''){
$news = 'No news';
}
$newslink = '<a href="index.php?sn=0">Hide News</a>';
$newstable = '<table width="450" border="0" align="center" cellpadding="5" cellspacing="0" style="border: #CCCCCC solid 1px"><tr><td>';
$newstable .= '<p>VirtualSmartAgent - <a href="'.$bloglink.'" target="_blank">Latest Blog News</a> | '.$newslink.'</p>';
$newstable .= '<p>'.$news.'</p>';
$newstable .= '</td></tr></table><br />';
}
}else{
$newslink = '<a href="index.php?sn=1">Show News</a>';
$newstable = '<table width="450" border="0" align="center" cellpadding="5" cellspacing="0" style="border: #CCCCCC solid 1px"><tr><td>';
$newstable .= '<p>VirtualSmartAgent - <a href="'.$bloglink.'" target="_blank">Latest Blog News</a> | '.$newslink.'</p>';
$newstable .= '</td></tr></table><br />';
}
}
//get and set the campaign id
$campaignselect = $_POST['campaignselect'];
if ($campaignselect){
$sql = "SELECT * FROM $campaignTable WHERE id='$campaignselect'";
$result = mysql_query($sql,$conn);mysql_error()?(print(mysql_error())):'';
$data = mysql_fetch_assoc($result);
$_SESSION['campaignlabel'] = $data['label'];
$_SESSION['cid'] = $campaignselect;
$_SESSION['testmode'] = $data['testmode'];
//set this in the settings table
$sql = "UPDATE $settingsTable SET selectedcid='$campaignselect'";
mysql_query($sql,$conn);mysql_error()?(print(mysql_error())):'';
include('globals.php'); //need to call this again to make any updates to header
}else{
//need to check if session cid even exists
$sql = "SELECT * FROM $campaignTable WHERE id='".$_SESSION['cid']."'";
$result = mysql_query($sql,$conn);mysql_error()?(print(mysql_error())):'';
if ($result){
$nc = mysql_num_rows($result);
if ($nc == 0){
//if not then select the last entry in the campaign table
$sql = "SELECT * FROM $campaignTable ORDER BY id DESC LIMIT 1";
$result = mysql_query($sql,$conn);mysql_error()?(print(mysql_error())):'';
$data = mysql_fetch_assoc($result);
$_SESSION['campaignlabel'] = $data['label'];
$_SESSION['cid'] = $data['id'];
$_SESSION['testmode'] = $data['testmode'];
include('globals.php'); //need to call this again to make any updates to header
}
}
}
//this only occurs when a campaign has been created or updated
$ncid = $_GET['ncid'];
if ($ncid){
$sql = "SELECT * FROM $campaignTable WHERE id='$ncid'";
$result = mysql_query($sql,$conn);mysql_error()?(print(mysql_error())):'';
$data = mysql_fetch_assoc($result);
$_SESSION['campaignlabel'] = $data['label'];
$_SESSION['cid'] = $ncid;
$_SESSION['testmode'] = $data['testmode'];
//set this in the settings table
$sql = "UPDATE $settingsTable SET selectedcid='$ncid'";
mysql_query($sql,$conn);mysql_error()?(print(mysql_error())):'';
include('globals.php'); //need to call this again to make any updates to header
}
//stats for the past 10 days
$sd = mktime(0,0,0,date("n"),date("j")-9,date("Y"));
$ed = mktime(23,59,59,date("n"),date("j"),date("Y"));
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.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>
<title>Virtual Agent Control Panel</title>
<?php echo $thickboxfiles; ?>
</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>Virtual Smart Agent Control Panel</strong></div></td>
</tr>
<tr>
<td><table width="450" border="0" align="center" cellpadding="4" cellspacing="0">
<tr>
<td><div align="center"><a href="http://www.virtualsmartagent.com/affiliates.php" target="_blank"><img src="images/affiliates.gif" width="32" height="32" border="0" /></a></div></td>
<td><div align="center"><a href="reports.php"><img src="images/stats.gif" width="32" height="32" border="0" /></a></div></td>
<td><div align="center"><a href="chatwindow.php"><img src="images/chatwindow.gif" width="32" height="32" border="0" /></a></div></td>
<td><div align="center"><a href="agents.php"><img src="images/agents.gif" width="32" height="32" border="0" /></a></div></td>
<td><div align="center"><a href="messages.php"><img src="images/messages.gif" width="32" height="32" border="0" /></a></div></td>
</tr>
<tr>
<td valign="top"><div align="center">Earn Cash</div></td>
<td valign="top"><div align="center">Statistics</div></td>
<td valign="top"><div align="center">Display<br />
Settings</div></td>
<td valign="top"><div align="center">Agents &<br />
Statistics</div></td>
<td valign="top"><div align="center">Agent<br />
Messages</div></td>
</tr>
<tr>
<td><div align="center"><a href="linksettings.php"><img src="images/links.gif" width="32" height="32" border="0" /></a></div></td>
<td><div align="center"><a href="chats.php"><img src="images/chats.gif" width="32" height="32" border="0" /></a></div></td>
<td><div align="center"><a href="unanswered.php"><img src="images/unanswered.gif" width="32" height="32" border="0" /></a></div></td>
<td><div align="center"><a href="settings.php"><img src="images/settings.gif" width="32" height="32" border="0" /></a></div></td>
<td><div align="center"><a href="logout.php"><img src="images/logout.gif" width="32" height="32" border="0" /></a></div></td>
</tr>
<tr>
<td valign="top"><div align="center">Offer Links</div></td>
<td valign="top"><div align="center">Chat Log</div></td>
<td valign="top"><div align="center">Unanswered<br />
Chats</div></td>
<td valign="top"><div align="center">System</div></td>
<td valign="top"><div align="center">Logout</div></td>
</tr>
</table>
<br />
<?php echo $newstable; ?>
<table width="100%" border="0" cellspacing="1" cellpadding="2">
<tr>
<td><hr class="grey_dashed" /></td>
</tr>
<tr>
<td bgcolor="#<?php echo $sectioncolor; ?>">Selected Campaign</td>
</tr>
<tr>
<td>
<form action="index.php" method="post">
<select name="campaignselect" id="select" style="width: 200px" onChange="this.form.submit()">
<?php echo WriteCampaignOptions($_SESSION['cid']); ?>
</select>
</form></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td bgcolor="#<?php echo $sectioncolor; ?>">Campaign Quick Stats - <strong><?php echo $_SESSION['campaignlabel']; ?></strong></td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="1" cellpadding="2">
<tr>
<td width="49%" valign="top">
<?php echo doQuickStatsTable($_SESSION['cid'],$_SESSION['campaignlabel'],$sd,$ed); ?></td>
<td width="51%" valign="top">
<div align="center">
<?php
$uid = time();
$loc = $_SESSION['install'].'charts/';
$w = 450;
$h = 200;
$checks = "|1|1|1|1|";
?>
<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",$loc."dochart.php?sd=".$sd."&ed=".$ed."&w=".$w."&h=".$h."&cid=".$_SESSION['cid']."&uid=".$uid.'&ch='.$checks,$w,$h,'FFFFFF');
echo "\"";
?>
);</script>
<noscript>
<?php
echo InsertChart($loc."charts.swf",$loc."charts_library",$loc."dochart.php?sd=".$sd."&ed=".$ed."&w=".$w."&h=".$h."&cid=".$_SESSION['cid']."&uid=".$uid.'&ch='.$checks,$w,$h,'FFFFFF');
?>
</noscript>
</div> </td>
</tr>
</table> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td bgcolor="#<?php echo $sectioncolor; ?>">Your Campaigns | <a href="boxes/campaignaddbox.php?cid=<?php echo $_SESSION['cid']; ?>&keepThis=true&TB_iframe=true&height=200&width=300&modal=true" title="Add New Campaign" class="thickbox">Create New Campaign</a> | <a href="boxes/campaignimportbox.php?cid=<?php echo $_SESSION['cid']; ?>&keepThis=true&TB_iframe=true&height=140&width=380&modal=true" title="Import Campaign" class="thickbox">Import Campaign</a></td>
</tr>
<tr>
<td><p><?php echo doCampaignTable($_SESSION['cid']); ?></p></td>
</tr>
<tr>
<td><hr class="grey_dashed" /></td>
</tr>
</table>
</td>
</tr>
<tr>
<td><div align="center"><?php echo $copyright; ?><?php echo $bottomlinks; ?></div></td>
</tr>
</table>
<?php echo $cbottom; ?>
</body>
</html>