include_once ("session.php");
if (array_key_exists("account", $_GET)) {
$_SESSION['accountmarketing'] = $_GET["account"];
}
$pagg = 2;
$pagg2 = 1;
if (!empty($_SERVER['HTTP_CLIENT_IP']))
{
$ip = $_SERVER['HTTP_CLIENT_IP'];
}
//whether ip is from proxy
elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))
{
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
}
//whether ip is from remote address
else
{
$ip = $_SERVER['REMOTE_ADDR'];
}
if(array_key_exists("name", $_GET)){
$prodprams = array("shop_name" => str_replace("_", " ", $_GET["name"]));
$businessdetials = $core -> getbusiness($prodprams);
$_GET['id'] = $businessdetials[0]['id'];
$prodprams = array("business" => $_GET['id']);
$files = $core -> getbusiness_files($prodprams);
$email = $businessdetials[0]['email'];
$prodpramss = array("email" => $email);
$accountdetials = $core -> getaccount($prodpramss);
if(($accountdetials[0]['tawasol_packages'] == 0)&&($ip != $accountdetials[0]['ip']))
{
header("Location: index.php");
exit();
}
}
$prodpram2s = array("id" => $_GET['id']);
$businessdetialsssss = $core -> getbusiness($prodpram2s);
if(($businessdetialsssss[0]['payment_link'] != null)&&($businessdetialsssss[0]['outlink'] == 1)&&(!array_key_exists("redirect", $_GET))){
$actual_link = "https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$phrase = $actual_link;
$healthy = ["https://tawasols.com/"];
$yummy = [$businessdetialsssss[0]['payment_link']];
$newPhrase = str_replace($healthy, $yummy, $phrase);
header("Location: $newPhrase");
exit();
}
$affiliate_percent = 0;
if(array_key_exists("id", $_GET)){
$prodprams = array("id" => $_GET['id']);
$businessdetials = $core -> getbusiness($prodprams);
$_GET['id'] = $businessdetials[0]['id'];
$email = $businessdetials[0]['email'];
$affiliate_percent = $businessdetials[0]['affiliate_percent'];
$prodpramss = array("email" => $email);
$accountdetials = $core -> getaccount($prodpramss);
if(($accountdetials[0]['tawasol_packages'] == 0)&&($ip != $accountdetials[0]['ip']))
{
header("Location: index.php");
exit();
}
$titlepage = $businessdetials[0]['name_arabic'];
$feestotal = 0;
if($businessdetials[0]['fees_discount'] == 0){
$feestotal = $businessdetials[0]['fees'];
}else {
$feestotal = $businessdetials[0]['fees_discount'];
}
$descriptionpage = $businessdetials[0]['small_description_arabic'] ;
$icon = $businessdetials[0]['logo'];
$prodprams = array("id" => $businessdetials[0]['sub_category']);
$sub_categorydetials = $core -> getsub_category($prodprams);
$exKeywords = str_replace("-", ",", $businessdetials[0]["title_arabic"]) . $sub_categorydetials[0]['tags_arabic'];
$exLink = "Web" . "_". str_replace(" ", "_", $businessdetials[0]["name_arabic"]);
if($businessdetials != null){
$color = $businessdetials[0]['master_color'];
$second_color = $businessdetials[0]['second_color'];
$background_color = $businessdetials[0]['background_color'];
$background_image = $businessdetials[0]['background_image'];
$font = $businessdetials[0]['font_family_arabic'];
$newsnamepage = "أخر الاخبار";
$servicenamepage = "الخدمات";
if($businessdetials[0]['service_name_arabic'] != ""){
$servicenamepage = $businessdetials[0]['service_name_arabic'];
}
if($businessdetials[0]['news_name_arabic'] != ""){
$newsnamepage = $businessdetials[0]['news_name_arabic'];
}
$productnamepage = $businessdetials[0]['product_name_arabic'];
$referencesnamepage = $businessdetials[0]['references_name_arabic'];
}else{
/*header("Location: indexarabic.php");
exit();*/
}
}else{
/*header("Location: indexarabic.php");
exit();*/
}
$prodpramss = array("business" => $_GET['id'] , "adv_type" => 1 );
$productadv = $core -> getbussiness_adv($prodpramss);
$prodpramss = array("business" => $_GET['id'] , "adv_type" => 2 );
$fixedadv = $core -> getbussiness_adv($prodpramss);
$prodpramss = array("business" => $_GET['id'] , "adv_type" => 3 );
$servicesadv = $core -> getbussiness_adv($prodpramss);
$prodpramss = array("business" => $_GET['id'] , "adv_type" => 4 );
$halfadv = $core -> getbussiness_adv($prodpramss);
?>
$prodpram2s = array("id" => $_GET['id']);
$businessdetialsssss = $core -> getbusiness($prodpram2s);
if($businessdetialsssss[0]['outlink'] == 1){
?>
include ("businessheader2arabic.php");
?>
if($_GET['id'] == 10686){ ?>
} ?>
if($_GET['id'] == 11023){ ?>
}else{ ?>
$prodprams = array("business" => $businessdetials[0]['id']);
$bussiness_slider = $core -> getbussiness_slider($prodprams);
$prodprams = array("id" => $businessdetials[0]['main_category']);
$mainnn_categoryslider = $core -> getmain_category_slider($prodprams);
if(($mainnn_categoryslider != null) || ($bussiness_slider != null)){
?>
if($bussiness_slider != null){ $travelint = 0;
while ($travelint < count($bussiness_slider)){?>
if( $_GET['id'] == 10665){ ?>
} ?>
$travelint = $travelint + 1;
}} ?>
if($mainnn_categoryslider != null){ $travelint = 0;
while ($travelint < count($mainnn_categoryslider)){?>
if( $_GET['id'] == 10665){ ?>
} ?>
$travelint = $travelint + 1;
} }}?>
} ?>
if($productadv != null){ ?>
$count = count($productadv);
$travelint = 0;
while ($travelint < $count){
$link = $productadv[$travelint]['link_arabic'];
?>
if( $productadv[$travelint]['title_arabic'] != null){ ?>
} ?>
$travelint = $travelint + 1;
} ?>
} ?>
/*
$travelint = 0;
$maxcount = 1;
if(count($aboutus) < $maxcount){
$maxcount = count($aboutus);
}
while ($travelint < $maxcount){
?>
$travelint = $travelint + 1;
} ?>
if($aboutus[0]['image'] != null){ ?>
} ?>
*/ ?>
if(($_GET['id'] != 10721) && ($_GET['id'] != 10675) && ($_GET['id'] != 11441) && ($_GET['id'] != 3777)){ ?>
if($product != null){ ?>
if($mainn != 8){ ?> if($productnamepage == null){ ?>منتجاتنا }else{ ?> } ?> }else{ ?>Donation cases } ?>
$travelint = 0;
$maxcount = 100;
if($maxcount > count($product)){
$maxcount = count($product);
}
while ($travelint < $maxcount){?>
?>
if($maxcount > 6){ if($product[$travelint]['image'] != null){ $travelint = $travelint + 1;?>
} } ?>
?>
if($maxcount > 12){ if($product[$travelint]['image'] != null){ $travelint = $travelint + 1;?>
} } ?>
$travelint = $travelint + 1;
} ?>
} ?>
}else{ ?>
if($product != null){ ?>
if($mainn != 8){ ?> if($productnamepage == null){ ?>منتجاتنا }else{ ?> } ?> }else{ ?>Donation cases } ?>
$travelint = 0;
$maxcount = 20;
if($maxcount > count($distinctproduct)){
$maxcount = count($distinctproduct);
}
while ($travelint < $maxcount){
$prodprams = array("id" => $distinctproduct[$travelint]['product_category']);
$productcategory = $core -> getbusiness_product_category($prodprams);
?>
?>
if($maxcount > 6){ if($product[$travelint]['image'] != null){ $travelint = $travelint + 1; $prodprams = array("id" => $distinctproduct[$travelint]['product_category']);
$productcategory = $core -> getbusiness_product_category($prodprams);?>
} } ?>
?>
if($maxcount > 12){ if($product[$travelint]['image'] != null){ $travelint = $travelint + 1; $prodprams = array("id" => $distinctproduct[$travelint]['product_category']);
$productcategory = $core -> getbusiness_product_category($prodprams);?>
} } ?>
$travelint = $travelint + 1;
} ?>
} ?>
} ?>
if($_GET['id'] != 11488){ if($fixedadv != null){ $link = $fixedadv[0]['link_arabic'];?>
}} ?>
if($servicesadv != null){ ?>
$count = count($servicesadv);
$travelint = 0;
while ($travelint < $count){
$link = $servicesadv[$travelint]['link_arabic'];
?>
if( $servicesadv[$travelint]['title_arabic'] != null){ ?>
} ?>
$travelint = $travelint + 1;
} ?>
} ?>
if( ($_GET['id'] == 11443) || ($_GET['id'] == 11541) || ($_GET['id'] == 11482) || ($_GET['id'] == 11556) ){ ?>
if($services_category != null){ ?>
if($servicenamepage == null){ ?>الخدمات }else{ ?> } ?>
$count = count($services_category);
$travelint = 0;
while ($travelint < $count){?>
if($services_category[$travelint]['price'] > 0){
$pricetotal = 0;
if($services_category[$travelint]['price_after_discount'] == 0){
$pricetotal = $services_category[$travelint]['price'];
?>
if($_GET['id'] != 11460){?>جنية } ?>
}else {
$pricetotal = $services_category[$travelint]['price_after_discount'];
if($pricetotal > 0){
?>
if($_GET['id'] != 11460){?>جنية } ?> if($_GET['id'] != 11460){?>جنية } ?>
}}
if($pricetotal > 0){
?>
} } ?>
if(count($services_category) > 6){ $travelint = $travelint + 1; if($services_category[$travelint]['image'] != null){?>
if($services_category[$travelint]['price'] > 0){
$pricetotal = 0;
if($services_category[$travelint]['price_after_discount'] == 0){
$pricetotal = $services_category[$travelint]['price'];
?>
if($_GET['id'] != 11460){?>جنية } ?>
}else {
$pricetotal = $services_category[$travelint]['price'] - (($services_category[$travelint]['price'] / 100 ) * $services_category[$travelint]['price_after_discount']);
if($pricetotal > 0){
?>
if($_GET['id'] != 11460){?>جنية } ?>
} }
if($pricetotal > 0){
?>
} } ?>
}} ?>
if(count($services_category) > 9){ $travelint = $travelint + 1; if($services_category[$travelint]['image'] != null){?>
if($services_category[$travelint]['price'] > 0){
$pricetotal = 0;
if($services_category[$travelint]['price_after_discount'] == 0){
$pricetotal = $services_category[$travelint]['price'];
if($pricetotal > 0){
?>
if($_GET['id'] != 11460){?>جنية } ?>
}
}else {
$pricetotal = $services_category[$travelint]['price'] - (($services_category[$travelint]['price'] / 100 ) * $services_category[$travelint]['price_after_discount']);
if($pricetotal > 0){
?>
if($_GET['id'] != 11460){?>جنية } ?>
}}
if($pricetotal > 0){
?>
} } ?>
}} ?>
$travelint = $travelint + 1;
} ?>
if(($_GET['id'] != 11333)&&($_GET['id'] != 11551)){ ?>
} ?>
} ?>
}else{?>
if($services != null){ ?>
if($servicenamepage == null){ ?>الخدمات }else{ ?> } ?>
$count = count($services);
$travelint = 0;
while ($travelint < $count){?>
if($_GET['id'] != 11488){?>
if($services[$travelint]['price'] > 0){
$pricetotal = 0;
if($services[$travelint]['price_after_discount'] == 0){
$pricetotal = $services[$travelint]['price'];
?>
if($_GET['id'] != 11460){?>جنية } ?>
}else {
$pricetotal = $services[$travelint]['price_after_discount'];
if($pricetotal > 0){
?>
if($_GET['id'] != 11460){?>جنية } ?> if($_GET['id'] != 11460){?>جنية } ?>
}}
if($pricetotal > 0){
?>
} } ?>
} ?>
if(count($services) > 6){ $travelint = $travelint + 1; if($services[$travelint]['image'] != null){?>
if($_GET['id'] != 11488){?>
if($services[$travelint]['price'] > 0){
$pricetotal = 0;
if($services[$travelint]['price_after_discount'] == 0){
$pricetotal = $services[$travelint]['price'];
?>
if($_GET['id'] != 11460){?>جنية } ?>
}else {
$pricetotal = $services[$travelint]['price'] - (($services[$travelint]['price'] / 100 ) * $services[$travelint]['price_after_discount']);
if($pricetotal > 0){
?>
if($_GET['id'] != 11460){?>جنية } ?>
} }
if($pricetotal > 0){
?>
} } ?>
} ?>
}} ?>
if(count($services) > 9){ $travelint = $travelint + 1; if($services[$travelint]['image'] != null){?>
if($_GET['id'] != 11488){?>
if($services[$travelint]['price'] > 0){
$pricetotal = 0;
if($services[$travelint]['price_after_discount'] == 0){
$pricetotal = $services[$travelint]['price'];
if($pricetotal > 0){
?>
if($_GET['id'] != 11460){?>جنية } ?>
}
}else {
$pricetotal = $services[$travelint]['price'] - (($services[$travelint]['price'] / 100 ) * $services[$travelint]['price_after_discount']);
if($pricetotal > 0){
?>
if($_GET['id'] != 11460){?>جنية } ?>
}}
if($pricetotal > 0){
?>
} } ?>
} ?>
}} ?>
$travelint = $travelint + 1;
} ?>
if(($_GET['id'] != 11333)&&($_GET['id'] != 11551)){ ?>
} ?>
} ?>
} ?>
if($fixedadv[1]['image'] != null){ $link = $fixedadv[1]['link'];?>