<?PHP
$vulnerables=grab_security_feed('www.whmautopilot.com', 'news', 'vulnerables.xml', 0);
$rs_a=mysql_fetch_row(mysql_query("select status from payment_process where pid='8'"));
$rs_aa=mysql_fetch_row(mysql_query("select status from payment_process where pid='10'"));
$rs_admail=mysql_fetch_row(mysql_query("select email_admin from config"));
$noadminmail=$rs_admail[0];
$rs_gateways=mysql_fetch_row(mysql_query("select count(*) from payment_process where status='1'"));
$nogateways=$rs_gateways[0];
$getcancels=mysql_fetch_row(mysql_query("select count(*) from hosting_order where status='4'"));
$howmanycancels=$getcancels[0];
if ($howmanycancels>0)
	{ echo("
		<table width='530' cellpadding='2' cellspacing='3' style='border-style: solid; border-color: 990000; border-width: 1px' align='left' bgcolor='ffcaca'>
			<tr>
				<td align='left' valign='top'><img src='".$http_images."/space.gif' width='9' height='9'><img src='".$http_images."/ap[24].gif'>You have <B>".$getcancels[0]."</B> pending cancellation requests.  Click <A HREF='".$http_admin."/client_cancel_account.php?sid=".trim($sid)."'
		style='color:000000;'><B>here</B></A> to process.</td> 
			</tr>
			
		</table><BR><BR><BR>
		");
	}
if ($nogateways==0)
	{ echo("
		<table width='530' cellpadding='2' cellspacing='3' style='border-style: solid; border-color: 990000; border-width: 1px' align='left' bgcolor='ffcaca'>
			<tr>
				<td align='left' valign='top'><img src='".$http_images."/space.gif' width='9' height='9'><img src='".$http_images."/error_arrow.gif'>No active payment gateways setup yet - orders will not process until gateways are setup, activated<BR><img src='".$http_images."/space.gif' width='25' height='9'>and also active <B>per package group</td> 
			</tr>
			
		</table><BR><BR><BR>
		");
	}
if ($noadminmail=="")
	{
	echo("
		<table width='530' cellpadding='2' cellspacing='3' style='border-style: solid; border-color: 990000; border-width: 1px' align='left' bgcolor='ffcaca'>
			<tr>
				<td align='left' valign='top'><img src='".$http_images."/space.gif' width='9' height='9'><img src='".$http_images."/error_arrow.gif'>No Admin email is set yet.  Emails will fail without this setting updated.  Please <a href='".$http_admin."/config_editor.php?sid=".trim($sid)."'>click here</a> to update now.</td> 
			</tr>
			
		</table><BR><BR><BR>
		");
	}
if (!$vulnerables['news']==""&&$vulnerables['date']>$current_mib_version)
	{
	echo("
		<table width='530' cellpadding='2' cellspacing='3' style='border-style: solid; border-color: 990000; border-width: 1px' align='left' bgcolor='ffcaca'>
			<tr>
				<td align='center' bgcolor='ffffff' valign='top' style='border-style: solid; border-color: red; border-width: 1px;padding:5'><img src='".$http_images."/ap[24].gif'> <B>VERSION UPGRADE AVAILABLE</B> <img src='".$http_images."/ap[24].gif'></td>
			</tr>
			<tr>
				<td align='left' valign='top'><img src='".$http_images."/space.gif' width='9' height='9'><img src='".$http_images."/error_arrow.gif'>{$vulnerables['news']}</td> 
			</tr>
			<tr>
				<td align='left' valign='top'><img src='".$http_images."/space.gif' width='9' height='9'><B><CENTER>For more information, please <a href='http://www.mywhmautopilot.com/forum/forumdisplay.php?f=5' target='_blank'>click here</CENTER></B></td> 
			</tr>
			
		</table><BR><BR><BR><BR><BR><BR><BR>
		");
	}
echo("
<!--- END OG THEME BLOCK --->
<FIELDSET id=standard><LEGEND>General Administration Links</LEGEND>

<table width='530' border='0' cellspacing='1' cellpadding='2'>
	<tr>
	  <td width='50%' bgcolor='#F0F0F0'><a href='".$http_admin."/dbbackup.php?sid=".trim($sid)."&which=1'>Manually Backup Database</a></td> 
	  <td width='50%' bgcolor='#F0F0F0'><a href='".$http_admin."/edit_client_news.php?sid=".trim($sid)."'>Edit Client Area News</a></td>
	</tr>
	<tr>
	  <td width='50%' bgcolor='#F0F0F0'><a href='".$http_admin."/edit_templates.php?sid=".trim($sid)."'>Edit Email Templates</a></td> 
	  <td width='50%' bgcolor='#F0F0F0'><a href='".$http_admin."/manage_admin.php?sid=".trim($sid)."'>Manage Administrators</a></td>
	</tr>
	<tr>
	  <td width='50%' bgcolor='#F0F0F0'><a href='".$http_admin."/edit_affiliate_paragraph.php?sid=".trim($sid)."'>Edit Affiliate Details Paragraph</a></td> 
	  <td width='50%' bgcolor='#F0F0F0'><a href='".$http_admin."/client_email.php?sid=".trim($sid)."'>Email Users</a></td>
	</tr>
	");
$ic0=mysql_fetch_row(mysql_query("select count(*) from session_history where locked='1'"));
$ic1=mysql_fetch_row(mysql_query("select count(*) from domains where status='0'"));
$ic2=mysql_fetch_row(mysql_query("select count(*) from authnet_batch where batch_status='0'"));
$ic3=mysql_fetch_row(mysql_query("select count(*) from linkpoint_holding_queue where status='1'"));
echo("
	<tr>
	  <td width='50%' bgcolor='#F0F0F0'><a href='".$http_admin."/manage_session_history.php?sid=".trim($sid)."'>Manage Incomplete Orders</a>&nbsp;&nbsp;[&nbsp;".(($ic0[0]>0)?"<a href='".$http_admin."/manage_session_history.php?sid=".trim($sid)."'>":"")."".$ic0[0]."".(($ic0[0]>0)?"</a>":"")."&nbsp;]</td> 
	  <td width='50%' bgcolor='#F0F0F0'><a href='".$http_admin."/enom_incomplete.php?sid=".$sid."'>Manage Incomplete Enom Orders</a>&nbsp;&nbsp;[&nbsp;".(($ic1[0]>0)?"<a href='".$http_admin."/enom_incomplete.php?sid=".trim($sid)."'>":"")."".$ic1[0]."".(($ic1[0]>0)?"</a>":"")."&nbsp;]<!---<a href='".$http_admin."/addon_migration.php?sid=".trim($sid)."'>Migrate Pre-Version 2.1.0 Addons</a>---></td>
	</tr>
	<tr>
	  <td width='50%' bgcolor='#F0F0F0'><a href='".$http_admin."/config_editor.php?sid=".trim($sid)."'><B><font color='red'>Edit WHM AutoPilot Configuration</b></font></a></td> 
	  <td width='50%' bgcolor='#F0F0F0'>".(($rs_a[0]==1)?"<a href='".$http_admin."/manage_batch.php?sid=".trim($sid)."'>Manage Authorize.net  Batch</a>&nbsp;&nbsp;[&nbsp;".(($ic2[0]>0)?"<b><a href='".$http_admin."/view_batch.php?sid=".trim($sid)."&c=0'>":"")."".$ic2[0]."".(($ic2[0]>0)?"</a></b>":"")."&nbsp;Open]":"")."</td>
	</tr>
	<tr>
	  <td width='50%' bgcolor='#F0F0F0'><a href='".$http_admin."/fraudcall.php?sid=".$sid."'>Varilogix Fraud Call Configuration</a> <font color='999999'> [BETA]</td> 
	  <td width='50%' bgcolor='#F0F0F0'><a href='".$http_admin."/admin_access.php?sid=".$sid."'>Admin Area Access Configuration [IP Lock]</a></td>
	</tr>
	<tr>
	  <td width='50%' bgcolor='#F0F0F0'><a href='".$http_admin."/fg_config.php?sid=".trim($sid)."' target='_blank'>FraudGate Configuration</a> <font color='999999'> [ testing ]</td> 
	  <td width='50%' bgcolor='#F0F0F0'>".(($rs_aa[0]==1)?"<a href='".$http_admin."/linkpoint_holding.php?sid=".trim($sid)."'>Manage LinkPoint Periodic Billings</a>&nbsp;&nbsp;[&nbsp;".(($ic3[0]>0)?"<b><a href='".$http_admin."/linkpoint_holding.php?sid=".trim($sid)."&c=0'>":"")."".$ic3[0]."".(($ic3[0]>0)?"</a></b>":"")."&nbsp;Open]":"")."</td>
	</tr>
</table>
</fieldset>
<table width='530' border='0' cellspacing='0' cellpadding='0'>
	<tr>
	  <td width='100%'><img src='".$http_images."/space.gif' width='1' height='10' ALIGN='bottom' border='0' naturalsizeflag='0'></td> 
	</tr>
</table>
<!--- END OG THEME BLOCK --->
	");
?>
