Exemplo n.º 1
0
Arquivo: buy.php Projeto: skin/planty
<?php

session_start();
require 'inc/database.php';
require 'inc/commons.php';
checkUserLoggedIn();
include 'inc/header.php';
$friend = getFriend($_GET["friendID"]);
$plant = getPlant($_GET["plantID"]);
?>
<div class="row">

  <div class="large-8 small-12 columns card">

    <div class="titleOnCard">
      Your Selection
    </div>
  <ul class="pricing-table">
    <li class="title"><?php 
echo $plant->name;
?>
</li>

    <li class="description">
      <div class="row">
        <div class="large-12 small-12 columns">
              <img src="<?php 
echo getPlantImage($plant->id);
?>
" />
        </div>
Exemplo n.º 2
0
function checkUserLoggedInAndRedirect()
{
    //check session, if not logged in redirect to login page
    if (!defined('USER_SESSION_NOT_REQUIRED') && !defined('IS_EXECUTE_FILE')) {
        if (!checkUserLoggedIn()) {
            echo json_encode(array('logout' => true));
            exit;
        }
    }
}