session_start(); ob_start(); include("includes/db.php"); include("includes/countries.php"); require_once("includes/class.reg.php"); //include("includes/general.php"); require_once("includes/seo.php"); // $db->debug_mode=true; // print_r($_SESSION['regdata']); $printurl=$_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]; $printurl=str_replace('&','//',$printurl); $id=isset($_GET['id'])?(($_GET['id']=='logout')?1:$_GET['id']):1; $aid=isset($_GET['aid'])?$_GET['aid']:0; $pg=isset($_GET['pgname'])?$_GET['pgname']:'home'; if($_GET['action']=='activate') { /*$pstat=$db->get_field("select paid from `user` where userid=".$_GET['userid']); if($pstat=='Y') {*/ $sql="update `user` set status='Y' where userid=".$_GET['userid']; $db->query($sql); /*} else {?> }*/ } /*if($_GET['transaction']!='') { if($db->query("update `user` set paid='Y' where userid =".$Nuserid)) { ?> } }*/ if(isset($_POST['hdntotal'])) { for($i=1;$i<=count($provincielist);$i++) { if($_SESSION['REGIS_VALS']['province'.$i]) { $provinadd.=$_SESSION['REGIS_VALS']['province'.$i].","; } } $provinadd=substr($provinadd,0,strlen($provinadd)-1) ; if($provinadd=='') { $provinadd=''; } $catcnt=$db->get_field("select count(*) from `category` where publish=1"); if($catadd=='') { $catadd=''; } for($j=1;$j<=$catcnt;$j++) { if($_SESSION['REGIS_VALS']['categorie'.$j]) { $catadd.="|".$_SESSION['REGIS_VALS']['categorie'.$j]."|,"; } } $catadd=substr($catadd,0,strlen($catadd)-1); $addusrarray=array( "email"=>$_SESSION['REGIS_VALS']['uemail'], "pwd"=>sha1($_SESSION['REGIS_VALS']['pass']), "comp_name"=>$_SESSION['REGIS_VALS']['cmpname'], "comp_name_vis"=>$_SESSION['REGIS_VALS']['cmpvis'], "logo_path"=>$_SESSION['REGIS_VALS']['logo'], "logo_path_vis"=>$_SESSION['REGIS_VALS']['photovis'], "address"=>$_SESSION['REGIS_VALS']['address'], "address_vis"=>$_SESSION['REGIS_VALS']['adresvis'], "postcode"=>$_SESSION['REGIS_VALS']['postcode'], "postcode_vis"=>$_SESSION['REGIS_VALS']['postcodevis'], "city"=>$_SESSION['REGIS_VALS']['city'], "city_vis"=>$_SESSION['REGIS_VALS']['cityvis'], "phone"=>$_SESSION['REGIS_VALS']['phone'], "phone_vis"=>$_SESSION['REGIS_VALS']['phonevis'], "fax"=>$_SESSION['REGIS_VALS']['fax'], "fax_vis"=>$_SESSION['REGIS_VALS']['faxvis'], "mobile"=>$_SESSION['REGIS_VALS']['mobile'], "mobile_vis"=>$_SESSION['REGIS_VALS']['mobilevis'], "internet"=>$_SESSION['REGIS_VALS']['internet'], "internet_vis"=>$_SESSION['REGIS_VALS']['internetvis'], "email_org"=>$_SESSION['REGIS_VALS']['orgemail'], "email_org_vis"=>$_SESSION['REGIS_VALS']['orgemailvis'], "fact_comp_name"=>$_SESSION['REGIS_VALS']['faccmpname'], "contactperson"=>$_SESSION['REGIS_VALS']['cperson'], "fact_address"=>$_SESSION['REGIS_VALS']['factadres'], "fact_postcode"=>$_SESSION['REGIS_VALS']['factpostcode'], "fact_woonplat"=>$_SESSION['REGIS_VALS']['factwoonplat'], "fact_kamer"=>$_SESSION['REGIS_VALS']['Kamer'], "fact_BTW"=>$_SESSION['REGIS_VALS']['BTW'], "fact_email"=>$_SESSION['REGIS_VALS']['factemail'], "province"=>$provinadd, "date"=>date('Y-m-d') ); $usid=$db->insert_get_id($addusrarray,"`user`"); if($_SESSION['REGIS_VALS']['seasonsdate']) { $tmps=explode('-',$_SESSION['REGIS_VALS']['seasonsdate']); $sdate=$tmps[2].'-'.$tmps[1].'-'.$tmps[0]; } if($_SESSION['REGIS_VALS']['seasonedate']) { $tmpe=explode('-',$_SESSION['REGIS_VALS']['seasonedate']); $edate=$tmpe[2].'-'.$tmpe[1].'-'.$tmpe[0]; } $addarray=array( "cat_type"=>$catadd, "userid"=>$usid, "email"=>$_SESSION['REGIS_VALS']['uemail'], "Bedrijfsgegevens"=>$_SESSION['REGIS_VALS']['cmpname'], "description"=>Strings::ConvertTextToHTML($_SESSION['REGIS_VALS']['descn']), "description_vis"=>$_SESSION['REGIS_VALS']['descnvis'], "discounts"=>Strings::ConvertTextToHTML($_SESSION['REGIS_VALS']['discount']), "discounts_vis"=>$_SESSION['REGIS_VALS']['discountvis'], "ses_sdate"=>$sdate, "ses_edate"=>$edate, "ses_vis"=>$_SESSION['REGIS_VALS']['seasonvis'], "openings_vis"=>$_SESSION['REGIS_VALS']['daysvis'], "day1_sdate"=>$_SESSION['REGIS_VALS']['sdate1'], "day1_edate"=>$_SESSION['REGIS_VALS']['edate1'], "day2_sdate"=>$_SESSION['REGIS_VALS']['sdate2'], "day2_edate"=>$_SESSION['REGIS_VALS']['edate2'], "day3_sdate"=>$_SESSION['REGIS_VALS']['sdate3'], "day3_edate"=>$_SESSION['REGIS_VALS']['edate3'], "day4_sdate"=>$_SESSION['REGIS_VALS']['sdate4'], "day4_edate"=>$_SESSION['REGIS_VALS']['edate4'], "day5_sdate"=>$_SESSION['REGIS_VALS']['sdate5'], "day5_edate"=>$_SESSION['REGIS_VALS']['edate5'], "day6_sdate"=>$_SESSION['REGIS_VALS']['sdate6'], "day6_edate"=>$_SESSION['REGIS_VALS']['edate6'], "day7_sdate"=>$_SESSION['REGIS_VALS']['sdate7'], "day7_edate"=>$_SESSION['REGIS_VALS']['edate7'], "site_preview"=>$_SESSION['REGIS_VALS']['siteurl'], "site_preview_vis"=>$_SESSION['REGIS_VALS']['siteurlvis'], "date"=>date('Y-m-d') ); $val=$db->insert_get_id($addarray,"`ads`"); //$db->debug_mode=true; $orderarray=array( "userid"=>$usid, "email"=>$_SESSION['REGIS_VALS']['uemail'], "ord_cat_type"=>$catadd, "ord_province"=>$provinadd, "amount"=>$_POST['hdntotal'], "ord_status"=>0, "date"=>date('Y-m-d h:i:s') ); $val=$db->insert_get_id($orderarray,"`order`"); if($val) {//ideal $_SESSION['amount']=$_POST['hdntotal']; $_SESSION['Newuser']=$usid; $_SESSION['orderid']=$val; if($_POST['ptype']=='invoice') { include("admin/pdfInvoice.php"); $pdfname=create_invoice_test($val,FILE_PATH."pdf_invoice/"); $attach=FILE_PATH.'pdf_invoice/'.$pdfname; include('mail.php');?> } else { ?>