mirror of
https://github.com/Daichimarukana/uwuzu.git
synced 2026-06-05 03:24:41 +00:00
uwuzu v1.3.0 new_planet
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
$url = "instance";
|
||||
header("Location:".$url."");
|
||||
exit;
|
||||
?>
|
||||
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
$serversettings_file = "../../server/serversettings.ini";
|
||||
$serversettings = parse_ini_file($serversettings_file, true);
|
||||
function decode_yajirushi($postText){
|
||||
$postText = str_replace('←', '←', $postText);
|
||||
$postText = str_replace('↓', '↓', $postText);
|
||||
$postText = str_replace('↑', '↑', $postText);
|
||||
$postText = str_replace('→', '→', $postText);
|
||||
return $postText;
|
||||
}
|
||||
if(htmlspecialchars($serversettings["serverinfo"]["server_activitypub"], ENT_QUOTES, 'UTF-8') === "true"){
|
||||
header("Content-Type: application/json");
|
||||
header("charset=utf-8");
|
||||
header("Access-Control-Allow-Origin: *");
|
||||
|
||||
$mojisizefile = "../../server/textsize.txt";
|
||||
|
||||
$adminfile = htmlentities($serversettings["serverinfo"]["server_admin"]);
|
||||
|
||||
$servernamefile = htmlentities($serversettings["serverinfo"]["server_name"]);
|
||||
|
||||
$serverinfofile = '../../server/info.txt';
|
||||
$serverinfo = htmlentities(file_get_contents($serverinfofile));
|
||||
|
||||
$contactfile = htmlentities($serversettings["serverinfo"]["server_admin_mailadds"]);
|
||||
|
||||
$domain = $_SERVER['HTTP_HOST'];
|
||||
|
||||
$softwarefile = "../../server/uwuzuinfo.txt";
|
||||
$softwaredata = htmlentities(file_get_contents($softwarefile));
|
||||
|
||||
$onlyuser = htmlentities($serversettings["serverinfo"]["server_invitation"]);
|
||||
|
||||
$server_head = htmlentities($serversettings["serverinfo"]["server_head"]);
|
||||
|
||||
$softwaredata = explode( "\n", $softwaredata );
|
||||
$cnt = count( $softwaredata );
|
||||
for( $i=0;$i<$cnt;$i++ ){
|
||||
$uwuzuinfo[$i] = ($softwaredata[$i]);
|
||||
}
|
||||
|
||||
if($onlyuser === "true"){
|
||||
$openregit = false;
|
||||
}elseif($onlyuser === "false"){
|
||||
$openregit = true;
|
||||
}else{
|
||||
$openregit = false;
|
||||
}
|
||||
|
||||
$item = array(
|
||||
"uri" => $domain,
|
||||
"email" => $contactfile,
|
||||
"title" => "uwuzu",
|
||||
"version" =>str_replace("\r", '', $uwuzuinfo[1]),
|
||||
"thumbnail" => $server_head,
|
||||
"description" => $serverinfo,
|
||||
);
|
||||
|
||||
echo json_encode($item, JSON_UNESCAPED_UNICODE);
|
||||
}else{
|
||||
header("HTTP/1.1 410 Gone");
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user