mirror of
https://github.com/Daichimarukana/uwuzu.git
synced 2026-06-05 03:24:41 +00:00
uwuzu version 1.2.27
This commit is contained in:
@@ -194,6 +194,7 @@ $pdo = null;
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
<script src="js/unsupported.js"></script>
|
||||
<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">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
|
||||
@@ -436,6 +436,7 @@ $pdo = null;
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="../css/style.css">
|
||||
<script src="../js/unsupported.js"></script>
|
||||
<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">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
|
||||
@@ -85,6 +85,7 @@ $pdo = null;
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="../css/style.css">
|
||||
<script src="../js/unsupported.js"></script>
|
||||
<script src="../js/console_notice.js"></script>
|
||||
<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">
|
||||
|
||||
@@ -80,6 +80,7 @@ if(!(empty($_SESSION['backupcode']))){
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="../css/style.css">
|
||||
<script src="../js/unsupported.js"></script>
|
||||
<script src="../js/console_notice.js"></script>
|
||||
<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">
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ $banurldomainfile = "../server/banurldomain.txt";
|
||||
$banurl_info = file_get_contents($banurldomainfile);
|
||||
$banurl = preg_split("/\r\n|\n|\r/", $banurl_info);
|
||||
|
||||
header("Content-Type: application/json; charset=utf-8");
|
||||
header("Content-Type: application/json; charset=utf-8; Access-Control-Allow-Origin: *;");
|
||||
|
||||
function createUniqId(){
|
||||
list($msec, $sec) = explode(" ", microtime());
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
header("Content-Type: application/json; charset=utf-8");
|
||||
header("Content-Type: application/json; charset=utf-8; Access-Control-Allow-Origin: *;");
|
||||
|
||||
if(isset($_GET['limit'])) {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
header("Content-Type: application/json; charset=utf-8");
|
||||
header("Content-Type: application/json; charset=utf-8; Access-Control-Allow-Origin: *;");
|
||||
|
||||
$mojisizefile = "../server/textsize.txt";
|
||||
|
||||
@@ -111,6 +111,11 @@ for( $i=0;$i<$cnt;$i++ ){
|
||||
|
||||
"invitation_code" => $invitation_code,
|
||||
|
||||
"usage" => [
|
||||
"users" => $count1,
|
||||
"ueuse" => $count2,
|
||||
],
|
||||
|
||||
),
|
||||
|
||||
"software" => array(
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
header("Content-Type: application/json; charset=utf-8");
|
||||
header("Content-Type: application/json; charset=utf-8; Access-Control-Allow-Origin: *;");
|
||||
|
||||
if(isset($_GET['ueuseid'])) {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
header("Content-Type: application/json; charset=utf-8");
|
||||
header("Content-Type: application/json; charset=utf-8; Access-Control-Allow-Origin: *;");
|
||||
|
||||
if(isset($_GET['userid'])) {
|
||||
|
||||
|
||||
@@ -138,6 +138,7 @@ $pdo = null;
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
<script src="js/unsupported.js"></script>
|
||||
<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">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
|
||||
@@ -251,6 +251,7 @@ $pdo = null;
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
<script src="js/unsupported.js"></script>
|
||||
<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">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
|
||||
@@ -219,6 +219,7 @@ $pdo = null;
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
<script src="js/unsupported.js"></script>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<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">
|
||||
|
||||
+24
-9
@@ -281,7 +281,7 @@ body{
|
||||
margin-left: 12px;
|
||||
margin-right: 12px;
|
||||
margin-bottom: 12px;
|
||||
background-color: var(--background-color)FFF;
|
||||
background-color: var(--background-color);
|
||||
width: 240px;
|
||||
height: 100%;
|
||||
margin-left: 0px;
|
||||
@@ -1286,6 +1286,18 @@ main h1{
|
||||
height: 350px;
|
||||
border: 1px solid var(--border-color);
|
||||
}
|
||||
.ueuse .youtube_and_nicovideo_player{
|
||||
margin-top: 12px;
|
||||
width: 100%;
|
||||
height: fit-content;
|
||||
}
|
||||
.ueuse .youtube_and_nicovideo_player iframe{
|
||||
border: none;
|
||||
width: 100%;
|
||||
aspect-ratio: 16 / 9;
|
||||
border-radius: 10px;
|
||||
border: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
.ueuse .abi{
|
||||
margin-left:auto;
|
||||
@@ -3139,22 +3151,24 @@ label>input {
|
||||
}
|
||||
|
||||
.emjtex .fx{
|
||||
display: flex;
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.emjtex img{
|
||||
margin-top: auto;
|
||||
margin-bottom: auto;
|
||||
margin-left: 4px;
|
||||
margin-left: 6px;
|
||||
margin-right: 4px;
|
||||
height: 64px;
|
||||
max-height: 64px;
|
||||
max-width: 98%;
|
||||
}
|
||||
|
||||
.emjtex h3{
|
||||
overflow-wrap: break-word;
|
||||
margin-top: auto;
|
||||
margin-bottom: auto;
|
||||
margin-left: 12px;
|
||||
margin-left: 6px;
|
||||
font-size: 24px;
|
||||
color:var(--text-color);
|
||||
text-decoration: none;
|
||||
@@ -3166,7 +3180,7 @@ label>input {
|
||||
overflow-wrap: break-word;
|
||||
margin-top: 12px;
|
||||
margin-bottom: auto;
|
||||
margin-left: 12px;
|
||||
margin-left: 6px;
|
||||
font-size: 16px;
|
||||
color:var(--text-color);
|
||||
text-decoration: none;
|
||||
@@ -5046,13 +5060,15 @@ summary {
|
||||
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 90%;
|
||||
width: 100%;
|
||||
margin-left: 0px;
|
||||
margin-right: 0px;
|
||||
height: 44px;
|
||||
padding-top: 0.0%;
|
||||
padding-bottom: 0.2%;
|
||||
padding-left: 10%;
|
||||
padding-left: 0;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.topbox .logo img{
|
||||
@@ -5263,7 +5279,6 @@ summary {
|
||||
}
|
||||
|
||||
|
||||
|
||||
.notification .flebox a{
|
||||
margin-top: auto;
|
||||
margin-bottom: auto;
|
||||
|
||||
@@ -0,0 +1,121 @@
|
||||
|
||||
@import url("color.css");
|
||||
body{
|
||||
max-width: 640px;
|
||||
height: auto;
|
||||
margin:0px;
|
||||
margin-top: 128px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
background-color:#f5f5f5;
|
||||
display: block;
|
||||
}
|
||||
main{
|
||||
max-width: 640px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
main .server_icon_zone{
|
||||
margin:12px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
text-align: center;
|
||||
}
|
||||
main .server_icon_zone img{
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
object-fit: cover;
|
||||
border-radius: 12px;
|
||||
}
|
||||
h1{
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
text-align: center;
|
||||
color:#252525;
|
||||
font-size: 32px;
|
||||
font-family: 'BIZ UDGothic', 'Yu Mincho Regular', 'ヒラギノ角ゴシック', sans-serif;
|
||||
font-weight: bold;
|
||||
}
|
||||
h3{
|
||||
line-height: 28px;
|
||||
margin-top: 6px;
|
||||
margin-bottom: 6px;
|
||||
margin-left: 0px;
|
||||
margin-right: auto;
|
||||
text-align: left;
|
||||
color:#252525;
|
||||
font-size: 20px;
|
||||
font-family: 'BIZ UDGothic', 'Yu Mincho Regular', 'ヒラギノ角ゴシック', sans-serif;
|
||||
font-weight: bold;
|
||||
}
|
||||
p{
|
||||
line-height: 20px;
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
text-align: left;
|
||||
color:#252525;
|
||||
font-size: 16px;
|
||||
font-family: 'BIZ UDGothic', 'Yu Mincho Regular', 'ヒラギノ角ゴシック', sans-serif;
|
||||
font-weight: normal;
|
||||
}
|
||||
.maintext{
|
||||
margin-top: 16px;
|
||||
margin-bottom: 16px;
|
||||
|
||||
}
|
||||
.infobtn{
|
||||
display: block;
|
||||
width: 128px;
|
||||
padding: 6px;
|
||||
text-align: center;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
display: block;
|
||||
background-color:#FFC832;
|
||||
color:#ffffff;
|
||||
border-radius: 32px;
|
||||
font-size: 20px;
|
||||
font-family: 'BIZ UDGothic', 'Yu Mincho Regular', 'ヒラギノ角ゴシック', sans-serif;
|
||||
font-weight: normal;
|
||||
text-decoration: none;
|
||||
}
|
||||
.center_text{
|
||||
margin-top: 32px;
|
||||
display: block;
|
||||
}
|
||||
.center_text p{
|
||||
line-height: 20px;
|
||||
margin-top: 6px;
|
||||
margin-bottom: 6px;
|
||||
text-align: center;
|
||||
color:#252525;
|
||||
font-size: 16px;
|
||||
font-family: 'BIZ UDGothic', 'Yu Mincho Regular', 'ヒラギノ角ゴシック', sans-serif;
|
||||
font-weight: normal;
|
||||
}
|
||||
.center_text .p2{
|
||||
line-height: 20px;
|
||||
margin-top: 6px;
|
||||
margin-bottom: 6px;
|
||||
text-align: center;
|
||||
color:#777;
|
||||
font-size: 16px;
|
||||
font-family: 'BIZ UDGothic', 'Yu Mincho Regular', 'ヒラギノ角ゴシック', sans-serif;
|
||||
font-weight: normal;
|
||||
}
|
||||
hr{
|
||||
height: 0;
|
||||
margin-top: 12px;
|
||||
margin-bottom: 12px;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
border-top: 1px solid #252525;
|
||||
}
|
||||
@media screen and (max-width:640px) {
|
||||
body{
|
||||
margin:24px;
|
||||
margin-top: 32px;
|
||||
}
|
||||
}
|
||||
+11
-9
@@ -27,9 +27,6 @@ session_name('uwuzu_s_id');
|
||||
session_start();
|
||||
session_regenerate_id(true);
|
||||
|
||||
$userid = htmlentities($_SESSION['userid']);
|
||||
$username = htmlentities($_SESSION['username']);
|
||||
|
||||
try {
|
||||
|
||||
$option = array(
|
||||
@@ -46,7 +43,7 @@ try {
|
||||
|
||||
if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_SESSION['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -55,11 +52,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_SESSION['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($_SESSION['username']); // セッションに格納されている値をそのままセット
|
||||
$userid = htmlentities($res['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($res['username']); // セッションに格納されている値をそのままセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -92,7 +91,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
} elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_COOKIE['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -101,11 +100,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_COOKIE['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($_COOKIE['username']); // クッキーから取得した値をセット
|
||||
$userid = htmlentities($res['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($res['username']); // クッキーから取得した値をセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -312,6 +313,7 @@ $pdo = null;
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="../css/home.css">
|
||||
<script src="../js/unsupported.js"></script>
|
||||
<script src="../js/console_notice.js"></script>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
|
||||
|
||||
+11
-6
@@ -45,7 +45,7 @@ try {
|
||||
|
||||
if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_SESSION['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -54,11 +54,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_SESSION['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($_SESSION['username']); // セッションに格納されている値をそのままセット
|
||||
$userid = htmlentities($res['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($res['username']); // セッションに格納されている値をそのままセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -91,7 +93,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
} elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_COOKIE['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -100,11 +102,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_COOKIE['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($_COOKIE['username']); // クッキーから取得した値をセット
|
||||
$userid = htmlentities($res['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($res['username']); // クッキーから取得した値をセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -177,6 +181,7 @@ $pdo = null;
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<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>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<link rel="apple-touch-icon" type="image/png" href="../favicon/apple-touch-icon-180x180.png">
|
||||
|
||||
+5
-1
@@ -20,8 +20,12 @@ $termsdata = file_get_contents($termsfile);
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="/css/home.css">
|
||||
<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>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<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>400 Bad Request - <?php echo file_get_contents($servernamefile);?></title>
|
||||
</head>
|
||||
|
||||
@@ -29,7 +33,7 @@ $termsdata = file_get_contents($termsfile);
|
||||
|
||||
<div class="topbox">
|
||||
<div class="logo">
|
||||
<img src="/img/uwuzulogo.svg">
|
||||
<a href="../index.php"><img src="/img/uwuzulogo.svg"></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
+5
-1
@@ -20,8 +20,12 @@ $termsdata = file_get_contents($termsfile);
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="/css/home.css">
|
||||
<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>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<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>401 Unauthorized - <?php echo file_get_contents($servernamefile);?></title>
|
||||
</head>
|
||||
|
||||
@@ -29,7 +33,7 @@ $termsdata = file_get_contents($termsfile);
|
||||
|
||||
<div class="topbox">
|
||||
<div class="logo">
|
||||
<img src="/img/uwuzulogo.svg">
|
||||
<a href="../index.php"><img src="/img/uwuzulogo.svg"></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
+5
-1
@@ -20,8 +20,12 @@ $termsdata = file_get_contents($termsfile);
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="/css/home.css">
|
||||
<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>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<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>403 Forbidden - <?php echo file_get_contents($servernamefile);?></title>
|
||||
</head>
|
||||
|
||||
@@ -29,7 +33,7 @@ $termsdata = file_get_contents($termsfile);
|
||||
|
||||
<div class="topbox">
|
||||
<div class="logo">
|
||||
<img src="/img/uwuzulogo.svg">
|
||||
<a href="../index.php"><img src="/img/uwuzulogo.svg"></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
+61
-2
@@ -19,13 +19,16 @@ $termsfile = "../server/terms.txt";
|
||||
$termsdata = file_get_contents($termsfile);
|
||||
|
||||
?>
|
||||
|
||||
<html lang="ja">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="/css/home.css">
|
||||
<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>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<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>404 Not found - <?php echo file_get_contents($servernamefile);?></title>
|
||||
</head>
|
||||
|
||||
@@ -33,7 +36,7 @@ $termsdata = file_get_contents($termsfile);
|
||||
|
||||
<div class="topbox">
|
||||
<div class="logo">
|
||||
<img src="/img/uwuzulogo.svg">
|
||||
<a href="../index.php"><img src="/img/uwuzulogo.svg"></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -62,3 +65,59 @@ $termsdata = file_get_contents($termsfile);
|
||||
</body>
|
||||
|
||||
</html>
|
||||
<script>
|
||||
const nowTime = new Date().getHours();
|
||||
const $background = $("body");
|
||||
|
||||
if(nowTime >= 0 && nowTime < 4){
|
||||
$background.addClass("night")
|
||||
}
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.night .terms{
|
||||
padding: 12px;
|
||||
background:linear-gradient(#000315, #4c5f78);
|
||||
border-radius:12px;
|
||||
}
|
||||
.night .terms .err404 h1{
|
||||
margin-top: 64px;
|
||||
line-height:64px;
|
||||
font-family: 'BIZ UDPGothic', sans-serif;
|
||||
font-weight: bold;
|
||||
font-size: 64px;
|
||||
text-align: center;
|
||||
color: #f5f5f5;
|
||||
}
|
||||
.night .terms .err404 p{
|
||||
margin-top: 2px;
|
||||
margin-bottom: 2px;
|
||||
line-height:32px;
|
||||
font-family: 'BIZ UDPGothic', sans-serif;
|
||||
font-weight: normal;
|
||||
font-size: 16px;
|
||||
text-align: center;
|
||||
color: #f5f5f5;
|
||||
}
|
||||
.night .terms .p2c{
|
||||
margin-top: 0px;
|
||||
margin-bottom: 10px;
|
||||
text-align: left;
|
||||
word-wrap: break-word;
|
||||
line-height: 20px;
|
||||
color: #CCC;
|
||||
font-size: 12px;
|
||||
font-family: 'BIZ UDPGothic', sans-serif;
|
||||
font-weight: normal;
|
||||
}
|
||||
.night .terms .p3{
|
||||
margin-top: 24px;
|
||||
text-align: left;
|
||||
word-wrap: break-word;
|
||||
line-height: 24px;
|
||||
color: #f5f5f5;
|
||||
font-size: 22px;
|
||||
font-family: 'BIZ UDPGothic', sans-serif;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
+5
-1
@@ -20,8 +20,12 @@ $termsdata = file_get_contents($termsfile);
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="/css/home.css">
|
||||
<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>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<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>500 Internal Server Error - <?php echo file_get_contents($servernamefile);?></title>
|
||||
</head>
|
||||
|
||||
@@ -29,7 +33,7 @@ $termsdata = file_get_contents($termsfile);
|
||||
|
||||
<div class="topbox">
|
||||
<div class="logo">
|
||||
<img src="/img/uwuzulogo.svg">
|
||||
<a href="../index.php"><img src="/img/uwuzulogo.svg"></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
+5
-1
@@ -25,8 +25,12 @@ $termsdata = file_get_contents($termsfile);
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="/css/home.css">
|
||||
<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>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<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>503 Service Unavailable - <?php echo file_get_contents($servernamefile);?></title>
|
||||
</head>
|
||||
|
||||
@@ -34,7 +38,7 @@ $termsdata = file_get_contents($termsfile);
|
||||
|
||||
<div class="topbox">
|
||||
<div class="logo">
|
||||
<img src="/img/uwuzulogo.svg">
|
||||
<a href="../index.php"><img src="/img/uwuzulogo.svg"></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -4,6 +4,13 @@ $serverstopfile = "../server/serverstop.txt";
|
||||
$servernamefile = "../server/servername.txt";
|
||||
|
||||
$domain = $_SERVER['HTTP_HOST'];
|
||||
|
||||
if(!empty(file_get_contents($serverstopfile))){
|
||||
$serverstop = htmlspecialchars(file_get_contents($serverstopfile), ENT_QUOTES, 'UTF-8');
|
||||
}else{
|
||||
$serverstop = "現在原因不明の問題によりサーバーを停止しております。";
|
||||
}
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
|
||||
@@ -11,9 +18,13 @@ $domain = $_SERVER['HTTP_HOST'];
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="/css/home.css">
|
||||
<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>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>サーバー停止中 - </title>
|
||||
<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>サーバー停止中 - <?php echo file_get_contents($servernamefile);?></title>
|
||||
</head>
|
||||
|
||||
|
||||
@@ -21,7 +32,7 @@ $domain = $_SERVER['HTTP_HOST'];
|
||||
|
||||
<div class="topbox">
|
||||
<div class="logo">
|
||||
<img src="/img/uwuzulogo.svg">
|
||||
<a href="../index.php"><img src="/img/uwuzulogo.svg"></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -31,11 +42,14 @@ $domain = $_SERVER['HTTP_HOST'];
|
||||
<div class="p2c"><?php echo $domain;?></div>
|
||||
<div class="err404">
|
||||
<h1>サーバー停止中</h1>
|
||||
<p>(/´・ヮ・`\)<br>現在サーバーが管理者によって停止されています...<br>停止の理由は以下の通りです。</p>
|
||||
<p>現在サーバーが管理者によって停止されています...<br>停止の理由は以下の通りです。</p>
|
||||
|
||||
<hr>
|
||||
<p><?php if( !empty(file_get_contents($serverstopfile)) ){ echo htmlspecialchars(file_get_contents($serverstopfile), ENT_QUOTES, 'UTF-8'); } ?></p>
|
||||
|
||||
<p><?php
|
||||
$s_stop = explode("\n", $serverstop);
|
||||
foreach ($s_stop as $info) {
|
||||
echo $info.'<br>';
|
||||
}?></p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
+97
-7
@@ -51,7 +51,7 @@ try {
|
||||
|
||||
if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_SESSION['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -60,11 +60,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_SESSION['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($_SESSION['username']); // セッションに格納されている値をそのままセット
|
||||
$userid = htmlentities($res['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($res['username']); // セッションに格納されている値をそのままセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -97,7 +99,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
} elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_COOKIE['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -106,11 +108,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_COOKIE['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($_COOKIE['username']); // クッキーから取得した値をセット
|
||||
$userid = htmlentities($res['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($res['username']); // クッキーから取得した値をセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -188,6 +192,39 @@ function get_mentions_userid($postText) {
|
||||
|
||||
return $mentionedUsers;
|
||||
}
|
||||
function rotate($image, $exif)
|
||||
{
|
||||
$orientation = $exif['Orientation'] ?? 1;
|
||||
|
||||
switch ($orientation) {
|
||||
case 1: //no rotate
|
||||
break;
|
||||
case 2: //FLIP_HORIZONTAL
|
||||
imageflip($image, IMG_FLIP_HORIZONTAL);
|
||||
break;
|
||||
case 3: //ROTATE 180
|
||||
$image = imagerotate($image, 180, 0);
|
||||
break;
|
||||
case 4: //FLIP_VERTICAL
|
||||
imageflip($image, IMG_FLIP_VERTICAL);
|
||||
break;
|
||||
case 5: //ROTATE 270 FLIP_HORIZONTAL
|
||||
$image = imagerotate($image, 270, 0);
|
||||
imageflip($image, IMG_FLIP_HORIZONTAL);
|
||||
break;
|
||||
case 6: //ROTATE 90
|
||||
$image = imagerotate($image, 270, 0);
|
||||
break;
|
||||
case 7: //ROTATE 90 FLIP_HORIZONTAL
|
||||
$image = imagerotate($image, 90, 0);
|
||||
imageflip($image, IMG_FLIP_HORIZONTAL);
|
||||
break;
|
||||
case 8: //ROTATE 270
|
||||
$image = imagerotate($image, 90, 0);
|
||||
break;
|
||||
}
|
||||
return $image;
|
||||
}
|
||||
|
||||
if( !empty($_POST['btn_submit']) ) {
|
||||
|
||||
@@ -241,6 +278,19 @@ if( !empty($_POST['btn_submit']) ) {
|
||||
// ファイルを移動
|
||||
$result = move_uploaded_file($uploadedFile['tmp_name'], $uploadedPath);
|
||||
|
||||
// EXIF削除
|
||||
if($extension == "jpg" || $extension == "jpeg"){
|
||||
$gd = imagecreatefromjpeg($uploadedPath);
|
||||
$w = imagesx($gd);
|
||||
$h = imagesy($gd);
|
||||
$gd_out = imagecreatetruecolor($w,$h);
|
||||
imagecopyresampled($gd_out, $gd, 0,0,0,0, $w,$h,$w,$h);
|
||||
$exif = exif_read_data($uploadedPath);
|
||||
$gd_out = rotate($gd_out, $exif);
|
||||
imagejpeg($gd_out, $uploadedPath);
|
||||
imagedestroy($gd_out);
|
||||
}
|
||||
|
||||
if ($result) {
|
||||
$photo1 = $uploadedPath; // 保存されたファイルのパスを使用
|
||||
} else {
|
||||
@@ -281,6 +331,19 @@ if( !empty($_POST['btn_submit']) ) {
|
||||
// ファイルを移動
|
||||
$result2 = move_uploaded_file($uploadedFile2['tmp_name'], $uploadedPath2);
|
||||
|
||||
// EXIF削除
|
||||
if($extension2 == "jpg" || $extension2 == "jpeg"){
|
||||
$gd = imagecreatefromjpeg($uploadedPath2);
|
||||
$w = imagesx($gd);
|
||||
$h = imagesy($gd);
|
||||
$gd_out = imagecreatetruecolor($w,$h);
|
||||
imagecopyresampled($gd_out, $gd, 0,0,0,0, $w,$h,$w,$h);
|
||||
$exif = exif_read_data($uploadedPath2);
|
||||
$gd_out = rotate($gd_out, $exif);
|
||||
imagejpeg($gd_out, $uploadedPath2);
|
||||
imagedestroy($gd_out);
|
||||
}
|
||||
|
||||
if ($result2) {
|
||||
$photo2 = $uploadedPath2; // 保存されたファイルのパスを使用
|
||||
} else {
|
||||
@@ -321,6 +384,19 @@ if( !empty($_POST['btn_submit']) ) {
|
||||
// ファイルを移動
|
||||
$result3 = move_uploaded_file($uploadedFile3['tmp_name'], $uploadedPath3);
|
||||
|
||||
// EXIF削除
|
||||
if($extension3 == "jpg" || $extension3 == "jpeg"){
|
||||
$gd = imagecreatefromjpeg($uploadedPath3);
|
||||
$w = imagesx($gd);
|
||||
$h = imagesy($gd);
|
||||
$gd_out = imagecreatetruecolor($w,$h);
|
||||
imagecopyresampled($gd_out, $gd, 0,0,0,0, $w,$h,$w,$h);
|
||||
$exif = exif_read_data($uploadedPath3);
|
||||
$gd_out = rotate($gd_out, $exif);
|
||||
imagejpeg($gd_out, $uploadedPath3);
|
||||
imagedestroy($gd_out);
|
||||
}
|
||||
|
||||
if ($result3) {
|
||||
$photo3 = $uploadedPath3; // 保存されたファイルのパスを使用
|
||||
} else {
|
||||
@@ -361,6 +437,19 @@ if( !empty($_POST['btn_submit']) ) {
|
||||
// ファイルを移動
|
||||
$result4 = move_uploaded_file($uploadedFile4['tmp_name'], $uploadedPath4);
|
||||
|
||||
// EXIF削除
|
||||
if($extension4 == "jpg" || $extension4 == "jpeg"){
|
||||
$gd = imagecreatefromjpeg($uploadedPath4);
|
||||
$w = imagesx($gd);
|
||||
$h = imagesy($gd);
|
||||
$gd_out = imagecreatetruecolor($w,$h);
|
||||
imagecopyresampled($gd_out, $gd, 0,0,0,0, $w,$h,$w,$h);
|
||||
$exif = exif_read_data($uploadedPath4);
|
||||
$gd_out = rotate($gd_out, $exif);
|
||||
imagejpeg($gd_out, $uploadedPath4);
|
||||
imagedestroy($gd_out);
|
||||
}
|
||||
|
||||
if ($result4) {
|
||||
$photo4 = $uploadedPath4; // 保存されたファイルのパスを使用
|
||||
} else {
|
||||
@@ -464,7 +553,7 @@ if( !empty($_POST['btn_submit']) ) {
|
||||
$touserid = $mentionedUser;
|
||||
$datetime = date("Y-m-d H:i:s");
|
||||
$msg = "" . $ueuse . "";
|
||||
$title = "" . $username . "さんにメンションされました!";
|
||||
$title = "" . $userid . "さんにメンションされました!";
|
||||
$url = "/!" . $uniqid . "~" . $userid . "";
|
||||
$userchk = 'none';
|
||||
|
||||
@@ -528,6 +617,7 @@ $pdo = null;
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<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>
|
||||
<link rel="manifest" href="../manifest/manifest.json" />
|
||||
|
||||
+98
-8
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
$servernamefile = "../server/servername.txt";
|
||||
|
||||
$mojisizefile = "../server/textsize.txt";
|
||||
@@ -50,7 +49,7 @@ try {
|
||||
}
|
||||
if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_SESSION['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -59,11 +58,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_SESSION['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($_SESSION['username']); // セッションに格納されている値をそのままセット
|
||||
$userid = htmlentities($res['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($res['username']); // セッションに格納されている値をそのままセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -96,7 +97,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
} elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_COOKIE['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -105,11 +106,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_COOKIE['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($_COOKIE['username']); // クッキーから取得した値をセット
|
||||
$userid = htmlentities($res['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($res['username']); // クッキーから取得した値をセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -187,6 +190,40 @@ function get_mentions_userid($postText) {
|
||||
|
||||
return $mentionedUsers;
|
||||
}
|
||||
function rotate($image, $exif)
|
||||
{
|
||||
$orientation = $exif['Orientation'] ?? 1;
|
||||
|
||||
switch ($orientation) {
|
||||
case 1: //no rotate
|
||||
break;
|
||||
case 2: //FLIP_HORIZONTAL
|
||||
imageflip($image, IMG_FLIP_HORIZONTAL);
|
||||
break;
|
||||
case 3: //ROTATE 180
|
||||
$image = imagerotate($image, 180, 0);
|
||||
break;
|
||||
case 4: //FLIP_VERTICAL
|
||||
imageflip($image, IMG_FLIP_VERTICAL);
|
||||
break;
|
||||
case 5: //ROTATE 270 FLIP_HORIZONTAL
|
||||
$image = imagerotate($image, 270, 0);
|
||||
imageflip($image, IMG_FLIP_HORIZONTAL);
|
||||
break;
|
||||
case 6: //ROTATE 90
|
||||
$image = imagerotate($image, 270, 0);
|
||||
break;
|
||||
case 7: //ROTATE 90 FLIP_HORIZONTAL
|
||||
$image = imagerotate($image, 90, 0);
|
||||
imageflip($image, IMG_FLIP_HORIZONTAL);
|
||||
break;
|
||||
case 8: //ROTATE 270
|
||||
$image = imagerotate($image, 90, 0);
|
||||
break;
|
||||
}
|
||||
return $image;
|
||||
}
|
||||
|
||||
|
||||
if( !empty($_POST['btn_submit']) ) {
|
||||
$ueuse = htmlentities($_POST['ueuse']);
|
||||
@@ -240,6 +277,19 @@ if( !empty($_POST['btn_submit']) ) {
|
||||
// ファイルを移動
|
||||
$result = move_uploaded_file($uploadedFile['tmp_name'], $uploadedPath);
|
||||
|
||||
// EXIF削除
|
||||
if($extension == "jpg" || $extension == "jpeg"){
|
||||
$gd = imagecreatefromjpeg($uploadedPath);
|
||||
$w = imagesx($gd);
|
||||
$h = imagesy($gd);
|
||||
$gd_out = imagecreatetruecolor($w,$h);
|
||||
imagecopyresampled($gd_out, $gd, 0,0,0,0, $w,$h,$w,$h);
|
||||
$exif = exif_read_data($uploadedPath);
|
||||
$gd_out = rotate($gd_out, $exif);
|
||||
imagejpeg($gd_out, $uploadedPath);
|
||||
imagedestroy($gd_out);
|
||||
}
|
||||
|
||||
if ($result) {
|
||||
$photo1 = $uploadedPath; // 保存されたファイルのパスを使用
|
||||
} else {
|
||||
@@ -280,6 +330,19 @@ if( !empty($_POST['btn_submit']) ) {
|
||||
// ファイルを移動
|
||||
$result2 = move_uploaded_file($uploadedFile2['tmp_name'], $uploadedPath2);
|
||||
|
||||
// EXIF削除
|
||||
if($extension2 == "jpg" || $extension2 == "jpeg"){
|
||||
$gd = imagecreatefromjpeg($uploadedPath2);
|
||||
$w = imagesx($gd);
|
||||
$h = imagesy($gd);
|
||||
$gd_out = imagecreatetruecolor($w,$h);
|
||||
imagecopyresampled($gd_out, $gd, 0,0,0,0, $w,$h,$w,$h);
|
||||
$exif = exif_read_data($uploadedPath2);
|
||||
$gd_out = rotate($gd_out, $exif);
|
||||
imagejpeg($gd_out, $uploadedPath2);
|
||||
imagedestroy($gd_out);
|
||||
}
|
||||
|
||||
if ($result2) {
|
||||
$photo2 = $uploadedPath2; // 保存されたファイルのパスを使用
|
||||
} else {
|
||||
@@ -320,6 +383,19 @@ if( !empty($_POST['btn_submit']) ) {
|
||||
// ファイルを移動
|
||||
$result3 = move_uploaded_file($uploadedFile3['tmp_name'], $uploadedPath3);
|
||||
|
||||
// EXIF削除
|
||||
if($extension3 == "jpg" || $extension3 == "jpeg"){
|
||||
$gd = imagecreatefromjpeg($uploadedPath3);
|
||||
$w = imagesx($gd);
|
||||
$h = imagesy($gd);
|
||||
$gd_out = imagecreatetruecolor($w,$h);
|
||||
imagecopyresampled($gd_out, $gd, 0,0,0,0, $w,$h,$w,$h);
|
||||
$exif = exif_read_data($uploadedPath3);
|
||||
$gd_out = rotate($gd_out, $exif);
|
||||
imagejpeg($gd_out, $uploadedPath3);
|
||||
imagedestroy($gd_out);
|
||||
}
|
||||
|
||||
if ($result3) {
|
||||
$photo3 = $uploadedPath3; // 保存されたファイルのパスを使用
|
||||
} else {
|
||||
@@ -360,6 +436,19 @@ if( !empty($_POST['btn_submit']) ) {
|
||||
// ファイルを移動
|
||||
$result4 = move_uploaded_file($uploadedFile4['tmp_name'], $uploadedPath4);
|
||||
|
||||
// EXIF削除
|
||||
if($extension4 == "jpg" || $extension4 == "jpeg"){
|
||||
$gd = imagecreatefromjpeg($uploadedPath4);
|
||||
$w = imagesx($gd);
|
||||
$h = imagesy($gd);
|
||||
$gd_out = imagecreatetruecolor($w,$h);
|
||||
imagecopyresampled($gd_out, $gd, 0,0,0,0, $w,$h,$w,$h);
|
||||
$exif = exif_read_data($uploadedPath4);
|
||||
$gd_out = rotate($gd_out, $exif);
|
||||
imagejpeg($gd_out, $uploadedPath4);
|
||||
imagedestroy($gd_out);
|
||||
}
|
||||
|
||||
if ($result4) {
|
||||
$photo4 = $uploadedPath4; // 保存されたファイルのパスを使用
|
||||
} else {
|
||||
@@ -463,7 +552,7 @@ if( !empty($_POST['btn_submit']) ) {
|
||||
$touserid = $mentionedUser;
|
||||
$datetime = date("Y-m-d H:i:s");
|
||||
$msg = "" . $ueuse . "";
|
||||
$title = "" . $username . "さんにメンションされました!";
|
||||
$title = "" . $userid . "さんにメンションされました!";
|
||||
$url = "/!" . $uniqid . "~" . $userid . "";
|
||||
$userchk = 'none';
|
||||
|
||||
@@ -527,6 +616,7 @@ $pdo = null;
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<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>
|
||||
<link rel="manifest" href="../manifest/manifest.json" />
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<svg version="1.1" id="notice" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 720 720" style="fill-rule:evenodd;stroke:none" xml:space="preserve">
|
||||
<g>
|
||||
<path
|
||||
d="m 274,474 c 5.3236,31.0356 12.891,61.736 18.70084,92.6823 5.1903,22.8024 8.93499,45.90443 14.2911,68.6682 2.3212,16.27786 11.15549,32.03835 25.62412,40.4746 11.0433,6.6628 24.35187,9.5481 37.11429,7.2941 18.49265,-3.2561 34.3985,-16.5041 41.01685,-34.04285 7.5836,-18.88452 0.16787,-39.06635 -3.3945,-57.74945 C 398.94672,552.5176 391.64725,513.15076 383,474.5 c 9.27505,-2.01407 23.70358,3.3692 28.37048,-10.13562 C 413.00247,452.37393 411.20737,440.0474 412,428 c 0.49933,0 1.00662,0 1.5,0 19.63092,17.5535 39.8995,34.42358 60.02737,51.3946 15.09773,13.03774 30.43491,25.80172 45.10163,39.31853 10.85666,9.54837 25.3494,18.96187 33.8929,29.23487 3.3109,3.6275 8.2302,8.00744 13.70985,8.577 9.7016,-6.5098 5.91655,-19.91807 6.44922,-28.6939 -0.7536,-33.41362 -0.83533,-66.83003 -0.68097,-100.2455 0,-53.0982 0,-106.23 0,-159.31222 -0.9981,-24.74388 1.2193,-49.7092 -0.66364,-74.3751 -2.11406,-10.14183 -11.90056,-13.02687 -20.17996,-9.69963 -12.81015,5.97556 -23.08175,16.39794 -35.22806,23.50405 C 481.83893,231.52652 447.7923,255.49977 413.5,279 c -2.13925,-2.79114 -1.20724,-7.7535 -1.5,-11.6823 0.0523,-6.93217 1.0974,-16.21714 -3.73773,-21.32963 -4.20917,-4.83899 -11.11365,-5.0594 -17.00297,-4.98673 -23.5805,-0.004 -47.12048,6.9e-4 -70.69228,-0.001 -11.78894,0 -23.56992,0 -35.3429,0 -11.23428,0.54993 -25.86422,-2.77849 -32.07576,7.2498 -3.4649,7.91997 -1.53042,17.07195 -2.14836,25.39943 0,8.78597 0,17.57611 0,26.35077 -14.59106,0 -29.20894,0 -43.8,0 -10.92711,0.42368 -21.9366,-0.54642 -32.83284,0.36826 -7.38665,0.96792 -12.76416,7.75659 -12.35439,15.01014 -0.0364,24.53127 0.007,49.0959 -0.0128,73.6218 0,13.90272 0,27.78465 0,41.68468 0.54025,9.80975 -1.00879,21.73446 1.40561,30.52258 4.22324,6.96371 11.13704,8.25714 18.1519,7.79242 23.21379,-0.11673 46.43027,-0.0444 69.61952,1.01639 3.7858,0.12723 7.03852,2.32163 10.59391,3.27877 3.99508,0.93909 8.16796,0.63434 12.22906,0.70496 z"
|
||||
/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.1 KiB |
@@ -110,9 +110,18 @@ $count2 = $result2->num_rows;
|
||||
?>
|
||||
|
||||
<html lang="ja">
|
||||
<head>
|
||||
<head prefix="og:http://ogp.me/ns#">
|
||||
<meta charset="utf-8">
|
||||
<!--OGPはじまり-->
|
||||
<meta property="og:title" content="<?php echo file_get_contents($servernamefile);?>">
|
||||
<meta property="og:description" content="<?php echo htmlentities($serverinfo);?>">
|
||||
<meta property="og:url" content="https://<?php echo htmlentities($domain, ENT_QUOTES, 'UTF-8'); ?>/">
|
||||
<meta property="og:image" content="<?php echo htmlspecialchars(file_get_contents($servericonfile), ENT_QUOTES, 'UTF-8'); ?>">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:site_name" content="<?php echo file_get_contents($servernamefile);?>">
|
||||
<!--OGPここまで-->
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
<script src="js/unsupported.js"></script>
|
||||
<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">
|
||||
<link rel="manifest" href="manifest/manifest.json" />
|
||||
@@ -156,7 +165,7 @@ if ("serviceWorker" in navigator) {
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
<h1><?php echo file_get_contents($servernamefile);;?>へようこそ!</h1>
|
||||
<h1><?php echo htmlspecialchars(file_get_contents($servernamefile));?>へようこそ!</h1>
|
||||
<?php if( !empty(file_get_contents($servericonfile)) ){ ?>
|
||||
<div class="servericon">
|
||||
<img src="<?php echo htmlspecialchars(file_get_contents($servericonfile), ENT_QUOTES, 'UTF-8'); ?>">
|
||||
@@ -166,7 +175,7 @@ if ("serviceWorker" in navigator) {
|
||||
</div>
|
||||
</div>
|
||||
<?php }else{?>
|
||||
<div class="p3"><?php echo file_get_contents($servernamefile);?></div>
|
||||
<div class="p3"><?php echo htmlspecialchars(file_get_contents($servernamefile));?></div>
|
||||
<div class="p2c"><?php echo $domain;?></div>
|
||||
<?php }?>
|
||||
|
||||
@@ -176,7 +185,7 @@ if ("serviceWorker" in navigator) {
|
||||
echo $info.'<br>';
|
||||
}?></p>
|
||||
|
||||
<a class="maillink" href="mailto:<?php echo file_get_contents($contactfile);?>">お問い合わせ : <?php echo file_get_contents($contactfile);?></a>
|
||||
<a class="maillink" href="mailto:<?php echo htmlspecialchars(file_get_contents($contactfile));?>">お問い合わせ : <?php echo file_get_contents($contactfile);?></a>
|
||||
|
||||
<?php if($onlyuser === "true"){?>
|
||||
<p>このサーバーには招待コードがないと登録できません。<br>招待コードはお手元にありますか?</p>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
/*-----Console Notice-----*/
|
||||
console.log(
|
||||
"%c警告!!!%c\nもし誰かにここに%cコピペ%cしろと言われたりCookieというものをコピーしろなどと言われているのであればその行為は%c今すぐやめて%cください。",
|
||||
"color:white; background-color:#FF4848; padding:4px; border-radius:4px; font-weight: bold; font-size: 16pt",
|
||||
@@ -27,4 +28,3 @@ console.log(
|
||||
"",
|
||||
"uwuzuサーバー運営者及びuwuzu開発者がCookie情報等を要求することはありません。",
|
||||
);
|
||||
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
/*-----Access Check-----*/
|
||||
|
||||
const ua = window.navigator.userAgent;
|
||||
/*browser*/
|
||||
if(ua.indexOf('Edge') != -1 || ua.indexOf('Edg') != -1) {
|
||||
user_agent_browser = 'Microsoft_Edge';
|
||||
} else if(ua.indexOf('Trident') != -1 || ua.indexOf('MSIE') != -1) {
|
||||
user_agent_browser = 'Microsoft_Internet_Explorer';
|
||||
} else if(ua.indexOf('OPR') != -1 || ua.indexOf('Opera') != -1) {
|
||||
user_agent_browser = 'Opera';
|
||||
} else if(ua.indexOf('Chrome') != -1) {
|
||||
user_agent_browser = 'Google_Chrome';
|
||||
} else if(ua.indexOf('Firefox') != -1) {
|
||||
user_agent_browser = 'FireFox';
|
||||
} else if(ua.indexOf('Safari') != -1) {
|
||||
user_agent_browser = 'Safari';
|
||||
} else if(ua.indexOf('NintendoBrowser') != -1) {
|
||||
user_agent_browser = 'NintendoBrowser';
|
||||
} else {
|
||||
user_agent_browser = 'Other';
|
||||
}
|
||||
|
||||
/*OS*/
|
||||
const ua2 = ua.toLowerCase();
|
||||
if(ua2.indexOf("windows nt") !== -1) {
|
||||
user_agent_os = "Microsoft_Windows_NT";
|
||||
} else if(ua.indexOf("Android") !== -1) {
|
||||
user_agent_os = "Android";
|
||||
} else if(ua.indexOf("iPhone") !== -1){
|
||||
ua.match(/iPhone OS (\w+){1,4}/g);
|
||||
var iosv=(RegExp.$1.replace(/_/g, '.')).slice(0,4);
|
||||
if(iosv >= 6.0) {
|
||||
user_agent_os = "iOS_6_Over";
|
||||
} else {
|
||||
user_agent_os = "iOS_6_Under";
|
||||
}
|
||||
} else if (ua.match(/Linux/)) {
|
||||
user_agent_os = "Linux";
|
||||
} else if(ua.indexOf("ipad") !== -1 || ua.indexOf("Mac OS X") !== -1 && typeof document.ontouchstart !== 'undefined') {
|
||||
user_agent_os = "iPad";
|
||||
} else if(ua.indexOf("Mac OS X") !== -1) {
|
||||
user_agent_os = "mac_OS";
|
||||
} else if (ua.match(/^.*\s([A-Za-z]+BSD)/)) {
|
||||
user_agent_os = RegExp.$1;
|
||||
} else if (ua.match(/SunOS/)) {
|
||||
user_agent_os = "Solaris";
|
||||
} else if (ua.match("Nintendo Wii")) {
|
||||
user_agent_os = "Nintendo_Wii";
|
||||
} else if (ua.match("PlayStation 4")) {
|
||||
user_agent_os = "SONY_PS4";
|
||||
} else if (ua.match("PlayStation 5")) {
|
||||
user_agent_os = "SONY_PS5";
|
||||
} else if (ua.match("PlayStation Vita")) {
|
||||
user_agent_os = "SONY_PSVita";
|
||||
} else if (ua.match("Nintendo Switch")) {
|
||||
user_agent_os = "Nintendo_Switch";
|
||||
} else if (ua.match("Windows Phone")) {
|
||||
user_agent_os = "Windows_Phone";
|
||||
} else {
|
||||
user_agent_os = 'Other';
|
||||
}
|
||||
|
||||
/*SSL*/
|
||||
if (location.protocol == 'http:') {
|
||||
user_agent_ssl = "not_ssl";
|
||||
} else if (location.protocol == 'https:') {
|
||||
user_agent_ssl = "ssl";
|
||||
} else {
|
||||
user_agent_ssl = "Other";
|
||||
}
|
||||
|
||||
/*Cookie*/
|
||||
if (navigator.cookieEnabled) {
|
||||
user_agent_cookie = 'cookie_on';
|
||||
} else {
|
||||
user_agent_cookie = 'cookie_off';
|
||||
}
|
||||
|
||||
/*Main Access check*/
|
||||
if (user_agent_browser == 'Microsoft_Internet_Explorer' || user_agent_browser == 'NintendoBrowser') {
|
||||
user_agent_access = 'bad';
|
||||
errcode = 'UNSUPPORTED_BROWSER';
|
||||
} else if (user_agent_os == 'Nintendo_Wii' || user_agent_os == 'SONY_PSVita' || user_agent_os == 'Nintendo_Switch' || user_agent_os == 'Windows_Phone' || user_agent_os == 'iOS_6_Under') {
|
||||
user_agent_access = 'bad';
|
||||
errcode = 'UNSUPPORTED_OS';
|
||||
} else if (user_agent_cookie == 'cookie_off') {
|
||||
user_agent_access = 'bad';
|
||||
errcode = 'PLEASE_COOKIE_ON';
|
||||
} else if (user_agent_ssl == 'Other') {
|
||||
user_agent_access = 'bad';
|
||||
errcode = 'NONE_SSL';
|
||||
} else {
|
||||
user_agent_access = 'ok';
|
||||
errcode = 'NONE_ERROR';
|
||||
}
|
||||
|
||||
/*
|
||||
console.log('browser : '+user_agent_browser);
|
||||
console.log('cookie : '+user_agent_cookie);
|
||||
console.log('os : '+user_agent_os);
|
||||
console.log('ssl : '+user_agent_ssl);
|
||||
console.log('access : '+user_agent_access);
|
||||
console.log('errorcode : '+errcode);
|
||||
*/
|
||||
|
||||
if (user_agent_access == 'bad'){
|
||||
setTimeout(link(), 0);
|
||||
function link(){
|
||||
location.href="../unsupported.php?errcode="+errcode+"&browser="+user_agent_browser+"&os="+user_agent_os+"&cookie="+user_agent_cookie+"&ssl="+user_agent_ssl+""
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
|
||||
$servericonfile = "server/servericon.txt";
|
||||
$servernamefile = "server/servername.txt";
|
||||
|
||||
$serverlogofile = "server/serverlogo.txt";
|
||||
@@ -185,9 +185,18 @@ $pdo = null;
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ja">
|
||||
<head>
|
||||
<head prefix="og:http://ogp.me/ns#">
|
||||
<meta charset="utf-8">
|
||||
<!--OGPはじまり-->
|
||||
<meta property="og:title" content="ログイン - <?php echo file_get_contents($servernamefile);?>">
|
||||
<meta property="og:description" content="<?php echo file_get_contents($servernamefile);?>にログイン">
|
||||
<meta property="og:url" content="https://<?php echo htmlentities($domain, ENT_QUOTES, 'UTF-8'); ?>/login">
|
||||
<meta property="og:image" content="<?php echo htmlspecialchars(file_get_contents($servericonfile), ENT_QUOTES, 'UTF-8'); ?>">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:site_name" content="ログイン - <?php echo file_get_contents($servernamefile);?>">
|
||||
<!--OGPここまで-->
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
<script src="js/unsupported.js"></script>
|
||||
<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">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
|
||||
@@ -15,6 +15,7 @@ function createUniqId(){
|
||||
}
|
||||
|
||||
require('db.php');
|
||||
$servericonfile = "server/servericon.txt";
|
||||
|
||||
$servernamefile = "server/servername.txt";
|
||||
|
||||
@@ -99,6 +100,40 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true && isset
|
||||
}
|
||||
}
|
||||
|
||||
function rotate($image, $exif)
|
||||
{
|
||||
$orientation = $exif['Orientation'] ?? 1;
|
||||
|
||||
switch ($orientation) {
|
||||
case 1: //no rotate
|
||||
break;
|
||||
case 2: //FLIP_HORIZONTAL
|
||||
imageflip($image, IMG_FLIP_HORIZONTAL);
|
||||
break;
|
||||
case 3: //ROTATE 180
|
||||
$image = imagerotate($image, 180, 0);
|
||||
break;
|
||||
case 4: //FLIP_VERTICAL
|
||||
imageflip($image, IMG_FLIP_VERTICAL);
|
||||
break;
|
||||
case 5: //ROTATE 270 FLIP_HORIZONTAL
|
||||
$image = imagerotate($image, 270, 0);
|
||||
imageflip($image, IMG_FLIP_HORIZONTAL);
|
||||
break;
|
||||
case 6: //ROTATE 90
|
||||
$image = imagerotate($image, 270, 0);
|
||||
break;
|
||||
case 7: //ROTATE 90 FLIP_HORIZONTAL
|
||||
$image = imagerotate($image, 90, 0);
|
||||
imageflip($image, IMG_FLIP_HORIZONTAL);
|
||||
break;
|
||||
case 8: //ROTATE 270
|
||||
$image = imagerotate($image, 90, 0);
|
||||
break;
|
||||
}
|
||||
return $image;
|
||||
}
|
||||
|
||||
if( !empty($_POST['btn_submit']) ) {
|
||||
|
||||
|
||||
@@ -170,6 +205,19 @@ if( !empty($_POST['btn_submit']) ) {
|
||||
// ファイルを移動
|
||||
$result = move_uploaded_file($uploadedFile['tmp_name'], $uploadedPath);
|
||||
|
||||
// EXIF削除
|
||||
if($extension == "jpg" || $extension == "jpeg"){
|
||||
$gd = imagecreatefromjpeg($uploadedPath);
|
||||
$w = imagesx($gd);
|
||||
$h = imagesy($gd);
|
||||
$gd_out = imagecreatetruecolor($w,$h);
|
||||
imagecopyresampled($gd_out, $gd, 0,0,0,0, $w,$h,$w,$h);
|
||||
$exif = exif_read_data($uploadedPath);
|
||||
$gd_out = rotate($gd_out, $exif);
|
||||
imagejpeg($gd_out, $uploadedPath);
|
||||
imagedestroy($gd_out);
|
||||
}
|
||||
|
||||
if ($result) {
|
||||
$iconName = $uploadedPath; // 保存されたファイルのパスを使用
|
||||
} else {
|
||||
@@ -467,9 +515,18 @@ $pdo = null;
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ja">
|
||||
<head>
|
||||
<head prefix="og:http://ogp.me/ns#">
|
||||
<meta charset="utf-8">
|
||||
<!--OGPはじまり-->
|
||||
<meta property="og:title" content="アカウント登録 - <?php echo file_get_contents($servernamefile);?>">
|
||||
<meta property="og:description" content="<?php echo file_get_contents($servernamefile);?>にアカウント登録">
|
||||
<meta property="og:url" content="https://<?php echo htmlentities($domain, ENT_QUOTES, 'UTF-8'); ?>/new">
|
||||
<meta property="og:image" content="<?php echo htmlspecialchars(file_get_contents($servericonfile), ENT_QUOTES, 'UTF-8'); ?>">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:site_name" content="アカウント登録 - <?php echo file_get_contents($servernamefile);?>">
|
||||
<!--OGPここまで-->
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
<script src="js/unsupported.js"></script>
|
||||
<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">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
|
||||
+70
-6
@@ -3,11 +3,6 @@
|
||||
function processMarkdownAndWrapEmptyLines($markdownText){
|
||||
|
||||
$markdownText = preg_replace('/^\[\[buruburu (.+)\]\]/m', '<p class="buruburu">$1</p>', $markdownText);//←ここ!!!!!!!!!!!!!!
|
||||
// コード(#code)をHTMLのdiv class="code"タグに変換
|
||||
$markdownText = preg_replace('/^#code (.+)/m', '<div class="code"><p>$1</p></div>', $markdownText);
|
||||
|
||||
// 画像(#img)をHTMLのimgタグに変換
|
||||
$markdownText = preg_replace('/^#img (.+)/m', '<img src="$1">', $markdownText);
|
||||
|
||||
// タイトル(#、##、###)をHTMLのhタグに変換
|
||||
$markdownText = preg_replace('/^# (.+)/m', '<h1>$1</h1>', $markdownText);
|
||||
@@ -15,7 +10,7 @@ function processMarkdownAndWrapEmptyLines($markdownText){
|
||||
$markdownText = preg_replace('/^### (.+)/m', '<h3>$1</h3>', $markdownText);
|
||||
|
||||
// 箇条書き(-)をHTMLのul/liタグに変換
|
||||
$markdownText = preg_replace('/^- (.+)/m', '<ul><li>$1</li></ul>', $markdownText);
|
||||
$markdownText = preg_replace('/^- (.+)/m', '<p>・ $1</p>', $markdownText);
|
||||
|
||||
// 空行の前に何もない行をHTMLのpタグに変換
|
||||
$markdownText = preg_replace('/(^\s*)(?!\s)(.*)/m', '$1<p>$2</p>', $markdownText);
|
||||
@@ -64,6 +59,9 @@ function replaceEmojisWithImages($postText) {
|
||||
return $postTextWithHashtags;
|
||||
}
|
||||
function replaceURLsWithLinks($postText) {
|
||||
|
||||
$postText = str_replace(''', '\'', $postText);
|
||||
|
||||
// URLを正規表現を使って検出
|
||||
$pattern = '/(https:\/\/[^\s<>\[\]\'"]+)/'; // 改良された正規表現
|
||||
preg_match_all($pattern, $postText, $matches);
|
||||
@@ -87,6 +85,68 @@ function replaceURLsWithLinks($postText) {
|
||||
|
||||
return $postText;
|
||||
}
|
||||
function YouTube_and_nicovideo_Links($postText) {
|
||||
// URLを正規表現を使って検出
|
||||
$pattern = '/(https:\/\/[^\s<>\[\]\'"]+)/'; // 改良された正規表現
|
||||
preg_match_all($pattern, $postText, $matches);
|
||||
|
||||
if(empty($url)){
|
||||
$postText = "";
|
||||
}
|
||||
|
||||
// 検出したURLごとに処理を行う
|
||||
foreach ($matches[0] as $url) {
|
||||
// ドメイン部分を抽出
|
||||
$parsedUrl = parse_url($url);
|
||||
if($parsedUrl['host'] == "youtube.com" || $parsedUrl['host'] == "youtu.be" || $parsedUrl['host'] == "www.youtube.com"){
|
||||
|
||||
if (isset($parsedUrl['query'])) {
|
||||
if(false !== strpos($parsedUrl['query'], 'v=')) {
|
||||
$video_id = str_replace('v=', '', htmlentities($parsedUrl['query']));
|
||||
$iframe = true;
|
||||
}else{
|
||||
$video_id = str_replace('/', '', htmlentities($parsedUrl['path']));
|
||||
$iframe = true;
|
||||
}
|
||||
}elseif(isset($parsedUrl['path'])){
|
||||
$video_id = str_replace('/', '', htmlentities($parsedUrl['path']));
|
||||
$iframe = true;
|
||||
}else{
|
||||
$video_id = "";
|
||||
$iframe = false;
|
||||
}
|
||||
// 不要な文字を削除してaタグを生成
|
||||
if($iframe == true){
|
||||
$link = '<iframe src="https://www.youtube-nocookie.com/embed/'.$video_id.'" rel="0" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>';
|
||||
}else{
|
||||
$link = "";
|
||||
}
|
||||
// URLをドメインのみを表示するaタグで置き換え
|
||||
$postText = $link;
|
||||
}elseif($parsedUrl['host'] == "nicovideo.jp" || $parsedUrl['host'] == "www.nicovideo.jp"){
|
||||
|
||||
if(isset($parsedUrl['path'])){
|
||||
$video_id = str_replace('/watch/', '', htmlentities($parsedUrl['path']));
|
||||
$iframe = true;
|
||||
}else{
|
||||
$video_id = "";
|
||||
$iframe = false;
|
||||
}
|
||||
// 不要な文字を削除してaタグを生成
|
||||
if($iframe == true){
|
||||
$link = '<iframe src="https://embed.nicovideo.jp/watch/'.$video_id.'"</iframe>';
|
||||
}else{
|
||||
$link = "";
|
||||
}
|
||||
// URLをドメインのみを表示するaタグで置き換え
|
||||
$postText = $link;
|
||||
}else{
|
||||
$postText = "";
|
||||
}
|
||||
}
|
||||
|
||||
return $postText;
|
||||
}
|
||||
|
||||
class MessageDisplay {
|
||||
private $value;
|
||||
@@ -186,6 +246,10 @@ class MessageDisplay {
|
||||
echo ' <div class="video1">';
|
||||
echo ' <video controls src="' . htmlentities($this->value['video1']) . '"></video>';
|
||||
echo ' </div>';
|
||||
}elseif (!empty(YouTube_and_nicovideo_Links($this->value['ueuse']))) {
|
||||
echo ' <div class="youtube_and_nicovideo_player">';
|
||||
echo ' '.YouTube_and_nicovideo_Links($this->value['ueuse']).'';
|
||||
echo ' </iframe></div>';
|
||||
}
|
||||
|
||||
if(!($this->value['abi'] == "none")){
|
||||
|
||||
+11
-9
@@ -27,9 +27,6 @@ session_name('uwuzu_s_id');
|
||||
session_start();
|
||||
session_regenerate_id(true);
|
||||
|
||||
$userid = htmlentities($_SESSION['userid']);
|
||||
$username = htmlentities($_SESSION['username']);
|
||||
|
||||
try {
|
||||
|
||||
$option = array(
|
||||
@@ -46,7 +43,7 @@ try {
|
||||
|
||||
if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_SESSION['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -55,11 +52,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_SESSION['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($_SESSION['username']); // セッションに格納されている値をそのままセット
|
||||
$userid = htmlentities($res['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($res['username']); // セッションに格納されている値をそのままセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -92,7 +91,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
} elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_COOKIE['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -101,11 +100,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_COOKIE['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($_COOKIE['username']); // クッキーから取得した値をセット
|
||||
$userid = htmlentities($res['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($res['username']); // クッキーから取得した値をセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -271,6 +272,7 @@ $pdo = null;
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="../css/home.css">
|
||||
<script src="../js/unsupported.js"></script>
|
||||
<script src="../js/console_notice.js"></script>
|
||||
<link rel="apple-touch-icon" type="image/png" href="../favicon/apple-touch-icon-180x180.png">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
|
||||
|
||||
+11
-10
@@ -28,10 +28,6 @@ session_name('uwuzu_s_id');
|
||||
session_start();
|
||||
session_regenerate_id(true);
|
||||
|
||||
$userid = htmlentities($_SESSION['userid']);
|
||||
$username = htmlentities($_SESSION['username']);
|
||||
|
||||
|
||||
try {
|
||||
|
||||
$option = array(
|
||||
@@ -48,7 +44,7 @@ try {
|
||||
|
||||
if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_SESSION['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -57,11 +53,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_SESSION['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($_SESSION['username']); // セッションに格納されている値をそのままセット
|
||||
$userid = htmlentities($res['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($res['username']); // セッションに格納されている値をそのままセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -94,7 +92,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
} elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_COOKIE['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -103,11 +101,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_COOKIE['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($_COOKIE['username']); // クッキーから取得した値をセット
|
||||
$userid = htmlentities($res['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($res['username']); // クッキーから取得した値をセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -169,6 +169,7 @@ $pdo = null;
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<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>
|
||||
<link rel="stylesheet" href="../css/home.css">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
|
||||
+62
-9
@@ -32,9 +32,6 @@ session_name('uwuzu_s_id');
|
||||
session_start();
|
||||
session_regenerate_id(true);
|
||||
|
||||
$userid = htmlentities($_SESSION['userid']);
|
||||
$username = htmlentities($_SESSION['username']);
|
||||
|
||||
// 管理者としてログインしているか確認
|
||||
if( empty($_SESSION['admin_login']) || $_SESSION['admin_login'] !== true ) {
|
||||
// ログインページへリダイレクト
|
||||
@@ -59,7 +56,7 @@ try {
|
||||
|
||||
if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_SESSION['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -68,11 +65,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_SESSION['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($_SESSION['username']); // セッションに格納されている値をそのままセット
|
||||
$userid = htmlentities($res['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($res['username']); // セッションに格納されている値をそのままセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -105,7 +104,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
} elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_COOKIE['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -114,11 +113,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_COOKIE['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($_COOKIE['username']); // クッキーから取得した値をセット
|
||||
$userid = htmlentities($res['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($res['username']); // クッキーから取得した値をセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -476,6 +477,7 @@ require('../logout/logout.php');
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="../css/home.css">
|
||||
<script src="../js/unsupported.js"></script>
|
||||
<script src="../js/console_notice.js"></script>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
|
||||
@@ -554,10 +556,61 @@ require('../logout/logout.php');
|
||||
<p>以下のボタンよりアクセストークンを削除できます。ボタンを押すとすぐに削除されますのでご注意ください。</p>
|
||||
<input type="submit" class = "irobutton" name="token_off_submit" value="アクセストークン削除">
|
||||
<?php }?>
|
||||
<hr>
|
||||
<div class="p2" id="help_me">もしものときは</div>
|
||||
|
||||
</form>
|
||||
|
||||
<div id="help_me_Modal" class="modal">
|
||||
<div class="modal-content">
|
||||
<h1>もしものときは</h1>
|
||||
<p>こんにちは、uwuzu開発者のだいちまるです。<br>ここを見ているということはなにかあったのでしょうか...<br>心配です。</p>
|
||||
<p>もし炎上をしてしまったり、インターネットによる心身のつらさなどに襲われ生きづらかったり周りと触れづらい状態にあるならば信頼できる人への相談や失踪をして、インターネットの海から離れるのも良いかもしれません。</p>
|
||||
<p>インターネットが全てではないですし、このサーバーからいなくなるだけでも気が楽になるかもしれません。</p>
|
||||
<p>一度ゆっくり休んでから人生を再開してみてはいかがでしょうか、自分を第一に、自分を大事に。<br>そして、インターネットは情報の海であることを忘れないように。</p>
|
||||
|
||||
<form method="post" id="deleteForm">
|
||||
<div class="btn_area">
|
||||
<input type="button" id="cancelButton" class="fbtn" value="とじる">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<?php require('../require/rightbox.php');?>
|
||||
<?php require('../require/botbox.php');?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
var modal = document.getElementById('help_me_Modal');
|
||||
var cancelButton = document.getElementById('cancelButton');
|
||||
var modalMain = $('.modal-content');
|
||||
|
||||
$('#help_me').on('click', function() {
|
||||
modal.style.display = 'block';
|
||||
modalMain.addClass("slideUp");
|
||||
modalMain.removeClass("slideDown");
|
||||
|
||||
cancelButton.addEventListener('click', () => { // 追加
|
||||
modalMain.removeClass("slideUp");
|
||||
modalMain.addClass("slideDown");
|
||||
window.setTimeout(function(){
|
||||
modal.style.display = 'none';
|
||||
}, 150);
|
||||
});
|
||||
});
|
||||
$(function(){
|
||||
$("input"). keydown(function(e) {
|
||||
if ((e.which && e.which === 13) || (e.keyCode && e.keyCode === 13)) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
+13
-8
@@ -23,8 +23,8 @@ $res = null;
|
||||
$option = null;
|
||||
|
||||
|
||||
$userid = $_SESSION['userid'];
|
||||
$token = $_SESSION['token'];
|
||||
$userid = htmlentities($_SESSION['userid']);
|
||||
$token = htmlentities($_SESSION['token']);
|
||||
|
||||
|
||||
try {
|
||||
@@ -43,7 +43,7 @@ try {
|
||||
|
||||
if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_SESSION['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -52,11 +52,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_SESSION['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($_SESSION['username']); // セッションに格納されている値をそのままセット
|
||||
$userid = htmlentities($res['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($res['username']); // セッションに格納されている値をそのままセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -89,7 +91,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
} elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_COOKIE['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -98,11 +100,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_COOKIE['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($_COOKIE['username']); // クッキーから取得した値をセット
|
||||
$userid = htmlentities($res['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($res['username']); // クッキーから取得した値をセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -163,6 +167,7 @@ require('../logout/logout.php');
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="../css/home.css">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<script src="../js/unsupported.js"></script>
|
||||
<script src="../js/console_notice.js"></script>
|
||||
<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">
|
||||
|
||||
@@ -16,6 +16,7 @@ for( $i=0;$i<$cnt;$i++ ){
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="../css/style.css">
|
||||
<script src="../js/unsupported.js"></script>
|
||||
<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">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
|
||||
@@ -16,6 +16,7 @@ for( $i=0;$i<$cnt;$i++ ){
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="../css/style.css">
|
||||
<script src="../js/unsupported.js"></script>
|
||||
<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">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
|
||||
@@ -142,6 +142,7 @@ $pdo = null;
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="../css/style.css">
|
||||
<script src="../js/unsupported.js"></script>
|
||||
<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">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
|
||||
@@ -239,6 +239,7 @@ $pdo = null;
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="../css/style.css">
|
||||
<script src="../js/unsupported.js"></script>
|
||||
<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">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
<div class="modal-content">
|
||||
<p>メニュー</p>
|
||||
<div class="bot_menu_area">
|
||||
<a href="/others" class="menubutton"><svg><use xlink:href="../img/sysimage/menuicon/others.svg#others"></use></svg><div>その他</div></a>
|
||||
<a href="/emoji" class="menubutton"><svg><use xlink:href="../img/sysimage/menuicon/emoji.svg#emoji"></use></svg><div>絵文字</div></a>
|
||||
<a href="/@<?php echo $userid; ?>" class="menubutton"><svg><use xlink:href="../img/sysimage/menuicon/profile.svg#profile"></use></svg><div>プロフィール</div></a>
|
||||
<a href="/settings" class="menubutton"><svg><use xlink:href="../img/sysimage/menuicon/settings.svg#settings"></use></svg><div>設定</div></a>
|
||||
|
||||
@@ -60,6 +60,8 @@ foreach ($sprivacypolicy as $privacypolicy) {
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="../css/home.css">
|
||||
<script src="../js/unsupported.js"></script>
|
||||
<script src="../js/console_notice.js"></script>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<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">
|
||||
|
||||
@@ -77,6 +77,8 @@ foreach ($srelease as $release) {
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="../css/home.css">
|
||||
<script src="../js/unsupported.js"></script>
|
||||
<script src="../js/console_notice.js"></script>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<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">
|
||||
|
||||
@@ -83,6 +83,8 @@ $count2 = $result2->num_rows;
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="../css/home.css">
|
||||
<script src="../js/unsupported.js"></script>
|
||||
<script src="../js/console_notice.js"></script>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<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">
|
||||
|
||||
@@ -60,6 +60,8 @@ foreach ($sterms as $terms) {
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="../css/home.css">
|
||||
<script src="../js/unsupported.js"></script>
|
||||
<script src="../js/console_notice.js"></script>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<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">
|
||||
|
||||
@@ -69,6 +69,8 @@ foreach ($sterms as $terms) {
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="../css/home.css">
|
||||
<script src="../js/unsupported.js"></script>
|
||||
<script src="../js/console_notice.js"></script>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<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">
|
||||
|
||||
+47
-6
@@ -44,7 +44,7 @@ try {
|
||||
|
||||
if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_SESSION['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -53,11 +53,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_SESSION['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($_SESSION['username']); // セッションに格納されている値をそのままセット
|
||||
$userid = htmlentities($res['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($res['username']); // セッションに格納されている値をそのままセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -90,7 +92,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
} elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_COOKIE['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -99,11 +101,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_COOKIE['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($_COOKIE['username']); // クッキーから取得した値をセット
|
||||
$userid = htmlentities($res['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($res['username']); // クッキーから取得した値をセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -178,6 +182,7 @@ $pdo = null;
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<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>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
@@ -193,6 +198,11 @@ $pdo = null;
|
||||
<?php require('../require/leftbox.php');?>
|
||||
|
||||
<main class="outer">
|
||||
<div>
|
||||
<div id="clipboard" class="online" style="display:none;">
|
||||
<p>🗒️📎 ユーズのURLをコピーしました!</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if( !empty($error_message) ): ?>
|
||||
<ul class="errmsg">
|
||||
@@ -426,6 +436,7 @@ $(document).ready(function() {
|
||||
abimodal.style.display = 'none';
|
||||
}, 150);
|
||||
});
|
||||
});
|
||||
|
||||
$('#AbiForm').off('submit').on('submit', function (event) {
|
||||
|
||||
@@ -467,6 +478,36 @@ $(document).ready(function() {
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '.share', function (event) {
|
||||
|
||||
var domain = "<?php echo $domain;?>";
|
||||
var share_uniqid = $(this).attr('data-uniqid');
|
||||
var share_userid = $(this).attr('data-userid');
|
||||
|
||||
if (typeof navigator.share === 'undefined') {
|
||||
navigator.clipboard.writeText("https://"+domain+"/!"+share_uniqid+"")
|
||||
$("#clipboard").show();
|
||||
window.setTimeout(function(){
|
||||
$("#clipboard").hide();
|
||||
}, 5000);
|
||||
return;
|
||||
}
|
||||
|
||||
var shareData = {
|
||||
title: ''+share_userid+'さんのID '+share_uniqid+' のユーズ - uwuzu',
|
||||
text: '',
|
||||
url: "https://"+domain+"/!"+share_uniqid+"",
|
||||
};
|
||||
|
||||
navigator.share(shareData)
|
||||
.then(function () {
|
||||
// シェア完了後の処理
|
||||
})
|
||||
.catch(function (error) {
|
||||
// シェア失敗時の処理
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
今現在サーバーは停止していません
|
||||
もしサーバーを止めるならここに理由書こう
|
||||
@@ -1,4 +1,4 @@
|
||||
uwuzu
|
||||
1.2.26
|
||||
2023/11/15
|
||||
1.2.27
|
||||
2023/11/29
|
||||
daichimarukana,putonfps
|
||||
@@ -1,6 +1,48 @@
|
||||
## リリースノートだぜぇぇぇぇぇぇい!!!!!!!
|
||||
ここにはuwuzuの更新情報を載せてくぜぇ~!(いやまてテンションおかしいだろ...)
|
||||
|
||||
## Version 1.2.27
|
||||
リリース日:2023/11/29
|
||||
fix: 検索時にシェアボタンが使用できない問題を修正しました!
|
||||
fix: ユーズ内Markdown使用時に、「- 」(箇条書き)を使用すると表示がおかしくなる問題を修正しました。
|
||||
fix: 絵文字一覧にて絵文字が横に長過ぎると絵文字のidが画面からはみ出てしまう問題を修正しました。
|
||||
fix: ページ移動時にセッションが不安定になってしまう問題をある程度修正しました。
|
||||
fix: ユーズにおいて使用不可なMarkdown表記を削除しました。
|
||||
fix: php8.1以上にアップデートした際に「'」が「'」と表示されてしまう問題を修正しました。
|
||||
fix: ユーザー名及びユーザーIDの取得元がセッションもしくはCookieになっており、正しく処理を行えなくなる問題を修正しました。
|
||||
fix: 脆弱性を修正しました。
|
||||
chg: 通知でのユーザー表記をID表記に統一しました。
|
||||
chg: アイコン・ヘッダーにJPEG画像を設定した際にEXIF情報を削除するようにしました。
|
||||
chg: JPEG画像投稿時にEXIF情報を削除するようにしました。
|
||||
バグなどが残っている可能性があるため「画像のEXIF情報(位置情報など)は削除されません。情報漏洩に気をつけてくださいね…」という表記は残しております。
|
||||
chg: serverinfo-apiにusageを追加しました。ユーザー数と投稿数が確認できます。
|
||||
chg: サーバー停止時表示メッセージの編集画面をサーバーメンテナンス機能に移動しました。
|
||||
chg: エラーページにもfaviconを表示するようにしました。
|
||||
chg: エラーページにて上部のロゴからホーム画面へ戻ることを可能にしました。
|
||||
chg: UIを一部変更しました。
|
||||
chg: APIのCORS公開範囲を設定し、どのオリジンに対してもリソースを共有するようにしました。
|
||||
new: 古いブラウザなどを非対応としてアクセスできないようにしました。
|
||||
非対応ブラウザ一覧
|
||||
- Nintendo Browser
|
||||
- Microsoft Internet Explorer
|
||||
非対応OS・端末一覧
|
||||
- iOS 6.0以前のiOS搭載端末
|
||||
- Nintendo Wii
|
||||
- Nintendo Switch
|
||||
- SONY PlayStation Vita
|
||||
- Windows Phone
|
||||
その他の非対応条件
|
||||
- Cookieが無効の場合
|
||||
new: ユーズ内にYouTubeとニコニコ動画の動画リンクを貼り付けて投稿した際に自動的に投稿内に埋め込みが作成される機能を実装しました。
|
||||
なお、埋め込みで表示されるURLは1つまです。
|
||||
もし複数のURLを貼り付けた場合は一番最後の動画リンクの埋め込みが作成されます。
|
||||
ユーズに動画が添付されている場合、この機能は動作しません。
|
||||
new: トップページとログイン、アカウント登録画面にOGPを設定しました。
|
||||
new: サーバーメンテナンス機能を追加しました
|
||||
サーバー停止時表示メッセージの編集とサーバーの停止が出来ます。
|
||||
サーバー停止後、復旧にはそれまで使用していた.htaccessファイルが必要です。
|
||||
サーバー停止前に.htaccessファイルを保存しておいてください。
|
||||
|
||||
## Version 1.2.26
|
||||
リリース日:2023/11/15
|
||||
fix: 特殊記号を含む通知で表示がバグっちゃう問題を修正しました~
|
||||
|
||||
@@ -36,7 +36,7 @@ $res = null;
|
||||
$option = null;
|
||||
|
||||
|
||||
$userid = $_SESSION['userid'];
|
||||
$userid = htmlentities($_SESSION['userid']);
|
||||
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ try {
|
||||
|
||||
if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_SESSION['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -65,11 +65,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_SESSION['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($_SESSION['username']); // セッションに格納されている値をそのままセット
|
||||
$userid = htmlentities($res['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($res['username']); // セッションに格納されている値をそのままセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -102,7 +104,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
} elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_COOKIE['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -111,11 +113,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_COOKIE['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($_COOKIE['username']); // クッキーから取得した値をセット
|
||||
$userid = htmlentities($res['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($res['username']); // クッキーから取得した値をセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -244,6 +248,7 @@ $pdo = null;
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="../css/home.css">
|
||||
<script src="../js/unsupported.js"></script>
|
||||
<script src="../js/console_notice.js"></script>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
|
||||
|
||||
+69
-9
@@ -27,9 +27,6 @@ session_name('uwuzu_s_id');
|
||||
session_start();
|
||||
session_regenerate_id(true);
|
||||
|
||||
$userid = htmlentities($_SESSION['userid']);
|
||||
$username = htmlentities($_SESSION['username']);
|
||||
|
||||
try {
|
||||
|
||||
$option = array(
|
||||
@@ -46,7 +43,7 @@ try {
|
||||
|
||||
if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_SESSION['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -55,11 +52,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_SESSION['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($_SESSION['username']); // セッションに格納されている値をそのままセット
|
||||
$userid = htmlentities($res['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($res['username']); // セッションに格納されている値をそのままセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -92,7 +91,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
} elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_COOKIE['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -101,11 +100,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_COOKIE['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($_COOKIE['username']); // クッキーから取得した値をセット
|
||||
$userid = htmlentities($res['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($res['username']); // クッキーから取得した値をセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -445,7 +446,39 @@ if( !empty($_POST['logout']) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
function rotate($image, $exif)
|
||||
{
|
||||
$orientation = $exif['Orientation'] ?? 1;
|
||||
|
||||
switch ($orientation) {
|
||||
case 1: //no rotate
|
||||
break;
|
||||
case 2: //FLIP_HORIZONTAL
|
||||
imageflip($image, IMG_FLIP_HORIZONTAL);
|
||||
break;
|
||||
case 3: //ROTATE 180
|
||||
$image = imagerotate($image, 180, 0);
|
||||
break;
|
||||
case 4: //FLIP_VERTICAL
|
||||
imageflip($image, IMG_FLIP_VERTICAL);
|
||||
break;
|
||||
case 5: //ROTATE 270 FLIP_HORIZONTAL
|
||||
$image = imagerotate($image, 270, 0);
|
||||
imageflip($image, IMG_FLIP_HORIZONTAL);
|
||||
break;
|
||||
case 6: //ROTATE 90
|
||||
$image = imagerotate($image, 270, 0);
|
||||
break;
|
||||
case 7: //ROTATE 90 FLIP_HORIZONTAL
|
||||
$image = imagerotate($image, 90, 0);
|
||||
imageflip($image, IMG_FLIP_HORIZONTAL);
|
||||
break;
|
||||
case 8: //ROTATE 270
|
||||
$image = imagerotate($image, 90, 0);
|
||||
break;
|
||||
}
|
||||
return $image;
|
||||
}
|
||||
|
||||
if( !empty($_POST['img1btn_submit']) ) {
|
||||
|
||||
@@ -465,6 +498,19 @@ if( !empty($_POST['img1btn_submit']) ) {
|
||||
// ファイルを移動
|
||||
$result = move_uploaded_file($uploadedFile['tmp_name'], '../'.$uploadedPath);
|
||||
|
||||
// EXIF削除
|
||||
if($extension == "jpg" || $extension == "jpeg"){
|
||||
$gd = imagecreatefromjpeg('../'.$uploadedPath);
|
||||
$w = imagesx($gd);
|
||||
$h = imagesy($gd);
|
||||
$gd_out = imagecreatetruecolor($w,$h);
|
||||
imagecopyresampled($gd_out, $gd, 0,0,0,0, $w,$h,$w,$h);
|
||||
$exif = exif_read_data('../'.$uploadedPath);
|
||||
$gd_out = rotate($gd_out, $exif);
|
||||
imagejpeg($gd_out, '../'.$uploadedPath);
|
||||
imagedestroy($gd_out);
|
||||
}
|
||||
|
||||
if ($result) {
|
||||
$headName = $uploadedPath; // 保存されたファイルのパスを使用
|
||||
} else {
|
||||
@@ -564,6 +610,19 @@ if( !empty($_POST['img2btn_submit']) ) {
|
||||
// ファイルを移動
|
||||
$result = move_uploaded_file($uploadedFile['tmp_name'], '../'.$uploadedPath);
|
||||
|
||||
// EXIF削除
|
||||
if($extension == "jpg" || $extension == "jpeg"){
|
||||
$gd = imagecreatefromjpeg('../'.$uploadedPath);
|
||||
$w = imagesx($gd);
|
||||
$h = imagesy($gd);
|
||||
$gd_out = imagecreatetruecolor($w,$h);
|
||||
imagecopyresampled($gd_out, $gd, 0,0,0,0, $w,$h,$w,$h);
|
||||
$exif = exif_read_data('../'.$uploadedPath);
|
||||
$gd_out = rotate($gd_out, $exif);
|
||||
imagejpeg($gd_out, '../'.$uploadedPath);
|
||||
imagedestroy($gd_out);
|
||||
}
|
||||
|
||||
if ($result) {
|
||||
$iconName = $uploadedPath; // 保存されたファイルのパスを使用
|
||||
} else {
|
||||
@@ -710,6 +769,7 @@ $pdo = null;
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="../css/home.css">
|
||||
<script src="../js/unsupported.js"></script>
|
||||
<script src="../js/console_notice.js"></script>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
|
||||
|
||||
+13
-8
@@ -23,8 +23,8 @@ $res = null;
|
||||
$option = null;
|
||||
|
||||
|
||||
$userid = $_SESSION['userid'];
|
||||
$backupcode = $_SESSION['backupcode'];
|
||||
$userid = htmlentities($_SESSION['userid']);
|
||||
$backupcode = htmlentities($_SESSION['backupcode']);
|
||||
|
||||
|
||||
try {
|
||||
@@ -43,7 +43,7 @@ try {
|
||||
|
||||
if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_SESSION['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -52,11 +52,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_SESSION['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($_SESSION['username']); // セッションに格納されている値をそのままセット
|
||||
$userid = htmlentities($res['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($res['username']); // セッションに格納されている値をそのままセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -89,7 +91,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
} elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_COOKIE['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -98,11 +100,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_COOKIE['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($_COOKIE['username']); // クッキーから取得した値をセット
|
||||
$userid = htmlentities($res['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($res['username']); // クッキーから取得した値をセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -162,6 +166,7 @@ require('../logout/logout.php');
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="../css/home.css">
|
||||
<script src="../js/unsupported.js"></script>
|
||||
<script src="../js/console_notice.js"></script>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
|
||||
|
||||
@@ -67,7 +67,7 @@ try {
|
||||
}
|
||||
if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_SESSION['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -76,11 +76,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_SESSION['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($_SESSION['username']); // セッションに格納されている値をそのままセット
|
||||
$userid = htmlentities($res['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($res['username']); // セッションに格納されている値をそのままセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -113,7 +115,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
} elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_COOKIE['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -122,11 +124,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_COOKIE['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($_COOKIE['username']); // クッキーから取得した値をセット
|
||||
$userid = htmlentities($res['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($res['username']); // クッキーから取得した値をセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -304,6 +308,7 @@ if (!empty($pdo)) {
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="../css/home.css">
|
||||
<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>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<link rel="apple-touch-icon" type="image/png" href="../favicon/apple-touch-icon-180x180.png">
|
||||
|
||||
@@ -67,7 +67,7 @@ try {
|
||||
}
|
||||
if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_SESSION['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -76,11 +76,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_SESSION['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($_SESSION['username']); // セッションに格納されている値をそのままセット
|
||||
$userid = htmlentities($res['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($res['username']); // セッションに格納されている値をそのままセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -113,7 +115,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
} elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_COOKIE['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -122,11 +124,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_COOKIE['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($_COOKIE['username']); // クッキーから取得した値をセット
|
||||
$userid = htmlentities($res['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($res['username']); // クッキーから取得した値をセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -273,6 +277,7 @@ require('../logout/logout.php');
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="../css/home.css">
|
||||
<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>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<link rel="apple-touch-icon" type="image/png" href="../favicon/apple-touch-icon-180x180.png">
|
||||
|
||||
@@ -64,7 +64,7 @@ try {
|
||||
}
|
||||
if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_SESSION['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -73,11 +73,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_SESSION['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($_SESSION['username']); // セッションに格納されている値をそのままセット
|
||||
$userid = htmlentities($res['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($res['username']); // セッションに格納されている値をそのままセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -110,7 +112,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
} elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_COOKIE['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -119,11 +121,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_COOKIE['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($_COOKIE['username']); // クッキーから取得した値をセット
|
||||
$userid = htmlentities($res['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($res['username']); // クッキーから取得した値をセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -249,6 +253,7 @@ require('../logout/logout.php');
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="../css/home.css">
|
||||
<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>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<link rel="apple-touch-icon" type="image/png" href="../favicon/apple-touch-icon-180x180.png">
|
||||
|
||||
@@ -0,0 +1,339 @@
|
||||
<?php
|
||||
|
||||
$servernamefile = "../server/servername.txt";
|
||||
|
||||
$contactfile = "../server/contact.txt";
|
||||
|
||||
$adminfile = "../server/admininfo.txt";
|
||||
|
||||
$serverstopfile = "../server/serverstop.txt";
|
||||
|
||||
$htaccessfile = "../.htaccess";
|
||||
|
||||
if(!empty(file_get_contents($serverstopfile))){
|
||||
$serverstop = htmlspecialchars(file_get_contents($serverstopfile), ENT_QUOTES, 'UTF-8');
|
||||
}else{
|
||||
$serverstop = "";
|
||||
}
|
||||
|
||||
function createUniqId(){
|
||||
list($msec, $sec) = explode(" ", microtime());
|
||||
$hashCreateTime = $sec.floor($msec*1000000);
|
||||
|
||||
$hashCreateTime = strrev($hashCreateTime);
|
||||
|
||||
return base_convert($hashCreateTime,10,36);
|
||||
}
|
||||
function random_code($length = 8){
|
||||
return substr(str_shuffle('1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'), 0, $length);
|
||||
}
|
||||
|
||||
require('../db.php');
|
||||
|
||||
// 変数の初期化
|
||||
$datetime = array();
|
||||
$user_name = null;
|
||||
$message = array();
|
||||
$message_data = null;
|
||||
$error_message = array();
|
||||
$pdo = null;
|
||||
$stmt = null;
|
||||
$res = null;
|
||||
$option = null;
|
||||
|
||||
session_name('uwuzu_s_id');
|
||||
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=UTF8;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', htmlentities($_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 = htmlentities($res['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($res['username']); // セッションに格納されている値をそのままセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($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',
|
||||
]);
|
||||
setcookie('username', $username,[
|
||||
'expires' => time() + 60 * 60 * 24 * 14,
|
||||
'path' => '/',
|
||||
'samesite' => 'lax',
|
||||
]);
|
||||
setcookie('loginid', $res["loginid"],[
|
||||
'expires' => time() + 60 * 60 * 24 * 14,
|
||||
'path' => '/',
|
||||
'samesite' => 'lax',
|
||||
]);
|
||||
setcookie('admin_login', true,[
|
||||
'expires' => time() + 60 * 60 * 24 * 14,
|
||||
'path' => '/',
|
||||
'samesite' => 'lax',
|
||||
]);
|
||||
}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', htmlentities($_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 = htmlentities($res['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($res['username']); // クッキーから取得した値をセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($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',
|
||||
]);
|
||||
setcookie('username', $username,[
|
||||
'expires' => time() + 60 * 60 * 24 * 14,
|
||||
'path' => '/',
|
||||
'samesite' => 'lax',
|
||||
]);
|
||||
setcookie('loginid', $res["loginid"],[
|
||||
'expires' => time() + 60 * 60 * 24 * 14,
|
||||
'path' => '/',
|
||||
'samesite' => 'lax',
|
||||
]);
|
||||
setcookie('admin_login', true,[
|
||||
'expires' => time() + 60 * 60 * 24 * 14,
|
||||
'path' => '/',
|
||||
'samesite' => 'lax',
|
||||
]);
|
||||
}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) ) {
|
||||
|
||||
// データベース接続の設定
|
||||
$dbh = new PDO('mysql:charset=UTF8;dbname='.DB_NAME.';host='.DB_HOST, DB_USER, DB_PASS, array(
|
||||
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
|
||||
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
|
||||
PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true,
|
||||
));
|
||||
|
||||
$userQuery = $dbh->prepare("SELECT username, userid, profile, role FROM account WHERE userid = :userid");
|
||||
$userQuery->bindValue(':userid', $userid);
|
||||
$userQuery->execute();
|
||||
$userData = $userQuery->fetch();
|
||||
|
||||
$role = $userData["role"];
|
||||
|
||||
$dbh = new PDO('mysql:charset=UTF8;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option);
|
||||
|
||||
$rerole = $dbh->prepare("SELECT username, userid, password, mailadds, profile, iconname, headname, role, datetime FROM account WHERE userid = :userid");
|
||||
|
||||
$rerole->bindValue(':userid', $userid);
|
||||
// SQL実行
|
||||
$rerole->execute();
|
||||
|
||||
$userdata = $rerole->fetch(); // ここでデータベースから取得した値を $role に代入する
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (!empty($pdo)) {
|
||||
|
||||
$sql = "SELECT code,used,datetime FROM invitation ORDER BY datetime DESC";
|
||||
$invcode = $pdo->query($sql);
|
||||
|
||||
while ($row = $invcode->fetch(PDO::FETCH_ASSOC)) {
|
||||
|
||||
$codes[] = $row;
|
||||
}
|
||||
}
|
||||
|
||||
if( !empty($_POST['btn_submit']) ) {
|
||||
|
||||
// 空白除去
|
||||
$serverstop = $_POST['serverstop'];
|
||||
|
||||
//鯖停止
|
||||
$file = fopen($serverstopfile, 'w');
|
||||
$data = $serverstop;
|
||||
fputs($file, $data);
|
||||
fclose($file);
|
||||
|
||||
$url = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
||||
header("Location:".$url."");
|
||||
exit;
|
||||
}
|
||||
|
||||
if( !empty($_POST['serverstop_btn_submit']) ) {
|
||||
|
||||
// htaccess用意
|
||||
$htaccess = "
|
||||
ErrorDocument 403 /errorpage/serverstop.php
|
||||
RewriteEngine On
|
||||
RewriteCond %{REQUEST_URI} !=/errorpage/serverstop.php
|
||||
RewriteCond %{REQUEST_URI} !=/css/home.css
|
||||
RewriteCond %{REQUEST_URI} !=/css/color.css
|
||||
RewriteCond %{REQUEST_URI} !=/js/console_notice.js
|
||||
RewriteCond %{REQUEST_URI} !=/js/unsupported.js
|
||||
RewriteCond %{REQUEST_URI} !=/img/uwuzulogo.svg
|
||||
RewriteCond %{REQUEST_URI} !=/favicon/apple-touch-icon-180x180.png
|
||||
RewriteCond %{REQUEST_URI} !=/favicon/icon-192x192.png
|
||||
RewriteRule ^.*$ - [R=403,L]
|
||||
";
|
||||
|
||||
// 上書き保存
|
||||
$file = fopen($htaccessfile, 'w');
|
||||
$data = $htaccess;
|
||||
fputs($file, $data);
|
||||
fclose($file);
|
||||
|
||||
$url = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
||||
header("Location:".$url."");
|
||||
exit;
|
||||
}
|
||||
|
||||
require('../logout/logout.php');
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ja">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="../css/home.css">
|
||||
<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>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<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>メンテナンス - <?php echo file_get_contents($servernamefile);?></title>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<?php require('../require/leftbox.php');?>
|
||||
<main>
|
||||
|
||||
<?php if( !empty($error_message) ): ?>
|
||||
<ul class="errmsg">
|
||||
<?php foreach( $error_message as $value ): ?>
|
||||
<p>・ <?php echo $value; ?></p>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
<div class="admin_settings">
|
||||
<?php require('settings_left_menu.php');?>
|
||||
|
||||
<div class="admin_right">
|
||||
<form class="formarea" enctype="multipart/form-data" method="post">
|
||||
<h1>メンテナンス</h1>
|
||||
|
||||
<div>
|
||||
<p>サーバー停止時表示メッセージ</p>
|
||||
<div class="p2">ここに入力してあるメッセージがサーバー停止時に表示されます。</div>
|
||||
<textarea id="serverstop" placeholder="現在サーバーは止まっておりません。" class="inbox" type="text" name="serverstop"><?php $s_stop = explode("\r", $serverstop); foreach ($s_stop as $info) { echo $info; }?></textarea>
|
||||
</div>
|
||||
|
||||
<input type="submit" class = "irobutton" name="btn_submit" value="保存&更新">
|
||||
</form>
|
||||
|
||||
<form class="formarea" enctype="multipart/form-data" method="post">
|
||||
<h1>サーバー停止</h1>
|
||||
<p>下のボタンを押すとサーバーへのアクセス時にすべてのアクセスがに対して上のサーバー停止時表示メッセージを表示します。<br>サーバーを止める必要がある際に使用してください。<br>復旧には現在の.htaccessファイルを上書きしていただく必要があります。<br>今現在の.htaccessファイルをFTPソフトなどからダウンロードすることを強く推奨します。</p>
|
||||
|
||||
<p class="errmsg">サーバーを停止するとこの画面にもログインができなくなります。<br>また、復旧時に今現在の.htaccessファイルを上書きする必要があります。<br>.htaccessファイルとサーバー管理権限はお持ちですか?<br>お持ちでない方は作業を中断してください。</p>
|
||||
|
||||
<div class="p2">サーバー停止</div>
|
||||
<input type="submit" class = "irobutton" name="serverstop_btn_submit" value="サーバー停止">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<?php require('../require/rightbox.php');?>
|
||||
<?php require('../require/botbox.php');?>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
<script>
|
||||
$(function(){
|
||||
$("input"). keydown(function(e) {
|
||||
if ((e.which && e.which === 13) || (e.keyCode && e.keyCode === 13)) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -64,7 +64,7 @@ try {
|
||||
}
|
||||
if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_SESSION['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -73,11 +73,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_SESSION['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($_SESSION['username']); // セッションに格納されている値をそのままセット
|
||||
$userid = htmlentities($res['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($res['username']); // セッションに格納されている値をそのままセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -110,7 +112,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
} elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_COOKIE['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -119,11 +121,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_COOKIE['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($_COOKIE['username']); // クッキーから取得した値をセット
|
||||
$userid = htmlentities($res['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($res['username']); // クッキーから取得した値をセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -258,6 +262,7 @@ require('../logout/logout.php');
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="../css/home.css">
|
||||
<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>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<link rel="apple-touch-icon" type="image/png" href="../favicon/apple-touch-icon-180x180.png">
|
||||
|
||||
@@ -69,7 +69,7 @@ try {
|
||||
}
|
||||
if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_SESSION['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -78,11 +78,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_SESSION['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($_SESSION['username']); // セッションに格納されている値をそのままセット
|
||||
$userid = htmlentities($res['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($res['username']); // セッションに格納されている値をそのままセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -115,7 +117,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
} elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_COOKIE['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -124,11 +126,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_COOKIE['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($_COOKIE['username']); // クッキーから取得した値をセット
|
||||
$userid = htmlentities($res['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($res['username']); // クッキーから取得した値をセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -209,6 +213,7 @@ require('../logout/logout.php');
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="../css/home.css">
|
||||
<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>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<link rel="apple-touch-icon" type="image/png" href="../favicon/apple-touch-icon-180x180.png">
|
||||
|
||||
@@ -67,7 +67,7 @@ try {
|
||||
}
|
||||
if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_SESSION['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -76,11 +76,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_SESSION['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($_SESSION['username']); // セッションに格納されている値をそのままセット
|
||||
$userid = htmlentities($res['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($res['username']); // セッションに格納されている値をそのままセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -113,7 +115,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
} elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_COOKIE['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -122,11 +124,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_COOKIE['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($_COOKIE['username']); // クッキーから取得した値をセット
|
||||
$userid = htmlentities($res['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($res['username']); // クッキーから取得した値をセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -364,6 +368,7 @@ if (!empty($pdo)) {
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="../css/home.css">
|
||||
<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>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<link rel="apple-touch-icon" type="image/png" href="../favicon/apple-touch-icon-180x180.png">
|
||||
|
||||
@@ -78,7 +78,7 @@ try {
|
||||
}
|
||||
if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_SESSION['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -87,11 +87,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_SESSION['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($_SESSION['username']); // セッションに格納されている値をそのままセット
|
||||
$userid = htmlentities($res['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($res['username']); // セッションに格納されている値をそのままセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -124,7 +126,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
} elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_COOKIE['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -133,11 +135,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_COOKIE['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($_COOKIE['username']); // クッキーから取得した値をセット
|
||||
$userid = htmlentities($res['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($res['username']); // クッキーから取得した値をセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -295,8 +299,6 @@ if( !empty($_POST['btn_submit']) ) {
|
||||
|
||||
$serverprv = $_POST['serverprv'];
|
||||
|
||||
$serverstop = $_POST['serverstop'];
|
||||
|
||||
//鯖icon
|
||||
$file = fopen($servericonfile, 'w');
|
||||
$data = $servericon;
|
||||
@@ -357,12 +359,6 @@ if( !empty($_POST['btn_submit']) ) {
|
||||
fputs($file, $data);
|
||||
fclose($file);
|
||||
|
||||
//鯖停止
|
||||
$file = fopen($serverstopfile, 'w');
|
||||
$data = $serverstop;
|
||||
fputs($file, $data);
|
||||
fclose($file);
|
||||
|
||||
$url = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
||||
header("Location:".$url."");
|
||||
exit;
|
||||
@@ -375,6 +371,7 @@ require('../logout/logout.php');
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="../css/home.css">
|
||||
<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>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<link rel="apple-touch-icon" type="image/png" href="../favicon/apple-touch-icon-180x180.png">
|
||||
@@ -515,11 +512,6 @@ require('../logout/logout.php');
|
||||
<textarea id="serverprv" placeholder="しっかり書きましょう" class="inbox" type="text" name="serverprv"><?php $sinfo = explode("\n", $serverprv); foreach ($sinfo as $info) { echo $info; }?></textarea>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p>サーバー停止時表示メッセージ</p>
|
||||
<input id="serverstop" placeholder="現在サーバーは止まっておりません。" class="inbox" type="text" name="serverstop" value="<?php if( !empty(file_get_contents($serverstopfile)) ){ echo htmlspecialchars(file_get_contents($serverstopfile), ENT_QUOTES, 'UTF-8'); } ?>">
|
||||
</div>
|
||||
|
||||
<input type="submit" class = "irobutton" name="btn_submit" value="保存&更新">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -8,5 +8,6 @@
|
||||
<a href="ad_admin" class="admin_leftbtn">広告</a>
|
||||
<a href="moderation_admin" class="admin_leftbtn">モデレーション</a>
|
||||
<a href="customize_admin" class="admin_leftbtn">カスタマイズ</a>
|
||||
<a href="maintenance_admin" class="admin_leftbtn">メンテナンス</a>
|
||||
</div>
|
||||
<?php ?>
|
||||
@@ -67,7 +67,7 @@ try {
|
||||
}
|
||||
if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_SESSION['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -76,11 +76,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_SESSION['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($_SESSION['username']); // セッションに格納されている値をそのままセット
|
||||
$userid = htmlentities($res['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($res['username']); // セッションに格納されている値をそのままセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -113,7 +115,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
} elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_COOKIE['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -122,11 +124,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_COOKIE['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($_COOKIE['username']); // クッキーから取得した値をセット
|
||||
$userid = htmlentities($res['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($res['username']); // クッキーから取得した値をセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -290,6 +294,7 @@ if (!empty($pdo)) {
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="../css/home.css">
|
||||
<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>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<link rel="apple-touch-icon" type="image/png" href="../favicon/apple-touch-icon-180x180.png">
|
||||
|
||||
@@ -69,7 +69,7 @@ try {
|
||||
}
|
||||
if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_SESSION['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -78,11 +78,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_SESSION['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($_SESSION['username']); // セッションに格納されている値をそのままセット
|
||||
$userid = htmlentities($res['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($res['username']); // セッションに格納されている値をそのままセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -115,7 +117,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
} elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_COOKIE['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -124,11 +126,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_COOKIE['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($_COOKIE['username']); // クッキーから取得した値をセット
|
||||
$userid = htmlentities($res['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($res['username']); // クッキーから取得した値をセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -521,6 +525,7 @@ require('../logout/logout.php');
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="../css/home.css">
|
||||
<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>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<link rel="apple-touch-icon" type="image/png" href="../favicon/apple-touch-icon-180x180.png">
|
||||
|
||||
@@ -22,6 +22,7 @@ if(!(empty($_SESSION['backupcode']))){
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
<script src="js/unsupported.js"></script>
|
||||
<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">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
|
||||
+101
-12
@@ -1,5 +1,9 @@
|
||||
<?php
|
||||
$servernamefile = "../server/servername.txt";
|
||||
$domain = $_SERVER['HTTP_HOST'];
|
||||
|
||||
$mojisizefile = "../server/textsize.txt";
|
||||
$servericonfile = "../server/servericon.txt";
|
||||
|
||||
$banurldomainfile = "../server/banurldomain.txt";
|
||||
$banurl_info = file_get_contents($banurldomainfile);
|
||||
@@ -34,9 +38,6 @@ session_name('uwuzu_s_id');
|
||||
session_start();
|
||||
session_regenerate_id(true);
|
||||
|
||||
$userid = htmlentities($_SESSION['userid']);
|
||||
$username = htmlentities($_SESSION['username']);
|
||||
|
||||
try {
|
||||
|
||||
$option = array(
|
||||
@@ -53,7 +54,7 @@ try {
|
||||
|
||||
if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_SESSION['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -62,12 +63,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_SESSION['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($_SESSION['username']); // セッションに格納されている値をそのままセット
|
||||
$userid = htmlentities($res['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($res['username']); // セッションに格納されている値をそのままセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -100,7 +102,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
} elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_COOKIE['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -109,12 +111,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_COOKIE['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($_COOKIE['username']); // クッキーから取得した値をセット
|
||||
$userid = htmlentities($res['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($res['username']); // クッキーから取得した値をセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -200,6 +203,39 @@ function get_mentions_userid($postText) {
|
||||
|
||||
return $mentionedUsers;
|
||||
}
|
||||
function rotate($image, $exif)
|
||||
{
|
||||
$orientation = $exif['Orientation'] ?? 1;
|
||||
|
||||
switch ($orientation) {
|
||||
case 1: //no rotate
|
||||
break;
|
||||
case 2: //FLIP_HORIZONTAL
|
||||
imageflip($image, IMG_FLIP_HORIZONTAL);
|
||||
break;
|
||||
case 3: //ROTATE 180
|
||||
$image = imagerotate($image, 180, 0);
|
||||
break;
|
||||
case 4: //FLIP_VERTICAL
|
||||
imageflip($image, IMG_FLIP_VERTICAL);
|
||||
break;
|
||||
case 5: //ROTATE 270 FLIP_HORIZONTAL
|
||||
$image = imagerotate($image, 270, 0);
|
||||
imageflip($image, IMG_FLIP_HORIZONTAL);
|
||||
break;
|
||||
case 6: //ROTATE 90
|
||||
$image = imagerotate($image, 270, 0);
|
||||
break;
|
||||
case 7: //ROTATE 90 FLIP_HORIZONTAL
|
||||
$image = imagerotate($image, 90, 0);
|
||||
imageflip($image, IMG_FLIP_HORIZONTAL);
|
||||
break;
|
||||
case 8: //ROTATE 270
|
||||
$image = imagerotate($image, 90, 0);
|
||||
break;
|
||||
}
|
||||
return $image;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -257,6 +293,19 @@ if( !empty($_POST['btn_submit']) ) {
|
||||
// ファイルを移動
|
||||
$result = move_uploaded_file($uploadedFile['tmp_name'], $uploadedPath);
|
||||
|
||||
// EXIF削除
|
||||
if($extension == "jpg" || $extension == "jpeg"){
|
||||
$gd = imagecreatefromjpeg($uploadedPath);
|
||||
$w = imagesx($gd);
|
||||
$h = imagesy($gd);
|
||||
$gd_out = imagecreatetruecolor($w,$h);
|
||||
imagecopyresampled($gd_out, $gd, 0,0,0,0, $w,$h,$w,$h);
|
||||
$exif = exif_read_data($uploadedPath);
|
||||
$gd_out = rotate($gd_out, $exif);
|
||||
imagejpeg($gd_out, $uploadedPath);
|
||||
imagedestroy($gd_out);
|
||||
}
|
||||
|
||||
if ($result) {
|
||||
$photo1 = $uploadedPath; // 保存されたファイルのパスを使用
|
||||
} else {
|
||||
@@ -297,6 +346,19 @@ if( !empty($_POST['btn_submit']) ) {
|
||||
// ファイルを移動
|
||||
$result2 = move_uploaded_file($uploadedFile2['tmp_name'], $uploadedPath2);
|
||||
|
||||
// EXIF削除
|
||||
if($extension2 == "jpg" || $extension2 == "jpeg"){
|
||||
$gd = imagecreatefromjpeg($uploadedPath2);
|
||||
$w = imagesx($gd);
|
||||
$h = imagesy($gd);
|
||||
$gd_out = imagecreatetruecolor($w,$h);
|
||||
imagecopyresampled($gd_out, $gd, 0,0,0,0, $w,$h,$w,$h);
|
||||
$exif = exif_read_data($uploadedPath2);
|
||||
$gd_out = rotate($gd_out, $exif);
|
||||
imagejpeg($gd_out, $uploadedPath2);
|
||||
imagedestroy($gd_out);
|
||||
}
|
||||
|
||||
if ($result2) {
|
||||
$photo2 = $uploadedPath2; // 保存されたファイルのパスを使用
|
||||
} else {
|
||||
@@ -337,6 +399,19 @@ if( !empty($_POST['btn_submit']) ) {
|
||||
// ファイルを移動
|
||||
$result3 = move_uploaded_file($uploadedFile3['tmp_name'], $uploadedPath3);
|
||||
|
||||
// EXIF削除
|
||||
if($extension3 == "jpg" || $extension3 == "jpeg"){
|
||||
$gd = imagecreatefromjpeg($uploadedPath3);
|
||||
$w = imagesx($gd);
|
||||
$h = imagesy($gd);
|
||||
$gd_out = imagecreatetruecolor($w,$h);
|
||||
imagecopyresampled($gd_out, $gd, 0,0,0,0, $w,$h,$w,$h);
|
||||
$exif = exif_read_data($uploadedPath3);
|
||||
$gd_out = rotate($gd_out, $exif);
|
||||
imagejpeg($gd_out, $uploadedPath3);
|
||||
imagedestroy($gd_out);
|
||||
}
|
||||
|
||||
if ($result3) {
|
||||
$photo3 = $uploadedPath3; // 保存されたファイルのパスを使用
|
||||
} else {
|
||||
@@ -377,6 +452,19 @@ if( !empty($_POST['btn_submit']) ) {
|
||||
// ファイルを移動
|
||||
$result4 = move_uploaded_file($uploadedFile4['tmp_name'], $uploadedPath4);
|
||||
|
||||
// EXIF削除
|
||||
if($extension4 == "jpg" || $extension4 == "jpeg"){
|
||||
$gd = imagecreatefromjpeg($uploadedPath4);
|
||||
$w = imagesx($gd);
|
||||
$h = imagesy($gd);
|
||||
$gd_out = imagecreatetruecolor($w,$h);
|
||||
imagecopyresampled($gd_out, $gd, 0,0,0,0, $w,$h,$w,$h);
|
||||
$exif = exif_read_data($uploadedPath4);
|
||||
$gd_out = rotate($gd_out, $exif);
|
||||
imagejpeg($gd_out, $uploadedPath4);
|
||||
imagedestroy($gd_out);
|
||||
}
|
||||
|
||||
if ($result4) {
|
||||
$photo4 = $uploadedPath4; // 保存されたファイルのパスを使用
|
||||
} else {
|
||||
@@ -475,7 +563,7 @@ if( !empty($_POST['btn_submit']) ) {
|
||||
$pdo->beginTransaction();
|
||||
|
||||
$msg = ''.$ueuse.'';
|
||||
$title = ''.$username.'さんが返信しました!';
|
||||
$title = ''.$userid.'さんが返信しました!';
|
||||
$url = $_SERVER['REQUEST_URI'];
|
||||
$userchk = 'none';
|
||||
// 通知用SQL作成
|
||||
@@ -507,7 +595,7 @@ if( !empty($_POST['btn_submit']) ) {
|
||||
$touserid = $mentionedUser;
|
||||
$datetime = date("Y-m-d H:i:s");
|
||||
$msg = "" . $ueuse . "";
|
||||
$title = "" . $username . "さんにメンションされました!";
|
||||
$title = "" . $userid . "さんにメンションされました!";
|
||||
$url = "/!" . $uniqid . "~" . $userid . "";
|
||||
$userchk = 'none';
|
||||
|
||||
@@ -587,13 +675,14 @@ $pdo = null;
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="../css/home.css">
|
||||
<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>
|
||||
<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'); ?> のユーズ - uwuzu</title>
|
||||
<title>ID <?php echo htmlentities($ueuseid, ENT_QUOTES, 'UTF-8'); ?> のユーズ - <?php echo file_get_contents($servernamefile);?></title>
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
<?php
|
||||
|
||||
$servericonfile = "server/servericon.txt";
|
||||
|
||||
//-------------------------
|
||||
|
||||
$servernamefile = "server/servername.txt";
|
||||
|
||||
//------------------------
|
||||
|
||||
$serverinfofile = 'server/info.txt';
|
||||
$serverinfo = file_get_contents($serverinfofile);
|
||||
|
||||
//-------------------------------------
|
||||
|
||||
$domain = $_SERVER['HTTP_HOST'];
|
||||
|
||||
//------------------------
|
||||
|
||||
$contactfile = "server/contact.txt";
|
||||
|
||||
$softwarefile = "server/uwuzuinfo.txt";
|
||||
$softwaredata = file_get_contents($softwarefile);
|
||||
|
||||
$softwaredata = explode( "\n", $softwaredata );
|
||||
$cnt = count( $softwaredata );
|
||||
for( $i=0;$i<$cnt;$i++ ){
|
||||
$uwuzuinfo[$i] = ($softwaredata[$i]);
|
||||
}
|
||||
|
||||
if(isset($_GET['errcode']) || isset($_GET['browser']) || isset($_GET['os']) || isset($_GET['cookie']) || isset($_GET['ssl'])){
|
||||
if(isset($_GET['errcode'])){$errcode = htmlentities($_GET['errcode']);}else{$errcode = "NULL";};
|
||||
if(isset($_GET['browser'])){$browser = htmlentities($_GET['browser']);}else{$browser = "NULL";};
|
||||
if(isset($_GET['os'])){$os = htmlentities($_GET['os']);}else{$os = "NULL";};
|
||||
if(isset($_GET['cookie'])){$cookie = htmlentities($_GET['cookie']);}else{$cookie = "NULL";};
|
||||
if(isset($_GET['ssl'])){$ssl = htmlentities($_GET['ssl']);}else{$ssl = "NULL";};
|
||||
}else{
|
||||
$errcode = "NULL";
|
||||
$browser = "NULL";
|
||||
$os = "NULL";
|
||||
$cookie = "NULL";
|
||||
$ssl = "NULL";
|
||||
}
|
||||
|
||||
if($errcode == "UNSUPPORTED_BROWSER"){
|
||||
$errabout = "対応していないブラウザです。";
|
||||
}elseif($errcode == "UNSUPPORTED_OS"){
|
||||
$errabout = "対応していないOS・端末です。";
|
||||
}elseif($errcode == "PLEASE_COOKIE_ON"){
|
||||
$errabout = "Cookieが無効になっています。";
|
||||
}elseif($errcode == "NONE_SSL"){
|
||||
$errabout = "http通信で表示されていません。";
|
||||
}else{
|
||||
$errabout = "エラーコードの説明はありません。";
|
||||
}
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ja">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="css/unsupported.css">
|
||||
<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">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title><?php echo file_get_contents($servernamefile);?></title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<main>
|
||||
<div class="server_icon_zone">
|
||||
<img src=<?php echo htmlentities(file_get_contents($servericonfile));?>>
|
||||
</div>
|
||||
<h1>お使いの環境での利用はできません</h1>
|
||||
<div class="maintext">
|
||||
<p>申し訳ございませんが、uwuzuをお使いの環境で使用されますとバグやエラーなどの問題が発生する可能性が非常に高いためこのページにリダイレクトさせていただきました。
|
||||
<br>引き続きuwuzuを使用するには推奨されている環境をご利用ください。
|
||||
<br>詳細は下記のリンクよりご確認ください。</p>
|
||||
</div>
|
||||
|
||||
<a href="https://uwuzu.com/support" class="infobtn">詳細</a>
|
||||
|
||||
<div class="maintext">
|
||||
<h3>エラー内容</h3>
|
||||
<p>エラーコード:<?php echo htmlentities($errcode);?></p>
|
||||
<p>エラーの原因:<?php echo htmlentities($errabout);?></p>
|
||||
<hr>
|
||||
<h3>アクセス環境</h3>
|
||||
<p>ブラウザ:<?php echo htmlentities($browser);?></p>
|
||||
<p>OS:<?php echo htmlentities($os);?></p>
|
||||
<p>Cookie:<?php if(htmlentities($cookie) == "cookie_off"){echo "無効";}elseif(htmlentities($cookie) == "cookie_on"){echo "有効";}else{echo "不明";};?></p>
|
||||
<p>通信環境:<?php if(htmlentities($ssl) == "not_ssl"){echo "非SSL通信";}elseif(htmlentities($ssl) == "ssl"){echo "SSL通信";}elseif(htmlentities($ssl) == "Other"){echo "非http通信";}else{echo "不明";};?></p>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
<hr>
|
||||
<div class="center_text">
|
||||
<p><?php echo htmlentities(file_get_contents($servernamefile));?></p>
|
||||
<p><?php echo $domain;?></p>
|
||||
<div class="p2"><?php echo htmlentities($uwuzuinfo[0]);?><br>Version <?php echo htmlentities($uwuzuinfo[1]);?></div>
|
||||
</div>
|
||||
</body>
|
||||
+5
-7
@@ -30,9 +30,6 @@ session_name('uwuzu_s_id');
|
||||
session_start();
|
||||
session_regenerate_id(true);
|
||||
|
||||
$userid = htmlentities($_SESSION['userid']);
|
||||
$username = htmlentities($_SESSION['username']);
|
||||
|
||||
try {
|
||||
|
||||
$option = array(
|
||||
@@ -58,8 +55,8 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_SESSION['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($_SESSION['username']); // セッションに格納されている値をそのままセット
|
||||
$userid = htmlentities($res['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($res['username']); // セッションに格納されている値をそのままセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
@@ -106,8 +103,8 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_COOKIE['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($_COOKIE['username']); // クッキーから取得した値をセット
|
||||
$userid = htmlentities($res['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($res['username']); // クッキーから取得した値をセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
@@ -547,6 +544,7 @@ $pdo = null;
|
||||
<head>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/push.js/1.0.12/push.min.js"></script>
|
||||
<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>
|
||||
<meta charset="utf-8">
|
||||
|
||||
+10
-6
@@ -47,7 +47,7 @@ try {
|
||||
|
||||
if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_SESSION['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -56,11 +56,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_SESSION['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($_SESSION['username']); // セッションに格納されている値をそのままセット
|
||||
$userid = htmlentities($res['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($res['username']); // セッションに格納されている値をそのままセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -93,7 +95,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
} elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_COOKIE['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -102,11 +104,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = htmlentities($_COOKIE['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($_COOKIE['username']); // クッキーから取得した値をセット
|
||||
$userid = htmlentities($res['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($res['username']); // クッキーから取得した値をセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
|
||||
+19
-10
@@ -38,8 +38,8 @@ try {
|
||||
|
||||
if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', $_SESSION['userid']);
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_SESSION['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
if(empty($res["userid"])){
|
||||
@@ -47,9 +47,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = $_SESSION['userid']; // セッションに格納されている値をそのままセット
|
||||
$username = $_SESSION['username']; // セッションに格納されている値をそのままセット
|
||||
$loginid = $res["loginid"];
|
||||
$userid = htmlentities($res['userid']); // セッションに格納されている値をそのままセット
|
||||
$username = htmlentities($res['username']); // セッションに格納されている値をそのままセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -82,8 +86,8 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
} elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', $_COOKIE['userid']);
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', htmlentities($_COOKIE['userid']));
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
if(empty($res["userid"])){
|
||||
@@ -91,9 +95,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
exit;
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = $_COOKIE['userid']; // クッキーから取得した値をセット
|
||||
$username = $_COOKIE['username']; // クッキーから取得した値をセット
|
||||
$loginid = $res["loginid"];
|
||||
$userid = htmlentities($res['userid']); // クッキーから取得した値をセット
|
||||
$username = htmlentities($res['username']); // クッキーから取得した値をセット
|
||||
$loginid = htmlentities($res["loginid"]);
|
||||
$role = htmlentities($res["role"]);
|
||||
$sacinfo = htmlentities($res["sacinfo"]);
|
||||
$myblocklist = htmlentities($res["blocklist"]);
|
||||
$myfollowlist = htmlentities($res["follow"]);
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -137,6 +145,7 @@ 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();
|
||||
|
||||
Reference in New Issue
Block a user