diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bcad0a6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,474 @@ +##### Windows +# Windows thumbnail cache files +Thumbs.db +Thumbs.db:encryptable +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +##### Linux +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + +##### MacOS +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +##### Backup +*.bak +*.gho +*.ori +*.orig +*.tmp + +##### GPG +secring.* + +##### Dropbox +# Dropbox settings and caches +.dropbox +.dropbox.attr +.dropbox.cache + +##### SynopsysVCS +# Waveform formats +*.vcd +*.vpd +*.evcd +*.fsdb + +# Default name of the simulation executable. A different name can be +# specified with this switch (the associated daidir database name is +# also taken from here): -o / +simv + +# Generated for Verilog and VHDL top configs +simv.daidir/ +simv.db.dir/ + +# Infrastructure necessary to co-simulate SystemC models with +# Verilog/VHDL models. An alternate directory may be specified with this +# switch: -Mdir= +csrc/ + +# Log file - the following switch allows to specify the file that will be +# used to write all messages from simulation: -l +*.log + +# Coverage results (generated with urg) and database location. The +# following switch can also be used: urg -dir .vdb +simv.vdb/ +urgReport/ + +# DVE and UCLI related files. +DVEfiles/ +ucli.key + +# When the design is elaborated for DirectC, the following file is created +# with declarations for C/C++ functions. +vc_hdrs.h + +##### SVN +.svn/ + +##### Mercurial +.hg/ +.hgignore +.hgsigs +.hgsub +.hgsubstate +.hgtags + +##### Bazaar +.bzr/ +.bzrignore + +##### CVS +/CVS/* +**/CVS/* +.cvsignore +*/.cvsignore + +##### TortoiseGit +# Project-level settings +/.tgitconfig + +##### PuTTY +# Private key +*.ppk + +##### Vim +# Swap +[._]*.s[a-v][a-z] +!*.svg # comment out if you don't need vector files +[._]*.sw[a-p] +[._]s[a-rt-v][a-z] +[._]ss[a-gi-z] +[._]sw[a-p] + +# Session +Session.vim +Sessionx.vim + +# Temporary +.netrwhist +*~ +# Auto-generated tag files +tags +# Persistent undo +[._]*.un~ + +##### Emacs +# -*- mode: gitignore; -*- +*~ +\#*\# +/.emacs.desktop +/.emacs.desktop.lock +*.elc +auto-save-list +tramp +.\#* + +# Org-mode +.org-id-locations +*_archive + +# flymake-mode +*_flymake.* + +# eshell files +/eshell/history +/eshell/lastdir + +# elpa packages +/elpa/ + +# reftex files +*.rel + +# AUCTeX auto folder +/auto/ + +# cask packages +.cask/ +dist/ + +# Flycheck +flycheck_*.el + +# server auth directory +/server/ + +# projectiles files +.projectile + +# directory configuration +.dir-locals.el + +# network security +/network-security.data + +##### SublimeText +# Cache files for Sublime Text +*.tmlanguage.cache +*.tmPreferences.cache +*.stTheme.cache + +# Workspace files are user-specific +*.sublime-workspace + +# Project files should be checked into the repository, unless a significant +# proportion of contributors will probably not be using Sublime Text +# *.sublime-project + +# SFTP configuration file +sftp-config.json +sftp-config-alt*.json + +# Package control specific files +Package Control.last-run +Package Control.ca-list +Package Control.ca-bundle +Package Control.system-ca-bundle +Package Control.cache/ +Package Control.ca-certs/ +Package Control.merged-ca-bundle +Package Control.user-ca-bundle +oscrypto-ca-bundle.crt +bh_unicode_properties.cache + +# Sublime-github package stores a github token in this file +# https://packagecontrol.io/packages/sublime-github +GitHub.sublime-settings + +##### Notepad++ +# Notepad++ backups # +*.bak + +##### TextMate +*.tmproj +*.tmproject +tmtags + +##### VisualStudioCode +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +##### NetBeans +**/nbproject/private/ +**/nbproject/Makefile-*.mk +**/nbproject/Package-*.bash +build/ +nbbuild/ +dist/ +nbdist/ +.nb-gradle/ + +##### JetBrains +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/artifacts +# .idea/compiler.xml +# .idea/jarRepositories.xml +# .idea/modules.xml +# .idea/*.iml +# .idea/modules +# *.iml +# *.ipr + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser + +##### Eclipse +.metadata +bin/ +tmp/ +*.tmp +*.bak +*.swp +*~.nib +local.properties +.settings/ +.loadpath +.recommenders + +# External tool builders +.externalToolBuilders/ + +# Locally stored "Eclipse launch configurations" +*.launch + +# PyDev specific (Python IDE for Eclipse) +*.pydevproject + +# CDT-specific (C/C++ Development Tooling) +.cproject + +# CDT- autotools +.autotools + +# Java annotation processor (APT) +.factorypath + +# PDT-specific (PHP Development Tools) +.buildpath + +# sbteclipse plugin +.target + +# Tern plugin +.tern-project + +# TeXlipse plugin +.texlipse + +# STS (Spring Tool Suite) +.springBeans + +# Code Recommenders +.recommenders/ + +# Annotation Processing +.apt_generated/ +.apt_generated_test/ + +# Scala IDE specific (Scala & Java development for Eclipse) +.cache-main +.scala_dependencies +.worksheet + +# Uncomment this line if you wish to ignore the project description file. +# Typically, this file would be tracked if it contains build/dependency configurations: +#.project + +##### Dreamweaver +# DW Dreamweaver added files +_notes +_compareTemp +configs/ +dwsync.xml +dw_php_codehinting.config +*.mno + +##### CodeKit +# General CodeKit files to ignore +config.codekit +config.codekit3 +/min + +##### Gradle +.gradle +**/build/ +!src/**/build/ + +# Ignore Gradle GUI config +gradle-app.setting + +# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) +!gradle-wrapper.jar + +# Cache of project +.gradletasknamecache + +# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898 +# gradle/wrapper/gradle-wrapper.properties + +##### Composer +composer.phar +/vendor/ + +# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control +# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file +composer.lock + +##### PHP CodeSniffer +# gitignore for the PHP Codesniffer framework +# website: https://github.com/squizlabs/PHP_CodeSniffer +# +# Recommended template: PHP.gitignore + +/wpcs/* + +##### SASS +.sass-cache/ +*.css.map +*.sass.map +*.scss.map diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..791d5c1 --- /dev/null +++ b/.htaccess @@ -0,0 +1,17 @@ +RewriteEngine on +RewriteCond %{REQUEST_FILENAME} !-d +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME}\.php -f +RewriteRule ^(.*)$ $1.php [L] +RewriteBase / + +RewriteRule ^(@\w+)$ /user/index.php?uwuzuid=$1 [QSA,L] + +RewriteRule ^!(\w+)~(\w+)$ /ueuse/index.php?ueuseid=$1&touser=$2 [QSA,L] + +ErrorDocument 400 /errorpage/400.php +ErrorDocument 401 /errorpage/401.php +ErrorDocument 403 /errorpage/403.php +ErrorDocument 404 /errorpage/404.php +ErrorDocument 500 /errorpage/500.php +ErrorDocument 503 /errorpage/503.php \ No newline at end of file diff --git a/abi/addabi.php b/abi/addabi.php new file mode 100644 index 0000000..6766577 --- /dev/null +++ b/abi/addabi.php @@ -0,0 +1,40 @@ +beginTransaction(); + + $stmt = $pdo->prepare("UPDATE ueuse SET abi = :abi, abidate = :abidate WHERE uniqid = :uniqid"); + $stmt->bindValue(':abi', $abitext, PDO::PARAM_STR); + $stmt->bindValue(':abidate', $abidate, PDO::PARAM_STR); + $stmt->bindValue(':uniqid', $postUniqid, PDO::PARAM_STR); + + // SQLクエリの実行 + $res = $stmt->execute(); + + // コミット + $pdo->commit(); + + if ($res) { + header('Content-Type: application/json'); + echo json_encode(['success' => true]); + exit; + } else { + header('Content-Type: application/json'); + echo json_encode(['success' => false, 'error' => '追加に失敗しました。']); + exit; + } + } catch(PDOException $e) { + header('Content-Type: application/json'); + echo json_encode(['success' => false, 'error' => 'データベースエラー:' . $e->getMessage()]); + exit; + } +} +?> diff --git a/api/userdata-api.php b/api/userdata-api.php new file mode 100644 index 0000000..c9c77c2 --- /dev/null +++ b/api/userdata-api.php @@ -0,0 +1,75 @@ + PDO::ERRMODE_EXCEPTION, + PDO::MYSQL_ATTR_MULTI_STATEMENTS => false + ); + $pdo = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); + + } catch(PDOException $e) { + + // 接続エラーのときエラー内容を取得する + $error_message[] = $e->getMessage(); + } + + + if (!empty($pdo)) { + + $dbh = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST, DB_USER, DB_PASS, array( + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, + PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true, + )); + + $userQuery = $pdo->prepare("SELECT username,profile,datetime,follow,follower FROM account WHERE userid = :userid"); + $userQuery->bindValue(':userid', $search); + $userQuery->execute(); + $userdata = $userQuery->fetch(); + } +if (empty($userdata)){ + $response = array( + 'error_code' => "userid_not_found", + ); +}else{ + $followcnts = explode(',', $userdata["follow"]); + $userdata["follow_cnt"] = count($followcnts)-1; + + $followercnts = explode(',', $userdata["follower"]); + $userdata["follower_cnt"] = count($followercnts)-1; + + $response = array( + 'user_name' => $userdata["username"], + 'profile' => $userdata["profile"], + 'registered_date' => $userdata["datetime"], + 'follow' => $userdata["follow"], + 'follow_cnt' => $userdata["follow_cnt"], + 'follower' => $userdata["follower"], + 'follower_cnt' => $userdata["follower_cnt"], + ); +} +echo json_encode($response); + +}else{ + + $err = "input_not_found"; + $response = array( + 'error_code' => $err, + ); + + echo json_encode($response); +} +?> \ No newline at end of file diff --git a/check.php b/check.php new file mode 100644 index 0000000..1584fe0 --- /dev/null +++ b/check.php @@ -0,0 +1,225 @@ + PDO::ERRMODE_EXCEPTION, + PDO::MYSQL_ATTR_MULTI_STATEMENTS => false + ); + $pdo = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); + + + //$row['userid'] = "daichimarukn"; + + $userid = $_SESSION['userid']; + + + $options = array( + // SQL実行失敗時に例外をスルー + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + // デフォルトフェッチモードを連想配列形式に設定 + PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, + // バッファードクエリを使う(一度に結果セットを全て取得し、サーバー負荷を軽減) + // SELECTで得た結果に対してもrowCountメソッドを使えるようにする + PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true, + ); + + $dbh = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); + + + $result = $dbh->prepare("SELECT userid, username, profile, role FROM account WHERE userid = :userid"); + + $result->bindValue(':userid', $userid); + // SQL実行 + $result->execute(); + + + $row = $result->fetch(); // ここでデータベースから取得した値を $row に代入する + + $username = $row["username"]; + + $role = $row["role"]; + + + //-------------------------------------- + + $userQuery = $dbh->prepare("SELECT username, userid, loginid, profile, role FROM account WHERE userid = :userid"); + $userQuery->bindValue(':userid', $userid); + $userQuery->execute(); + $userData = $userQuery->fetch(); + + $roles = explode(',', $userData["role"]); // カンマで区切られたロールを配列に分割 + + $roleDataArray = array(); + + foreach ($roles as $roleId) { + $rerole = $dbh->prepare("SELECT rolename, roleauth, rolecolor FROM role WHERE roleidname = :role"); + $rerole->bindValue(':role', $roleId); + $rerole->execute(); + $roleDataArray[$roleId] = $rerole->fetch(); + } + + + +} catch(PDOException $e) { + + // 接続エラーのときエラー内容を取得する + $error_message[] = $e->getMessage(); +} + + +if( !empty($_POST['btn_submit']) ) { + + $_SESSION['admin_login'] = true; + $_SESSION['userid'] = $userid; + $_SESSION['loginid'] = $userData["loginid"]; + + $_SESSION['username'] = $username; + $_SESSION['password'] = ""; + + // リダイレクト先のURLへ転送する + $url = '/home'; + header('Location: ' . $url, true, 303); + + // すべての出力を終了 + exit; +} + +if( !empty($_POST['btn_submit2']) ) { + + $_SESSION['admin_login'] = false; + $_SESSION['userid'] = ""; + + $_SESSION['username'] = ""; + + // リダイレクト先のURLへ転送する + $url = 'index.php'; + header('Location: ' . $url, true, 303); + + // すべての出力を終了 + exit; +} + + + + +// データベースの接続を閉じる +$pdo = null; + +?> + + + + + + + + +確認 - <?php echo file_get_contents($servernamefile);?> + + + + + +
+ + +
+

確認

+ +

あなたは ですか?

+ + +
    + +

    + +
+ + +
+ +

名前

+

+
+ + +
;"> +

;"> + +

+
+ +
+
+

プロフィール

+

+ +
+ +
+ + +
+
+ + + + + + \ No newline at end of file diff --git a/css/home.css b/css/home.css new file mode 100644 index 0000000..8d380a2 --- /dev/null +++ b/css/home.css @@ -0,0 +1,3501 @@ +@import url('https://fonts.googleapis.com/css2?family=BIZ+UDPGothic:wght@400;700&family=Josefin+Sans:ital,wght@1,700&family=Kosugi+Maru&family=Zen+Maru+Gothic:wght@500&display=swap'); + + +::-webkit-scrollbar{ + display:none; +} +::-webkit-scrollbar:hover{ + overflow: scroll; + margin-right: 10px; + border-radius: 25px; +} +body{ + width: 70%; + display: flex; + border: none; + margin-top: 0px; + margin-bottom: 0px; + margin-left: auto; + margin-right: auto; + padding-top: 12px; + background-color: #f7f7f7; + /* 画像を常に天地左右の中央に配置 */ + background-position: center center; + + /* 画像をタイル状に繰り返し表示しない */ + background-repeat: no-repeat; + + /* コンテンツの高さが画像の高さより大きい時、動かないように固定 */ + background-attachment: fixed; + + /* 表示するコンテナの大きさに基づいて、背景画像を調整 */ + background-size: cover; +} + +.irobutton{ + cursor: pointer; + border: none; + display: block; + width:50%; + margin: 32px; + padding: 8px 5%; + margin-left: auto; + margin-right: auto; + + padding-top: 8px; + padding-bottom: 8px; + + background-color: #FFC832; + + text-align: center; + border-radius: 50px; + color:#fff; + font-size: 22px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + text-decoration:none; + text-align: center; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .15); + transition: box-shadow 250ms ease-in-out; + transition: width 250ms ease-out; +} +.irobutton:hover{ + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); + width:55%; +} +.irobutton:active{ + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + width:45%; +} + +.sirobutton{ + cursor: pointer; + border: none; + display: block; + width:40%; + margin: 32px; + padding: 8px 10%; + margin-left: auto; + margin-right: auto; + + padding-top: 8px; + padding-bottom: 8px; + + + text-align: center; + background-color: #FFFAE6; + + border-radius: 50px; + color:#FFC832; + font-size: 22px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + text-decoration:none; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .15); + transition: box-shadow 250ms ease-in-out; + transition: width 250ms ease-out; +} +.sirobutton:hover{ + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); + width:45%; +} +.sirobutton:active{ + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + width:45%; +} + +.inbox { + width: 96%; + padding: 8px 10px; + border: none; + border-radius: 10px; + background: #fff; + font-family: 'Zen Maru Gothic', sans-serif; + color: rgb(32,32,32); + font-size: 1em; + line-height: 1.5; + white-space: nowrap; + box-shadow:0px 0px 25px rgba(0,0,0,0.05) inset; + box-shadow:0px 0px 25px rgba(0,0,0,0.07); + overflow-x: scroll; + overflow-y : scroll ; + transition: border 350ms ease-in-out; + transition: border-bottom 150ms ease-out; + border: 1px solid #f1f1f1; + } + +.inbox::placeholder { + color: #999; +} + +.inbox:hover { + outline: none; + border: 1px solid #FFC832; +} + +.inbox:focus { + outline: none; + border: 1px solid #FFC832; + border-bottom: 3px solid #FFC832; +} + + +.errmsg{ + padding-top: 16px; + padding-bottom: 16px; + padding-left: 32px; + padding-right: 32px; + border-radius: 10px; + background-color: #ffebeb; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05) inset; + margin: 12px; + text-align: left; + color:#ff4848; + font-family: 'BIZ UDPGothic', sans-serif; + word-wrap: break-word; + line-height: 20px; + border: 1px solid #FF4848; +} + +.flexbtn{ + display: flex; +} + +.flexbtn .irobutton{ + border: none; + display: block; + width:20%; + margin: 32px; + padding: 8px 10%; + margin-left: auto; + margin-right: auto; + + padding-top: 8px; + padding-bottom: 8px; + + background-color: #FFC832; + + border-radius: 50px; + color:#fff; + font-size: 26px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + text-decoration:none; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .15); + transition: box-shadow 250ms ease-in-out; + transition: width 250ms ease-out; +} +.flexbtn.irobutton:hover{ + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); + width:55%; +} +.flexbtn.irobutton:active{ + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + width:45%; +} + +.flexbtn.sirobutton{ + border: none; + display: block; + width:50%; + margin: 32px; + padding: 8px 10%; + margin-left: auto; + margin-right: auto; + + padding-top: 8px; + padding-bottom: 8px; + + + background-color: #FFFAE6; + + border-radius: 50px; + color:#FFC832; + font-size: 26px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + text-decoration:none; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .15); + transition: box-shadow 250ms ease-in-out; + transition: width 250ms ease-out; +} +.flexbtn.sirobutton:hover{ + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); + width:55%; +} +.flexbtn.sirobutton:active{ + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + width:45%; +} + + +.rolebox{ + + margin-top: 12px; + margin-bottom: 12px; + + margin-left: auto; + margin-right: auto; + + width: 120px; + padding-left: auto; + padding-right: auto; + + background-color: #fff; + border: 1px solid #FFC832; + + border-radius: 25px; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .15); + +} + +.rolebox p{ + + color:#FFC832; + margin-top: 2px; + margin-bottom: 2px; + margin-left: 10px; + margin-right: 10px; + + text-align: center; + font-size: 16px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + +} + + +.userleftbox{ + border-radius: 17px; + margin-top: 12px; + margin-left: 12px; + margin-right: 12px; + margin-bottom: 12px; + background-color: #FFFFFF; + width: 18%; + height: 100%; + margin-left: 0px; + padding: 32px; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + border: 1px solid #FFC832; +} + +.userleftbox h1{ + font-family: 'Zen Maru Gothic', sans-serif; + margin-left: 20px; + color:#fff; + font-size: 32px; +} +.userleftbox .logo{ + display: flex; +} + +.userleftbox .logo img{ + + margin-left: auto; + margin-right: auto; + margin-top: 16px; + width: 72%; + + +} +.userleftbox .logo p{ + color:#FFC832; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; + font-size: 32px; + margin-left: 8px; + margin-top: auto; + margin-bottom: -4px; +} + +.leftbutton_on{ + cursor: pointer; + border: none; + display: block; + width:70%; + margin: 16px; + padding: 8px auto; + margin-left: auto; + margin-right: auto; + + padding-left: 16px; + padding-top: 8px; + padding-bottom: 8px; + + + background-color: #FFFAE6; + + border-radius: 50px; + color:#FFC832; + font-size: 20px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + text-decoration:none; + text-align: left; + transition: box-shadow 250ms ease-in-out; + transition: width 250ms ease-out; + transition: all 250ms ease-out; +} +.leftbutton_on:hover{ + background-color: #FFC832; + color: #FFFAE6; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); + width:75%; +} +.leftbutton_on:active{ + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + width:65%; +} + +.leftbutton{ + cursor: pointer; + border: none; + display: block; + width:70%; + margin: 16px; + padding: 8px auto; + margin-left: auto; + margin-right: auto; + + padding-left: 16px; + padding-top: 8px; + padding-bottom: 8px; + + + background-color: #FFFFFF; + + border-radius: 50px; + color:#FFC832; + font-size: 20px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + text-decoration:none; + text-align: left; + transition: box-shadow 250ms ease-in-out; + transition: width 250ms ease-out; + transition: all 250ms ease-out; +} +.leftbutton:hover{ + background-color: #FFC832; + color: #FFFAE6; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); + width:75%; +} +.leftbutton:active{ + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + width:65%; +} + +main{ + height: 95dvh; + overflow: auto; + border-radius: 17px; + margin-top: 12px; + margin-left: 12px; + margin-right: 12px; + width: 62%; + background-color: #fff; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + border: 1px solid #FFC832; +} + +main h1{ + color:#252525; + font-size: 32px; + font-family: 'Zen Maru Gothic', sans-serif; +} + +.userheader{ + margin: 12px; + border-radius: 10px; + width: auto; + height:auto; + margin-bottom: 12px; +} + +.userheader .hed img{ + object-fit: cover; + margin-top: 0px; + margin-bottom: 0px; + margin-left: auto; + margin-right: auto; + width: 100%; + height:25vh; + border-radius: 10px; +} + +.userheader .icon{ + margin-left: 24px; + display: flex; + width: auto; +} + +.userheader .icon img{ + object-fit: cover; + margin-top: -90px; + text-align: left; + width: 148px; + height:148px; + border-radius: 50%; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); +} + +.userheader h2{ + margin-left: 12px; + margin-top: auto; + margin-bottom: auto; + color:#252525; + font-size: 32px; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: 900; +} + +.userheader p{ + margin-left: 12px; + margin-right: auto; + margin-top: auto; + margin-bottom: 14px; + color: #999; + font-size: 18px; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: 900; +} + +.userheader .profile p{ + text-align: left; + margin-top: 12px; + margin-bottom: auto; + margin-left: 24px; + margin-right: 24px; + word-wrap: break-word; + font-size: 18px; + color:#252525; + text-decoration: none; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; +} + +.userheader .roleboxes{ + margin-left: 180px; + display: flex; + padding: 0px; + flex-wrap : wrap; +} + + +.userheader .rolebox{ + + margin-top: 0px; + margin-bottom: 12px; + + margin-left: 0px; + margin-right: 12px; + + width: auto; + padding-left: auto; + padding-right: auto; + + background-color: #fff; + border: 1px solid #FFC832; + + border-radius: 25px; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .15); + +} + + +.userheader .rolebox p{ + + color:#FFC832; + margin-top: 2px; + margin-bottom: 2px; + margin-left: 10px; + margin-right: 10px; + + font-size: 16px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + +} + +.fzone{ + margin-left: 24px; + margin-right: 24px; + margin-bottom: 24px; + width: auto; + height: 48px; + display: flex; + padding-left: 12px; + padding-right: 12px; +} + +.fzone .follow .fbtn{ + cursor: pointer; + border: none; + display: block; + width:120px; + padding: 8px auto; + + margin-left: auto; + margin-right: 0px; + margin-top: 12px; + margin-bottom: 12px; + + padding-top: 6px; + padding-bottom: 6px; + + + background-color: #FFC832; + + border-radius: 50px; + color:#FFFAE6; + font-size: 16px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + text-decoration:none; + text-align: center; + transition: box-shadow 250ms ease-in-out; + transition: width 250ms ease-out; + transition: all 250ms ease-out; +} +.fzone .follow .fbtn:hover{ + background-color: #FFC832; + color: #FFFAE6; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); + width:125px; +} +.fzone .follow .fbtn:active{ + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + width:115px; +} + +.fzone .follow .fbtn_no{ + cursor: pointer; + border: none; + display: block; + width:120px; + padding: 8px auto; + + margin-left: auto; + margin-right: 0px; + margin-top: 12px; + margin-bottom: 12px; + + padding-top: 6px; + padding-bottom: 6px; + + + background-color: #FFFAE6; + + border-radius: 50px; + color:#FFC832; + border: 1px solid #FFC832; + font-size: 16px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + text-decoration:none; + text-align: center; + transition: box-shadow 250ms ease-in-out; + transition: width 250ms ease-out; + transition: all 250ms ease-out; +} +.fzone .follow .fbtn_no:hover{ + background-color: #FFFAE6; + color: #FFC832; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); + width:125px; +} +.fzone .follow .fbtn_no:active{ + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + width:115px; +} + +.fzone .follow .fbtn_un{ + cursor: pointer; + border: none; + display: block; + width:120px; + padding: 8px auto; + + margin-left: auto; + margin-right: 0px; + margin-top: 12px; + margin-bottom: 12px; + + padding-top: 6px; + padding-bottom: 6px; + + + background-color: #FFC832; + + border-radius: 50px; + color:#4e4428; + border: none; + font-size: 16px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + text-decoration:none; + text-align: center; + transition: box-shadow 250ms ease-in-out; + transition: width 250ms ease-out; + transition: all 250ms ease-out; +} +.fzone .follow .fbtn_un:hover{ + background-color: #FFFAE6; + color: #FFC832; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); + width:125px; +} +.fzone .follow .fbtn_un:active{ + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + width:115px; +} + +.fzone .time{ + margin-top: auto; + margin-bottom: 0px; + margin-left: 0px; + margin-right: auto; +} +.fzone .time p{ + margin-top: 0px; + margin-bottom: 0px; + text-align: left; + font-size: 12px; + color:#999; + font-family: 'BIZ UDPGothic', sans-serif; +} + +.fzone .time a{ + margin-top: 0px; + margin-bottom: 0px; + text-align: left; + font-size: 12px; + color:#999; + font-family: 'BIZ UDPGothic', sans-serif; +} + +.fzone .follow_yes{ + margin-top: auto; + margin-bottom: 0px; + margin-left: auto; + margin-right: auto; + background-color: #FFFAE6; + border-radius: 10px; + padding: 12px; +} +.fzone .follow_yes p{ + margin-top: 0px; + margin-bottom: 0px; + text-align: left; + font-size: 12px; + color:#252525; + font-family: 'BIZ UDPGothic', sans-serif; +} + + + +.ueuse{ + animation: slideInY 0.5s cubic-bezier(0.25, 1, 0.5, 1) 1 forwards; + margin: 12px; + border-radius: 10px; + padding-left: 24px; + padding-right: 24px; + padding-top: 16px; + padding-bottom: 16px; + background-color: #F5F5F5; + border: 1px solid #EEE; + width: auto; +} +@keyframes slideInY { + 0% { + transform: translateY(24px); + opacity: 0; + } + 100% { + transform: translateY(0px); + } + 40%,100% { + opacity: 1; + } +} +.ueuse .flebox{ + display: flex; +} +.ueuse .flebox img{ + object-fit: cover; + margin-left: -12px; + + text-align: center; + width: 48px; + height:48px; + border-radius: 50%; +} +.ueuse .flebox a{ + margin-top: auto; + margin-bottom: auto; + margin-left: 12px; + font-size: 18px; + color:#252525; + text-decoration: none; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; +} + + + + + +.ueuse .flebox .idbox{ + margin-top: auto; + margin-bottom: auto; + margin-left: 6px; + border-radius: 10px; + background-color: #FFF; + border: 1px solid #EEE; +} +.ueuse .flebox .idbox a{ + margin-top: 6px; + margin-bottom: 6px; + margin-left: 8px; + margin-right: 8px; + text-align: center; + font-size: 12px; + color:#999; + text-decoration: none; + font-family: 'BIZ UDPGothic', sans-serif; +} + +.ueuse p{ + line-height:20px; + overflow-wrap: break-word; + margin-top: auto; + margin-bottom: auto; + margin-left: 60px; + font-size: 16px; + color:#252525; + text-decoration: none; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; +} + + +.ueuse h1{ + overflow-wrap: break-word; + margin-top: auto; + margin-bottom: auto; + margin-left: 60px; + font-size: 48px; + color:#252525; + text-decoration: none; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; +} + +.ueuse h2{ + overflow-wrap: break-word; + margin-top: auto; + margin-bottom: auto; + margin-left: 60px; + font-size: 32px; + color:#252525; + text-decoration: none; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; +} + +.ueuse h3{ + overflow-wrap: break-word; + margin-top: auto; + margin-bottom: auto; + margin-left: 60px; + font-size: 24px; + color:#252525; + text-decoration: none; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; +} + +.ueuse center{ + overflow-wrap: break-word; + margin-top: auto; + margin-bottom: auto; + margin-left: auto; + color:#252525; + text-decoration: none; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; +} + +.ueuse a{ + margin-top: auto; + margin-bottom: auto; + margin-left: 6px; + font-size: 16px; + color:#4e4428; + text-decoration: none; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; +} +.ueuse p img{ + margin-top: auto; + margin-bottom: auto; + margin-left: 4px; + margin-right: 4px; + height: 32px; + vertical-align: middle; +} + +.ueuse h1 img{ + margin-top: auto; + margin-bottom: auto; + margin-left: 4px; + margin-right: 4px; + height: 64px; + vertical-align: middle; +} + +.ueuse h2 img{ + margin-top: auto; + margin-bottom: auto; + margin-left: 4px; + margin-right: 4px; + height: 48px; + vertical-align: middle; +} + +.ueuse h3 img{ + margin-top: auto; + margin-bottom: auto; + margin-left: 4px; + margin-right: 4px; + height: 48px; + vertical-align: middle; +} + +.ueuse img{ + margin-left: 60px; + margin-top: auto; + margin-bottom: auto; + margin-right: 4px; + height: 32px; + vertical-align: middle; +} + +.ueuse .flebox .time{ + margin-top: auto; + margin-bottom: auto; + margin-left: auto; + margin-right: 12px; + text-align: right; + font-size: 12px; + color:#999; + font-family: 'BIZ UDPGothic', sans-serif; +} + +.ueuse .photo1 img{ + object-fit: cover; + border-radius: 10px; + margin-top: 12px; + margin-left: auto; + margin-right: auto; + width: 100%; + height: 350px; + border: 1px solid #EEE; +} + +.ueuse .photo2{ + display: flex; +} + +.ueuse .photo2 img{ + object-fit: cover; + border-radius: 10px; + margin-top: 12px; + margin-left: auto; + margin-right: auto; + width: 47%; + height: 350px; + border: 1px solid #EEE; +} + +.ueuse .video1 video{ + object-fit: cover; + border-radius: 10px; + margin-top: 12px; + margin-left: auto; + margin-right: auto; + width: 100%; + height: 350px; + border: 1px solid #EEE; +} + +.ueuse .abi{ + margin-left:auto; + margin-right: auto; + margin-top: 12px; + margin-bottom: 12px; + border-radius: 10px; + padding-left: 12px; + padding-right: 12px; + padding-top: 16px; + padding-bottom: 16px; + background-color: #FFFFFF; + border: 1px solid #EEE; + width: auto; +} + + +.ueuse .abi p{ + line-height:20px; + overflow-wrap: break-word; + margin-top: 12px; + margin-bottom: 12px; + margin-left: auto; + font-size: 14px; + color:#252525; + text-decoration: none; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; +} + +.ueuse .abi .back{ + background-color: #FFFAE6; + padding: 12px; + border-radius: 7px; + border: 1px solid #EEE; +} + +.ueuse .abi .back h1{ + overflow-wrap: break-word; + margin-top: auto; + margin-bottom: auto; + margin-left: auto; + font-size: 16px; + color:#252525; + text-decoration: none; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; +} +.ueuse .abi h3{ + overflow-wrap: break-word; + margin-top: auto; + margin-bottom: auto; + margin-left: auto; + font-size: 12px; + color:#999; + text-decoration: none; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; +} +.ueuse .favbox{ + display: flex; + margin-left: 0px; + width: 100%; +} +.ueuse .favbox .favbtn{ + cursor: pointer; + border: none; + display: block; + width:auto; + padding: 8px auto; + + margin-left: 0px; + margin-right: 12px; + margin-top: 2px; + margin-bottom: 2px; + + + padding-top: 2px; + padding-bottom: 2px; + padding-left: 12px; + padding-right: 12px; + + + background-color: #FFFAE6; + + border-radius: 50px; + color:#FFC832; + font-size: 16px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + text-decoration:none; + text-align: center; + transition: all 250ms ease-out; +} + +.ueuse .favbox .favbtn_after{ + cursor: pointer; + border: none; + display: block; + width:auto; + padding: 8px auto; + + margin-left: 0px; + margin-right: 12px; + margin-top: 2px; + margin-bottom: 2px; + + + padding-top: 2px; + padding-bottom: 2px; + padding-left: 12px; + padding-right: 12px; + + + background-color: #FFC832; + + border-radius: 50px; + color:#FFFAE6; + font-size: 16px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + text-decoration:none; + text-align: center; + transition: all 250ms ease-out +} + + +.ueuse .favbox .tuduki{ + cursor: pointer; + border: none; + display: block; + width:auto; + padding: 8px auto; + + margin-left: 0px; + margin-right: 12px; + margin-top: 2px; + margin-bottom: 2px; + + + padding-top: 5px; + padding-bottom: 5px; + padding-left: 12px; + padding-right: 12px; + + + background-color: #FFFAE6; + + border-radius: 50px; + color:#FFC832; + font-size: 16px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + text-decoration:none; + text-align: center; + transition: box-shadow 250ms ease-in-out; + transition: width 250ms ease-out; + transition: all 250ms ease-out; +} + +.ueuse .favbox .tuduki:hover{ + cursor: pointer; + border: none; + display: block; + width:auto; + padding: 8px auto; + + margin-left: 0px; + margin-right: 12px; + margin-top: 2px; + margin-bottom: 2px; + + + padding-top: 5px; + padding-bottom: 5px; + padding-left: 12px; + padding-right: 12px; + + + background-color: #FFC832; + + border-radius: 50px; + color:#FFFAE6; + font-size: 16px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + text-decoration:none; + text-align: center; + transition: box-shadow 250ms ease-in-out; + transition: width 250ms ease-out; + transition: all 250ms ease-out; +} + +.ueuse .favbox .delbtn{ + cursor: pointer; + border: none; + display: block; + width:60px; + padding: 8px auto; + + margin-left: 6px; + margin-right: 0px; + margin-top: 2px; + margin-bottom: 2px; + + padding-top: 2px; + padding-bottom: 2px; + + + background-color: #F5F5F5; + + border-radius: 50px; + color:#FF4848; + font-size: 16px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + text-decoration:none; + text-align: center; + transition: box-shadow 250ms ease-in-out; + transition: width 250ms ease-out; + transition: all 250ms ease-out; +} + +.ueuse .favbox .delbtn:hover{ + cursor: pointer; + border: none; + display: block; + width:60px; + padding: 8px auto; + + margin-left: 6px; + margin-right: 0px; + margin-top: 2px; + margin-bottom: 2px; + + padding-top: 2px; + padding-bottom: 2px; + + + background-color: #FF4848; + + border-radius: 50px; + color: #f5f5f5;; + font-size: 16px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + text-decoration:none; + text-align: center; + transition: box-shadow 250ms ease-in-out; + transition: width 250ms ease-out; + transition: all 250ms ease-out; +} + + + +.ueuse .favbox .addabi{ + cursor: pointer; + border: none; + display: block; + width:auto; + padding: 8px auto; + + margin-left: auto; + margin-right: 6px; + margin-top: 2px; + margin-bottom: 2px; + + + padding-top: 2px; + padding-bottom: 2px; + padding-left: 12px; + padding-right: 12px; + + + background-color: #FFFAE6; + + border-radius: 50px; + color:#FFC832; + font-size: 16px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + text-decoration:none; + text-align: center; + transition: box-shadow 250ms ease-in-out; + transition: width 250ms ease-out; + transition: all 250ms ease-out; +} + +.ueuse .favbox .addabi:hover{ + cursor: pointer; + border: none; + display: block; + width:auto; + + margin-left: auto; + margin-right: 6px; + margin-top: 2px; + margin-bottom: 2px; + + padding-top: 2px; + padding-bottom: 2px; + padding-left: 12px; + padding-right: 12px; + + + background-color: #FFC832; + + border-radius: 50px; + color: #FFFAE6;; + font-size: 16px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + text-decoration:none; + text-align: center; + transition: box-shadow 250ms ease-in-out; + transition: width 250ms ease-out; + transition: all 250ms ease-out; +} + + +.ueuse .favbox img{ + margin-left: 0px; + width: 24px; +} + +.ueuse hr{ + height: 0; + margin-top: 12px; + margin-bottom: 12px; + padding: 0; + border: 0; + border-top: 1px solid #999; +} + + + +.tokonone p{ + text-align: center; + margin-top: 64px; + margin-bottom: 64px; + font-size: 16px; + color:#252525; + text-decoration: none; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; +} + +.sendbox{ + margin: 12px; + border-radius: 10px; + padding-left: 24px; + padding-right: 24px; + padding-top: 24px; + padding-bottom: 24px; + background-color: #F5F5F5; + border: 1px solid #EEE; + width: auto; +} + +.sendbox .fx{ + display: flex; + width: 100%; +} + +.sendbox .fx img{ + object-fit: cover; + margin-left: -12px; + text-align: center; + width: 58px; + height:58px; + border-radius: 50%; +} + +.sendbox p{ + line-height:20px; + text-align: left; + margin-top: 12px; + margin-bottom: 12px; + font-size: 16px; + color:#252525; + text-decoration: none; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; +} + +.sendbox textarea{ + background-color: #F5F5F5; + text-align: left; + margin-left: auto; + margin-right: auto; + width:100%; + height:90px; + border-radius: 10px; + outline: none; + border: none; + resize: none; + font-size: 18px; +} + +.sendbox .fxbox{ + display: flex; +} + +.sendbox label > input { + display:none; /* アップロードボタンのスタイルを無効にする */ +} + +.sendbox label{ + cursor: pointer; + border: none; + display: block; + width:6%; + padding: 8px auto; + margin-left: 6px; + margin-right: 6px; + + padding-top: 6px; + padding-bottom: 6px; + + + background-color: #FFC832; + + border-radius: 50px; + color:#FFFAE6; + font-size: 16px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + text-decoration:none; + text-align: center; + transition: box-shadow 250ms ease-in-out; + transition: width 250ms ease-out; + transition: all 250ms ease-out; +} +.sendbox label:hover{ + background-color: #FFC832; + color: #FFFAE6; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); + width:7%; +} +.sendbox label:active{ + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + width:5%; +} +.sendbox label img{ + vertical-align:bottom; + width: 24px; +} +.sendbox .fxbox p{ + line-height:20px; + text-align: left; + margin-top: auto; + margin-bottom: auto; + font-size: 16px; + color:#252525; + text-decoration: none; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; +} + + + +.ueusebtn{ + cursor: pointer; + border: none; + display: block; + width:20%; + padding: 8px auto; + margin-left: auto; + margin-right: 0px; + + padding-top: 6px; + padding-bottom: 6px; + + + background-color: #FFC832; + + border-radius: 50px; + color:#FFFAE6; + font-size: 16px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + text-decoration:none; + text-align: center; + transition: box-shadow 250ms ease-in-out; + transition: width 250ms ease-out; + transition: all 250ms ease-out; +} +.ueusebtn:hover{ + background-color: #FFC832; + color: #FFFAE6; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); + width:21%; +} +.ueusebtn:active{ + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + width:19%; +} +/*--------------------------*/ + +.ueuse2{ + margin: 12px; + border-radius: 10px; + padding-left: 24px; + padding-right: 24px; + padding-top: 16px; + padding-bottom: 16px; + background-color: #F5F5F5; + border: 1px solid #EEE; + width: auto; +} +.ueuse2 .flebox{ + display: flex; +} +.ueuse2 .flebox img{ + object-fit: cover; + margin-left: -12px; + + text-align: center; + width: 64px; + height:64px; + border-radius: 50%; +} +.ueuse2 .flebox a{ + margin-top: auto; + margin-bottom: auto; + margin-left: 12px; + font-size: 26px; + color:#252525; + text-decoration: none; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; +} + +.ueuse2 .flebox .idbox{ + margin-top: auto; + margin-bottom: auto; + margin-left: 6px; + border-radius: 10px; + background-color: #FFF; + border: 1px solid #EEE; +} +.ueuse2 .flebox .idbox a{ + margin-top: 6px; + margin-bottom: 6px; + margin-left: 8px; + margin-right: 8px; + text-align: center; + font-size: 16px; + color:#999; + text-decoration: none; + font-family: 'BIZ UDPGothic', sans-serif; +} + +.ueuse2 p{ + overflow-wrap: break-word; + margin-top: auto; + margin-bottom: auto; + margin-left: 80px; + font-size: 22px; + color:#252525; + text-decoration: none; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; +} +.ueuse2 a{ + margin-top: auto; + margin-bottom: auto; + margin-left: 6px; + font-size: 16px; + color:#4e4428; + text-decoration: none; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; +} +.ueuse2 p img{ + margin-top: auto; + margin-bottom: auto; + margin-left: 4px; + margin-right: 4px; + height: 32px; + vertical-align: middle; +} + +.ueuse2 .flebox .time{ + margin-top: auto; + margin-bottom: auto; + margin-left: auto; + margin-right: 12px; + text-align: right; + font-size: 12px; + color:#999; + font-family: 'BIZ UDPGothic', sans-serif; +} + +.ueuse2 .photo1 img{ + object-fit: cover; + border-radius: 10px; + margin-top: 12px; + margin-left: auto; + margin-right: auto; + width: 100%; + height: 25dvh; + border: 1px solid #EEE; +} + +.ueuse2 .photo2{ + display: flex; +} + +.ueuse2 .photo2 img{ + object-fit: cover; + border-radius: 10px; + margin-top: 12px; + margin-left: auto; + margin-right: auto; + width: 47%; + height: 350px; + border: 1px solid #EEE; +} + +.ueuse2 .video1 video{ + object-fit: cover; + border-radius: 10px; + margin-top: 12px; + margin-left: auto; + margin-right: auto; + width: 100%; + height: 350px; + border: 1px solid #EEE; +} + +.formarea{ + padding-top: 16px; + padding-bottom: 16px; + padding-left: 32px; + padding-right: 32px; + border-radius: 15px; + background-color: #f7f7f7; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05) inset; + text-align: left; +} + +.formarea p{ + overflow-wrap: break-word; + margin-top: 24px; + margin-bottom: 24px; + font-size: 16px; + color:#252525; + text-decoration: none; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; +} + +.formarea .iconimg{ + margin-left: auto; + margin-right: auto; + text-align: center; +} + +.formarea .iconimg img{ + object-fit: cover; + margin-top: -64px; + margin-left: auto; + margin-right: auto; + text-align: center; + width: 100px; + height:100px; + border-radius: 50%; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .15); +} +.formarea .hed img{ + object-fit: cover; + object-fit: cover; + margin-top: 0px; + margin-bottom: 0px; + margin-left: auto; + margin-right: auto; + width: 100%; + height:25vh; + border-radius: 10px; +} + +.formarea .sub{ + display: flex; + margin: 48px; + margin-left: auto; + margin-right: auto; +} +label>input { + display:none; /* アップロードボタンのスタイルを無効にする */ +} +.imgbtn{ + cursor: pointer; + border: none; + display: block; + width:25%; + padding: 8px auto; + margin-left: auto; + margin-right: auto; + + padding-top: 6px; + padding-bottom: 6px; + + + background-color: #FFC832; + + border-radius: 50px; + color:#FFFAE6; + font-size: 16px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + text-decoration:none; + text-align: center; + transition: box-shadow 250ms ease-in-out; + transition: width 250ms ease-out; + transition: all 250ms ease-out; +} +.imgbtn:hover{ + background-color: #FFC832; + color: #FFFAE6; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); + width:19%; +} +.imgebtn:active{ + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + width:21%; +} + +.imgbtn2{ + cursor: pointer; + border: none; + display: block; + width:20%; + padding: 8px auto; + margin-top: -64px; + margin-left: 12px; + margin-right: auto; + + padding-top: 6px; + padding-bottom: 6px; + + + background-color: #FFC832; + + border-radius: 50px; + color:#FFFAE6; + font-size: 16px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + text-decoration:none; + text-align: center; + transition: box-shadow 250ms ease-in-out; + transition: width 250ms ease-out; + transition: all 250ms ease-out; +} +.imgbtn2:hover{ + background-color: #FFC832; + color: #FFFAE6; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); + width:19%; +} +.imgebtn2:active{ + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + width:21%; +} + +.modal { + display: none; + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.5); + z-index: 9999; +} + +.show { + display: block; +} +.modal-content { + background-color: #fff; + padding: 16px; + border-radius: 10px; + width: 60%; + max-width: 400px; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); +} + +.modal-content textarea{ + background-color: #F5F5F5; + text-align: left; + margin-left: auto; + margin-right: auto; + width:100%; + height:90px; + border-radius: 10px; + outline: none; + border: none; + resize: none; + font-size: 18px; +} +.modal-content p{ + font-size: 16px; + color:#252525; + text-decoration: none; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; +} + +.modal-content h1{ + font-size: 24px; + color:#252525; + text-decoration: none; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; +} + +.modal-content .btn_area{ + display: flex; + width: 70%; + margin-left: auto; + margin-right: 0px; +} + +.modal-content .fbtn{ + cursor: pointer; + border: none; + display: block; + width:120px; + padding: 8px auto; + + margin-left: auto; + margin-right: 6px; + margin-bottom: 0px; + + padding-top: 6px; + padding-bottom: 6px; + + + background-color: #FFC832; + + border-radius: 50px; + color:#FFFAE6; + font-size: 16px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + text-decoration:none; + text-align: center; + transition: box-shadow 250ms ease-in-out; + transition: width 250ms ease-out; + transition: all 250ms ease-out; +} +.modal-content .fbtn:hover{ + background-color: #FFC832; + color: #FFFAE6; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); + width:125px; +} +.modal-content .fbtn:active{ + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + width:115px; +} + +.modal-content .fbtn_no{ + cursor: pointer; + border: none; + display: block; + width:120px; + padding: 8px auto; + + margin-left: auto; + margin-right: 0px; + margin-bottom: 0px; + + padding-top: 6px; + padding-bottom: 6px; + + + background-color: #FFFAE6; + + border-radius: 50px; + color:#FFC832; + border: 1px solid #FFC832; + font-size: 16px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + text-decoration:none; + text-align: center; + transition: box-shadow 250ms ease-in-out; + transition: width 250ms ease-out; + transition: all 250ms ease-out; +} +.modal-content .fbtn_no:hover{ + background-color: #FFFAE6; + color: #FFC832; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); + width:125px; +} +.modal-content .fbtn_no:active{ + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + width:115px; +} + +.topbox { + position: fixed; + + top: 0; + left: 0; + width: 100%; + height: 44px; + padding-top: 0.0%; + padding-bottom: 0.2%; + padding-left: 23%; + + background-color: #FFC832; + box-shadow: 0px 0px 30px rgba(0,0,0,0.1); + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; + font-size: 2em; + text-align: left; + color: #fff; + +} + +.topbox .logo img{ + margin-left: 0px; + margin-right: auto; + margin-top: 2px; + width: 120px; +} + +.terms{ + overflow-wrap: break-word; + margin-left: auto; + margin-right: auto; + width: 77%; + margin-top: 64px; + margin-bottom: 64px; + background-color: #f7f7f7; +} + +.terms h1{ + line-height:32px; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; + font-size: 48px; + text-align: left; + color: #252525; +} + +.terms h2{ + line-height:32px; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; + font-size: 48px; + text-align: left; + color: #252525; +} + +.terms h3{ + line-height:28px; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; + font-size: 32px; + text-align: left; + color: #252525; +} + +.terms h4{ + line-height:24px; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; + font-size: 24px; + text-align: left; + color: #252525; +} + +.terms p{ + margin-top: 2px; + margin-bottom: 2px; + line-height:24px; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: normal; + font-size: 16px; + text-align: left; + color: #252525; +} + +.terms img{ + background-color: #FFF; + background: linear-gradient(45deg, #CCC 25%, transparent 25%, transparent 75%, #CCC 75%), + linear-gradient(45deg, #CCC 25%, transparent 25%, transparent 75%, #CCC 75%); + background-size: 20px 20px; + background-position: 0 0, 10px 10px; + object-fit: cover; + width: auto; + height: 40dvh; + margin: 12px; + border-radius: 15px; +} +.terms .code{ + background-color: #252525; + border-radius: 15px; + padding: 12px; +} + +.terms .code p{ + line-height:24px; + margin-right: 12px; + margin-left: 12px; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: normal; + font-size: 16px; + text-align: left; + color: #FFFFFF; +} + + +.terms .p2c{ + margin-top: 0px; + margin-bottom: 10px; + text-align: left; + word-wrap: break-word; + line-height: 20px; + color: #868686; + font-size: 12px; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: normal; +} + +.terms .p3{ + margin-top: 24px; + text-align: left; + word-wrap: break-word; + line-height: 24px; + color: #252525; + font-size: 22px; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; +} + +.terms ul{ + margin-top: 6px; + margin-bottom: 6px; + font-family: 'BIZ UDPGothic', sans-serif; + line-height: 20px; +} + +.terms .err404 h1{ + margin-top: 256px; + line-height:64px; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; + font-size: 64px; + text-align: center; + color: #252525; +} + +.terms .err404 p{ + margin-top: 2px; + margin-bottom: 2px; + line-height:32px; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: normal; + font-size: 16px; + text-align: center; + color: #252525; +} + + +.rightbox{ + position: relative; + border-radius: 17px; + margin-top: 12px; + margin-left: 12px; + margin-right: 12px; + width: 24%; + background-color: #fff; + padding: 12px; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + border: 1px solid #FFC832; +} + +.rightbox h1{ + + margin-top: 12px; + margin-bottom: 0px; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; + font-size: 28px; + text-align: left; + color: #252525; +} + +.rightbox .noticearea{ + width: auto; + height: 52dvh; + overflow: scroll; + border-radius: 10px; +} + +.rightbox .noticebox{ + overflow-wrap: break-word; + border-radius: 10px; + margin-top: 12px; + margin-bottom: 12px; + margin-left: auto; + margin-right: auto; + width: auto; + background-color: #F5F5F5; + border: 1px solid #EEE; + width: auto; + padding: 12px; +} + +.rightbox .noticebox h4{ + margin-top: 2px; + margin-bottom: 12px; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; + font-size: 20px; + text-align: left; + color: #252525; +} + +.rightbox .noticebox p{ + line-height: 20px; + margin-top: 2px; + margin-bottom: 12px; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: normal; + font-size: 16px; + text-align: left; + color: #252525; +} + +.rightbox .noticebox img{ + margin-top: auto; + margin-bottom: auto; + margin-left: 4px; + margin-right: 4px; + height: 32px; + vertical-align: middle; +} + +.rightbox .noticebox .makeup p{ + line-height: 20px; + margin-top: 2px; + margin-bottom: 2px; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: normal; + font-size: 16px; + text-align: left; + color: #252525; +} + +.rightbox .noticebox .makeup a{ + margin-top: 24px; + margin-bottom: auto; + margin-left: 0px; + font-size: 16px; + color:#4e4428; + text-decoration: none; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; +} + +.rightbox .noticebox .time{ + margin-top: 4px; + margin-bottom: auto; + margin-left: 0px; + margin-right: auto; +} +.rightbox .noticebox .time p{ + margin-top: 0px; + margin-bottom: 0px; + text-align: left; + font-size: 12px; + color:#999; + font-family: 'BIZ UDPGothic', sans-serif; +} + + + +.rightbox .btmbox{ + position: absolute; + bottom: 12px; /*下に固定*/ + height: 31dvh; + width: 90%; +} + +.rightbox .btmbox h2{ + margin-top: 12px; + margin-bottom: 12px; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; + font-size: 20px; + text-align: left; + color: #252525; +} + +.rightbox .btmbox h3{ + margin-top: 2px; + margin-bottom: 12px; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: normal; + font-size: 20px; + text-align: left; + color: #252525; +} + +.rightbox .btmbox p{ + + line-height: 20px; + margin-top: 2px; + margin-bottom: 2px; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: normal; + font-size: 14px; + text-align: left; + color: #252525; +} + +.rightbox .btmbox a{ + margin-top: 24px; + margin-bottom: auto; + margin-left: 0px; + margin-right: 6px; + font-size: 14px; + color:#4e4428; + text-decoration: none; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; +} + + + +.loading { + text-align: center; + font-size: 48px; /* 絵文字のサイズ */ + animation: rotate 0.5s infinite linear; /* アニメーションを適用 */ +} + +@keyframes rotate { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +} + +.emojibox{ + margin-left: 12px; + margin-right: 12px; + padding: 12px; + width: auto; +} + +.emojizone{ + margin-left: 0px; + margin-right: 0px; + margin-top: 12px; +} + +.emjtex{ + background-color: #F5F5F5; + margin-top: 12px; + margin-left: auto; + margin-right: auto; + padding: 12px; + border-radius: 10px; + border: 1px solid #EEE; +} + +.emjtex .fx{ + display: flex; +} + +.emjtex img{ + margin-top: auto; + margin-bottom: auto; + margin-left: 4px; + margin-right: 4px; + height: 64px; +} + +.emjtex h3{ + overflow-wrap: break-word; + margin-top: auto; + margin-bottom: auto; + margin-left: 12px; + font-size: 24px; + color:#252525; + text-decoration: none; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; +} + +.emjtex p{ + overflow-wrap: break-word; + margin-top: 12px; + margin-bottom: auto; + margin-left: 12px; + font-size: 16px; + color:#252525; + text-decoration: none; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; +} + +.rp p{ + overflow-wrap: break-word; + margin-top: 0px; + margin-bottom: 6px; + margin-left: 12px; + font-size: 16px; + color:#252525; + text-decoration: none; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; +} + + + +.notification{ + animation: slideInY 0.5s cubic-bezier(0.25, 1, 0.5, 1) 1 forwards; + margin: 12px; + border-radius: 10px; + padding-left: 24px; + padding-right: 24px; + padding-top: 16px; + padding-bottom: 16px; + background-color: #F5F5F5; + border: 1px solid #EEE; + width: auto; +} +@keyframes slideInY { + 0% { + transform: translateY(24px); + opacity: 0; + } + 100% { + transform: translateY(0px); + } + 40%,100% { + opacity: 1; + } +} +.notification .flebox{ + display: flex; +} + +.notification .flebox a{ + margin-top: auto; + margin-bottom: auto; + margin-left: 12px; + font-size: 18px; + color:#252525; + text-decoration: none; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; +} + +.notification .flebox .idbox{ + margin-top: auto; + margin-bottom: auto; + margin-left: 6px; + border-radius: 10px; + background-color: #FFF; + border: 1px solid #EEE; +} +.notification .flebox .idbox a{ + margin-top: 6px; + margin-bottom: 6px; + margin-left: 8px; + margin-right: 8px; + text-align: center; + font-size: 12px; + color:#999; + text-decoration: none; + font-family: 'BIZ UDPGothic', sans-serif; +} + +.notification p{ + overflow-wrap: break-word; + margin-top: auto; + margin-bottom: auto; + margin-left: 12px; + font-size: 16px; + color:#252525; + text-decoration: none; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; +} + +.notification h3{ + overflow-wrap: break-word; + margin-top: auto; + margin-bottom: 6px; + margin-left: 12px; + font-size: 24px; + color:#252525; + text-decoration: none; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; +} + + +.notification .flebox .time{ + margin-top: auto; + margin-bottom: auto; + margin-left: auto; + margin-right: 12px; + text-align: right; + font-size: 12px; + color:#999; + font-family: 'BIZ UDPGothic', sans-serif; +} + +.notification a{ + overflow-wrap: break-word; + margin-top: 24px; + margin-bottom: auto; + margin-left: 12px; + font-size: 16px; + color:#4e4428; + text-decoration: none; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; +} + +hr{ + height: 0; + margin-top: 12px; + margin-bottom: 12px; + padding: 0; + border: 0; + border-top: 1px solid #FFC832; +} + + +.search_btn{ + margin-top: 24px; + cursor: pointer; + border: none; + display: block; + width:20%; + padding: 8px auto; + margin-left: auto; + margin-right: 0px; + + padding-top: 6px; + padding-bottom: 6px; + + + background-color: #FFC832; + + border-radius: 50px; + color:#FFFAE6; + font-size: 16px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + text-decoration:none; + text-align: center; + transition: box-shadow 250ms ease-in-out; + transition: width 250ms ease-out; + transition: all 250ms ease-out; +} +.search_btn:hover{ + background-color: #FFC832; + color: #FFFAE6; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); + width:21%; +} +.search_btn:active{ + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + width:19%; +} + +.botbox{ + display: none; +} + +/*------------------------------------------------------------------------------------------------------------*/ +/*--------------------------------------------------スマホ向け--------------------------------------------------*/ +/*--------------------------------------------------ここから--------------------------------------------------*/ +/*------------------------------------------------------------------------------------------------------------*/ + +@media screen and (max-width:1010px) { + body{ + width: 100%; + display: block; + border: none; + margin-top: 0px; + margin-bottom: 0px; + margin-left: auto; + margin-right: auto; + padding-top: 0px; + } + + .userleftbox{ + display: none; + } + + .userheader .icon{ + margin-left: 24px; + display: block; + width: auto; + } + + main{ + height: 88dvh; + overflow: auto; + border-radius: 0px; + margin-top: 0px; + margin-left: 0px; + margin-right: 0px; + width: auto; + background-color: #fff; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + border: none; + border-bottom: 1px solid #FFC832; + } + + main h1{ + color:#252525; + font-size: 32px; + font-family: 'Zen Maru Gothic', sans-serif; + } + + .sendbox .fx img{ + object-fit: cover; + margin-left: -12px; + text-align: center; + width: 58px; + height:58px; + border-radius: 50%; + } + + .sendbox p{ + line-height:20px; + text-align: left; + margin-top: 12px; + margin-bottom: 12px; + font-size: 14px; + color:#252525; + text-decoration: none; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; + } + + .sendbox .fxbox{ + display: flex; + } + + .sendbox label > input { + display:none; /* アップロードボタンのスタイルを無効にする */ + } + + .sendbox label{ + width:10%; + padding: 8px auto; + margin-left: 6px; + margin-right: 6px; + padding-top: 6px; + padding-bottom: 6px; + } + .sendbox label:hover{ + width:11%; + } + .sendbox label:active{ + width:9%; + } + .sendbox label img{ + vertical-align:bottom; + width: 24px; + } + .sendbox .fxbox p{ + line-height:20px; + text-align: left; + margin-top: auto; + margin-bottom: auto; + font-size: 16px; + color:#252525; + text-decoration: none; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; + } + + .ueusebtn{ + width:30%; + } + .ueusebtn:hover{ + width:31%; + } + .ueusebtn:active{ + width:29%; + } + + .rightbox{ + display: none; + } + + .botbox{ + display: block; + } + + .botbox .lbtnzone{ + display: flex; + width: 90%; + margin-left: auto; + margin-right: auto; + } + + + .btmbutton{ + cursor: pointer; + border: none; + display: block; + width:28%; + margin: 16px; + padding: 8px auto; + height: auto; + margin-left: 12px; + margin-right: 12px; + + padding-top: 14px; + padding-bottom: 14px; + background-color: #FFFFFF; + + border-radius: 50px; + color:#FFC832; + font-size: 16px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + text-decoration:none; + text-align: center; + transition: box-shadow 250ms ease-in-out; + transition: width 250ms ease-out; + transition: all 250ms ease-out; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + border: 1px solid #FFC832; + } + .btmbutton:hover{ + background-color: #FFC832; + color: #FFFAE6; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); + width:29%; + } + .btmbutton:active{ + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + width:27%; + } + + .ueuse .favbox .tuduki{ + + display: block; + width:26%; + padding: 8px auto; + + margin-left: 0px; + margin-right: 12px; + margin-top: 2px; + margin-bottom: 2px; + + + padding-top: 8px; + padding-bottom: 8px; + padding-left: 6px; + padding-right: 6px; + + + background-color: #FFFAE6; + + border-radius: 50px; + color:#FFC832; + font-size: 12px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + text-decoration:none; + text-align: center; + } + + .ueuse .favbox .tuduki:hover{ + background-color: #FFC832; + + margin-left: 0px; + margin-right: 12px; + margin-top: 2px; + margin-bottom: 2px; + + + padding-top: 8px; + padding-bottom: 8px; + padding-left: 6px; + padding-right: 6px; + + width:28%; + border-radius: 50px; + color:#FFFAE6; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + font-size: 12px; + text-decoration:none; + text-align: center; + } + + .ueuse .favbox .delbtn{ + cursor: pointer; + border: none; + display: block; + width:60px; + padding: 8px auto; + + margin-left: 6px; + margin-right: 0px; + margin-top: 2px; + margin-bottom: 2px; + + padding-top: 2px; + padding-bottom: 2px; + + + background-color: #F5F5F5; + + border-radius: 50px; + color:#FF4848; + font-size: 16px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + text-decoration:none; + text-align: center; + transition: box-shadow 250ms ease-in-out; + transition: width 250ms ease-out; + transition: all 250ms ease-out; + } + + .ueuse .favbox .delbtn:hover{ + cursor: pointer; + border: none; + display: block; + width:60px; + padding: 8px auto; + + margin-left: 6px; + margin-right: 0px; + margin-top: 2px; + margin-bottom: 2px; + + padding-top: 2px; + padding-bottom: 2px; + + + background-color: #FF4848; + + border-radius: 50px; + color: #f5f5f5;; + font-size: 16px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + text-decoration:none; + text-align: center; + transition: box-shadow 250ms ease-in-out; + transition: width 250ms ease-out; + transition: all 250ms ease-out; + } + + + + .ueuse .favbox .addabi{ + cursor: pointer; + border: none; + display: block; + width:auto; + padding: 8px auto; + + margin-left: auto; + margin-right: 6px; + margin-top: 2px; + margin-bottom: 2px; + + + padding-top: 2px; + padding-bottom: 2px; + padding-left: 12px; + padding-right: 12px; + + + background-color: #FFFAE6; + + border-radius: 50px; + color:#FFC832; + font-size: 16px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + text-decoration:none; + text-align: center; + transition: box-shadow 250ms ease-in-out; + transition: width 250ms ease-out; + transition: all 250ms ease-out; + } + + .ueuse .favbox .addabi:hover{ + cursor: pointer; + border: none; + display: block; + width:auto; + + margin-left: auto; + margin-right: 6px; + margin-top: 2px; + margin-bottom: 2px; + + padding-top: 2px; + padding-bottom: 2px; + padding-left: 12px; + padding-right: 12px; + + + background-color: #FFC832; + + border-radius: 50px; + color: #FFFAE6;; + font-size: 16px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + text-decoration:none; + text-align: center; + transition: box-shadow 250ms ease-in-out; + transition: width 250ms ease-out; + transition: all 250ms ease-out; + } + + + .ueuse .favbox img{ + margin-left: 0px; + width: 24px; + } + + .leftbox{ + display: block; + border-radius: 17px; + margin-top: 12px; + margin-left: 12px; + margin-right: 12px; + margin-bottom: 12px; + background-color: #FFFFFF; + width: 18%; + height: 100%; + margin-left: 0px; + padding: 32px; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + border: 1px solid #FFC832; + } + + .leftbox h1{ + font-family: 'Zen Maru Gothic', sans-serif; + margin-left: 20px; + color:#fff; + font-size: 32px; + } + .leftbox .logo{ + display: flex; + } + + .leftbox .logo img{ + + margin-left: auto; + margin-right: auto; + margin-top: 16px; + width: 72%; + + + } + .leftbox .logo p{ + color:#FFC832; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; + font-size: 32px; + margin-left: 8px; + margin-top: auto; + margin-bottom: -4px; + } + + .imgbtn{ + width:40%; + } + .imgbtn:hover{ + background-color: #FFC832; + color: #FFFAE6; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); + width:35%; + } + .imgebtn:active{ + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + width:45%; + } + + .imgbtn2{ + cursor: pointer; + border: none; + display: block; + width:20%; + padding: 8px auto; + margin-top: -64px; + margin-left: 12px; + margin-right: auto; + + padding-top: 6px; + padding-bottom: 6px; + + + background-color: #FFC832; + + border-radius: 50px; + color:#FFFAE6; + font-size: 16px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + text-decoration:none; + text-align: center; + transition: box-shadow 250ms ease-in-out; + transition: width 250ms ease-out; + transition: all 250ms ease-out; + } + .imgbtn2:hover{ + background-color: #FFC832; + color: #FFFAE6; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); + width:19%; + } + .imgebtn2:active{ + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + width:21%; + } + + .topbox { + position: absolute; + + top: 0; + left: 0; + width: 90%; + margin-left: 0px; + margin-right: 0px; + height: 44px; + padding-top: 0.0%; + padding-bottom: 0.2%; + padding-left: 10%; + } + + .topbox .logo img{ + margin-left: 0px; + margin-right: auto; + margin-top: 2px; + width: 120px; + } + + .terms{ + overflow-wrap: break-word; + margin-left: auto; + margin-right: auto; + width: 90%; + margin-top: 64px; + margin-bottom: 64px; + background-color: #f7f7f7; + } + + .terms h1{ + line-height:52px; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; + font-size: 48px; + text-align: left; + color: #252525; + } + + .terms h2{ + line-height:52px; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; + font-size: 48px; + text-align: left; + color: #252525; + } + + .terms h3{ + line-height:36px; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; + font-size: 32px; + text-align: left; + color: #252525; + } + + .terms h4{ + line-height:24px; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; + font-size: 24px; + text-align: left; + color: #252525; + } + + .terms p{ + margin-top: 2px; + margin-bottom: 2px; + line-height:24px; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: normal; + font-size: 16px; + text-align: left; + color: #252525; + } + + .terms img{ + + object-fit: cover; + width: auto; + height: auto; + margin-top: 12px; + margin-bottom: 12px; + margin-left: auto; + margin-right: auto; + border-radius: 15px; + } + + .terms .code{ + background-color: #252525; + border-radius: 15px; + padding: 12px; + } + + .terms .code p{ + line-height:24px; + margin-right: 12px; + margin-left: 12px; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: normal; + font-size: 16px; + text-align: left; + color: #FFFFFF; + } + + + .terms .p2c{ + margin-top: 0px; + margin-bottom: 10px; + text-align: left; + word-wrap: break-word; + line-height: 20px; + color: #868686; + font-size: 12px; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: normal; + } + + .terms .p3{ + margin-top: 24px; + text-align: left; + word-wrap: break-word; + line-height: 24px; + color: #252525; + font-size: 22px; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; + } + + .terms .err404 h1{ + margin-top: 128px; + line-height:64px; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; + font-size: 64px; + text-align: center; + color: #252525; + } + + + .ueuse .photo1 img{ + object-fit: cover; + border-radius: 10px; + margin-top: 12px; + margin-left: auto; + margin-right: auto; + width: 100%; + height: auto; + border: 1px solid #EEE; + } + + .ueuse .photo2{ + display: flex; + } + + .ueuse .photo2 img{ + object-fit: cover; + border-radius: 10px; + margin-top: 12px; + margin-left: auto; + margin-right: auto; + width: 47%; + height: auto; + border: 1px solid #EEE; + } + + .ueuse .video1 video{ + object-fit: cover; + border-radius: 10px; + margin-top: 12px; + margin-left: auto; + margin-right: auto; + width: 100%; + height: auto; + border: 1px solid #EEE; + } + +} + +/*------------------------------------------------------------------------------------------------------------*/ +/*--------------------------------------------------ダークモード--------------------------------------------------*/ +/*--------------------------------------------------ここから--------------------------------------------------*/ +/*------------------------------------------------------------------------------------------------------------*/ + +@media (prefers-color-scheme: dark) { + + body{ + background-color: #0c0c0c; + } + .errmsg{ + background-color: #3a3333; + color:#ff4848; + border: 1px solid #FF4848; + } + .rolebox{ + background-color: #0c0c0c; + border: 1px solid #FFC832; + } + + .userleftbox{ + background-color: #181616; + border: none; + } + + .leftbutton{ + background-color: #181616; + color:#FFFAE6; + } + .leftbutton:hover{ + background-color: #FFFAE6; + color: #0c0c0c; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); + width:75%; + } + .leftbutton:active{ + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + width:65%; + } + + main{ + background-color: #0c0c0c; + border: none; + } + + main h1{ + color:#FFFAE6; + font-size: 32px; + font-family: 'Zen Maru Gothic', sans-serif; + } + + + .ueuse{ + background-color: #181616; + border: none; + } + .ueuse .flebox a{ + color:#FFFAE6; + } + + .ueuse .flebox .idbox{ + background-color: #302c2c; + border: none; + } + .ueuse .flebox .idbox a{ + color:#CCC; + } + + .ueuse p{ + color:#FFF; + } + + + .ueuse h1{ + color:#FFF; + } + + .ueuse h2{ + color:#FFF; + } + + .ueuse h3{ + color:#FFF; + } + + .ueuse center{ + color:#FFF; + } + + .ueuse a{ + color:#FFC832; + } + + .ueuse .flebox .time{ + color:#CCC; + } + + .ueuse .photo1 img{ + border: none; + } + + .ueuse .photo2{ + display: flex; + } + + .ueuse .photo2 img{ + border: none; + } + + .ueuse .video1 video{ + border: none; + } + + .ueuse .abi{ + background-color: #0c0c0c; + border: none; + } + + .ueuse .abi p{ + color:#FFFAE6; + } + + .ueuse .abi .back{ + background-color: #FFC832; + border: none; + } + + .ueuse .abi .back h1{ + color:#252525; + } + .ueuse .abi h3{ + color:#CCC; + } + .ueuse .favbox .favbtn{ + background-color: #0c0c0c; + color:#FFC832; + } + .ueuse .favbox .favbtn_after{ + background-color: #FFC832; + color:#FFFAE6; + } + .ueuse .favbox .tuduki{ + background-color: #0c0c0c; + color:#FFC832; + } + .ueuse .favbox .tuduki:hover{ + background-color: #FFC832; + color:#FFFAE6; + } + .ueuse .favbox .delbtn{ + background-color: #0c0c0c; + color:#FF4848; + } + .ueuse .favbox .delbtn:hover{ + background-color: #FF4848; + color: #f5f5f5;; + } + .ueuse .favbox .addabi{ + background-color: #0c0c0c; + color:#FFC832; + } + .ueuse .favbox .addabi:hover{ + background-color: #FFC832; + color: #FFFAE6;; + } + .ueuse hr{ + border-top: 1px solid #CCC; + } + + .userheader h2{ + color:#FFFAE6; + } + + .userheader p{ + color: #CCC; + } + + .userheader .profile p{ + color:#FFFAE6; + } + + .userheader .rolebox{ + background-color: #181616; + border: 1px solid #FFC832; + } + + .fzone .follow .fbtn{ + background-color: #FFC832; + color:#FFFAE6; + } + .fzone .follow .fbtn:hover{ + background-color: #FFC832; + color: #FFFAE6; + } + + .fzone .follow .fbtn_no{ + background-color: #181616; + color:#FFC832; + border: 1px solid #FFC832; + } + .fzone .follow .fbtn_no:hover{ + background-color: #181616; + color: #FFC832; + } + .fzone .time p{ + color:#CCC; + } + .fzone .time a{ + color:#CCC; + } + .fzone .follow_yes{ + background-color: #181616; + } + .fzone .follow_yes p{ + color:#FFFAE6; + } + + + .rightbox{ + background-color: #0c0c0c; + border:none; + } + + .rightbox h1{ + color: #CCC; + } + + .rightbox .noticebox{ + background-color: #181616; + border: none; + } + + .rightbox .noticebox h4{ + color: #FFF; + } + + .rightbox .noticebox p{ + color: #FFF; + } + + .rightbox .noticebox .makeup p{ + color:#FFFAE6;; + } + + .rightbox .noticebox .makeup a{ + color:#FFC832; + } + .rightbox .noticebox .time p{ + color:#CCC; + } + .rightbox .btmbox h2{ + color: #CCC; + } + + .rightbox .btmbox h3{ + color: #CCC; + } + + .rightbox .btmbox p{ + color: #FFF; + } + + .rightbox .btmbox a{ + color:#FFC832; + } + + .sendbox{ + background-color: #181616; + border:none; + } + + .sendbox p{ + color: #FFF;; + } + + .sendbox textarea{ + background-color: #181616; + color:#CCC; + } + .sendbox .fxbox p{ + color:#FFFAE6; + } + + + .emjtex{ + background-color: #181616; + border: none; + } + + .emjtex h3{ + color:#FFF; + } + + .emjtex p{ + color:#CCC; + } + + .formarea{ + background-color: #181616; + } + + .formarea p{ + color:#CCC; + } + + + .modal-content { + background-color: #181616; + } + + .modal-content textarea{ + background-color: #181616; + color:#CCC; + } + .modal-content p{ + color:#CCC; + } + + .modal-content h1{ + color:#FFF; + } + + .modal-content .fbtn_no{ + background-color: #181616; + color:#FFC832; + border: 1px solid #FFC832; + } + .modal-content .fbtn_no:hover{ + background-color: #181616; + color: #FFC832; + } + + .inbox { + background: #0c0c0c; + color: #FFF; + border: none; + } + + .inbox::placeholder { + color: #999; + } + + .inbox:hover { + outline: none; + border: 1px solid #FFC832; + } + + .inbox:focus { + outline: none; + border: 1px solid #FFC832; + border-bottom: 3px solid #FFC832; + } + + .btmbutton{ + background-color: #FFC832; + color:#FFFAE6; + border: none; + } + .btmbutton:hover{ + background-color: #FFC832; + color: #FFFAE6; + } + + + .terms{ + background-color: #0c0c0c; + } + + .terms h1{ + color: #CCC; + } + + .terms h2{ + color: #FFF; + } + + .terms h3{ + color: #FFF; + } + + .terms h4{ + color: #FFF; + } + + .terms p{ + color: #FFF; + } + + .terms .code{ + background-color: #CCC; + } + + .terms .code p{ + color: #252525; + } + + .terms ul{ + color: #FFF; + } + + .terms .p2c{ + color: #CCC; + } + + .terms .p3{ + color: #FFF; + } + + .terms .err404 h1{ + color: #CCC; + } + + .terms .err404 p{ + color: #FFF; + } + + .notification{ + background-color: #181616; + border: none; + } + + .notification .flebox a{ + color:#CCC5; + } + + .notification p{ + color:#FFF; + } + + .notification h3{ + color:#CCC; + } + + + .notification .flebox .time{ + color:#CCC; + } + + .notification a{ + color:#FFC832; + } + .tokonone p{ + color:#CCC; + } +} \ No newline at end of file diff --git a/css/style.css b/css/style.css new file mode 100644 index 0000000..cef3fbe --- /dev/null +++ b/css/style.css @@ -0,0 +1,855 @@ +@import url('https://fonts.googleapis.com/css2?family=BIZ+UDPGothic:wght@400;700&family=Josefin+Sans:ital,wght@1,700&family=Kosugi+Maru&family=Zen+Maru+Gothic:wght@500&display=swap'); + +body{ + display: flex; + border: none; + margin-top: 0px; + margin-bottom: 0px; + margin-left: auto; + margin-right: 0px; + background-color: #FFFFFF; + /* 画像を常に天地左右の中央に配置 */ + background-position: center center; + + /* 画像をタイル状に繰り返し表示しない */ + background-repeat: no-repeat; + + /* コンテンツの高さが画像の高さより大きい時、動かないように固定 */ + background-attachment: fixed; + + /* 表示するコンテナの大きさに基づいて、背景画像を調整 */ + background-size: cover; +} + +.leftbox{ + margin-top: 0px; + margin-bottom: 0px; + background-color: #FFC832; + width: 35%; + height: 100%; + margin-left: 0px; + padding: 32px; +} + +.leftbox h1{ + margin-left: 20px; + color:#fff; + font-size: 2em; +} +.leftbox .logo{ + display: flex; +} + +.leftbox .logo img{ + + margin-left: 16px; + margin-top: 16px; + width: 200px; + +} +.leftbox .logo p{ + color:#fff; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; + font-size: 32px; + margin-left: 8px; + margin-top: auto; + margin-bottom: -4px; +} + +.leftbox2{ + margin-top: 0px; + margin-bottom: 0px; + background-color: #FFC832; + width: 35%; + height: 100vh; + margin-left: 0px; + padding: 32px; +} + +.leftbox2 h1{ + margin-left: 20px; + color:#fff; + font-size: 2em; +} +.leftbox2 .logo{ + display: flex; +} + +.leftbox2 .logo img{ + + margin-left: 16px; + margin-top: 16px; + width: 200px; + +} +.leftbox2 .logo p{ + color:#fff; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; + font-size: 32px; + margin-left: 8px; + margin-top: auto; + margin-bottom: -4px; +} + +.textbox{ + padding: 32px; + width: auto; + margin-left: 24px; + margin-right: 24px; + margin-top: 64px; + margin-bottom: 100px; + border-radius: 25px; + background-color: #fff; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .15); +} + +.textbox h1{ + word-wrap: break-word; + margin: 0px; + color: #FFC832; + font-size: 32px; + font-family: 'Zen Maru Gothic', sans-serif; +} + +.textbox h2{ + word-wrap: break-word; + margin: 0px; + color: #252525; + text-align: center; + font-size: 32px; + font-family: 'Zen Maru Gothic', sans-serif; +} + +.textbox h3{ + word-wrap: break-word; + margin: 0px; + color: #252525; + text-align: center; + font-size: 18px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; +} + +.textbox p{ + word-wrap: break-word; + line-height: 20px; + color: #252525; + font-size: 16px; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: normal; +} + +.textbox .p2{ + margin-top: 0px; + margin-bottom: 10px; + word-wrap: break-word; + line-height: 20px; + color: #868686; + font-size: 12px; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: normal; +} + +.textbox .p2c{ + margin-top: 0px; + margin-bottom: 10px; + text-align: center; + word-wrap: break-word; + line-height: 20px; + color: #868686; + font-size: 12px; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: normal; +} + +.textbox .p3{ + margin-top: 24px; + text-align: center; + word-wrap: break-word; + line-height: 24px; + color: #252525; + font-size: 22px; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; +} + +.textbox .maillink{ + word-wrap: break-word; + line-height: 20px; + color: #4e4428; + text-decoration: none; + font-size: 16px; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: normal; +} + +.textbox .cntzone{ + display: flex; + width: 100%; + padding: 0px; +} + +.textbox .cntzone .usercnt{ + margin-top: 24px; + margin-left: 12px; + margin-right: 12px; + width: 43%; + height: 5dvh; + border-radius: 15px; + background-color: #FFFAE6; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05) inset; + padding: 18px; +} + +.textbox .cntzone .usercnt .p1{ + display: block; + margin-top: 0px; + margin-bottom: 6px; + text-align: left; + word-wrap: break-word; + color: #868686; + font-size: 12px; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: normal; +} + +.textbox .cntzone .usercnt p{ + margin-top: 0px; + margin-bottom: 8px; + text-align: left; + word-wrap: break-word; + line-height: 24px; + color: #252525; + font-size: 20px; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; +} + +.btnbox{ + padding-top: 16px; + padding-bottom: 16px; + padding-left: 32px; + padding-right: 32px; + border-radius: 15px; + background-color: #f7f7f7; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05) inset; + margin-top: 32px; + text-align: center; + margin-left: auto; + margin-right: auto; + +} + +label > input { + display:none; /* アップロードボタンのスタイルを無効にする */ +} + +.irobutton{ + cursor: pointer; + border: none; + display: block; + width:40%; + margin: 32px; + padding: 8px 10%; + margin-left: auto; + margin-right: auto; + + padding-top: 8px; + padding-bottom: 8px; + + background-color: #FFC832; + + text-align: center; + border-radius: 50px; + color:#fff; + font-size: 22px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + text-decoration:none; + text-align: center; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .15); + transition: box-shadow 250ms ease-in-out; + transition: width 250ms ease-out; +} +.irobutton:hover{ + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); + width:45%; +} +.irobutton:active{ + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + width:35%; +} + +.sirobutton{ + cursor: pointer; + border: none; + display: block; + width:40%; + margin: 32px; + padding: 8px 10%; + margin-left: auto; + margin-right: auto; + + padding-top: 8px; + padding-bottom: 8px; + + + text-align: center; + background-color: #FFFAE6; + + border-radius: 50px; + color:#FFC832; + font-size: 22px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + text-decoration:none; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .15); + transition: box-shadow 250ms ease-in-out; + transition: width 250ms ease-out; +} +.sirobutton:hover{ + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); + width:45%; +} +.sirobutton:active{ + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + width:45%; +} + +.formarea{ + padding-top: 16px; + padding-bottom: 16px; + padding-left: 32px; + padding-right: 32px; + border-radius: 15px; + background-color: #f7f7f7; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05) inset; + margin-top: 64px; + text-align: left; + margin-left: auto; + margin-right: auto; +} + +.formarea .iconimg{ + margin-left: auto; + margin-right: auto; + text-align: center; +} + +.formarea .iconimg img{ + margin-left: auto; + margin-right: auto; + text-align: center; + width: 100px; + height:100px; + border-radius: 50%; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .15); +} + +.myarea{ + padding-top: 16px; + padding-bottom: 32px; + padding-left: 32px; + padding-right: 32px; + border-radius: 15px; + background-color: #f7f7f7; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05) inset; + margin-top: 64px; + text-align: center; + margin-left: auto; + margin-right: auto; +} + +.myarea img{ + margin-left: auto; + margin-right: auto; + text-align: center; + width: 100px; + height:100px; + border-radius: 50%; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .15); +} + +.myarea p{ + margin-top: 32px; + margin-bottom: 10px; + word-wrap: break-word; + line-height: 20px; + color: #868686; + font-size: 12px; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: normal; +} + +.inbox { + width: 96%; + padding: 8px 10px; + border: none; + border-radius: 10px; + background: #fff; + font-family: 'Zen Maru Gothic', sans-serif; + color: rgb(32,32,32); + font-size: 1em; + line-height: 1.5; + white-space: nowrap; + box-shadow:0px 0px 25px rgba(0,0,0,0.05) inset; + box-shadow:0px 0px 25px rgba(0,0,0,0.07); + overflow-x: scroll; + overflow-y : scroll ; + transition: border 350ms ease-in-out; + transition: border-bottom 150ms ease-out; + border: 1px solid #f1f1f1; + } + +.inbox::placeholder { + color: #999; +} + +.inbox:hover { + outline: none; + border: 1px solid #FFC832; +} + +.inbox:focus { + outline: none; + border: 1px solid #FFC832; + border-bottom: 3px solid #FFC832; +} + + +.errmsg{ + padding-top: 16px; + padding-bottom: 16px; + padding-left: 32px; + padding-right: 32px; + border-radius: 15px; + background-color: #ffebeb; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05) inset; + margin-top: 64px; + text-align: left; + margin-left: auto; + margin-right: auto; + color:#ff4848; + font-family: 'BIZ UDPGothic', sans-serif; + word-wrap: break-word; + line-height: 20px; + border: 1px solid #FF4848; +} + +.flexbtn{ + display: flex; +} + +.flexbtn .irobutton{ + border: none; + display: block; + width:20%; + margin: 32px; + padding: 8px 10%; + margin-left: auto; + margin-right: auto; + + padding-top: 8px; + padding-bottom: 8px; + + background-color: #FFC832; + + border-radius: 50px; + color:#fff; + font-size: 26px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + text-decoration:none; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .15); + transition: box-shadow 250ms ease-in-out; + transition: width 250ms ease-out; +} +.flexbtn.irobutton:hover{ + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); + width:55%; +} +.flexbtn.irobutton:active{ + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + width:45%; +} + +.flexbtn.sirobutton{ + border: none; + display: block; + width:50%; + margin: 32px; + padding: 8px 10%; + margin-left: auto; + margin-right: auto; + + padding-top: 8px; + padding-bottom: 8px; + + + background-color: #FFFAE6; + + border-radius: 50px; + color:#FFC832; + font-size: 26px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + text-decoration:none; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .15); + transition: box-shadow 250ms ease-in-out; + transition: width 250ms ease-out; +} +.flexbtn.sirobutton:hover{ + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); + width:55%; +} +.flexbtn.sirobutton:active{ + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + width:45%; +} +.rolebox{ + + margin-top: 12px; + margin-bottom: 12px; + + margin-left: auto; + margin-right: auto; + + width: 120px; + padding-left: auto; + padding-right: auto; + + background-color: #fff; + border: 1px solid #FFC832; + + border-radius: 25px; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .15); + +} + +.rolebox p{ + + color:#FFC832; + margin-top: 2px; + margin-bottom: 2px; + margin-left: 10px; + margin-right: 10px; + + font-size: 16px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + +} + + +.userleftbox{ + margin-top: 0px; + margin-bottom: 0px; + background-color: #FFC832; + width: 10%; + height: 100%; + margin-left: 0px; + padding: 32px; +} + +.userleftbox h1{ + font-family: 'Zen Maru Gothic', sans-serif; + margin-left: 20px; + color:#fff; + font-size: 32px; +} +.userleftbox .logo{ + display: flex; +} + +.userleftbox .logo img{ + + margin-left: 16px; + margin-top: 16px; + width: 72%; + +} +.userleftbox .logo p{ + color:#fff; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; + font-size: 32px; + margin-left: 8px; + margin-top: auto; + margin-bottom: -4px; +} + +.leftbutton{ + cursor: pointer; + border: none; + display: block; + width:70%; + margin: 32px; + padding: 8px 10%; + margin-left: auto; + margin-right: auto; + + padding-top: 8px; + padding-bottom: 8px; + + + background-color: #FFC832; + + border-radius: 50px; + color:#FFFAE6; + font-size: 20px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + text-decoration:none; + text-align: center; + transition: box-shadow 250ms ease-in-out; + transition: width 250ms ease-out; + transition: all 250ms ease-out; +} +.leftbutton:hover{ + background-color: #FFFAE6; + color: #FFC832; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); + width:75%; +} +.leftbutton:active{ + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + width:65%; +} + +main{ + border-radius: 25px; + margin-top: 24px; + margin-left: 24px; + margin-right: 24px; + width: 80%; + background-color: #fff; + padding: 24px; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); +} + +main h1{ + color:#252525; + font-size: 32px; + font-family: 'Zen Maru Gothic', sans-serif; +} + + +.btn_area{ + display: flex; + width: 100%; + margin-left: auto; + margin-right: auto; +} + +.fbtn{ + cursor: pointer; + border: none; + display: block; + width:50%; + padding: 8px auto; + + margin-top: 12px; + margin-left: 12px; + margin-right: 12px; + margin-bottom: 0px; + + padding-top: 6px; + padding-bottom: 6px; + + + background-color: #FFC832; + + border-radius: 50px; + color:#FFFAE6; + font-size: 16px; + text-align: center; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + text-decoration:none; + text-align: center; + transition: box-shadow 250ms ease-in-out; + transition: width 250ms ease-out; + transition: all 250ms ease-out; +} +.fbtn:hover{ + background-color: #FFC832; + color: #FFFAE6; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); + width:55%; +} +.fbtn:active{ + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + width:45%; +} + +/*------------------------------------------------------------------------------------------------------------*/ +/*--------------------------------------------------スマホ向け--------------------------------------------------*/ +/*--------------------------------------------------ここから--------------------------------------------------*/ +/*------------------------------------------------------------------------------------------------------------*/ + +@media screen and (max-width:1010px) { + + body{ + backdrop-filter: blur(10px); + } + + .leftbox{ + margin-top: 0px; + margin-bottom: 0px; + background-color: transparent; + width: 100%; + height: 100%; + margin-left: 0px; + padding: 16px; + } + + .leftbox h1{ + margin-left: 20px; + color:#fff; + font-size: 2em; + } + .leftbox .logo{ + display: flex; + background-color: #FFC832; + border-radius: 15px; + } + + .leftbox .logo img{ + + margin-left: 16px; + margin-top: 16px; + width: 200px; + + } + .leftbox .logo p{ + color:#fff; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; + font-size: 32px; + margin-left: 8px; + margin-top: auto; + margin-bottom: -4px; + } + + + .textbox{ + padding: 32px; + width: auto; + margin-left: 0px; + margin-right: 0px; + margin-top: 64px; + margin-bottom: 8px; + border-radius: 25px; + background-color: #fff; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .15); + } + + .textbox h1{ + word-wrap: break-word; + margin: 0px; + color: #FFC832; + font-size: 32px; + font-family: 'Zen Maru Gothic', sans-serif; + } + + + .btnbox{ + padding-top: 12px; + padding-bottom: 12px; + padding-left: 12px; + padding-right: 12px; + border-radius: 15px; + background-color: #f7f7f7; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05) inset; + margin-top: 32px; + text-align: center; + margin-left: auto; + margin-right: auto; + + } + + .irobutton{ + width:60%; + } + .irobutton:hover{ + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); + width:65%; + } + .irobutton:active{ + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + width:55%; + } + + .sirobutton{ + width:60%; + } + .sirobutton:hover{ + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); + width:65%; + } + .sirobutton:active{ + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + width:55%; + } + + + .btn_area{ + display: block; + width: 100%; + margin-left: auto; + margin-right: auto; + } + + .fbtn{ + cursor: pointer; + border: none; + display: block; + width:50%; + padding: 8px auto; + + margin-top: 12px; + margin-left: 12px; + margin-right: 12px; + margin-bottom: 0px; + + padding-top: 12px; + padding-bottom: 12px; + + + background-color: #FFC832; + + border-radius: 50px; + color:#FFFAE6; + font-size: 16px; + text-align: center; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + text-decoration:none; + text-align: center; + transition: box-shadow 250ms ease-in-out; + transition: width 250ms ease-out; + transition: all 250ms ease-out; + } + .fbtn:hover{ + background-color: #FFC832; + color: #FFFAE6; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); + width:55%; + } + .fbtn:active{ + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + width:45%; + } + + .leftbox2{ + margin-top: 0px; + margin-bottom: 0px; + background-color: #FFC832; + width: 100%; + height: 100vh; + margin-left: 0px; + padding: 32px; + } +} \ No newline at end of file diff --git a/db.php b/db.php new file mode 100644 index 0000000..cde25eb --- /dev/null +++ b/db.php @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/delete/delete.php b/delete/delete.php new file mode 100644 index 0000000..9becbcc --- /dev/null +++ b/delete/delete.php @@ -0,0 +1,27 @@ +prepare("DELETE FROM ueuse WHERE uniqid = :uniqid"); + $deleteQuery->bindValue(':uniqid', $postUniqid, PDO::PARAM_STR); + $res = $deleteQuery->execute(); + + if ($res) { + echo json_encode(['success' => true]); + exit; + } else { + echo json_encode(['success' => false, 'error' => '削除に失敗しました。']); + exit; + } + } catch(PDOException $e) { + echo json_encode(['success' => false, 'error' => 'データベースエラー:' . $e->getMessage()]); + exit; + } +} +?> diff --git a/emoji/addemoji.php b/emoji/addemoji.php new file mode 100644 index 0000000..c6ab82c --- /dev/null +++ b/emoji/addemoji.php @@ -0,0 +1,360 @@ + PDO::ERRMODE_EXCEPTION, + PDO::MYSQL_ATTR_MULTI_STATEMENTS => false + ); + $pdo = new PDO('mysql:charset=UTF8;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); + +} catch(PDOException $e) { + + // 接続エラーのときエラー内容を取得する + $error_message[] = $e->getMessage(); +} + +if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) { + + $passQuery = $pdo->prepare("SELECT username,userid,loginid,admin FROM account WHERE userid = :userid"); + $passQuery->bindValue(':userid', $_SESSION['userid']); + $passQuery->execute(); + $res = $passQuery->fetch(); + if(empty($res["userid"])){ + header("Location: ../login.php"); + exit; + }elseif($_SESSION['loginid'] === $res["loginid"]){ + // セッションに値をセット + $userid = $_SESSION['userid']; // セッションに格納されている値をそのままセット + $username = $_SESSION['username']; // セッションに格納されている値をそのままセット + $_SESSION['admin_login'] = true; + $_SESSION['userid'] = $userid; + $_SESSION['username'] = $username; + $_SESSION['loginid'] = $res["loginid"]; + setcookie('userid', $userid, time() + 60 * 60 * 24 * 14); + setcookie('username', $username, time() + 60 * 60 * 24 * 14); + setcookie('loginid', $res["loginid"], time() + 60 * 60 * 24 * 14); + setcookie('admin_login', true, time() + 60 * 60 * 24 * 14); + }else{ + header("Location: ../login.php"); + exit; + } + + +} elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) { + + $passQuery = $pdo->prepare("SELECT username,userid,loginid,admin FROM account WHERE userid = :userid"); + $passQuery->bindValue(':userid', $_COOKIE['userid']); + $passQuery->execute(); + $res = $passQuery->fetch(); + if(empty($res["userid"])){ + header("Location: ../login.php"); + exit; + }elseif($_COOKIE['loginid'] === $res["loginid"]){ + // セッションに値をセット + $userid = $_COOKIE['userid']; // クッキーから取得した値をセット + $username = $_COOKIE['username']; // クッキーから取得した値をセット + $_SESSION['admin_login'] = true; + $_SESSION['userid'] = $userid; + $_SESSION['username'] = $username; + $_SESSION['loginid'] = $res["loginid"]; + setcookie('userid', $userid, time() + 60 * 60 * 24 * 14); + setcookie('username', $username, time() + 60 * 60 * 24 * 14); + setcookie('loginid', $res["loginid"], time() + 60 * 60 * 24 * 14); + setcookie('admin_login', true, time() + 60 * 60 * 24 * 14); + }else{ + header("Location: ../login.php"); + exit; + } + + +} else { + // ログインが許可されていない場合、ログインページにリダイレクト + header("Location: ../login.php"); + exit; +} +if(empty($userid)){ + header("Location: ../login.php"); + exit; +} +if(empty($username)){ + header("Location: ../login.php"); + exit; +} + +if(!($res["admin"] === "yes")){ + header("Location: ../login.php"); + exit; +} + +if( !empty($pdo) ) { + + // データベース接続の設定 + $dbh = new PDO('mysql:charset=UTF8;dbname='.DB_NAME.';host='.DB_HOST, DB_USER, DB_PASS, array( + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, + PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true, + )); + + $userQuery = $dbh->prepare("SELECT username, userid, profile, role FROM account WHERE userid = :userid"); + $userQuery->bindValue(':userid', $userid); + $userQuery->execute(); + $userData = $userQuery->fetch(); + + $role = $userData["role"]; + + $dbh = new PDO('mysql:charset=UTF8;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); + + $rerole = $dbh->prepare("SELECT username, userid, password, mailadds, profile, iconname, iconcontent, icontype, iconsize, headname, headcontent, headtype, headsize, role, datetime FROM account WHERE userid = :userid"); + + $rerole->bindValue(':userid', $userid); + // SQL実行 + $rerole->execute(); + + $userdata = $rerole->fetch(); // ここでデータベースから取得した値を $role に代入する + + +} + + + +if( !empty($_POST['btn_submit']) ) { + $emojiname = $_POST['emojiname']; + $emojiinfo = $_POST['emojiinfo']; + + if (!empty($_FILES['image']['name'])) { + $img = $_FILES['image']; + }else{ + $error_message[] = '画像を選択してください~'; + } + + + + $options = array( + // SQL実行失敗時に例外をスルー + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + // デフォルトフェッチモードを連想配列形式に設定 + PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, + // バッファードクエリを使う(一度に結果セットを全て取得し、サーバー負荷を軽減) + // SELECTで得た結果に対してもrowCountメソッドを使えるようにする + PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true, + ); + + $dbh = new PDO('mysql:charset=UTF8;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); + + + $query = $dbh->prepare('SELECT * FROM emoji WHERE emojiname = :emojiname limit 1'); + + $query->execute(array(':emojiname' => $emojiname)); + + $result = $query->fetch(); + + // IDの入力チェック + if( empty($emojiname) ) { + $error_message[] = '絵文字IDを入力してください!'; + } else { + + // 文字数を確認 + if( 20 < mb_strlen($emojiname, 'UTF-8') ) { + $error_message[] = 'IDは20文字以内で入力してください。'; + } + + if($result > 0){ + $error_message[] = 'このID('.$emojiname.')は既に使用されています。他のIDを作成してください。'; //このE-mailは既に使用されています。 + } + + } + + if( empty($error_message) ) { + + // 書き込み日時を取得 + $datetime = date("Y-m-d H:i:s"); + + // トランザクション開始 + $pdo->beginTransaction(); + + try { + + // SQL作成 + $stmt = $pdo->prepare("INSERT INTO emoji (emojifile, emojitype, emojicontent, emojisize, emojiname, emojiinfo, emojidate) VALUES ( :emojifile, :emojitype, :emojicontent, :emojisize, :emojiname, :emojiinfo, :emojidate)"); + + + + $name = $img['name']; + $type = $img['type']; + $content = file_get_contents($img['tmp_name']); + $size = $img['size']; + + $stmt->bindValue(':emojifile', $name, PDO::PARAM_STR); + $stmt->bindValue(':emojitype', $type, PDO::PARAM_STR); + $stmt->bindValue(':emojicontent', $content, PDO::PARAM_STR); + $stmt->bindValue(':emojisize', $size, PDO::PARAM_INT); + + // 値をセット + $stmt->bindParam( ':emojiname', $emojiname, PDO::PARAM_STR); + $stmt->bindParam( ':emojiinfo', $emojiinfo, PDO::PARAM_STR); + + $stmt->bindParam( ':emojidate', $datetime, PDO::PARAM_STR); + + // SQLクエリの実行 + $res = $stmt->execute(); + + // コミット + $res = $pdo->commit(); + + } catch(Exception $e) { + + // エラーが発生した時はロールバック + $pdo->rollBack(); + } + + if( $res ) { + $url = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; + header("Location:".$url.""); + exit; + } else { + $error_message[] = '登録に失敗しました。'; + } + + // プリペアドステートメントを削除 + $stmt = null; + + + } + +} + + +if( !empty($_POST['logout']) ) { + if (isset($_SERVER['HTTP_COOKIE'])) { + $cookies = explode(';', $_SERVER['HTTP_COOKIE']); + foreach($cookies as $cookie) { + $parts = explode('=', $cookie); + $name = trim($parts[0]); + setcookie($name, '', time()-1000); + setcookie($name, '', time()-1000, '/'); + } + } + // リダイレクト先のURLへ転送する + $url = '../index.php'; + header('Location: ' . $url, true, 303); + + // すべての出力を終了 + exit; +} + + + +// データベースの接続を閉じる +$pdo = null; + +?> + + + + + +絵文字登録 - <?php echo file_get_contents($servernamefile);?> + + + + + +
+ + +
    + +

    + +
+ + + + +

絵文字登録

+ +

絵文字登録です。

+ +
+ + +
+ + +
+

EmojiID

+ +
+ +
+

この絵文字について

+ +
+ +
+ + +
+ + + + +
+ + + + + + + \ No newline at end of file diff --git a/emoji/emojiimage.php b/emoji/emojiimage.php new file mode 100644 index 0000000..f23fc2f --- /dev/null +++ b/emoji/emojiimage.php @@ -0,0 +1,75 @@ + PDO::ERRMODE_EXCEPTION, + PDO::MYSQL_ATTR_MULTI_STATEMENTS => false +); +$pdo = new PDO('mysql:charset=UTF8;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); + + +//$row['userid'] = "daichimarukn"; + +$emojiname = $_GET['emoji']; + + +$options = array( + // SQL実行失敗時に例外をスルー + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + // デフォルトフェッチモードを連想配列形式に設定 + PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, + // バッファードクエリを使う(一度に結果セットを全て取得し、サーバー負荷を軽減) + // SELECTで得た結果に対してもrowCountメソッドを使えるようにする + PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true, +); + +if( empty($emojiname) ) { + $filePath = 'img/deficon/icon.png'; + $data = file_get_contents($filePath); + header('Content-type: image/png'); + //データを出力 + echo $data; + exit(); +}else{ + $dbh = new PDO('mysql:charset=UTF8;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); + + + $result = $dbh->prepare("SELECT emojiname, emojicontent, emojitype, emojisize profile FROM emoji WHERE emojiname = :emojiname"); + + $result->bindValue(':emojiname', $emojiname); + // SQL実行 + $result->execute(); + + + $row = $result->fetch(); // ここでデータベースから取得した値を $row に代入する + + + + header('Content-type: ' . $row['emojitype']); + echo $row['emojicontent']; + exit(); +} +?> \ No newline at end of file diff --git a/emoji/index.php b/emoji/index.php new file mode 100644 index 0000000..5c5c360 --- /dev/null +++ b/emoji/index.php @@ -0,0 +1,197 @@ + PDO::ERRMODE_EXCEPTION, + PDO::MYSQL_ATTR_MULTI_STATEMENTS => false + ); + $pdo = new PDO('mysql:charset=UTF8;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); + +} catch(PDOException $e) { + + // 接続エラーのときエラー内容を取得する + $error_message[] = $e->getMessage(); +} + +if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) { + + $passQuery = $pdo->prepare("SELECT username,userid,loginid,admin FROM account WHERE userid = :userid"); + $passQuery->bindValue(':userid', $_SESSION['userid']); + $passQuery->execute(); + $res = $passQuery->fetch(); + if(empty($res["userid"])){ + header("Location: ../login.php"); + exit; + }elseif($_SESSION['loginid'] === $res["loginid"]){ + // セッションに値をセット + $userid = $_SESSION['userid']; // セッションに格納されている値をそのままセット + $username = $_SESSION['username']; // セッションに格納されている値をそのままセット + $_SESSION['admin_login'] = true; + $_SESSION['userid'] = $userid; + $_SESSION['username'] = $username; + $_SESSION['loginid'] = $res["loginid"]; + setcookie('userid', $userid, time() + 60 * 60 * 24 * 14); + setcookie('username', $username, time() + 60 * 60 * 24 * 14); + setcookie('loginid', $res["loginid"], time() + 60 * 60 * 24 * 14); + setcookie('admin_login', true, time() + 60 * 60 * 24 * 14); + }else{ + header("Location: ../login.php"); + exit; + } + + +} elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) { + + $passQuery = $pdo->prepare("SELECT username,userid,loginid,admin FROM account WHERE userid = :userid"); + $passQuery->bindValue(':userid', $_COOKIE['userid']); + $passQuery->execute(); + $res = $passQuery->fetch(); + if(empty($res["userid"])){ + header("Location: ../login.php"); + exit; + }elseif($_COOKIE['loginid'] === $res["loginid"]){ + // セッションに値をセット + $userid = $_COOKIE['userid']; // クッキーから取得した値をセット + $username = $_COOKIE['username']; // クッキーから取得した値をセット + $_SESSION['admin_login'] = true; + $_SESSION['userid'] = $userid; + $_SESSION['username'] = $username; + $_SESSION['loginid'] = $res["loginid"]; + setcookie('userid', $userid, time() + 60 * 60 * 24 * 14); + setcookie('username', $username, time() + 60 * 60 * 24 * 14); + setcookie('loginid', $res["loginid"], time() + 60 * 60 * 24 * 14); + setcookie('admin_login', true, time() + 60 * 60 * 24 * 14); + }else{ + header("Location: ../login.php"); + exit; + } + + +} else { + // ログインが許可されていない場合、ログインページにリダイレクト + header("Location: ../login.php"); + exit; +} +if(empty($userid)){ + header("Location: ../login.php"); + exit; +} +if(empty($username)){ + header("Location: ../login.php"); + exit; +} + +if (!empty($pdo)) { + $sql = "SELECT emojiname,emojiinfo,emojidate FROM emoji ORDER BY emojidate DESC"; + $message_array = $pdo->query($sql); + + while ($row = $message_array->fetch(PDO::FETCH_ASSOC)) { + + $messages[] = $row; + } +} + +if( !empty($_POST['logout']) ) { + if (isset($_SERVER['HTTP_COOKIE'])) { + $cookies = explode(';', $_SERVER['HTTP_COOKIE']); + foreach($cookies as $cookie) { + $parts = explode('=', $cookie); + $name = trim($parts[0]); + setcookie($name, '', time()-1000); + setcookie($name, '', time()-1000, '/'); + } + } + // リダイレクト先のURLへ転送する + $url = '../index.php'; + header('Location: ' . $url, true, 303); + + // すべての出力を終了 + exit; +} + + + + +// データベースの接続を閉じる +$pdo = null; + +?> + + + + + + + +絵文字一覧 - <?php echo file_get_contents($servernamefile);?> + + + + + +
+ +
    + +

    + +
+ + +
+
+

絵文字一覧

+
+ '; + echo '
'; + echo ''; + echo '

:'.$value["emojiname"].':

'; + echo '
'; + echo '

'.$value["emojiinfo"].'

'; + echo '
'; + } + }else{ + echo '

カスタム絵文字がありません

'; + } + ?> +
+ +
+ +
+ + + + + + + \ No newline at end of file diff --git a/errorpage/400.php b/errorpage/400.php new file mode 100644 index 0000000..eb8713f --- /dev/null +++ b/errorpage/400.php @@ -0,0 +1,54 @@ + + + + + + + + + + + +400 Bad Request - <?php echo file_get_contents($servernamefile);?> + + + + +
+ +
+ +
+ +
+
+ +
+

400 Bad Request

+

<(_ _)>
はいっ!エラーです!!!
原因はわかりません!!!!!!!!

+
+ + ホームへ行く + +
+ + + + + \ No newline at end of file diff --git a/errorpage/401.php b/errorpage/401.php new file mode 100644 index 0000000..badc804 --- /dev/null +++ b/errorpage/401.php @@ -0,0 +1,54 @@ + + + + + + + + + + + +401 Unauthorized - <?php echo file_get_contents($servernamefile);?> + + + + +
+ +
+ +
+ +
+
+ +
+

401 Unauthorized

+

...(* ̄0 ̄)ノ< アクセス権が無いようです()
サービス管理者によってアクセス権の変更をされた可能性がございます。

+
+ + ホームへ行く + +
+ + + + + \ No newline at end of file diff --git a/errorpage/403.php b/errorpage/403.php new file mode 100644 index 0000000..295bd00 --- /dev/null +++ b/errorpage/403.php @@ -0,0 +1,54 @@ + + + + + + + + + + + +403 Forbidden - <?php echo file_get_contents($servernamefile);?> + + + + +
+ +
+ +
+ +
+
+ +
+

403 Forbidden

+

...(* ̄0 ̄)ノ< 閲覧権限が無いようです()
サービス管理者によって閲覧権限の変更をされた可能性がございます。

+
+ + ホームへ行く + +
+ + + + + \ No newline at end of file diff --git a/errorpage/404.php b/errorpage/404.php new file mode 100644 index 0000000..b147077 --- /dev/null +++ b/errorpage/404.php @@ -0,0 +1,54 @@ + + + + + + + + + + + +404 Not found - <?php echo file_get_contents($servernamefile);?> + + + + +
+ +
+ +
+ +
+
+ +
+

404 Not found

+

申し訳ございませんがお探しのページは見つかりませんでした!
ページの移動や削除が行われた可能性がございます。

+
+ + ホームへ行く + +
+ + + + + \ No newline at end of file diff --git a/errorpage/500.php b/errorpage/500.php new file mode 100644 index 0000000..39a869b --- /dev/null +++ b/errorpage/500.php @@ -0,0 +1,54 @@ + + + + + + + + + + + +500 Internal Server Error - <?php echo file_get_contents($servernamefile);?> + + + + +
+ +
+ +
+ +
+
+ +
+

500 Internal Server Error

+

\(^o^)/
サーバーオワタ☆

+
+ + ホームへ行く + +
+ + + + + \ No newline at end of file diff --git a/errorpage/503.php b/errorpage/503.php new file mode 100644 index 0000000..1ac0fd9 --- /dev/null +++ b/errorpage/503.php @@ -0,0 +1,54 @@ + + + + + + + + + + + +503 Service Unavailable - <?php echo file_get_contents($servernamefile);?> + + + + +
+ +
+ +
+ +
+
+ +
+

503 Service Unavailable

+

(´。_。`;)< サーバーに過負荷がかかっているようです...
時間をおいてから再度アクセスしてください!

+
+ + ホームへ行く + +
+ + + + + \ No newline at end of file diff --git a/errorpage/serverstop.php b/errorpage/serverstop.php new file mode 100644 index 0000000..c5715ab --- /dev/null +++ b/errorpage/serverstop.php @@ -0,0 +1,89 @@ + + +

$1

', $markdownText); + + // 画像(#img)をHTMLのimgタグに変換 + $markdownText = preg_replace('/^#img (.+)/m', '', $markdownText); + + // タイトル(#、##、###)をHTMLのhタグに変換 + $markdownText = preg_replace('/^# (.+)/m', '

$1

', $markdownText); + $markdownText = preg_replace('/^## (.+)/m', '

$1

', $markdownText); + $markdownText = preg_replace('/^### (.+)/m', '

$1

', $markdownText); + + // 箇条書き(-)をHTMLのul/liタグに変換 + $markdownText = preg_replace('/^- (.+)/m', '
  • $1
', $markdownText); + + // 空行の前に何もない行をHTMLのpタグに変換 + $markdownText = preg_replace('/(^\s*)(?!\s)(.*)/m', '$1

$2

', $markdownText); + + return $markdownText; +} + +$sterms = explode("\n", $termsdata); +$htmltext = ''; // 初期化 + +foreach ($sterms as $terms) { + $markdowntext = $terms; + $convertedText = processMarkdownAndWrapEmptyLines($markdowntext); + $htmltext .= $convertedText . "\n"; // 変換されたテキストを追加 +} + + +?> + + + + + + + + +サーバー停止 - <?php echo file_get_contents($servernamefile);?> + + + + + +
+ +
+ +
+ +
+
+
+

サーバー停止中

+

(/´・ヮ・`\)
現在サーバーが管理者によって停止されています...
停止の理由は以下の通りです。

+ +
+

+ + +
+ +
+ + + + + \ No newline at end of file diff --git a/favicon/apple-touch-icon-180x180.png b/favicon/apple-touch-icon-180x180.png new file mode 100644 index 0000000..c1a7170 Binary files /dev/null and b/favicon/apple-touch-icon-180x180.png differ diff --git a/favicon/icon-192x192.png b/favicon/icon-192x192.png new file mode 100644 index 0000000..75777f7 Binary files /dev/null and b/favicon/icon-192x192.png differ diff --git a/favorite/favorite.php b/favorite/favorite.php new file mode 100644 index 0000000..f2b17fa --- /dev/null +++ b/favorite/favorite.php @@ -0,0 +1,57 @@ +prepare("SELECT favorite FROM ueuse WHERE uniqid = :uniqid"); + $stmt->bindValue(':uniqid', $postUniqid, PDO::PARAM_STR); + $stmt->execute(); + $post = $stmt->fetch(PDO::FETCH_ASSOC); + + if ($post) { + $favoriteList = explode(',', $post['favorite']); + $index = array_search($userId, $favoriteList); + + if ($index === false) { + // ユーザーIDを追加 + $favoriteList[] = $userId; + } else { + // ユーザーIDを削除 + array_splice($favoriteList, $index, 1); + } + + // 新しいいいね情報を更新 + $newFavorite = implode(',', $favoriteList); + $updateQuery = $pdo->prepare("UPDATE ueuse SET favorite = :favorite WHERE uniqid = :uniqid"); + $updateQuery->bindValue(':favorite', $newFavorite, PDO::PARAM_STR); + $updateQuery->bindValue(':uniqid', $postUniqid, PDO::PARAM_STR); + $res = $updateQuery->execute(); + + if ($res) { + echo json_encode(['success' => true, 'newFavorite' => $newFavorite]); + exit; + } else { + echo json_encode(['success' => false, 'error' => 'いいねの更新に失敗しました。']); + exit; + } + + + } else { + echo json_encode(['success' => false, 'error' => '投稿が見つかりません。']); + exit; + } + } catch(PDOException $e) { + echo json_encode(['success' => false, 'error' => 'データベースエラー:' . $e->getMessage()]); + exit; + } +} else { + echo json_encode(['success' => false, 'error' => '必要なパラメータが提供されていません。']); + exit; +} +?> diff --git a/home/index.php b/home/index.php new file mode 100644 index 0000000..793a49f --- /dev/null +++ b/home/index.php @@ -0,0 +1,612 @@ + PDO::ERRMODE_EXCEPTION, + PDO::MYSQL_ATTR_MULTI_STATEMENTS => false + ); + $pdo = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); + +} catch(PDOException $e) { + + // 接続エラーのときエラー内容を取得する + $error_message[] = $e->getMessage(); +} + +if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) { + + $passQuery = $pdo->prepare("SELECT username,userid,loginid,admin FROM account WHERE userid = :userid"); + $passQuery->bindValue(':userid', $_SESSION['userid']); + $passQuery->execute(); + $res = $passQuery->fetch(); + if(empty($res["userid"])){ + header("Location: ../login.php"); + exit; + }elseif($_SESSION['loginid'] === $res["loginid"]){ + // セッションに値をセット + $userid = $_SESSION['userid']; // セッションに格納されている値をそのままセット + $username = $_SESSION['username']; // セッションに格納されている値をそのままセット + $_SESSION['admin_login'] = true; + $_SESSION['userid'] = $userid; + $_SESSION['username'] = $username; + $_SESSION['loginid'] = $res["loginid"]; + setcookie('userid', $userid, time() + 60 * 60 * 24 * 14); + setcookie('username', $username, time() + 60 * 60 * 24 * 14); + setcookie('loginid', $res["loginid"], time() + 60 * 60 * 24 * 14); + setcookie('admin_login', true, time() + 60 * 60 * 24 * 14); + }else{ + header("Location: ../login.php"); + exit; + } + + +} elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) { + + $passQuery = $pdo->prepare("SELECT username,userid,loginid,admin FROM account WHERE userid = :userid"); + $passQuery->bindValue(':userid', $_COOKIE['userid']); + $passQuery->execute(); + $res = $passQuery->fetch(); + if(empty($res["userid"])){ + header("Location: ../login.php"); + exit; + }elseif($_COOKIE['loginid'] === $res["loginid"]){ + // セッションに値をセット + $userid = $_COOKIE['userid']; // クッキーから取得した値をセット + $username = $_COOKIE['username']; // クッキーから取得した値をセット + $_SESSION['admin_login'] = true; + $_SESSION['userid'] = $userid; + $_SESSION['username'] = $username; + $_SESSION['loginid'] = $res["loginid"]; + setcookie('userid', $userid, time() + 60 * 60 * 24 * 14); + setcookie('username', $username, time() + 60 * 60 * 24 * 14); + setcookie('loginid', $res["loginid"], time() + 60 * 60 * 24 * 14); + setcookie('admin_login', true, time() + 60 * 60 * 24 * 14); + }else{ + header("Location: ../login.php"); + exit; + } + + +} else { + // ログインが許可されていない場合、ログインページにリダイレクト + header("Location: ../login.php"); + exit; +} +if(empty($userid)){ + header("Location: ../login.php"); + exit; +} +if(empty($username)){ + header("Location: ../login.php"); + exit; +} + +//------------------------------------------- + +if( !empty($_POST['btn_submit']) ) { + + $ueuse = $_POST['ueuse']; + + // メッセージの入力チェック + if( empty($ueuse) ) { + $error_message[] = '内容を入力してください。'; + } else { + // 文字数を確認 + if( 1024 < mb_strlen($ueuse, 'UTF-8') ) { + $error_message[] = '内容は1024文字以内で入力してください。'; + } + } + + + if (empty($_FILES['upload_images']['name'])) { + $photo1 = "none"; + } else { + // アップロードされたファイル情報 + $uploadedFile = $_FILES['upload_images']; + + // アップロードされたファイルの拡張子を取得 + $extension = pathinfo($uploadedFile['name'], PATHINFO_EXTENSION); + + // 新しいファイル名を生成(uniqid + 拡張子) + $newFilename = uniqid() . '-'.$userid.'.' . $extension; + + // 保存先のパスを生成 + $uploadedPath = '../ueuseimages/' . $newFilename; + + // ファイルを移動 + $result = move_uploaded_file($uploadedFile['tmp_name'], $uploadedPath); + + if ($result) { + $photo1 = $uploadedPath; // 保存されたファイルのパスを使用 + } else { + $error_message[] = 'アップロード失敗!(1)エラーコード:' . $uploadedFile['error'].'
'.var_dump($_FILES['upload_images']); + } + } + + if (empty($_FILES['upload_images2']['name'])) { + $photo2 = "none"; + } else { + + if (empty($_FILES['upload_images']['name'])){ + $error_message[] = '画像1から画像を選択してください!!!'; + } + // アップロードされたファイル情報 + $uploadedFile2 = $_FILES['upload_images2']; + + if( 10000000 < $uploadedFile2["size"] ) { + $error_message[] = 'ファイルサイズが大きすぎます!'; + } + // アップロードされたファイルの拡張子を取得 + $extension2 = pathinfo($uploadedFile2['name'], PATHINFO_EXTENSION); + + // 新しいファイル名を生成(uniqid + 拡張子) + $newFilename2 = uniqid() . '-'.$userid.'.' . $extension2; + + // 保存先のパスを生成 + $uploadedPath2 = '../ueuseimages/' . $newFilename2; + + // ファイルを移動 + $result2 = move_uploaded_file($uploadedFile2['tmp_name'], $uploadedPath2); + + if ($result2) { + $photo2 = $uploadedPath2; // 保存されたファイルのパスを使用 + } else { + $error_message[] = 'アップロード失敗!(2)エラーコード:' . $uploadedFile2['error'].'
'.var_dump($_FILES['upload_images']); + } + } + + if (empty($_FILES['upload_videos1']['name'])) { + $video1 = "none"; + } else { + // アップロードされたファイル情報 + $uploadedFile3 = $_FILES['upload_videos1']; + + // アップロードされたファイルの拡張子を取得 + $extension3 = strtolower(pathinfo($uploadedFile3['name'], PATHINFO_EXTENSION)); // 小文字に変換 + + // サポートされている動画フォーマットの拡張子を配列で定義 + $supportedExtensions = array("mp4", "avi", "mov", "webm"); + + if (in_array($extension3, $supportedExtensions)) { + // 正しい拡張子の場合、新しいファイル名を生成 + $newFilename3 = uniqid() . '-'.$userid.'.' . $extension3; + // 保存先のパスを生成 + $uploadedPath3 = '../ueusevideos/' . $newFilename3; + + // ファイルを移動 + $result3 = move_uploaded_file($uploadedFile3['tmp_name'], $uploadedPath3); + + if ($result3) { + $video1 = $uploadedPath3; // 保存されたファイルのパスを使用 + } else { + $error_message[] = 'アップロード失敗!エラーコード:' . $uploadedFile3['error']; + } + } else { + $error_message[] = '対応していないファイル形式です!'; + } + + + } + + if( empty($error_message) ) { + + // 書き込み日時を取得 + $datetime = date("Y-m-d H:i:s"); + $uniqid = createUniqId(); + $abi = "none"; + + // トランザクション開始 + $pdo->beginTransaction(); + + try { + + // SQL作成 + $stmt = $pdo->prepare("INSERT INTO ueuse (username, account, uniqid, ueuse, photo1, photo2, video1, datetime, abi) VALUES (:username, :account, :uniqid, :ueuse, :photo1, :photo2, :video1, :datetime, :abi)"); + + $stmt->bindParam(':username', $username, PDO::PARAM_STR); + $stmt->bindParam(':account', $userid, PDO::PARAM_STR); + $stmt->bindParam(':uniqid', $uniqid, PDO::PARAM_STR); + $stmt->bindParam(':ueuse', $ueuse, PDO::PARAM_STR); + + $stmt->bindParam(':photo1', $photo1, PDO::PARAM_STR); + $stmt->bindParam(':photo2', $photo2, PDO::PARAM_STR); + $stmt->bindParam(':video1', $video1, PDO::PARAM_STR); + $stmt->bindParam(':datetime', $datetime, PDO::PARAM_STR); + + $stmt->bindParam(':abi', $abi, PDO::PARAM_STR); + + // SQLクエリの実行 + $res = $stmt->execute(); + + // コミット + $res = $pdo->commit(); + + } catch(Exception $e) { + + // エラーが発生した時はロールバック + $pdo->rollBack(); + } + + if( $res ) { + $url = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; + header("Location:".$url.""); + exit; + } else { + $error_message[] = $e->getMessage(); + } + + // プリペアドステートメントを削除 + $stmt = null; + } +} + + + +if( !empty($_POST['logout']) ) { + if (isset($_SERVER['HTTP_COOKIE'])) { + $cookies = explode(';', $_SERVER['HTTP_COOKIE']); + foreach($cookies as $cookie) { + $parts = explode('=', $cookie); + $name = trim($parts[0]); + setcookie($name, '', time()-1000); + setcookie($name, '', time()-1000, '/'); + } + } + // リダイレクト先のURLへ転送する + $url = '../index.php'; + header('Location: ' . $url, true, 303); + + // すべての出力を終了 + exit; +} + + + + +// データベースの接続を閉じる +$pdo = null; + +?> + + + + + + + + + + + +ホーム - <?php echo file_get_contents($servernamefile);?> + + + + + + + +
+ + +
    + +

    + +
+ +
+
+ +

画像のEXIF情報(位置情報など)は削除されません。
情報漏洩に気をつけてくださいね…

+
+ + + + + +
+
+
+ + +
+
+ + +
+
+ + + +
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/home/tlimage.php b/home/tlimage.php new file mode 100644 index 0000000..2e4998b --- /dev/null +++ b/home/tlimage.php @@ -0,0 +1,78 @@ + PDO::ERRMODE_EXCEPTION, + PDO::MYSQL_ATTR_MULTI_STATEMENTS => false +); +$pdo = new PDO('mysql:charset=UTF8;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); + + +//$row['userid'] = "daichimarukn"; + +$userid = $_GET['account']; + + +$options = array( + // SQL実行失敗時に例外をスルー + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + // デフォルトフェッチモードを連想配列形式に設定 + PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, + // バッファードクエリを使う(一度に結果セットを全て取得し、サーバー負荷を軽減) + // SELECTで得た結果に対してもrowCountメソッドを使えるようにする + PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true, +); + +if( empty($userid) ) { + $filePath = 'img/deficon/icon.png'; + $data = file_get_contents($filePath); + header('Content-type: image/png'); + //データを出力 + echo $data; + exit(); +}else{ + $dbh = new PDO('mysql:charset=UTF8;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); + + + $result = $dbh->prepare("SELECT iconname, iconcontent, icontype, iconsize profile FROM account WHERE userid = :userid"); + + $result->bindValue(':userid', $userid); + // SQL実行 + $result->execute(); + + + $row = $result->fetch(); // ここでデータベースから取得した値を $row に代入する + + + + header('Content-type: ' . $row['icontype']); + echo $row['iconcontent']; + exit(); +} \ No newline at end of file diff --git a/image.php b/image.php new file mode 100644 index 0000000..e40c66d --- /dev/null +++ b/image.php @@ -0,0 +1,77 @@ + PDO::ERRMODE_EXCEPTION, + PDO::MYSQL_ATTR_MULTI_STATEMENTS => false +); +$pdo = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); + + +//$row['userid'] = "daichimarukn"; + +$userid = $_SESSION['userid']; + + +$options = array( + // SQL実行失敗時に例外をスルー + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + // デフォルトフェッチモードを連想配列形式に設定 + PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, + // バッファードクエリを使う(一度に結果セットを全て取得し、サーバー負荷を軽減) + // SELECTで得た結果に対してもrowCountメソッドを使えるようにする + PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true, +); + +if( empty($userid) ) { + $filePath = 'img/deficon/icon.png'; + $data = file_get_contents($filePath); + header('Content-type: image/png'); + //データを出力 + echo $data; + exit(); +}else{ + $dbh = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); + + + $result = $dbh->prepare("SELECT iconname, iconcontent, icontype, iconsize profile FROM account WHERE userid = :userid"); + + $result->bindValue(':userid', $userid); + // SQL実行 + $result->execute(); + + + $row = $result->fetch(); // ここでデータベースから取得した値を $row に代入する + + + + header('Content-type: ' . $row['icontype']); + echo $row['iconcontent']; + exit(); +} \ No newline at end of file diff --git a/img/defhead/head.png b/img/defhead/head.png new file mode 100644 index 0000000..2f65be7 Binary files /dev/null and b/img/defhead/head.png differ diff --git a/img/deficon/head.png b/img/deficon/head.png new file mode 100644 index 0000000..2f65be7 Binary files /dev/null and b/img/deficon/head.png differ diff --git a/img/deficon/icon.png b/img/deficon/icon.png new file mode 100644 index 0000000..f921346 Binary files /dev/null and b/img/deficon/icon.png differ diff --git a/img/logoback.png b/img/logoback.png new file mode 100644 index 0000000..7457ce3 Binary files /dev/null and b/img/logoback.png differ diff --git a/img/motto.svg b/img/motto.svg new file mode 100644 index 0000000..e7e07b2 --- /dev/null +++ b/img/motto.svg @@ -0,0 +1,32 @@ + + + + + + + + + + + diff --git a/img/sysimage/favorite_1.svg b/img/sysimage/favorite_1.svg new file mode 100644 index 0000000..17aea16 --- /dev/null +++ b/img/sysimage/favorite_1.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/img/sysimage/favorite_2.svg b/img/sysimage/favorite_2.svg new file mode 100644 index 0000000..04c6a67 --- /dev/null +++ b/img/sysimage/favorite_2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/img/sysimage/image_1.svg b/img/sysimage/image_1.svg new file mode 100644 index 0000000..3dd8f5a --- /dev/null +++ b/img/sysimage/image_1.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/img/sysimage/video_1.svg b/img/sysimage/video_1.svg new file mode 100644 index 0000000..1d9d64f --- /dev/null +++ b/img/sysimage/video_1.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/img/titleimg/0.png b/img/titleimg/0.png new file mode 100644 index 0000000..b1ccf4b Binary files /dev/null and b/img/titleimg/0.png differ diff --git a/img/titleimg/1.png b/img/titleimg/1.png new file mode 100644 index 0000000..134f164 Binary files /dev/null and b/img/titleimg/1.png differ diff --git a/img/titleimg/2.png b/img/titleimg/2.png new file mode 100644 index 0000000..525a3ea Binary files /dev/null and b/img/titleimg/2.png differ diff --git a/img/uwuzucolorlogo.svg b/img/uwuzucolorlogo.svg new file mode 100644 index 0000000..e2f3880 --- /dev/null +++ b/img/uwuzucolorlogo.svg @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/img/uwuzulogo.svg b/img/uwuzulogo.svg new file mode 100644 index 0000000..e9cd4cb --- /dev/null +++ b/img/uwuzulogo.svg @@ -0,0 +1,195 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/index.php b/index.php new file mode 100644 index 0000000..4eb65e7 --- /dev/null +++ b/index.php @@ -0,0 +1,145 @@ + + + PDO::ERRMODE_EXCEPTION, + PDO::MYSQL_ATTR_MULTI_STATEMENTS => false + ); + $pdo = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); + + $stmt = $pdo->prepare("SELECT COUNT(userid) FROM account"); + $stmt->execute(); + $count2 = $stmt->fetchColumn(); + + +} catch(PDOException $e) { + + // 接続エラーのときエラー内容を取得する + $error_message[] = $e->getMessage(); +} + +mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); +$mysqli = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME); + +$result = $mysqli->query("SELECT userid FROM account ORDER BY datetime"); + +/* 結果セットの行数を取得します */ +$count1 = $result->num_rows; + +$result2 = $mysqli->query("SELECT uniqid FROM ueuse ORDER BY datetime"); + +/* 結果セットの行数を取得します */ +$count2 = $result2->num_rows; + +?> + + + + + + + + + + +<?php echo file_get_contents($servernamefile);?> + + + + + + + + + +
+ + +
+ + +
    + +

    + +
+ + +

へようこそ!

+
+
+ +

'; + }?>

+ + お問い合わせ : + +
+
+
ユーザー数
+

"?>

+
+
+
投稿数
+

"?>

+
+
+ + + + +
+
+ + + + \ No newline at end of file diff --git a/js/back.js b/js/back.js new file mode 100644 index 0000000..8778eb1 --- /dev/null +++ b/js/back.js @@ -0,0 +1,6 @@ + +window.onload = function(){ +var ele = document.getElementsByTagName("body")[0]; +var n = Math.floor(Math.random() * 3); // 3枚の画像がある場合 +ele.style.backgroundImage = "url(img/titleimg/"+n+".png)"; +} diff --git a/login.php b/login.php new file mode 100644 index 0000000..99f46c1 --- /dev/null +++ b/login.php @@ -0,0 +1,205 @@ + PDO::ERRMODE_EXCEPTION, + PDO::MYSQL_ATTR_MULTI_STATEMENTS => false + ); + $pdo = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); + +} catch(PDOException $e) { + + // 接続エラーのときエラー内容を取得する + $error_message[] = $e->getMessage(); +} + +if( !empty($_POST['btn_submit']) ) { + + + //$row['userid'] = "daichimarukn"; + + $userid = $_POST['userid']; + $password = $_POST['password']; + + + $options = array( + // SQL実行失敗時に例外をスルー + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + // デフォルトフェッチモードを連想配列形式に設定 + PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, + // バッファードクエリを使う(一度に結果セットを全て取得し、サーバー負荷を軽減) + // SELECTで得た結果に対してもrowCountメソッドを使えるようにする + PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true, + ); + + $dbh = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); + + + $result = $dbh->prepare("SELECT userid, password, loginid FROM account WHERE userid = :userid"); + + $result->bindValue(':userid', $userid); + // SQL実行 + $result->execute(); + + + + // ... (前略) + // IDの入力チェック + if( empty($userid) ) { + $error_message[] = 'ユーザーIDを入力してください。'; + } else { + + if( empty($password) ) { + $error_message[] = 'パスワードを入力してください。'; + } else { + + if($result->rowCount() > 0) { + $row = $result->fetch(); // ここでデータベースから取得した値を $row に代入する + + if($row["userid"] == $userid){ + if(password_verify($password,$row["password"])){ + $_SESSION['admin_login'] = true; + + $_SESSION['userid'] = $userid; + $_SESSION['loginid'] = $row["loginid"]; + // リダイレクト先のURLへ転送する + $url = 'check.php'; + header('Location: ' . $url, true, 303); + + // すべての出力を終了 + exit; + } + else{ + $error_message[] = 'IDまたはパスワードが違います'; + } + }else{ + $error_message[] = 'IDまたはパスワードが違います'; + } + } + else { + $error_message[] = 'IDまたはパスワードが違います'; + } + } + + } + + // ... (後略) + + + +} + +// データベースの接続を閉じる +$pdo = null; + +?> + + + + + + + + +ログイン - <?php echo file_get_contents($servernamefile);?> + + + + + +
+ + +
+

ログイン

+ +

IDとパスワードを入力してください!

+ + +
    + +

    + +
+ + +
+ +
+ + +
+ + + +
+ + +
+ + +
+ +
+ 戻る +
+
+
+ + + + + + + \ No newline at end of file diff --git a/manifest/icon-512x512.png b/manifest/icon-512x512.png new file mode 100644 index 0000000..1b19c27 Binary files /dev/null and b/manifest/icon-512x512.png differ diff --git a/manifest/manifest.json b/manifest/manifest.json new file mode 100644 index 0000000..cd71091 --- /dev/null +++ b/manifest/manifest.json @@ -0,0 +1,15 @@ +{ + "short_name": "uwuzu", + "name": "uwuzu", + "theme_color": "#FFC832", + "background_color": "#FFC832", + "display": "standalone", + "start_url": "../index.php", + "icons": [ + { + "src": "icon-512x512.png", + "sizes": "512x512", + "type": "image/png" + } + ] +} \ No newline at end of file diff --git a/new.php b/new.php new file mode 100644 index 0000000..382078e --- /dev/null +++ b/new.php @@ -0,0 +1,498 @@ + PDO::ERRMODE_EXCEPTION, + PDO::MYSQL_ATTR_MULTI_STATEMENTS => false + ); + $pdo = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); + +} catch(PDOException $e) { + + // 接続エラーのときエラー内容を取得する + $error_message[] = $e->getMessage(); +} + +if( !empty($_POST['btn_submit']) ) { + + + //$row['userid'] = "daichimarukn"; + + // 空白除去 + $username = $_POST['username']; + $userid = $_POST['userid']; + + $password = $_POST['password']; + $chkpass = $_POST['chkpass']; + $mailadds = $_POST['mailadds']; + + $profile = $_POST['profile']; + + + //cookieに保存 + setcookie("username",$username,time()+60*60*24*14); + setcookie("userid",$userid,time()+60*60*24*14); + + setcookie("password",$password,time()+60*60*24*14); + setcookie("mailadds",$mailadds,time()+60*60*24*14); + + setcookie("profile",$profile,time()+60*60*24*14); + + if (!empty($_FILES['image']['name'])) { + $img = $_FILES['image']; + }else{ + $localFilePath = 'img/deficon/icon.png'; + $img = [ + 'name' => 'deficon.png', + 'type' => 'image/png', // 仮の Content-Type を指定(必要に応じて適切なものに変更してください) + 'tmp_name' => $localFilePath, + 'error' => 0, + 'size' => filesize($localFilePath) + ]; + } + + $localFilePathhead = 'img/defhead/head.png'; + $headimg = [ + 'name' => 'defhead.png', + 'type' => 'image/png', // 仮の Content-Type を指定(必要に応じて適切なものに変更してください) + 'tmp_name' => $localFilePathhead, + 'error' => 0, + 'size' => filesize($localFilePathhead) + ]; + + + + $options = array( + // SQL実行失敗時に例外をスルー + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + // デフォルトフェッチモードを連想配列形式に設定 + PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, + // バッファードクエリを使う(一度に結果セットを全て取得し、サーバー負荷を軽減) + // SELECTで得た結果に対してもrowCountメソッドを使えるようにする + PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true, + ); + + $dbh = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); + + + $query = $dbh->prepare('SELECT * FROM account WHERE userid = :userid limit 1'); + + $query->execute(array(':userid' => $userid)); + + $result = $query->fetch(); + + + // ユーザーネームの入力チェック + if( empty($username) ) { + $error_message[] = '表示名を入力してください。'; + } else { + // 文字数を確認 + if( 25 < mb_strlen($username, 'UTF-8') ) { + $error_message[] = 'ユーザーネームは25文字以内で入力してください。'; + } + } + + // IDの入力チェック + if( empty($userid) ) { + $error_message[] = 'ユーザーIDを入力してください。'; + } else { + + // 文字数を確認 + if( 20 < mb_strlen($userid, 'UTF-8') ) { + $error_message[] = 'IDは20文字以内で入力してください。'; + } + + if($userid === 'uwuzu_official'){ + $error_message[] = 'そのIDは登録禁止になっています。'; + } + + if($result > 0){ + $error_message[] = 'このID('.$userid.')は既に使用されています。他のIDを作成してください。'; //このE-mailは既に使用されています。 + } + + } + + // パスワードの入力チェック + if( empty($password) ) { + $error_message[] = 'パスワードを入力してください。'; + } else { + + $weakPasswords = array( + "password", + "123456", + "123456789", + "12345", + "12345678", + "123123", + "1234567890", + "1234567", + "1q2w3e", + "qwerty123", + "aa12345678", + "password1", + "1234", + "qwertyuiop", + "123321", + "12321", + "qwertyui", + "abcd1234", + "zaq12wsx", + "1q2w3e4r", + "qwer1234", + "sakura", + "asdf1234", + "asdfghjkl", + "asdfghjk", + "member", + "1qaz2wsx", + "doraemon", + "makoto", + "takeshi", + "machi1", + "machida", + "machida1", + "tokyo", + "arashi", + "dropbox", + "twitter", + "elonmusk", + "xcorp", + "1234qwer", + "japan", + "nippon", + "tukareta", + "tweet", + "discord", + "misskey", + "qwerty", + "123456789", + "abc123", + "password123", + "admin", + "letmein", + "iloveyou", + "111111", + "12345678910", + "user", + "root", + "system", + // 他にも弱いパスワードを追加できます + ); + + function isWeakPassword($passwords) { + global $weakPasswords; + return in_array($passwords, $weakPasswords); + } + + // テスト用のパスワード(実際にはユーザー入力などから取得することになります。 + + if (isWeakPassword($password)) { + $error_message[] = "パスワードが弱いです。セキュリティ上変更してください。"; + } else { + + } + + if ($chkpass == $password ){ + + }else{ + $error_message[] = '確認用パスワードが違います。'; + } + + if( 4 > mb_strlen($password, 'UTF-8') ) { + $error_message[] = 'パスワードは4文字以上である必要があります。'; + } + + // 文字数を確認 + if( 100 < mb_strlen($password, 'UTF-8') ) { + $error_message[] = 'パスワードは100文字以内で入力してください。'; + } + } + + if( empty($error_message) ) { + // トランザクション開始 + $pdo->beginTransaction(); + $datetime = date("Y-m-d H:i:s"); + + try { + + $role = "user"; + $admin = "none"; + $hashpassword = password_hash($password, PASSWORD_DEFAULT); + $loginid = sha1(uniqid(mt_rand(), true)); + + // SQL作成 + $stmt = $pdo->prepare("INSERT INTO account (username, userid, password, loginid, mailadds, profile, iconname, iconcontent, icontype, iconsize, headname, headcontent, headtype, headsize, role, datetime, admin) VALUES (:username, :userid, :password, :loginid, :mailadds, :profile, :iconname, :iconcontent, :icontype, :iconsize, :headname, :headcontent, :headtype, :headsize, :role, :datetime, :admin )"); + + $iconName = $img['name']; + $iconType = $img['type']; + $iconContent = file_get_contents($img['tmp_name']); + $iconSize = $img['size']; + + // アイコン画像のバインド + $stmt->bindValue(':iconname', $iconName, PDO::PARAM_STR); + $stmt->bindValue(':icontype', $iconType, PDO::PARAM_STR); + $stmt->bindValue(':iconcontent', $iconContent, PDO::PARAM_STR); + $stmt->bindValue(':iconsize', $iconSize, PDO::PARAM_INT); + + // ヘッダー画像関連の処理 + $headName = $headimg['name']; + $headType = $headimg['type']; + $headContent = file_get_contents($headimg['tmp_name']); + $headSize = $headimg['size']; + + // ヘッダー画像のバインド + $stmt->bindValue(':headname', $headName, PDO::PARAM_STR); + $stmt->bindValue(':headtype', $headType, PDO::PARAM_STR); + $stmt->bindValue(':headcontent', $headContent, PDO::PARAM_STR); + $stmt->bindValue(':headsize', $headSize, PDO::PARAM_INT); + + // 他の値をセット + $stmt->bindParam(':username', $username, PDO::PARAM_STR); + $stmt->bindParam(':userid', $userid, PDO::PARAM_STR); + $stmt->bindParam(':password', $hashpassword, PDO::PARAM_STR); + $stmt->bindParam(':loginid', $loginid, PDO::PARAM_STR); + $stmt->bindParam(':mailadds', $mailadds, PDO::PARAM_STR); + $stmt->bindParam(':profile', $profile, PDO::PARAM_STR); + $stmt->bindParam(':role', $role, PDO::PARAM_STR); + $stmt->bindParam(':datetime', $datetime, PDO::PARAM_STR); + + $stmt->bindParam(':admin', $admin, PDO::PARAM_STR); + + // SQLクエリの実行 + $res = $stmt->execute(); + + // コミット + $res = $pdo->commit(); + + } catch (Exception $e) { + + // エラーが発生した時はロールバック + $pdo->rollBack(); + } + + if ($res) { + // リダイレクト先のURLへ転送する + $url = 'success.php'; + header('Location: ' . $url, true, 303); + + // すべての出力を終了 + exit; + } else { + $error_message[] = '登録に失敗しました。'; + } + + // プリペアドステートメントを削除 + $stmt = null; + } +} + +// データベースの接続を閉じる +$pdo = null; + +?> + + + + + + + + +アカウント登録 - <?php echo file_get_contents($servernamefile);?> + + + + + + + +
+ + +
+

アカウント登録

+ +

アカウント登録です。

+

必須項目には「*」があります。 + + +

    + +

    + +
+ + +
+ +
+
+ +
+ +
+ + + + +
+

ユーザーネーム *

+
プロフィールページに掲載され公開されます。
※サービス管理者が確認できます。
+ +
+
+

ユーザーID *

+
後から変更はできません。
プロフィールページに掲載され公開されます。
※サービス管理者が確認できます。
+ +
+ +
+

パスワード *

+
ログイン時に必要となります。
※サービス管理者が確認できません。
+ +
+ +
+

パスワード再確認 *

+ +
+ +
+

メールアドレス

+
設定しておくとアカウント復旧に利用できます。
※サービス管理者が確認できます。
+ +
+ +
+

プロフィール

+
プロフィールページに掲載され公開されます。
※サービス管理者が確認できます。
+ +
+ + + +

登録を押すと利用規約とプライバシーポリシーに同意したこととなります。
未確認の場合は上のボタンよりお読みください。

+ + + +
+ +
+ 戻る +
+
+ +
+ + + + + + + + \ No newline at end of file diff --git a/nextpage/nextpage.php b/nextpage/nextpage.php new file mode 100644 index 0000000..9270139 --- /dev/null +++ b/nextpage/nextpage.php @@ -0,0 +1,124 @@ + PDO::ERRMODE_EXCEPTION, + PDO::MYSQL_ATTR_MULTI_STATEMENTS => false + ); + $pdo = new PDO('mysql:charset=utf8mb4;dbname=' . DB_NAME . ';host=' . DB_HOST, DB_USER, DB_PASS, $option); +} catch (PDOException $e) { + // 接続エラーのときエラー内容を取得する + $error_message[] = $e->getMessage(); +} + +$userid = $_GET['userid']; + +$itemsPerPage = 30; // 1ページあたりのユーズ数 +$pageNumber = isset($_GET['page']) ? intval($_GET['page']) : 1; +$offset = ($pageNumber - 1) * $itemsPerPage; + +$messages = array(); + +if (!empty($pdo)) { + + function customStripTags($html, $allowedTags) { + $allowedTagString = implode('|', $allowedTags); + $pattern = "/<(?!$allowedTagString)[^>]+>/"; + return preg_replace($pattern, '', $html); + } + $allowedTags = array('h1', 'h2', 'h3', 'center', 'font'); + + // ユーズ内の絵文字を画像に置き換える + function replaceEmojisWithImages($postText) { + // ユーズ内で絵文字名(:emoji:)を検出して画像に置き換える + $pattern = '/:(\w+):/'; + $postTextWithImages = preg_replace_callback($pattern, function($matches) { + $emojiName = $matches[1]; + return "$emojiName"; + }, $postText); + return $postTextWithImages; + } + + function replaceURLsWithLinks($postText) { + // URLを正規表現を使って検出 + $pattern = '/(https?:\/\/[^\s]+)/'; + preg_match_all($pattern, $postText, $matches); + + // 検出したURLごとに処理を行う + foreach ($matches[0] as $url) { + // ドメイン部分を抽出 + $parsedUrl = parse_url($url); + $domain = isset($parsedUrl['host']) ? $parsedUrl['host'] : ''; + + // ドメインのみを表示するaタグを生成 + $link = "$domain"; + + // URLをドメインのみを表示するaタグで置き換え + $postText = str_replace($url, $link, $postText); + } + + return $postText; + } + + + $sql = "SELECT account, username, uniqid, rpuniqid, ueuse, datetime, photo1, photo2, video1, favorite, abi, abidate FROM ueuse WHERE rpuniqid = '' ORDER BY datetime DESC LIMIT $offset, $itemsPerPage"; + $message_array = $pdo->query($sql); + + while ($row = $message_array->fetch(PDO::FETCH_ASSOC)) { + + $messages[] = $row; + } + + // ユーザー情報を取得して、$messages内のusernameをuserDataのusernameに置き換える + foreach ($messages as &$message) { + $userQuery = $pdo->prepare("SELECT username, userid, profile, role FROM account WHERE userid = :userid"); + $userQuery->bindValue(':userid', $message["account"]); + $userQuery->execute(); + $userData = $userQuery->fetch(); + + if ($userData) { + $message['username'] = $userData['username']; + } + } + + // ユーズ内のHTMLコードに指定のタグを有効化する関数 + function replaceUnescapedHTMLTags($html) { + $allowedTags = array('h1', 'h2', 'h3', 'center', 'font'); // 有効化するタグ + return customStripTags($html, $allowedTags); + } + + if(!empty($messages)){ + foreach ($messages as $value) { + + $fav = $value['favorite']; // コンマで区切られたユーザーIDを含む変数 + + // コンマで区切って配列に分割し、要素数を数える + $favIds = explode(',', $fav); + $value["favcnt"] = count($favIds)-1; + + $messageDisplay = new MessageDisplay($value, $userid); // $userid をコンストラクタに渡す + $messageDisplay->display(); + } + }else{ + echo '

ユーズがありません

'; + } + + $pdo = null; + +} + +?> diff --git a/nextpage/notification.php b/nextpage/notification.php new file mode 100644 index 0000000..c5b710e --- /dev/null +++ b/nextpage/notification.php @@ -0,0 +1,63 @@ + PDO::ERRMODE_EXCEPTION, + PDO::MYSQL_ATTR_MULTI_STATEMENTS => false + ); + $pdo = new PDO('mysql:charset=utf8mb4;dbname=' . DB_NAME . ';host=' . DB_HOST, DB_USER, DB_PASS, $option); +} catch (PDOException $e) { + // 接続エラーのときエラー内容を取得する + $error_message[] = $e->getMessage(); +} + +$userid = $_GET['userid']; + +$itemsPerPage = 30; // 1ページあたりの投稿数 +$pageNumber = isset($_GET['page']) ? intval($_GET['page']) : 1; +$offset = ($pageNumber - 1) * $itemsPerPage; + +$messages = array(); + +if (!empty($pdo)) { + + $dbh = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST, DB_USER, DB_PASS, array( + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, + PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true, + )); + + $messageQuery = $dbh->prepare("SELECT title,msg,url,datetime,userchk FROM notification WHERE touserid = :userid ORDER BY datetime DESC LIMIT $offset, $itemsPerPage"); + $messageQuery->bindValue(':userid', $userid); + $messageQuery->execute(); + $message_array = $messageQuery->fetchAll(); + + if (!empty($message_array)) { + foreach ($message_array as $value) { + $messageDisplay = new MessageDisplay($value); // userid を渡さない + $messageDisplay->display(); + } + } else { + echo '

通知はありません

'; + } + + + $pdo = null; + +} + +?> diff --git a/nextpage/notificationview.php b/nextpage/notificationview.php new file mode 100644 index 0000000..8a94294 --- /dev/null +++ b/nextpage/notificationview.php @@ -0,0 +1,32 @@ +value = $value; + } + + public function display() { + echo '
'; + echo '
'; + + echo '
'; + $day = date("Ymd", strtotime(htmlspecialchars($this->value['datetime']))); + if ($day == date("Ymd")) { + echo date("今日 H:i", strtotime(htmlspecialchars($this->value['datetime']))); + } else { + echo date("Y年m月d日 H:i", strtotime(htmlspecialchars($this->value['datetime']))); + } + echo '
'; + + echo '
'; + + // 投稿内のHTMLコードを表示する部分 + echo '

' . htmlspecialchars($this->value['title']) . '

'; + echo '

' . htmlspecialchars($this->value['msg']) . '

'; + echo ' 続きをみる'; + + echo '
'; + } +} +?> diff --git a/nextpage/searchpage.php b/nextpage/searchpage.php new file mode 100644 index 0000000..c14d434 --- /dev/null +++ b/nextpage/searchpage.php @@ -0,0 +1,131 @@ + PDO::ERRMODE_EXCEPTION, + PDO::MYSQL_ATTR_MULTI_STATEMENTS => false + ); + $pdo = new PDO('mysql:charset=utf8mb4;dbname=' . DB_NAME . ';host=' . DB_HOST, DB_USER, DB_PASS, $option); +} catch (PDOException $e) { + // 接続エラーのときエラー内容を取得する + $error_message[] = $e->getMessage(); +} + + +$keyword = isset($_GET['keyword']) ? $_GET['keyword'] : ''; +$userid = $_GET['userid']; + +$messages = array(); + +if (!empty($pdo)) { + + $dbh = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST, DB_USER, DB_PASS, array( + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, + PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true, + )); + + $messageQuery = $dbh->prepare("SELECT account,username,ueuse,uniqid,rpuniqid,datetime,photo1,photo2,video1,favorite, abi, abidate FROM ueuse WHERE ueuse LIKE :keyword OR abi LIKE :keyword ORDER BY datetime DESC"); + $messageQuery->bindValue(':keyword', '%' . $keyword . '%', PDO::PARAM_STR); + $messageQuery->execute(); + $message_array = $messageQuery->fetchAll(); + + function customStripTags($html, $allowedTags) { + $allowedTagString = implode('|', $allowedTags); + $pattern = "/<(?!$allowedTagString)[^>]+>/"; + return preg_replace($pattern, '', $html); + } + $allowedTags = array('h1', 'h2', 'h3', 'center', 'font'); + + // ユーズ内の絵文字を画像に置き換える + function replaceEmojisWithImages($postText) { + // ユーズ内で絵文字名(:emoji:)を検出して画像に置き換える + $pattern = '/:(\w+):/'; + $postTextWithImages = preg_replace_callback($pattern, function($matches) { + $emojiName = $matches[1]; + return "$emojiName"; + }, $postText); + return $postTextWithImages; + } + + function replaceURLsWithLinks($postText) { + // URLを正規表現を使って検出 + $pattern = '/(https?:\/\/[^\s]+)/'; + preg_match_all($pattern, $postText, $matches); + + // 検出したURLごとに処理を行う + foreach ($matches[0] as $url) { + // ドメイン部分を抽出 + $parsedUrl = parse_url($url); + $domain = isset($parsedUrl['host']) ? $parsedUrl['host'] : ''; + + // ドメインのみを表示するaタグを生成 + $link = "$domain"; + + // URLをドメインのみを表示するaタグで置き換え + $postText = str_replace($url, $link, $postText); + } + + return $postText; + } + + + + + $messages = array(); + foreach ($message_array as $row) { + $messages[] = $row; + } + // ユーザー情報を取得して、$messages内のusernameをuserDataのusernameに置き換える + foreach ($messages as &$message) { + $userQuery = $pdo->prepare("SELECT username, userid, profile, role FROM account WHERE userid = :userid"); + $userQuery->bindValue(':userid', $message["account"]); + $userQuery->execute(); + $userData = $userQuery->fetch(); + + if ($userData) { + $message['username'] = $userData['username']; + } + } + + // ユーズ内のHTMLコードに指定のタグを有効化する関数 + function replaceUnescapedHTMLTags($html) { + $allowedTags = array('h1', 'h2', 'h3', 'center', 'font'); // 有効化するタグ + return customStripTags($html, $allowedTags); + } + + if(!empty($messages)){ + foreach ($messages as $value) { + + $fav = $value['favorite']; // コンマで区切られたユーザーIDを含む変数 + + // コンマで区切って配列に分割し、要素数を数える + $favIds = explode(',', $fav); + $value["favcnt"] = count($favIds)-1; + + $messageDisplay = new MessageDisplay($value, $userid); + $messageDisplay->display(); + } + }else{ + echo '

ユーズがありません

'; + } + + $pdo = null; + +} + +?> diff --git a/nextpage/ueusepage.php b/nextpage/ueusepage.php new file mode 100644 index 0000000..7de81e8 --- /dev/null +++ b/nextpage/ueusepage.php @@ -0,0 +1,139 @@ + PDO::ERRMODE_EXCEPTION, + PDO::MYSQL_ATTR_MULTI_STATEMENTS => false + ); + $pdo = new PDO('mysql:charset=utf8mb4;dbname=' . DB_NAME . ';host=' . DB_HOST, DB_USER, DB_PASS, $option); +} catch (PDOException $e) { + // 接続エラーのときエラー内容を取得する + $error_message[] = $e->getMessage(); +} + +$userid = $_GET['userid']; + +$ueuseid = isset($_GET['id']) ? $_GET['id'] : ''; + +$itemsPerPage = 30; // 1ページあたりの投稿数 +$pageNumber = isset($_GET['page']) ? intval($_GET['page']) : 1; +$offset = ($pageNumber - 1) * $itemsPerPage; + +$messages = array(); + +if (!empty($pdo)) { + + + // データベース接続の設定 + $dbh = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST, DB_USER, DB_PASS, array( + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, + PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true, + )); + + + + function customStripTags($html, $allowedTags) { + $allowedTagString = implode('|', $allowedTags); + $pattern = "/<(?!$allowedTagString)[^>]+>/"; + return preg_replace($pattern, '', $html); + } + $allowedTags = array('h1', 'h2', 'h3', 'center', 'font'); + // 投稿内の絵文字を画像に置き換える + function replaceEmojisWithImages($postText) { + // 投稿内で絵文字名(:emoji:)を検出して画像に置き換える + $pattern = '/:(\w+):/'; + $postTextWithImages = preg_replace_callback($pattern, function($matches) { + $emojiName = $matches[1]; + return "$emojiName"; + }, $postText); + return $postTextWithImages; + } + + function replaceURLsWithLinks($postText) { + // URLを正規表現を使って検出 + $pattern = '/(https?:\/\/[^\s]+)/'; + preg_match_all($pattern, $postText, $matches); + + // 検出したURLごとに処理を行う + foreach ($matches[0] as $url) { + // ドメイン部分を抽出 + $parsedUrl = parse_url($url); + $domain = isset($parsedUrl['host']) ? $parsedUrl['host'] : ''; + + // ドメインのみを表示するaタグを生成 + $link = "$domain"; + + // URLをドメインのみを表示するaタグで置き換え + $postText = str_replace($url, $link, $postText); + } + + return $postText; + } + + // 投稿内容の取得(新しい順に取得) + $messageQuery = $dbh->prepare("SELECT account, username, ueuse, uniqid, rpuniqid, datetime, photo1, photo2, video1, favorite, abi, abidate FROM ueuse WHERE uniqid = :ueuseid OR rpuniqid = :rpueuseid ORDER BY datetime ASC LIMIT $offset, $itemsPerPage"); + $messageQuery->bindValue(':ueuseid', $ueuseid); + $messageQuery->bindValue(':rpueuseid', $ueuseid); + $messageQuery->execute(); + $message_array = $messageQuery->fetchAll(); + + $messages = array(); + + + + foreach ($message_array as $row) { + $messages[] = $row; + } + // ユーザー情報を取得して、$messages内のusernameをuserDataのusernameに置き換える + foreach ($messages as &$message) { + $userQuery = $pdo->prepare("SELECT username, userid, profile, role FROM account WHERE userid = :userid"); + $userQuery->bindValue(':userid', $message["account"]); + $userQuery->execute(); + $userData = $userQuery->fetch(); + + if ($userData) { + $message['username'] = $userData['username']; + } + } + + // 投稿内のHTMLコードに指定のタグを有効化する関数 + function replaceUnescapedHTMLTags($html) { + $allowedTags = array('h1', 'h2', 'h3', 'center', 'font'); // 有効化するタグ + return customStripTags($html, $allowedTags); + } + + if(!empty($messages)){ + foreach ($messages as $value) { + $fav = $value['favorite']; // コンマで区切られたユーザーIDを含む変数 + + // コンマで区切って配列に分割し、要素数を数える + $favIds = explode(',', $fav); + $value["favcnt"] = count($favIds)-1; + + $messageDisplay = new MessageDisplay($value, $userid); + $messageDisplay->display(); + } + }else{ + echo '

投稿がありません

'; + } + + $pdo = null; + +} + +?> diff --git a/nextpage/userpage.php b/nextpage/userpage.php new file mode 100644 index 0000000..7e5699d --- /dev/null +++ b/nextpage/userpage.php @@ -0,0 +1,140 @@ + PDO::ERRMODE_EXCEPTION, + PDO::MYSQL_ATTR_MULTI_STATEMENTS => false + ); + $pdo = new PDO('mysql:charset=utf8mb4;dbname=' . DB_NAME . ';host=' . DB_HOST, DB_USER, DB_PASS, $option); +} catch (PDOException $e) { + // 接続エラーのときエラー内容を取得する + $error_message[] = $e->getMessage(); +} + + +$uwuzuid = isset($_GET['id']) ? $_GET['id'] : ''; +$userid = $_GET['userid']; + +$itemsPerPage = 30; // 1ページあたりのユーズ数 +$pageNumber = isset($_GET['page']) ? intval($_GET['page']) : 1; +$offset = ($pageNumber - 1) * $itemsPerPage; + +$messages = array(); + +if (!empty($pdo)) { + + $dbh = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST, DB_USER, DB_PASS, array( + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, + PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true, + )); + + $userQuery = $dbh->prepare("SELECT username, userid, profile, role, follower FROM account WHERE userid = :userid"); + $userQuery->bindValue(':userid', $uwuzuid); + $userQuery->execute(); + $userData = $userQuery->fetch(); + + $messageQuery = $dbh->prepare("SELECT account,username,ueuse,uniqid,rpuniqid,datetime,photo1,photo2,video1,favorite, abi, abidate FROM ueuse WHERE account = :userid AND rpuniqid = ''ORDER BY datetime DESC LIMIT $offset, $itemsPerPage"); + $messageQuery->bindValue(':userid', $uwuzuid); + $messageQuery->execute(); + $message_array = $messageQuery->fetchAll(); + + function customStripTags($html, $allowedTags) { + $allowedTagString = implode('|', $allowedTags); + $pattern = "/<(?!$allowedTagString)[^>]+>/"; + return preg_replace($pattern, '', $html); + } + $allowedTags = array('h1', 'h2', 'h3', 'center', 'font'); + + // ユーズ内の絵文字を画像に置き換える + function replaceEmojisWithImages($postText) { + // ユーズ内で絵文字名(:emoji:)を検出して画像に置き換える + $pattern = '/:(\w+):/'; + $postTextWithImages = preg_replace_callback($pattern, function($matches) { + $emojiName = $matches[1]; + return "$emojiName"; + }, $postText); + return $postTextWithImages; + } + + function replaceURLsWithLinks($postText) { + // URLを正規表現を使って検出 + $pattern = '/(https?:\/\/[^\s]+)/'; + preg_match_all($pattern, $postText, $matches); + + // 検出したURLごとに処理を行う + foreach ($matches[0] as $url) { + // ドメイン部分を抽出 + $parsedUrl = parse_url($url); + $domain = isset($parsedUrl['host']) ? $parsedUrl['host'] : ''; + + // ドメインのみを表示するaタグを生成 + $link = "$domain"; + + // URLをドメインのみを表示するaタグで置き換え + $postText = str_replace($url, $link, $postText); + } + + return $postText; + } + + + + + $messages = array(); + foreach ($message_array as $row) { + $messages[] = $row; + } + // ユーザー情報を取得して、$messages内のusernameをuserDataのusernameに置き換える + foreach ($messages as &$message) { + $userQuery = $pdo->prepare("SELECT username, userid, profile, role FROM account WHERE userid = :userid"); + $userQuery->bindValue(':userid', $message["account"]); + $userQuery->execute(); + $userData = $userQuery->fetch(); + + if ($userData) { + $message['username'] = $userData['username']; + } + } + + // ユーズ内のHTMLコードに指定のタグを有効化する関数 + function replaceUnescapedHTMLTags($html) { + $allowedTags = array('h1', 'h2', 'h3', 'center', 'font'); // 有効化するタグ + return customStripTags($html, $allowedTags); + } + + if(!empty($messages)){ + foreach ($messages as $value) { + + $fav = $value['favorite']; // コンマで区切られたユーザーIDを含む変数 + + // コンマで区切って配列に分割し、要素数を数える + $favIds = explode(',', $fav); + $value["favcnt"] = count($favIds)-1; + + $messageDisplay = new MessageDisplay($value, $userid); + $messageDisplay->display(); + } + }else{ + echo '

ユーズがありません

'; + } + + $pdo = null; + +} + +?> diff --git a/nextpage/view.php b/nextpage/view.php new file mode 100644 index 0000000..7bef23d --- /dev/null +++ b/nextpage/view.php @@ -0,0 +1,85 @@ + +value = $value; + $this->userid = $userid; + } + + public function display() { + if (empty($this->value)) { + echo '

ユーズがありません

'; + } else { + echo '
'; + if(!empty($this->value['rpuniqid'])){ + echo '

┗━ 一番上のユーズに返信

'; + } + echo '
'; + + echo ' '; + echo ' ' . htmlspecialchars($this->value['username']) . ''; + echo ' '; + echo '
'; + $day = date("Ymd", strtotime(htmlspecialchars($this->value['datetime']))); + if ($day == date("Ymd")) { + echo date("今日 H:i", strtotime(htmlspecialchars($this->value['datetime']))); + } else { + echo date("Y年m月d日 H:i", strtotime(htmlspecialchars($this->value['datetime']))); + } + echo '
'; + + echo '
'; + + echo '

' . replaceEmojisWithImages(replaceURLsWithLinks(nl2br(replaceUnescapedHTMLTags($this->value['ueuse'])))) . '

'; + + if (!empty($this->value['photo2']) && $this->value['photo2'] !== 'none') { + echo '
'; + echo ' 画像'; + echo ' 画像'; + echo '
'; + } elseif (!empty($this->value['photo1']) && $this->value['photo1'] !== 'none') { + echo '
'; + echo ' 画像'; + echo '
'; + } + if (!empty($this->value['video1']) && $this->value['video1'] !== 'none') { + echo '
'; + echo ' '; + echo '
'; + } + + if(!($this->value['abi'] == "none")){ + echo '
'; + echo '
'; + echo '

' . htmlspecialchars($this->value['username']) . 'さんが追記しました

'; + echo '
'; + echo '

'. htmlspecialchars($this->value['abi']) . '

'; + echo '

追記日時 : '. date("Y年m月d日 H:i", strtotime(htmlspecialchars($this->value['abidate']))) . '

'; + echo '
'; + } + + echo '
'; + echo '
'; + if (false !== strstr($this->value['favorite'], $this->userid)) { + echo ''; + }else{ + echo ''; + } + echo '返信をみる&する'; + if($this->value['account'] === $this->userid){ + if($this->value['abi'] === "none"){ + echo ''; + } + echo ''; + } + echo '
'; + echo '
'; + } + } +} +?> \ No newline at end of file diff --git a/notice/addnotice.php b/notice/addnotice.php new file mode 100644 index 0000000..d1c2018 --- /dev/null +++ b/notice/addnotice.php @@ -0,0 +1,292 @@ + PDO::ERRMODE_EXCEPTION, + PDO::MYSQL_ATTR_MULTI_STATEMENTS => false + ); + $pdo = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); + +} catch(PDOException $e) { + + // 接続エラーのときエラー内容を取得する + $error_message[] = $e->getMessage(); +} + +if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) { + + $passQuery = $pdo->prepare("SELECT username,userid,loginid,admin FROM account WHERE userid = :userid"); + $passQuery->bindValue(':userid', $_SESSION['userid']); + $passQuery->execute(); + $res = $passQuery->fetch(); + if(empty($res["userid"])){ + header("Location: ../login.php"); + exit; + }elseif($_SESSION['loginid'] === $res["loginid"]){ + // セッションに値をセット + $userid = $_SESSION['userid']; // セッションに格納されている値をそのままセット + $username = $_SESSION['username']; // セッションに格納されている値をそのままセット + $_SESSION['admin_login'] = true; + $_SESSION['userid'] = $userid; + $_SESSION['username'] = $username; + $_SESSION['loginid'] = $res["loginid"]; + setcookie('userid', $userid, time() + 60 * 60 * 24 * 14); + setcookie('username', $username, time() + 60 * 60 * 24 * 14); + setcookie('loginid', $res["loginid"], time() + 60 * 60 * 24 * 14); + setcookie('admin_login', true, time() + 60 * 60 * 24 * 14); + }else{ + header("Location: ../login.php"); + exit; + } + + +} elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) { + + $passQuery = $pdo->prepare("SELECT username,userid,loginid,admin FROM account WHERE userid = :userid"); + $passQuery->bindValue(':userid', $_COOKIE['userid']); + $passQuery->execute(); + $res = $passQuery->fetch(); + if(empty($res["userid"])){ + header("Location: ../login.php"); + exit; + }elseif($_COOKIE['loginid'] === $res["loginid"]){ + // セッションに値をセット + $userid = $_COOKIE['userid']; // クッキーから取得した値をセット + $username = $_COOKIE['username']; // クッキーから取得した値をセット + $_SESSION['admin_login'] = true; + $_SESSION['userid'] = $userid; + $_SESSION['username'] = $username; + $_SESSION['loginid'] = $res["loginid"]; + setcookie('userid', $userid, time() + 60 * 60 * 24 * 14); + setcookie('username', $username, time() + 60 * 60 * 24 * 14); + setcookie('loginid', $res["loginid"], time() + 60 * 60 * 24 * 14); + setcookie('admin_login', true, time() + 60 * 60 * 24 * 14); + }else{ + header("Location: ../login.php"); + exit; + } + + +} else { + // ログインが許可されていない場合、ログインページにリダイレクト + header("Location: ../login.php"); + exit; +} +if(empty($userid)){ + header("Location: ../login.php"); + exit; +} +if(empty($username)){ + header("Location: ../login.php"); + exit; +} + +if(!($res["admin"] === "yes")){ + header("Location: ../login.php"); + exit; +} + +if( !empty($pdo) ) { + + // データベース接続の設定 + $dbh = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST, DB_USER, DB_PASS, array( + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, + PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true, + )); + + $userQuery = $dbh->prepare("SELECT username, userid, profile, role FROM account WHERE userid = :userid"); + $userQuery->bindValue(':userid', $userid); + $userQuery->execute(); + $userData = $userQuery->fetch(); + + $role = $userData["role"]; + + $dbh = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); + + $rerole = $dbh->prepare("SELECT username, userid, password, mailadds, profile, iconname, iconcontent, icontype, iconsize, headname, headcontent, headtype, headsize, role, datetime FROM account WHERE userid = :userid"); + + $rerole->bindValue(':userid', $userid); + // SQL実行 + $rerole->execute(); + + $userdata = $rerole->fetch(); // ここでデータベースから取得した値を $role に代入する + + +} + + + +if( !empty($_POST['btn_submit']) ) { + $title = $_POST['title']; + $note = $_POST['note']; + + // IDの入力チェック + if( empty($title) ) { + $error_message[] = 'タイトルを入力してください!'; + } else { + + // 文字数を確認 + if( 1024 < mb_strlen($title, 'UTF-8') ) { + $error_message[] = 'タイトルは1024文字以内で入力してください。'; + } + + } + + if( empty($error_message) ) { + + // 書き込み日時を取得 + $datetime = date("Y-m-d H:i:s"); + + // トランザクション開始 + $pdo->beginTransaction(); + + try { + + // SQL作成 + $stmt = $pdo->prepare("INSERT INTO notice (title,note,account,datetime) VALUES (:title,:note,:account,:datetime)"); + + + // 値をセット + $stmt->bindParam( ':title', $title, PDO::PARAM_STR); + $stmt->bindParam( ':note', $note, PDO::PARAM_STR); + + $stmt->bindParam( ':account', $userid, PDO::PARAM_STR); + + $stmt->bindParam( ':datetime', $datetime, PDO::PARAM_STR); + + // SQLクエリの実行 + $res = $stmt->execute(); + + // コミット + $res = $pdo->commit(); + + } catch(Exception $e) { + + // エラーが発生した時はロールバック + $pdo->rollBack(); + } + + if( $res ) { + $url = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; + header("Location:".$url.""); + exit; + } else { + $error_message[] = '配信に失敗しました。'; + } + + // プリペアドステートメントを削除 + $stmt = null; + + + } + +} + + +if( !empty($_POST['logout']) ) { + if (isset($_SERVER['HTTP_COOKIE'])) { + $cookies = explode(';', $_SERVER['HTTP_COOKIE']); + foreach($cookies as $cookie) { + $parts = explode('=', $cookie); + $name = trim($parts[0]); + setcookie($name, '', time()-1000); + setcookie($name, '', time()-1000, '/'); + } + } + // リダイレクト先のURLへ転送する + $url = '../index.php'; + header('Location: ' . $url, true, 303); + + // すべての出力を終了 + exit; +} + + + +// データベースの接続を閉じる +$pdo = null; + +?> + + + + + +お知らせ配信 - <?php echo file_get_contents($servernamefile);?> + + + + + +
+ + +
    + +

    + +
+ + +
+ +

お知らせ配信

+ +

タイトルと内容を入力して配信してください。
削除と編集はここからは出来ません。
DB管理画面から行ってください。

+ + +
+

タイトル

+ +
+ +
+

この絵文字について

+ +
+ +
+ + +
+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/notice/notice.php b/notice/notice.php new file mode 100644 index 0000000..c2e8e41 --- /dev/null +++ b/notice/notice.php @@ -0,0 +1,40 @@ + PDO::ERRMODE_EXCEPTION, + PDO::MYSQL_ATTR_MULTI_STATEMENTS => false + ); + $pdo = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); + +} catch(PDOException $e) { + + // 接続エラーのときエラー内容を取得する + $error_message[] = $e->getMessage(); +} + +$sql = "SELECT title, note, account, datetime FROM notice ORDER BY datetime DESC"; +$notice_array = $pdo->query($sql); + +while ($row = $notice_array->fetch(PDO::FETCH_ASSOC)) { + + $notices[] = $row; +} + +if(!empty($notices)){ + foreach ($notices as $value) { + $uneinoticenote = $value['note']; + $uneinoticetitle = $value['title']; + $uneinoticeaccount = $value['account']; + $uneinoticedatetime = $value['datetime']; + } +}else{ + $uneinoticenote = ""; + $uneinoticetitle = "おしらせはありません"; + $uneinoticeaccount = "uwuzu"; + $uneinoticedatetime = ""; +} + diff --git a/notification/index.php b/notification/index.php new file mode 100644 index 0000000..75972ce --- /dev/null +++ b/notification/index.php @@ -0,0 +1,229 @@ + PDO::ERRMODE_EXCEPTION, + PDO::MYSQL_ATTR_MULTI_STATEMENTS => false + ); + $pdo = new PDO('mysql:charset=UTF8;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); + +} catch(PDOException $e) { + + // 接続エラーのときエラー内容を取得する + $error_message[] = $e->getMessage(); +} + +if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) { + + $passQuery = $pdo->prepare("SELECT username,userid,loginid,admin FROM account WHERE userid = :userid"); + $passQuery->bindValue(':userid', $_SESSION['userid']); + $passQuery->execute(); + $res = $passQuery->fetch(); + if(empty($res["userid"])){ + header("Location: ../login.php"); + exit; + }elseif($_SESSION['loginid'] === $res["loginid"]){ + // セッションに値をセット + $userid = $_SESSION['userid']; // セッションに格納されている値をそのままセット + $username = $_SESSION['username']; // セッションに格納されている値をそのままセット + $_SESSION['admin_login'] = true; + $_SESSION['userid'] = $userid; + $_SESSION['username'] = $username; + $_SESSION['loginid'] = $res["loginid"]; + setcookie('userid', $userid, time() + 60 * 60 * 24 * 14); + setcookie('username', $username, time() + 60 * 60 * 24 * 14); + setcookie('loginid', $res["loginid"], time() + 60 * 60 * 24 * 14); + setcookie('admin_login', true, time() + 60 * 60 * 24 * 14); + }else{ + header("Location: ../login.php"); + exit; + } + + +} elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) { + + $passQuery = $pdo->prepare("SELECT username,userid,loginid,admin FROM account WHERE userid = :userid"); + $passQuery->bindValue(':userid', $_COOKIE['userid']); + $passQuery->execute(); + $res = $passQuery->fetch(); + if(empty($res["userid"])){ + header("Location: ../login.php"); + exit; + }elseif($_COOKIE['loginid'] === $res["loginid"]){ + // セッションに値をセット + $userid = $_COOKIE['userid']; // クッキーから取得した値をセット + $username = $_COOKIE['username']; // クッキーから取得した値をセット + $_SESSION['admin_login'] = true; + $_SESSION['userid'] = $userid; + $_SESSION['username'] = $username; + $_SESSION['loginid'] = $res["loginid"]; + setcookie('userid', $userid, time() + 60 * 60 * 24 * 14); + setcookie('username', $username, time() + 60 * 60 * 24 * 14); + setcookie('loginid', $res["loginid"], time() + 60 * 60 * 24 * 14); + setcookie('admin_login', true, time() + 60 * 60 * 24 * 14); + }else{ + header("Location: ../login.php"); + exit; + } + + +} else { + // ログインが許可されていない場合、ログインページにリダイレクト + header("Location: ../login.php"); + exit; +} +if(empty($userid)){ + header("Location: ../login.php"); + exit; +} +if(empty($username)){ + header("Location: ../login.php"); + exit; +} + +if( !empty($_POST['logout']) ) { + if (isset($_SERVER['HTTP_COOKIE'])) { + $cookies = explode(';', $_SERVER['HTTP_COOKIE']); + foreach($cookies as $cookie) { + $parts = explode('=', $cookie); + $name = trim($parts[0]); + setcookie($name, '', time()-1000); + setcookie($name, '', time()-1000, '/'); + } + } + // リダイレクト先のURLへ転送する + $url = '../index.php'; + header('Location: ' . $url, true, 303); + + // すべての出力を終了 + exit; +} + + + +// データベースの接続を閉じる +$pdo = null; + +?> + + + + + + + + +通知 - <?php echo file_get_contents($servernamefile);?> + + + + + +
+ + +
    + +

    + +
+ + +
+
+ +
+
+ + + +
+ + + + + + + + + + + + \ No newline at end of file diff --git a/others/index.php b/others/index.php new file mode 100644 index 0000000..9bfd40e --- /dev/null +++ b/others/index.php @@ -0,0 +1,300 @@ + PDO::ERRMODE_EXCEPTION, + PDO::MYSQL_ATTR_MULTI_STATEMENTS => false + ); + $pdo = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); + +} catch(PDOException $e) { + + // 接続エラーのときエラー内容を取得する + $error_message[] = $e->getMessage(); +} + +if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) { + + $passQuery = $pdo->prepare("SELECT username,userid,loginid,admin FROM account WHERE userid = :userid"); + $passQuery->bindValue(':userid', $_SESSION['userid']); + $passQuery->execute(); + $res = $passQuery->fetch(); + if(empty($res["userid"])){ + header("Location: ../login.php"); + exit; + }elseif($_SESSION['loginid'] === $res["loginid"]){ + // セッションに値をセット + $userid = $_SESSION['userid']; // セッションに格納されている値をそのままセット + $username = $_SESSION['username']; // セッションに格納されている値をそのままセット + $_SESSION['admin_login'] = true; + $_SESSION['userid'] = $userid; + $_SESSION['username'] = $username; + $_SESSION['loginid'] = $res["loginid"]; + setcookie('userid', $userid, time() + 60 * 60 * 24 * 14); + setcookie('username', $username, time() + 60 * 60 * 24 * 14); + setcookie('loginid', $res["loginid"], time() + 60 * 60 * 24 * 14); + setcookie('admin_login', true, time() + 60 * 60 * 24 * 14); + }else{ + header("Location: ../login.php"); + exit; + } + + +} elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) { + + $passQuery = $pdo->prepare("SELECT username,userid,loginid,admin FROM account WHERE userid = :userid"); + $passQuery->bindValue(':userid', $_COOKIE['userid']); + $passQuery->execute(); + $res = $passQuery->fetch(); + if(empty($res["userid"])){ + header("Location: ../login.php"); + exit; + }elseif($_COOKIE['loginid'] === $res["loginid"]){ + // セッションに値をセット + $userid = $_COOKIE['userid']; // クッキーから取得した値をセット + $username = $_COOKIE['username']; // クッキーから取得した値をセット + $_SESSION['admin_login'] = true; + $_SESSION['userid'] = $userid; + $_SESSION['username'] = $username; + $_SESSION['loginid'] = $res["loginid"]; + setcookie('userid', $userid, time() + 60 * 60 * 24 * 14); + setcookie('username', $username, time() + 60 * 60 * 24 * 14); + setcookie('loginid', $res["loginid"], time() + 60 * 60 * 24 * 14); + setcookie('admin_login', true, time() + 60 * 60 * 24 * 14); + }else{ + header("Location: ../login.php"); + exit; + } + + +} else { + // ログインが許可されていない場合、ログインページにリダイレクト + header("Location: ../login.php"); + exit; +} +if(empty($userid)){ + header("Location: ../login.php"); + exit; +} +if(empty($username)){ + header("Location: ../login.php"); + exit; +} + +if( !empty($pdo) ) { + + // データベース接続の設定 + $dbh = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST, DB_USER, DB_PASS, array( + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, + PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true, + )); + + $userQuery = $dbh->prepare("SELECT userid FROM account WHERE userid = :userid"); + $userQuery->bindValue(':userid', $userid); + $userQuery->execute(); + $userData = $userQuery->fetch(); + +} + +if( !empty($_POST['btn_submit']) ) { + + $chkuserid = $_POST['chkuserid']; + + if( empty($chkuserid) ) { + $error_message[] = '確認用ユーザーIDを入力してください。'; + } else { + if($chkuserid === $userData["userid"]){ + $userId = $userData["userid"]; // 削除対象のユーザーID + $folderPath = "../ueuseimages/"; // フォルダのパス + + // 指定したフォルダ内でユーザーIDを含むファイルを検索 + $filesToDelete = glob($folderPath . "*-$userId.*"); // 「-ユーザーID.拡張子」というパターンを検索 + + // ファイルを順に削除 + foreach ($filesToDelete as $file) { + if (is_file($file)) { + unlink($file); // ファイルを削除 + } + } + + $folderPath2 = "../ueusevideos/"; // フォルダのパス + + // 指定したフォルダ内でユーザーIDを含むファイルを検索 + $filesToDelete2 = glob($folderPath2 . "*-$userId.*"); // 「-ユーザーID.拡張子」というパターンを検索 + + // ファイルを順に削除 + foreach ($filesToDelete2 as $file2) { + if (is_file($file2)) { + unlink($file2); // ファイルを削除 + } + } + + + try { + $pdo = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS); + + // 投稿削除クエリを実行 + $deleteQuery = $pdo->prepare("DELETE FROM ueuse WHERE account = :userid"); + $deleteQuery->bindValue(':userid', $userid, PDO::PARAM_STR); + $res = $deleteQuery->execute(); + + // アカウント削除クエリを実行 + $deleteQuery = $pdo->prepare("DELETE FROM account WHERE userid = :userid"); + $deleteQuery->bindValue(':userid', $userid, PDO::PARAM_STR); + $res = $deleteQuery->execute(); + + // フォローの更新 + $updateFollowQuery = $pdo->prepare("UPDATE account SET follow = REPLACE(follow, :userid, '') WHERE follow LIKE :pattern"); + $updateFollowQuery->bindValue(':userid', ",$userid", PDO::PARAM_STR); + $updateFollowQuery->bindValue(':pattern', "%,$userid%", PDO::PARAM_STR); + $updateFollowQuery->execute(); + + // フォロワーの更新 + $updateFollowerQuery = $pdo->prepare("UPDATE account SET follower = REPLACE(follower, :userid, '') WHERE follower LIKE :pattern"); + $updateFollowerQuery->bindValue(':userid', ",$userid", PDO::PARAM_STR); + $updateFollowerQuery->bindValue(':pattern', "%,$userid%", PDO::PARAM_STR); + $updateFollowerQuery->execute(); + + // いいねの更新 + $updateFavoriteQuery = $pdo->prepare("UPDATE ueuse SET favorite = REPLACE(favorite, :favorite, '') WHERE favorite LIKE :pattern"); + $updateFavoriteQuery->bindValue(':favorite', ",$userid", PDO::PARAM_STR); + $updateFavoriteQuery->bindValue(':pattern', "%,$userid%", PDO::PARAM_STR); + $updateFavoriteQuery->execute(); + + } catch (Exception $e) { + + // エラーが発生した時はロールバック + $pdo->rollBack(); + } + + if ($res) { + if (isset($_SERVER['HTTP_COOKIE'])) { + $cookies = explode(';', $_SERVER['HTTP_COOKIE']); + foreach($cookies as $cookie) { + $parts = explode('=', $cookie); + $name = trim($parts[0]); + setcookie($name, '', time()-1000); + setcookie($name, '', time()-1000, '/'); + } + } + header("Location:../index.php"); + exit; + } else { + $error_message[] = 'アカウント削除に失敗しました。'; + } + + + // プリペアドステートメントを削除 + $stmt = null; + }else{ + $error_message[] = '確認用ユーザーIDが違います'; + } + } + + +} + + +if( !empty($_POST['logout']) ) { + if (isset($_SERVER['HTTP_COOKIE'])) { + $cookies = explode(';', $_SERVER['HTTP_COOKIE']); + foreach($cookies as $cookie) { + $parts = explode('=', $cookie); + $name = trim($parts[0]); + setcookie($name, '', time()-1000); + setcookie($name, '', time()-1000, '/'); + } + } + // リダイレクト先のURLへ転送する + $url = '../index.php'; + header('Location: ' . $url, true, 303); + + // すべての出力を終了 + exit; +} + + +?> + + + + + + +アカウント削除ページ - <?php echo file_get_contents($servernamefile);?> + + + + + +
+ + +
    + +

    + +
+ +
+

アカウント削除ページ

+

アカウント誤削除を防ぐため下の入力ボックスにご自身のユーザーIDを入力する必要があります。

+ + +

あなたはこのサーバーの管理者のようです。
管理者アカウントの移行は済んでいますか?
アカウントを削除しても大丈夫なのですか...?

+ + +
+

確認用ユーザーID

+ +
+ + + + + +
+
+ + + + + \ No newline at end of file diff --git a/reply/reply.php b/reply/reply.php new file mode 100644 index 0000000..fb81f08 --- /dev/null +++ b/reply/reply.php @@ -0,0 +1,202 @@ +beginTransaction(); + + try { + + // SQL作成 + $stmt = $pdo->prepare("INSERT INTO ueuse (username, account, uniqid, rpuniqid, ueuse, photo1, photo2, video1, datetime, abi) VALUES (:username, :account, :uniqid, :rpuniqid, :ueuse, :photo1, :photo2, :video1, :datetime, :abi)"); + + $stmt->bindParam(':username', $username, PDO::PARAM_STR); + $stmt->bindParam(':account', $userid, PDO::PARAM_STR); + $stmt->bindParam(':uniqid', $uniqid, PDO::PARAM_STR); + $stmt->bindParam(':rpuniqid', $rpuniqid, PDO::PARAM_STR); + $stmt->bindParam(':ueuse', $Rptext, PDO::PARAM_STR); + + $stmt->bindParam(':photo1', $photo1, PDO::PARAM_STR); + $stmt->bindParam(':photo2', $photo2, PDO::PARAM_STR); + $stmt->bindParam(':video1', $video1, PDO::PARAM_STR); + $stmt->bindParam(':datetime', $datetime, PDO::PARAM_STR); + + $stmt->bindParam(':abi', $abi, PDO::PARAM_STR); + + // SQLクエリの実行 + $res = $stmt->execute(); + + // コミット + $res = $pdo->commit(); + + // 書き込み日時を取得 + $datetime = date("Y-m-d H:i:s"); + $title = ''.$userid.'さんが返信しました!' + $msg = ''.$userid.'さんがあなたの投稿に返信しました!' + $url = '/!'.$rpuniqid + + // トランザクション開始 + $pdo->beginTransaction(); + + $stmt = $pdo->prepare("INSERT INTO notification (touserid, title, msg, url, datetime) VALUES (:touserid, :title, :msg, :url, :datetime,)"); + + $stmt->bindParam(':touserid', $touserid, PDO::PARAM_STR); + $stmt->bindParam(':title', $title, PDO::PARAM_STR); + $stmt->bindParam(':msg', $msg, PDO::PARAM_STR); + $stmt->bindParam(':url', $url, PDO::PARAM_STR); + $stmt->bindParam(':datetime', $datetime, PDO::PARAM_STR); + + $res = $stmt->execute(); + $res = $pdo->commit(); + + } catch(Exception $e) { + + // エラーが発生した時はロールバック + $pdo->rollBack(); + } + + if ($res) { + header('Content-Type: application/json'); + echo json_encode(['success' => true]); + exit; + } else { + header('Content-Type: application/json'); + echo json_encode(['success' => false, 'error' => '追加に失敗しました。']); + exit; + } + } catch(PDOException $e) { + header('Content-Type: application/json'); + echo json_encode(['success' => false, 'error' => 'データベースエラー:' . $e->getMessage()]); + exit; + } + + if (!empty($errors)) { + header('Content-Type: application/json'); + echo json_encode(['success' => false, 'errors' => $errors]); + exit; + } + + + // プリペアドステートメントを削除 + $stmt = null; +} + + +?> diff --git a/require/botbox.php b/require/botbox.php new file mode 100644 index 0000000..7d002cf --- /dev/null +++ b/require/botbox.php @@ -0,0 +1,10 @@ + + + \ No newline at end of file diff --git a/require/leftbox.php b/require/leftbox.php new file mode 100644 index 0000000..b4b1305 --- /dev/null +++ b/require/leftbox.php @@ -0,0 +1,26 @@ + + + \ No newline at end of file diff --git a/require/rightbox.php b/require/rightbox.php new file mode 100644 index 0000000..79cf849 --- /dev/null +++ b/require/rightbox.php @@ -0,0 +1,45 @@ +
+ +

お知らせ

+
+ +
+

+

+

編集者 :

+

+
+ +
+

サーバー情報

+
+

Server

+

+

+ 利用規約プライバシーポリシー +

Software

+

+

Version :

+

Developer :

+ もっと詳しく!リリースノート +
+
\ No newline at end of file diff --git a/rule/privacypolicy.php b/rule/privacypolicy.php new file mode 100644 index 0000000..90cfff6 --- /dev/null +++ b/rule/privacypolicy.php @@ -0,0 +1,80 @@ + + +

$1

', $markdownText); + + // 画像(#img)をHTMLのimgタグに変換 + $markdownText = preg_replace('/^#img (.+)/m', '', $markdownText); + + // タイトル(#、##、###)をHTMLのhタグに変換 + $markdownText = preg_replace('/^# (.+)/m', '

$1

', $markdownText); + $markdownText = preg_replace('/^## (.+)/m', '

$1

', $markdownText); + $markdownText = preg_replace('/^### (.+)/m', '

$1

', $markdownText); + + // 箇条書き(-)をHTMLのul/liタグに変換 + $markdownText = preg_replace('/^- (.+)/m', '
  • $1
', $markdownText); + + // 空行の前に何もない行をHTMLのpタグに変換 + $markdownText = preg_replace('/(^\s*)(?!\s)(.*)/m', '$1

$2

', $markdownText); + + return $markdownText; +} + +$sprivacypolicy = explode("\n", $privacypolicydata); +$htmltext = ''; // 初期化 + +foreach ($sprivacypolicy as $privacypolicy) { + $markdowntext = $privacypolicy; + $convertedText = processMarkdownAndWrapEmptyLines($markdowntext); + $htmltext .= $convertedText . "\n"; // 変換されたテキストを追加 +} + + +?> + + + + + + +プライバシーポリシー - <?php echo file_get_contents($servernamefile);?> + + + + +
+ +
+ +
+ +

プライバシーポリシー

+
+
+ +

+ +
+ + + + + \ No newline at end of file diff --git a/rule/releasenotes.php b/rule/releasenotes.php new file mode 100644 index 0000000..5852a3b --- /dev/null +++ b/rule/releasenotes.php @@ -0,0 +1,93 @@ + + +

$1

', $markdownText); + + // 画像(#img)をHTMLのimgタグに変換 + $markdownText = preg_replace('/^#img (.+)/m', '', $markdownText); + + // タイトル(#、##、###)をHTMLのhタグに変換 + $markdownText = preg_replace('/^# (.+)/m', '

$1

', $markdownText); + $markdownText = preg_replace('/^## (.+)/m', '

$1

', $markdownText); + $markdownText = preg_replace('/^### (.+)/m', '

$1

', $markdownText); + + // 箇条書き(-)をHTMLのul/liタグに変換 + $markdownText = preg_replace('/^- (.+)/m', '
  • $1
', $markdownText); + + // 空行の前に何もない行をHTMLのpタグに変換 + $markdownText = preg_replace('/(^\s*)(?!\s)(.*)/m', '$1

$2

', $markdownText); + + return $markdownText; +} + +$srelease = explode("\n", $releasedata); +$htmltext = ''; // 初期化 + +foreach ($srelease as $release) { + $markdowntext = $release; + $convertedText = processMarkdownAndWrapEmptyLines($markdowntext); + $htmltext .= $convertedText . "\n"; // 変換されたテキストを追加 +} + + +?> + + + + + + +<?php echo $uwuzuinfo[0]?> リリースノート - <?php echo file_get_contents($servernamefile);?> + + + + + +
+ +
+ +
+ +

リリースノート

+
+
+
+
Version :
Developer :
Last Update :
+ + +

+ +
+ + + + + \ No newline at end of file diff --git a/rule/terms.php b/rule/terms.php new file mode 100644 index 0000000..706af81 --- /dev/null +++ b/rule/terms.php @@ -0,0 +1,80 @@ + + +

$1

', $markdownText); + + // 画像(#img)をHTMLのimgタグに変換 + $markdownText = preg_replace('/^#img (.+)/m', '', $markdownText); + + // タイトル(#、##、###)をHTMLのhタグに変換 + $markdownText = preg_replace('/^# (.+)/m', '

$1

', $markdownText); + $markdownText = preg_replace('/^## (.+)/m', '

$1

', $markdownText); + $markdownText = preg_replace('/^### (.+)/m', '

$1

', $markdownText); + + // 箇条書き(-)をHTMLのul/liタグに変換 + $markdownText = preg_replace('/^- (.+)/m', '
  • $1
', $markdownText); + + // 空行の前に何もない行をHTMLのpタグに変換 + $markdownText = preg_replace('/(^\s*)(?!\s)(.*)/m', '$1

$2

', $markdownText); + + return $markdownText; +} + +$sterms = explode("\n", $termsdata); +$htmltext = ''; // 初期化 + +foreach ($sterms as $terms) { + $markdowntext = $terms; + $convertedText = processMarkdownAndWrapEmptyLines($markdowntext); + $htmltext .= $convertedText . "\n"; // 変換されたテキストを追加 +} + + +?> + + + + + + +利用規約 - <?php echo file_get_contents($servernamefile);?> + + + + +
+ +
+ +
+ +

利用規約

+
+
+ +

+ +
+ + + + + \ No newline at end of file diff --git a/rule/uwuzuabout.php b/rule/uwuzuabout.php new file mode 100644 index 0000000..023004b --- /dev/null +++ b/rule/uwuzuabout.php @@ -0,0 +1,93 @@ + + +

$1

', $markdownText); + + // 画像(#img)をHTMLのimgタグに変換 + $markdownText = preg_replace('/^#img (.+)/m', '', $markdownText); + + // タイトル(#、##、###)をHTMLのhタグに変換 + $markdownText = preg_replace('/^# (.+)/m', '

$1

', $markdownText); + $markdownText = preg_replace('/^## (.+)/m', '

$1

', $markdownText); + $markdownText = preg_replace('/^### (.+)/m', '

$1

', $markdownText); + + // 箇条書き(-)をHTMLのul/liタグに変換 + $markdownText = preg_replace('/^- (.+)/m', '
  • $1
', $markdownText); + + // 空行の前に何もない行をHTMLのpタグに変換 + $markdownText = preg_replace('/(^\s*)(?!\s)(.*)/m', '$1

$2

', $markdownText); + + return $markdownText; +} + +$sterms = explode("\n", $termsdata); +$htmltext = ''; // 初期化 + +foreach ($sterms as $terms) { + $markdowntext = $terms; + $convertedText = processMarkdownAndWrapEmptyLines($markdowntext); + $htmltext .= $convertedText . "\n"; // 変換されたテキストを追加 +} + + +?> + + + + + + +<?php echo $uwuzuinfo[0]?>について - <?php echo file_get_contents($servernamefile);?> + + + + + +
+ +
+ +
+ +

について

+
+
+
+
Version :
Developer :
Last Update :
+ + +

+ +
+ + + + + \ No newline at end of file diff --git a/search/index.php b/search/index.php new file mode 100644 index 0000000..abe3d84 --- /dev/null +++ b/search/index.php @@ -0,0 +1,390 @@ + PDO::ERRMODE_EXCEPTION, + PDO::MYSQL_ATTR_MULTI_STATEMENTS => false + ); + $pdo = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); + +} catch(PDOException $e) { + + // 接続エラーのときエラー内容を取得する + $error_message[] = $e->getMessage(); +} + +if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) { + + $passQuery = $pdo->prepare("SELECT username,userid,loginid,admin FROM account WHERE userid = :userid"); + $passQuery->bindValue(':userid', $_SESSION['userid']); + $passQuery->execute(); + $res = $passQuery->fetch(); + if(empty($res["userid"])){ + header("Location: ../login.php"); + exit; + }elseif($_SESSION['loginid'] === $res["loginid"]){ + // セッションに値をセット + $userid = $_SESSION['userid']; // セッションに格納されている値をそのままセット + $username = $_SESSION['username']; // セッションに格納されている値をそのままセット + $_SESSION['admin_login'] = true; + $_SESSION['userid'] = $userid; + $_SESSION['username'] = $username; + $_SESSION['loginid'] = $res["loginid"]; + setcookie('userid', $userid, time() + 60 * 60 * 24 * 14); + setcookie('username', $username, time() + 60 * 60 * 24 * 14); + setcookie('loginid', $res["loginid"], time() + 60 * 60 * 24 * 14); + setcookie('admin_login', true, time() + 60 * 60 * 24 * 14); + }else{ + header("Location: ../login.php"); + exit; + } + + +} elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) { + + $passQuery = $pdo->prepare("SELECT username,userid,loginid,admin FROM account WHERE userid = :userid"); + $passQuery->bindValue(':userid', $_COOKIE['userid']); + $passQuery->execute(); + $res = $passQuery->fetch(); + if(empty($res["userid"])){ + header("Location: ../login.php"); + exit; + }elseif($_COOKIE['loginid'] === $res["loginid"]){ + // セッションに値をセット + $userid = $_COOKIE['userid']; // クッキーから取得した値をセット + $username = $_COOKIE['username']; // クッキーから取得した値をセット + $_SESSION['admin_login'] = true; + $_SESSION['userid'] = $userid; + $_SESSION['username'] = $username; + $_SESSION['loginid'] = $res["loginid"]; + setcookie('userid', $userid, time() + 60 * 60 * 24 * 14); + setcookie('username', $username, time() + 60 * 60 * 24 * 14); + setcookie('loginid', $res["loginid"], time() + 60 * 60 * 24 * 14); + setcookie('admin_login', true, time() + 60 * 60 * 24 * 14); + }else{ + header("Location: ../login.php"); + exit; + } + + +} else { + // ログインが許可されていない場合、ログインページにリダイレクト + header("Location: ../login.php"); + exit; +} +if(empty($userid)){ + header("Location: ../login.php"); + exit; +} +if(empty($username)){ + header("Location: ../login.php"); + exit; +} + +//------------------------------------------- + +if( !empty($_POST['logout']) ) { + if (isset($_SERVER['HTTP_COOKIE'])) { + $cookies = explode(';', $_SERVER['HTTP_COOKIE']); + foreach($cookies as $cookie) { + $parts = explode('=', $cookie); + $name = trim($parts[0]); + setcookie($name, '', time()-1000); + setcookie($name, '', time()-1000, '/'); + } + } + // リダイレクト先のURLへ転送する + $url = '../index.php'; + header('Location: ' . $url, true, 303); + + // すべての出力を終了 + exit; +} + + + + +// データベースの接続を閉じる +$pdo = null; + +?> + + + + + + + + + +検索 - <?php echo file_get_contents($servernamefile);?> + + + + + + + +
+ + +
    + +

    + +
+ + + +
+

検索

+
+
+ + +
+ +
+
+ + +
+
+ + + +
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/settings/index.php b/settings/index.php new file mode 100644 index 0000000..36a3532 --- /dev/null +++ b/settings/index.php @@ -0,0 +1,664 @@ + PDO::ERRMODE_EXCEPTION, + PDO::MYSQL_ATTR_MULTI_STATEMENTS => false + ); + $pdo = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); + +} catch(PDOException $e) { + + // 接続エラーのときエラー内容を取得する + $error_message[] = $e->getMessage(); +} + +if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) { + + $passQuery = $pdo->prepare("SELECT username,userid,loginid,admin FROM account WHERE userid = :userid"); + $passQuery->bindValue(':userid', $_SESSION['userid']); + $passQuery->execute(); + $res = $passQuery->fetch(); + if(empty($res["userid"])){ + header("Location: ../login.php"); + exit; + }elseif($_SESSION['loginid'] === $res["loginid"]){ + // セッションに値をセット + $userid = $_SESSION['userid']; // セッションに格納されている値をそのままセット + $username = $_SESSION['username']; // セッションに格納されている値をそのままセット + $_SESSION['admin_login'] = true; + $_SESSION['userid'] = $userid; + $_SESSION['username'] = $username; + $_SESSION['loginid'] = $res["loginid"]; + setcookie('userid', $userid, time() + 60 * 60 * 24 * 14); + setcookie('username', $username, time() + 60 * 60 * 24 * 14); + setcookie('loginid', $res["loginid"], time() + 60 * 60 * 24 * 14); + setcookie('admin_login', true, time() + 60 * 60 * 24 * 14); + }else{ + header("Location: ../login.php"); + exit; + } + + +} elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) { + + $passQuery = $pdo->prepare("SELECT username,userid,loginid,admin FROM account WHERE userid = :userid"); + $passQuery->bindValue(':userid', $_COOKIE['userid']); + $passQuery->execute(); + $res = $passQuery->fetch(); + if(empty($res["userid"])){ + header("Location: ../login.php"); + exit; + }elseif($_COOKIE['loginid'] === $res["loginid"]){ + // セッションに値をセット + $userid = $_COOKIE['userid']; // クッキーから取得した値をセット + $username = $_COOKIE['username']; // クッキーから取得した値をセット + $_SESSION['admin_login'] = true; + $_SESSION['userid'] = $userid; + $_SESSION['username'] = $username; + $_SESSION['loginid'] = $res["loginid"]; + setcookie('userid', $userid, time() + 60 * 60 * 24 * 14); + setcookie('username', $username, time() + 60 * 60 * 24 * 14); + setcookie('loginid', $res["loginid"], time() + 60 * 60 * 24 * 14); + setcookie('admin_login', true, time() + 60 * 60 * 24 * 14); + }else{ + header("Location: ../login.php"); + exit; + } + + +} else { + // ログインが許可されていない場合、ログインページにリダイレクト + header("Location: ../login.php"); + exit; +} +if(empty($userid)){ + header("Location: ../login.php"); + exit; +} +if(empty($username)){ + header("Location: ../login.php"); + exit; +} + +if( !empty($pdo) ) { + + // データベース接続の設定 + $dbh = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST, DB_USER, DB_PASS, array( + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, + PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true, + )); + + $userQuery = $dbh->prepare("SELECT username, userid, profile, role FROM account WHERE userid = :userid"); + $userQuery->bindValue(':userid', $userid); + $userQuery->execute(); + $userData = $userQuery->fetch(); + + $role = $userData["role"]; + + $dbh = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); + + $rerole = $dbh->prepare("SELECT username, userid, password, mailadds, profile, iconname, iconcontent, icontype, iconsize, headname, headcontent, headtype, headsize, role, datetime FROM account WHERE userid = :userid"); + + $rerole->bindValue(':userid', $userid); + // SQL実行 + $rerole->execute(); + + $userdata = $rerole->fetch(); // ここでデータベースから取得した値を $role に代入する + + +} + + + +if( !empty($_POST['btn_submit']) ) { + + // 空白除去 + $username = $_POST['username']; + + $mailadds = $_POST['mailadds']; + + $profile = $_POST['profile']; + + $options = array( + // SQL実行失敗時に例外をスルー + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + // デフォルトフェッチモードを連想配列形式に設定 + PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, + // バッファードクエリを使う(一度に結果セットを全て取得し、サーバー負荷を軽減) + // SELECTで得た結果に対してもrowCountメソッドを使えるようにする + PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true, + ); + + $dbh = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); + + + $query = $dbh->prepare('SELECT * FROM account WHERE userid = :userid limit 1'); + + $query->execute(array(':userid' => $userid)); + + $result = $query->fetch(); + + + // ユーザーネームの入力チェック + if( empty($username) ) { + $error_message[] = '表示名を入力してください。'; + } else { + // 文字数を確認 + if( 25 < mb_strlen($username, 'UTF-8') ) { + $error_message[] = 'ユーザーネームは25文字以内で入力してください。'; + } + } + + if( empty($error_message) ) { + // トランザクション開始 + $pdo->beginTransaction(); + $hashpassword = password_hash($password, PASSWORD_DEFAULT); + + try { + // SQL作成 + $stmt = $pdo->prepare("UPDATE account SET username = :username, mailadds = :mailadds, profile = :profile WHERE userid = :userid;"); + + // 他の値をセット + $stmt->bindParam(':username', $username, PDO::PARAM_STR); + $stmt->bindParam(':mailadds', $mailadds, PDO::PARAM_STR); + $stmt->bindParam(':profile', $profile, PDO::PARAM_STR); + + // 条件を指定 + // 以下の部分を適切な条件に置き換えてください + $stmt->bindValue(':userid', $userid, PDO::PARAM_STR); + + // SQLクエリの実行 + $res = $stmt->execute(); + + // コミット + $res = $pdo->commit(); + + } catch (Exception $e) { + + // エラーが発生した時はロールバック + $pdo->rollBack(); + } + + if ($res) { + $url = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; + header("Location:".$url.""); + exit; + } else { + $error_message[] = '更新に失敗しました。'; + } + + // プリペアドステートメントを削除 + $stmt = null; + } +} + + + +if( !empty($_POST['pass_submit']) ) { + + $password = $_POST['password']; + + $hashpassword = password_hash($password, PASSWORD_DEFAULT); + + $options = array( + // SQL実行失敗時に例外をスルー + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + // デフォルトフェッチモードを連想配列形式に設定 + PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, + // バッファードクエリを使う(一度に結果セットを全て取得し、サーバー負荷を軽減) + // SELECTで得た結果に対してもrowCountメソッドを使えるようにする + PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true, + ); + + $dbh = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); + + + $query = $dbh->prepare('SELECT * FROM account WHERE userid = :userid limit 1'); + + $query->execute(array(':userid' => $userid)); + + $result = $query->fetch(); + + // ユーザーネームの入力チェック + if( empty($password) ) { + $error_message[] = 'パスワードを入力してください。'; + } else { + + $weakPasswords = array( + "password", + "123456", + "123456789", + "12345", + "12345678", + "123123", + "1234567890", + "1234567", + "1q2w3e", + "qwerty123", + "aa12345678", + "password1", + "1234", + "qwertyuiop", + "123321", + "12321", + "qwertyui", + "abcd1234", + "zaq12wsx", + "1q2w3e4r", + "qwer1234", + "sakura", + "asdf1234", + "asdfghjkl", + "asdfghjk", + "member", + "1qaz2wsx", + "doraemon", + "makoto", + "takeshi", + "machi1", + "machida", + "machida1", + "tokyo", + "arashi", + "dropbox", + "twitter", + "elonmusk", + "xcorp", + "1234qwer", + "japan", + "nippon", + "tukareta", + "tweet", + "discord", + "misskey", + "qwerty", + "123456789", + "abc123", + "password123", + "admin", + "letmein", + "iloveyou", + "111111", + "12345678910", + "user", + "root", + "system", + // 他にも弱いパスワードを追加できます + ); + + function isWeakPassword($passwords) { + global $weakPasswords; + return in_array($passwords, $weakPasswords); + } + + // テスト用のパスワード(実際にはユーザー入力などから取得することになります。 + + if (isWeakPassword($password)) { + $error_message[] = "パスワードが弱いです。セキュリティ上変更してください。"; + } else { + + } + // 文字数を確認 + if( 100 < mb_strlen($password, 'UTF-8') ) { + $error_message[] = 'パスワードは100文字以内で入力してください。'; + } + + if( 4 > mb_strlen($password, 'UTF-8') ) { + $error_message[] = 'パスワードは4文字以上である必要があります。'; + } + } + + if( empty($error_message) ) { + // トランザクション開始 + $pdo->beginTransaction(); + $hashpassword = password_hash($password, PASSWORD_DEFAULT); + + try { + // SQL作成 + $stmt = $pdo->prepare("UPDATE account SET password = :password WHERE userid = :userid;"); + + // 他の値をセット + $stmt->bindParam(':password', $hashpassword, PDO::PARAM_STR); + + // 条件を指定 + // 以下の部分を適切な条件に置き換えてください + $stmt->bindValue(':userid', $userid, PDO::PARAM_STR); + + // SQLクエリの実行 + $res = $stmt->execute(); + + // コミット + $res = $pdo->commit(); + + } catch (Exception $e) { + + // エラーが発生した時はロールバック + $pdo->rollBack(); + } + + if ($res) { + $url = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; + header("Location:".$url.""); + exit; + } else { + $error_message[] = '更新に失敗しました。'; + } + + // プリペアドステートメントを削除 + $stmt = null; + } +} + + +if( !empty($_POST['logout']) ) { + if (isset($_SERVER['HTTP_COOKIE'])) { + $cookies = explode(';', $_SERVER['HTTP_COOKIE']); + foreach($cookies as $cookie) { + $parts = explode('=', $cookie); + $name = trim($parts[0]); + setcookie($name, '', time()-1000); + setcookie($name, '', time()-1000, '/'); + } + } + // リダイレクト先のURLへ転送する + $url = '../index.php'; + header('Location: ' . $url, true, 303); + + // すべての出力を終了 + exit; +} + + + +if( !empty($_POST['img1btn_submit']) ) { + + if (!empty($_FILES['image2s']['name'])) { + $headimg = $_FILES['image2s']; + }else{ + $error_message[] = 'ヘッダー画像を選択してください'; + } + + $options = array( + // SQL実行失敗時に例外をスルー + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + // デフォルトフェッチモードを連想配列形式に設定 + PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, + // バッファードクエリを使う(一度に結果セットを全て取得し、サーバー負荷を軽減) + // SELECTで得た結果に対してもrowCountメソッドを使えるようにする + PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true, + ); + + $dbh = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); + + + $query = $dbh->prepare('SELECT * FROM account WHERE userid = :userid limit 1'); + + $query->execute(array(':userid' => $userid)); + + $result = $query->fetch(); + + + + + if( empty($error_message) ) { + // トランザクション開始 + $pdo->beginTransaction(); + + try { + + // SQL作成 + $stmt = $pdo->prepare("UPDATE account SET headname = :headname, headtype = :headtype, headcontent = :headcontent, headsize = :headsize WHERE userid = :userid"); + + // ヘッダー画像関連の処理 + $headName = $headimg['name']; + $headType = $headimg['type']; + $headContent = file_get_contents($headimg['tmp_name']); + $headSize = $headimg['size']; + + // ヘッダー画像のバインド + $stmt->bindValue(':headname', $headName, PDO::PARAM_STR); + $stmt->bindValue(':headtype', $headType, PDO::PARAM_STR); + $stmt->bindValue(':headcontent', $headContent, PDO::PARAM_STR); + $stmt->bindValue(':headsize', $headSize, PDO::PARAM_INT); + + // ユーザーIDのバインド(WHERE句に必要) + $stmt->bindValue(':userid', $userid, PDO::PARAM_STR); + + // SQLクエリの実行 + $res = $stmt->execute(); + + // コミット + $res = $pdo->commit(); + + + } catch (Exception $e) { + + // エラーが発生した時はロールバック + $pdo->rollBack(); + } + + if ($res) { + $url = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; + header("Location:".$url.""); + exit; + } else { + $error_message[] = '更新に失敗しました。'; + } + + // プリペアドステートメントを削除 + $stmt = null; + } +} + + +if( !empty($_POST['img2btn_submit']) ) { + + if (!empty($_FILES['image']['name'])) { + $img = $_FILES['image']; + }else{ + $error_message[] = 'アイコン画像を選択してください'; + } + + + $options = array( + // SQL実行失敗時に例外をスルー + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + // デフォルトフェッチモードを連想配列形式に設定 + PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, + // バッファードクエリを使う(一度に結果セットを全て取得し、サーバー負荷を軽減) + // SELECTで得た結果に対してもrowCountメソッドを使えるようにする + PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true, + ); + + $dbh = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); + + + $query = $dbh->prepare('SELECT * FROM account WHERE userid = :userid limit 1'); + + $query->execute(array(':userid' => $userid)); + + $result = $query->fetch(); + + + + + if( empty($error_message) ) { + // トランザクション開始 + $pdo->beginTransaction(); + + try { + + // SQL作成 + $stmt = $pdo->prepare("UPDATE account SET iconname = :iconname, icontype = :icontype, iconcontent = :iconcontent, iconsize = :iconsize WHERE userid = :userid"); + + $iconName = $img['name']; + $iconType = $img['type']; + $iconContent = file_get_contents($img['tmp_name']); + $iconSize = $img['size']; + + // アイコン画像のバインド + $stmt->bindValue(':iconname', $iconName, PDO::PARAM_STR); + $stmt->bindValue(':icontype', $iconType, PDO::PARAM_STR); + $stmt->bindValue(':iconcontent', $iconContent, PDO::PARAM_STR); + $stmt->bindValue(':iconsize', $iconSize, PDO::PARAM_INT); + + // ユーザーIDのバインド(WHERE句に必要) + $stmt->bindValue(':userid', $userid, PDO::PARAM_STR); + + // SQLクエリの実行 + $res = $stmt->execute(); + + // コミット + $res = $pdo->commit(); + + + } catch (Exception $e) { + + // エラーが発生した時はロールバック + $pdo->rollBack(); + } + + if ($res) { + $url = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; + header("Location:".$url.""); + exit; + } else { + $error_message[] = '更新に失敗しました。'; + } + + // プリペアドステートメントを削除 + $stmt = null; + } +} + +if( !empty($_POST['logout']) ) { + if (isset($_SERVER['HTTP_COOKIE'])) { + $cookies = explode(';', $_SERVER['HTTP_COOKIE']); + foreach($cookies as $cookie) { + $parts = explode('=', $cookie); + $name = trim($parts[0]); + setcookie($name, '', time()-1000); + setcookie($name, '', time()-1000, '/'); + } + } + // リダイレクト先のURLへ転送する + $url = '../index.php'; + header('Location: ' . $url, true, 303); + + // すべての出力を終了 + exit; +} + + +// データベースの接続を閉じる +$pdo = null; + +?> + + + + + + + + +設定 - <?php echo file_get_contents($servernamefile);?> + + + + + +
+ + +
    + +

    + +
+ + +
+
+ +
+ +
+ +
+ + + + +
+ + +
+ + +
+

ユーザーネーム

+ +
+
+

メールアドレス

+ +
+ +
+

プロフィール

+ +
+ + + +
+

パスワード

+ +
+ + + + +
+
+ + + + + \ No newline at end of file diff --git a/success.php b/success.php new file mode 100644 index 0000000..e355fb1 --- /dev/null +++ b/success.php @@ -0,0 +1,41 @@ + + + + + + + + + + + +アカウント登録完了!!! - <?php echo file_get_contents($servernamefile);?> + + + + + + + +
+ + +
+

アカウント作成完了!

+


いぇ~い!

+

88888888888

+

アカウント登録が完了しました!

+ + +
+
+ + + + \ No newline at end of file diff --git a/sw.js b/sw.js new file mode 100644 index 0000000..a999c24 --- /dev/null +++ b/sw.js @@ -0,0 +1,42 @@ +var CACHE_NAME = "app_uwuzu"; +var urlsToCache = [ + "home/index.php", + "search/index.php", + "require/botbox.php", + "require/leftbox.php", + "require/rightbox.php", + "require/botbox.php", + "user/index.php", + "settings/index.php", + "rule/terms.php", + "rule/privacypolicy.php", + "rule/uwuzuabout.php", + "index.php", + "login.php", + "new.php", + "check.php", + "success.php", +]; + +self.addEventListener('install', function(event) { + event.waitUntil( + caches.open(CACHE_NAME) + .then( + function(cache){ + return cache.addAll(urlsToCache); + }) + ); +}); + +self.addEventListener('fetch', function(event) { + event.respondWith( + caches.match(event.request) + .then( + function (response) { + if (response) { + return response; + } + return fetch(event.request); + }) + ); +}); \ No newline at end of file diff --git a/ueuse/index.php b/ueuse/index.php new file mode 100644 index 0000000..cec3dae --- /dev/null +++ b/ueuse/index.php @@ -0,0 +1,620 @@ + PDO::ERRMODE_EXCEPTION, + PDO::MYSQL_ATTR_MULTI_STATEMENTS => false + ); + $pdo = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); + +} catch(PDOException $e) { + + // 接続エラーのときエラー内容を取得する + $error_message[] = $e->getMessage(); +} + +if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) { + + $passQuery = $pdo->prepare("SELECT username,userid,loginid,admin FROM account WHERE userid = :userid"); + $passQuery->bindValue(':userid', $_SESSION['userid']); + $passQuery->execute(); + $res = $passQuery->fetch(); + if(empty($res["userid"])){ + header("Location: ../login.php"); + exit; + }elseif($_SESSION['loginid'] === $res["loginid"]){ + // セッションに値をセット + $userid = $_SESSION['userid']; // セッションに格納されている値をそのままセット + $username = $_SESSION['username']; // セッションに格納されている値をそのままセット + $_SESSION['admin_login'] = true; + $_SESSION['userid'] = $userid; + $_SESSION['username'] = $username; + $_SESSION['loginid'] = $res["loginid"]; + setcookie('userid', $userid, time() + 60 * 60 * 24 * 14); + setcookie('username', $username, time() + 60 * 60 * 24 * 14); + setcookie('loginid', $res["loginid"], time() + 60 * 60 * 24 * 14); + setcookie('admin_login', true, time() + 60 * 60 * 24 * 14); + }else{ + header("Location: ../login.php"); + exit; + } + + +} elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) { + + $passQuery = $pdo->prepare("SELECT username,userid,loginid,admin FROM account WHERE userid = :userid"); + $passQuery->bindValue(':userid', $_COOKIE['userid']); + $passQuery->execute(); + $res = $passQuery->fetch(); + if(empty($res["userid"])){ + header("Location: ../login.php"); + exit; + }elseif($_COOKIE['loginid'] === $res["loginid"]){ + // セッションに値をセット + $userid = $_COOKIE['userid']; // クッキーから取得した値をセット + $username = $_COOKIE['username']; // クッキーから取得した値をセット + $_SESSION['admin_login'] = true; + $_SESSION['userid'] = $userid; + $_SESSION['username'] = $username; + $_SESSION['loginid'] = $res["loginid"]; + setcookie('userid', $userid, time() + 60 * 60 * 24 * 14); + setcookie('username', $username, time() + 60 * 60 * 24 * 14); + setcookie('loginid', $res["loginid"], time() + 60 * 60 * 24 * 14); + setcookie('admin_login', true, time() + 60 * 60 * 24 * 14); + }else{ + header("Location: ../login.php"); + exit; + } + + +} else { + // ログインが許可されていない場合、ログインページにリダイレクト + header("Location: ../login.php"); + exit; +} +if(empty($userid)){ + header("Location: ../login.php"); + exit; +} +if(empty($username)){ + header("Location: ../login.php"); + exit; +} + +$ueuseid = str_replace('!', '', $_GET['ueuseid']); +$touserid = str_replace('~', '', $_GET['touser']); + + +if( !empty($_POST['btn_submit']) ) { + + $ueuse = $_POST['ueuse']; + + // メッセージの入力チェック + if( empty($ueuse) ) { + $error_message[] = '内容を入力してください。'; + } else { + + // 文字数を確認 + if( 1024 < mb_strlen($ueuse, 'UTF-8') ) { + $error_message[] = '内容は1024文字以内で入力してください。'; + } + } + + + if (empty($_FILES['upload_images']['name'])) { + $photo1 = "none"; + } else { + // アップロードされたファイル情報 + $uploadedFile = $_FILES['upload_images']; + + // アップロードされたファイルの拡張子を取得 + $extension = pathinfo($uploadedFile['name'], PATHINFO_EXTENSION); + + // 新しいファイル名を生成(uniqid + 拡張子) + $newFilename = uniqid() . '-'.$userid.'.' . $extension; + + // 保存先のパスを生成 + $uploadedPath = '../ueuseimages/' . $newFilename; + + // ファイルを移動 + $result = move_uploaded_file($uploadedFile['tmp_name'], $uploadedPath); + + if ($result) { + $photo1 = $uploadedPath; // 保存されたファイルのパスを使用 + } else { + $error_message[] = 'アップロード失敗!(1)エラーコード:' . $uploadedFile['error'].'
'.var_dump($_FILES['upload_images']); + } + } + + if (empty($_FILES['upload_images2']['name'])) { + $photo2 = "none"; + } else { + + if (empty($_FILES['upload_images']['name'])){ + $error_message[] = '画像1から画像を選択してください!!!'; + } + // アップロードされたファイル情報 + $uploadedFile2 = $_FILES['upload_images2']; + + if( 10000000 < $uploadedFile2["size"] ) { + $error_message[] = 'ファイルサイズが大きすぎます!'; + } + // アップロードされたファイルの拡張子を取得 + $extension2 = pathinfo($uploadedFile2['name'], PATHINFO_EXTENSION); + + // 新しいファイル名を生成(uniqid + 拡張子) + $newFilename2 = uniqid() . '-'.$userid.'.' . $extension2; + + // 保存先のパスを生成 + $uploadedPath2 = '../ueuseimages/' . $newFilename2; + + // ファイルを移動 + $result2 = move_uploaded_file($uploadedFile2['tmp_name'], $uploadedPath2); + + if ($result2) { + $photo2 = $uploadedPath2; // 保存されたファイルのパスを使用 + } else { + $error_message[] = 'アップロード失敗!(2)エラーコード:' . $uploadedFile2['error'].'
'.var_dump($_FILES['upload_images']); + } + } + + + if (empty($_FILES['upload_videos1']['name'])) { + $video1 = "none"; + } else { + // アップロードされたファイル情報 + $uploadedFile3 = $_FILES['upload_videos1']; + + // アップロードされたファイルの拡張子を取得 + $extension3 = strtolower(pathinfo($uploadedFile3['name'], PATHINFO_EXTENSION)); // 小文字に変換 + + // サポートされている動画フォーマットの拡張子を配列で定義 + $supportedExtensions = array("mp4", "avi", "mov", "webm"); + + if (in_array($extension3, $supportedExtensions)) { + // 正しい拡張子の場合、新しいファイル名を生成 + $newFilename3 = uniqid() . '-'.$userid.'.' . $extension3; + // 保存先のパスを生成 + $uploadedPath3 = '../ueusevideos/' . $newFilename3; + + // ファイルを移動 + $result3 = move_uploaded_file($uploadedFile3['tmp_name'], $uploadedPath3); + + if ($result3) { + $video1 = $uploadedPath3; // 保存されたファイルのパスを使用 + } else { + $error_message[] = 'アップロード失敗!エラーコード:' . $uploadedFile3['error']; + } + } else { + $error_message[] = '対応していないファイル形式です!'; + } + + + } + + if( empty($error_message) ) { + + // 書き込み日時を取得 + $datetime = date("Y-m-d H:i:s"); + $uniqid = createUniqId(); + $abi = "none"; + + // トランザクション開始 + $pdo->beginTransaction(); + + try { + + // SQL作成 + $stmt = $pdo->prepare("INSERT INTO ueuse (username, account, uniqid, rpuniqid, ueuse, photo1, photo2, video1, datetime, abi) VALUES (:username, :account, :uniqid, :rpuniqid, :ueuse, :photo1, :photo2, :video1, :datetime, :abi)"); + + $stmt->bindParam(':username', $username, PDO::PARAM_STR); + $stmt->bindParam(':account', $userid, PDO::PARAM_STR); + $stmt->bindParam(':uniqid', $uniqid, PDO::PARAM_STR); + $stmt->bindParam(':rpuniqid', $ueuseid, PDO::PARAM_STR); + $stmt->bindParam(':ueuse', $ueuse, PDO::PARAM_STR); + + $stmt->bindParam(':photo1', $photo1, PDO::PARAM_STR); + $stmt->bindParam(':photo2', $photo2, PDO::PARAM_STR); + $stmt->bindParam(':video1', $video1, PDO::PARAM_STR); + $stmt->bindParam(':datetime', $datetime, PDO::PARAM_STR); + + $stmt->bindParam(':abi', $abi, PDO::PARAM_STR); + + // SQLクエリの実行 + $res = $stmt->execute(); + + // コミット + $res = $pdo->commit(); + + $pdo->beginTransaction(); + + $msg = ''.$ueuse.''; + $title = ''.$userid.'さんが返信しました!'; + $url = $_SERVER['REQUEST_URI']; + $userchk = 'none'; + // 通知用SQL作成 + $stmt = $pdo->prepare("INSERT INTO notification (touserid, msg, url, datetime, userchk, title) VALUES (:touserid, :msg, :url, :datetime, :userchk, :title)"); + + $stmt->bindParam(':touserid', $touserid, PDO::PARAM_STR); + $stmt->bindParam(':msg', $msg, PDO::PARAM_STR); + $stmt->bindParam(':url', $url, PDO::PARAM_STR); + $stmt->bindParam(':userchk', $userchk, PDO::PARAM_STR); + $stmt->bindParam(':title', $title, PDO::PARAM_STR); + + $stmt->bindParam(':datetime', $datetime, PDO::PARAM_STR); + + // SQLクエリの実行 + $res = $stmt->execute(); + + // コミット + $res = $pdo->commit(); + + } catch(Exception $e) { + + // エラーが発生した時はロールバック + $pdo->rollBack(); + } + + if( $res ) { + $url = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; + header("Location:".$url.""); + exit; + } else { + $error_message[] = $e->getMessage(); + } + + // プリペアドステートメントを削除 + $stmt = null; + } +} + +if( !empty($_POST['logout']) ) { + if (isset($_SERVER['HTTP_COOKIE'])) { + $cookies = explode(';', $_SERVER['HTTP_COOKIE']); + foreach($cookies as $cookie) { + $parts = explode('=', $cookie); + $name = trim($parts[0]); + setcookie($name, '', time()-1000); + setcookie($name, '', time()-1000, '/'); + } + } + // リダイレクト先のURLへ転送する + $url = '../index.php'; + header('Location: ' . $url, true, 303); + + // すべての出力を終了 + exit; +} + + + +// データベースの接続を閉じる +$pdo = null; + +?> + + + + + + + + + + +ID <?php echo htmlspecialchars($ueuseid, ENT_QUOTES, 'UTF-8'); ?> のユーズ - uwuzu + + + + + +
+ +
    + +

    + +
+ + +
+

返信

+
+ +
+
+ +

画像のEXIF情報(位置情報など)は削除されません。
情報漏洩に気をつけてくださいね…

+
+ + + + + +
+
+
+ + +
+
+ +
+
+ + + + + + +
+ + + + + + \ No newline at end of file diff --git a/user/headimage.php b/user/headimage.php new file mode 100644 index 0000000..8bf5c1d --- /dev/null +++ b/user/headimage.php @@ -0,0 +1,78 @@ + PDO::ERRMODE_EXCEPTION, + PDO::MYSQL_ATTR_MULTI_STATEMENTS => false +); +$pdo = new PDO('mysql:charset=UTF8;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); + + +//$row['userid'] = "daichimarukn"; + +$userid = $_GET['account']; + + +$options = array( + // SQL実行失敗時に例外をスルー + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + // デフォルトフェッチモードを連想配列形式に設定 + PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, + // バッファードクエリを使う(一度に結果セットを全て取得し、サーバー負荷を軽減) + // SELECTで得た結果に対してもrowCountメソッドを使えるようにする + PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true, +); + +if( empty($userid) ) { + $filePath = 'img/deficon/icon.png'; + $data = file_get_contents($filePath); + header('Content-type: image/png'); + //データを出力 + echo $data; + exit(); +}else{ + $dbh = new PDO('mysql:charset=UTF8;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); + + + $result = $dbh->prepare("SELECT headname, headcontent, headtype, headsize profile FROM account WHERE userid = :userid"); + + $result->bindValue(':userid', $userid); + // SQL実行 + $result->execute(); + + + $row = $result->fetch(); // ここでデータベースから取得した値を $row に代入する + + + + header('Content-type: ' . $row['headtype']); + echo $row['headcontent']; + exit(); +} \ No newline at end of file diff --git a/user/index.php b/user/index.php new file mode 100644 index 0000000..cb1e816 --- /dev/null +++ b/user/index.php @@ -0,0 +1,646 @@ + PDO::ERRMODE_EXCEPTION, + PDO::MYSQL_ATTR_MULTI_STATEMENTS => false + ); + $pdo = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); + +} catch(PDOException $e) { + + // 接続エラーのときエラー内容を取得する + $error_message[] = $e->getMessage(); +} + +if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) { + + $passQuery = $pdo->prepare("SELECT username,userid,loginid,admin FROM account WHERE userid = :userid"); + $passQuery->bindValue(':userid', $_SESSION['userid']); + $passQuery->execute(); + $res = $passQuery->fetch(); + if(empty($res["userid"])){ + header("Location: ../login.php"); + exit; + }elseif($_SESSION['loginid'] === $res["loginid"]){ + // セッションに値をセット + $userid = $_SESSION['userid']; // セッションに格納されている値をそのままセット + $username = $_SESSION['username']; // セッションに格納されている値をそのままセット + $_SESSION['admin_login'] = true; + $_SESSION['userid'] = $userid; + $_SESSION['username'] = $username; + $_SESSION['loginid'] = $res["loginid"]; + setcookie('userid', $userid, time() + 60 * 60 * 24 * 14); + setcookie('username', $username, time() + 60 * 60 * 24 * 14); + setcookie('loginid', $res["loginid"], time() + 60 * 60 * 24 * 14); + setcookie('admin_login', true, time() + 60 * 60 * 24 * 14); + }else{ + header("Location: ../login.php"); + exit; + } + + +} elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) { + + $passQuery = $pdo->prepare("SELECT username,userid,loginid,admin FROM account WHERE userid = :userid"); + $passQuery->bindValue(':userid', $_COOKIE['userid']); + $passQuery->execute(); + $res = $passQuery->fetch(); + if(empty($res["userid"])){ + header("Location: ../login.php"); + exit; + }elseif($_COOKIE['loginid'] === $res["loginid"]){ + // セッションに値をセット + $userid = $_COOKIE['userid']; // クッキーから取得した値をセット + $username = $_COOKIE['username']; // クッキーから取得した値をセット + $_SESSION['admin_login'] = true; + $_SESSION['userid'] = $userid; + $_SESSION['username'] = $username; + $_SESSION['loginid'] = $res["loginid"]; + setcookie('userid', $userid, time() + 60 * 60 * 24 * 14); + setcookie('username', $username, time() + 60 * 60 * 24 * 14); + setcookie('loginid', $res["loginid"], time() + 60 * 60 * 24 * 14); + setcookie('admin_login', true, time() + 60 * 60 * 24 * 14); + }else{ + header("Location: ../login.php"); + exit; + } + + +} else { + // ログインが許可されていない場合、ログインページにリダイレクト + header("Location: ../login.php"); + exit; +} +if(empty($userid)){ + header("Location: ../login.php"); + exit; +} +if(empty($username)){ + header("Location: ../login.php"); + exit; +} + + +function customStripTags($html, $allowedTags) { + $allowedTagsString = '<' . implode('><', $allowedTags) . '>'; + return strip_tags($html, $allowedTagsString); +} + +$allowedTags = array('h1', 'h2', 'h3', 'center', 'font'); + +if( !empty($pdo) ) { + + // データベース接続の設定 + $dbh = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST, DB_USER, DB_PASS, array( + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, + PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true, + )); + + $uwuzuid = str_replace('@', '', $_GET['uwuzuid']); + + // ユーズ内の絵文字を画像に置き換える + function replaceEmojisWithImages($postText) { + // ユーズ内で絵文字名(:emoji:)を検出して画像に置き換える + $pattern = '/:(\w+):/'; + $postTextWithImages = preg_replace_callback($pattern, function($matches) { + $emojiName = $matches[1]; + return "$emojiName"; + }, $postText); + return $postTextWithImages; + } + + function replaceURLsWithLinks($postText) { + // URLを正規表現を使って検出 + $pattern = '/(https?:\/\/[^\s]+)/'; + preg_match_all($pattern, $postText, $matches); + + // 検出したURLごとに処理を行う + foreach ($matches[0] as $url) { + // ドメイン部分を抽出 + $parsedUrl = parse_url($url); + $domain = isset($parsedUrl['host']) ? $parsedUrl['host'] : ''; + + // ドメインのみを表示するaタグを生成 + $link = "$domain"; + + // URLをドメインのみを表示するaタグで置き換え + $postText = str_replace($url, $link, $postText); + } + + return $postText; + } + + $userQuery = $dbh->prepare("SELECT username, userid, profile, role, follower FROM account WHERE userid = :userid"); + $userQuery->bindValue(':userid', $uwuzuid); + $userQuery->execute(); + $userData = $userQuery->fetch(); + + + if(!empty($userData["userid"])){ + + + $roles = explode(',', $userData["role"]); // カンマで区切られたロールを配列に分割 + + $rerole = $dbh->prepare("SELECT follow, follower, username, userid, password, mailadds, profile, iconname, iconcontent, icontype, iconsize, headname, headcontent, headtype, headsize, role, datetime FROM account WHERE userid = :userid"); + + $rerole->bindValue(':userid', $uwuzuid); + // SQL実行 + $rerole->execute(); + + $userdata = $rerole->fetch(); // ここでデータベースから取得した値を $role に代入する + + $roleDataArray = array(); + + foreach ($roles as $roleId) { + $rerole = $dbh->prepare("SELECT rolename, roleauth, rolecolor FROM role WHERE roleidname = :role"); + $rerole->bindValue(':role', $roleId); + $rerole->execute(); + $roleDataArray[$roleId] = $rerole->fetch(); + } + + + //-------フォロー数--------- + $follow = $userdata['follow']; // コンマで区切られたユーザーIDを含む変数 + + // コンマで区切って配列に分割し、要素数を数える + $followIds = explode(',', $follow); + $followCount = count($followIds)-1; + + $follow_on_me = strpos($follow, $userid); + if ($follow_on_me !== false) { + $follow_yes = "フォローされています"; // worldを含む:6 + }else{ + $follow_yes = ""; // worldを含む:6 + } + + //-------フォロワー数--------- + $follower = $userdata['follower']; // コンマで区切られたユーザーIDを含む変数 + + // コンマで区切って配列に分割し、要素数を数える + $followerIds = explode(',', $follower); + $followerCount = count($followerIds)-1; + + $profileText = htmlspecialchars($userData['profile'], ENT_QUOTES, 'UTF-8'); + + }else{ + $userData["userid"] = "none"; + $userData['username'] = "ゆーざーなし"; + } +} + +if (!empty($_POST['follow'])) { + // フォローボタンが押された場合の処理 + $followerList = explode(',', $userdata['follower']); + if (!in_array($userid, $followerList)) { + // 自分が相手をフォローしていない場合、相手のfollowerカラムと自分のfollowカラムを更新 + $followerList[] = $userid; + $newFollowerList = implode(',', $followerList); + + // UPDATE文を実行してフォロー情報を更新 + $updateQuery = $pdo->prepare("UPDATE account SET follower = :follower WHERE userid = :userid"); + $updateQuery->bindValue(':follower', $newFollowerList, PDO::PARAM_STR); + $updateQuery->bindValue(':userid', $userData['userid'], PDO::PARAM_STR); + $res = $updateQuery->execute(); + + // 自分のfollowカラムを更新 + $updateQuery = $pdo->prepare("UPDATE account SET follow = CONCAT_WS(',', follow, :follow) WHERE userid = :userid"); + $updateQuery->bindValue(':follow', $userData["userid"], PDO::PARAM_STR); + $updateQuery->bindValue(':userid', $userid, PDO::PARAM_STR); + $res_follow = $updateQuery->execute(); + + if ($res && $res_follow) { + $url = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; + header("Location:" . $url); + exit; + } else { + $error_message[] = '更新に失敗しました。'; + } + + $stmt = null; + } +} elseif (!empty($_POST['unfollow'])) { + // フォロー解除ボタンが押された場合の処理 + $followerList = explode(',', $userdata['follower']); + if (in_array($userid, $followerList)) { + // 自分が相手をフォローしている場合、相手のfollowerカラムと自分のfollowカラムを更新 + $followerList = array_diff($followerList, array($userid)); + $newFollowerList = implode(',', $followerList); + + // UPDATE文を実行してフォロー情報を更新 + $updateQuery = $pdo->prepare("UPDATE account SET follower = :follower WHERE userid = :userid"); + $updateQuery->bindValue(':follower', $newFollowerList, PDO::PARAM_STR); + $updateQuery->bindValue(':userid', $userData['userid'], PDO::PARAM_STR); + $res = $updateQuery->execute(); + + $deluserid = ",".$userdata["userid"]; + // 自分のfollowカラムから相手のユーザーIDを削除 + $updateQuery = $pdo->prepare("UPDATE account SET follow = REPLACE(follow, :follow, '') WHERE userid = :userid"); + $updateQuery->bindValue(':follow', $deluserid, PDO::PARAM_STR); + $updateQuery->bindValue(':userid', $userid, PDO::PARAM_STR); + $res_follow = $updateQuery->execute(); + + if ($res && $res_follow) { + $url = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; + header("Location:" . $url); + exit; + } else { + $error_message[] = '更新に失敗しました。'; + } + + $stmt = null; + } +} + + + +if( !empty($_POST['logout']) ) { + if (isset($_SERVER['HTTP_COOKIE'])) { + $cookies = explode(';', $_SERVER['HTTP_COOKIE']); + foreach($cookies as $cookie) { + $parts = explode('=', $cookie); + $name = trim($parts[0]); + setcookie($name, '', time()-1000); + setcookie($name, '', time()-1000, '/'); + } + } + // リダイレクト先のURLへ転送する + $url = '../index.php'; + header('Location: ' . $url, true, 303); + + // すべての出力を終了 + exit; +} + + + +// データベースの接続を閉じる +$pdo = null; + +?> + + + + + + + + + + +<?php echo htmlspecialchars($userData['username'], ENT_QUOTES, 'UTF-8'); ?> さんのプロフィール - <?php echo file_get_contents($servernamefile);?> + + + + + +
+ + +
    + +

    + +
+ + +
+ +

このユーザーは存在しません

+ +
+ +
+
+ +

+

@

+
+ +
+ + +
;"> +

;"> + +

+
+ +
+ +
+

+
+ +
+
+
+

からuwuzuを利用しています。

+

フォロー数: フォロワー数:

+
+ + + + + + +
+ +
+ + +
+ + + + + +
+
+
+ +
+
+ + + + + + + +
+ + + + + + + + + + + \ No newline at end of file