} elseif (isset($_POST['addNewFeature'])) {
    $desc = $_POST['addNewFeature'];
    addFeature($desc);
    $id = getFeatureID($desc);
    echo $id;
} elseif (isset($_POST['featureID'])) {
    $id = $_POST['featureID'];
    deleteFeature($id);
} elseif (isset($_POST['addNewAdvantage'])) {
    $advantage = $_POST['addNewAdvantage'];
    addAdvantages($advantage);
    $resp['advKey'] = getAdvantageID($advantage);
    echo json_encode($resp);
} elseif (isset($_POST['advID'])) {
    $Aid = $_POST['advID'];
    deleteAdvantage($Aid);
} elseif (isset($_POST['updService'])) {
    $service = $_POST['updService'];
    $price = $_POST['updPrice'];
    $id = $_POST['serviceID'];
    updateServices($service, $price, $id);
} elseif (isset($_POST['addNewService'])) {
    $service = $_POST['addNewService'];
    $price = $_POST['addNewPrice'];
    addCharges($service, $price);
    $id = getServiceID($service, $price);
    echo $id;
} elseif (isset($_POST['ServId'])) {
    $id = $_POST['ServId'];
    deleteService($id);
}
Exemplo n.º 2
0
 $dob = $_POST['dobooking'];
 $date = str_replace('/', '-', $dob);
 date_default_timezone_set('Asia/Dhaka');
 $date = date('Y-m-d', strtotime($date));
 $shift = $_POST['shift'];
 $purpose = $_POST['purpose'];
 $service = '';
 if (!empty($_POST['service'])) {
     $service = implode('|', $_POST['service']);
 }
 $service .= $service == '' ? '1|2' : '|1|2';
 $guest = $_POST['guestNum'];
 if ($guest <= 500) {
     $service .= '|' . getServiceID(500);
 } else {
     $service .= '|' . getServiceID(1000);
 }
 $gate = 0;
 if (isset($_POST['gate'])) {
     $gate = $_POST['gate'];
 }
 $stage = 0;
 if (isset($_POST['stage'])) {
     $stage = $_POST['stage'];
 }
 $setMenu = 0;
 if (isset($_POST['setMenu'])) {
     $setMenu = $_POST['setMenu'];
 }
 $food = '0';
 if (!empty($_POST['food'])) {