OpenSencillo
2015.002
|
Public Member Functions | |
__construct () | |
lm_install () | |
lm_addUser ($name, $pass, $perm=1000) | |
Private Attributes | |
$current_time | |
$sql |
Definition at line 82 of file session.php.
__construct | ( | ) |
Create time settings for loginManager
Reimplemented from sessionManager.
Definition at line 90 of file session.php.
{ $this->current_time = array('year'=>date('Y'), 'month'=>date('m'), 'day'=>date('d'), 'hour'=>date('H'), 'minute'=>date('i'), 'second'=>date('s'), 'session'=>date('YmdHis')); }
lm_addUser | ( | $ | name, |
$ | pass, | ||
$ | perm = 1000 |
||
) |
Add user
string | $name | |
string | $pass | |
integer | $perm |
Definition at line 137 of file session.php.
lm_install | ( | ) |
Install loginManager class
Definition at line 104 of file session.php.
{ $this->sql=' CREATE TABLE IF NOT EXISTS `login` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `userid` bigint(20) NOT NULL, `sessionid` longtext NOT NULL, `expiration` int(11) NOT NULL, `perm` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=0; '; $mysql->openTable('login'); $mysql->write($this->sql); $this->sql=' CREATE TABLE IF NOT EXISTS `users` ( `userid` bigint(20) NOT NULL AUTO_INCREMENT, `name` longtext NOT NULL, `pass` longtext NOT NULL, `perm` int(4) NOT NULL, PRIMARY KEY (`userid`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=0; '; $mysql->openTable('users'); $mysql->write($this->sql); }
$current_time [private] |
Definition at line 84 of file session.php.
$sql [private] |
Definition at line 85 of file session.php.