0, 'path' => '/', 'domain' => '', 'secure' => true, 'httponly' => true, 'samesite' => 'Lax' ]); session_start(); session_regenerate_id(true); try { $option = array( PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, PDO::MYSQL_ATTR_MULTI_STATEMENTS => false ); $pdo = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); } catch(PDOException $e) { // 接続エラーのときエラー内容を取得する $error_message[] = $e->getMessage(); } if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) { $passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid"); $passQuery->bindValue(':userid', safetext($_SESSION['userid'])); $passQuery->execute(); $res = $passQuery->fetch(); if(empty($res["userid"])){ header("Location: ../login.php"); exit; }elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] == $res["userid"]){ // セッションに値をセット $userid = safetext($res['userid']); // セッションに格納されている値をそのままセット $username = safetext($res['username']); // セッションに格納されている値をそのままセット $loginid = safetext($res["loginid"]); $role = safetext($res["role"]); $sacinfo = safetext($res["sacinfo"]); $myblocklist = safetext($res["blocklist"]); $myfollowlist = safetext($res["follow"]); $_SESSION['admin_login'] = true; $_SESSION['userid'] = $userid; $_SESSION['username'] = $username; $_SESSION['loginid'] = $res["loginid"]; setcookie('userid', $userid, [ 'expires' => time() + 60 * 60 * 24 * 14, 'path' => '/', 'samesite' => 'lax', 'secure' => true, 'httponly' => true, ]); setcookie('username', $username,[ 'expires' => time() + 60 * 60 * 24 * 14, 'path' => '/', 'samesite' => 'lax', 'secure' => true, 'httponly' => true, ]); setcookie('loginid', $res["loginid"],[ 'expires' => time() + 60 * 60 * 24 * 14, 'path' => '/', 'samesite' => 'lax', 'secure' => true, 'httponly' => true, ]); setcookie('admin_login', true,[ 'expires' => time() + 60 * 60 * 24 * 14, 'path' => '/', 'samesite' => 'lax', 'secure' => true, 'httponly' => true, ]); }else{ header("Location: ../login.php"); exit; } } elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) { $passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid"); $passQuery->bindValue(':userid', safetext($_COOKIE['userid'])); $passQuery->execute(); $res = $passQuery->fetch(); if(empty($res["userid"])){ header("Location: ../login.php"); exit; }elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] == $res["userid"]){ // セッションに値をセット $userid = safetext($res['userid']); // クッキーから取得した値をセット $username = safetext($res['username']); // クッキーから取得した値をセット $loginid = safetext($res["loginid"]); $role = safetext($res["role"]); $sacinfo = safetext($res["sacinfo"]); $myblocklist = safetext($res["blocklist"]); $myfollowlist = safetext($res["follow"]); $_SESSION['admin_login'] = true; $_SESSION['userid'] = $userid; $_SESSION['username'] = $username; $_SESSION['loginid'] = $res["loginid"]; setcookie('userid', $userid,[ 'expires' => time() + 60 * 60 * 24 * 14, 'path' => '/', 'samesite' => 'lax', 'secure' => true, 'httponly' => true, ]); setcookie('username', $username,[ 'expires' => time() + 60 * 60 * 24 * 14, 'path' => '/', 'samesite' => 'lax', 'secure' => true, 'httponly' => true, ]); setcookie('loginid', $res["loginid"],[ 'expires' => time() + 60 * 60 * 24 * 14, 'path' => '/', 'samesite' => 'lax', 'secure' => true, 'httponly' => true, ]); setcookie('admin_login', true,[ 'expires' => time() + 60 * 60 * 24 * 14, 'path' => '/', 'samesite' => 'lax', 'secure' => true, 'httponly' => true, ]); }else{ header("Location: ../login.php"); exit; } } else { // ログインが許可されていない場合、ログインページにリダイレクト header("Location: ../login.php"); exit; } if(empty($userid)){ header("Location: ../login.php"); exit; } if(empty($username)){ header("Location: ../login.php"); exit; } if(!($res["admin"] === "yes")){ header("Location: ../login.php"); exit; } $notiQuery = $pdo->prepare("SELECT COUNT(*) as notification_count FROM notification WHERE touserid = :userid AND userchk = 'none'"); $notiQuery->bindValue(':userid', $userid); $notiQuery->execute(); $notiData = $notiQuery->fetch(PDO::FETCH_ASSOC); $notificationcount = $notiData['notification_count']; if(!empty($pdo)){ mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); $mysqli = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME); //User $result = $mysqli->query("SELECT userid FROM account"); $count1 = $result->num_rows; //ueuse $result2 = $mysqli->query("SELECT uniqid FROM ueuse"); $count2 = $result2->num_rows; //emoji $result3 = $mysqli->query("SELECT sysid FROM emoji"); $count3 = $result3->num_rows; //bot $result4 = $mysqli->query("SELECT userid FROM account WHERE sacinfo = 'bot'"); $count4 = $result4->num_rows; //DB_Data try { $dbname = DB_NAME; $query = " SELECT table_name AS `Table`, ROUND(((data_length + index_length) / 1024 / 1024), 2) AS `Size` FROM information_schema.TABLES WHERE table_schema = :database ORDER BY `Size` DESC; "; $stmt = $pdo->prepare($query); $stmt->bindParam(':database', $dbname); $stmt->execute(); $db_results = $stmt->fetchAll(PDO::FETCH_ASSOC); } catch (PDOException $e) { $db_results = null; } } if(function_exists("disk_free_space")){ if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { $disk = true; $diskFree = (int) disk_free_space('C:') / 1024 / 1024; $diskTotal = (int) disk_total_space('C:') / 1024 / 1024; $diskUmari = $diskTotal - $diskFree; if ($diskFree / $diskTotal < 0.1) { $disk_over90p = true; }else{ $disk_over90p = false; } $loadAve = null; } else { $disk = true; $diskFree = (int) disk_free_space('/') / 1024 / 1024; $diskTotal = (int) disk_total_space('/') / 1024 / 1024; $diskUmari = $diskTotal - $diskFree; if ($diskFree / $diskTotal < 0.1) { $disk_over90p = true; }else{ $disk_over90p = false; } if(function_exists("sys_getloadavg")){ $loadAve = sys_getloadavg()[0]; }else{ $loadAve = null; } } }else{ $disk = false; $diskFree = 5000; $diskUmari = 5000; $diskTotal = 10000; $disk_over90p = false; if(function_exists("sys_getloadavg")){ $loadAve = sys_getloadavg()[0]; }else{ $loadAve = null; } } require('../logout/logout.php'); ?> サーバー概要 - <?php echo safetext($serversettings["serverinfo"]["server_name"]);?>

サーバー概要

">
">
">

サーバー名


サーバー紹介メッセージ


サーバー管理者の名前


サーバーへのお問い合わせ用メールアドレス


統計情報

ユーザー数

投稿数

カスタム絵文字数

Botアカウント数


ディスク空き容量

90%以上が使用済みです。
早急に容量拡張などの対応を考えてください!

ディスク空き容量には余裕があります。

使用済み : GB
空き容量 : GB

空き容量の取得ができませんでした。


ロードアベレージ

ロードアベレージはCPUのコア数と照らし合わせて活用してください。
"ロードアベレージ/CPUコア数"で計算をした時に1.0を超えると処理が重くなっています。
※Windows環境ではロードアベレージの取得はできません。

ロードアベレージの取得ができませんでした。

過去1分間のロードアベレージ :


データベース

データベースの容量情報です。
"; echo ""; echo ""; echo ""; } } ?>
".$value['Table']."".$value['Size']." MB