<?php 	
	include_once("../view/header-footer/header.php");     
	//include_once("Modals.php");  
	include_once("../all-ajax/inner-header.php");  	
	//echo '<pre>';print_r($dtt->ph);
?>       

<script>

login_url_val = "<?php echo $login_url_val;?>";  

$(document).ready(function(){    

if(login_url_val==1)
{ 
	$("#login").modal({
	show: 'true',
	backdrop: 'static',
	keyboard:true
	});  
}

window.add_ph = 0; 
window.addition_ph1_id = '<?php  echo $dt1[0]->id; ?>';
window.addition_ph2_id = '<?php  echo $dt1[1]->id; ?>'; 
window.email1_id = '<?php  echo $dt2->id; ?>';
 
var ph1 = '<?php  echo $dt1[0]->ph; ?>';
var ph2 = '<?php echo $dt1[1]->ph; ?>';
var email1 = '<?php  echo $dt2->email; ?>';  
   
if(ph1!='')
{ 	
	$("#ph1").show();
	window.add_ph++;
}
else 
	$("#ph1").hide();

if(ph2!='')
{
	$("#ph2").show();
	window.add_ph++;
}
else 
	$("#ph2").hide();

if(email1!='')
	$("#email1").show();
else 
	$("#email1").hide();          
});

function del_addition_data(val,type)
{
	if(type==1)
		var r = confirm("Do you really want to delete phone  no !"); 
	
	if(type==2)
		var r = confirm("Do you really want to delete email  no !"); 
	
	if (r == true) {    
			$.ajax({
			type: 'POST',
			url: URL+"/all-ajax/MyDetails.php",
			//async: false,			 
			data: {del_addition_details:1,val:val,type:type},	  
			success: function(ajaxresult){	     
				location.reload();	 	
			},
			error: function(XMLHttpRequest, textStatus, errorThrown) { 
			alert('Error');
			}
			});  
		}	
	
}     
</script>
<script type="text/javascript" src="<?php echo ROOTPATH;?>/view/js/tab/MyDetails.js"> </script>          
<div id="body">
<div class="wrapper">
	<div class="bradeCrubs">
<a href="<?php echo ROOTPATH;?>">Home</a>
<a href="<?php echo ROOTPATH;?>/MyDetails/" class="current">My Account</a> 
</div>
	
	<?php include_once("side-menu.php");  ?> 
    <div id="dataRight">
    	 
	    	<ul class="resList">
<li>
  	<!--<h3 class="postJob">My Alert</h3> -->
	<div class="row">
	<form method="post" id="profilefrm" action="<?php echo ROOTPATH;?>/MyDetails/default.php" autocomplete="off" >
	<div class="col-sm-6">
<b class="addCOnt">Contact Numbers</b>

<?php if((empty($dt1[0]->ph)) && (empty($dt1[1]->ph))) {  ?><a class="addButt btn" name="addmore" onclick="addMoreRows(1);">Add more</a> <?php } ?>
<div class="botLine"> 
	<input class="num" type="text" placeholder="Mobile NO" name="main_ph"  id="main_ph" value="<?php echo $dtt->ph;?>" />
	<span class="verified" id="">Verified</span>
	<!--<span class="del">Del</span>-->
</div> 
 
<div class="botLine" id="ph1"> 
	<input class="num" type="text" placeholder="Additional Mobile NO" id="phno1"  name="addition_ph1" value="<?php echo $dt1[0]->ph;?>"  />
	<span class="del" onclick="del_addition_data(<?php echo $dt1[0]->id;?>,1)">Del</span>
	 
	<?php if($dt1[0]->verified==0) { ?>
	<a href="javascript:void(0);" class="del" onclick="varify_mobiles(1,<?php echo $dt1[0]->ph;?>)" > 
		 Pending </a> 
		<?php } else { ?>
		<span class="verified">Verified </span>
		<?php } ?>  
		 
</div>
  
<div class="botLine" id="ph2"> 
	<input class="num" type="text" placeholder="Additional Mobile NO" name="addition_ph2" id="phno2"   value="<?php echo $dt1[1]->ph;?>" />
	<span class="del" onclick="del_addition_data(<?php echo $dt1[1]->id;?>,1)">Del</span>
	<?php if($dt1[1]->verified==0) { ?>
	<a href="javascript:void(0);" class="del" onclick="varify_mobiles(2,<?php echo $dt1[1]->ph;?>)" > 
		 Pending </a> 
		<?php } else { ?>
		<span class="verified">Verified </span>
		<?php } ?> 
</div>
 

<div id="addedRows"></div>

<div class="botLine"> 
<select name="gender">
    <option value="">Please Select Gender</option>
	<option value="1" <?php if($dtt->gender==1) echo "selected=selected";?>>Male</option>
	<option value="2" <?php if($dtt->gender==2) echo "selected=selected";?>>Female</option>
</select>
</div>
<div class="botLine"> 
	<textarea class="num" placeholder="Address" name="address"><?php echo $dtt->address;?></textarea>
</div>
<div class="botLine"> 
	<select class="wtInput" name="blood_group">
	 <option value="0" <?php if($dtt->blood_group==0) echo "selected=selected";?>>Please Select Blood Group</option>
	 <option value="1" <?php if($dtt->blood_group==1) echo "selected=selected";?>>A+</option>
	 <option value="2" <?php if($dtt->blood_group==2) echo "selected=selected";?>>A-</option>
	 <option value="3" <?php if($dtt->blood_group==3) echo "selected=selected";?>>B+</option>
	 <option value="4" <?php if($dtt->blood_group==4) echo "selected=selected";?>>B-</option>
	 <option value="5" <?php if($dtt->blood_group==5) echo "selected=selected";?>>AB+</option>
	 <option value="6" <?php if($dtt->blood_group==6) echo "selected=selected";?>>AB-</option>
	 <option value="7" <?php if($dtt->blood_group==7) echo "selected=selected";?>>O+</option>
	 <option value="8" <?php if($dtt->blood_group==8) echo "selected=selected";?>>O-</option>
  </select>
</div>
	</div>
	<div class="col-sm-6">
<b class="addCOnt">Email Addresses</b>
<?php if(empty($dt2->email)) {  ?> <a class="addButt btn" name="addmoreemail" onclick="addMoreRows(2);">Add more</a> <?php } ?> 
<div class="botLine"> 
	<input class="num" type="text" placeholder="Email" name="email"  id="email" value="<?php echo $dtt->email;?>" />
	<span class="verified">Verified</span>
	
	<!--<span class="del">Del</span>-->	
</div>

<div class="botLine"  id="email1"> 
	<input class="num" type="text" placeholder="Email" name="email1" id="more_email"   value="<?php echo $dt2->email;?>" />
	<span class="del" onclick="del_addition_data(<?php echo $dt2->id;?>,2)">Del</span>
	<?php if($dt2->verified==0) { ?>
	<a href="javascript:void(0);" class="del" id="verify_email"> 
		 Pending </a> 
		<?php } else { ?>
		<span class="verified">Verified </span>
		<?php } ?> 	
</div>
 
<div id="addedemailRows"></div> 
<div class="botLine"> 
 <input class="comboText" type="text" placeholder="Age" name="age" id="age" value="<?php echo $dtt->age;?>" />
</div>
	</div>
	<div class="col-sm-6">
      <div class="clear" style=" margin-bottom:15px;"></div>	
	<div class="comboOut"> 		
		<input class="comboText" type="text" placeholder="city" name="profile_city_search"  id="profile_city_search" value="<?php echo $dtt->city;?>" />	
		   <ul>
					<?php 
					$stmt =  $conn->prepare("select id,name from all_cities order by  state_code desc ");          
					$stmt->execute();   
					$city_id = $stmt->fetchAll(PDO::FETCH_OBJ);					
					foreach($city_id as $dt)
					{
					?>
					<a href="javascript:void(0)">
						<li onclick="select_city_locs('<?php echo $dt->name;?>',<?php echo $dt->id;?>)" ><?php echo $dt->name;?></li> 
					</a>
				<?php } ?>
			</ul> 
		  </div>
		  <div id="profilecitysearch-ajax"></div> 
		  <input type="hidden"     name="city_search_cityid_hidden" id="city_search_cityid_hidden"  value="<?php echo $_COOKIE['site_city'];?>" />&nbsp;&nbsp;&nbsp;&nbsp;
	</div>  
	<div class="clear" style=" margin-bottom:15px;"></div>
	<input type="submit" class="btn" name="submit" value="Update profile" />
	<a data-toggle="modal"  class="btn btn-blk" data-target="#changepassword" class=" btn applyButt">Change password</a>
	</form>	
	</div>
   
</li> 
        </ul>
	<div class="row">
		<div class="col-md-4">
			<div class="innBoxes">
				<h2>My Free Ads</h2>
				<span><?php echo $query_result ?></span>
				<ul>
					<!--<li>Lorem ipsun <em>3</em></li>-->
					<li>My Active Ads <em><?php echo $query_result ?></em></li>
					<li>My Expired Ads <em></em></li>
				</ul>
				<a herf="#" class="btn fullButt">Manage My Ads</a>
			</div>
		</div>
		<div class="col-md-4">
		<div class="innBoxes">
				<h2>My Free Ads</h2>
				<span>04</span>
				<ul>
					<li>Lorem ipsun <em>3</em></li>
					<li>Lorem ipsun <em>3</em></li>
					<li>Lorem ipsun <em>3</em></li>
				</ul>
				<a herf="#" class="btn fullButt">Button Value</a>
			</div>
		</div>
		<div class="col-md-4">
		<div class="innBoxes">
				<h2>My Free Ads</h2>
				<span>04</span>
				<ul>
					<li>Lorem ipsun <em>3</em></li>
					<li>Lorem ipsun <em>3</em></li>
					<li>Lorem ipsun <em>3</em></li>
				</ul>
				<a herf="#" class="btn fullButt">Button Value</a>
			</div>
		</div>
	</div>	
		
    </div>
<div class="clear"></div>
</div>
<br>

<!-- Modal -->
<div class="modal fade" id="changepassword" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog " role="document">
<div class="modal-dialog" role="document">
    <div class="modal-content">
	  <form method="post" id="changepwd_frm" action="<?php echo ROOTPATH;?>/MyDetails/default.php" autocomplete="off">
	 <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">Change Password</h4>
      </div>
      <div class="modal-body">	  		
		<div class="row">
		<div class="col-md-6">
     	<input class="loginInput" type="password" placeholder="Old Password" name="oldpassword"  id="oldpassword" value="" />	
		</div>
		<div class="col-md-6">
		<input class="loginInput" type="password" placeholder="New Password" name="newpassword"  id="newpassword" value=""  />
        </div>
		<div class="col-md-6">		
		<input class="loginInput" type="password" placeholder="Confirm Password" name="confirmpassword"  id="confirmpassword" value=""  />		
		</div>
				
		</div>
      </div>
      <div class="modal-footer textLeft">
	    <button type="button" class="btn btn-blk" data-dismiss="modal">Close</button>		
		<input type="submit" class="btn" name="change_pwd"  value="Save" />	
        <span> Beware of fraud agents! do not pay money to get a job</span>
       <em>Quikr will not be responsible for any payment made to a third-party. All Terms of Use are applicable. </em>
	   
	   
      </div>	
   </form>	  
    </div>
  </div>
  </div>
</div>


	<!-- Modal -->
<div class="modal fade" id="verify-mobile-model" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog " role="document">
<div class="modal-dialog" role="document">
    <div class="modal-content">
	  <form method="post" id="verifiedemail_frm"  autocomplete="off" action="">	
      <div class="modal-body">	   		
		<div class="row">
		<div class="col-md-6">
     	<input class="loginInput" type="text" placeholder="Entere OTP" name="entered_opt_for_mobile"  id="entered_opt_for_mobile"/>	
		</div> 
		</div>
      </div>
      <div class="modal-footer textLeft">
	    <button type="button" class="btn btn-blk" data-dismiss="modal">Close</button> 
		<input class="btn btn-primary" type="button"  value="Submit"  id="submit_mob_otp" />
       <span> Beware of fraud agents! do not pay money to get a job</span>
       <em>Quikr will not be responsible for any payment made to a third-party. All Terms of Use are applicable. </em>
	   
	   
      </div>	
   </form>	  
    </div>
  </div>
  </div>
</div>




</div>


<script type="text/javascript" src="<?php echo ROOTPATH;?>/view/js/tab/MyDetails.js"> </script>
 

<?php include_once("../view/header-footer/footer.php");  