Exemplo n.º 1
0
<?php

/**
 * Created by PhpStorm.
 * User: Akihiro
 * Date: 16/01/12
 * Time: 15:05
 */
require 'module/module_initialization.php';
if (!isset($_SESSION["user"])) {
    //    header("Location: login.php");
} else {
    $user = $_SESSION["user"];
}
$search_word = null;
if (isset($_POST['search_word'])) {
    $search_word = $_POST["search_word"];
}
require_once "DBAdapter.class.php";
$db = new DBAdapter();
$db->view($search_word);
//$reserves = array();
$reserves = $db->view_result();
//print_r($reserves);
require_once 'smarty-3.1.27/libs/Smarty.class.php';
$smarty = new Smarty();
$smarty->assign('reserves', $reserves);
$smarty->display('view.tpl');