<?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");
$settingsValues = array(0=>'', 1=>'0');
if(!empty($_POST['id'])) {
	$queryGetSettings = "SELECT `prefix`, `company`,`view` FROM `send_settings` WHERE `id`=$_POST[id]";
	$resultGetSettings = mysqli_query($conn, $queryGetSettings);	
	$numGetSettings = mysqli_num_rows($resultGetSettings);
	if(!empty($numGetSettings)) {
		$rowGetSettings = mysqli_fetch_assoc($resultGetSettings);
		$settingsValues[0] = $rowGetSettings['prefix'];
		$settingsValues[1] = $rowGetSettings['company'];	
		$settingsValues[2] = $rowGetSettings['view'];	
	}
}
echo json_encode($settingsValues);
ob_end_flush();
?>
