<?php  session_start();
 include("../DBConfig/Connection.php"); 
 include("../DBConfig/function.php");
 include("../MobileDetect/Mobile_Detect.php");
 $detect=new Mobile_Detect();
 
 
function generateRandom($length=6)
{
	$_rand_src = array(
		array(48,57) //digits
		//, array(97,122) //lowercase chars
//		, array(65,90) //uppercase chars
	);
	srand ((double) microtime() * 1000000);
	$random_string = "";
	for($i=0;$i<$length;$i++){
		$i1=rand(0,sizeof($_rand_src)-1);
		$random_string .= chr(rand($_rand_src[$i1][0],$_rand_src[$i1][1]));
	}
	return $random_string;
}
 

 

function savelogs($connect,$affiliates_landing_id,$affiliates_landing_affID,$landingPage_id,$action,$trans){
	
	
	
	
	
	$logs=mysqli_query($connect,"insert into affil_landinglogs set affil_landingLogs_date=now(),
affil_landingLogs_affLandID='".$affiliates_landing_id."',
affil_landingLogs_affid='".$affiliates_landing_affID."',
affil_landingLogs_landingID='".$landingPage_id."',
affil_landingLogs_ip='".$_SERVER['REMOTE_ADDR']."'
,affil_landingLogs_sessionid='".session_id()."'
,affil_landingLogs_action='".$action."'
,affil_landingLogs_trans='".$trans."'
"); 

	



	}


 if($_REQUEST['opt']==1){
	 


	 /*
	 0= sucess
	 1= please fill all feilds 
	 2= cant add 
	 3= thank you 
	  4= virification Wrong
	5==  already subscribe  or wrong from JAwwal 
	  */ 
	  
	  if($_REQUEST['optV']==1 && $_REQUEST['vkey']!=''){ 
	  
	  
	 
	  
	  
	  
	  // verification   
	  
	/*  $updateSubscriber=mysqli_query($connect,"update SubscribersLogs set  
	  SubscribersLogs_status=1
	  ,SubscribersLogs_dateVerification=now()
	  where SubscribersLogs_verificationCode='".post($connect,$_REQUEST['vkey'])."' and SubscribersLogs_sessionid='".session_id()."'
	 
	  ");
	  */
	  
	  
	  if($updateSubscriber  || 1==1 ){
		  
		  
		  $sessionID=session_id();
		  if($_REQUEST['fromlink']==1){
			$SelectCodesLink=mysqli_query($connect,"SELECT * FROM `LinksCode` WHERE `LinksCode_code`='".post($connect,$_REQUEST['linkCode'])."' ");

$rowLinkCode=mysqli_fetch_array($SelectCodesLink);
$sessionID=$rowLinkCode['LinksCode_sessionID'];
			  
			  
			  }
		  
		  
		  
		  
		  
		  $selectSubscriberLogs=mysqli_query($connect,"select * from SubscribersLogs
		    where /*SubscribersLogs_verificationCode='".post($connect,$_REQUEST['vkey'])."' and */ SubscribersLogs_sessionid='".$sessionID."'
			and SubscribersLogs_date > date_sub(now(), interval 3 day)
		   ");
		  
		  while($row=mysqli_fetch_assoc($selectSubscriberLogs)){
			  
			  
			  
			  
			  
			  
			  
			  
			 
   require_once('lib/nusoap.php');
  


 $client = new soapclient('http://palsms.ps/APIs/index.php?wsdl', true);
 
  
	 
$proxy = $client->getProxy();
       $resultReturn = $proxy->Subscribtion($row['SubscribersLogs_phone'],'720600','C0f6a8d01e403c7e639c7f73bbd',post($connect,$_REQUEST['vkey']),$_SERVER['REMOTE_ADDR'],'');   
	
	
	$uodateLogs="";
	if($resultReturn=='0'){
		$uodateLogs=" , SubscribersLogs_status=1
		,SubscribersLogs_dateVerification=now()   ";
		}
	
	
			  $uodateLogs=mysqli_query($connect," update SubscribersLogs set 
			  hadaraAPILogs='".$resultReturn."'
			  ".$uodateLogs."
			   where SubscribersLogs_id='".$row['SubscribersLogs_id']."'");
			  
			  
	 
//print_r( $result);

// 0 sucess from jawwal 
// -1 wrong from jawwal 
 
		 // 10 no service 
 // 11 wrong Entry 
  // 12 inserted 
   // 13 cant insert 
   
   
   	  
			  
			  
			  /*
			  
			   $chargingAPI=file_get_contents("http://www.offers.ps/platform/ChargingAPI.php?mobile=".$row['SubscribersLogs_phone']."&servid=".$row['SubscribersLogs_serviceID']."");
			  
			   $return=json_decode($chargingAPI);
	 */
			//  echo("ddddddd".$result."ddd");
			 // sleep(5);
			  $sucessCharging =0;
			  //if($return->return==0){  // charging is successfully 
			  if($resultReturn=='0'    ){ //charging is successfully 
			   $sucessCharging =1;
			  $insertSubs=mysqli_query($connect,"
			  
			  
			  insert into Subscribers set
		    Subscribers_phone='".$row['SubscribersLogs_phone']."',
			 Subscribers_serviceID='".$row['SubscribersLogs_serviceID']."', 
		   Subscribers_landingid='".$row['SubscribersLogs_landingid']."', 
		    
			  Subscribers_affi='".$row['SubscribersLogs_affi']."', 
			Subscribers_verificationCode='".$row['SubscribersLogs_affi']."'/*,
			 Subscribers_status='".$row['SubscribersLogs_status']."'*/
			 ,Subscribers_date=now()
			 ,Subscribers_sessionid='".$row['SubscribersLogs_sessionid']."'
			 ,Subscribers_sessionidExpired='".$row['SubscribersLogs_sessionidExpired']."'
			 ,Subscribers_operatorID='".$row['SubscribersLogs_operatorID']."'
			  ,Subscribers_serviceoperator='".$row['SubscribersLogs_serviceoperator']."'
			  ,Subscribers_sublogid='".$row['SubscribersLogs_id']."'
			  ,Subscribers_affTransID='".post($connect,$_REQUEST['hash'])."'
			  ,Subscribers_status=1
			  
			  
			  
			  ");
			   
			  
			  $selectAffilatesDate=mysqli_query($connect,"SELECT * FROM `affiliates`
			   WHERE  `affiliates_id`='".$row['SubscribersLogs_affi']."' ");
			   $rowAffileData=mysqli_fetch_array( $selectAffilatesDate);
			  
			  //Send To Affiliate Transcation ID
			  
			  
			  $subid=mysqli_insert_id($connect);
			  
			  
			  
			  /* 
			   $returnaff=json_decode($affilAPI);*/
			   
			   
	$conversionLink= $rowAffileData['affiliates_link_conv'];		   
			  $conversionLink=str_replace("{{Hash}}",post($connect,$_REQUEST['hash']) , $conversionLink);
			
			   $affilAPI=file_get_contents($conversionLink );
			  
			   
			   
	 
			  
 $sel=mysqli_query($connect,"insert into `affAPILogs` set 
`affAPILogs_date`=now(), 
`affAPILogs_transID`='".post($connect,$_REQUEST['hash'])."',
`affAPILogs_subID`=". $subid.",
`affAPILogs_subLogID`=".$row['SubscribersLogs_id'].",
`affAPILogs_APIReturn`='".$returnaff->return."'
,affAPILogs_APIReturntext='".$affilAPI."'
,affAPILogs_affid='".$row['SubscribersLogs_affi']."'
");
			  
			  
			 // exit($conversionLink);
			  
			 /* echo($rowAffileData['affiliates_link_conv']."1<br>");
			  ?><img src="http://sign.route-conversion.com/conversion_get/pixel.jpg?kp=jPS2567G0000001003DH0S2ST02OD7WF0TPC1L94872G000602OD700"><?php  
		   echo($affilAPI);
			  exit();	 */ 
			  
			  
			 // echo("subscriber added ");
			 // sleep(5);
			  
			    session_regenerate_id() ;
	  	 go("indexWiPref.php?e=3&L=".post($connect,$_REQUEST['L'])."&A=".post($connect,$_REQUEST['A'])."&hash=".post($connect,$_REQUEST['hash'])."");
	  exit();
	  // suceess 
	  
	  
			  } elseif($resultReturn==11){
			    go("indexWiPref.php?e=4&L=".post($connect,$_REQUEST['L'])."&A=".post($connect,$_REQUEST['A'])."&hash=".post($connect,$_REQUEST['hash'])."");
			    // wrong entry  
			    exit();
			  
			  
			  }else{
				  
				  if($resultReturn=='-1'
				   ){
				   session_regenerate_id() ;
				  }
	  	 go("indexWiPref.php?e=5&L=".post($connect,$_REQUEST['L'])."&A=".post($connect,$_REQUEST['A'])."&hash=".post($connect,$_REQUEST['hash'])."");
				  exit();
				  
				  
				  
				  
				  
				  
				  
				  
				  }
			  
			  
			  
			  
			  
			  
			  
			  
			  
			  }
		  
		  
		  
		  
		  
		  
		  
		  }
	  
	  
	  
	  
	 
	  
	  
	  }else{
		  
		  
		  // add new subscriber 
 
	 
	 if(/*$_REQUEST['prefix']!=0 && */strlen($_REQUEST['mobile'])==8){
		 
		 
		 
		 $Prefix=explode("*",$_REQUEST['prefix']);
		 
		 
		// $phone=$Prefix[1].$_REQUEST['mobile'];
		 $phone="05".$_REQUEST['mobile'];
		 
		 
 $selectOperatiorPrefex=mysqli_query($connect,"SELECT * FROM `operatorprefix`  inner join servicesoperator
on `operatorPrefix_operatorID`=`ServicesOperator_operatorID`
where `ServicesOperator_servicesID`='".$_REQUEST['serviceid']."'
and `operatorPrefix_pref`='".substr($phone,0,3)."'");
 
		 $RowOperatorPrefex=mysqli_fetch_array($selectOperatiorPrefex);
		 
		 if(mysqli_num_rows($selectOperatiorPrefex)==0){
			  	 go("indexWiPref.php?e=3&L=".post($connect,$_REQUEST['L'])."&A=".post($connect,$_REQUEST['A'])."&hash=".post($connect,$_REQUEST['hash'])."");
	  exit();
			 
			 }
		 
		 
		 
		 
		 
		 
		 
		 
	 
$selecLandingPage=mysqli_query($connect,"select * from landingpage
where landingPageCode='".$_REQUEST['landCode']."'");
$rowLadingPage=mysqli_fetch_array($selecLandingPage);


 

 $selectAffileLand=mysqli_query($connect,"select * from affiliates_landing 
 where affiliates_landing_landingId='".$rowLadingPage['landingPage_id']."'
 and affiliates_landing_CodeID='".$_REQUEST['affCode']."'
 
 
 ");

 





if(mysqli_num_rows( $selectAffileLand)==0){
	echo("Wrong Affilites ID");
	exit();
	}

$rowAffile=mysqli_fetch_array($selectAffileLand);
		 
		 
		 
		 
		 
		 
		 
		 
		 
		 
		 
		 
		 
		 
		/* $insert=mysqli_query($connect," insert into affil_landinglogs 
		 set affil_landingLogs_date=now(),
		  affil_landingLogs_affLandID,
		   affil_landingLogs_affid, 
		   affil_landingLogs_landingID, 
		   affil_landingLogs_ip='".$_SERVER['REMOTE_ADDR']."'");*/
		   
		   $insert=mysqli_query($connect," insert into SubscribersLogs set
		    SubscribersLogs_phone='".$phone."',
			 SubscribersLogs_serviceID='".$_REQUEST['serviceid']."', 
		   SubscribersLogs_landingid='".$rowLadingPage['landingPage_id']."', 
		    
			  SubscribersLogs_affi='".$rowAffile['affiliates_landing_affID']."', 
			SubscribersLogs_verificationCode='".generateRandom(6)."',
			 SubscribersLogs_status=0
			 ,SubscribersLogs_date=now()
			 ,SubscribersLogs_sessionid='".session_id()."'
			 ,SubscribersLogs_sessionidExpired=date_add(now(), interval 3 minute)
			 ,SubscribersLogs_operatorID='".$RowOperatorPrefex['ServicesOperator_operatorID']."'
			  ,SubscribersLogs_serviceoperator='".$RowOperatorPrefex['ServicesOperator_id']."'
			  ,SubscribersLogs_affTransID='".post($connect,$_REQUEST['hash'])."'
			  
			  
			 ");
		   
		   
		    
		   
		 if($insert){
			 
			 
			 $linkCode=generateRandom(8);
			 
			 $isertLinksCode=mysqli_query($connect,"insert into `LinksCode`  set `LinksCode_date`=noW(), `LinksCode_code`='".generateRandom(8)."', `LinksCode_link`='".$_SERVER['REQUEST_URI']."'
			 ,LinksCode_sessionID='".session_id()."'
			  ");
			 
			 
			 
			 
			 
			 
			 
			 
			    require_once('lib/nusoap.php');
 $client = new soapclient('http://palsms.ps/APIs/index.php?wsdl', true);
 
  
	 
$proxy = $client->getProxy();
    $result = $proxy->Subscribtion($phone,'720600','C0f6a8d01e403c7e639c7f73bbd','',$_SERVER['REMOTE_ADDR'],$linkCode);  
	
//print_r( $result);
			 
			 
			  $e=0;
			 }else{
				  $e=2;
				 }		 
		 
		 
		 }else{
			 $e=1;
			 }
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 go("indexWiPref.php?e=".$e."&L=".post($connect,$_REQUEST['L'])."&A=".post($connect,$_REQUEST['A'])."&hash=".post($connect,$_REQUEST['hash'])."");
	 
	 
	 
	 
 }
	 
	 
	 
	 
	 
	 
	 
	 
	 }else{
 ?>
 
 
 <?php








$LandingCode=$_REQUEST['L'];
$affiliateID=$_REQUEST['A'];




// get landing data
$selecLandingPage=mysqli_query($connect,"select * from landingpage
where landingPageCode='".$LandingCode."'");

 

$rowLadingPage=mysqli_fetch_array($selecLandingPage);




 
// get affiliate data
 $selectAffileLand=mysqli_query($connect,"select * from affiliates_landing 
 where affiliates_landing_landingId='".$rowLadingPage['landingPage_id']."'
 and affiliates_landing_CodeID='".$affiliateID."'
  ");

 





if(mysqli_num_rows( $selectAffileLand)==0){
	echo("Wrong   ID");
	exit();
	}

$rowAffile=mysqli_fetch_array($selectAffileLand);





// get service Data
$selService=mysqli_query($connect,"  select * from servicesoperator inner join services
 on Services_id=ServicesOperator_servicesID
 inner join landingserviceoperator 
 on landingServiceOperator_serOpID=ServicesOperator_id
where  landingServiceOperator_landingid=".$rowLadingPage['landingPage_id']."
group by 
 Services_id");
 


$rowService=mysqli_fetch_array($selService);










?>

    
    
    
    
    <?php 
 if(!isset($_REQUEST['e'])){
	savelogs($connect,$rowAffile['affiliates_landing_id'],$rowAffile['affiliates_landing_affID']
	,$rowLadingPage['landingPage_id'],"View",post($connect,$_REQUEST['hash']));
 }
	?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="author" content="Khalid Al-araj">
    <title><?php 	echo($rowLadingPage['landingPage_Title']); ?></title>

    <!-- Bootstrap -->
    <link href="../css/landingPage/bootstrap.min.css" rel="stylesheet">
    <!-- style -->
    <link href="../css/landingPage/landing_style1.css" rel="stylesheet">

    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
    
    <style>body{ background-color:<?php 	echo($rowLadingPage['landingPage_BG']); ?>;
	
	}</style>
    
</head>
<body>

<div class="container-fluid">
    <div class="row">
        <div class="col-lg-12">
            <label class="service-label"> <?php 	echo($rowLadingPage['landingPage_Title']); ?></label>
        </div>
    </div>
  <?php /*?>  <div class="row">
        <div class="">
            <img class="img-responsive logo" src="../LandingPageImages/images/logo.png" />
            <div class="pink-line"></div>
            <div class="black-line"></div>
        </div>
    </div><?php */?>
    <div class="row banner">
        <div class="col-xs-12 col-sm-12">
            <div class="image-container">
            
            
            <div id="playvedioDiv"  onClick="playaudi();"> اضغط هنا لتشغيل النكتة</div>
               <img class="img-responsive jw2zna" src="landingPageFiles/<?php  echo($rowLadingPage['landingPage_image']); ?>" /> 
                
                <?php  include("audioVedio.php"); ?>
                
                
                
               <?php /*?> <img class="img-responsive jw2zna img-logo" src="../LandingPageImages/images/huawei.png" /><?php */?>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-xs-12">
           
           
           
           
           
           <?php  
 $selectSubscriber=mysqli_query($connect,"select * from SubscribersLogs
 where SubscribersLogs_sessionid='".session_id()."'
 and SubscribersLogs_sessionidExpired > now()
 ");
 
 if(mysqli_num_rows($selectSubscriber)==0){ 
  ?>
  
  
  
  <script>
  function phonenum(){
  var phone=document.getElementById("mobile").value
// phone='05'+phone;
	 var Message='';
	 if(phone.substring(0, 1)==9){}else{
		// alert('خطا في رقم الهاتف , يجب ان يبدا في 059');
	
		//return false;
		Message=Message + 'خطا في رقم الهاتف , يجب ان يبدا في 059 \n\r';
		
		 
		 }
		 
	   if(phone.length  != 8 )
		{
		//alert('خطا في رقم الهاتف , يجب ان يكون من 8 ارقام');
	Message=Message + 'خطا في رقم الهاتف , يجب ان يكون من 8 ارقام';
		//return false;
		 
		
		 }   
	 if(Message!=''){
		 alert(Message);
		 return false;
		 }
	 
	 
	 
	 
	 
	 
 
	 
	}
	
	
	
	
</script>
  
  
  <label class="service-label" dir="rtl"> <?php  echo($rowLadingPage['landingPage_introText']); ?></label>
    
    
    <form class="form-horizontal service-form" method="post" action="" onSubmit="return phonenum();">
    
     <input type="hidden" name="opt" value="1">
       <input type="hidden" name="landCode" value="<?php echo($rowLadingPage['landingPageCode']); ?>">
       <input type="hidden" name="affCode" value="<?php echo($affiliateID); ?>">
        <input type="hidden" name="hash" value="<?php echo(post($connect,$_REQUEST['hash'])); ?>">
        <input type="hidden" name="serviceid" value="<?php echo($rowService['Services_id']); ?>">
    
    
    
    
    
    
    
    
    
    
                <div class="form-group ">
                    <div class="input-group">
                        <span class="input-group-addon" id="basic-addon1"><?php   
	  /*
	  // get operator prefix 
	  
$selectDate=mysqli_query($connect,"
select 
operatorPrefix_pref,operatorPrefix_operatorID ,Operator_name,ServicesOperator_id

 from landingserviceoperator
inner join landingpage on landingPage_id=landingServiceOperator_landingid
inner join servicesoperator on ServicesOperator_id=landingServiceOperator_serOpID
inner join operator on Operator_id=ServicesOperator_operatorID
inner join operatorprefix on operatorPrefix_operatorID=Operator_id
where landingPage_id='".$rowLadingPage['landingPage_id']."'
group by ServicesOperator_id
");
if(mysqli_num_rows($selectDate)==1){
	$rowPrefix=mysqli_fetch_array($selectDate);
	echo($rowPrefix['operatorPrefix_pref']);
	?>
	<input type="hidden" name="prefix" value="<?php echo($rowPrefix['operatorPrefix_operatorID']); ?>*<?php echo($rowPrefix['operatorPrefix_pref']); ?>*<?php echo($rowPrefix['ServicesOperator_id']); ?>" >
	<?php 
	}else{
 ?>
                        
                        
                        <select name="prefix" id="prefix"     class="selectPrefex">
      <option value="0"> المقدمة </option>
      <?php 


while($rowPrefix=mysqli_fetch_array($selectDate)){
	  
	  ?>
	  <option value="<?php echo($rowPrefix['operatorPrefix_operatorID']); ?>*<?php echo($rowPrefix['operatorPrefix_pref']); ?>*<?php echo($rowPrefix['ServicesOperator_id']); ?>" ><?php   echo($rowPrefix['operatorPrefix_pref']); ?></option>
	  <?php } ?>
      </select>
       <?php }*/ ?>
       
      05
       
       </span>
                        
                        
                        
                        
     
                        
                        
                        
                        
                        
                        
                        
                        
                        
                        
                        <input name="mobile" id="mobile"  type="text" class="form-control service-input"   placeholder="رقم المحمول" maxlength="8">
                    </div>
                    

                </div>
                <button type="submit" class="btn btn-success service-button"><?php echo($rowLadingPage['landingPageSubmitValue']); ?></button>
            </form>
    
    
    
 
  <?php }else{ ?>   
  
   <div class="row">
        <div class="col-xs-12">
            <label class="service-label"> <?php if($_REQUEST['e']==0){ echo($rowLadingPage['landingPage_SubmitMessage']);} ?></label>
            <form class="form-horizontal service-form" method="post" action="">
            
              <input type="hidden" name="opt" value="1">
    <input type="hidden" name="optV" value="1">
     <input type="hidden" name="hash" value="<?php echo($_REQUEST['hash']); ?>">
            
                <div class="form-group ">
                    <?php /*?><label style="float: right" for="code" class="col-sm-2 control-label code-verify-label">كود التفعيل</label><?php */?>
                    <div class="col-sm-12">
                        <input type="text" name="vkey" id="vkey" class="form-control service-input"   maxlength="7" placeholder="كود التفعيل">
                        
                    </div>
                </div>
                <button type="submit" class="btn btn-success service-button">أرسل</button>
               <?php /*?> <div id="timer"></div><?php */?>
            </form>
        </div>
    </div>
<?php /*?>  <script src="../js/countdown.js"></script><?php */?>
  <?php /*?><form id="form2" name="form2" method="post">
    <input type="hidden" name="opt" value="1">
    <input type="hidden" name="optV" value="1">
     <input type="hidden" name="t" value="<?php echo($_REQUEST['hash']); ?>">
      
      <input type="text" name="vkey" id="vkey" class="input"  placeholder="كود التفعيل">
      <input type="submit" name="submit2" id="submit2" value="ارسل" class="inputSubmit">
    </form> <?php */?>
    <?php }  ?>
           
           
           
            <div class="row">
        <div class="col-lg-12">
            <label class="service-label"> 
           <?php  
	
	switch($_REQUEST['e']){
		
	 
		case 1:
		// fill all feilds
		echo("الرجاء ادخل جميع الحقول");
		break;
		case 2:
		// e 
		echo($rowLadingPage['SubmitMessage_eVerificationMEssage']);
		break;
		
			case 3:
		// thank you 
		echo($rowLadingPage['SubmitMessage_thankYouMessage']);
		break;
			case 4:
		// verification Wrong 
		echo($rowLadingPage['SubmitMessage_wrongVerification']);
		break;
		case 5:
		// verification Wrong 
		echo("لا يمكن الاشتراك  ");
		break;
		}
	
	
	 ?> </label>
        </div>
           
           
            <?php /*?><form class="form-horizontal service-form" method="post" action="subscribe.php">
                <div class="form-group <?php echo isset($_SESSION['e']) ? 'has-e' : null?>">
                    <div class="input-group">
                        <span class="input-group-addon" id="basic-addon1">056</span>
                        <input name="mobile" type="text" class="form-control service-input" id="phone-number" placeholder="Mobile Number" maxlength="7">
                    </div>
                    <?php if(isset($_SESSION['e'])):?>
                        <label class="control-label" for="phone-number"><?php echo $_SESSION['e']?></label>
                    <?php endif;?>

                </div>
                <button type="submit" class="btn btn-success service-button">أرسل</button>
            </form><?php */?>
            <div class="row">
                <div class="col-md-6 instructions">
                  <?php if($rowLadingPage['SubmitMessage_unsubmessage']!=''){ ?>  <P><?php 	echo($rowLadingPage['SubmitMessage_pricemessage']); ?></P>
                       <?php }  ?>
                    <?php if($rowLadingPage['SubmitMessage_unsubmessage']!=''){ ?><p class="info-subscribe text-danger">للإلغاء</p>
                    <P> <?php 	echo($rowLadingPage['SubmitMessage_unsubmessage']); ?></P>
                    <?php }  ?>
                   <?php if($rowLadingPage['landingPage_disclamer']!=''){ ?> <a data-toggle="modal" data-target="#roles" href="#">شروط الإستخدام</a><?php }  ?>
                    
                    
                    
                </div>
            </div> 
        </div>
    </div>
    <!-- Modal -->
    <div class="modal fade" id="roles" tabindex="-1" role="dialog">
        <div class="modal-dialog modal-lg" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                     <h4 class="modal-title" id="myModalLabel">شروط الإستخدام</h4> 
                </div>
                <div class="modal-body">
                    <?php 	echo($rowLadingPage['landingPage_disclamer']); ?>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- JQuery -->
<script src="../js/jquery.min.js"></script>
<!-- Bootstrap -->
<script src="../js/bootstrap.min.js"></script>
</body>
</html>
<?php  }  ?>