mirror of
https://github.com/Daichimarukana/uwuzu.git
synced 2026-06-05 03:24:41 +00:00
uwuzu v1.4.5 Funium
This commit is contained in:
+5
-3
@@ -84,8 +84,10 @@ if( !empty($_POST['btn_submit']) ) {
|
||||
$chkpass = safetext($_POST['chkpass']);
|
||||
$mailadds = safetext($_POST['mailadds']);
|
||||
|
||||
if(!(filter_var($mailadds, FILTER_VALIDATE_EMAIL))){
|
||||
$error_message[] = 'メールアドレスが正しい形式ではありません。(MAILADDS_CHECK_DAME)';
|
||||
if(!(empty($mailadds))){
|
||||
if(!(filter_var($mailadds, FILTER_VALIDATE_EMAIL))){
|
||||
$error_message[] = 'メールアドレスが正しい形式ではありません。(MAILADDS_CHECK_DAME)';
|
||||
}
|
||||
}
|
||||
|
||||
$profile = safetext($_POST['profile']);
|
||||
@@ -461,7 +463,7 @@ $pdo = null;
|
||||
<!--アカウント関連-->
|
||||
<div>
|
||||
<p>パスワード *</p>
|
||||
<div class="p2">ログイン時に必要となります。<br>※サービス管理者が確認できません。</div>
|
||||
<div class="p2">ログイン時に必要となります。<br>最大256文字まで使用可能です。<br>※サービス管理者が確認できません。</div>
|
||||
<input placeholder="" class="inbox" id="password" type="text" name="password" value="<?php if( !empty($_SESSION['form_data']['password']) ){ echo safetext($_SESSION['form_data']['password']); } ?>">
|
||||
<div class="p2" id="password_zxcvbn" style="display: none;"></div>
|
||||
</div>
|
||||
|
||||
@@ -104,6 +104,11 @@ if (in_array("mysqli", get_loaded_extensions())) {
|
||||
} else {
|
||||
$check_mysqli = false;
|
||||
}
|
||||
if (in_array("zip", get_loaded_extensions())) {
|
||||
$check_zip = true;
|
||||
} else {
|
||||
$check_zip = false;
|
||||
}
|
||||
// データベースの接続を閉じる
|
||||
$pdo = null;
|
||||
|
||||
@@ -171,6 +176,7 @@ $pdo = null;
|
||||
<p>mbstring : <?php if($check_mbstring == true){echo "Already set✅";}else{echo "Not set🟥";}?></p>
|
||||
<p>pdo_mysql : <?php if($check_pdo_mysql == true){echo "Already set✅";}else{echo "Not set🟥";}?></p>
|
||||
<p>mysqli : <?php if($check_mysqli == true){echo "Already set✅";}else{echo "Not set🟥";}?></p>
|
||||
<p>ZipArchive : <?php if($check_zip == true){echo "Already set✅";}else{echo "Not set🟥";}?></p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
+51
-47
@@ -343,7 +343,7 @@ function replaceURLsWithLinks($postText, $maxLength = 48) {
|
||||
$convertedText = preg_replace_callback($pattern, function($matches) use ($maxLength) {
|
||||
$link = $matches[0];
|
||||
if(!(preg_match('/:(\w+):/',$link))){
|
||||
$no_https_link = str_replace("https://", "", $link);
|
||||
$no_https_link = preg_replace('/https:\/\//', '', $link, 1);
|
||||
if (mb_strlen($link) > $maxLength) {
|
||||
$truncatedLink = mb_substr($no_https_link, 0, $maxLength).'...';
|
||||
return '<a href="'.$link.'" target="_blank">'.$truncatedLink.'</a>';
|
||||
@@ -620,63 +620,68 @@ function send_notification($to,$from,$title,$message,$url,$category){
|
||||
return false;
|
||||
}
|
||||
|
||||
$query = $pdo->prepare('SELECT * FROM account WHERE userid = :userid limit 1');
|
||||
$query->execute(array(':userid' => $from));
|
||||
$result = $query->fetch();
|
||||
if(!($to == $from)){
|
||||
$query = $pdo->prepare('SELECT * FROM account WHERE userid = :userid limit 1');
|
||||
$query->execute(array(':userid' => $from));
|
||||
$result = $query->fetch();
|
||||
|
||||
$category_list = ["system","favorite","reply","reuse","ueuse","follow","mention","other"];
|
||||
if(in_array($category, $category_list)){
|
||||
if(in_array($category, explode(',', $result["notification_settings"])) || empty($result["notification_settings"]) || $category === "system" || $category === "other"){
|
||||
if(!(empty($pdo))){
|
||||
$pdo->beginTransaction();
|
||||
$category_list = ["system","favorite","reply","reuse","ueuse","follow","mention","other"];
|
||||
if(in_array($category, $category_list)){
|
||||
if(in_array($category, explode(',', $result["notification_settings"])) || empty($result["notification_settings"]) || $category === "system" || $category === "other"){
|
||||
if(!(empty($pdo))){
|
||||
$pdo->beginTransaction();
|
||||
|
||||
try {
|
||||
$fromuserid = safetext($from);
|
||||
$touserid = safetext($to);
|
||||
$datetime = date("Y-m-d H:i:s");
|
||||
$msg = safetext($message);
|
||||
$title = safetext($title);
|
||||
$url = safetext($url);
|
||||
$userchk = 'none';
|
||||
$notification_category = safetext($category);
|
||||
|
||||
// 通知用SQL作成
|
||||
$stmt = $pdo->prepare("INSERT INTO notification (fromuserid, touserid, msg, url, datetime, userchk, title, category) VALUES (:fromuserid, :touserid, :msg, :url, :datetime, :userchk, :title, :category)");
|
||||
|
||||
$stmt->bindParam(':fromuserid', $fromuserid, PDO::PARAM_STR);
|
||||
$stmt->bindParam(':touserid', $touserid, PDO::PARAM_STR);
|
||||
$stmt->bindParam(':msg', $msg, PDO::PARAM_STR);
|
||||
$stmt->bindParam(':url', $url, PDO::PARAM_STR);
|
||||
$stmt->bindParam(':userchk', $userchk, PDO::PARAM_STR);
|
||||
$stmt->bindParam(':title', $title, PDO::PARAM_STR);
|
||||
$stmt->bindParam(':category', $notification_category, PDO::PARAM_STR);
|
||||
|
||||
$stmt->bindParam(':datetime', $datetime, PDO::PARAM_STR);
|
||||
|
||||
$res = $stmt->execute();
|
||||
|
||||
$res = $pdo->commit();
|
||||
|
||||
if($res){
|
||||
return true;
|
||||
}else{
|
||||
try {
|
||||
$fromuserid = safetext($from);
|
||||
$touserid = safetext($to);
|
||||
$datetime = date("Y-m-d H:i:s");
|
||||
$msg = safetext($message);
|
||||
$title = safetext($title);
|
||||
$url = safetext($url);
|
||||
$userchk = 'none';
|
||||
$notification_category = safetext($category);
|
||||
|
||||
// 通知用SQL作成
|
||||
$stmt = $pdo->prepare("INSERT INTO notification (fromuserid, touserid, msg, url, datetime, userchk, title, category) VALUES (:fromuserid, :touserid, :msg, :url, :datetime, :userchk, :title, :category)");
|
||||
|
||||
$stmt->bindParam(':fromuserid', $fromuserid, PDO::PARAM_STR);
|
||||
$stmt->bindParam(':touserid', $touserid, PDO::PARAM_STR);
|
||||
$stmt->bindParam(':msg', $msg, PDO::PARAM_STR);
|
||||
$stmt->bindParam(':url', $url, PDO::PARAM_STR);
|
||||
$stmt->bindParam(':userchk', $userchk, PDO::PARAM_STR);
|
||||
$stmt->bindParam(':title', $title, PDO::PARAM_STR);
|
||||
$stmt->bindParam(':category', $notification_category, PDO::PARAM_STR);
|
||||
|
||||
$stmt->bindParam(':datetime', $datetime, PDO::PARAM_STR);
|
||||
|
||||
$res = $stmt->execute();
|
||||
|
||||
$res = $pdo->commit();
|
||||
|
||||
if($res){
|
||||
return true;
|
||||
}else{
|
||||
$pdo->rollBack();
|
||||
return false;
|
||||
}
|
||||
|
||||
} catch(Exception $e) {
|
||||
$pdo->rollBack();
|
||||
return false;
|
||||
}
|
||||
|
||||
} catch(Exception $e) {
|
||||
$pdo->rollBack();
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
return false;
|
||||
// 受信しない設定なのでtrue
|
||||
return true;
|
||||
}
|
||||
}else{
|
||||
// 受信しない設定なのでtrue
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
return false;
|
||||
// 送信元と送信先が同じなら送信しない
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// ユーズするとき全部この関数
|
||||
@@ -1290,5 +1295,4 @@ function EncryptionUseEncrKey($data,$key,$iv){
|
||||
function DecryptionUseEncrKey($data,$key,$iv){
|
||||
return openssl_decrypt($data, "aes-256-cbc", $key, 0, $iv);
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -308,7 +308,7 @@ $pdo = null;
|
||||
</div>
|
||||
<div>
|
||||
<p>パスワード</p>
|
||||
<input id="password" class="inbox" type="password" name="password" maxlength="32" value="<?php if( !empty($_SESSION['form_data']['password']) ){ echo safetext($_SESSION['form_data']['password']); } ?>">
|
||||
<input id="password" class="inbox" type="password" name="password" maxlength="256" value="<?php if( !empty($_SESSION['form_data']['password']) ){ echo safetext($_SESSION['form_data']['password']); } ?>">
|
||||
</div>
|
||||
<div class="switch_flexbox">
|
||||
<div class="switch_button">
|
||||
|
||||
@@ -576,7 +576,7 @@ $pdo = null;
|
||||
<!--アカウント関連-->
|
||||
<div>
|
||||
<p>パスワード *</p>
|
||||
<div class="p2">ログイン時に必要となります。<br>※サービス管理者が確認できません。</div>
|
||||
<div class="p2">ログイン時に必要となります。<br>最大256文字まで使用可能です。<br>※サービス管理者が確認できません。</div>
|
||||
<input placeholder="" class="inbox" id="password" type="text" name="password" value="<?php if( !empty($_SESSION['form_data']['password']) ){ echo safetext($_SESSION['form_data']['password']); } ?>">
|
||||
<div class="p2" id="password_zxcvbn" style="display: none;"></div>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
uwuzu
|
||||
1.4.4
|
||||
2024/08/30
|
||||
1.4.5
|
||||
2024/10/13
|
||||
daichimarukana,putonfps
|
||||
@@ -1,6 +1,14 @@
|
||||
## リリースノートだぜぇぇぇぇぇぇい!!!!!!!
|
||||
ここにはuwuzuの更新情報を載せてくぜぇ~!(いやまてテンションおかしいだろ...)
|
||||
|
||||
## Version 1.4.5 (Funium)
|
||||
リリース日:2024/10/13
|
||||
fix: URLに関する処理の問題を修正しました
|
||||
fix: ログイン時にパスワードが32文字以上入力できない問題を修正しました
|
||||
fix: 管理者アカウント登録時にメールアドレスが必要になってしまう問題を修正しました
|
||||
chg: 自分へのアクションには通知を送信しないようにしました!
|
||||
chg: 広告の配信時に時間まで指定できるようにしました!
|
||||
|
||||
## Version 1.4.4 (Funium)
|
||||
リリース日:2024/08/30
|
||||
fix: OpenSearchのxmlが正しく生成されない問題を修正しました
|
||||
|
||||
@@ -188,8 +188,9 @@ if( !empty($_POST['ads_btn_submit']) ) {
|
||||
|
||||
$ads_url = safetext($_POST['ads_url']);
|
||||
$ads_img_url = safetext($_POST['ads_img_url']);
|
||||
$ads_start_date = safetext(date($_POST['ads_start_date']));
|
||||
$ads_limit_date = safetext(date($_POST['ads_limit_date']));
|
||||
$ads_start_date = date('Y/m/d H:i:s', strtotime(safetext(date($_POST['ads_start_date']))));
|
||||
$ads_limit_date = date('Y/m/d H:i:s', strtotime(safetext(date($_POST['ads_limit_date']))));
|
||||
|
||||
$ads_memo = safetext($_POST['ads_memo']);
|
||||
|
||||
if(empty($ads_url)){
|
||||
@@ -342,12 +343,12 @@ if (!empty($pdo)) {
|
||||
<div>
|
||||
<p>掲載開始日時</p>
|
||||
<div class="p2">広告の掲載開始日時です。</div>
|
||||
<input type="date" name="ads_start_date" class="inbox" value="">
|
||||
<input type="datetime-local" name="ads_start_date" class="inbox" value="">
|
||||
</div>
|
||||
<div>
|
||||
<p>掲載終了日時</p>
|
||||
<div class="p2">広告の掲載終了日時です。</div>
|
||||
<input type="date" name="ads_limit_date" class="inbox" value="">
|
||||
<input type="datetime-local" name="ads_limit_date" class="inbox" value="">
|
||||
</div>
|
||||
<div>
|
||||
<p>広告のメモ</p>
|
||||
@@ -372,7 +373,7 @@ if (!empty($pdo)) {
|
||||
}else{
|
||||
echo "設置解除済⛔";
|
||||
}}?></p>
|
||||
<p>設置期間:<?php echo date("Y年m月d日",strtotime($value["start_date"])).' から '.date("Y年m月d日",strtotime($value["limit_date"])).' まで';?>
|
||||
<p>設置期間:<?php echo date("Y/m/d H:i",strtotime($value["start_date"])).' - '.date("Y/m/d H:i",strtotime($value["limit_date"])).'';?>
|
||||
<hr>
|
||||
<p>URL:<?php echo safetext($value["url"]);?></p>
|
||||
<p>画像URL:<?php echo safetext($value["image_url"]);?></p>
|
||||
|
||||
+8
-18
@@ -1,31 +1,21 @@
|
||||
{
|
||||
"software": "uwuzu",
|
||||
"version": "1.4.4",
|
||||
"release_date": "2024-08-30",
|
||||
"release_notes": "このアップデートでは、動画をアップロードできない問題など様々な問題を修正しました!\nまた、安全性の向上や、絵文字の管理機能の強化などが含まれます。\n新しいバージョンのuwuzuをお楽しみください!",
|
||||
"version": "1.4.5",
|
||||
"release_date": "2024-10-13",
|
||||
"release_notes": "このアップデートではログイン時にパスワードが32文字以上入力できない問題や、他数件の問題が修正されています。",
|
||||
"notices": "アップデートの前に、データのバックアップを行うことをおすすめします!",
|
||||
"files": {
|
||||
"overwrite": [
|
||||
"/abi/addabi.php",
|
||||
"/admin/addadmin.php",
|
||||
"/api/migration-api.php",
|
||||
"/css/style.css",
|
||||
"/css/home.css",
|
||||
"/api/ueuse/get.php",
|
||||
"/bookmark/index.php",
|
||||
"/emoji/index.php",
|
||||
"/function/function.php",
|
||||
"/migration/index.php",
|
||||
"/nextpage/view.php",
|
||||
"/others/index.php",
|
||||
"/search/opensearch.php",
|
||||
"/settings/index.php",
|
||||
"/settings_admin/plugin_settings/phpmailer_sender.php",
|
||||
"/settings_admin/plugin_admin.php",
|
||||
"/home/index.php",
|
||||
"/user/outbox/index.php",
|
||||
"/settings_admin/ad_admin.php",
|
||||
"/settings_admin/addemoji_admin.php",
|
||||
"/settings_admin/overview_admin.php",
|
||||
"/authlogin.php",
|
||||
"/login.php",
|
||||
"/new.php",
|
||||
"/uwuzu_error_code.txt",
|
||||
"/server/uwuzuabout.txt",
|
||||
"/server/uwuzuinfo.txt",
|
||||
"/server/uwuzurelease.txt"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
require("../function/function.php");
|
||||
require("../../function/function.php");
|
||||
|
||||
$serversettings_file = "../../server/serversettings.ini";
|
||||
$serversettings = parse_ini_file($serversettings_file, true);
|
||||
|
||||
Reference in New Issue
Block a user