本文整理汇总了PHP中slog::logged方法的典型用法代码示例。如果您正苦于以下问题:PHP slog::logged方法的具体用法?PHP slog::logged怎么用?PHP slog::logged使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类slog
的用法示例。
在下文中一共展示了slog::logged方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: logged
function logged()
{
global $config, $db, $phpdoc, $gpc;
// Alte Sessions (nach bestimmter Zeit, die geprüft wird) löschen
if ($this->SessionDel() == true) {
$sessionsave = $config['sessionsave'] * 60;
$old = time() - $sessionsave;
$db->query("DELETE FROM {$db->pre}session WHERE active <= '" . $old . "'", __LINE__, __FILE__);
}
$sessionid = $gpc->get('s', str);
if (empty($sessionid) || strlen($sessionid) != $config['sid_length']) {
$sessionid = FALSE;
$this->querysid = FALSE;
}
$vdata = $gpc->save_str(getcookie('vdata'));
$vlastvisit = $gpc->save_int(getcookie('vlastvisit'));
$vhash = $gpc->save_str(getcookie('vhash'));
// Read additional data
if (!empty($vdata)) {
$this->cookies = TRUE;
$this->cookiedata = explode("|", $vdata);
} else {
$this->cookiedata = array(0, '');
}
if (!empty($vlastvisit)) {
$this->cookies = TRUE;
$this->cookielastvisit = $vlastvisit;
} else {
$this->cookielastvisit = 0;
}
if (isset($vhash)) {
$this->cookies = TRUE;
if (strlen($vhash) != $config['sid_length']) {
$this->sid = '';
} else {
$this->sid = $vhash;
}
} elseif ($sessionid) {
$this->sid = $sessionid;
} else {
$this->sid = '';
}
if (empty($this->sid)) {
$result = $db->query('SELECT sid FROM ' . $db->pre . 'session WHERE ip = "' . $this->ip . '" AND mid = "0" LIMIT 1', __LINE__, __FILE__);
if ($db->num_rows() == 1) {
$sidrow = $db->fetch_assoc($result);
$this->sid = $sidrow['sid'];
$this->querysid = TRUE;
}
}
// Checke nun die Session
if (empty($this->sid)) {
if (SCRIPTNAME != 'external') {
$my = $this->sid_new();
} else {
$my->vlogin = FALSE;
}
} else {
$my = $this->sid_load();
}
$expire = $config['sessionsave'] + 1 * 60;
makecookie($config['cookie_prefix'] . '_vhash', $this->sid, $expire);
if ($gpc->get('action') == "markasread" || !isset($my->mark)) {
$my->mark = array();
} else {
$my->mark = unserialize(html_entity_decode($my->mark, ENT_QUOTES));
}
if (!is_array($my->mark)) {
$my->mark = array();
}
if ($my->vlogin) {
makecookie($config['cookie_prefix'] . '_vdata', $my->id . "|" . $my->pw);
} else {
$my->id = 0;
}
if (!isset($my->pwfaccess)) {
$my->pwfaccess = array();
} else {
$my->pwfaccess = unserialize(html_entity_decode($my->pwfaccess, ENT_QUOTES));
}
if (!is_array($my->pwfaccess)) {
$my->pwfaccess = array();
}
if (!isset($my->settings)) {
$my->settings = array();
} else {
$my->settings = unserialize(html_entity_decode($my->settings, ENT_QUOTES));
}
if (!is_array($my->settings)) {
$my->settings = array();
}
if (!isset($my->timezone) || $my->timezone == NULL) {
$my->timezone = $config['timezone'];
}
$my->timezonestr = '';
if ($my->timezone != 0) {
if ($my->timezone[0] != '+' && $my->timezone > 0) {
$my->timezonestr = '+' . $my->timezone;
} else {
$my->timezonestr = $my->timezone;
//.........这里部分代码省略.........
示例2: ImageHexColorAllocate
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
error_reporting(E_ALL);
DEFINE('SCRIPTNAME', 'images');
define('VISCACHA_CORE', '1');
include "data/config.inc.php";
include "classes/function.viscacha_frontend.php";
$zeitmessung1 = t1();
$slog = new slog();
$my = $slog->logged();
$my->p = $slog->Permissions();
$lang->init($my->language);
function ImageHexColorAllocate(&$image, $string)
{
sscanf($string, "%2x%2x%2x", $red, $green, $blue);
return ImageColorAllocate($image, $red, $green, $blue);
}
($code = $plugins->load('images_start')) ? eval($code) : null;
if ($_GET['action'] == 'vote') {
$result = $db->query('
SELECT id, topic, posts, sticky, status, last, board, vquestion, prefix
FROM ' . $db->pre . 'topics
WHERE id = ' . $_GET['id'] . '
LIMIT 1
', __LINE__, __FILE__);
示例3: banish
/**
* Bans a user.
*
* After calling the function exit() is called and script ends.
* Connection to database is closed. Template 'banned' will be shown.
* Error Message is loaded from 'data/banned.php'-file.
*/
function banish()
{
global $config, $db, $phpdoc, $gpc, $lang, $plugins;
$slog = new slog();
$my = $slog->logged();
$lang->init($my->language);
$tpl = new tpl();
ob_start();
include 'data/banned.php';
$banned = ob_get_contents();
ob_end_clean();
($code = $plugins->load('permissions_banish')) ? eval($code) : null;
echo $tpl->parse("banned");
$phpdoc->Out();
$db->close();
exit;
}