<?php

// connection to advertisers
$advq = mysql_query("SELECT * FROM `Accounts_Classic_Advertisers` WHERE `username` = '$session_username'");
$ra = mysql_fetch_array($advq);

// connection to members
$memq = mysql_query("SELECT * FROM `Accounts_Classic_Publishers` WHERE `username` = '$session_username'");
$ma = mysql_fetch_array($memq);

// connection to settings
$setq = mysql_query("SELECT * FROM Web_Settings WHERE id='1'");
$sa = mysql_fetch_array($setq);

// connection to currency
$acutq = mysql_query("SELECT * FROM Web_Currency WHERE active='1'");
$acu = mysql_fetch_array($acutq);

// connection to currency
$cutq = mysql_query("SELECT * FROM Web_Currency");
$cu = mysql_fetch_array($cutq);

// PayPal Gateway
$paypal1 = mysql_query("SELECT * FROM `Web_Gateways` WHERE `phpname` = 'paypal'");
$paypal = mysql_fetch_array($paypal1);
$paypal_name = $paypal['name'];
$paypal_status = $paypal['status'];
$paypal_taxpercentage = $paypal['taxpercentage'];
$paypal_taxdollars = $paypal['taxdollars'];
$paypal_1 = $paypal['data1'];
$paypal_2 = $paypal['data2'];
$paypal_3 = $paypal['data3'];
$paypal_4 = $paypal['data4'];
$paypal_5 = $paypal['data5'];
$paypal_6 = $paypal['data6'];

//Payza Gateway
$payza1 = mysql_query("SELECT * FROM `Web_Gateways` WHERE `phpname` = 'payza'");
$payza = mysql_fetch_array($payza1);
$payza_name = $payza['name'];
$payza_status = $payza['status'];
$payza_taxpercentage = $payza['taxpercentage'];
$payza_taxdollars = $payza['taxdollars'];
$payza_1 = $payza['data1'];
$payza_2 = $payza['data2'];
$payza_3 = $payza['data3'];
$payza_4 = $payza['data4'];
$payza_5 = $payza['data5'];
$payza_6 = $payza['data6'];

//G2A Pay Gateway
$g2apay1 = mysql_query("SELECT * FROM `Web_Gateways` WHERE `phpname` = 'g2apay'");
$g2apay = mysql_fetch_array($g2apay1);
$g2apay_name = $g2apay['name'];
$g2apay_status = $g2apay['status'];
$g2apay_taxpercentage = $g2apay['taxpercentage'];
$g2apay_taxdollars = $g2apay['taxdollars'];
$g2apay_1 = $g2apay['data1'];
$g2apay_2 = $g2apay['data2'];
$g2apay_3 = $g2apay['data3'];
$g2apay_4 = $g2apay['data4'];
$g2apay_5 = $g2apay['data5'];
$g2apay_6 = $g2apay['data6'];

//2Checkout Gateway
$twocheckout1 = mysql_query("SELECT * FROM `Web_Gateways` WHERE `phpname` = 'twocheckout'");
$twocheckout = mysql_fetch_array($twocheckout1);
$twocheckout_name = $twocheckout['name'];
$twocheckout_status = $twocheckout['status'];
$twocheckout_taxpercentage = $twocheckout['taxpercentage'];
$twocheckout_taxdollars = $twocheckout['taxdollars'];
$twocheckout_1 = $twocheckout['data1'];
$twocheckout_2 = $twocheckout['data2'];
$twocheckout_3 = $twocheckout['data3'];
$twocheckout_4 = $twocheckout['data4'];
$twocheckout_5 = $twocheckout['data5'];
$twocheckout_6 = $twocheckout['data6'];

//Payza Gateway
$skrill1 = mysql_query("SELECT * FROM `Web_Gateways` WHERE `phpname` = 'skrill'");
$skrill = mysql_fetch_array($skrill1);
$skrill_name = $skrill['name'];
$skrill_status = $skrill['status'];
$skrill_taxpercentage = $skrill['taxpercentage'];
$skrill_taxdollars = $skrill['taxdollars'];
$skrill_1 = $skrill['data1'];
$skrill_2 = $skrill['data2'];
$skrill_3 = $skrill['data3'];
$skrill_4 = $skrill['data4'];
$skrill_5 = $skrill['data5'];
$skrill_6 = $skrill['data6'];

$stats1 = mysql_num_rows(mysql_query("SELECT * FROM `Accounts_Classic_Advertisers`"));							//ADVERTISERS
$stats2 = mysql_num_rows(mysql_query("SELECT * FROM `Accounts_Classic_Publishers`"));							//PUBLISHERS
$stats3 = mysql_num_rows(mysql_query("SELECT * FROM `Accounts_Premium_Admin`"));									//ADMINS
$stats4 = mysql_num_rows(mysql_query("SELECT * FROM `Accounts_Premium_Payments`"));								//PAYMENTS MANAGERS
$stats5 = mysql_num_rows(mysql_query("SELECT * FROM `Accounts_Premium_Support`"));								//SUPPORTERS
$stats6 = mysql_num_rows(mysql_query("SELECT * FROM `Links_All`"));													//LINKS
$stats7 = mysql_num_rows(mysql_query("SELECT * FROM `Links_All` WHERE `advtype` = 'interstitial'"));		//LINKS: INTERSTITIAL
$stats8 = mysql_num_rows(mysql_query("SELECT * FROM `Links_All` WHERE `advtype` = 'video'"));					//LINKS: VIDEO
$stats9 = mysql_num_rows(mysql_query("SELECT * FROM `Links_All` WHERE `advtype` = 'banner'"));				//LINKS: BANNER
$stats10 = mysql_num_rows(mysql_query("SELECT * FROM `Ads_All`"));														//ADS
$stats11 = mysql_num_rows(mysql_query("SELECT * FROM `Ads_All` WHERE `approved` = '1'"));						//ADS: APPROVED 0
$stats12 = mysql_num_rows(mysql_query("SELECT * FROM `Ads_All` WHERE `approved` = '0'"));						//ADS: APPROVED 1
$stats13 = mysql_num_rows(mysql_query("SELECT * FROM `Ads_All` WHERE `adtype` = 'interstitial'"));			//ADS: INTERSTITIAL
$stats14 = mysql_num_rows(mysql_query("SELECT * FROM `Ads_All` WHERE `adtype` = 'video'"));					//ADS: VIDEO
$stats15 = mysql_num_rows(mysql_query("SELECT * FROM `Ads_All` WHERE `adtype` = 'banner'"));					//ADS: BANNER
$stats17 = mysql_num_rows(mysql_query("SELECT * FROM `Web_Withdraws` WHERE `status` = '1'"));					//WITHDRAWALS: PROCESSED
$stats18 = mysql_num_rows(mysql_query("SELECT * FROM `Web_Withdraws` WHERE `status` = '-2'"));				//WITHDRAWALS: UNPROCESSED
$stats19 = mysql_num_rows(mysql_query("SELECT * FROM `Web_Pages`"));													//WITHDRAWALS: UNPROCESSED
$stats20 = mysql_num_rows(mysql_query("SELECT * FROM `Web_Themes_All`"));
$stats21_1 = mysql_query("SELECT `reg7` FROM `Web_Stats`") or die($q1."<br/><br/>".mysql_error());
$stats21 = mysql_result($stats21_1, 0);
$stats22_1 = mysql_query("SELECT `areg7` FROM `Web_Stats`") or die($q1."<br/><br/>".mysql_error());
$stats22 = mysql_result($stats22_1, 0);

$VTapikey = $sa['virustotal'];

$logoandtitlequery = mysql_query("SELECT * FROM Web_New_data WHERE data1='logourl'");
$logoandtitle = mysql_fetch_array($logoandtitlequery);
$iconurl = $logoandtitle['data2'];
$logourl = $logoandtitle['data3'];
$logowidth = $logoandtitle['data4'];
$showicon = $logoandtitle['data5'];
$showlogo = $logoandtitle['data6'];
$showtitle = $logoandtitle['data7'];

?>
