Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- /**
- * Description of mainController
- *
- * @author fabi0
- */
- namespace Load;
- class Controller {
- protected function render($path, $data = array()) {
- include "Views/" . $path . '.php';
- }
- protected function alive($databseInstance, $user_id) {
- $sql = "UPDATE `users` SET `user_active` = " . time() . " WHERE `users`.`user_id` = :user_id;";
- $param = array(
- ':user_id' => array(
- 'param' => $user_id,
- 'type' => 1
- )
- );
- $databseInstance->query($sql, $param);
- }
- public function isLogged($cookieInstance, $configInstance, $sessionInstance) {
- if ($cookieInstance->exists($configInstance->session_cookie_name)) {
- return unserialize(base64_decode($sessionInstance->get($cookieInstance->get($configInstance->session_cookie_name))));
- } else {
- return false;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement