diff --git a/.env b/.env index 9484040..61ff939 100755 --- a/.env +++ b/.env @@ -1,28 +1,33 @@ -DEBUG=false +DEBUG=false # set up the debug mode -APP_NAME="RED-Host.EU" -APP_DOMAIN="RED-Host.EU" -VERSION_DATE="1.9.4 (07.01.2021)" +APP_NAME="hosting" # project name +APP_DOMAIN="cp.hosting.de" # project domain for frontend design +VERSION_DATE="1.9.4 (07.01.2021)" # version date -DB_HOST="localhost" -DB_NAME="" -DB_USER="" -DB_PASS="" +DB_HOST="localhost" # datebase host +DB_NAME="" # database name +DB_USER="" # databse username +DB_PASS="" # database password -CRONE_KEY="" -WEBSPACE_HOST_URL="" -WEBSPACE_HOST_PLAIN_URL="" +FRONT_URL="hosting.de" # domain for frontend design +URL="http://localhost/" # url from the website +CDN_URL="${URL}assets/style/" # nothing to change +PIC_URL="${URL}assets/images/" # nothing to change + +URL_STATUS="" +URL_TWITTER="https://twitter.com/" +URL_DISCORD="https://discord.gg/xxxxxxxx" -URL="https://cp.red-host.eu/" -CDN_URL="${URL}assets/style/" -PIC_URL="${URL}assets/images/" +SUPPORT_EMAIL="support@hosting.de" +PAYPAL_EMAIL="payment@hosting.de" -PAYPAL_EMAIL="payment@red-host.eu" +CRONE_KEY="" # key for cronjobs +GLOBAL_API_KEY="" # api key for the included discord api -DISCORD_WEBHOOK_URL="" -DISCORD_AVATAR_URL="" -DISCORD_NAME="" +DISCORD_WEBHOOK_URL="" # webhook url for notifications into discord +DISCORD_AVATAR_URL="" # avatar url +DISCORD_NAME="" # name for the notifications H_CAPTCHA_SITE_KEY="" H_CAPTCHA_SECRET_KEY="" @@ -30,13 +35,12 @@ H_CAPTCHA_SECRET_KEY="" BOLTLAYER_API_KEY="" VENOCIX_API_TOKEN="" +VENOCIX_API_KEY="" +WEBSPACE_HOST_URL="" +WEBSPACE_HOST_PLAIN_URL="" CUSTOM_WEBSPACE_SUBDOMAIN="" -GLOBAL_API_KEY="" - -VENOCIX_API_KEY="" - TEAMSPEAK_TOOLTIP_LINK="" TEAMSPEAK_TOOLTIP_IMG="" TEAMSPEAK_TOOLTIP_HOVER="" @@ -45,6 +49,6 @@ TEAMSPEAK_BANNER_LINK="" TEAMSPEAK_BANNER_INTERVAL="60" TEAMSPEAK_BANNER_MODE="0x02" -PTERODACTYL_USER_URL="" -PTERODACTYL_BASE_URL="" -PTERODACTYL_API_KEY="" \ No newline at end of file +PTERODACTYL_USER_URL="" # url to pterodactyl +PTERODACTYL_BASE_URL="" # url to pterodactyl +PTERODACTYL_API_KEY="" # key diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4f38912 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.idea +vendor +composer.lock diff --git a/README.md b/README.md index 2d97a7b..a412d30 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,8 @@ # RED-Host Panel -Daher damit der Tobias B. der Meinung ist, dieses Panel an tausenden Menschen zu verkaufen oder sogar kostenlos weiterzugeben - veröffentliche ich dieses Panel nun hier. Dann hat wenigstens jeder etwas davon. +Hier wurde das originale RED-Host Panel veröffentlicht. Bisher wurden schon einige Neuerungen veröffentlicht, die einige Konfigurationen, Sicherheitsaspekte und weiteres beinhalten. -### Hinweis: -Bei Bedarf kann durch mich oder dem Team, der Schleyer-EDV eine Weiterenwicklung des Panels kostengünstig veranlasst werden. -Zudem übernehmen wir bzw. ich keine Haftung für dieses Panel und werde auch keinen Support leisten. +Wir, die Schleyer-EDV, arbeiten bereits schon an einem riesigen Update für das Panel. Ein Release wird unter einer neuen Branch oder Release-Version signalisiert, welcher bis Ende des Jahres geplant ist. -## Update 18.04.2021 - 18:51 Uhr -Dadurch damit das Panel mit vollständigen Funktionen und Co. weitergeschickt wird. Poste ich dieses Update, wie es im originalen Zustand war. -Im Gegensatz zu der von mir veröffentlichten Version, beinhaltet dieses Update alle Funktionen, Features und Co. - - -### Nochmal als Link: https://dl.bschleyer.de/cp.red-host.eu.zip - -# KEIN SUPPORT! +Es gibt nun einen Discord, wo wir eine Kategorie nur für das RED-Host Panel eingerichtet haben. Alle neuesten Informationen können dort abgerufen werden. Zusätzlich sind wir für Vorschläge jederzeit offen, auch diese können dort gepostet werden. +Link: https://discord.gg/nvR2F4uZWS diff --git a/app/crone/WORKER/gameserver_order.php b/app/crone/WORKER/gameserver_order.php index 57bb388..5213542 100755 --- a/app/crone/WORKER/gameserver_order.php +++ b/app/crone/WORKER/gameserver_order.php @@ -36,7 +36,7 @@ 'databases' => 1, 'allocations' => 1 ]; -$response = $pterodactyl->create('GameServer by RED-Host.EU', $user->getDataById($userid, 'pterodactyl_id'),5, $limits, $feature_limits); +$response = $pterodactyl->create('GameServer by ' . env('APP_NAME'), $user->getDataById($userid, 'pterodactyl_id'),5, $limits, $feature_limits); if(!is_numeric($response->id)){ $update = $db->prepare("UPDATE `queue` SET `retries` = :retries, `error_log` = :error_log WHERE `id` = :id"); @@ -52,4 +52,4 @@ $SQL = $db->prepare("INSERT INTO `pterodactyl_servers`(`user_id`, `service_id`, `uuid`, `identifier`, `memory`, `cpu`, `disk`, `allocation_id`, `price`, `state`, `expire_at`) VALUES (?,?,?,?,?,?,?,?,?,?,?)"); $SQL->execute(array($userid, $response_data->id, $response_data->uuid, $response_data->identifier, $memory, $cpu, $disk, $response_data->allocation, $db_price, 'active', $expire_at)); -} \ No newline at end of file +} diff --git a/app/functions/Helper.php b/app/functions/Helper.php index de1cf63..f3f332e 100755 --- a/app/functions/Helper.php +++ b/app/functions/Helper.php @@ -2,12 +2,13 @@ $helper = new Helper(); -class helper extends Controller +class Helper extends Controller { public function protect($string) { - $protection = htmlspecialchars(trim($string), ENT_QUOTES); + $protection = htmlspecialchars(trim($string), ENT_HTML401); + return $protection; } @@ -30,6 +31,7 @@ public function nl2br2($string) { $string = $this->xssFix($string); $string = str_replace(array("\r\n", "\r", "\n"), "
", $string); + return $string; } @@ -81,4 +83,4 @@ public function isa_convert_bytes_to_specified($bytes, $to, $decimal_places = 1) } } -?> \ No newline at end of file +?> diff --git a/app/functions/User.php b/app/functions/User.php index 1dac418..3ccb73b 100755 --- a/app/functions/User.php +++ b/app/functions/User.php @@ -59,7 +59,7 @@ public function verifyLogin($data, $password) public function generateSessionToken($data) { - $session_token = helper::generateRandomString(30); + $session_token = (new Helper)->generateRandomString(30); $SQL = self::db()->prepare("UPDATE `users` SET `session_token` = :session_token WHERE `email` = :email OR `username` = :username"); $SQL->execute(array(":session_token" => $session_token, ":email" => $data, ":username" => $data)); @@ -163,29 +163,253 @@ public function getOS($user_agent) $os_platform = "Unbekannt"; $os_array = array( - '/windows nt 10/i' => 'Windows 10', - '/windows nt 6.3/i' => 'Windows 8.1', - '/windows nt 6.2/i' => 'Windows 8', - '/windows nt 6.1/i' => 'Windows 7', - '/windows nt 6.0/i' => 'Windows Vista', - '/windows nt 5.2/i' => 'Windows Server 2003/XP x64', - '/windows nt 5.1/i' => 'Windows XP', - '/windows xp/i' => 'Windows XP', - '/windows nt 5.0/i' => 'Windows 2000', - '/windows me/i' => 'Windows ME', - '/win98/i' => 'Windows 98', - '/win95/i' => 'Windows 95', - '/win16/i' => 'Windows 3.11', - '/macintosh|mac os x/i' => 'Mac OS X', - '/mac_powerpc/i' => 'Mac OS 9', - '/linux/i' => 'Linux', - '/ubuntu/i' => 'Ubuntu', - '/iphone/i' => 'iPhone', - '/ipod/i' => 'iPod', - '/ipad/i' => 'iPad', - '/android/i' => 'Android', - '/blackberry/i' => 'BlackBerry', - '/webos/i' => 'Mobile' + // Windows 11 Versionen + '/windows nt 11\.0/i' => 'Windows 11', + '/windows nt 11\.1/i' => 'Windows 11 Home', + '/windows nt 11\.2/i' => 'Windows 11 Pro', + '/windows nt 11\.3/i' => 'Windows 11 Enterprise', + '/windows nt 11\.4/i' => 'Windows 11 Education', + '/windows nt 11\.5/i' => 'Windows 11 IoT Enterprise', + '/windows nt 11\.6/i' => 'Windows 11 IoT Enterprise (Evaluation)', + '/windows nt 11\.7/i' => 'Windows 11 IoT Enterprise (LTSB)', + '/windows nt 11\.8/i' => 'Windows 11 IoT Enterprise (LTSC)', + '/windows nt 11\.9/i' => 'Windows 11 IoT Core', + + // Windows 10 Versionen + '/windows nt 10\.0/i' => 'Windows 10', + '/windows nt 10\.1/i' => 'Windows 10 Home', + '/windows nt 10\.2/i' => 'Windows 10 Pro', + '/windows nt 10\.3/i' => 'Windows 10 Enterprise', + '/windows nt 10\.4/i' => 'Windows 10 Education', + '/windows nt 10\.5/i' => 'Windows 10 IoT Enterprise', + '/windows nt 10\.6/i' => 'Windows 10 IoT Enterprise (Evaluation)', + '/windows nt 10\.7/i' => 'Windows 10 IoT Enterprise (LTSB)', + '/windows nt 10\.8/i' => 'Windows 10 IoT Enterprise (LTSC)', + '/windows nt 10\.9/i' => 'Windows 10 IoT Core', + '/windows nt 10\.10/i' => 'Windows 10 S', + '/windows nt 10\.11/i' => 'Windows 10 (Version 20H2)', + '/windows nt 10\.12/i' => 'Windows 10 (Version 21H1)', + '/windows nt 10\.13/i' => 'Windows 10 (Version 21H2)', + '/windows nt 10\.14/i' => 'Windows 10 (Version 22H1)', + '/windows nt 10\.15/i' => 'Windows 10 (Version 22H2)', + '/windows nt 10\.16/i' => 'Windows 10 (Version 23H1)', + '/windows nt 10\.17/i' => 'Windows 10 (Version 23H2)', + '/windows nt 10\.18/i' => 'Windows 10 (Version 24H1)', + '/windows nt 10\.19/i' => 'Windows 10 (Version 24H2)', + '/windows nt 10\.20/i' => 'Windows 10 (Version 25H1)', + '/windows nt 10\.21/i' => 'Windows 10 (Version 25H2)', + '/windows nt 10\.22/i' => 'Windows 10 (Version 26H1)', + + // Mac OS Versionen + '/macintosh|mac os x 10_15/i' => 'Mac OS X 10.15 Catalina', + '/macintosh|mac os x 10_14/i' => 'Mac OS X 10.14 Mojave', + '/macintosh|mac os x 10_13/i' => 'Mac OS X 10.13 High Sierra', + '/macintosh|mac os x 10_12/i' => 'Mac OS X 10.12 Sierra', + '/macintosh|mac os x 10_11/i' => 'Mac OS X 10.11 El Capitan', + '/macintosh|mac os x 10_10/i' => 'Mac OS X 10.10 Yosemite', + '/macintosh|mac os x 10_9/i' => 'Mac OS X 10.9 Mavericks', + '/macintosh|mac os x 10_8/i' => 'Mac OS X 10.8 Mountain Lion', + '/macintosh|mac os x 10_7/i' => 'Mac OS X 10.7 Lion', + '/macintosh|mac os x 10_6/i' => 'Mac OS X 10.6 Snow Leopard', + '/macintosh|mac os x 10_5/i' => 'Mac OS X 10.5 Leopard', + '/macintosh|mac os x 10_4/i' => 'Mac OS X 10.4 Tiger', + '/macintosh|mac os x 10_3/i' => 'Mac OS X 10.3 Panther', + '/macintosh|mac os x 10_2/i' => 'Mac OS X 10.2 Jaguar', + '/macintosh|mac os x 10_1/i' => 'Mac OS X 10.1 Puma', + '/macintosh|mac os x/i' => 'Mac OS X', + + // Linux Versionen + '/ubuntu/i' => 'Ubuntu', + '/debian/i' => 'Debian 9', + '/debian\/10/i' => 'Debian 10', + '/fedora/i' => 'Fedora', + '/redhat/i' => 'Red Hat', + '/redhat\/8/i' => 'Red Hat 8', + '/redhat\/9/i' => 'Red Hat 9', + '/redhat\/10/i' => 'Red Hat 10', + '/centos/i' => 'CentOS', + '/centos\/7/i' => 'CentOS 7', + '/centos\/8/i' => 'CentOS 8', + '/centos\/9/i' => 'CentOS 9', + '/suse/i' => 'openSUSE', + '/suse\/15/i' => 'openSUSE 15', + '/suse\/16/i' => 'openSUSE 16', + '/slackware/i' => 'Slackware', + '/slackware\/14/i' => 'Slackware 14', + '/slackware\/15/i' => 'Slackware 15', + '/gentoo/i' => 'Gentoo', + '/gentoo\/3/i' => 'Gentoo 3', + '/linux mint/i' => 'Linux Mint', + '/linux mint\/20/i' => 'Linux Mint 20', + '/linux mint\/21/i' => 'Linux Mint 21', + '/mageia/i' => 'Mageia', + '/mageia\/8/i' => 'Mageia 8', + '/elementary os/i' => 'Elementary OS', + '/elementary os\/6/i'=> 'Elementary OS 6', + '/zorin os/i' => 'Zorin OS', + '/zorin os\/16/i' => 'Zorin OS 16', + '/manjaro/i' => 'Manjaro', + '/manjaro\/21/i' => 'Manjaro 21', + '/arch/i' => 'Arch Linux', + '/arch\/2021/i' => 'Arch Linux 2021', + '/alpine/i' => 'Alpine Linux', + '/alpine\/3/i' => 'Alpine Linux 3', + '/void/i' => 'Void Linux', + '/void\/2022/i' => 'Void Linux 2022', + '/deepin/i' => 'Deepin', + '/deepin\/20/i' => 'Deepin 20', + '/mx linux/i' => 'MX Linux', + '/mx linux\/21/i' => 'MX Linux 21', + '/kali linux/i' => 'Kali Linux', + '/kali linux\/2021/i'=> 'Kali Linux 2021', + '/xubuntu/i' => 'Xubuntu', + '/xubuntu\/20/i' => 'Xubuntu 20', + '/lubuntu/i' => 'Lubuntu', + '/lubuntu\/20/i' => 'Lubuntu 20', + '/kubuntu/i' => 'Kubuntu', + '/kubuntu\/20/i' => 'Kubuntu 20', + '/pop!_os/i' => 'Pop!_OS', + '/pop!_os\/21/i' => 'Pop!_OS 21', + '/solus/i' => 'Solus', + '/solus\/4/i' => 'Solus 4', + '/freebsd/i' => 'FreeBSD', + '/freebsd\/12/i' => 'FreeBSD 12', + '/openbsd/i' => 'OpenBSD', + '/openbsd\/7/i' => 'OpenBSD 7', + '/netbsd/i' => 'NetBSD', + '/netbsd\/10/i' => 'NetBSD 10', + '/sabayon/i' => 'Sabayon', + '/sabayon\/20/i' => 'Sabayon 20', + '/tux/i' => 'Tux', + '/tux\/2/i' => 'Tux 2', + '/linux/i' => 'Linux', + '/linux\/5/i' => 'Linux 5', + + // Mobile Betriebssysteme + '/android 1/i' => 'Android 1', + '/android 2/i' => 'Android 2', + '/android 3/i' => 'Android 3', + '/android 4/i' => 'Android 4', + '/android 5/i' => 'Android 5', + '/android 6/i' => 'Android 6', + '/android 7/i' => 'Android 7', + '/android 8/i' => 'Android 8', + '/android 9/i' => 'Android 9', + '/android 10/i' => 'Android 10', + '/android 11/i' => 'Android 11', + '/android 12/i' => 'Android 12', + '/iphone OS 1/i' => 'iOS 1', + '/iphone OS 2/i' => 'iOS 2', + '/iphone OS 3/i' => 'iOS 3', + '/iphone OS 4/i' => 'iOS 4', + '/iphone OS 5/i' => 'iOS 5', + '/iphone OS 6/i' => 'iOS 6', + '/iphone OS 7/i' => 'iOS 7', + '/iphone OS 8/i' => 'iOS 8', + '/iphone OS 9/i' => 'iOS 9', + '/iphone OS 10/i' => 'iOS 10', + '/iphone OS 11/i' => 'iOS 11', + '/iphone OS 12/i' => 'iOS 12', + '/iphone OS 13/i' => 'iOS 13', + '/iphone OS 14/i' => 'iOS 14', + '/iphone OS 15/i' => 'iOS 15', + '/ipad OS 1/i' => 'iPad OS 1', + '/ipad OS 2/i' => 'iPad OS 2', + '/ipad OS 3/i' => 'iPad OS 3', + '/ipad OS 4/i' => 'iPad OS 4', + '/ipad OS 5/i' => 'iPad OS 5', + '/ipad OS 6/i' => 'iPad OS 6', + '/ipad OS 7/i' => 'iPad OS 7', + '/ipad OS 8/i' => 'iPad OS 8', + '/ipad OS 9/i' => 'iPad OS 9', + '/ipad OS 10/i' => 'iPad OS 10', + '/ipad OS 11/i' => 'iPad OS 11', + '/ipad OS 12/i' => 'iPad OS 12', + '/ipad OS 13/i' => 'iPad OS 13', + '/ipad OS 14/i' => 'iPad OS 14', + '/ipad OS 15/i' => 'iPad OS 15', + '/blackberry 1/i' => 'BlackBerry 1', + '/blackberry 2/i' => 'BlackBerry 2', + '/blackberry 3/i' => 'BlackBerry 3', + '/blackberry 4/i' => 'BlackBerry 4', + '/blackberry 5/i' => 'BlackBerry 5', + '/blackberry 6/i' => 'BlackBerry 6', + '/blackberry 7/i' => 'BlackBerry 7', + '/blackberry 10/i' => 'BlackBerry 10', + '/webos 1/i' => 'webOS 1', + '/webos 2/i' => 'webOS 2', + '/webos 3/i' => 'webOS 3', + '/webos 4/i' => 'webOS 4', + '/webos 5/i' => 'webOS 5', + + // Spielkonsolen + '/playstation 3/i' => 'PlayStation 3', + '/playstation 4/i' => 'PlayStation 4', + '/playstation 5/i' => 'PlayStation 5', + '/xbox/i' => 'Xbox', + '/xbox 360/i' => 'Xbox 360', + '/xbox one/i' => 'Xbox One', + '/xbox series x/i' => 'Xbox Series X', + + // Tragbare Geräte + '/psp/i' => 'PSP', + '/nintendo 3ds/i' => 'Nintendo 3DS', + '/nintendo ds/i' => 'Nintendo DS', + '/nintendo switch/i' => 'Nintendo Switch', + '/smartwatch/i' => 'Smartwatch', + '/apple watch/i' => 'Apple Watch', + '/fitbit/i' => 'Fitbit', + '/garmin/i' => 'Garmin', + + // Smart-Home-Geräte + '/alexa/i' => 'Amazon Alexa', + '/google home/i' => 'Google Home', + '/amazon echo/i' => 'Amazon Echo', + '/apple homepod/i' => 'Apple HomePod', + + // Andere Betriebssysteme + '/beos/i' => 'BeOS', + '/haiku/i' => 'Haiku', + '/plan 9/i' => 'Plan 9 from Bell Labs', + '/reactos/i' => 'ReactOS', + '/syllable/i' => 'Syllable', + '/unix/i' => 'Unix', + '/openvms/i' => 'OpenVMS', + '/os\/2/i' => 'OS/2', + '/symbian/i' => 'Symbian', + '/z\/os/i' => 'z/OS', + '/nintendo/i' => 'Nintendo OS', + '/amigaos/i' => 'AmigaOS', + '/morphos/i' => 'MorphOS', + '/risc os/i' => 'RISC OS', + '/palm os/i' => 'Palm OS', + '/webtv/i' => 'WebTV OS', + '/hurd/i' => 'GNU Hurd', + '/vru/i' => 'VRU OS', + '/midnight/i' => 'Midnight OS', + '/honeycomb/i' => 'Honeycomb OS', + '/newton/i' => 'Newton OS', + '/microsoft/i' => 'Microsoft Research OS', + '/riscix/i' => 'RISCiX OS', + '/morphix/i' => 'Morphix OS', + '/steam os/i' => 'Steam OS', + '/vxworks/i' => 'VxWorks', + '/qnx/i' => 'QNX', + '/tizen/i' => 'Tizen', + '/raspbian/i' => 'Raspbian', + '/oracle solaris/i' => 'Oracle Solaris', + '/tails/i' => 'Tails', + '/remix os/i' => 'Remix OS', + '/fuchsia/i' => 'Fuchsia', + '/harmonyos/i' => 'HarmonyOS', + '/solaris/i' => 'Solaris', + '/aix/i' => 'AIX', + '/hp-ux/i' => 'HP-UX', + '/ibm i/i' => 'IBM i (AS/400)', + '/windows phone/i' => 'Windows Phone', + '/windows mobile/i' => 'Windows Mobile', + '/embedded/i' => 'Embedded OS', + '/other-os/i' => 'Anderes Betriebssystem', ); foreach ($os_array as $regex => $value) @@ -195,6 +419,125 @@ public function getOS($user_agent) return $os_platform; } + public function getBrowser($user_agent): string + { + $browser = "Unbekannt"; + + $browser_array = array( + '/msie/i' => 'Internet Explorer', + '/trident/i' => 'Internet Explorer', + '/edge/i' => 'Microsoft Edge', + '/firefox/i' => 'Firefox', + '/safari/i' => 'Safari', + '/chrome/i' => 'Chrome', + '/opera/i' => 'Opera', + '/netscape/i' => 'Netscape', + '/maxthon/i' => 'Maxthon', + '/konqueror/i' => 'Konqueror', + '/mobile/i' => 'Handy-Browser', + '/brave/i' => 'Brave', + '/epiphany/i' => 'Epiphany', + '/ucbrowser/i' => 'UC Browser', + '/yabrowser/i' => 'Yandex Browser', + '/waterfox/i' => 'Waterfox', + '/sleipnir/i' => 'Sleipnir', + '/lunascape/i' => 'Lunascape', + '/avant/i' => 'Avant Browser', + '/webpositive/i'=> 'WebPositive', + '/aol/i' => 'AOL Browser', + '/k-meleon/i' => 'K-Meleon', + '/seamonkey/i' => 'SeaMonkey', + '/galeon/i' => 'Galeon', + '/iron/i' => 'SRWare Iron', + '/comodo/i' => 'Comodo Dragon', + '/rockmelt/i' => 'RockMelt', + '/slimboat/i' => 'SlimBrowser', + '/flock/i' => 'Flock', + '/netsurf/i' => 'NetSurf', + '/epic/i' => 'Epic Browser', + '/dolphin/i' => 'Dolphin', + '/qupzilla/i' => 'QupZilla', + '/silk/i' => 'Amazon Silk', + '/otter/i' => 'Otter Browser', + '/gnome\-web/i'=> 'Epiphany (GNOME Web)', + '/tizen/i' => 'Tizen Browser', + '/slimjet/i' => 'Slimjet', + '/cyberfox/i' => 'Cyberfox', + '/icedragon/i' => 'Comodo IceDragon', + '/vivaldi/i' => 'Vivaldi', + '/coc_coc/i' => 'Coc Coc', + '/sogou/i' => 'Sogou Browser', + '/qihoo/i' => '360 Secure Browser', + '/huohou/i' => 'Huohou Browser', + '/miui/i' => 'Mi Browser', + '/huawei/i' => 'Huawei Browser', + '/oneplus/i' => 'OnePlus Browser', + '/meizu/i' => 'Meizu Browser', + '/nokia/i' => 'Nokia Browser', + '/lenovo/i' => 'Lenovo Browser', + '/zte/i' => 'ZTE Browser', + '/leeco/i' => 'LeEco Browser', + '/realme/i' => 'Realme Browser', + '/tecent/i' => 'Tencent QQ Browser', + '/baidu/i' => 'Baidu Browser', + '/vivo/i' => 'Vivo Browser', + '/mxios/i' => 'Maxthon for iOS', + '/baidubox/i' => 'Baidu Box App', + '/qqlive/i' => 'Tencent QQ Live App', + '/weibo/i' => 'Sina Weibo App', + '/wechat/i' => 'WeChat App', + '/alipay/i' => 'Alipay Mini Program', + '/taobao/i' => 'Taobao Mini Program', + '/palemoon/i' => 'Pale Moon', + '/odo/i' => 'Opera Neon', + '/midori/i' => 'Midori', + '/rekonq/i' => 'Rekonq', + '/uzbl/i' => 'Uzbl', + '/whale/i' => 'Naver Whale', + '/yandexsearch/i' => 'Yandex Search App', + '/qqbrowser/i' => 'QQ Browser', + '/baidubrowser/i' => 'Baidu Browser', + '/liebaofast/i' => 'Liebao Browser (LBBrowser)', + '/liebaomini/i' => 'Liebao Mini Browser', + '/duckduckgo/i' => 'DuckDuckGo Browser', + '/bb10/i' => 'BlackBerry 10 Browser', + '/edgeios/i' => 'Microsoft Edge (iOS)', + '/edgeandroid/i' => 'Microsoft Edge (Android)', + '/focus/i' => 'Firefox Focus', + '/focusios/i' => 'Firefox Focus (iOS)', + '/adobeair/i' => 'Adobe AIR Application', + '/kindle/i' => 'Amazon Kindle', + '/iridium/i' => 'Iridium Browser', + '/vewd/i' => 'Vewd (formerly Opera TV)', + '/viera/i' => 'Panasonic Viera TV Browser', + '/snapchat/i' => 'Snapchat App', + '/puffin/i' => 'Puffin Browser', + '/webos/i' => 'webOS Browser', + '/maemo/i' => 'Maemo Browser (Nokia N900)', + '/meego/i' => 'MeeGo Browser', + '/wii/i' => 'Nintendo Wii Browser', + '/psp/i' => 'PlayStation Portable Browser', + '/camino/i' => 'Camino', + '/kazehakase/i'=> 'Kazehakase', + '/gobrowser/i' => 'GO Browser', + '/tor/i' => 'TOR (The Onion Router)', + // Browser, die von Regierungsbehörden oder militärischen Organisationen verwendet werden + '/usgcb/i' => 'U.S. Government Web Browser', + '/qubes/i' => 'Qubes OS Secure Browser', + '/swb/i' => 'Secure Web Browser (SWB)', + '/iceweasel/i' => 'IceWeasel', + '/gsb/i' => 'Government Secure Browser (GSB)' + ); + + foreach ($browser_array as $regex => $value) { + if (preg_match($regex, $user_agent)) { + $browser = $value; + } + } + + return $browser; + } + public function getIP() { foreach (array('HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR') as $key){ @@ -258,6 +601,25 @@ public function serviceCount($user_id) return $count; } + + public function activeCount($user_id) + { + $count = 0; + + $SQL = self::db()->prepare("SELECT * FROM `teamspeaks` WHERE `user_id` = :user_id AND `deleted_at` IS NULL AND `state` = 'ACTIVE'"); + $SQL->execute(array(":user_id" => $user_id)); + $count = $count + $SQL->rowCount(); + + $SQL = self::db()->prepare("SELECT * FROM `vm_servers` WHERE `user_id` = :user_id AND `deleted_at` IS NULL' AND `state` = 'active'"); + $SQL->execute(array(":user_id" => $user_id)); + $count = $count + $SQL->rowCount(); + + $SQL = self::db()->prepare("SELECT * FROM `webspace` WHERE `user_id` = :user_id AND `deleted_at` IS NULL AND `state` = 'active'"); + $SQL->execute(array(":user_id" => $user_id)); + $count = $count + $SQL->rowCount(); + + return $count; + } public function teamspeakCount($user_id) { @@ -330,7 +692,7 @@ public function getDataByAffiliateId($id, $data) public function renewSupportPin($userid, $token = null) { if(is_null($token)){ - $token = Helper::generateRandomString(5,'1234567890'); + $token = (new Helper)->generateRandomString(5,'1234567890'); } $SQL = self::db()->prepare("UPDATE `users` SET `s_pin` = :s_pin WHERE `id` = :id"); @@ -357,4 +719,4 @@ public function logLogin($user_id, $user_addr, $user_agent) $SQL->execute(array($user_id, $user_addr, $user_agent)); } -} \ No newline at end of file +} diff --git a/app/manager/customer/auth/login.php b/app/manager/customer/auth/login.php index 0f8ad62..cff4bb6 100755 --- a/app/manager/customer/auth/login.php +++ b/app/manager/customer/auth/login.php @@ -96,8 +96,8 @@ function accpept() {
- - + +
"; } diff --git a/app/manager/customer/auth/register.php b/app/manager/customer/auth/register.php index e51a5d5..99bfc29 100755 --- a/app/manager/customer/auth/register.php +++ b/app/manager/customer/auth/register.php @@ -62,7 +62,7 @@ $user_id = $user->create($helper->xssFix($_POST['username']), $helper->xssFix($_POST['email']), $_POST['password'],'pending','customer'); //$discord->callWebhook('Soeben hat sich ein neuer Benutzer Registriert: '.$_POST['username']); - + $user->renewSupportPin($user_id); $SQL = $db->prepare("UPDATE `users` SET `verify_code` = :verify_code WHERE `id` = :user_id"); @@ -76,4 +76,4 @@ } else { echo sendError($error); } -} \ No newline at end of file +} diff --git a/app/notifications/mail_templates/auth/passwort_reset.php b/app/notifications/mail_templates/auth/passwort_reset.php index 35e81da..970bbb1 100755 --- a/app/notifications/mail_templates/auth/passwort_reset.php +++ b/app/notifications/mail_templates/auth/passwort_reset.php @@ -20,9 +20,9 @@

- Erstelle eine Supportanfrage oder schreiben uns eine Mail support@red-host.eu + Erstelle eine Supportanfrage oder schreiben uns eine Mail '. env("SUPPORT_EMAIL") .'

'; $mailSubject = 'Passwort vergessen'; -$emailAltBody = 'Klicken Sie auf diesen Link um Ihr Passwort zu ändern '.$url.'passwort_reset/'.$verify_code; \ No newline at end of file +$emailAltBody = 'Klicken Sie auf diesen Link um Ihr Passwort zu ändern '.$url.'passwort_reset/'.$verify_code; diff --git a/app/notifications/mail_templates/auth/passwort_reset.php_NOT_IN_USE b/app/notifications/mail_templates/auth/passwort_reset.php_NOT_IN_USE index 35e81da..970bbb1 100755 --- a/app/notifications/mail_templates/auth/passwort_reset.php_NOT_IN_USE +++ b/app/notifications/mail_templates/auth/passwort_reset.php_NOT_IN_USE @@ -20,9 +20,9 @@ $mailContent = '

- Erstelle eine Supportanfrage oder schreiben uns eine Mail support@red-host.eu + Erstelle eine Supportanfrage oder schreiben uns eine Mail '. env("SUPPORT_EMAIL") .'

'; $mailSubject = 'Passwort vergessen'; -$emailAltBody = 'Klicken Sie auf diesen Link um Ihr Passwort zu ändern '.$url.'passwort_reset/'.$verify_code; \ No newline at end of file +$emailAltBody = 'Klicken Sie auf diesen Link um Ihr Passwort zu ändern '.$url.'passwort_reset/'.$verify_code; diff --git a/app/notifications/mail_templates/mail_style.php b/app/notifications/mail_templates/mail_style.php index e6fa9b5..8e9bce8 100755 --- a/app/notifications/mail_templates/mail_style.php +++ b/app/notifications/mail_templates/mail_style.php @@ -1,11 +1,5 @@  @@ -108,8 +102,8 @@ @@ -118,4 +112,4 @@ -'; \ No newline at end of file +'; diff --git a/app/notifications/mail_templates_12/auth/confirm_account.php b/app/notifications/mail_templates_12/auth/confirm_account.php index bf4a011..f739a86 100755 --- a/app/notifications/mail_templates_12/auth/confirm_account.php +++ b/app/notifications/mail_templates_12/auth/confirm_account.php @@ -16,8 +16,8 @@

- Erstelle eine Supportanfrage oder schreiben uns eine Mail support@red-host.eu + Erstelle eine Supportanfrage oder schreiben uns eine Mail '. env("SUPPORT_EMAIL") .'

'; -$mailSubject = 'Benutzerkonto aktivieren - '.$siteDomain; \ No newline at end of file +$mailSubject = 'Benutzerkonto aktivieren - '.$siteDomain; diff --git a/app/notifications/mail_templates_12/auth/forgot_password.php b/app/notifications/mail_templates_12/auth/forgot_password.php index c19f0e6..815b4ab 100755 --- a/app/notifications/mail_templates_12/auth/forgot_password.php +++ b/app/notifications/mail_templates_12/auth/forgot_password.php @@ -16,8 +16,8 @@

- Erstelle eine Supportanfrage oder schreiben uns eine Mail support@red-host.eu + Erstelle eine Supportanfrage oder schreiben uns eine Mail '. env("SUPPORT_EMAIL") .'

'; -$mailSubject = 'Passwort vergessen - '.$siteDomain; \ No newline at end of file +$mailSubject = 'Passwort vergessen - '.$siteDomain; diff --git a/app/notifications/mail_templates_12/auth/passwort_reset.php b/app/notifications/mail_templates_12/auth/passwort_reset.php index 35e81da..970bbb1 100755 --- a/app/notifications/mail_templates_12/auth/passwort_reset.php +++ b/app/notifications/mail_templates_12/auth/passwort_reset.php @@ -20,9 +20,9 @@

- Erstelle eine Supportanfrage oder schreiben uns eine Mail support@red-host.eu + Erstelle eine Supportanfrage oder schreiben uns eine Mail '. env("SUPPORT_EMAIL") .'

'; $mailSubject = 'Passwort vergessen'; -$emailAltBody = 'Klicken Sie auf diesen Link um Ihr Passwort zu ändern '.$url.'passwort_reset/'.$verify_code; \ No newline at end of file +$emailAltBody = 'Klicken Sie auf diesen Link um Ihr Passwort zu ändern '.$url.'passwort_reset/'.$verify_code; diff --git a/app/notifications/mail_templates_12/mail_style.php b/app/notifications/mail_templates_12/mail_style.php index 6ff130b..f350f06 100755 --- a/app/notifications/mail_templates_12/mail_style.php +++ b/app/notifications/mail_templates_12/mail_style.php @@ -16,7 +16,7 @@ width: 100%; } body{ - font-family: 'Nunito', sans-serif; + font-family: \'Nunito\', sans-serif; padding: 0; margin: 0; } @@ -105,7 +105,7 @@ test test test
- © 2020 REDHost + © 2020 '. env("app_name") .' @@ -114,4 +114,4 @@ -'; \ No newline at end of file +'; diff --git a/app/notifications/mail_templates_oldd/auth/confirm_account.php b/app/notifications/mail_templates_oldd/auth/confirm_account.php index bf4a011..f739a86 100755 --- a/app/notifications/mail_templates_oldd/auth/confirm_account.php +++ b/app/notifications/mail_templates_oldd/auth/confirm_account.php @@ -16,8 +16,8 @@

- Erstelle eine Supportanfrage oder schreiben uns eine Mail support@red-host.eu + Erstelle eine Supportanfrage oder schreiben uns eine Mail '. env("SUPPORT_EMAIL") .'

'; -$mailSubject = 'Benutzerkonto aktivieren - '.$siteDomain; \ No newline at end of file +$mailSubject = 'Benutzerkonto aktivieren - '.$siteDomain; diff --git a/app/notifications/mail_templates_oldd/auth/forgot_password.php b/app/notifications/mail_templates_oldd/auth/forgot_password.php index c19f0e6..815b4ab 100755 --- a/app/notifications/mail_templates_oldd/auth/forgot_password.php +++ b/app/notifications/mail_templates_oldd/auth/forgot_password.php @@ -16,8 +16,8 @@

- Erstelle eine Supportanfrage oder schreiben uns eine Mail support@red-host.eu + Erstelle eine Supportanfrage oder schreiben uns eine Mail '. env("SUPPORT_EMAIL") .'

'; -$mailSubject = 'Passwort vergessen - '.$siteDomain; \ No newline at end of file +$mailSubject = 'Passwort vergessen - '.$siteDomain; diff --git a/app/notifications/mail_templates_oldd/auth/passwort_reset.php b/app/notifications/mail_templates_oldd/auth/passwort_reset.php index 35e81da..fe16ded 100755 --- a/app/notifications/mail_templates_oldd/auth/passwort_reset.php +++ b/app/notifications/mail_templates_oldd/auth/passwort_reset.php @@ -20,9 +20,9 @@

- Erstelle eine Supportanfrage oder schreiben uns eine Mail support@red-host.eu + Erstelle eine Supportanfrage oder schreiben uns eine Mail '. env("SUPPORT_EMAIL") .'

'; $mailSubject = 'Passwort vergessen'; -$emailAltBody = 'Klicken Sie auf diesen Link um Ihr Passwort zu ändern '.$url.'passwort_reset/'.$verify_code; \ No newline at end of file +$emailAltBody = 'Klicken Sie auf diesen Link um Ihr Passwort zu ändern '.$url.'passwort_reset/'.$verify_code; diff --git a/app/notifications/mail_templates_oldd/mail_style.php b/app/notifications/mail_templates_oldd/mail_style.php index ee0d4b8..f614591 100755 --- a/app/notifications/mail_templates_oldd/mail_style.php +++ b/app/notifications/mail_templates_oldd/mail_style.php @@ -1,11 +1,5 @@  @@ -21,10 +15,10 @@ '.$mailContent.'
- DatenschutzTicket-SupportDiscord + DatenschutzTicket-SupportDiscord
-'; \ No newline at end of file +'; diff --git a/resources/additional/FRONT/a_side.php b/resources/additional/FRONT/a_side.php index 275e450..f8e2591 100755 --- a/resources/additional/FRONT/a_side.php +++ b/resources/additional/FRONT/a_side.php @@ -35,7 +35,7 @@