<?php
/**
 * Processing Forget password form data:
 * check data then generate new password and send it through SMPT Email
 *
 * PHP version 7.3
 *
 * @package        SMS
 * @version        Release 1.0.0
 * @create_by      Mohammad aljaouni
 * @create_date    10-08-2020
 * @edited_by      Mohammad aljaouni
 * @last_edit_date 10-08-2020
 * @todo           Nothing
 */
ob_start();
session_start();
$chain = "AWdrh78y892Djk*^523*%$#ghgHGHia&%$*)AsfdsLJnLaad";
include("validateLogin.php");
include("includeInformation.php");
$report_email = "";
$start_ip = "";
$end_ip = "";
$userSender = $_POST["userSender"];
$msgStartForm = $_POST["msgStartForm"];
if(!empty($_POST["start_ip"]))
	$start_ip = $_POST["start_ip"];
if(!empty($_POST["end_ip"]))
	$end_ip = $_POST["end_ip"];
if(!empty($_POST["report_email"]))
	$report_email = $_POST["report_email"];
$active = $_POST["active"];
$queryUpdate = "update `cpanel` SET ";
$queryUpdate.= "start_ip='".$start_ip."',";
$queryUpdate.= "end_ip='".$end_ip."',";
$queryUpdate.= "report_email='".$report_email."',";
$queryUpdate.= "userSender='".$userSender."',";
$queryUpdate.= "active='".$active."'";
$result = mysqli_query($conn, $queryUpdate);
if($result)
{
	header("location:workeSetting.php?res=1");
	exit;
}
else
{
	header("location:workeSetting.php?res=2");
	exit;
}
ob_end_flush();
?>
