<?php
include("header.php");
?>
 <div class="w3-container  " style='padding:0px'>
   <div class="w3-row" style='padding:0px'>
<div class='w3-col m6 show-large'  style='padding:5px'><br>

		  
		  <form class="w3-container w3-animate-left w3-white w3-round w3-card-2 third"  id='staff_login' style='padding:0px;margin:0 auto;	' method='post' >
  					<div class="w3-container w3-padding w3-card-2 w3-red ">
					  <h3 class='w3-left'>Staff Login </h3>
			</div>

				<div class="w3-container" style='padding:'>
				  <div class="w3-section">
					<label><b>Username</b></label>
					<input class="w3-input w3-border w3-margin-bottom" type="email"  name='user_name'placeholder="Enter Email" required>

					<label><b>Password</b></label>
					<input class="w3-input w3-border" type="password" name='pass' placeholder="Enter Password" required>
					
					<input type='hidden' name='lbtn_action' id='lbtn_action' value='stafflogin' >
					<input type='submit'  value='Login' class="w3-btn w3-green w3-section w3-left">
					<span class='w3-right w3-padding'><input class="w3-check" type="checkbox" > Remember me</span>
				  </div>
				</div>

				<div class="w3-container w3-border-top " style='padding:'>
				    					  <a href='javascript:void(0)' onclick='open_loginfm("new_staff","staff_login")' class='hide w3-hide-large w3-left w3-text-blue w3-padding-16' > New Staff</a>
					
				  <span class="w3-right w3-padding ">Forgot <a href="avascript:void(0)" class='w3-text-red'>password?</span></a></span>
				</div>

		  </form><br>
		  
</div>
 <div class="w3-col m4  w3-right" style='padding:5px'>
			<div class="w3-container w3-white w3-card-4" style='padding:0px'>
					<div class="w3-container w3-padding w3-blue">
					  <h5 class=''>Subscribe For Updates</h5>
					</div>
					<div class="w3-container" style='padding:0px'>
					  <form class="w3-container" style='padding:' id='form-subscribe' method='post'>
						
						<p>
						<label>Email</label>
						<input class="w3-input w3-border" type="eamil" name='user-email' autocomplete=on required>
						</p>
						 
						<p >
						<input type="hidden" name="btn_action" value='Add-Subscriber' id="btn_action" />
						<button type='submit' class="w3-btn-block w3-large w3-red w3-round " >Subscribe</button>
						</p>
					  </form> 
					</div>
			 </div>
		  <br>
		  <div class="w3-card-2 w3-round w3-white w3-padding hide">
			<p>ADS</p>
		  </div>
		  <br>
		  <div class="w3-card-2 w3-round w3-white w3-padding hide">
			<p>ADS
			</div>
			<br>
		  
		  		

</div>


	 
</div>
</div>
<script>
$(document).ready(function(){
	
	$(document).on('submit', '#form-subscribe', function(event){
			event.preventDefault();
			// $('#action').attr('disabled', 'disabled');
			// alert();
			var form_data = $(this).serialize();
			$.ajax({
				url:"../admin/pages/users/user_action.php",
				method:"POST",
				data:form_data,
				success:function(data){
					alert(data);
					document.getElementById("form-subscribe").reset();
				}
			});
		});
	
	
	$(document).on("submit","#staff_login",function(event){
		event.preventDefault();
		
		var form_data=$(this).serialize();
		$.ajax({
				url:"steam_action.php",
				method:"POST",
				data:form_data,
				success:function(data)
				{
				   // alert(data);
					if(data=="success"){
						window.location="../admin/";
					}
					else if(data=="staff"){
						window.location="staff_members.php";
						
					}else{
							alert(data);	
					}	
				}
			})
	})
	
	
	
})
</script>
<?php
include("footer.php");
?>