<?php $get = Core\Input::get(); $post = Core\Input::post(); ?> <!DOCTYPE html> <html lang="en"> <?php require_once __DIR__ . '/components/head.php'; require_once __DIR__ . '/components/header.php'; ?> <body> <?php $page = 'details'; $referrerPage = isset($get['referrer']) ? $get['referrer'] : 'home'; ?> <div class="container"> <div class="row contactTitleBox"> <div class="col-md-4"> <h4><strong>Manage Your Account</strong></h4> </div> <div class="col-md-8"> <ul class="nav nav-tabs navbar-right"> <li role="presentation"><a href="/~<?php echo USER; ?> /index.php/PetBasket/contactUpdate">Update Info</a></li> <li role="presentation" class="active"><a href="#">My Pets</a></li> <li role="presentation"><a href="/~<?php echo USER; ?>
public static function updateEmail() { $error = array('status' => 0, 'msg' => ''); $post = Core\Input::post(); if (isset($post['email']) && isset($_SESSION["user"])) { $user = User::constructById($_SESSION["user"]); if ($user !== null) { $user->getEmail(); $user->update(); } else { $error['status'] = 1; $error['msg'] = "User not found: " . $_SESSION["user"]; } } else { $error['status'] = 1; $error['msg'] = "User not logged in"; } ob_start(); require VIEWS_PATH . '/contactUpdate.php'; return ob_get_clean(); }
<?php $get = Core\Input::get(); $post = Core\Input::post(); ?> <!DOCTYPE html> <html lang="en"> <?php require_once __DIR__ . '/components/head.php'; require_once __DIR__ . '/components/header.php'; ?> <body> <div class="container"> <?php $page = 'details'; $get = Core\Input::get(); $referrerPage = isset($get['referrer']) ? $get['referrer'] : 'home'; $modalTarget = isset($_SESSION["user"]) && $_SESSION["user"] > 0 ? "contactPosterModal" : "loginModal"; $basketModalTarget = isset($_SESSION["user"]) && $_SESSION["user"] > 0 ? "" : "loginModal"; if (isset($passedToView['pet'])) { $pet = $passedToView['pet']; if (isset($pet->images) && $pet->images !== null) { foreach ($pet->images as $image) { if ($image->getFileSize() > 150000) { $thumbnails = $image->getThumbnails(); $imgSrc = '/~' . USER . '/index.php/PetBasket/media?media=' . urlencode($thumbnails->sm->fileName); } else { $imgSrc = '/~' . USER . '/index.php/PetBasket/media?media=' . urlencode($image->getFileName()); } $name = $pet->getName(); $weight = $pet->getWeight();