mirror of
https://github.com/Daichimarukana/uwuzu.git
synced 2026-06-05 03:24:41 +00:00
uwuzu version 1.2.28
This commit is contained in:
+32
-13
@@ -1,9 +1,10 @@
|
||||
<?php
|
||||
$servernamefile = "../server/servername.txt";
|
||||
$serversettings_file = "../server/serversettings.ini";
|
||||
$serversettings = parse_ini_file($serversettings_file, true);
|
||||
|
||||
$domain = $_SERVER['HTTP_HOST'];
|
||||
|
||||
$mojisizefile = "../server/textsize.txt";
|
||||
$servericonfile = "../server/servericon.txt";
|
||||
|
||||
$banurldomainfile = "../server/banurldomain.txt";
|
||||
$banurl_info = file_get_contents($banurldomainfile);
|
||||
@@ -35,6 +36,7 @@ $res = null;
|
||||
$option = null;
|
||||
|
||||
session_name('uwuzu_s_id');
|
||||
session_set_cookie_params(0, '', '', true, true);
|
||||
session_start();
|
||||
session_regenerate_id(true);
|
||||
|
||||
@@ -52,7 +54,7 @@ try {
|
||||
$error_message[] = $e->getMessage();
|
||||
}
|
||||
|
||||
if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
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', htmlentities($_SESSION['userid']));
|
||||
@@ -61,7 +63,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
if(empty($res["userid"])){
|
||||
header("Location: ../login.php");
|
||||
exit;
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] === $res["userid"]){
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] == $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($res['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($res['username']); // セッションに格納されている値をそのままセット
|
||||
@@ -78,21 +80,29 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
'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");
|
||||
@@ -109,7 +119,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
if(empty($res["userid"])){
|
||||
header("Location: ../login.php");
|
||||
exit;
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] === $res["userid"]){
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] == $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($res['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($res['username']); // クッキーから取得した値をセット
|
||||
@@ -126,21 +136,29 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
'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");
|
||||
@@ -160,7 +178,7 @@ if(empty($userid)){
|
||||
if(empty($username)){
|
||||
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();
|
||||
@@ -673,16 +691,16 @@ $pdo = null;
|
||||
<html lang="ja">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="../css/home.css">
|
||||
<link rel="stylesheet" href="../css/home.css?<?php echo date('Ymd-Hi'); ?>">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
|
||||
<script src="../js/unsupported.js"></script>
|
||||
<script src="../js/console_notice.js"></script>
|
||||
<script src="../js/nsfw_event.js"></script>
|
||||
<script src="../js/unsupported.js?<?php echo date('Ymd-Hi'); ?>"></script>
|
||||
<script src="../js/console_notice.js?<?php echo date('Ymd-Hi'); ?>"></script>
|
||||
<script src="../js/nsfw_event.js?<?php echo date('Ymd-Hi'); ?>"></script>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
||||
<link rel="apple-touch-icon" type="image/png" href="../favicon/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="../favicon/icon-192x192.png">
|
||||
<title>ID <?php echo htmlentities($ueuseid, ENT_QUOTES, 'UTF-8'); ?> のユーズ - <?php echo file_get_contents($servernamefile);?></title>
|
||||
<title>ID <?php echo htmlentities($ueuseid, ENT_QUOTES, 'UTF-8'); ?> のユーズ - <?php echo htmlspecialchars($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8');?></title>
|
||||
|
||||
</head>
|
||||
|
||||
@@ -704,7 +722,7 @@ $pdo = null;
|
||||
|
||||
<div class="emojibox">
|
||||
<?php if(!empty($touserid)){?>
|
||||
<h1>返信</h1>
|
||||
<h1>@<?php echo htmlentities($touserid, ENT_QUOTES, 'UTF-8'); ?>さんに返信</h1>
|
||||
</div>
|
||||
<?php if(!($role ==="ice")){?>
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
@@ -863,10 +881,11 @@ $(document).ready(function() {
|
||||
isLoading = true;
|
||||
var ueuseid = '<?php echo $ueuseid; ?>';
|
||||
var userid = '<?php echo $userid; ?>';
|
||||
var account_id = '<?php echo $loginid; ?>';
|
||||
$.ajax({
|
||||
url: '../nextpage/ueusepage.php', // PHPファイルへのパス
|
||||
method: 'GET',
|
||||
data: { page: pageNumber, id: ueuseid ,userid: userid},
|
||||
data: { page: pageNumber, id: ueuseid ,userid: userid ,account_id: account_id},
|
||||
dataType: 'html',
|
||||
timeout: 300000,
|
||||
success: function(response) {
|
||||
|
||||
Reference in New Issue
Block a user