1
0
mirror of https://github.com/Daichimarukana/uwuzu.git synced 2026-06-05 03:24:41 +00:00

Version 1.2.5

This commit is contained in:
だいちまる
2023-08-19 17:49:56 +09:00
committed by GitHub
parent 6845f31a4a
commit 9ede52e05e
74 changed files with 9283 additions and 6961 deletions
+77 -77
View File
@@ -1,78 +1,78 @@
<?php
require('../db.php');
// 変数の初期化
$current_date = null;
$message_array = array();
$error_message = array();
$pdo = null;
$stmt = null;
$res = null;
$option = null;
$row["userid"] = array();
$row["password"] = array();
$ruserid = array();
$rpassword = array();
$userid = null;
$_SESSION["userid"]="";
$password = null;
$_SESSION["password"]="";
session_start();
$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);
//$row['userid'] = "daichimarukn";
$userid = $_GET['account'];
$options = array(
// SQL実行失敗時に例外をスルー
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
// デフォルトフェッチモードを連想配列形式に設定
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
// バッファードクエリを使う(一度に結果セットを全て取得し、サーバー負荷を軽減)
// SELECTで得た結果に対してもrowCountメソッドを使えるようにする
PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true,
);
if( empty($userid) ) {
$filePath = 'img/deficon/icon.png';
$data = file_get_contents($filePath);
header('Content-type: image/png');
//データを出力
echo $data;
exit();
}else{
$dbh = new PDO('mysql:charset=UTF8;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option);
$result = $dbh->prepare("SELECT headname, headcontent, headtype, headsize profile FROM account WHERE userid = :userid");
$result->bindValue(':userid', $userid);
// SQL実行
$result->execute();
$row = $result->fetch(); // ここでデータベースから取得した値を $row に代入する
header('Content-type: ' . $row['headtype']);
echo $row['headcontent'];
exit();
<?php
require('../db.php');
// 変数の初期化
$current_date = null;
$message_array = array();
$error_message = array();
$pdo = null;
$stmt = null;
$res = null;
$option = null;
$row["userid"] = array();
$row["password"] = array();
$ruserid = array();
$rpassword = array();
$userid = null;
$_SESSION["userid"]="";
$password = null;
$_SESSION["password"]="";
session_start();
$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);
//$row['userid'] = "daichimarukn";
$userid = htmlentities($_GET['account']);
$options = array(
// SQL実行失敗時に例外をスルー
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
// デフォルトフェッチモードを連想配列形式に設定
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
// バッファードクエリを使う(一度に結果セットを全て取得し、サーバー負荷を軽減)
// SELECTで得た結果に対してもrowCountメソッドを使えるようにする
PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true,
);
if( empty($userid) ) {
$filePath = 'img/deficon/icon.png';
$data = file_get_contents($filePath);
header('Content-type: image/png');
//データを出力
echo $data;
exit();
}else{
$dbh = new PDO('mysql:charset=UTF8;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option);
$result = $dbh->prepare("SELECT headname, headcontent, headtype, headsize profile FROM account WHERE userid = :userid");
$result->bindValue(':userid', $userid);
// SQL実行
$result->execute();
$row = $result->fetch(); // ここでデータベースから取得した値を $row に代入する
header('Content-type: ' . $row['headtype']);
echo $row['headcontent'];
exit();
}
+10 -10
View File
@@ -26,8 +26,8 @@ $option = null;
session_start();
$userid = $_SESSION['userid'];
$username = $_SESSION['username'];
$userid = htmlentities($_SESSION['userid']);
$username = htmlentities($_SESSION['username']);
try {
@@ -129,7 +129,7 @@ if( !empty($pdo) ) {
PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true,
));
$uwuzuid = str_replace('@', '', $_GET['uwuzuid']);
$uwuzuid = htmlentities(str_replace('@', '', $_GET['uwuzuid']));
// ユーズ内の絵文字を画像に置き換える
function replaceEmojisWithImages($postText) {
@@ -213,7 +213,7 @@ if( !empty($pdo) ) {
$followerIds = explode(',', $follower);
$followerCount = count($followerIds)-1;
$profileText = htmlspecialchars($userData['profile'], ENT_QUOTES, 'UTF-8');
$profileText = htmlentities($userData['profile'], ENT_QUOTES, 'UTF-8');
}else{
$userData["userid"] = "none";
@@ -320,7 +320,7 @@ $pdo = null;
<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><?php echo htmlspecialchars($userData['username'], ENT_QUOTES, 'UTF-8'); ?> さんのプロフィール - <?php echo file_get_contents($servernamefile);?></title>
<title><?php echo htmlentities($userData['username'], ENT_QUOTES, 'UTF-8'); ?> さんのプロフィール - <?php echo file_get_contents($servernamefile);?></title>
</head>
@@ -345,8 +345,8 @@ $pdo = null;
</div>
<div class="icon">
<img src="../home/tlimage.php?account=<?php echo urlencode($userData['userid']); ?>">
<h2><?php echo htmlspecialchars($userData['username'], ENT_QUOTES, 'UTF-8'); ?></h2>
<p>@<?php echo htmlspecialchars($userData['userid'], ENT_QUOTES, 'UTF-8'); ?></p>
<h2><?php echo htmlentities($userData['username'], ENT_QUOTES, 'UTF-8'); ?></h2>
<p>@<?php echo htmlentities($userData['userid'], ENT_QUOTES, 'UTF-8'); ?></p>
</div>
<div class="roleboxes">
@@ -354,7 +354,7 @@ $pdo = null;
<?php $roleData = $roleDataArray[$roleId]; ?>
<div class="rolebox" style="border: 1px solid <?php echo '#' . $roleData["rolecolor"]; ?>;">
<p style="color: <?php echo '#' . $roleData["rolecolor"]; ?>;">
<?php if (!empty($roleData["rolename"])) { echo htmlspecialchars($roleData["rolename"], ENT_QUOTES, 'UTF-8'); } ?>
<?php if (!empty($roleData["rolename"])) { echo htmlentities($roleData["rolename"], ENT_QUOTES, 'UTF-8'); } ?>
</p>
</div>
<?php endforeach; ?>
@@ -400,7 +400,7 @@ $pdo = null;
<div id="myModal" class="modal">
<div class="modal-content">
<p><?php echo htmlspecialchars($userData['username'], ENT_QUOTES, 'UTF-8'); ?>さんをフォロー解除しますか?</p>
<p><?php echo htmlentities($userData['username'], ENT_QUOTES, 'UTF-8'); ?>さんをフォロー解除しますか?</p>
<form class="btn_area" method="post">
<input type="submit" id="openModalButton" class="fbtn_no" name="unfollow" value="フォロー解除">
<input type="button" id="closeModal" class="fbtn" value="キャンセル">
@@ -436,7 +436,7 @@ $pdo = null;
<p>ユーズに追記しますか?</p>
<p>※追記は削除出来ません。</p>
<form method="post" id="AbiForm">
<textarea id="abitexts" placeholder="なに追記する~?" name="abi"><?php if( !empty($_SESSION['abi']) ){ echo htmlspecialchars( $_SESSION['abi'], ENT_QUOTES, 'UTF-8'); } ?></textarea>
<textarea id="abitexts" placeholder="なに追記する~?" name="abi"><?php if( !empty($_SESSION['abi']) ){ echo htmlentities( $_SESSION['abi'], ENT_QUOTES, 'UTF-8'); } ?></textarea>
<div class="btn_area">
<input type="submit" id="AbiAddButton" class="fbtn_no" name="abi" value="追記">
<input type="button" id="AbiCancelButton" class="fbtn" value="キャンセル">