このコミットが含まれているのは:
守矢諏訪子 2022-08-25 18:51:17 +09:00
コミット d0bebd47e7
13個のファイルの変更107行の追加67行の削除

ファイルの表示

@ -1,4 +1,7 @@
<?php
define('SITE_URL', 'https://urlo.li');
define('SITE_NAME', 'URLロリ');
define('SITE_NAME_JA', 'URLロリ');
define('SITE_NAME_EN', 'URL Loli');
define('SITE_DESC_JA', 'クッソ小さいURL短縮作成ソフトだわ〜♡');
define('SITE_DESC_EN', 'It\'s a fucking small URL shorterner software♡');
?>

15
lang/en.php ノーマルファイル
ファイルの表示

@ -0,0 +1,15 @@
<?php
define('LOC_ERROR_URL_MITUKAREMASEN', 'This URL could not be found.');
define('LOC_ERROR_URL_HTTP_HTTPS', 'The URL should start with "http://" or "https://".');
define('LOC_URL_NYUURYOKU', 'Please enter a URL.');
define('LOC_SOSIN', 'Submit');
define('LOC_LOGO', 'Logo');
define('LOC_TOP', 'Top');
define('LOC_TOPPAGE_NI_MODORU', 'Return to toppage');
define('LOC_KAKI_URL_KARA_ACCESS_DEKIRU', 'You can access from the URL below.');
define('LOC_MIKENSYUTU', 'Not found');
define('LOC_FUSEINA_URL', 'Invalid URL');
define('LOC_TANSYUKUZUMI', 'Shortened');
define('LOC_SOURCE_CODE', 'Source code');
define('LOC_076_AIB', '076 Anonymous Independent Business');
?>

15
lang/ja.php ノーマルファイル
ファイルの表示

@ -0,0 +1,15 @@
<?php
define('LOC_ERROR_URL_MITUKAREMASEN', 'このURLを見つけられませんでした。');
define('LOC_ERROR_URL_HTTP_HTTPS', 'URLは「http://」又は「https://」で始めます。');
define('LOC_URL_NYUURYOKU', 'URLをご入力下さい。');
define('LOC_SOSIN', '送信');
define('LOC_LOGO', 'ロゴ');
define('LOC_TOP', 'トップ');
define('LOC_TOPPAGE_NI_MODORU', 'トップページに戻る');
define('LOC_KAKI_URL_KARA_ACCESS_DEKIRU', '下記のURLからアクセス出来ます。');
define('LOC_MIKENSYUTU', '未検出');
define('LOC_FUSEINA_URL', '不正なURL');
define('LOC_TANSYUKUZUMI', '短縮済み');
define('LOC_SOURCE_CODE', 'ソースコード');
define('LOC_076_AIB', '匿名自営業076');
?>

ファイルの表示

@ -1,7 +1,7 @@
</div>
<p class="footer">
<a href="https://gitler.moe/TechnicalSuwako/urlo.li"><img src="/static/git.png" alt="Git" /></a> |
<a href="https://076.moe">匿名自営業076</a>
<a href="https://076.moe"><?php echo LOC_076_AIB; ?></a>
</p>
</body>
</html>

ファイルの表示

@ -2,17 +2,14 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja">
<head>
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
<meta name="title" content="<?php echo $lang == 'en' ? SITE_NAME_EN : SITE_NAME_JA ?>" />
<meta name="description" content="<?php echo $lang == 'en' ? SITE_DESC_EN : SITE_DESC_JA?>" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title><?php echo $title; ?></title>
<link rel="stylesheet" type="text/css" href="/static/style.css" />
<style>
body {
background-image: url('/static/<?php echo $bg; ?>.png');
background-repeat: no-repeat;
background-position: <?php echo $bgpos; ?>;
}
</style>
</head>
<body>
<h1><span><?php echo $h1; ?></span></h1>
<div class="nihongo">
<h1>
<img class="headerimg" src="/static/logo.jpg" alt="<?php echo LOC_LOGO; ?>" />
</h1>
<div class="body">

ファイルの表示

@ -1,10 +1,20 @@
<?php require_once('includes/header.php') ?>
URLをご入力下さい。
<p>
<a href="/"><?php echo LOC_TOP; ?></a>
</p>
<form method="post" action="/">
<div class="switchlang">
<input class="langchange" type="submit" name="langchange" value="<?php echo $lang == 'en' ? '日本語に更新' : 'Change to English'; ?>" />
</div>
</form>
<hr />
<?php echo LOC_URL_NYUURYOKU; ?>
<div class="form">
<form action="/" method="post">
<input type="text" name="newadd" value="" />
<input type="submit" name="sosin" value="送信" />
<div class="submit">
<input type="submit" name="sosin" value="<?php echo LOC_SOSIN; ?>" />
</div>
</form>
</div>
<?php require_once('includes/footer.php'); ?>

ファイルの表示

@ -1,6 +1,6 @@
<?php include_once('includes/header.php') ?>
下記のURLからアクセス出来ます。<br />
<?php echo LOC_KAKI_URL_KARA_ACCESS_DEKIRU; ?><br />
<a href="<?php echo SITE_URL.'/'.$newurl; ?>"><?php echo SITE_URL.'/'.$newurl; ?></a>
<br /><br />
<a href="/">トップページに戻る</a>
<a href="/"><?php echo LOC_TOPPAGE_NI_MODORU; ?></a>
<?php include_once('includes/footer.php'); ?>

ファイルの表示

@ -1,8 +1,17 @@
<?php
$lang = isset($_COOKIE['lang']) ? $_COOKIE['lang'] : 'ja';
if (isset($_POST['langchange'])) {
$lang = null !== $_COOKIE['lang'] && $_COOKIE['lang'] == 'en' ? 'ja' : 'en';
setcookie('lang', $lang);
unset($_POST['langchange']);
header('Location: /');
}
include('../lang/'.$lang.'.php');
require_once('../config.php');
$title = SITE_NAME;
$h1 = SITE_NAME;
$title = $lang == 'en' ? SITE_NAME_EN : SITE_NAME_JA;
function mkstring () {
$stringchars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890';
@ -20,20 +29,14 @@
if (isset($_POST['sosin'])) {
$newadd = $_POST['newadd'];
if (!str_starts_with($newadd, 'http://') && !str_starts_with($newadd, 'https://')) {
$title = '076エラー - 不正なURL';
$h1 = '【エラー】不正なURL';
$bg = 'daityan';
$bgpos = 'top right 100px';
$err = 'URLは「http://」又は「https://」で始まります。';
$title .= '〜'.LOC_FUSEINA_URL;
$err = LOC_ERROR_URL_HTTP_HTTPS;
include_once('../views/404.php');
exit;
}
if (strlen($newadd) > 500) {
$title = '076エラー - 不正なURL';
$h1 = '【エラー】URLは長すぎ';
$bg = 'daityan';
$bgpos = 'top right 100px';
$title .= '〜'.LOC_FUSEINA_URL;
$err = 'URLは500文字以内です。';
include_once('../views/404.php');
exit;
@ -67,9 +70,8 @@
exit;
}
else if (!isset($_GET['url']) && isset($_GET['newurl'])) {
$title .= '〜'.LOC_TANSYUKUZUMI;
$newurl = $_GET['newurl'];
$bg = 'kasen';
$bgpos = 'top 10px left 120px';
include_once('../views/submitted.php');
}
else if (isset($_GET['url']) && $_GET['url'] != '') {
@ -86,26 +88,19 @@
exit;
}
else {
$title = '076エラー - 未検出';
$h1 = '【404】未検出';
$bg = 'daityan';
$bgpos = 'top right 100px';
$err = 'このURLを見つけられませんでした。';
$title .= '〜'.LOC_MIKENSYUTU;
$err = LOC_ERROR_URL_MITUKAREMASEN;
include_once('../views/404.php');
}
}
}
else if (!isset($_GET['url']) && $_SERVER['REQUEST_URI'] == '/') {
$bg = 'rumia';
$bgpos = 'top -30px right 90px';
$title .= '〜'.LOC_TOP;
include_once('../views/index.php');
}
else {
$title = '076エラー - 未検出';
$h1 = '【404】未検出';
$bg = 'daityan';
$bgpos = 'top right 100px';
$err = 'このURLを見つけられませんでした。';
$title .= '〜'.LOC_MIKENSYUTU;
$err = LOC_ERROR_URL_MITUKAREMASEN;
include_once('../views/404.php');
}
?>

バイナリ
www/static/daityan.png

バイナリファイルは表示されません。

変更前

幅:  |  高さ:  |  サイズ: 41 KiB

バイナリ
www/static/kasen.png

バイナリファイルは表示されません。

変更前

幅:  |  高さ:  |  サイズ: 87 KiB

バイナリ
www/static/logo.jpg ノーマルファイル

バイナリファイルは表示されません。

変更後

幅:  |  高さ:  |  サイズ: 58 KiB

バイナリ
www/static/rumia.png

バイナリファイルは表示されません。

変更前

幅:  |  高さ:  |  サイズ: 82 KiB

ファイルの表示

@ -14,29 +14,17 @@ hr {
width: 100%;
}
h1, .footer {
text-align: center;
.headerimg {
border: 1px solid #f2f;
box-shadow: 0px 0px 11px 5px #f0f;
}
h1 {
padding-bottom: 60px;
}
h1 > span {
background-color: rgba(35, 38, 41, 0.8);
}
.nihongo {
background-color: rgba(33, 8, 43, 0.8);
border: 1px #f2f groove;
color: #d6a9d6;
max-width: 830px;
padding: 4px;
margin: 8px auto;
}
.nihongo > a {
color: #ffeb3b;
.body {
margin: 0 auto;
max-width: 800px;
background-color: #21082b;
padding: 8px;
box-shadow: 0px 0px 11px 5px #f0f;
}
.form {
@ -45,14 +33,31 @@ h1 > span {
}
input[type="text"], input[type="submit"] {
background-color: #683c7a;
color: #fcfcfc;
border: 1px #f9f groove;
border-radius: 2px;
margin: 4px; auto;
margin: 4px auto;
}
input[type="text"] {
width: 98%;
max-width: 820px;
width: 99%;
max-width: 700px;
border-color: #d6a9d6;
}
input {
background-color: #683c7a;
font-size: 24px;
border-radius: 4px;
}
.body, input {
color: #d6a9d6;
border: 1px #ff3b3b groove;
}
.submit, .footer, h1, .switchlang {
text-align: center;
}
.submit, .footer, h1 {
margin-top: 32px;
}