<?php if (session_status() != PHP_SESSION_ACTIVE) { session_start(); } include_once $_SERVER['DOCUMENT_ROOT'] . "/eventconfig.php"; include_once CLASSFOLDER . "/dbconnection.php"; include_once CLASSFOLDER . "/common.php"; include_once CLASSFOLDER . "/customer.php"; $customer = new customerclass($dbconnection->dbconnector); switch ($_POST['action']) { /*--------------------------------------------------------------*/ case "savecustomer": if (!empty($_POST['signupdetails'])) { $params = array(); parse_str($_POST['signupdetails'], $params); $response = $customer->saveCustomer($params); if (empty($response['Exception']) && !empty($response['Id'])) { $_SESSION['CUSTOMERID'] = $response['Id']; $_SESSION['start'] = time(); // taking now logged in time $_SESSION['expire'] = $_SESSION['start'] + 1 * 60; echo $response['Id']; } else { echo 0; } } else { echo 0; } break; case "isemailavailable":
<?php include_once $_SERVER['DOCUMENT_ROOT'] . "/eventconfig.php"; include_once CLASSFOLDER . "/dbconnection.php"; include_once CLASSFOLDER . "/customer.php"; $customer = new customerclass($dbconnection->dbconnector); $searchObject = isset($_POST['postvalue']) ? $_POST['postvalue'] : null; if (!empty($searchObject)) { $rows = $searchObject['rows']; $page = $searchObject['page']; } else { $rows = 20; $page = 1; } ?> <div id="gridcontent" class ="content"> <div class="row"> <div class="col-xs-12"> <div class="box"> <div class="box-header"> <h3 class="box-title">Custromers</h3> </div> <div class="box-body"> <div id="example2_wrapper" class="dataTables_wrapper form-inline" role="grid"> <?php $resultSet = $customer->getAllCustomers($page - 1, $rows, null); $totalCustomers = $resultSet['totlaRows']; if ($totalCustomers > 0) { $Items = $resultSet['items'];
<?php include_once $_SERVER['DOCUMENT_ROOT'] . "/eventconfig.php"; session_start(); include_once CLASSFOLDER . "/dbconnection.php"; include_once CLASSFOLDER . "/common.php"; include_once CLASSFOLDER . "/customer.php"; $customer = new customerclass($dbconnection->dbconnector); switch ($_POST['action']) { /*--------------------------------------------------------------*/ case "savecustomer": if (!empty($_POST['signupdetails'])) { $params = array(); parse_str($_POST['signupdetails'], $params); $response = $customer->saveCustomer($params); if (empty($response['Exception']) && !empty($response['Id'])) { $_SESSION['CUSTOMERID'] = $response['Id']; $_SESSION['start'] = time(); // taking now logged in time $_SESSION['expire'] = $_SESSION['start'] + 1 * 60; echo 1; } else { echo 0; } } else { echo 0; } break; case "isemailavailable": if (!empty($_POST['username'])) { $response = $customer->IsEmailExists($_POST['username']);
function GetCustomerById($customerId) { include_once CLASSFOLDER . "/customer.php"; $customer = new customerclass($this->internalDB); return $customer->getCustomerById($customerId); }