<?php include_once $_SERVER["DOCUMENT_ROOT"] . "/app/controller/access.controller.php"; include_once $_SERVER["DOCUMENT_ROOT"] . "/app/model/profile.model.php"; $profile = new Profile(); if (!empty($_POST) && $_SERVER['REQUEST_URI'] != "/search/") { $id = $_SESSION["id"]; if (empty($profile->gimme("name", "id", $id))) { include_once $_SERVER["DOCUMENT_ROOT"] . "/app/model/sign-up.model.php"; $signUp = new signUp(); $signUp->notifySlack($id, $_POST["name"], $_POST["occupation"], $_POST["location"], $_POST["cause"]); } if (!empty($_FILES["photo"]["name"])) { include_once $_SERVER["DOCUMENT_ROOT"] . "/app/model/avatar.model.php"; $avatar = new Avatar(); $avatar->save($_FILES["photo"], $id); } if (isset($_POST["jcrop-x"]) && $_POST["jcrop-w"] != 0) { // Create array to hold jcrop values $jcrop = array(); // Push incoming jcrop values to jcrop[] array_push($jcrop, $_POST["jcrop-x"], $_POST["jcrop-y"], $_POST["jcrop-w"], $_POST["jcrop-h"]); // Get Avatar class so we can crop include_once $_SERVER["DOCUMENT_ROOT"] . "/app/model/avatar.model.php"; $avatar = new Avatar(); $avatar->crop($jcrop, $id); } unset($_POST["jcrop-x"]); unset($_POST["jcrop-y"]); unset($_POST["jcrop-w"]); unset($_POST["jcrop-h"]);
<?php include_once $_SERVER["DOCUMENT_ROOT"] . "/app/controller/access.controller.php"; include_once $_SERVER["DOCUMENT_ROOT"] . "/app/model/sign-up.model.php"; include_once $_SERVER["DOCUMENT_ROOT"] . "/app/model/profile.model.php"; $signUp = new signUp(); if (isset($_POST["email"]) && isset($_POST["password"])) { $email = $_POST["email"]; $hash = password_hash($_POST["password"], PASSWORD_DEFAULT); if ($signUp->emailExists($email)) { $_SESSION["status"] = "It looks like you’re already signed–up. Do you need to <a href=\"\">reset your password</a>?"; header("Location: /join-us/"); } else { // Send the user an email to confirm their email address $signUp->mailConfirmation($email); // Go ahead and get them signed-up and set their identifying number $_SESSION["id"] = $signUp->insertArtist($email, $hash); // Let them know to check for the confirmation email $_SESSION["status"] = "Great! You’re all signed–up. We’ve sent you an email with a link to click so that we can confirm your email address. <i>Be sure and double check your spam folder</i> :)"; // Kick them to edit their profile header("Location: /profile/edit/"); } } else { if (isset($_GET["confirm"])) { $email = $signUp->confirmEmail($_GET["confirm"]); if ($email === null) { $_SESSION["status"] = "We received an unknown confirmation key somehow."; header("Location: /join-us/"); } else { include_once $_SERVER["DOCUMENT_ROOT"] . "/app/model/profile.model.php"; $profile = new Profile();
<?php include_once $_SERVER["DOCUMENT_ROOT"] . "/app/controller/access.controller.php"; include_once $_SERVER["DOCUMENT_ROOT"] . "/app/model/facebook.model.php"; include_once $_SERVER["DOCUMENT_ROOT"] . "/app/model/sign-up.model.php"; $signUp = new signUp(); if ($signUp->emailExists($_POST["user"]["email"])) { include_once $_SERVER["DOCUMENT_ROOT"] . "/app/model/profile.model.php"; $profile = new Profile(); $_SESSION["id"] = $profile->gimme("id", "email", $_POST["user"]["email"]); } else { $facebook = new Facebook(); $id = $facebook->activate($_POST["user"]); $_SESSION["id"] = $id; }