commit 9918d0d781068f15e97b0c9e55b44e89872dc5df Author: テクニカル諏訪子 Date: Wed Jun 1 05:29:23 2022 +0900 最初コミット diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4f4773f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +config.php diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..6e2c1b6 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,4 @@ +Freedom License v1 (2021年08月17日) + +全く無限的自由です。 +It's infinite freedom. diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/api/.suwa b/api/.suwa new file mode 100644 index 0000000..e69de29 diff --git a/config.sample.php b/config.sample.php new file mode 100644 index 0000000..0a49578 --- /dev/null +++ b/config.sample.php @@ -0,0 +1,13 @@ + diff --git a/helper.php b/helper.php new file mode 100644 index 0000000..fee272c --- /dev/null +++ b/helper.php @@ -0,0 +1,8 @@ +'; + var_dump($val); + echo ''; + die(); + } +?> diff --git a/include/footer.php b/include/footer.php new file mode 100644 index 0000000..cb2c158 --- /dev/null +++ b/include/footer.php @@ -0,0 +1,7 @@ + + + + diff --git a/include/header.php b/include/header.php new file mode 100644 index 0000000..8c2b36c --- /dev/null +++ b/include/header.php @@ -0,0 +1,10 @@ + + + + + + <?php echo SITE_NAME.':'.$title; ?> + + + +
diff --git a/include/menu.php b/include/menu.php new file mode 100644 index 0000000..f5365b7 --- /dev/null +++ b/include/menu.php @@ -0,0 +1,20 @@ + + diff --git a/logo.png b/logo.png new file mode 100644 index 0000000..ad82748 Binary files /dev/null and b/logo.png differ diff --git a/srv/nginx b/srv/nginx new file mode 100644 index 0000000..a96a705 --- /dev/null +++ b/srv/nginx @@ -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; +} diff --git a/srv/tbl b/srv/tbl new file mode 100644 index 0000000..377d9c6 --- /dev/null +++ b/srv/tbl @@ -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; diff --git a/srv/tbl2 b/srv/tbl2 new file mode 100644 index 0000000..66f1389 --- /dev/null +++ b/srv/tbl2 @@ -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※日本語訳がありませんので、英語で使わないと。'); diff --git a/tool/crawler.php b/tool/crawler.php new file mode 100644 index 0000000..acb6c35 --- /dev/null +++ b/tool/crawler.php @@ -0,0 +1,2 @@ + diff --git a/www/about.php b/www/about.php new file mode 100644 index 0000000..9887bf2 --- /dev/null +++ b/www/about.php @@ -0,0 +1,17 @@ + + +
+ 開発中… + + diff --git a/www/domain.php b/www/domain.php new file mode 100644 index 0000000..7fd5adb --- /dev/null +++ b/www/domain.php @@ -0,0 +1,17 @@ + + +
+ 開発中… + + diff --git a/www/favicon.ico b/www/favicon.ico new file mode 100644 index 0000000..b05832e Binary files /dev/null and b/www/favicon.ico differ diff --git a/www/image.php b/www/image.php new file mode 100644 index 0000000..1862714 --- /dev/null +++ b/www/image.php @@ -0,0 +1,17 @@ + + +
+ 開発中… + + diff --git a/www/index.php b/www/index.php new file mode 100644 index 0000000..69b1aea --- /dev/null +++ b/www/index.php @@ -0,0 +1,22 @@ + + +
+
+
+ + +
+
+ + diff --git a/www/search.php b/www/search.php new file mode 100644 index 0000000..e7b5f3f --- /dev/null +++ b/www/search.php @@ -0,0 +1,71 @@ +'.$cq.'', $pagetit); + $pagebody = preg_replace('/'.$cq.'/i', ''.$cq.'', $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'); +?> + +
+
+
+ + +
+
+
+ + + + + + diff --git a/www/static/git.png b/www/static/git.png new file mode 100644 index 0000000..df3afde Binary files /dev/null and b/www/static/git.png differ diff --git a/www/static/logo.png b/www/static/logo.png new file mode 100644 index 0000000..ad82748 Binary files /dev/null and b/www/static/logo.png differ diff --git a/www/static/style.css b/www/static/style.css new file mode 100644 index 0000000..065f709 --- /dev/null +++ b/www/static/style.css @@ -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; +} diff --git a/www/submit.php b/www/submit.php new file mode 100644 index 0000000..4725190 --- /dev/null +++ b/www/submit.php @@ -0,0 +1,17 @@ + + +
+ 開発中… + + diff --git a/www/video.php b/www/video.php new file mode 100644 index 0000000..72c9982 --- /dev/null +++ b/www/video.php @@ -0,0 +1,17 @@ + + +
+ 開発中… + +