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

uwuzu version 1.2.28

This commit is contained in:
daichimarukana
2023-12-20 22:36:44 +09:00
parent 6367282bb5
commit 51d7d84b63
89 changed files with 2770 additions and 1998 deletions
-1
View File
@@ -16,7 +16,6 @@
<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>
+4 -9
View File
@@ -1,16 +1,11 @@
<?php
$serverlogofile = "../server/serverlogo.txt";
$serverlogodata = file_get_contents($serverlogofile);
$serverlogodata = explode( "\n", $serverlogodata );
$cnt = count( $serverlogodata );
for( $i=0;$i<$cnt;$i++ ){
$serverlogo_link[$i] = ($serverlogodata[$i]);
}
$serversettings_file = "../server/serversettings.ini";
$serversettings = parse_ini_file($serversettings_file, true);
?>
<div class="userleftbox">
<?php if(!empty($serverlogo_link[0])){ ?>
<?php if(!empty($serversettings["serverinfo"]["server_logo_home"])){ ?>
<div class="logo">
<img src=<?php echo htmlspecialchars($serverlogo_link[0], ENT_QUOTES, 'UTF-8');?>>
<img src=<?php echo htmlspecialchars($serversettings["serverinfo"]["server_logo_home"], ENT_QUOTES, 'UTF-8');?>>
</div>
<?php }else{?>
<div class="logo">
+37 -24
View File
@@ -2,7 +2,8 @@
<?php
require('../notice/notice.php');
$servernamefile = "../server/servername.txt";
$serversettings_file = "../server/serversettings.ini";
$serversettings = parse_ini_file($serversettings_file, true);
//-------------------------------------
@@ -19,28 +20,40 @@
$uwuzuinfo[$i] = ($softwaredata[$i]);
}
function replaceURLsWithLinks_forRightbox($postText) {
// URLを正規表現を使って検出
$pattern = '/(https:\/\/[^\s<>\[\]\'"]+)/'; // 改良された正規表現
preg_match_all($pattern, $postText, $matches);
// 検出したURLごとに処理を行う
foreach ($matches[0] as $url) {
// ドメイン部分を抽出
$parsedUrl = parse_url($url);
if (!isset($parsedUrl['path'])) {
$parsedUrl['path'] = '';
}
$domain = $parsedUrl['host'].(strlen($parsedUrl['path']) > 24 ? substr($parsedUrl['path'], 0, 24) . '...' : $parsedUrl['path']);
// 不要な文字を削除してaタグを生成
$urlWithoutSpaces = preg_replace('/\s+/', '', $url);
$link = "<a href='$urlWithoutSpaces' target='_blank' title='$urlWithoutSpaces'>$domain</a>";
// URLをドメインのみを表示するaタグで置き換え
$postText = preg_replace('/' . preg_quote($url, '/') . '/', $link, $postText);
}
return $postText;
$postText = str_replace('&#039;', '\'', $postText);
// URLを正規表現を使って検出
$pattern = '/(https:\/\/[^\s<>\[\]\'"]+)/'; // 改良された正規表現
preg_match_all($pattern, $postText, $matches);
// 検出したURLごとに処理を行う
foreach ($matches[0] as $url) {
// ドメイン部分を抽出
$parsedUrl = parse_url($url);
if (!isset($parsedUrl['path'])) {
$parsedUrl['path'] = '';
}
if (!isset($parsedUrl['query'])) {
$parsedUrl['query'] = '';
}
$nochk_domain = $parsedUrl['host'].$parsedUrl['path'].$parsedUrl['query'];
if(strlen($nochk_domain) > 47){
$domain = mb_substr($nochk_domain, 0, 48, "UTF-8")."...";
}else{
$domain = $nochk_domain;
}
// 不要な文字を削除してaタグを生成
$urlWithoutSpaces = preg_replace('/\s+/', '', $url);
$link = "<a href='$urlWithoutSpaces' target='_blank' title='$urlWithoutSpaces'>$domain</a>";
// URLをドメインのみを表示するaタグで置き換え
$postText = preg_replace('/' . preg_quote($url, '/') . '/', $link, $postText);
}
return $postText;
}
?>
<div class="noticearea">
@@ -65,7 +78,7 @@
<div class="btmbox">
<h1>サーバー情報</h1>
<h2>Server</h2>
<h3><?php echo file_get_contents($servernamefile);?></h3>
<h3><?php echo htmlspecialchars($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8');?></h3>
<p><?php echo $domain;?></p>
<a href="/rule/terms">利用規約</a><a href="/rule/privacypolicy">プライバシーポリシー</a><a href="/rule/serverabout">詳細</a>
<h2>Software</h2>