HEX
Server: Apache
System: Linux 185.122.168.184.host.secureserver.net 5.14.0-570.52.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Oct 15 06:39:08 EDT 2025 x86_64
User: barbeatleanalyti (1024)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: /home/barbeatleanalyti/www/m.beatleanalytics.com/application/views/customer/offers.php
<?php 
	include ('include/header.php');
	
	include ('include/search.php');
?>

<!-------product------->      
<div class="container offers">
  <div class="">
  		<style>
			/*.offer-banner img{filter: blur(1px) grayscale(70%);}
			.offer-banner img:hover{filter:none;} */
		.thank p{
			color:#000 !important;	
			margin:2px auto !IMPORTANT;
		}
        </style>
        
       <?php
	   
		if(isset($offerdata)) { ?>
        <div class="my-offers">
                    <h3>Offer of the day</h3>
		</div>
		<?php if(count($offerdata) > 0) { 
		foreach($offerdata as $key => $val) {
		?>
            <div class="offer-banner">
                   <a href="<?php echo base_url();?>index.php/customer/offers/details/<?php echo $val->offerid?>"><img src="<?php echo base_url();?>assets/offers/<?php echo $val->offer_image?>" /></a>
                   <!--<div class="view-details">
                   <a class="btn btn-info" href="<?php echo base_url();?>index.php/customer/offers/details/<?php echo $val->offerid?>">Details</a>
                   </div> -->
            </div>
		<?php  } }else{ ?>
			<div style="text-align:center;"><h4>No any record found</h4></div>
	<?php	}
		}else if(isset($offerdetails)){ ?>
				<div class="my-offers" style=" text-align:center;">
                    <h3 style="float:left;"><a href="<?php echo base_url();?>index.php/customer/offers"> Back </a>
					</h3>
					<a class="btn btn-info applay-offers" href="<?php echo base_url();?>index.php/customer/offers/offerapply/<?php echo $offerdetails[0]->offerid?>">Applay Offers</a>
                   		<!--<button type="button" class="btn btn-info">Details</button> -->
                    <h3 style="float:right;">Offer details </h3>
				</div>
    		<div class="offer-banner">
                   <img src="<?php echo base_url();?>assets/offers/<?php echo $offerdetails[0]->offer_image?>" />
                   
                                     

            </div>
			<div class="description">
             <h4>Description</h4>
                                    <p><?php echo $offerdetails[0]->description?></p>
                   
                   <h4>Bonus point require</h4>
                   <p class="require-point"><?php echo $offerdetails[0]->spoint." - ".$offerdetails[0]->epoint?></p>
				   
				  
            </div>
        <?php }
		else if(isset($offerappliedsuccessfully)){  ?>
			
            <div class="">
				  <!--<div class="my-offers thank-you">
                    <h3>Thank you !</h3>
                  </div> -->
       <div id="time-display" class="thank">
             
             <?php if($offerappliedsuccessfully['inserted'] == 'Y') { ?>
             <h5><b>THANK YOU ! for you applied offer of the day </b></h5>
             <?php } else if($offerappliedsuccessfully['inserted'] == 'N') {?>
             <h5><b>You allready been applied offer of the day </b></h5>
             <?php } ?>
             <div class="thank-img"> <i style="font-size:50px; color:#217123;" class="fa fa-check" aria-hidden="true"></i>
 <!--<img src="<?php echo base_url();?>assets/customer/img/thanks-hair.png" alt="Scott Stevens" class="img-responsive " /> --></div>
             
             <p>Please show the following token number to counter for the verification.</p>
             <p><b>TOKEN NUMBER<br /><span style="font-size:20px;"><?php echo $offerappliedsuccessfully['tokenid']; ?></span></b></p>
             <h3>Token expiration time <br /><span id="time"></span> minutes!</h3>
             <a class="btn btn-info applay-offers" href="<?php echo base_url();?>index.php/customer/offers"> BACK TO THE OFFERS</a>
       </div>

	
    <!--<div class="col-sm-12 button-login-reset-sign-up-button">
					<table class="thank-btn" style=" width:100%;">
						<tbody>
							<tr>
								<td> 
	                            <a href="<?php echo base_url();?>index.php/customer/product_list" id="signup_btn" class="btn btn-danger small-button" role="button"><i class="fa fa-arrow-left" aria-hidden="true"></i> Back</a>
                                <a href="<?php echo base_url();?>index.php/customer/search_home" id="signup_btn" class="btn btn-danger small-button" role="button"><i class="fa fa-home" aria-hidden="true"></i>Home</a>				
								</td>
							</tr>
						</tbody>
					</table>
					
			</div> -->
    
    
 </div>
            <script>
			//alert('<?php echo date("m-d-Y H:i:s",strtotime($offerappliedsuccessfully['expire_time']))." ".$offerappliedsuccessfully['added_date']?>');
			// Set the date we're counting down to
			var countDownDate = new Date('<?php echo date("m-d-Y H:i:s",strtotime($offerappliedsuccessfully['expire_time']))?>').getTime();
		
			// Update the count down every 1 second
			var x = setInterval(function() {
		
			// Get todays date and time
			var now = new Date().getTime();
			//var now = <?php echo strtotime(date('Y-m-d H:i:s'))?>;

			var xhttp = new XMLHttpRequest();
			  xhttp.onreadystatechange = function() {
				if (this.readyState == 4 && this.status == 200) {
					var now = this.responseText;
				}
			  };
			  xhttp.open("GET", "<?php echo base_url();?>index.php/customer/offers/fetchcurrenttime", true);
			  xhttp.send();
  			
			
			//alert(now);
			
			// Find the distance between now an the count down date
			var distance = countDownDate - now;
			
			//alert(distance);
			
			// Time calculations for days, hours, minutes and seconds
			var days = Math.floor(distance / (1000 * 60 * 60 * 24));
			var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
			var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
			var seconds = Math.floor((distance % (1000 * 60)) / 1000);
			
			// Output the result in an element with id="demo"
			document.getElementById("time").innerHTML = hours + "h "+ minutes + "m " + seconds + "s ";
			
			// If the count down is over, write some text 
			if (distance < 0) {
				clearInterval(x);
				document.getElementById("time-display").innerHTML = '<p><strong>Oops..</strong></p><p><strong>Your token number has been expired</strong></p><p>Please tap on following button and complete the process again to generate a new token number</p><a class="btn btn-info applay-offers" href="<?php echo base_url();?>index.php/customer/offers"> BACK TO THE OFFERS</a>';
			}
		}, 1000);
			
            </script>
            
        <?php } ?>
 </div>
</div>




<style>


</style>
<br><br><br>



<!-------product------->


<script>
	$(window).load(function(){
		loadingFade();
	});
</script>

<?php 
	include ('include/footer.php');
?>