if ($_POST['changep'] == 1) {
if ($_POST['pass1'] != $_POST['pass2']) {
$pnotice = "$a26";} else {
mysql_query ("update idevaff_affiliates set password = '" . $_POST['pass1'] . "' where username = '$logged'");
$pnotice = "$a27"; } }
$checkapp=mysql_query("select * from idevaff_affiliates where username = '$logged'");
$res=mysql_fetch_array($checkapp);
$getcode=$res[approved];
$pass=$res[password];
$linkid=$res[id];
$lev=$res[level];
$levamt = mysql_query("select amt from idevaff_paylevels where level = $lev");
$lamt = mysql_fetch_array($levamt);
$levelamt = $lamt[amt];
$hi=$res[hits_in];
$hin = (number_format($hi,0));
if ($changec == 1) {
mysql_query ("update idevaff_affiliates set type = '" . $_POST['type'] . "', level = 1 where id = '$linkid'");
$tagedit = "Commission Style Updated"; }
if ($_POST['submit'] == 1) {
mysql_query ("update idevaff_affiliates set payable = '" . $_POST['payable'] . "', tax_id_ssn = '" . $_POST['tax_id_ssn'] . "', f_name = '" . $_POST['f_name'] . "', l_name = '" . $_POST['l_name'] . "', email = '" . $_POST['email'] . "', address_1 = '" . $_POST['address_one'] . "', address_2 = '" . $_POST['address_two'] . "', city = '" . $_POST['city'] . "', state = '" . $_POST['state'] . "', zip = '" . $_POST['zip'] . "', country = '" . $_POST['country'] . "', phone = '" . $_POST['phone'] . "', fax = '" . $_POST['fax'] . "', url = '" . $_POST['url'] . "', pp = '" . $_POST['pp'] . "', paypal = '" . $_POST['pp_account'] . "' where id = '$linkid'");
$tagedit = "Account Updated"; }
$pay = mysql_query("select SUM(amount) as total from idevaff_payments where id = '$linkid'");
$paid = mysql_fetch_array($pay);
$pai = $paid['total'];
$paid = (number_format($pai,2));
$sales_app = mysql_query("select SUM(payment) as totalapp from idevaff_sales where id = '$linkid' and approved = '1' and top_tier_tag = '0' and recurring < '1'");
$approved_sales = mysql_fetch_array($sales_app);
$approved_sale = $approved_sales['totalapp'];
$approved_sales = (number_format($approved_sale,2));
$rsales_app = mysql_query("select SUM(payment) as rtotalapp from idevaff_sales where id = '$linkid' and approved = '1' and top_tier_tag = '0' and recurring > '0'");
$rapproved_sales = mysql_fetch_array($rsales_app);
$rapproved_sale = $rapproved_sales['rtotalapp'];
$rapproved_sales = (number_format($rapproved_sale,2));
$tsales_app = mysql_query("select SUM(payment) as ttotalapp from idevaff_sales where id = '$linkid' and bonus != '1' and approved = '1' and top_tier_tag > '0'");
$tapproved_sales = mysql_fetch_array($tsales_app);
$tapproved_sale = $tapproved_sales['ttotalapp'];
$tapproved_sales = (number_format($tapproved_sale,2));
$tpay = mysql_query("select SUM(payment) as total from idevaff_archive where top_tier_tag != '1' and id = '$linkid' and recurring < '1'");
$tpaid = mysql_fetch_array($tpay);
$tpai = $tpaid['total'];
$rpay = mysql_query("select SUM(payment) as total from idevaff_archive where top_tier_tag != '1' and id = '$linkid' and recurring > 0");
$rpaid = mysql_fetch_array($rpay);
$rpai = $rpaid['total'];
$tpayt = mysql_query("select SUM(payment) as total from idevaff_archive where top_tier_tag = '1' and id = '$linkid'");
$tpaidt = mysql_fetch_array($tpayt);
$tpait = $tpaidt['total'];
$reg = $tpai + $approved_sale;
$reg = (number_format($reg,2));
$ttier = $tpait + $tapproved_sale;
$ttier = (number_format($ttier,2));
$trec = $rpai + $rapproved_sale;
$trec = (number_format($trec,2));
$tearned = $pai + $approved_sale + $tapproved_sale + $rapproved_sale;
$tearned = (number_format($tearned,2));
$arc_tot = $tpai + $tpait + $rpai;
$arc_tot = (number_format($arc_tot,2));
$totcsales = $approved_sale + $tapproved_sale + $rapproved_sale;
$totcsales = (number_format($totcsales,2));
$num_app = mysql_query("select id from idevaff_sales where id = '$linkid' and bonus != '1' and approved = '1'");
$num_app1 = mysql_num_rows($num_app);
$num_app = number_format($num_app1);
$num_appt = mysql_query("select id from idevaff_archive where id = '$linkid' and bonus != '1'");
$num_appt = mysql_num_rows($num_appt);
$num_appt = $num_appt + $num_app1;
$num_appt = number_format($num_appt);
$bonu = mysql_query("select bonus from idevaff_sales where id = '$linkid' and bonus = '1' and approved = '1'");
$bon = mysql_num_rows($bonu);
$tiernums = mysql_query("select id from idevaff_affiliates where tier = '$linkid' and approved = '1'");
$tnumsdisp = mysql_num_rows($tiernums);
if ($link_style == 1) {
if (!is_file("$path/$storage/$linkid.php")) {
$text= fopen("$path/$storage/$linkid.php", "a");
fwrite($text, "\n" . "$" . "id=$linkid;\ninclude(\"../config/config.php\");\ninclude(\"../idevaffiliate.php\");\n?>");
fclose($text); } }
?>
| |
if ($getcode == 1) { ?>
} else {
print "$a12 "; }
?>
|
|
print $reg;
print " $currency";
if ($bon > 0) {
print " ($a18)"; }
?>
|
if ($second_tier == 0) { ?> } else {}?> |
if ($second_tier == 0) { ?>N/A } else { ?> } ?> |
if ($use_rec == 0) { ?> } else {}?> |
if ($use_rec == 0) { ?>N/A } else { ?> } ?> |
|
|
include("templates/menu.php"); ?>
|
|
if ((!$_REQUEST['page']) || ($_REQUEST['page'] == 1)) { include("templates/report_1.php"); }
if ($_GET['page'] == 2) { include("templates/report_2.php"); }
if ($_GET['page'] == 3) { include("templates/report_3.php"); }
if ($_REQUEST['page'] == 4) { if ($getcode == 1) { include("templates/page_4.php"); } else { include("templates/notice.php"); } }
if ($_GET['page'] == 5) { if ($getcode == 1) { include("templates/page_5.php"); } else { include("templates/notice.php"); } }
if ($_REQUEST['page'] == 6) { if ($getcode == 1) { include("templates/page_6.php"); } else { include("templates/notice.php"); } }
if ($_REQUEST['page'] == 7) { include("templates/page_7.php"); }
if ($_REQUEST['page'] == 8) { include("templates/page_8.php"); }
if ($_GET['page'] == 9) { include("templates/page_9.php"); }
if ($_GET['page'] == 10) { include("templates/page_10.php"); }
if ($_REQUEST['page'] == 11) { if ($getcode == 1) { include("templates/page_11.php"); } else { include("templates/notice.php"); } }
if ($_GET['page'] == 12) { include("templates/page_12.php"); }
if ($_REQUEST['page'] == 13) { if ($getcode == 1) { include("templates/page_13.php"); } else { include("templates/notice.php"); } }
if ($_REQUEST['page'] == 14) { if ($getcode == 1) { include("templates/page_14.php"); } else { include("templates/notice.php"); } }
if ($_REQUEST['page'] == 15) { if ($getcode == 1) { include("templates/page_15.php"); } else { include("templates/notice.php"); } }
if ($_REQUEST['page'] == 16) { if ($getcode == 1) { include("templates/page_16.php"); } else { include("templates/notice.php"); } }
if ($_REQUEST['page'] == 17) { include("templates/page_17.php"); }
if (($_GET['type']) && ($_GET['id']) && ($_GET['page'] == 18)) { include("templates/page_18.php"); }
if ($_REQUEST['page'] == 19) { if ($getcode == 1) { include("templates/page_19.php"); } else { include("templates/notice.php"); } }
?>
|
| |
| |
include("templates/footer.php"); } ?>
|