getUsers(); }); $app->get('/Users/id/:mid', function ($mid) { getUserDetail($mid); }); $app->get('/Signup/id/:id/pw/:pw/Des/:Des/BDes/:BDes/Loc/:Loc/Icon/:Icon', function () { $uri = $_SERVER['REQUEST_URI']; $arr_items = split('/', $uri); $Icon = $arr_items[count($arr_items) - 1]; $Loc = $arr_items[count($arr_items) - 3]; $BDes = $arr_items[count($arr_items) - 5]; $Des = $arr_items[count($arr_items) - 7]; $pw = $arr_items[count($arr_items) - 9]; $id = $arr_items[count($arr_items) - 11]; //echo $id." ".$pw." ".$Des." ".$BDes." ".$Loc." ".$Icon; Signup($id, $pw, $Des, $BDes, $Loc, $Icon); }); $app->get('/Update/oid/:oid/id/:id/pw/:pw/Des/:Des/BDes/:BDes/Loc/:Loc/Icon/:Icon', function () { $uri = $_SERVER['REQUEST_URI']; $arr_items = split('/', $uri); $Icon = $arr_items[count($arr_items) - 1]; $Loc = $arr_items[count($arr_items) - 3]; $BDes = $arr_items[count($arr_items) - 5]; $Des = $arr_items[count($arr_items) - 7]; $pw = $arr_items[count($arr_items) - 9]; $id = $arr_items[count($arr_items) - 11]; $oid = $arr_items[count($arr_items) - 13]; //echo $id." ".$pw." ".$Des." ".$BDes." ".$Loc." ".$Icon." ".$oid; UpdateInf($oid, $id, $pw, $Des, $BDes, $Loc, $Icon); }); $app->get('/Comment/id/:mid/fid/:fid/Des/:Des/Rating/:rat', function () {
// this is the file for all the AJAX Requests from the contact us page. //these are for the PHP Helper files include 'headers/databaseConn.php'; include 'helpers.php'; if (isset($_GET["no"]) && $_GET["no"] == "1") { // for login Login($_GET["email"], $_GET["pwd"]); } else { if (isset($_GET["no"]) && $_GET["no"] == "2") { // for forgot password ForgotPassword($_GET["pwdName"], $_GET["pwdEmail"]); } else { if (isset($_GET["no"]) && $_GET["no"] == "3") { // for signup Signup($_GET["email"], $_GET["pwd"], $_GET["name"], $_GET["contact"], $_GET["profile"]); } } } // this is the function for the user signup function Signup($email, $pwd, $name, $contact, $profile) { $res = "-1"; $level = GetUserLevel($email); if ($level == "A") { // go to admin table. $signup = SignupUtility($email, $pwd, $name, $contact, $profile, "Admin"); if ($signup == "1") { $res = "A"; } else { if ($signup == "0") {