From bb83abafad986c3f4fc9135614a250e79f5ed3a4 Mon Sep 17 00:00:00 2001
From: Aaron Junker
Date: Mon, 14 Sep 2020 18:27:51 +0200
Subject: [PATCH] push
---
CHANGELOG.md | 31 +++-
README.md | 2 +-
SECURITY.md | 2 +-
site/admin/index.php | 4 +-
site/admin/pages/about.php | 2 +-
site/changepassword.php | 2 +-
site/includes/class.inc.php | 16 +-
site/includes/getErrorSite.inc.php | 4 +-
site/includes/getLang.inc.php | 4 +-
site/includes/getProfilePicture.inc.php | 4 +-
site/includes/getSetting.inc.php | 4 +-
site/install/index.php | 1 +
site/lang/en-en.json | 17 ++-
site/login.php | 50 +++---
site/logout.php | 9 +-
site/{profil.php => profile.php} | 193 ++++++++++++------------
site/register.php | 10 +-
17 files changed, 200 insertions(+), 155 deletions(-)
rename site/{profil.php => profile.php} (80%)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b0babb83f..8a7e22e15 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,15 +1,30 @@
-# Pb2.0Bfx0
+# Pb2.0Bfx0RCA
+> This Version isn't backward compatible to older versions
+
+> The install wizard doesn't work.
+
+This is a release Candidate version. Issues will be tracked in #49
+
+## Additions
* Added better class system
-* Better organisation of code
* Added HTTP-Errors 400, 405, 410, 414, 423
-* Updated files to new code conventions
+* Added experimental information to installer.
+## Changes
+* Better organisation of code
+* Renamed profil.php in profile.php
+* Added more documentation to code
+* Moved blogsite, index and HTTP-Errors to page.php
* Added all translations
+* Updated files to new code conventions
+## Removed
* Removed is_there_usoc.json
-* Added more documentation
-* Moved HTTP-Errors to page.php
-* Moved index page to normal pages.
-* Moved blogsite to page.php
-* fixed #48
+* /errors/*
+* blog.php
+* blogsite.php
+* option for a hash
+## Fixed bugs
+* #48
+* And other
# Pb1.8Bfx0
* Fixed #43, #28 and other bugs.
# Pb1.7Bfx1
diff --git a/README.md b/README.md
index 4c6e8907a..49d2900be 100644
--- a/README.md
+++ b/README.md
@@ -18,7 +18,7 @@
[](https://www.codacy.com/gh/Case-Games/USOC?utm_source=github.com&utm_medium=referral&utm_content=Case-Games/USOC&utm_campaign=Badge_Grade)
Useful simple open-source CMS
-
+
# Is it ready to use
No. In the moment you shouldn't use it
# How can I help
diff --git a/SECURITY.md b/SECURITY.md
index 13b737a99..989aed0f4 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -9,7 +9,7 @@ Old pre-alpha and pre-beta versions aren't supported with bugfixes.
### Pre-Beta
| Version | Supported|Newest Version|
| ------- | ---------|--------------|
-| Pb2.0 | :x: | Pb2.0Bfx0 |
+| Pb2.0 | :x: | Pb2.0Bfx0RCA |
| Pb1.8 | :x: | Pb1.8Bfx0 |
| Pb1.7 | :x: | Pb1.7Bfx1 |
| Pb1.6 | :x: | Pb1.6Bfx0 |
diff --git a/site/admin/index.php b/site/admin/index.php
index 8d0e21c2c..b96f9d79e 100644
--- a/site/admin/index.php
+++ b/site/admin/index.php
@@ -26,9 +26,9 @@
}else{
?>
diff --git a/site/admin/pages/about.php b/site/admin/pages/about.php
index 9e543751f..867d874e2 100644
--- a/site/admin/pages/about.php
+++ b/site/admin/pages/about.php
@@ -13,7 +13,7 @@
Back
USOC
Useful Simple Open-source CMS
- getLang("admin.about.version") ?>: Pb2.0Bfx0
+ getLang("admin.about.version") ?>: Pb2.0Bfx0RCA
getLang("admin.about.license") ?>
By Case Games 2020
getLang("admin.about.developed_by") ?>
diff --git a/site/changepassword.php b/site/changepassword.php
index b7fc9b674..8e66023c6 100644
--- a/site/changepassword.php
+++ b/site/changepassword.php
@@ -5,7 +5,7 @@
newClass();
?>
- dir="ltr">
+" dir="ltr">
Install USOC
+ Experimantal feature. Sometimes doesn't work
- Version: Pa1.8Bfx0
- You need PHP 7: 69999){echo "Yes!";}else{echo "You must update!";} ?>
diff --git a/site/lang/en-en.json b/site/lang/en-en.json
index a3db0f296..4e0ad6074 100644
--- a/site/lang/en-en.json
+++ b/site/lang/en-en.json
@@ -20,14 +20,18 @@
"login.login_closed": "Login closed",
"login.succeed": "Login succeeded",
"login.fail": "Login failed",
- "login.not_logged_in": "Not logged in",
+ "login.not_logged_in": "Not logged in.",
+ "login.already": "Already logged in",
"login.locked": "Your %d is permanently blocked",
"login.account": "account",
- "login.2fa": "2 factor authentication",
+ "login.2fa": "Two factor authentication",
+ "login.2fa.with": "Two factor authentication with %a",
"login.2fa.false_code": "Code isn't correct",
"login.2fa.succeed": "%a connected",
+ "login.2fa.already": "Already connected.",
"login.2fa.google_authenticator": "Google Authenticator",
"login.2fa.google_authenticator.code": "Code from the Google Authenticator App:",
+ "login.2fa.google_authenticator.manual": "Two factor authentication with Google AuthenticatorScan following code with Google Authenticator
Attention! If you log in with your Google Account 2Fa doesn't work
",
"login.changepass": "Change password",
"login.changepass.twopassword": "Please type in two times the equal password. Or please type in a valid password.",
"login.changepass.not_filled": "Not everything filled up or not logged in.",
@@ -40,12 +44,18 @@
"login.oAuth.google": "Google Account",
"login.oAuth.fail": "Already a %a connected",
"login.oAuth.error_fail": "Error",
+ "login.oAuth.connect": "Connect %a",
"login.invalid": "Invalid %a",
"login.username": "username",
"login.password": "password",
+ "login.password.repeat": "repeat password",
+ "login.username.g": "Username",
+ "login.password.g": "Password",
+ "login.password.repeat.g": "Repeat password",
"login.mail": "mailadress",
"login.fail_same_password": "Not the same password",
"login.fillout": "Please fill out everything",
+ "login.logout": "You're logged out",
"blog": "blog",
"blog.readmore": "Read more...",
"login.account.password_changed": "Password changed",
@@ -77,4 +87,7 @@
"admin.send": "Send",
"admin.back": "Back",
"admin.welcome": "Welcome!",
+ "profile": "Profile",
+ "profile.settings": "Profile settings",
+ ""
}
diff --git a/site/login.php b/site/login.php
index ce123ec43..c8ce2628b 100644
--- a/site/login.php
+++ b/site/login.php
@@ -1,4 +1,9 @@
-
+
" dir="ltr">
@@ -34,26 +39,29 @@ function onSignIn(googleUser) {
?>
".getError($_GET["ERROR"],"de")."
";
- }
- if (isset($_SESSION["User_ID"])) {
- echo "Bereits angemeldet";
- }elseif($U->getSetting("login.login_open")==0){
- echo "Login Geschlossen
";
- }else{
- echo <<
- Benutzername:
-
- Passwort:
-
-
-
- Mit Google anmelden
-
- HEREDOC;
- }
+ if(isset($_GET["ERROR"])){
+ echo "".@getError($_GET["ERROR"],"de")."
";
+ }
+ if (isset($_SESSION["User_ID"])) {
+ echo $U->getLang("login.already");
+ }elseif($U->getSetting("login.login_open")==0){
+ echo "".$U->getLang("login.login_closed")."
";
+ }else{
+ $HTML = <<
+
+
+
+
+
+
+ Mit Google anmelden
+
+ HEREDOC;
+ $HTML = str_replace("%a",$U->getLang("login.username.g"),$HTML);
+ $HTML = str_replace("%b",$U->getLang("login.password.g"),$HTML);
+ echo $HTML;
+ }
?>
HEREDOC;
+ $HTML = str_replace("%a",$U->getLang("login.mail.g"),$HTML);
+ $HTML = str_replace("%b",$U->getLang("login.password.g"),$HTML);
+ $HTML = str_replace("%c",$U->getLang("login.password.repeat.g"),$HTML);
echo $HTML;
}else{
echo $U->getLang("register.succeed");