SPeSeR.com
11th December 2006, 07:16 AM
UPDATED:
This Auto Sets 3 Campaigns to Users when they join.
You will need to change the below variables to meet your specific campaign settings. To do this you will need to have one affilate already assigned to campaigns, then in phpMySQL Admin look under wd_pa_affiliatescampaigns for their correct settings
$campcategoryid
$campaignid
Most of the coding for PAP is too confusing to figure out without studying it for a while because it is well functionated. So I have just added a Verifying Section to the postsignup.php file, it works just fine and the user will really never know the differance.
Below is a copy of my postsignup.php file
<?
//================================================== ==========================
// Copyright (c) webradev.com 2004
// All rights reserved
//
// For support contact info@webradev.com
//================================================== ==========================
include_once('global_signup.php');
////////////////// Added by Rusty Jordan
if(isset($_POST['submit']))
{
$email=$_POST['email'];
$getref="SELECT refid from wd_g_users where username='$email'";
$getref2=mysql_query($getref) or die("Could not get refid");
$getref3=mysql_fetch_array($getref2);
$affiliateid=$getref3[refid];
$rstatus='2';
$affcampid = QCore_Sql_DBUnit::createUniqueID('wd_pa_affiliates campaigns', 'affcampid');
$campcategoryid='b3c44762';
$campaignid='9fc8797f';
$newcamp="INSERT into wd_pa_affiliatescampaigns (affcampid,campcategoryid,affiliateid,campaignid,r status)
values('$affcampid','$campcategoryid','$affiliatei d','$campaignid','$rstatus')";
$newcamp2=mysql_query($newcamp) or die("Could not add campaign 1");
$affcampid = QCore_Sql_DBUnit::createUniqueID('wd_pa_affiliates campaigns', 'affcampid');
$campcategoryid='7d66eedf';
$campaignid='a487923b';
$newcamp="INSERT into wd_pa_affiliatescampaigns (affcampid,campcategoryid,affiliateid,campaignid,r status)
values('$affcampid','$campcategoryid','$affiliatei d','$campaignid','$rstatus')";
$newcamp2=mysql_query($newcamp) or die("Could not add campaign 2");
$affcampid = QCore_Sql_DBUnit::createUniqueID('wd_pa_affiliates campaigns', 'affcampid');
$campcategoryid='a7c2e59b';
$campaignid='fc978841';
$newcamp="INSERT into wd_pa_affiliatescampaigns (affcampid,campcategoryid,affiliateid,campaignid,r status)
values('$affcampid','$campcategoryid','$affiliatei d','$campaignid','$rstatus')";
$newcamp2=mysql_query($newcamp) or die("Could not add campaign 3");
print "<p align='center'>
Your account has successfully been verified";
exit();
}
else
{
?>
<p align='center'>
Please enter email to verify account
<form action='postsignup.php' method='post'>
<center>Email Address:
<input type='text' name='email' size='20'>
<input type='submit' name='submit' value='Verify'>
</form>
<?
}
}
//////////////END OF MY CODE
$page = QUnit_Global::newobj('QUnit_UI_MainPage');
$page->setDefaultView('AffiliateAfterSignup');
$page->user_type = USERTYPE_ADMIN;
$page->setFilePrefix('Affiliate_Scripts_Views_');
$page->setMainTemplate('main_after_signup');
echo $page->processNoSecurityCheck();
?>
This Auto Sets 3 Campaigns to Users when they join.
You will need to change the below variables to meet your specific campaign settings. To do this you will need to have one affilate already assigned to campaigns, then in phpMySQL Admin look under wd_pa_affiliatescampaigns for their correct settings
$campcategoryid
$campaignid
Most of the coding for PAP is too confusing to figure out without studying it for a while because it is well functionated. So I have just added a Verifying Section to the postsignup.php file, it works just fine and the user will really never know the differance.
Below is a copy of my postsignup.php file
<?
//================================================== ==========================
// Copyright (c) webradev.com 2004
// All rights reserved
//
// For support contact info@webradev.com
//================================================== ==========================
include_once('global_signup.php');
////////////////// Added by Rusty Jordan
if(isset($_POST['submit']))
{
$email=$_POST['email'];
$getref="SELECT refid from wd_g_users where username='$email'";
$getref2=mysql_query($getref) or die("Could not get refid");
$getref3=mysql_fetch_array($getref2);
$affiliateid=$getref3[refid];
$rstatus='2';
$affcampid = QCore_Sql_DBUnit::createUniqueID('wd_pa_affiliates campaigns', 'affcampid');
$campcategoryid='b3c44762';
$campaignid='9fc8797f';
$newcamp="INSERT into wd_pa_affiliatescampaigns (affcampid,campcategoryid,affiliateid,campaignid,r status)
values('$affcampid','$campcategoryid','$affiliatei d','$campaignid','$rstatus')";
$newcamp2=mysql_query($newcamp) or die("Could not add campaign 1");
$affcampid = QCore_Sql_DBUnit::createUniqueID('wd_pa_affiliates campaigns', 'affcampid');
$campcategoryid='7d66eedf';
$campaignid='a487923b';
$newcamp="INSERT into wd_pa_affiliatescampaigns (affcampid,campcategoryid,affiliateid,campaignid,r status)
values('$affcampid','$campcategoryid','$affiliatei d','$campaignid','$rstatus')";
$newcamp2=mysql_query($newcamp) or die("Could not add campaign 2");
$affcampid = QCore_Sql_DBUnit::createUniqueID('wd_pa_affiliates campaigns', 'affcampid');
$campcategoryid='a7c2e59b';
$campaignid='fc978841';
$newcamp="INSERT into wd_pa_affiliatescampaigns (affcampid,campcategoryid,affiliateid,campaignid,r status)
values('$affcampid','$campcategoryid','$affiliatei d','$campaignid','$rstatus')";
$newcamp2=mysql_query($newcamp) or die("Could not add campaign 3");
print "<p align='center'>
Your account has successfully been verified";
exit();
}
else
{
?>
<p align='center'>
Please enter email to verify account
<form action='postsignup.php' method='post'>
<center>Email Address:
<input type='text' name='email' size='20'>
<input type='submit' name='submit' value='Verify'>
</form>
<?
}
}
//////////////END OF MY CODE
$page = QUnit_Global::newobj('QUnit_UI_MainPage');
$page->setDefaultView('AffiliateAfterSignup');
$page->user_type = USERTYPE_ADMIN;
$page->setFilePrefix('Affiliate_Scripts_Views_');
$page->setMainTemplate('main_after_signup');
echo $page->processNoSecurityCheck();
?>