加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
discuss.php 781 Bytes
一键复制 编辑 原始数据 按行查看 历史
Gary Wang 提交于 2017-06-04 14:16 . discuss page notification
<?php
session_start();
//Vars
require_once('./include/setting_oj.inc.php');
//Prepares
if (!$FORUM_ENABLED) exit(0);
$pid = (isset($_GET["pid"])) ? intval($_GET["pid"]) : null;
if (isset($_SESSION['user_id']) || isset($_GET['uid'])) {
//User Logged in and wanna see him/herself's info.
if (!isset($_GET['uid']))
$user_id = $_SESSION['user_id'];
else
$user_id = $_GET['uid'];
$sql=$pdo->prepare("SELECT * FROM users WHERE user_id=?");
$sql->execute(array($user_id));
$res=$sql->fetch(PDO::FETCH_ASSOC);
//var_dump($res);
$sql->closeCursor();
if($res == false) {
exit("403");
}
$user_name = $res['nick'];
$user_school = $res['school'];
$user_email = $res['email'];
}
//Page Includes
require("./pages/discuss.php");
?>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化