コード例 #1
0
ファイル: memberDetail.php プロジェクト: lask20/ashi
use Parse\ParseException;
use Parse\ParseQuery;
$currentUser = ParseUser::getCurrentUser();
if (empty($currentUser)) {
    header('Location: ../login.php');
    exit;
}
if ($currentUser->get('role') !== "admin") {
    header('Location: ../login.php');
    exit;
}
if (empty($_GET['username'])) {
    exit;
}
$query = new ParseQuery("_User", $currentUser);
$query->EqualTo("username", $_GET['username']);
$results = $query->first();
$location = $results->get('location');
?>

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>A.S.H.I. | Admin</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <!-- Bootstrap 3.3.5 -->
    <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
    <!-- Font Awesome -->