<?php
include("config.php");
// ----------- 12aprl2025  sk
  // public function cronblock(){  // 2minut 30 second
       $table =  $_REQUEST['table'];
      $start ="SELECT * FROM ". $table." WHERE id=6 ";
      $start_que_start = mysqli_query($connect,$start);
      $startData = mysqli_fetch_array($start_que_start);
      //echo $startData["value"] ; 
	  if( ($startData["value"] == "Locked" ) || ($startData["value"] == "locked" )){
	     //$sqllock = $this->model->query("UPDATE ". $table." SET value = 'Locked' WHERE id=6");
	      $sqlUpdateSMS = "UPDATE ". $table." SET value = '1' WHERE id=5";
	      //echo $sqlUpdateSMS ; 
	      $queryUpdateSMS=mysqli_query($connect,$sqlUpdateSMS);
	  }
       
  // }
     //public function cronunblock(){  //2minut 45 second
      // $table =  $_REQUEST['table'];
      //$checkdata = $this->model->get_row("SELECT * FROM ". $table." WHERE id=5// ");
	  //if(($checkdata["value"] == "1")){ // if 1 then set 0
	   //   $sqllock = $this->model->query("UPDATE ". $table." SET value = 'Unlocked' WHERE id=6");
	      //$sqloff = $this->model->query("UPDATE ". $table." SET value = '0' WHERE id=5");
	      
	  //}
       
   //}
