function user_identification() { user_auth(); user_login_check(); user_update_database(); user_check_url_rewrite(); }
function user_auth() { debug('user - auth gestartet: ' . session_id()); $cn = session_und_cookie_name(); if (!user_key_in_db() or !isset($_SESSION['authid']) or isset($_SESSION['authsess']) and $_SESSION['authsess'] != $cn) { debug('user - nicht in db oder nicht authid'); user_set_guest_vars(); user_set_user_online(); // wenn cn cookie vorhanden // dann checken ob er sich damit einloggen darf if (isset($_COOKIE[$cn])) { if (!user_login_check(true)) { // gruppen, und modulzugehoerigkeit setzten (gäste) user_set_grps_and_modules(); } } } }
$action = param(1); $user = user_read($uid); empty($user) and $user = user_guest(); if ($action == 'create') { $tid = param(2); $quick = param(3); $thread = thread_read($tid); empty($thread) and message(3, '主题不存在:' . $tid); $fid = $thread['fid']; $forum = forum_read($fid); empty($forum) and message(3, '板块不存在:' . $fid); $r = forum_access_user($fid, $gid, 'allowpost'); if (!$r) { if ($gid == 0) { $r = forum_access_user($fid, 101, 'allowpost'); $r and user_login_check($user); } message(10, '您(' . $user['groupname'] . ')无权限在此版块发帖'); } $conf['ipaccess_on'] and !ipaccess_check($longip, 'posts') and message(-1, '您的 IP 今日回帖数达到上限,请明天再来。'); if ($method == 'GET') { check_standard_browser(); include './flarum/view/post_create.htm'; } else { $agree = param('agree', 0); $message = param('message', '', FALSE); !trim(str_replace(array(' ', ' ', '<br>', '<br/>', '<br />'), '', $message)) and message(2, '内容不能为空'); $gid != 1 and $message = xn_html_safe($message); $gid != 1 and $message = badword_filter($message, $badword); $message === FALSE and message(2, '内容中包含敏感关键词: ' . $badword); mb_strlen($message, 'UTF-8') > 2048000 and message('内容太长');
include 'menu.php'; ?> <?php ?> <!-- body --> <!-- container --> <div class="left" > <div class="leftProducts"> <div style="padding:5px"> <?php if (user_login_check($mysqli) == true) { include 'users/mycart.php'; } else { if (admin_login_check($mysqli)) { } else { echo "you need to login to view your cart!"; ?> <div class="login-body"> <form action="<?php echo site_name; ?> /users/includes/process_login.php" method="post" name="login_form"> <input type="text" name="email" /> :Email </br> <input type="password" name="password" id="password"/> :Password </br> <input type="button" value="Login" class="send-form" onclick="formhash(this.form, this.form.password);" />
<!-- main header --!> <?php $dir = preg_replace('/\\b\\w*users\\w*\\b/i', '', trim(__DIR__)); include $dir . '/head.php'; include $_SERVER["DOCUMENT_ROOT"] . site_name . '/menu.php'; ?> <?php ?> <!-- body --> <?php if (!user_login_check($mysqli)) { echo "you are not loged in"; return; } ?> <!-- container --> <div class="left" > <div class="leftProducts"> <div style="padding:5px"> <h1> Thank you for registering with wowstyle</h1></br> <div class="first-user-boks-info"> <a href="<?php echo site_name; ?>
<?php include 'config/db_connect.php'; include 'classes/functions.php'; sec_session_start(); if (admin_login_check($mysqli) == true || user_login_check($mysqli) == true) { $logged = 'in'; } else { $logged = 'out'; } ?> <!DOCTYPE html> <html> <head> <title>wow clothes</title> <link rel="stylesheet" type="text/css" href="<?php echo site_name; ?> /css/style.css"> <link rel="stylesheet" type="text/css" href="<?php echo site_name; ?> /css/slide.css"> <link rel="stylesheet" type="text/css" href="<?php echo site_name; ?> /css/contact-form.css"> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <link href="<?php echo site_name;
/** * Login pages */ //设置编码 header("content-type:text/html;charset=utf-8"); //引用数据库连接文件 require_once '../lib/config.php'; require_once '../lib/func/admin.func.php'; //require_once 'lib/func/pw.func.php'; if (!empty($_POST)) { //获取_POST并赋值 $username = mysqli_real_escape_string($dbc, trim($_POST['username'])); $pwd = md5($_POST['password']); //md5加密 $rem = $_POST['remember_me']; $rt = user_login_check($username, $pwd); if ($rt == 1) { if ($rem = "week") { $ext = 3600 * 24 * 7; } else { $ext = 3600; } //获取用户id $id = get_user_uid($username); //处理密码 $pw = co_pw($pwd); setcookie("admin_name", $username, time() + $ext); setcookie("admin_pwd", $pw, time() + $ext); setcookie("admin_uid", $id, time() + $ext); header("location: index.php "); exit;