最初コミット
このコミットが含まれているのは:
コミット
9918d0d781
|
@ -0,0 +1 @@
|
|||
config.php
|
|
@ -0,0 +1,4 @@
|
|||
Freedom License v1 (2021年08月17日)
|
||||
|
||||
全く無限的自由です。
|
||||
It's infinite freedom.
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
define('SITE_NAME', '検索オンライン');
|
||||
define('IMAGE_SOURCES', []);
|
||||
define('VIDEO_SOURCES', ['video.076.ne.jp', 'youtube.076.ne.jp', 'odysee.076.ne.jp']);
|
||||
define('ARCHIVER', 'hozon.site');
|
||||
define('URL_SHORTENER', 'urlo.li');
|
||||
define('DOMAIN_SOURCES', []);
|
||||
|
||||
define('DB_HOST', 'localhost');
|
||||
define('DB_USER', '');
|
||||
define('DB_PASS', '');
|
||||
define('DB_NAME', 'kensaku');
|
||||
?>
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
function dd ($val) {
|
||||
echo '<pre>';
|
||||
var_dump($val);
|
||||
echo '</pre>';
|
||||
die();
|
||||
}
|
||||
?>
|
|
@ -0,0 +1,7 @@
|
|||
</div>
|
||||
<p class="footer">
|
||||
<a href="https://git.076.ne.jp/TechnicalSuwako/urlo.li"><img src="/static/git.png" alt="Git" /></a> |
|
||||
<a href="https://076.moe">匿名自営業076</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<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="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title><?php echo SITE_NAME.':'.$title; ?></title>
|
||||
<link rel="stylesheet" type="text/css" href="/static/style.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="kappa">
|
|
@ -0,0 +1,20 @@
|
|||
|
||||
<div class="links-<?php echo $linktype; ?>">
|
||||
<?php if ($linktype == 'top') { ?>
|
||||
<img src="/static/logo.png" alt="ロゴ" style="width: 300px;" />
|
||||
<?php } ?>
|
||||
<p>
|
||||
<?php if ($linktype == 'top') { ?>
|
||||
<a href="/">トップ</a> |
|
||||
<?php } else { ?>
|
||||
<a href="/"><img src="/static/logo.png" alt="ロゴ" style="width: 24px;" /></a> |
|
||||
<?php } ?>
|
||||
<a href="/image">画像</a> |
|
||||
<a href="/video">動画</a> |
|
||||
<a href="/domain">ドメイン</a>
|
||||
</p>
|
||||
<p>
|
||||
<a href="/about">検索オンラインについて</a> |
|
||||
<a href="/submit">ウエブサイトの追加</a>
|
||||
</p>
|
||||
</div>
|
|
@ -0,0 +1,67 @@
|
|||
server {
|
||||
server_name www.kensaku.online kensaku.online;
|
||||
|
||||
if ($host = www.kensaku.online) {
|
||||
return 301 https://kensaku.online$request_uri;
|
||||
}
|
||||
|
||||
root /www/active/kensaku.online/www;
|
||||
index index.php;
|
||||
|
||||
add_header Permissions-Policy interest-cohort=();
|
||||
add_header X-Content-Type-Options nosniff;
|
||||
#add_header X-Frame-Options SAMEORIGIN;
|
||||
add_header X-XSS-Protection "1; mode=block";
|
||||
add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains; preload';
|
||||
|
||||
rewrite ^(/.+)\.php$ https://$host$1 permanent;
|
||||
|
||||
location / {
|
||||
add_header Permissions-Policy interest-cohort=();
|
||||
add_header X-Content-Type-Options nosniff;
|
||||
#add_header X-Frame-Options SAMEORIGIN;
|
||||
add_header X-XSS-Protection "1; mode=block";
|
||||
add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains; preload';
|
||||
satisfy any;
|
||||
allow all;
|
||||
rewrite ^(.*)$ /$1.php;
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
try_files $uri =404;
|
||||
fastcgi_pass unix:/var/run/php/php8.0-fpm.sock;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
}
|
||||
|
||||
location ~* \.(jpg|jpeg|png|gif|ico|woff|webp)$ {
|
||||
expires 365d;
|
||||
}
|
||||
|
||||
location ~* \.(css|js|json)$ {
|
||||
expires 7d;
|
||||
}
|
||||
|
||||
listen 443 ssl http2;
|
||||
ssl_certificate /etc/letsencrypt/live/kensaku.online/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/kensaku.online/privkey.pem;
|
||||
include /etc/letsencrypt/options-ssl-nginx.conf;
|
||||
}
|
||||
|
||||
server {
|
||||
server_name www.kensaku.online kensaku.online;
|
||||
listen 80;
|
||||
|
||||
if ($host = kensaku.online) {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
||||
if ($host = www.kensaku.online) {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
||||
return 404;
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
DROP DATABASE IF EXISTS `kensaku`;
|
||||
CREATE DATABASE `kensaku` CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;
|
||||
|
||||
DROP TABLE IF EXISTS `website`;
|
||||
CREATE TABLE `website` (
|
||||
`id` int(10) NOT NULL AUTO_INCREMENT,
|
||||
`url` varchar(100) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
DROP TABLE IF EXISTS `website_page`;
|
||||
CREATE TABLE `website_page` (
|
||||
`id` int(10) NOT NULL AUTO_INCREMENT,
|
||||
`website_id` int(10) NOT NULL,
|
||||
`url` varchar(100) NOT NULL,
|
||||
`title` varchar(100),
|
||||
`body` text,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
|
@ -0,0 +1,10 @@
|
|||
INSERT INTO `website` (url) VALUES ('https://076.moe');
|
||||
INSERT INTO `website` (url) VALUES ('https://technicalsuwako.moe');
|
||||
|
||||
INSERT INTO `website_page` (website_id, url, title, body) VALUES (1, 'https://076.moe/', 'エッチなロリサービスプロバイダー', '匿名自営業076は日本の独自のサービスブロバイダーです。\n日本人向けサービスですが、色々の国々のユーザーも居ますので、海外の方も迎えます。\nサービスは全部無料ですので、モネロで支援出来れば、幸いです。\n\n076 AIB is a Japanese independent service provider.\nEven though it\'s meant for Japanese people, we also welcome international users.\nSince the services are all for free, please consider to donating to us in Monero.');
|
||||
INSERT INTO `website_page` (website_id, url, title, body) VALUES (1, 'https://076.moe/about', 'エッチなロリサービスプロバイダー', '076は世界で最初の匿名自営業(匿)です。\n匿名自営業(とくめいじえいぎょう)って何ですか?\n「株式会社」、「合同会社」、「合名会社」、「合資会社」等は旧経済の会社形態でした。\n設立には、会社を登録することが必須でした。\n新経済で、会社の登録が不要となりますので、会社形態はどっちでも良いです。');
|
||||
INSERT INTO `website_page` (website_id, url, title, body) VALUES (1, 'https://076.moe/support/monero', 'エッチなロリサービスプロバイダー:XMRで支援♡', 'ハウツー、動画、無料サービス等好きでしょうか?\n欲しければ、モネロ(XMR)でご支援お願い申し上げます。');
|
||||
INSERT INTO `website_page` (website_id, url, title, body) VALUES (1, 'https://076.moe/xmpp', 'エッチなロリサービスプロバイダー', '守谷神社(Tor):一般相談\nロリ天国(Tor):R-18 成人向けコンテンツで御座います\nオープン家(Tor):FOSSソフトの会話\n同人寺(Tor):同人ゲーム、漫画、アニメ等の会話\n日本国民自由主・無政府義者会(Tor):自由が大好き方は迎えます');
|
||||
|
||||
INSERT INTO `website_page` (website_id, url, title, body) VALUES (2, 'https://technicalsuwako.moe/', 'テクニカル諏訪子: トップページ', 'ようこそ、あたしのウェブページへ!諏訪子です。');
|
||||
INSERT INTO `website_page` (website_id, url, title, body) VALUES (2, 'https://technicalsuwako.moe/about', 'テクニカル諏訪子: 【XMPP】アカウントを作成方法', '今日はXMPPアカウントを作成方法を教えてみると思います。\n\nソフト\nGajim(Linux、Windows)\nDino(Linux)\nConversations(Android)\nPidgin(Linux、macOS、Windows)\nBeagleIM※(macOS)\nSiskin※(iOS)\n※日本語訳がありませんので、英語で使わないと。');
|
|
@ -0,0 +1,2 @@
|
|||
<?php
|
||||
?>
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
require_once('../helper.php');
|
||||
require_once('../config.php');
|
||||
|
||||
$title = '検索オンラインについて';
|
||||
$linktype = 'top';
|
||||
|
||||
require_once('../include/header.php');
|
||||
require_once('../include/menu.php');
|
||||
?>
|
||||
|
||||
<hr />
|
||||
開発中…
|
||||
|
||||
<?php
|
||||
require_once('../include/footer.php');
|
||||
?>
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
require_once('../helper.php');
|
||||
require_once('../config.php');
|
||||
|
||||
$title = 'ドメイン';
|
||||
$linktype = 'top';
|
||||
|
||||
require_once('../include/header.php');
|
||||
require_once('../include/menu.php');
|
||||
?>
|
||||
|
||||
<hr />
|
||||
開発中…
|
||||
|
||||
<?php
|
||||
require_once('../include/footer.php');
|
||||
?>
|
バイナリファイルは表示されません。
変更後 幅: | 高さ: | サイズ: 15 KiB |
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
require_once('../helper.php');
|
||||
require_once('../config.php');
|
||||
|
||||
$title = '画像';
|
||||
$linktype = 'top';
|
||||
|
||||
require_once('../include/header.php');
|
||||
require_once('../include/menu.php');
|
||||
?>
|
||||
|
||||
<hr />
|
||||
開発中…
|
||||
|
||||
<?php
|
||||
require_once('../include/footer.php');
|
||||
?>
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
require_once('../helper.php');
|
||||
require_once('../config.php');
|
||||
|
||||
$title = 'トップ';
|
||||
$linktype = 'top';
|
||||
|
||||
require_once('../include/header.php');
|
||||
require_once('../include/menu.php');
|
||||
?>
|
||||
|
||||
<hr />
|
||||
<div class="form">
|
||||
<form action="/search.php" method="get">
|
||||
<input type="text" name="q" value="" />
|
||||
<input type="submit" value="送信" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
require_once('../include/footer.php');
|
||||
?>
|
|
@ -0,0 +1,71 @@
|
|||
<?php
|
||||
if (!isset($_GET['q']) || $_GET['q'] == '') {
|
||||
header('Location: /');
|
||||
die();
|
||||
}
|
||||
|
||||
require_once('../helper.php');
|
||||
require_once('../config.php');
|
||||
|
||||
$title = $_GET['q'].'の検索';
|
||||
$linktype = 'side';
|
||||
$q = htmlspecialchars($_GET['q']);
|
||||
$res = [];
|
||||
|
||||
$mysqli = mysqli_connect(DBHOST, DBUSER, DBPASS, DBNAME);
|
||||
|
||||
if (mysqli_connect_errno()) {
|
||||
printf("Connect failed: %s\n", mysqli_connect_error());
|
||||
exit();
|
||||
}
|
||||
|
||||
if ($pages = mysqli_prepare($mysqli, "SELECT * FROM website_page WHERE title LIKE ? OR body LIKE ?")) {
|
||||
$lq = "%$q%";
|
||||
mysqli_stmt_bind_param($pages, "ss", $lq, $lq);
|
||||
mysqli_stmt_execute($pages);
|
||||
mysqli_stmt_bind_result($pages, $wpid, $webid, $pageurl, $pagetit, $pagebody);
|
||||
mysqli_execute($pages);
|
||||
|
||||
while (mysqli_stmt_fetch($pages)) {
|
||||
$cq = strtoupper($q);
|
||||
$pagetit = preg_replace('/'.$cq.'/i', '<b>'.$cq.'</b>', $pagetit);
|
||||
$pagebody = preg_replace('/'.$cq.'/i', '<b>'.$cq.'</b>', $pagebody);
|
||||
|
||||
$res[] = [
|
||||
'url' => $pageurl,
|
||||
'title' => $pagetit,
|
||||
'body' => strlen($pagebody) > 100 ? substr($pagebody, 0, 100).'…' : $pagebody
|
||||
];
|
||||
}
|
||||
|
||||
mysqli_stmt_close($pages);
|
||||
}
|
||||
|
||||
mysqli_close($mysqli);
|
||||
|
||||
require_once('../include/header.php');
|
||||
require_once('../include/menu.php');
|
||||
?>
|
||||
|
||||
<hr />
|
||||
<div class="form">
|
||||
<form action="/search.php" method="get">
|
||||
<input type="text" name="q" value="<?php echo $q; ?>" />
|
||||
<input type="submit" value="送信" />
|
||||
</form>
|
||||
</div>
|
||||
<hr />
|
||||
|
||||
<?php foreach ($res as $r) { ?>
|
||||
<div class="result">
|
||||
<a href="<?php echo $r['url']; ?>">
|
||||
<span class="result-url"><?php echo $r['url']; ?></span>
|
||||
<div class="result-title"><?php echo $r['title']; ?></div>
|
||||
<div class="result-description"><?php echo $r['body']; ?></div>
|
||||
</a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
require_once('../include/footer.php');
|
||||
?>
|
バイナリファイルは表示されません。
変更後 幅: | 高さ: | サイズ: 8.3 KiB |
バイナリファイルは表示されません。
変更後 幅: | 高さ: | サイズ: 725 KiB |
|
@ -0,0 +1,84 @@
|
|||
body {
|
||||
background-color: #232629;
|
||||
color: #fcfcfc;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #71dbc6;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
hr {
|
||||
border-color: #10f3c6;
|
||||
box-shadow: 2px 2px 10px #021a15;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
h1, .footer {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
h1 {
|
||||
padding-bottom: 60px;
|
||||
}
|
||||
|
||||
.kappa {
|
||||
background-color: #16a085;
|
||||
border: 2px #10f3c6 solid;
|
||||
color: #095e4d;
|
||||
max-width: 1200px;
|
||||
padding: 4px;
|
||||
margin: 8px auto;
|
||||
}
|
||||
|
||||
.form {
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
input[type="text"], input[type="submit"] {
|
||||
background-color: #035444;
|
||||
color: #16a085;
|
||||
border: 1px #16a085 groove;
|
||||
border-radius: 2px;
|
||||
margin: 4px auto;
|
||||
font-size: 24px;
|
||||
border-radius: 6px;
|
||||
transition: background-color .3s;
|
||||
}
|
||||
|
||||
input[type="text"] {
|
||||
width: 98%;
|
||||
max-width: 820px;
|
||||
}
|
||||
|
||||
input[type="text"]:hover, input[type="submit"]:hover {
|
||||
background-color: #06705b;
|
||||
}
|
||||
|
||||
.links-top {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.result {
|
||||
background-color: #035444;
|
||||
margin: 10px 0;
|
||||
border-radius: 2px;
|
||||
transition: background-color .3s;
|
||||
}
|
||||
|
||||
.result > a {
|
||||
transition: color .3s;
|
||||
}
|
||||
|
||||
.result:hover {
|
||||
background-color: #1dd1ad;
|
||||
}
|
||||
|
||||
.result:hover > a {
|
||||
color: #035444;
|
||||
}
|
||||
|
||||
.result-title {
|
||||
font-size: 28px;
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
require_once('../helper.php');
|
||||
require_once('../config.php');
|
||||
|
||||
$title = 'ウエブサイトの追加';
|
||||
$linktype = 'top';
|
||||
|
||||
require_once('../include/header.php');
|
||||
require_once('../include/menu.php');
|
||||
?>
|
||||
|
||||
<hr />
|
||||
開発中…
|
||||
|
||||
<?php
|
||||
require_once('../include/footer.php');
|
||||
?>
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
require_once('../helper.php');
|
||||
require_once('../config.php');
|
||||
|
||||
$title = '動画';
|
||||
$linktype = 'top';
|
||||
|
||||
require_once('../include/header.php');
|
||||
require_once('../include/menu.php');
|
||||
?>
|
||||
|
||||
<hr />
|
||||
開発中…
|
||||
|
||||
<?php
|
||||
require_once('../include/footer.php');
|
||||
?>
|
新しいイシューから参照