更新API
This commit is contained in:
parent
0f2aa55382
commit
70f7ee9528
|
@ -13,12 +13,12 @@ $studentID = htmlspecialchars($_GET['studentID']);
|
||||||
// 函数构建
|
// 函数构建
|
||||||
if (!empty($studentID)) {
|
if (!empty($studentID)) {
|
||||||
// 数据库获取
|
// 数据库获取
|
||||||
$result_avatar = mysqli_query($sql_conn,"SELECT * FROM ".$setting['SQL_DATA']['info']." WHERE studentID='$studentID'");
|
$result_avatar = mysqli_query($conn,"SELECT * FROM ".$setting['SQL_DATA']['info']." WHERE studentID='$studentID'");
|
||||||
$result_avatar_object = mysqli_fetch_object($result_avatar);
|
$result_avatar_object = mysqli_fetch_object($result_avatar);
|
||||||
// 检查是否存在
|
// 检查是否存在
|
||||||
if (isset($result_avatar_object->icon) == TRUE) {
|
if (!empty($result_avatar_object->qq)) {
|
||||||
// 若正确信息返回数据
|
// 若正确信息返回数据
|
||||||
header('location:'.$result_avatar_object->icon);
|
header('location: https://q1.qlogo.cn/g?b=qq&nk='.$result_avatar_object->qq.'&s=640');
|
||||||
} else {
|
} else {
|
||||||
// 如果数据错误返回不存在
|
// 如果数据错误返回不存在
|
||||||
header('location: ./logo.jpg');
|
header('location: ./logo.jpg');
|
||||||
|
|
Loading…
Reference in New Issue
Block a user