更新
このコミットが含まれているのは:
コミット
d0bebd47e7
|
@ -1,4 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
define('SITE_URL', 'https://urlo.li');
|
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♡');
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -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');
|
||||||
|
?>
|
|
@ -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>
|
</div>
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
<a href="https://gitler.moe/TechnicalSuwako/urlo.li"><img src="/static/git.png" alt="Git" /></a> |
|
<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>
|
</p>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -2,17 +2,14 @@
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja">
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja">
|
||||||
<head>
|
<head>
|
||||||
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
|
<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" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<title><?php echo $title; ?></title>
|
<title><?php echo $title; ?></title>
|
||||||
<link rel="stylesheet" type="text/css" href="/static/style.css" />
|
<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>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1><span><?php echo $h1; ?></span></h1>
|
<h1>
|
||||||
<div class="nihongo">
|
<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') ?>
|
<?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 />
|
<hr />
|
||||||
|
<?php echo LOC_URL_NYUURYOKU; ?>
|
||||||
<div class="form">
|
<div class="form">
|
||||||
<form action="/" method="post">
|
<form action="/" method="post">
|
||||||
<input type="text" name="newadd" value="" />
|
<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>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<?php require_once('includes/footer.php'); ?>
|
<?php require_once('includes/footer.php'); ?>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php include_once('includes/header.php') ?>
|
<?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>
|
<a href="<?php echo SITE_URL.'/'.$newurl; ?>"><?php echo SITE_URL.'/'.$newurl; ?></a>
|
||||||
<br /><br />
|
<br /><br />
|
||||||
<a href="/">トップページに戻る</a>
|
<a href="/"><?php echo LOC_TOPPAGE_NI_MODORU; ?></a>
|
||||||
<?php include_once('includes/footer.php'); ?>
|
<?php include_once('includes/footer.php'); ?>
|
||||||
|
|
|
@ -1,8 +1,17 @@
|
||||||
<?php
|
<?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');
|
require_once('../config.php');
|
||||||
|
|
||||||
$title = SITE_NAME;
|
$title = $lang == 'en' ? SITE_NAME_EN : SITE_NAME_JA;
|
||||||
$h1 = SITE_NAME;
|
|
||||||
|
|
||||||
function mkstring () {
|
function mkstring () {
|
||||||
$stringchars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890';
|
$stringchars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890';
|
||||||
|
@ -20,20 +29,14 @@
|
||||||
if (isset($_POST['sosin'])) {
|
if (isset($_POST['sosin'])) {
|
||||||
$newadd = $_POST['newadd'];
|
$newadd = $_POST['newadd'];
|
||||||
if (!str_starts_with($newadd, 'http://') && !str_starts_with($newadd, 'https://')) {
|
if (!str_starts_with($newadd, 'http://') && !str_starts_with($newadd, 'https://')) {
|
||||||
$title = '076エラー - 不正なURL';
|
$title .= '〜'.LOC_FUSEINA_URL;
|
||||||
$h1 = '【エラー】不正なURL';
|
$err = LOC_ERROR_URL_HTTP_HTTPS;
|
||||||
$bg = 'daityan';
|
|
||||||
$bgpos = 'top right 100px';
|
|
||||||
$err = 'URLは「http://」又は「https://」で始まります。';
|
|
||||||
include_once('../views/404.php');
|
include_once('../views/404.php');
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strlen($newadd) > 500) {
|
if (strlen($newadd) > 500) {
|
||||||
$title = '076エラー - 不正なURL';
|
$title .= '〜'.LOC_FUSEINA_URL;
|
||||||
$h1 = '【エラー】URLは長すぎ';
|
|
||||||
$bg = 'daityan';
|
|
||||||
$bgpos = 'top right 100px';
|
|
||||||
$err = 'URLは500文字以内です。';
|
$err = 'URLは500文字以内です。';
|
||||||
include_once('../views/404.php');
|
include_once('../views/404.php');
|
||||||
exit;
|
exit;
|
||||||
|
@ -67,9 +70,8 @@
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
else if (!isset($_GET['url']) && isset($_GET['newurl'])) {
|
else if (!isset($_GET['url']) && isset($_GET['newurl'])) {
|
||||||
|
$title .= '〜'.LOC_TANSYUKUZUMI;
|
||||||
$newurl = $_GET['newurl'];
|
$newurl = $_GET['newurl'];
|
||||||
$bg = 'kasen';
|
|
||||||
$bgpos = 'top 10px left 120px';
|
|
||||||
include_once('../views/submitted.php');
|
include_once('../views/submitted.php');
|
||||||
}
|
}
|
||||||
else if (isset($_GET['url']) && $_GET['url'] != '') {
|
else if (isset($_GET['url']) && $_GET['url'] != '') {
|
||||||
|
@ -86,26 +88,19 @@
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$title = '076エラー - 未検出';
|
$title .= '〜'.LOC_MIKENSYUTU;
|
||||||
$h1 = '【404】未検出';
|
$err = LOC_ERROR_URL_MITUKAREMASEN;
|
||||||
$bg = 'daityan';
|
|
||||||
$bgpos = 'top right 100px';
|
|
||||||
$err = 'このURLを見つけられませんでした。';
|
|
||||||
include_once('../views/404.php');
|
include_once('../views/404.php');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!isset($_GET['url']) && $_SERVER['REQUEST_URI'] == '/') {
|
else if (!isset($_GET['url']) && $_SERVER['REQUEST_URI'] == '/') {
|
||||||
$bg = 'rumia';
|
$title .= '〜'.LOC_TOP;
|
||||||
$bgpos = 'top -30px right 90px';
|
|
||||||
include_once('../views/index.php');
|
include_once('../views/index.php');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$title = '076エラー - 未検出';
|
$title .= '〜'.LOC_MIKENSYUTU;
|
||||||
$h1 = '【404】未検出';
|
$err = LOC_ERROR_URL_MITUKAREMASEN;
|
||||||
$bg = 'daityan';
|
|
||||||
$bgpos = 'top right 100px';
|
|
||||||
$err = 'このURLを見つけられませんでした。';
|
|
||||||
include_once('../views/404.php');
|
include_once('../views/404.php');
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
バイナリファイルは表示されません。
変更前 幅: | 高さ: | サイズ: 41 KiB |
バイナリ
www/static/kasen.png
バイナリ
www/static/kasen.png
バイナリファイルは表示されません。
変更前 幅: | 高さ: | サイズ: 87 KiB |
バイナリファイルは表示されません。
変更後 幅: | 高さ: | サイズ: 58 KiB |
バイナリ
www/static/rumia.png
バイナリ
www/static/rumia.png
バイナリファイルは表示されません。
変更前 幅: | 高さ: | サイズ: 82 KiB |
|
@ -14,29 +14,17 @@ hr {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1, .footer {
|
.headerimg {
|
||||||
text-align: center;
|
border: 1px solid #f2f;
|
||||||
|
box-shadow: 0px 0px 11px 5px #f0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
.body {
|
||||||
padding-bottom: 60px;
|
margin: 0 auto;
|
||||||
}
|
max-width: 800px;
|
||||||
|
background-color: #21082b;
|
||||||
h1 > span {
|
padding: 8px;
|
||||||
background-color: rgba(35, 38, 41, 0.8);
|
box-shadow: 0px 0px 11px 5px #f0f;
|
||||||
}
|
|
||||||
|
|
||||||
.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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.form {
|
.form {
|
||||||
|
@ -45,14 +33,31 @@ h1 > span {
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type="text"], input[type="submit"] {
|
input[type="text"], input[type="submit"] {
|
||||||
background-color: #683c7a;
|
|
||||||
color: #fcfcfc;
|
|
||||||
border: 1px #f9f groove;
|
border: 1px #f9f groove;
|
||||||
border-radius: 2px;
|
margin: 4px auto;
|
||||||
margin: 4px; auto;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type="text"] {
|
input[type="text"] {
|
||||||
width: 98%;
|
width: 99%;
|
||||||
max-width: 820px;
|
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;
|
||||||
}
|
}
|
||||||
|
|
新しいイシューから参照