#############################################################
## iDevAffiliate Version 4.0 - Copyright by iDevDirect.com
## Site: http://www.idevdirect.com/
## Support: http://www.idevdirect.com/support/
## Email: support@idevdirect.com
#############################################################
error_reporting(0);
session_start();
unset($_SESSION['valid_user']);
include ("config/config.php");
if ($_POST['submit'] == 1) {
include("config/signup_check.php");
if ((!$fail_message) && (!$fail)) {
if ($account_approval == 1) { $setme = 0; } else { $setme = 1; }
$num_affs = mysql_query("select id from idevaff_affiliates");
if (mysql_num_rows($num_affs) > 0) { $newidnumber = ''; } else { $newidnumber = $startnumber; }
$cta = mysql_query("select ta from idevaff_tlog where ti = '$ip_addr' order by id desc");
$ctb = mysql_fetch_array($cta);
$ctc = $ctb['ta'];
if ($paytype == 1) { $payme = $_POST['payme']; } else { $payme = $def_pay; }
mysql_query ("insert into idevaff_affiliates (id, username, password, approved, payable, tax_id_ssn, company, f_name, l_name, email, address_1, address_2, city, state, zip, country, phone, fax, url, pp, paypal, tier, type, level) values ('$newidnumber', '$usercheck', '" . $_POST['password'] . "', '$setme', '" . $_POST['payable'] . "', '" . $_POST['tax_id_ssn'] . "', '" . $_POST['company'] . "', '" . $_POST['f_name'] . "', '" . $_POST['l_name'] . "', '" . $_POST['email'] . "', '" . $_POST['address_one'] . "', '" . $_POST['address_two'] . "', '" . $_POST['city'] . "', '" . $_POST['state'] . "', '" . $_POST['zip'] . "', '" . $_POST['country'] . "', '" . $_POST['phone'] . "', '" . $_POST['fax'] . "', '" . $_POST['url'] . "', '" . $_POST['pp'] . "', '" . $_POST['pp_account'] . "', '$ctc', '$payme', '1')");
mysql_query("delete from idevaff_tlog where ta = '$ctc' and ti = '$ip_addr'");
session_start();
$_SESSION['valid_user'] = $_POST['username'];
if ($initialbalance > 0) {
$newid = mysql_query("select id from idevaff_affiliates where username = '" . $_POST['username'] . "'");
$getid = mysql_fetch_array($newid);
$insertid = $getid['id'];
mysql_query("insert into idevaff_sales (id, date, time, payment, bonus, approved, ip, code) values ('$insertid', '$cdate', '$ctime', '$initialbalance', '1', '1', '$ip_addr', '$sale_time')"); }
$complete = 1;
if ($we == 1) { include("admin/includes/email_templates/welcome.php"); }
if ($mailadmin == 1) { include("admin/includes/email_templates/admin_new_acct.php"); } } }
include ("skins/$skindir/header.php");
include("admin/help/help_script.txt");
?>
include("templates/menu_text.php"); ?> |
|
|
if ($complete == 1) { ?>
} else { if ($fail_message) { ?>
()
|
print $fail_message; ?> |
|
} ?>
| |
} ?>
include("skins/$skindir/footer.php"); ?>