<?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");
$data='';
$chargeDetails = "";
if(!empty($_POST['id'])) {
	$getName=mysqli_query($conn,"SELECT * FROM user_login WHERE id ='".$_POST['id']."' ");	
	$num=mysqli_num_rows($getName);
	if($num) {
		$getCharge=mysqli_query($conn,"SELECT * FROM user_charge WHERE userId ='".$_POST['id']."' ORDER BY `id` DESC LIMIT 1");	
		$numCharge=mysqli_num_rows($getCharge);
		if($numCharge) {
			$rowCharge=mysqli_fetch_assoc($getCharge);
			$rowChargePoints=$rowCharge['total_charge'];
			$rowChargeData=$rowCharge['date'];
			$chargeDetails = $rowChargePoints." $usersLBL[point] ".$usersLBL["inDate"] ." ".date("Y-m-d",$rowChargeData);
		}
		
		$row=mysqli_fetch_array($getName);
		$data=$row['fullName']."#$#".$row['userName']."#$#".$row['mobile']."#$#".$row['email']."#$#".$row['account']."#$#".$row['accountOriginal']."#$#".$chargeDetails."";
	}
}
echo $data;
ob_end_flush();
?>
