f<?php 
	include_once("../view/header-footer/header.php");     
	include_once("../all-ajax/inner-header.php");
?>
<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
	});  
}


$("#results").load("alertLoad.php"); //load initial records    
//executes code below when user click on pagination links
$("#results").on( "click", ".pagination a", function (e){
	e.preventDefault();
	$(".loading-div").show(); //show loading element

	var page = $(this).attr("data-page"); //get page number from link  
	$("#results").load("alertLoad.php",{"page":page}, function()
	{ //get content from PHP page
		$(".loading-div").hide(); //once done, hide loading element
	});
});


	/*$("#create_alert_job").submit(function(event)  // on click on this id...we will do folowwings
	{
	  if ($('#create_alert_job').valid())  
	  {    
            var formData = $('#create_alert_job').serialize();  // i have taken all form in serialized format here...
    		$.ajax({	
    		type: "POST",
    		url: '../all-ajax/MyDetails.php', 
    		data: {create_job_alert:1,formData:formData},	
    				beforeSend: function(){
    				},
    				success: function(data){
                    
    		    }  
    		});   
		}
		event.preventDefault();  // this is help to prevent from submit 
	});*/
	
	$("#create_alert_job").submit(function(event)  // on click on this id...we will do folowwings
	{
	   if ($('#create_alert_job').valid())  
	   {  
    		$.ajax({	
    		type: "POST",
    		//url: '../all-ajax/MyDetails.php', 
    		url: URL+"/custom_function/EmailConfigure.php",
    		data: {submit_alert:1,search_city_hidden:$("#search_city_hidden").val(),select_city:$("#select_city").val(),job_category:$("#job_category").val(),type:$("#type").val(),locations_val:$("#locations_val").val(),job_cat_val:$("#job_cat_val").val()},	
    				beforeSend: function(){
    				},
    				success: function(data)
    				{
                        if(data==1)
                        {
                           $("#locality_placed").html("");
                           $("#locations_val").val("");
                           $("#job_cat_val").val("");
                           $("#job-category").val("");
                           $("#create_alert_error").html("This job alert already created");
                           $("#create_alert").modal({
                        	show: 'true',
                        	backdrop: 'static',
                        	keyboard:true
                          });
                        }
                        else if(data==0)
                        {
                           location.href=URL+'/MyDetails/all-alerts.php';
                        }
    		        }  
    		});   
		}
		event.preventDefault();  // this is help to prevent from submit 
	});
    
});      



</script>

<div id="body" class="grey-bg">
<div class="wrapper">
	<div class="bradeCrubs">
	<a href="<?php echo ROOTPATH;?>">Home</a>
	<a href="<?php echo ROOTPATH;?>/MyDetails/">My Account</a>
	<a href="<?php echo ROOTPATH;?>/MyDetails/all-alerts.php" class="current">Alerts</a>
	</div>   
		<div class="welcome-menu">
		<?php include_once("side-menu.php");  ?> 
		</div>
		<div class="col-md-10 newRigth row">
           <div class="col-md-7 plr">
		    <div class="white-box">
    <div id="dataRight" class="leftDataSpc">
    <div class="leftHead pdlr7">My Alert (<?php echo $alert_count;?>)</div> 
	<!--<a href="javascript:void(0)" class="rightLink">Create New Alert</a>-->
	<!--<a data-toggle="modal" id="create_new_alert" data-target="#create_alert" class="rightLink" href="javascript:void(0);">Create New Alert</a>-->
	<a id="create_new_alert" class="rightLinkAlert btn applyButt" href="javascript:void(0);"><b>Create New Alert</b></a>
	<ul class="res-List job-box">
<li>
	<!--<h3 class="postJobMin"><a class="btn" href="javascript:void(0)">All Alert</a></h3>
	<h3 class="postJobMin"><a class="btn btn-blk" href="javascript:void(0)">Matching ads</a></h3>-->	
	<div class="alertOut pdlr7">
	<div class="alertDiv1">
		<h3 class="alertHead">Alert Name</h3>
	 
	</div>
	<div class="alertDiv2">
		<h3 class="alertHead">Date</h3>
 
	</div>
	<div class="alertDiv3">
		<h3 class="alertHead">Actions</h3> 
	</div>
	</div> 
	<p class="selectAll job-filter">
		<span><input type="checkbox" id="select-all" class="p0 m0"> &nbsp; Select All </span>
		<!--<span class="selectCount">0</span>-->
		<span class="selectDelete">Delete</span>
	</p>
	
		<div class="loading-div"><img src="<?php echo ROOTPATH;?>/view/images/ajax-loader.gif" ></div>
    	<span id="results">
    	    <!-- content will be loaded here -->
    	</span>
	
	<div class="clear"></div> 
</li> 
<!-----<li><div style="float:left;margin-top:8px;"><img src="https://mob.netbutterfl/uploads/advertise/job/full-screen/d66fc85d90.jpg" alt="add" class="img-responsive"></div></li>
    ---->    </ul>
    </div>
    <div class="clearfix"></div>
    </div>
           </div>
           <div class="col-md-3 plr">
    <div class="add-box">
		<?php 
           /* foreach($RightImagesResult as $images)
            {  
        ?>  
            <img src="<?php echo ROOTPATH.'/uploads/advertise/service/full-screen/'.$images->name;?>" width="100%"> 
        <?php } */?>  
	</div>
	</div>
    </div>
<div class="clear"></div>

</div>
<br>

</div>


	<!-- Modal -->
<div class="modal fade" id="edit-alert-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">	
      <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">Creat Quick Alert</h4>
        </div> 
	   <div id="placed_alertform"></div> 
	   <div class="modal-footer textLeft">
	   <button type="button" class="btn btn-blk" data-dismiss="modal">Close</button>
	   <input type="submit" name="submit_edit" class="btn btn-primary" value="Update Alert">
       <span> Beware of fraud agents! do not pay money to get a job</span>
       <em><?php echo $SITE_NAME; ?> will not be responsible for any payment made to a third-party. All Terms of Use are applicable. </em>  
      </div>
	  <input type="hidden" name="city_id"   id="city_id"  value="">
	  <input type="hidden" name="alert_id"  id="alert_id"  value="">
	  
	  </form>
    </div>
  </div>
  </div>
</div>


<!-- Modal -->
<div class="modal fade" id="create_alert" 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="create_alert_job"  autocomplete="off" action="<?php echo ROOTPATH;?>/custom_function/EmailConfigure.php">-->
	  <form method="post" id="create_alert_job"  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">Create Alert</h4>
        <h4 class="center"><span id="create_alert_error" style="color:red;"></span>
      </div>
      <div class="modal-body">
	   <p class="minHead">
		<!--<span>Alert</span>
MECHANICAL ELECTRICAL ECE EEE EI CS IT CHEMICAL DIPLOMA DEGREE ENGINEERING JOBS ...-->
		</p>		
		<div class="row">
		<!--<div class="col-md-6">
     	<input class="loginInput" type="text" placeholder="Name" name="apply_name"  id="apply_name" value="<?php echo $login_details->name; ?>" />	
		</div>-->
		<div class="col-md-6">
  		
		<label>Type</label>  
			<select name="type" id="type" class="comboText type"> 
			<option value="3">Full Time</option>
			<option value="2">Part Time</option>
			<option value="1">Work From Home</option>
			<option value="4">Internships</option>
			</select>
 		 
		</div>
		
		<div class="col-md-6">
		<label>Role<span>*</span></label>
			<input type="text" placeholder="Select Role" class="comboText role"  placeholder="E.q. Marketing" id="job-category"  name="job_category">
			<ul id="job-category-sugeetion" class="menu-box-3">
				<?php 
		    	foreach($job_categories as $key=>$dt)
				{   
					$stmt =  $conn->prepare("select  name, id  from sub_job_categories where category_id=:category_id  ");         
					$stmt->bindValue(':category_id', $dt->id, PDO::PARAM_INT); 
					$stmt->execute();   
					$sub_job_categories = $stmt->fetchAll(PDO::FETCH_OBJ);
					
				?> 
					<a href="javascript:void(0)">
						<li onclick="select_role_post_job('<?php echo $dt->name;?>',<?php echo $dt->id;?>)" ><?php echo $dt->name;?></li> 
					</a>
				<?php } ?>
			</ul> 
			<div id="job-category-sugeetion-ajax"></div>
			<input type="hidden"  id="job_cat_val" name="job_cat_val"  value=""/>
        </div>
		
		</div><div class="row">
		
		<div class="col-md-6">
          <label>City  <span> * </span> </label>   
			<input type="text"  placeholder="E.q. Nashik" id="select_city" readonly name="select_city" value="<?php echo $_COOKIE['search_city_name'];?>"  class="comboText local">  
			<ul id="ul-city-id-ajax" class="menu-box-3">
					<?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_sub_loctns('<?php echo $dt->name;?>',<?php echo $dt->id;?>)" ><?php echo $dt->name;?></li> 
					</a>
				<?php } ?>
			</ul> 
				<div id="city-id-ajax"></div> 
			<input type="hidden"  id="search_city_hidden" name="search_city_hidden" value="<?php echo $_COOKIE['search_city_id'];?>"  class="inputText">			
 
		</div>
		
		<div class="col-md-6">
       <label>Job Localities   (Upto 5)</label>
			<input type="text"  placeholder="Optional" id="select-sub-locations" name="select-sub-locations" class="comboText local">
			<ul id="ul-location-ajax" name="sub_location" class="menu-box-3" >
			     
				<?php 
				   
					$stmt =  $conn->prepare("select  location_name, id  from city_lacations   where city_id=:city_id");     
					$stmt->bindValue(':city_id', $_COOKIE['search_city_id'], PDO::PARAM_INT); 
					$stmt->execute();   
					$location_name = $stmt->fetchAll(PDO::FETCH_OBJ); 
                    foreach($location_name as $dt)
					{ 
				?> 
					<a href="javascript:void(0)">
						<li onclick="select_location_post_job('<?php echo $dt->location_name;?>',<?php echo $dt->id;?>)" id="select_location_post_job"><?php echo $dt->location_name;?></li> 
					</a>
				 
				<?php } ?>
				
			 
			</ul>  
			<input type="hidden"  id="locations_val" name="locations_val"  value=""/> 
 
		<div id="job-loction-sugeetion-ajax"></div>  
		</div>
		
		
<div class="col-md-12 ">
    	<span id="locality_placed" class="local-tabs">	</span>	 
</div>
		
		
		<div ></div>
		
		</div>
      </div>
      <div class="modal-footer textLeft">
	    <button type="button" class="btn btn-blk" data-dismiss="modal">Close</button>
        <!--<button type="button" class="btn btn-primary" onclick="apply_for_job();">Save</button>-->
		<input class="btn btn-primary" type="submit" name="submit_alert"  value="Create Alert"  id="submit_job" />
       <span> Beware of fraud agents! do not pay money to get a job</span>
       <em><?php echo $SITE_NAME; ?> 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="check_login_alert" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog " role="document">
    <?php 
    if(isset($_COOKIE["site_custom_id"]))
	{ 
        $stmt = $conn->prepare("SELECT city,age,gender,address,ph FROM users where cust_id=:cust_id"); 
    	$stmt->bindValue(':cust_id', $_COOKIE['site_custom_id'] , PDO::PARAM_STR);  
    	$stmt->execute();   
    	$row = $stmt->fetch(PDO::FETCH_OBJ);
	    if($row->email_varify==0)
	    {
	 ?>
    <div class="modal-content">
	  <!--<form method="post" id="apply_job" 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">Update your Email ID</h4>
      </div> 
     <div class="modal-body">     
        <a href="<?php echo ROOTPATH;?>/MyDetails/" class="btn applyButt" >Update Profile</a>
     </div> 
     <hr/> 
    </div>
    <?php } 
	}
    ?>
  </div>
</div>

<!-- Modal -->
<div class="modal fade" id="job_alert_cnt" 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="alert_job_frm"  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" style="color:red">Kindly contact on customer support number to upgrade limit</h4>
      </div>
      <div class="modal-footer textLeft">
	    <!--<button type="button" class="btn btn-blk" data-dismiss="modal">Close</button>--> 
        <a href="<?php echo ROOTPATH;?>/MyDetails/all-alerts.php" class="btn btn-blk">Back</a>	
        <span> Beware of fraud agents! do not pay money to get a job</span>
       <em><?php echo $SITE_NAME;?> will not be responsible for any payment made to a third-party. All Terms of Use are applicable. </em>
	   
	   
      </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");  