get('tb_setting', '*'); //检查是否登录 if(!checkLogin()){ //未登录用户的ID默认为0,session、cookie均要设置 session('member_id', 0); cookie('memberID', 0, 3600 * 24 * 7); //检查cookie里用户信息是否存在 if(cookie('userinfo') != NULL){ $userinfo = json_decode(stripslashes(cookie('userinfo')), true); //用户信息存在并且开启下次自动登入,则进行登录操作 if($userinfo['rememberMe'] == 1){ $row = $db->get('tb_member', '*', [ 'AND' => [ 'username' => $userinfo['username'], 'password' => sha1(authcode($userinfo['password'], 'DECODE')) ] ]); //检查登录是否成功 if($row){ session('member_id', $row['tbid']); cookie('memberID', $row['tbid'], time() + 3600 * 24 * 7); $db->update('tb_member', [ 'lastlogindt' => date('Y-m-d H:i:s'), 'lastloginip' => getIp() ], [ 'tbid' => $row['tbid'] ]); } } } } ?> <?php echo $setting['title']; ?>
style="visibility:visible;" data-isforcedlogin="">
取消登录
已有帐号点击登录

帐号()登录成功,
请绑定你的 HoorayOS 账号。【取消】
立即注册
注册新用户

帐号()登录成功,
请绑定你的 HoorayOS 账号。【取消】