<?php

use PhangoApp\WPDO;
use PhaTemplates\Templates;

class TplController {

    public $tpl;
    public $db;

    public function __construct() {
    
        session_start();
        
        $table=new WPDO\WTable('useradmin', ['username', 'password', 'email']);
        
        $this->db=new WPDO\WPDO($table);
        
        $this->tpl=new Templates(['theme/admin/templates', 'modules/admin/templates']);
    
    }
    
    public function check_login() {
        
        if(isset($_SESSION['admin_login'])) {
            
            return true;
            
        }
        else {
        
            return false;
            
        }
        
    }
    
}
