1 Star 0 Fork 21

MFFG/php_study

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
member.php 2.45 KB
一键复制 编辑 原始数据 按行查看 历史
Your Name 提交于 2020-12-24 11:30 . 6.4.2-应用系统(64)
<?php
/**
* TestGuest Version1.0
* ================================================
* Copy 2019-2021 ljcollege
* Web: http://www.ljcollege.com
* ================================================
* Author: Luo
* Date: 2020-9-2
*/
session_start();
//定义个常量,用来授权调用includes里面的文件
define('IN_TG',true);
//定义个常量,用来指定本页的内容
define('SCRIPT','member');
//引入公共文件
require dirname(__FILE__).'/includes/common.inc.php';
//是否正常登录
if (isset($_COOKIE['username'])) {
//获取数据
$_rows = _fetch_array("SELECT
tg_username,tg_sex,tg_face,tg_email,tg_url,tg_qq,tg_level,tg_reg_time
FROM
tg_user
WHERE
tg_username='{$_COOKIE['username']}'
LIMIT
1
");
if ($_rows) {
$_html= array();
$_html['username'] = $_rows['tg_username'];
$_html['sex'] = $_rows['tg_sex'];
$_html['face'] = $_rows['tg_face'];
$_html['email'] = $_rows['tg_email'];
$_html['url'] = $_rows['tg_url'];
$_html['qq'] = $_rows['tg_qq'];
$_html['reg_time'] = $_rows['tg_reg_time'];
switch ($_rows['tg_level']) {
case 0:
$_html['level'] = '普通会员';
break;
case 1:
$_html['level'] = '管理员';
break;
default:
$_html['level'] = '出错';
}
$_html = _html($_html);
} else {
_alert_back('此用户不存在');
}
} else {
_alert_back('非法登录');
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php
require ROOT_PATH.'includes/title.inc.php';
?>
</head>
<body>
<?php
require ROOT_PATH.'includes/header.inc.php';
?>
<div id="member">
<?php
require ROOT_PATH.'includes/member.inc.php';
?>
<div id="member_main">
<h2>会员管理中心</h2>
<dl>
<dd>用 户 名:<?php echo $_html['username']?></dd>
<dd>性  别:<?php echo $_html['sex']?></dd>
<dd>头  像:<?php echo $_html['face']?></dd>
<dd>电子邮件:<?php echo $_html['email']?></dd>
<dd>主  页:<?php echo $_html['url']?></dd>
<dd>Q    Q:<?php echo $_html['qq']?></dd>
<dd>注册时间:<?php echo $_html['reg_time']?></dd>
<dd>身  份:<?php echo $_html['level']?></dd>
</dl>
</div>
</div>
<?php
require ROOT_PATH.'includes/footer.inc.php';
?>
</body>
</html>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/mffg/php_study.git
git@gitee.com:mffg/php_study.git
mffg
php_study
php_study
master

搜索帮助