SHARE
TWEET

boot.include.php - latest

darryljf Mar 30th, 2020 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. session_start();
  3. // the require_once statement is identical to require except php will check if the file has already,
  4.   // been included, and if so, not include (require) it again
  5.  
  6. require_once(__DIR__.'/config.include.php');
  7. require_once(__DIR__.'/db.include.php');
  8. require_once(__DIR__.'/../vendor/autoload.php');
  9. require_once(__DIR__.'/autoloader.include.php');
  10.  
  11.  
  12. //Setup Smarty
  13. $smarty = new Smarty;
  14. $smarty->setTemplateDir(__DIR__.'/../views')
  15.   ->setPluginsDir(array(__DIR__.'/../smarty/plugins'))
  16.   ->setCompileDir(__DIR__.'/../smarty/templates_c')
  17.   ->setCacheDir(__DIR__.'/../smarty/cache')
  18.   ->setConfigDir(__DIR__.'/../smarty/configs');
  19.  
  20.  
  21. if($_SESSION['is_loggedin']) {
  22.   $User = new User($Conn);
  23.   $active_user_data = $User->getUser($_SESSION['user_data']['user_id']);
  24.   $smarty->assign('user_data',$active_user_data);
  25. }
  26.  
  27.  ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top