<div class="container-responsive noSideMargins"> <?php require_once VIEWS_PATH . '/components/pagingWidget.php'; ?> <div class="row"> <div class="col-sm-3 m-l-1p"> <?php require_once VIEWS_PATH . '/components/filter.php'; ?> </div> <div class="col-sm-8"> <div class="row browseResultsHeader"> <?php if (!isset($passedToView['pets'])) { $passedToView['pets'] = PetBasketController::browse(array('return-php-array' => true)); } else { if (isset($passedToView['pets']) && is_array($passedToView['pets'])) { // Pets created in controller function that required this view } else { $passedToView['pets'] = array(); } } $total = 0; if (isset($passedToView['pets']) && is_array($passedToView['pets'])) { foreach ($passedToView['pets'] as $pet) { $visibility = $pet->getVisibility(); $approved = $pet->getApproved(); if (strtoupper($visibility) !== 'Y' || $approved != 1) { continue; }
/** * Remove Pet From my Pets * @return to myPets ciew */ public static function removeFromMyPets() { $post = Core\Input::post(); if (isset($post['id'])) { $pet = Pet::constructById($post['id']); $pet->setApproved(3); $pet->setVisibility('n'); Model\Pet::updatePet($pet); } return PetBasketController::myPets(); }
//console.log("start"); var petBasket = []; var SHELL_USERNAME = '******'; var user = '******'user']) ? $_SESSION['user'] : ''; ?> '; if (user !== undefined && user !== '') { //throw "exit"; var basketJsonString = <?php echo isset($_SESSION['user']) ? PetBasketController::myPetBasket($_SESSION['user'], 'json') : '[]'; ?> ; petBasket = JSON.parse(basketJsonString); //throw "exit"; makePetBasketItems(petBasket); } else { console.log("no user logged in"); } // return to a particular tab/page after a full request var context = '<?php echo isset($get['context']) ? $get['context'] : null; ?> ';