本文整理汇总了PHP中General::uuid方法的典型用法代码示例。如果您正苦于以下问题:PHP General::uuid方法的具体用法?PHP General::uuid怎么用?PHP General::uuid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类General
的用法示例。
在下文中一共展示了General::uuid方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: show
function show($meldung = '')
{
if (defined('HTTPS') && HTTPS && !isset($_SERVER['HTTPS'])) {
header("Location: " . 'https://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']);
}
if ($_SESSION['uuid']) {
$vars['uuid'] = $_SESSION['uuid'];
} else {
$vars['uuid'] = $_SESSION['uuid'] = General::uuid();
}
$template = $this->system->login_template ? $this->system->login_template : INSTALL_PATH . '/Templates/Login.template.html';
$login_form = new Template($template);
$meldungen = Template::get_all_parts($login_form->template);
$vars['meldung'] = $meldungen[$meldung] ? $meldungen[$meldung] : $meldung;
$vars['action'] = SELF_URL;
if (isset($_GET['logout'])) {
$vars['user'] = $_GET['logout'];
$vars['meldung'] = $login_form->parse_template('LOGOUT-MELDUNG', $vars);
return Html::div($login_form->parse_template('FORM', $vars));
}
if (!isset($_POST['user']) || !isset($_POST['pass'])) {
$vars['meldung'] .= Html::br() . $meldungen['KENNWORT_EINGEBEN'];
return Html::div($login_form->parse_template('FORM', $vars));
} else {
$vars['meldung'] .= Html::br() . $meldungen['FAIL'];
return Html::div($login_form->parse_template('FORM', $vars));
}
}
示例2: show
function show($meldung = '')
{
if (defined('HTTPS') && HTTPS && !isset($_SERVER['HTTPS'])) {
header("Location: " . 'https://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']);
}
$vars['uuid'] = $_SESSION['uuid'] = General::uuid();
$template = $this->system->login_template ? $this->system->login_template : INSTALL_PATH . '/Templates/Login.template.html';
$login_form = new Template($template);
$meldungen = Template::get_all_parts($login_form->template);
$vars['meldung'] = $meldungen[$meldung] ? $meldungen[$meldung] : $meldung;
$vars['action'] = SELF_URL;
if (isset($_GET['logout'])) {
$vars['user'] = $_GET['logout'];
$vars['meldung'] = $login_form->parse_template('LOGOUT-MELDUNG', $vars);
}
if (isset($_GET['recover'])) {
if ($_POST['recover_submit']) {
$email = General::input_clean($_POST['email'], true);
foreach ($this->system->user_tables as $t) {
$sql = "SELECT * FROM `{$t}` WHERE `E-Mail` = '{$email}'";
$result = $this->system->connection->db_single_row($sql);
if ($result) {
break;
}
}
if ($result) {
$mail = $login_form->parse_template('RECOVER_MAIL', $result);
mail($result['E-Mail'], 'Ihr ' . PROJECT_NAME . ' Passwort', $mail, 'From: ' . PROJECT_NAME . '<noreply@' . preg_replace('/^www\\./i', '', $_SERVER['HTTP_HOST']) . '>');
return $login_form->parse_template('RECOVER_THANKYOU', $result);
} else {
return $login_form->parse_template('RECOVER_NOFOUND', $result);
}
} else {
$vars['meldung'] = 'Bitte geben Sie Ihre E-Mail-Adresse ein: ';
}
return Html::div($login_form->parse_template('RECOVER_FORM', $vars));
}
if (!isset($_POST['user']) || !isset($_POST['pass'])) {
$vars['meldung'] .= Html::br() . $meldungen['KENNWORT_EINGEBEN'];
return Html::div($login_form->parse_template('FORM', $vars));
} else {
/*if ($this->check_login($system))
{
//if (HTTPS) header("Location: ".'http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']);
header("Location: ".'http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']);
}
else
{*/
$vars['meldung'] .= Html::br() . $meldungen['FAIL'];
return Html::div($login_form->parse_template('FORM', $vars));
// }
}
}
示例3: login
function login($meldung = '', $template = '')
{
die('DEPRECATED LOGIN METHOD: ' . __FILE__ . ' ' . __LINE__);
if (!isset($_SESSION)) {
session_start();
}
if (isset($_POST['user']) && isset($_POST['pass']) && $this->check_login()) {
return true;
}
$vars['uuid'] = $_SESSION['uuid'] = General::uuid();
if (defined('HTTPS') && HTTPS && !isset($_SERVER['HTTPS'])) {
header("Location: " . 'https://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']);
}
$page = new Seite($this, $template);
$login_form = new Template(INSTALL_PATH . '/Templates/Login.template.html');
$meldungen = Template::get_all_parts($login_form->template);
$vars['meldung'] = $meldungen[$meldung] ? $meldungen[$meldung] : $meldung;
$vars['action'] = SELF_URL;
$vars['title'] = $this->seite != 'index' ? $this->rubrik . ' | ' . $this->seite : $this->rubrik;
if ($navi) {
$navi = new Navi($this);
$vars['navi'] = $navi->rubriken();
}
if (!isset($_POST['user']) || !isset($_POST['pass'])) {
$vars['meldung'] .= Html::br() . $meldungen['KENNWORT_EINGEBEN'];
die($page->header($vars) . Html::div($login_form->parse_template('FORM', $vars)) . $page->footer($vars));
} else {
if ($this->check_login()) {
//if (HTTPS) header("Location: ".'http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']);
header("Location: " . 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']);
} else {
die($page->header($vars) . Html::div($login_form->parse_template('FORM', $vars)) . $page->footer($vars));
}
}
}