1
0
mirror of https://github.com/Daichimarukana/uwuzu.git synced 2026-06-04 19:14:41 +00:00

uwuzu version 1.2.11

This commit is contained in:
daichimarukana
2023-08-25 00:45:43 +09:00
parent 468536b4a8
commit 4ebbb1ca82
21 changed files with 586 additions and 466 deletions
-78
View File
@@ -1,78 +0,0 @@
<?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();
}
+3 -3
View File
@@ -179,7 +179,7 @@ if( !empty($pdo) ) {
$roles = explode(',', $userData["role"]); // カンマで区切られたロールを配列に分割
$rerole = $dbh->prepare("SELECT follow, follower, username, userid, password, mailadds, profile, iconname, iconcontent, icontype, iconsize, headname, headcontent, headtype, headsize, role, datetime FROM account WHERE userid = :userid");
$rerole = $dbh->prepare("SELECT follow, follower, username, userid, password, mailadds, profile, iconname, headname, role, datetime FROM account WHERE userid = :userid");
$rerole->bindValue(':userid', $uwuzuid);
// SQL実行
@@ -330,10 +330,10 @@ $pdo = null;
<div class="tokonone" id="noueuse"><p>このユーザーは存在しません</p></div>
<?php }else{?>
<div class="hed">
<img src="../user/headimage.php?account=<?php echo urlencode($userData['userid']); ?>">
<img src="<?php echo htmlentities('../'.$userdata['headname']); ?>">
</div>
<div class="icon">
<img src="../home/tlimage.php?account=<?php echo urlencode($userData['userid']); ?>">
<img src="<?php echo htmlentities('../'.$userdata['iconname']); ?>">
<h2><?php echo htmlentities($userData['username'], ENT_QUOTES, 'UTF-8'); ?></h2>
<p>@<?php echo htmlentities($userData['userid'], ENT_QUOTES, 'UTF-8'); ?></p>
</div>