require_once("../conn.php");
require_once("access.php");
require_once("../includes.php");
//get the prices
$q2 = "select * from yellow_prices, yellow_priority where yellow_prices.PriorityLevel = yellow_priority.PriorityLevel order by PackageName";
$r2 = mysql_query($q2) or die(mysql_error());
if(mysql_num_rows($r2) == '0')
{
echo "
You need to set up the prices first!";
exit();
}
$sprices = "";
if(isset($_POST[s1]))
{
$PriceInfo = explode("|", $_POST[price]);
$ExpDate = mktime(0,0,0,date(m) + $PriceInfo[0],date(d), date(Y));
$NewLogo = $_FILES[LogoImage][name];
if(!empty($NewLogo))
{
$NewLogoName = $t."_".$NewLogo;
copy($_FILES[LogoImage][tmp_name], "../yellow_images/".$NewLogoName);
}
if(!empty($_FILES[rim]))
{
while(list($key,$value) = each($_FILES[rim][name]))
{
if(!empty($value))
{
$NewImageName = $t."_".$value;
copy($_FILES[rim][tmp_name][$key], "../yellow_images/".$NewImageName);
$MyImages[] = $NewImageName;
}
}
if(!empty($MyImages))
{
$ImageStr = implode("|", $MyImages);
}
}
if(!empty($_POST[website]))
{
if(!ereg("^http://", $_POST[website]))
{
$NewWebsite = "";
}
elseif(strlen($_POST[website]) < '11')
{
$NewWebsite = "";
}
else
{
$NewWebsite = $_POST[website];
}
}
$q1 = "insert into yellow_agents set
username = '$_POST[NewUsername]',
password = '$_POST[NewPassword]',
FirstName = '$_POST[FirstName]',
LastName = '$_POST[LastName]',
address = '$_POST[address]',
city = '$_POST[city]',
state = '$_POST[state]',
country = '$_POST[country]',
zipcode='$_POST[zip]',
phone = '$_POST[Phone]',
cellular = '$_POST[cellular]',
pager = '$_POST[pager]',
email = '$_POST[Email]',
RegDate = '$t',
ExpDate = '$ExpDate',
AccountStatus = 'active',
PriorityLevel = '$PriceInfo[1]',
news = '$_POST[updates]' ";
mysql_query($q1);
if(mysql_error())
{
$RegisterError = "