/** * * @param Product $product */ function getProduct($product) { echo '<div class="col-md-4 img-portfolio">'; echo '<a href="' . $product->getURL() . '">'; echo '<img class="img-responsive img-hover img-fixed-size" src="' . $product->getMainPicture()->getURL() . '" alt="' . $product->name . '"/>'; echo '</a>'; echo '<h3>'; echo '<a href="' . $product->getURL() . '">' . $product->name . '</a>'; echo '</h3>'; echo '<p>' . $product->getShortDescription() . '</p>'; echo '</div>'; }
<!-- Navigation --> <?php if (!isset($_GET['url'][0])) { http_response_code(404); header("Location: /404"); die; } require_once 'php/classes.php'; require_once 'php/definitions.php'; require_once 'php/authenticate.php'; $product = new Product(); $product->loadByGuid($_GET['url'][0]); $is_still_available = $product->getDateDiff() > 10; set_og_data($_SERVER['REQUEST_URI'], $product->name . " op spullenverloten.nl", "Gratis verloting van: " . $product->name . " op spullenverloten.nl", $product->getMainPicture()->getURL()); $show_user_win = false; $logged_in_user; if (isClientLoggedIn()) { $logged_in_user = new User(); $logged_in_user->loadByGUID($_SESSION['guid']); } if (isset($_GET['url'][1]) && $product->isgone) { if ($_GET['url'][1] == 'c') { if (!isClientLoggedIn()) { $_SESSION[LOGOUTMESSAGE] = "U moet ingelogd zijn om te zien of u gewonnen heeft!"; $_SESSION[LOGINHEADER] = $_SERVER['REQUEST_URI']; header('Location: /login'); die; } else { if ($product->isUserInLottery($logged_in_user) && !$logged_in_user->hasSeenWinMessage($product)) { $logged_in_user->setHasSeenWinMessage($product); $show_user_win = true;