<?php

set_time_limit(0);
ini_set('memory_limit', '-1');
include("config.php");
include("functions.php");
error_reporting(E_ALL);
	$sqlres="SELECT * FROM settings_f WHERE id = 5";
	$queryres=mysqli_query($connect,$sqlres);
	$res_row = mysqli_fetch_array($queryres);
	$sqlres_6="SELECT * FROM settings_f WHERE id = 6";
	$queryres_6=mysqli_query($connect,$sqlres_6);
	$res_row_6 = mysqli_fetch_array($queryres_6);
	
	
	if( ($res_row["value"] == "1" )  && ( $res_row_6["value"] == "locked") )  {
		$sqlupdate2 = "UPDATE settings_f SET value = 'Unlocked' WHERE id =6";
		$resupdate2 = mysqli_query($connect,$sqlupdate2);
		
		$sqlupdate1 = "UPDATE settings_f SET value = '0' WHERE id =5";
		$resupdate1 = mysqli_query($connect,$sqlupdate1);
	}
