if (isset($_GET["request"]) && isset($_GET["action"])) {
    //get the post vars so we know whats up
    //session_start();
    $user = $_SESSION['user'];
    $user_id = $user['id'];
    $request = $_GET["request"];
    $action = $_GET["action"];
    $cust_id = '';
    $output_arr = array();
    $return_arr = array();
    if (isset($_GET["cust_id"])) {
        $cust_id = $_GET["cust_id"];
    }
    //$cust_id=1;
    // create the objects
    $dbobj = new dbdisplay();
    switch ($request) {
        //display DB result based on flag
        case "list":
            //list info from DB
            $list = $dbobj->getapps($action);
            //Build Buttons
            if (!empty($list)) {
                foreach ($list as $key => $listArray) {
                    //build button
                    $newarray = $listArray;
                    if ($action == 9) {
                        $newarray["button4"] = "<span id='client" . $listArray["cust_id"] . "'></span><input value='Current Balance' class='Availbalance btn btn-lg btn-warning' type='button' id='" . $listArray["cust_id"] . "' />";
                        $newarray["button1"] = "<input data-toggle='modal' href='#form-content' value='Edit' class='lock_item btn btn-lg btn-primary' type='button' id='" . $listArray["cust_id"] . "' />";
                        $newarray["button2"] = "<input value='Reload' class='reload btn btn-lg btn-warning' type='button' id='" . $listArray["cust_id"] . "' />";
                        $newarray["button3"] = "<input value='Disable' class='disable btn btn-lg btn-danger' type='button' id='" . $listArray["cust_id"] . "' />";
<?php 
include '../model/common.php';
include 'classes/dbdisplay.php';
//print_r ($_SESSION);exit;
error_reporting(E_ALL);
if (isset($_GET["leadstatus"]) && isset($_GET["custID"])) {
    $dbobj = new dbdisplay();
    $user = $_SESSION['user'];
    $user_id = $user['id'];
    $finalString = "'" . $user_id . "'," . "'" . $_GET["leadstatus"] . "'," . "'" . $_GET["custID"] . "'";
    try {
        $update = $dbobj->updateLeadStatus($finalString);
        echo $_GET["leadstatus"];
    } catch (Exception $e) {
        echo 'Caught exception: ', $e->getMessage(), "\n";
    }
}