<?php /* * This file is part of the core framework. * * (c) James Cleveland <*****@*****.**> * * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ namespace Core\Session\LocalStorage; import('core.session.local_storage.exceptions'); import('core.session.interfaces'); import('core.dependency'); \Core\DEPENDENCY::require_functions('setcookie'); class Cookie implements \Core\Session\LocalStorage { private $untrusted = array(); private $actual = array(); private $cookie; public function __construct($cookie = False) { if (empty($cookie)) { $cookie = $_COOKIE; } foreach (array('sid', 'tok') as $key) { $this->untrusted[$key] = $cookie[$key]; } } public function get()
* This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ /** * Extends mysqli to do interesting * things, should be useful for prepared * statements, etc. * * @package database * @subpackage core */ namespace Core\Database; import('core.dependency'); import('core.containment'); \Core\DEPENDENCY::require_functions(array('mssql_connect', 'mssql_query')); class MSSQL { private $connection = 0; public static $total_queries = 0; public static $total_time = 0; public $database = 0; public $query; public function __construct($hostname, $username, $password, $database) { $this->connection = mssql_connect($hostname, $username, $password); if (!$this->connection) { throw new MSSQLConnectionError("Could not connect to database host [" . $hostname . "]."); } if (!mssql_select_db($database, $this->connection)) { throw new MSSQLSelectDBError("Could not select database [" . $database . "].");