//fakhruddin: for redirect
$ur_l = "http://www.yarnsandfibers.com/preferredsupplier/registration.php";
printf('', $ur_l);
ob_start();
include "../rcontrol/config.php";
include "$SERVERPATH/meregistration/reg_common/dirnamesfile.php";
include "$SERVERPATH/$com_directory/fontsused.php";
include "$SERVERPATH/$com_directory/database.php";
include "$SERVERPATH/$register_dir/$reg_common_dir/tablename.php";
include "$SERVERPATH/$register_dir/$reg_incl_dir/messages.php" ;
include "$SERVERPATH/$com_directory/functions.php";
include "$SERVERPATH/$com_directory/countryfordd.php";
include "$SERVERPATH/$com_directory/colorparam.php";
include "$SERVERPATH/$register_dir/$reg_common_dir/emailinformation.php";
include "$SERVERPATH/$register_dir/$reg_common_dir/functionsfile.php";
include "$SERVERPATH/$register_dir/$reg_common_dir/field_memtab.php";
include "$SERVERPATH/$register_dir/$reg_common_dir/field_prod_cat.php";
include "$SERVERPATH/$register_dir/$reg_common_dir/field_prodatynfx_msttab.php";
include "$SERVERPATH/$register_dir/$reg_common_dir/field_prodatynfxtab.php";
include "$SERVERPATH/$register_dir/$reg_common_dir/field_product.php";
include "$SERVERPATH/$register_dir/$reg_common_dir/field_sub_prod.php";
include "$SERVERPATH/$register_dir/$reg_common_dir/field_planmaster.php";
include "$SERVERPATH/$register_dir/$reg_common_dir/field_planservmst.php";
include "$SERVERPATH/$register_dir/$reg_common_dir/field_servgrpmst.php";
include "$SERVERPATH/$register_dir/$reg_common_dir/field_servmst.php";
include "$SERVERPATH/$register_dir/$reg_common_dir/field_coststruc.php";
include "$SERVERPATH/$register_dir/$reg_common_dir/field_memtab_init.php";
include "$SERVERPATH/$register_dir/$reg_common_dir/field_mem_services.php";
include "$SERVERPATH/$register_dir/$reg_common_dir/field_creditcardtable.php";
include "$SERVERPATH/$register_dir/$reg_common_dir/field_invoice.php";
include "$SERVERPATH/$register_dir/$reg_common_dir/field_payment.php";
include "$SERVERPATH/$register_dir/$reg_common_dir/field_servaccess.php";
if (($remainfree)&&($di))
{
if (!getenv("HTTP_REFERER"))
{
header("location:".$PHP_SELF."");
}
else
{
if(substr(trim(getfromthetable("plan","member","id",$di)),0,4)!="free")
{
header("location:".$PHP_SELF."");
}
else
{
######################################### begin the thank you message
$whichpage="thankyoupage_free";
########################################### end the thank you message
}
}
}
if (($rdto)&&($login)&&($additionalinfo)&&(!$enteronce))
{
$whichpage="secondpage";
$gotopage ="thirdpage1";
$idofthemember=getfromthetable("id","member","login",$login);
$enteronce="yes";
}
$country="";
###############################################
######## Begining of Login Routene ############
###############################################
if($var==1)
{
//check if the user has already logged on
$qry_result="SELECT memberlogin, memberexpdate FROM $tab_logger WHERE abc='$abc'";
$result = mysql_db_query($DATABASE, $qry_result);
if(mysql_error()) error("Unexpected Error !!");
$count = mysql_num_rows($result);
if ($count==0)
{
//$go="whichpage=firstpage&gotopage=secondpage&accessedpdservice=n&old=y&var=1&oldmemberlogin=$oldmemberlogin&contactperson=&c_try=$c_try&id=$id&upgrade=y";
if($whichpage)
{
$whichpage = urlencode($whichpage);
$gotopage = urlencode($gotopage);
$accessedpdservice = urlencode($accessedpdservice);
$old = urlencode($old);
$var = urlencode($var);
$oldmemberlogin = urlencode($oldmemberlogin);
$contactperson = urlencode($contactperson);
$c_try = urlencode($c_try);
$id = urlencode($id);
$upgrade = urlencode($upgrade);
//$go = urlencode("!n-tradingzone/sp_fabric~?id=$id");
//$go = urlencode("meregistration/index~?whichpage=$whichpage&gotopage=$gotopage&accessedpdservice=$accessedpdservice&old=$old&var=$var&oldmemberlogin=$oldmemberlogin&c_try=$c_try&id=$id&upgrade=y");
$go = urlencode("/meregistration/index~?whichpage=$whichpage&gotopage=$gotopage&accessedpdservice=$accessedpdservice&old=$old&var=$var&oldmemberlogin=$oldmemberlogin&c_try=$c_try&id=$id&upgrade=y");
//$go = urlencode("/meregistation/index~?$go");
}
else
{
$go = urlencode("/meregistation/index.php");
}
Header ("Location: ../ruser/index.php?go=$go");
exit;
}
$login = stripslashes(mysql_result($result,0,0));
$qry_result2="select contactperson, country from member where login='$login'";
$result = mysql_db_query($DATABASE, $qry_result2);
if(mysql_error()) error("Unexpected Error !!");
$contacperson=stripslashes(mysql_result($result,0,0));
$country1=stripslashes(mysql_result($result,0,1));
}
###############################################
############ End of Login Routene #######
###############################################
if($counterc!=0)
{
for($i=0;$i<=$counterc;$i++)
{
$distab.='';
}
}
############################################################
############## Start Validating the page ################
############################################################
#####################################
##### Begin Validating the #####
##### contact information page #####
#####################################
if ($continfovalidate=="yes")
{
include "$SERVERPATH/$register_dir/$reg_incl_dir/valid_continfo.php" ;
}
#####################################
##### End Validating the #####
##### contact information page #####
#####################################
#####################################
##### Begin Validating the #####
##### Account information page #####
#####################################
if ($acinfovalidate=="yes")
{
include "$SERVERPATH/$register_dir/$reg_incl_dir/valid_acinfo.php" ;
}
#####################################
##### End Validating the #####
##### Account information page #####
#####################################
#####################################
##### Begin Validating the #####
##### HeadOffice info page #####
#####################################
if ($hoinfovalidate=="yes")
{
include "$SERVERPATH/$register_dir/$reg_incl_dir/valid_hocontinfo.php" ;
}
#####################################
##### End Validating the #####
##### Account information page #####
#####################################
#####################################
##### Begin Validating the #####
##### mode of payment #####
#####################################
if ($hoinfovalidate=="yes")
{
include "$SERVERPATH/$register_dir/$reg_incl_dir/valid_modeofpay.php" ;
}
#####################################
##### End Validating the #####
##### Mode of payment #####
#####################################
#####################################
##### Begin Validating the #####
##### Business Details #####
#####################################
if ($buzdetvalidate=="yes")
{
include "$SERVERPATH/$register_dir/$reg_incl_dir/valid_buzdetails.php" ;
}
#####################################
##### End Validating the #####
##### Business Details #####
#####################################
#####################################
##### Begin Validating the #####
##### Plan form #####
#####################################
if ($basketvalidate=="yes")
{
include "$SERVERPATH/$register_dir/$reg_incl_dir/validateplan.php" ;
}
#####################################
##### End Validating the #####
##### Plan form #####
#####################################
if ($payvalidate=="yes")
{
include "$SERVERPATH/$register_dir/$reg_incl_dir/validatepayment.php" ;
}
#####################################
##### Begin Validating the #####
##### Declaration #####
#####################################
if ($decvalidate=="yes")
{
include "$SERVERPATH/$register_dir/$reg_incl_dir/validatedeclare.php" ;
}
#####################################
##### End Validating the #####
##### Declaration #####
#####################################
#####################################
##### Begin Validating the #####
##### credit card form #####
#####################################
if ($validateccpage=="yes")
{
include "$SERVERPATH/$register_dir/$reg_incl_dir/secureserver1.php" ;
}
#####################################
##### End Validating the #####
##### Plan form #####
#####################################
#####################################
##### Begin Validating the #####
##### email form #####
#####################################
if ($emailtypevalidate=="yes")
{
include "$SERVERPATH/$register_dir/$reg_incl_dir/validateemail.php" ;
}
#####################################
##### End Validating the #####
##### email form #####
#####################################
############################################################
############## End Validating the page ################
############## and assign oldsiteid to id ############
############## if no errors ################
############################################################
if ((!$error)&&($oldmemberid)) $id=$oldmemberid;
####################################################################
############## Begin Determining which page loads ################
####################################################################
//echo "Which Page : ".$whichpage."
";
if (!$whichpage)
{
//echo "
it comes here and the value of whichpage is $whichpage
";
//echo "one1"."
";
$whichpage="firstpage";
include "$SERVERPATH/$register_dir/$reg_incl_dir/firstpagecontains.php";
}
else if (($whichpage=="firstpage")&&($gotopage =="secondpage")&&($error))
{
//echo "one2"."
";
$whichpage="firstpage";
include "$SERVERPATH/$register_dir/$reg_incl_dir/firstpagecontains.php" ;
}
else if (($whichpage=="firstpage")&&($gotopage =="secondpage")&&(!$error)&&($finishedsubmit)&&(!$submitbutton))
{
// update the records for the first page and give him a free membership
//echo "one3"."
";
include "$SERVERPATH/$register_dir/$reg_incl_dir/updatefirstpagedata.php" ;
$plan="1~~";
$modeofpayment="notapply";
include "$SERVERPATH/$register_dir/$reg_incl_dir/updatethirdpagedata.php" ;
$whichpage="fourthpage";
include "$SERVERPATH/$register_dir/$reg_incl_dir/fourthpagecontains.php" ;
//include "$SERVERPATH/$register_dir/$reg_incl_dir/secondpagecontains.php" ;
}
else if (($whichpage=="firstpage")&&($gotopage =="secondpage")&&(!$error)&&(!$finishedsubmit))
{
// update the records for the first page
//echo "one4"."
";
include "$SERVERPATH/$register_dir/$reg_incl_dir/updatefirstpagedata.php" ;
//$whichpage="secondpage";
//include "$SERVERPATH/$register_dir/$reg_incl_dir/secondpagecontains.php" ;
if(($old=='y')&&($upgrade=='n'))
{
$go = "Profile updated successfully";
Header ("Location: ../mis/misindex.php?go=$go");
exit;
}
$whichpage="thirdpage";
include "$SERVERPATH/$register_dir/$reg_incl_dir/thirdpagecontains.php" ;
}
else if (($whichpage=="secondpage")&&($gotopage =="thirdpage1")&&(!$error)&&($enteronce))
{
//echo "one5"."
";
// update the records for the first page
//include "$SERVERPATH/$register_dir/$reg_incl_dir/updatefirstpagedata.php" ;
//echo "in the index page line 631 it comes here ";
$whichpage="secondpage";
include "$SERVERPATH/$register_dir/$reg_incl_dir/secondpagecontains.php" ;
//$whichpage="thirdpage";
//include "$SERVERPATH/$register_dir/$reg_incl_dir/thirdpagecontains.php" ;
}
else if (($whichpage=="secondpage")&&($gotopage =="thirdpage")&&(!$error)&&($enteronce))
{
//echo "one6"."
";
// update the records for the second page
//include "$SERVERPATH/$register_dir/$reg_incl_dir/updatesecondpagedata.php" ;
$whichpage="updatesecondpagedata";
$theredirectstring=$rdto."?showthematchlist=".$login;
if ($poid) $theredirectstring .="&id=".$poid;
//echo " in the index page line 644 it comes here ";
?>
//include "$SERVERPATH/$register_dir/$reg_incl_dir/secondpagecontains.php" ;
}
else if (($whichpage=="secondpage")&&($gotopage =="thirdpage")&&($error))
{
//echo "one7"."
";
// update the records for the first page
//include "$SERVERPATH/$register_dir/$reg_incl_dir/updatefirstpagedata.php" ;
$whichpage="secondpage";
include "$SERVERPATH/$register_dir/$reg_incl_dir/secondpagecontains.php" ;
//$whichpage="thirdpage";
//include "$SERVERPATH/$register_dir/$reg_incl_dir/thirdpagecontains.php" ;
}
/*
Murthy Take Care
OM !!!
else if (($whichpage=="thirdpage")&&($gotopage =="fourthpage")&&($error))
{
//echo "one8"."
";
$whichpage="thirdpage";
include "$SERVERPATH/$register_dir/$reg_incl_dir/thirdpagecontains.php" ;
}
else if (($whichpage=="thirdpage")&&($gotopage =="fourthpage")&&(!$error))
{
//echo "one9"."
";
if (trim(strtolower($donotupdate_pg_three))!="yes") include "$SERVERPATH/$register_dir/$reg_incl_dir/updatethirdpagedata.php" ;
$whichpage="fourthpage";
include "$SERVERPATH/$register_dir/$reg_incl_dir/fourthpagecontains.php" ;
}
*/
else if (($whichpage=="thirdpage")&&($gotopage =="fourthpage1")&&($error))
{
//echo "one8"."
";
$whichpage="thirdpage";
//echo "name : ".$name;
include "$SERVERPATH/$register_dir/$reg_incl_dir/thirdpagecontains.php" ;
}
else if (($whichpage=="thirdpage")&&($gotopage =="fourthpage1")&&(!$error))
{
//echo "one9"."
";
if (trim(strtolower($donotupdate_pg_three))!="yes") include "$SERVERPATH/$register_dir/$reg_incl_dir/updatethirdpagedata.php" ;
$whichpage="fourthpage1";
include "$SERVERPATH/$register_dir/$reg_incl_dir/fourthpagecontains.php" ;
}
else if (($whichpage=="fourthpage1")&&($gotopage =="fourthpage")&&(!$error))
{
//echo "one99"."
";
//if (trim(strtolower($donotupdate_pg_three))!="yes") include "$SERVERPATH/$register_dir/$reg_incl_dir/updatethirdpagedata.php" ;
$whichpage="fourthpage";
include "$SERVERPATH/$register_dir/$reg_incl_dir/fourthpagecontains.php" ;
}
// Murthy
else if (($whichpage=="fourthpage")&&($gotopage =="fourthpage")&&(!$error))
{
//echo "one10"."
";
//include "$SERVERPATH/$register_dir/$reg_incl_dir/updatethirdpagedata.php" ;
$whichpage="fifthpage";
include "$SERVERPATH/$register_dir/$reg_incl_dir/fifthpagecontains.php" ;
}
else if (($whichpage=="fourthpage")&&($gotopage =="fourthpage")&&($error))
{
//echo "one11"."
";
//include "$SERVERPATH/$register_dir/$reg_incl_dir/updatethirdpagedata.php" ;
$whichpage="fourthpage";
include "$SERVERPATH/$register_dir/$reg_incl_dir/fourthpagecontains.php" ;
}
else if ($whichpage=="thankyoupage_free")
{
//echo "one12"."
";
$whichpage="thankyoupage_free";
}
else
{
//echo "one13"."
";
// echo " it comes here and the value of submit button is $submitbutton and the value of finished submit is $finishedsubmit";
$whichpage="firstpage";
include "$SERVERPATH/$register_dir/$reg_incl_dir/firstpagecontains.php" ;
// echo " it comes at line 688 of page index and the value of whichpage is $gotopage and enteronce is $enteronce";
}
//$whichpage="thankyoupage_free";
####################################################################
############## End Determining which page loads ################
####################################################################
##############################################################################################
######## Below Routene for Old Members to prefill the fields of this page's form ########
##############################################################################################
if ((!$old)&&(!$prefilledonce))
{
if (strtolower($hoinfo)=="yes")
{
//echo "1";
include "$SERVERPATH/$register_dir/$reg_incl_dir/prefillhoinfo1.php" ;
}
$prefilledonce="y";
}
if((strtolower($old)=="y")&&(trim($id))&&(trim($oldmemberlogin)))
{
if (strtolower($contactinfopg)=="yes")
{
//echo "2";
include "$SERVERPATH/$register_dir/$reg_incl_dir/prefillcontinfo.php" ;
}
if (strtolower($accountinfo)=="yes")
{
//echo "3";
include "$SERVERPATH/$register_dir/$reg_incl_dir/prefillacinfo.php" ;
}
if (strtolower($hoinfo)=="yes")
{
//echo "4";
include "$SERVERPATH/$register_dir/$reg_incl_dir/prefillhoinfo.php" ;
}
if (strtolower($modeofpayment)=="yes")
{
//echo "5";
include "$SERVERPATH/$register_dir/$reg_incl_dir/prefillmodeofpay.php" ;
}
if (strtolower($business_details)=="yes")
{
//echo "6";
include "$SERVERPATH/$register_dir/$reg_incl_dir/prefillbuzdetl.php" ;
}
if (strtolower($details)=="yes")
{
//echo "7";
include "$SERVERPATH/$register_dir/$reg_incl_dir/prefilldeclar.php" ;
}
if (strtolower($typeofemail)=="yes")
{
//echo "8";
include "$SERVERPATH/$register_dir/$reg_incl_dir/prefilltypeofemail.php" ;
}
}
##############################################################################################
######## Above Routene for Old Members to prefill the fields of this page's form ########
##############################################################################################
####################################################################
############## Begin Determining Messages ################
############## to be displayed if any ################
####################################################################
####################################################################
############## End Determining Messages ################
############## to be displayed if any ################
####################################################################
?>