} else { echo "Freund muss angegeben werden."; } break; case "changePassword": if (strlen($_REQUEST['newPasswd']) > 0) { changePasswd($_REQUEST['User'], $_REQUEST['Pw'], $_REQUEST['newPasswd']); } else { echo "Neues Passwort muss eingegeben werden."; } break; case "getUserprofile": echo getUserprofileXml($userId); break; case "updateUserProfile": updateUserProfile($userId); break; case "searchUser": $emailSuche = null; $nameSuche = null; $ortSuche = null; if (strlen($_REQUEST['SucheEmailText']) > 0) { $emailSuche = $_REQUEST['SucheEmailText']; } else { if (strlen($_REQUEST['SucheNameText']) > 0) { $nameSuche = $_REQUEST['SucheNameText']; } else { if (strlen($_REQUEST['SucheOrtText']) > 0) { $ortSuche = $_REQUEST['SucheOrtText']; } }
// } // // if($action == 'get_user_id'){ // echo getUserId(); // } if ($action == 'book_ticket') { bookTicket($_GET['flight_id']); } if ($action == 'is_user_logged_in') { echo json_encode(getUserData()); } if ($action == 'edit_user_profile') { editUserProfile(); } if ($action == 'update_user_profile') { updateUserProfile($_GET['phone_num'], $_GET['email']); } if ($action == 'change_password') { changePassword($_GET['old_password'], $_GET['new_password']); } if ($action == 'get_all_flights') { getAdminAllFlights(); } if ($action == 'delete_flight') { deleteFlight($_GET['flight_id']); } if ($action == 'edit_flight') { editFlight($_GET['flight_id'], $_GET['flight_no'], $_GET['flight_from'], $_GET['flight_to'], $_GET['departure_time'], $_GET['arrival_time'], $_GET['price'], $_GET['economy_seats'], $_GET['business_seats']); } if ($action == 'create_flight') { createFlight($_GET['flight_no'], $_GET['flight_from'], $_GET['flight_to'], $_GET['departure_time'], $_GET['arrival_time'], $_GET['price'], $_GET['economy_seats'], $_GET['business_seats']);
<?php include_once "../database.php"; $json = file_get_contents('php://input'); $request = json_decode($json, true); $userid = isset($request["userid"]) ? $request["userid"] : ""; $username = isset($request["username"]) ? $request["username"] : ""; $oldpassword = isset($request["old_password"]) ? $request["old_password"] : ""; $newpassword = isset($request["new_password"]) ? $request["new_password"] : ""; $email = isset($request["email"]) ? $request["email"] : ""; $fullname = isset($request["fullname"]) ? $request["fullname"] : ""; $phoneNo = isset($request["phoneNo"]) ? $request["phoneNo"] : ""; echo json_encode(updateUserProfile($userid, $username, $oldpassword, $newpassword, $email, $fullname, $phoneNo));
require_once DBS_PATH . 'DataHelper.php'; require_once DBS_PATH . 'objDataHelper.php'; require_once INCLUDES_PATH . 'cm_authfunc.inc.php'; require_once INCLUDES_PATH . 'cm_authorize.inc.php'; require_once INCLUDES_PATH . 'common_function.inc.php'; require_once INCLUDES_PATH . 'profile_function.inc.php'; require_once INCLUDES_PATH . 'mail_common_function.inc.php'; if (isset($_REQUEST["action"])) { switch ($_REQUEST["action"]) { case "reset": $formMaps = profile_form_table_map(); $updateparams = getUpdateQueryString($_REQUEST, $formMaps); $result = updateUserProfile($updateparams, $objDataHelper, $strCK_user_id, $_REQUEST["action"]); echo $result; break; case "resetpwd": $formMaps = profile_form_table_map(); $updateparams = getUpdateQueryString($_REQUEST, $formMaps); $result = updateUserProfile($updateparams, $objDataHelper, $strCK_user_id, $_REQUEST["action"]); echo $result; break; case "forgotpwd": //print_r($_REQUEST); $result = forgotPwd($objDataHelper); echo $result; break; } } ?>