<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);

session_start();
require(realpath(__DIR__ . '/../../services/Model.php'));
$obj = new Model();
header('Content-Type: application/json; charset=utf-8');

$id = $_POST['reseller_id'];

$reseller = $obj->details_by_cond('_reseller_createuser', "UserId='$id'");
echo json_encode($reseller);
exit;


if (isset($_POST['update'])) {
    
    
    
    
    $form_dataArray = array(
        'FullName' => $_POST['full_name'],
        'UserName' => $_POST['user_name'],
        'Email' => $_POST['email'],
        'MobileNo' => $_POST['mobile_no'],
        'Address' => $_POST['address'],
        'Status' => $_POST['status'],
        'freeday' => $_POST['freeday'],
        'entry_by' => $userId,
        'entry_date' => date('Y-m-d'),
        'update_by' => $userId
    );

    $obj->updateData('_reseller_createuser', $form_dataArray, "UserId='$id'");



    echo json_encode(array('status' => 'success'));
}