<?php

/* ============================================
  HERE THE PUBLIC CONFIG THE RELATE THE SMARTY
  WITH CONTROLLER AND VIEWS.
  ============================================ */

error_reporting(E_ERROR);
//the path of the folder that contains all files
//for templates
//to check if it from the folder or from .htaccess
if ($showoutside == 1) {
    $path = "views/default";
} else {
    $path = "../views/default";
}



//if($showoutside == 1)
//{
//	$path = "views/v1";
//}
//else
//{
//	$path = "../views/v1";
//}
//use smarty template , it will found in public folder
require_once('libs/Smarty.class.php');

//use smarty paginate to paging the records from db
require_once('libs/SmartyPaginate.class.php');

//use trucate method to munipliate the restore data
require_once('libs/modifier.mb_truncate.php');

//use smarty as instance
$smarty = new Smarty();
//$smarty->template_dir = '../views/v1';
$smarty->template_dir = '../views/default';
$smarty->compile_dir = '../temp';


//send variable path to views
$smarty->assign("path", $path);
?>