0) { $c=1; foreach ($tree['children'] as $object) { $this_cat_id = $object['values']['cat_id']; if($object['tag'] == 'categorie') { if (!in_array($this_cat_id,$check_main_cat_array)) { array_push($check_main_cat_array,$this_cat_id); array_push($main_cat_array,$object['values']); } } else if($object['tag'] == 'sub_categorie') { $parent_cat_id = $object['values']['parent_cat_id']; if (count($sub_cat_array[$parent_cat_id]) == 0) { $check_sub_cat_array[$parent_cat_id][] = $this_cat_id; $sub_cat_array[$parent_cat_id][] = $object['values']; } else { array_push($check_sub_cat_array[$parent_cat_id],$this_cat_id); array_push($sub_cat_array[$parent_cat_id],$object['values']); } } } } function sanitize_output($buffer) { $search = array( '/\>[^\S ]+/s', // strip whitespaces after tags, except space '/[^\S ]+\','<','\\1'); $buffer = preg_replace($search, $replace, $buffer); $buffer = str_replace('> ','>',$buffer); return $buffer; } function special_fwrite($_this_filename,$_this_content) { /* minimize HTML */ $_this_content = $_this_content; fwrite($_this_filename, $_this_content); } if ($_GET['action'] == 'order') { if ($_GET['add'] != '' || $_GET['del'] != '') { require '/public/sites/www.urbanproof.nl/inc/wholesale-order.php'; } else { exit(); } exit(); } else if ($_GET['action'] == 'orderorder') { if (!isset($_SESSION['order_products'])) { exit(); } require '/public/sites/www.urbanproof.nl/inc/wholesale-order.php'; exit(); } else if ($_GET['action'] == 'getorder') { require '/public/sites/www.urbanproof.nl/inc/wholesale-order.php'; exit(); } if ($_GET['type'] == 'get') { if ($_GET['c'] == '') { exit(); } if ($_GET['h'] == '' && $_GET['p'] == '') { exit(); } require '/public/sites/www.urbanproof.nl/get/products.php'; exit(); } $pageID = ''; $subPageID = ''; $otherPageID = array(); $otherSubPageID = array(); $page = $translate[$lang]['header']['menu']['home']['sec']; if ($_GET['page'] != '') { $page = $_GET['page']; } if ($_GET['subpage'] != '') { $subpage = $_GET['subpage']; } if ($page == $translate[$lang]['header']['menu']['home']['sec']) { $otherPageID['nl'] = $translate['nl']['header']['menu']['home']['sec']; $otherPageID['en'] = $translate['en']['header']['menu']['home']['sec']; $pageID = $translate['home']['id']; } else if ($page == $translate[$lang]['header']['menu']['products']['sec']) { $otherPageID['nl'] = $translate['nl']['header']['menu']['products']['sec']; $otherPageID['en'] = $translate['en']['header']['menu']['products']['sec']; $pageID = $translate['products']['id']; } else if ($page == $translate[$lang]['header']['menu']['catalogue']['sec']) { $otherPageID['nl'] = $translate['nl']['header']['menu']['catalogue']['sec']; $otherPageID['en'] = $translate['en']['header']['menu']['catalogue']['sec']; $pageID = $translate['catalogue']['id']; } else if ($page == $translate[$lang]['header']['menu']['about']['sec']) { $otherPageID['nl'] = $translate['nl']['header']['menu']['about']['sec']; $otherPageID['en'] = $translate['en']['header']['menu']['about']['sec']; $pageID = $translate['about']['id']; } else if ($page == $translate[$lang]['header']['menu']['newsfeed']['sec']) { $otherPageID['nl'] = $translate['nl']['header']['menu']['newsfeed']['sec']; $otherPageID['en'] = $translate['en']['header']['menu']['newsfeed']['sec']; $pageID = $translate['newsfeed']['id']; } else if ($page == $translate[$lang]['header']['menu']['gallery']['sec']) { $otherPageID['nl'] = $translate['nl']['header']['menu']['gallery']['sec']; $otherPageID['en'] = $translate['en']['header']['menu']['gallery']['sec']; $pageID = $translate['gallery']['id']; } else if ($page == $translate[$lang]['header']['menu']['contact']['sec']) { $otherPageID['nl'] = $translate['nl']['header']['menu']['contact']['sec']; $otherPageID['en'] = $translate['en']['header']['menu']['contact']['sec']; $pageID = $translate['contact']['id']; } else if ($page == $translate[$lang]['header']['menu']['storefinder']['sec']) { $otherPageID['nl'] = $translate['nl']['header']['menu']['storefinder']['sec']; $otherPageID['en'] = $translate['en']['header']['menu']['storefinder']['sec']; $pageID = $translate['storefinder']['id']; } else if ($page == $translate[$lang]['header']['menu']['wholesale']['sec']) { $otherPageID['nl'] = $translate['nl']['header']['menu']['wholesale']['sec']; $otherPageID['en'] = $translate['en']['header']['menu']['wholesale']['sec']; $pageID = $translate['wholesale']['id']; } else if ($page == $translate[$lang]['header']['menu']['agents']['sec']) { $otherPageID['nl'] = $translate['nl']['header']['menu']['agents']['sec']; $otherPageID['en'] = $translate['en']['header']['menu']['agents']['sec']; $pageID = $translate['agents']['id']; } else if ($page == $translate[$lang]['header']['menu']['vacancies']['sec']) { $otherPageID['nl'] = $translate['nl']['header']['menu']['vacancies']['sec']; $otherPageID['en'] = $translate['en']['header']['menu']['vacancies']['sec']; $pageID = $translate['vacancies']['id']; } else if ($page == $translate[$lang]['header']['menu']['disclaimer']['sec']) { $otherPageID['nl'] = $translate['nl']['header']['menu']['disclaimer']['sec']; $otherPageID['en'] = $translate['en']['header']['menu']['disclaimer']['sec']; $pageID = $translate['disclaimer']['id']; } else if ($page == $translate[$lang]['header']['menu']['av']['sec']) { $otherPageID['nl'] = $translate['nl']['header']['menu']['av']['sec']; $otherPageID['en'] = $translate['en']['header']['menu']['av']['sec']; $pageID = $translate['av']['id']; } else if ($page == $translate[$lang]['header']['menu']['copyright']['sec']) { $otherPageID['nl'] = $translate['nl']['header']['menu']['copyright']['sec']; $otherPageID['en'] = $translate['en']['header']['menu']['copyright']['sec']; $pageID = $translate['copyright']['id']; } else { $pageID = 'productzzzz'; } //wholesale logout if ($_GET['logout'] == 'true') { session_unset(); session_destroy(); $_SESSION = array(); session_start(); $_SESSION['logout_ws'] = 'You have been logged out of the system.'; header("Location: http://urbanproof.nl/wholesale/",TRUE,301); exit(); } //wholesale register if ($page == $translate[$lang]['header']['menu']['wholesale']['sec']) { /* login */ if ($_POST['formname'] != '' && $_POST['formname'] == 'login_ws') { $_SESSION['WHOLESALE_LOGIN'] = 'false'; $user_a = strip_tags($_POST['username']); /* valkuil */ $user_b = strip_tags($_POST['mail']); $user_c = strip_tags($_POST['password']); if ($user_b == '' || $user_c == '') { exit(); } if ($user_a != '') { exit(); /* valkuil */ } $file = '/public/sites/xml/urban/whole_sale_login.xml'; $tree = xml_get_tree($file); $tree = xml_condense_tree($tree); $users_array = array(); $check_users_array = array(); if (count($tree['children']) > 0) { $c=1; foreach ($tree['children'] as $object) { $this_user_active = $object['values']['wholesale_user_active']; if ($this_user_active == '1') { $this_user_email = $object['values']['wholesale_user_email']; if ($user_b == $this_user_email) { $this_user_password = $object['values']['wholesale_user_password']; if ($user_c == $this_user_password) { $_SESSION['WHOLESALE_USER_ID'] = $object['values']['wholesale_user_id']; $_SESSION['WHOLESALE_USER_NAME'] = $object['values']['wholesale_user_contactname']; $_SESSION['WHOLESALE_USER_COMPANY'] = $object['values']['wholesale_user_company']; $_SESSION['WHOLESALE_USER_EMAIL'] = $object['values']['wholesale_user_email']; $_SESSION['WHOLESALE_USER_TYPE'] = $object['values']['wholesale_user_type']; $_SESSION['WHOLESALE_LOGIN'] = 'true'; header("Location: http://urbanproof.nl/wholesale/",TRUE,301); exit(); break; } //if ($user_c == $this_user_password) { } //if ($user_b == $this_user_email) { } //if ($this_user_active == '1') { } //foreach ($tree['children'] as $object) { } //if (count($tree['children']) > 0) { } //if ($_POST['formname'] != '' && $_POST['formname'] == 'login_ws') { /* register */ if ($_POST['formname'] != '' && $_POST['formname'] == 'apply_ws') { $user_a = strip_tags($_POST['name']); $user_b = strip_tags($_POST['mail']); $user_c = strip_tags($_POST['company']); $user_d = strip_tags($_POST['city']); $user_e = strip_tags($_POST['kvk']); $user_f = strip_tags($_POST['website']); $user_g = strip_tags($_POST['retailer_or_distributor']); $user_h = strip_tags($_POST['number_shops']); $user_i = strip_tags($_POST['address']); /* must be empty */ $user_j = strip_tags($_POST['message']); if ($user_a == '' || $user_b == '' || $user_c == '' || $user_d == '' || $user_f == '') { exit(); } if ($user_i != '') { exit(); /* valkuil */ } require "/public/sites/www.urbanproof.nl/inc/send-email.php"; $email_text = ''; $email_text.= ''; $email_text.= ' '; $email_text.= ' '; $email_text.= ' '; $email_text.= ' '; $email_text.= ' '; $email_text.= ' '; $email_text.= ' '; $email_text.= ' '; if ($user_j != '') { $email_text.= ' '; } $email_text.= '
'.WHOLESALE_EMAIL_REGISTER_FIELD_NAME.':  '.$user_a.'
'.WHOLESALE_EMAIL_REGISTER_FIELD_MAIL.':  '.$user_b.'
'.WHOLESALE_EMAIL_REGISTER_FIELD_COMP.':  '.$user_c.'
'.WHOLESALE_EMAIL_REGISTER_FIELD_CITY.':  '.$user_d.'
'.WHOLESALE_EMAIL_REGISTER_FIELD_KVK.':  '.$user_e.'
'.WHOLESALE_EMAIL_REGISTER_FIELD_WWW.':  '.$user_f.'
'.WHOLESALE_EMAIL_REGISTER_FIELD_TYPE.':  '.$user_g.'
'.WHOLESALE_EMAIL_REGISTER_FIELD_NUMS.':  '.$user_h.'
'.WHOLESALE_EMAIL_REGISTER_FIELD_MESS.':  '.$user_j.'
'; $email_text_user = '

'.WHOLESALE_EMAIL_REGISTER_HI.' '.$user_a.',

'; $email_text_user.= '

'.WHOLESALE_EMAIL_REGISTER_TEKST_INTRO.'

'; $email_text_user.= '

'.$email_text.'

'; $email_text_user.= '

'.WHOLESALE_EMAIL_REGISTER_TEKST_OUTRO.'

'; $email_text_user.= '

'.WHOLESALE_EMAIL_REGISTER_BYE.',

'; $email_text_user.= '

Urban Proof

'; $email_text_user.= '

http://urbanproof.nl/

'; $to_name = $user_a; $to_email_address = $user_b; $email_subject = 'Wholesale | Urban Proof'; $from_email_name = 'Urban Proof'; $from_email_address = 'hello@urbanproof.nl'; $email_send = new EmailSend(); $email_send->ActionSendEmail($full_website_url, $to_name, $to_email_address, $email_subject, $email_text_user, $from_email_name, $from_email_address); $_SESSION['apply_ws'] = 'SUCCES-MESSAGE_APPLY-SEND'; header("Location: http://urbanproof.nl/wholesale/",TRUE,301); exit(); } } $link_alternate= ''; if ($_SESSION['lang_code'] == 'en') { $other_lang_url = $full_website_url.'nl/'; if ($otherPageID['nl'] != 'home') { $other_lang_url .= $otherPageID['nl'].'/'; } if ($subpage != '') { $other_lang_url.= ''.$otherSubPageID['nl'].'/'; } //$link_alternate.= ''."\n"; } else { $current_url_nl = $full_website_url.'nl/'.$otherPageID['nl'].''; if ($subpage != '') { $current_url_nl.= ''.$otherSubPageID['nl'].'/'; } //$link_alternate.= ''."\n"; if ($otherPageID['en'] != 'homepage') { $other_lang_url = $full_website_url.''.$otherPageID['en'].'/'; } if ($subpage != '') { $other_lang_url.= ''.$otherSubPageID['en'].'/'; } //$link_alternate.= ''."\n"; } $lang_before = $lang; if ($_GET['ajax'] == 'true') { exit(); } if ($_SERVER['REMOTE_ADDR'] == DEV_IP && $compile_css == 'true') { $get_css_porcessed_url = $full_media_website_url.'css/generate-style-min.php'; $get_css = getexternalcontent($get_css_porcessed_url); } require '/public/sites/www.urbanproof.nl/inc/page_meta.php'; ?>
'; $popups = array(); foreach ($popups as $popuparr) { $popuptitle = $popuparr[0]; $imageurl = $popuparr[1]; echo ''.$popuptitle.''; } $images = array( array('logo-normal',$full_media_website_url_slim.'logo/urban-proof-logo-h40.png'), array('logo-normal',$full_media_website_url_slim.'logo/urban-proof-logo-h80.png'), array('logo-large',$full_media_website_url_slim.'logo/urban-proof-logo-h120.png'), array('logo-large',$full_media_website_url_slim.'logo/urban-proof-logo-h160.png'), ); foreach ($images as $imagearr) { $imagetitle = $imagearr[0];$imageurl = $imagearr[1]; echo ''.$imagetitle.''; } echo ''; ?> */ ?>