Advertisement
darryljf

boot.include.php

Feb 24th, 2020
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.62 KB | None | 0 0
  1. <?php
  2.  
  3. require_once(__DIR__.'/config.include.php');
  4. require_once(__DIR__.'/db.include.php');
  5. require_once(__DIR__.'/../vendor/autoload.php');
  6.  
  7.  
  8. // Setup Smarty
  9. $smarty = new Smarty;
  10. $smarty->setTemplateDir(__DIR__.'/../views')
  11.   ->setPluginsDir(array(__DIR__.'/../smarty/plugins'))
  12.   ->setCompileDir(__DIR__.'/../smarty/templates_c')
  13.   ->setCacheDir(__DIR__.'/../smarty/cache')
  14.   ->setConfigDir(__DIR__.'/../smarty/configs');
  15.  
  16.  
  17. if($_SESSION['is_loggedin']){
  18.   $User = new User($Conn);
  19.   $active_user_data = $User->getUser($_SESSION['user_data']['user_id']);
  20.   $smarty->assign('user_data', $active_user_data);
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement