Compare commits

...

312 commits

Author SHA1 Message Date
Dennis 4358d071b3
Fix old name and dead links (#949) 2024-05-07 09:35:04 +02:00
MrWeez e7aad7ee6c Update app.php 2024-05-07 04:59:29 +03:00
MrWeez 6623f957a1 Fix old name and dead links 2024-05-07 04:58:15 +03:00
Dennis 335951b7e6
Update app.php (#943) 2024-04-24 10:50:21 +02:00
MrWeez 9299eac552
Update app.php 2024-04-12 22:20:25 +03:00
Ferks-FK aed5b9d16e fix: change alpine script link 2024-04-12 21:05:51 +02:00
Dennis 2d6f6f6848
GH-930 Repair docker image for PHP-FPM (#930) 2024-02-28 12:17:01 +01:00
Krzysztof Haller 36626f2d76 Fix dockerimage with docker-compose 2024-02-28 09:26:30 +01:00
Jens 9fab5451f5 Update app.php
Switch version to 0.9.6 and fix old name
2023-09-17 13:21:18 +02:00
Ferks-FK 79670657a4 Change the place where this is called. 2023-09-16 21:42:34 +02:00
Ferks-FK 441d89767d fix: 🐛 Fix credits exploit and infinite logs 2023-09-16 21:42:34 +02:00
Dennis 43ea446b2a
Update GetGithubVersion.php 2023-05-02 20:21:01 +02:00
IceToast 63692b557c Update app.php 2023-05-01 13:12:43 +02:00
Dennis 31b303b9fd
Revert "Merge branch 'development' into main" (#797) 2023-04-25 09:23:23 +02:00
1day2die 0c067e26c8 Revert "Merge branch 'development' into main"
This reverts commit 3810b487cd, reversing
changes made to d9a41840ce.
2023-04-25 09:22:30 +02:00
Dennis 3810b487cd
Merge branch 'development' into main 2023-04-25 09:15:46 +02:00
Dennis d9a41840ce
Updated urls to new ones (#795) 2023-04-25 09:14:33 +02:00
Corwin f52c93c925
Updated urls to new ones 2023-04-25 06:56:49 +01:00
Dennis cfe5086b10
Update README.md 2023-04-24 13:29:04 +02:00
Dennis 87dc97c8ea
Fix MacError on MakeUser (#793) 2023-04-20 23:07:19 +02:00
1day2die 023772d929 Fix MacError on MakeUser 2023-04-20 23:07:01 +02:00
Dennis f49137b833
Fix Install CSS (#792) 2023-04-20 11:45:31 +02:00
1day2die d6fe858e84 Fix Installer CSS 2023-04-20 11:43:53 +02:00
Dennis 15f03c0527
Merge branch 'ControlPanel-gg:development' into development 2023-04-20 10:36:41 +02:00
Dennis 51d340d95b
[Fix] [CRITICAL] Fix new installations (#790) 2023-04-14 10:18:44 +02:00
Dennis 8cda91a6e6
fix server deletion upon changing product (#789) 2023-04-14 10:18:25 +02:00
Jens b99d6a51a6
[FIX] Shouldn't forget caller 2023-04-14 10:09:28 +02:00
Jens 15ee059d30
[Fix] Fix new installations
This bugfix comments out the installation counter as it is currently an extremely bad practice and resulted in an issue with errors.
2023-04-14 10:01:05 +02:00
ok236449 821d85e395 fix server deletion upon changing product 2023-04-12 20:51:08 +02:00
Dennis be1344f63e
Merge branch 'ControlPanel-gg:development' into development 2023-04-05 15:20:37 +02:00
Dennis 20bd030e78
fix: Button not clickable on step 2.5 of installation. (#786) 2023-04-05 15:20:21 +02:00
Vikas Dongre 59cb5eab67 fix: Button not clickable on step 2.5 of installation. 2023-04-05 18:45:00 +05:30
Jens 6dac81e809
Fix: WHY 2023-04-05 15:09:12 +02:00
Jens 1bb34caaa7
Fix (again): Move the .env.example check to functions.php (#785)
Fix (again): Move the .env.example check to functions.php (#784)

style: 💄 Improved UI/UX of the Installer.

Co-authored-by: Vikas Dongre
Co-authored-by: Dennis
2023-04-05 15:04:30 +02:00
Dennis c3aff98094
Merge branch 'ControlPanel-gg:development' into development 2023-04-05 14:35:41 +02:00
Dennis 0408b391da
style: 💄 Improved UI/UX of the Installer. (#781) 2023-04-05 14:35:07 +02:00
Jens b20a2d24e4
Merge branch 'development' into improve/installer-ui 2023-04-05 14:33:48 +02:00
Jens 3949529c32
Fix: environment file crashes installer on new installations (#783) 2023-04-05 14:17:05 +02:00
Jens 482c613ca6
Move .env.example to functions.php 2023-04-05 14:14:55 +02:00
Jens 8ff3f04c0b
Move .env.example to functions.php 2023-04-05 14:13:52 +02:00
1day2die 9ddb44c3dc Merge branch 'development' of https://github.com/1day2die/dashboard into development 2023-04-05 09:47:28 +02:00
Dennis ca3643deef
[Bugfix] Fix several bugs (#780) 2023-04-04 20:00:51 +02:00
Vikas Dongre b636ea0554 style: 💄 Improved UI/UX of the Installer. 2023-04-04 21:36:05 +05:30
IceToast f68b1cc8ca
fix: 🐛 Different badge colors #703 2023-04-04 02:04:41 +02:00
IceToast 91476d2701
fix: 🐛 Show Product name instead of resource description #756 2023-04-04 01:58:23 +02:00
IceToast 44948226bb
fix: 🐛 typo 2023-04-04 01:45:29 +02:00
IceToast 5b8f12fa94
fix: 🐛 Settings update -> type check 2023-04-04 01:45:18 +02:00
IceToast 18d4962ef9
fix: 🔒️ Do not allow last admin deletion #762 2023-04-04 01:27:05 +02:00
IceToast 307f3229d2
fix: 🐛 external_id already used #769 2023-04-04 01:23:44 +02:00
IceToast ce544019eb
refactor: 🚚 Rename pterodactyl application api accordingly 2023-04-04 01:16:39 +02:00
IceToast 1784358fc2
fix: 🐛 Potentional installation fix -> APP_KEY missing 2023-04-04 00:28:20 +02:00
IceToast 6497f6bf90 fix: 🔥 Removed default values from Settings class variables 2023-04-02 20:00:56 +02:00
Jens b4e1b5aeca Rename controlpanel.log to installer.log 2023-04-02 20:00:56 +02:00
AGuyNamedJens ffba7ebf1b (refactor) revert the revert, things work now. 2023-04-02 20:00:56 +02:00
AGuyNamedJens 761d044957 (refactor) actually fix the checkHttps log
(refactor) change logger output to controlpanel.log
(refactor) add and fix extension logs
2023-04-02 20:00:56 +02:00
AGuyNamedJens 307aaee082 (refactor) checkHTTPS Looks better this way, also fixes the log 2023-04-02 20:00:56 +02:00
AGuyNamedJens b1f6528605 Forgot to remove this debug-debug log lol 2023-04-02 20:00:56 +02:00
AGuyNamedJens 388d0eafa0 (revert) Revert setenv/getenv
(refactor) Fix logging, use new logger
(refactor) Add debug logs to the installer and functions
(refactor) Remove unused dotenv
2023-04-02 20:00:56 +02:00
Jens f7ab52fec1 (Refactor) Validation and variable modification to align with the input data 2023-04-02 20:00:56 +02:00
Jens f63d8080a3 (Refactor) Use laravel's logging system, specified a few log levels and refactor the function calls 2023-04-02 20:00:56 +02:00
Jens 470bc6d545 (Refactor) run_console now gives more control (all optional) using a more up-to-date method proc_open
Use the PHP documentation to get more knowledge.
2023-04-02 20:00:56 +02:00
Jens bc34bb5fa0 (Refactor) default encryption method 2023-04-02 20:00:56 +02:00
Jens 1d9ac19c16 (Refactor) rename getEnvironmentValue to getenv, rename setEnvironmentValue to setenv 2023-04-02 20:00:56 +02:00
Jens ef1ec46bad (Refactor) Remove getEnvironmentValue, rename setEnvironmentValue to setenv to match php defaults 2023-04-02 20:00:56 +02:00
AGuyNamedJens efd61fb376 (refactor) Refactor forms.php 2023-04-02 20:00:56 +02:00
AGuyNamedJens 299d8b637a (refactor) Refactor functions.php 2023-04-02 20:00:56 +02:00
AGuyNamedJens 086f685780 (refactor) Refactor index.php 2023-04-02 20:00:56 +02:00
AGuyNamedJens 4d97c1473b (refactor) Forgot to include autoload file 2023-04-02 20:00:56 +02:00
AGuyNamedJens 63c435c610 (refactor) More refactoring, also add missing serialize method 2023-04-02 20:00:56 +02:00
AGuyNamedJens 08e09c5d08 (feat) New encryption and decryption functions
(refactor) Modify the get and set environment functions
(refactor) Refactor the entire functions.php file.
2023-04-02 20:00:56 +02:00
AGuyNamedJens a9b7531ab1 (refactor) Refactor encryption method 2023-04-02 20:00:56 +02:00
AGuyNamedJens 224900890b (fix/feat) Fix deprecations, add encryption, fix API Calls & Fix Database 2023-04-02 20:00:56 +02:00
AGuyNamedJens 4800a79643 (refactor) Remove main_site from database 2023-04-02 20:00:56 +02:00
AGuyNamedJens c776da96ae This package isn't supposed to be pushed with the patch 2023-04-02 20:00:56 +02:00
AGuyNamedJens 0eb84f5f76 Update packages & docker-compose.yml 2023-04-02 20:00:56 +02:00
Dennis bb0243df47
Merge branch 'ControlPanel-gg:development' into development 2023-03-30 14:10:55 +02:00
IceToast 3dd26b8259 style: 💄 Change checkout page to two card design 2023-03-30 14:07:59 +02:00
IceToast fc2119ad5a fix: 🐛 Remove isPaymentSetup notification 2023-03-30 14:07:59 +02:00
IceToast fe535c061e Revert "style: 💄 Change layout of checkout page"
This reverts commit b55c36cd5f552c46380583b9dc1772efb828bb5f.
2023-03-30 14:07:59 +02:00
IceToast 75a8db833b style: 💄 Change layout of checkout page 2023-03-30 14:07:59 +02:00
IceToast 11a12bb48b style: 💄 checkout payment method list 2023-03-30 14:07:59 +02:00
IceToast 5b44df24ab fix: 🐛 Mollie gateway route and settings 2023-03-30 14:07:07 +02:00
IceToast c95cde5cde feat: Create Mollie payment gateway extension 2023-03-30 14:07:07 +02:00
IceToast 59ed6e51c1 fix: 🐛 Typo after reverting to path based extension loading 2023-03-30 14:03:33 +02:00
IceToast 06bfaf709c fix: 🐛 Change extensionHelper to work with filesystem not reflection 2023-03-30 14:03:33 +02:00
IceToast 5f422e1b83 refactor: ♻️ Use reflection to get all extensionsettings 2023-03-30 14:03:33 +02:00
IceToast 7701671c7e refactor: ♻️ Move Stripe Extension methods and config to Extension Class 2023-03-30 14:03:33 +02:00
IceToast 0ec3660e1a refactor: ♻️ Move PayPal Extension methods and config to Extension Class 2023-03-30 14:03:33 +02:00
IceToast f17f5da822 refactor: ♻️ Change extensionHelper to work with the abstract class using reflection 2023-03-30 14:03:33 +02:00
IceToast ca3e31580f feat: 🐛 add abstract extension class 2023-03-30 14:03:33 +02:00
Jens 4509b11816 Remove default, keep null 2023-03-29 16:27:28 +02:00
Jens 7fb7c23fb0 Allow custom types to be passed | add NULL case
Solves the comment about request types.
2023-03-29 16:27:28 +02:00
AGuyNamedJens 4a5a002dc1 This package isn't supposed to be pushed with the patch 2023-03-29 16:27:28 +02:00
AGuyNamedJens 3b893e7ccf Fix: Settings not saving. Fixes issue #773 2023-03-29 16:27:28 +02:00
AGuyNamedJens 1d2e2ebdc7 Allow Pterodactyl settings to be nullable 2023-03-29 16:27:28 +02:00
AGuyNamedJens f70f82f896 Update packages & docker-compose.yml 2023-03-29 16:27:28 +02:00
IceToast ba75d09cbf
Update app.php 2023-03-18 21:45:57 +01:00
IceToast 44dee3929b
fix: 🐛 Users table searching 2023-03-18 21:38:21 +01:00
1DayLaptop 36b7842085 installer new settings - Missing encryption 2023-03-15 10:48:10 +01:00
Dennis ad9e33d0d7
Update web_routes.php 2023-03-09 12:43:38 +01:00
Dennis 4ae54d736f
Merge branch 'ControlPanel-gg:development' into development 2023-03-09 12:32:58 +01:00
IceToast d7ed67a842 fix: 🐛 Added store_enabled option 2023-03-09 12:31:11 +01:00
IceToast d7a36c61b2 feat: Migrate Extensions from old to new settings system 2023-03-09 12:31:11 +01:00
IceToast 3cba1c60f8 feat: Add Extension Settings and migrations 2023-03-09 12:31:11 +01:00
IceToast 1a8f883b63 feat: Add Extension Settings to Settingspage 2023-03-09 12:31:11 +01:00
IceToast 3ea5b4e010 feat: Added Extensionmigrations to laravel-settings config 2023-03-09 12:31:11 +01:00
IceToast 322bfed972 feat: Added PayPal Settings 2023-03-09 12:31:11 +01:00
IceToast a5b48c4730
fix: 🐛 Removed redundant closing div tags 2023-03-02 16:00:06 +01:00
1day2die 869bd1e0ef revert 2023-03-01 14:24:59 +01:00
1day2die a16c76940f test 2023-03-01 14:23:15 +01:00
Dennis d382ca1613
Revert 2023-03-01 14:15:14 +01:00
Dennis 6cf1cc0fe9
Do not delete old_settings for now 2023-03-01 14:10:47 +01:00
IceToast de911a0e3e fix: 🐛 Users table searching 2023-02-24 14:04:23 +01:00
IceToast 84f94ed564 feat: Add custom settings category icon 2023-02-24 14:02:28 +01:00
IceToast a6a729a065 fix: 🐛 Remove quotes from strings 2023-02-24 14:02:28 +01:00
IceToast 9124b2ddbd fix: 🐛 Rollback migrations 2023-02-24 14:02:28 +01:00
IceToast d10df843cb fix: 🔥 delete duplicated code 2023-02-24 14:02:28 +01:00
IceToast f2a714cece fix: 🗃️ settings table migration order 2023-02-24 14:02:28 +01:00
IceToast d6573b9bfd chore: 🗃️ Add settings migrations down method 2023-02-24 14:02:28 +01:00
Ferks-FK 415a7ed2da Insert the roolback for the old method. 2023-02-24 14:02:28 +01:00
Ferks-FK 2073aa632d Remove unnecessary import 2023-02-24 14:02:28 +01:00
Ferks-FK 825b27df57 Remove test folder xD 2023-02-24 14:02:28 +01:00
Ferks-FK 336b0c9799 Fix some options without their respective fields 2023-02-24 14:02:28 +01:00
IceToast d48c1af824 style: 💄 Button styling 2023-02-24 14:02:28 +01:00
IceToast 8c9c70ef3f fix: 🐛 Show checkbox checked 2023-02-24 14:02:28 +01:00
IceToast 201aff6c0a feat: Set Values with correct type 2023-02-24 14:02:28 +01:00
IceToast 309cfa0514 fix: 🐛 Multiple category field send 2023-02-24 14:02:28 +01:00
IceToast c39d6b18b2 chore: 🔥 Remove old Settings classes 2023-02-24 14:02:28 +01:00
IceToast d9d776e5da chore: 🦺 Added Validation to settings 2023-02-24 14:02:28 +01:00
IceToast 7f8017de76 feat: Persist settings in DB on update 2023-02-24 14:02:28 +01:00
IceToast c3420b1684 feat: Add Settings update route & Validation functionality 2023-02-24 14:02:28 +01:00
IceToast 20f0e1dfc2 refactor: ♻️ Use Switch state instead of elseif 2023-02-24 14:02:28 +01:00
IceToast ac5fa6c25c feat: Add InputData to all settings & Render correct inputs 2023-02-24 14:02:28 +01:00
IceToast 1011e2dcc4 chore: 🔥 Remove old settings tabs blade 2023-02-24 14:02:28 +01:00
IceToast b2d73eeda0 feat: Added Input components 2023-02-24 14:02:28 +01:00
IceToast 25b2d06572 feat: Added Labels to settings (controller) and show settings for category tab 2023-02-24 14:02:28 +01:00
IceToast 3b1b6e9b7e feat: Added validation to Settings 2023-02-24 14:02:28 +01:00
IceToast e9fec445ff feat: Send all settings in their groups to frontend -> show tabs 2023-02-24 14:02:28 +01:00
Ferks-FK a9619be8d0 front-end things 2023-02-24 14:02:28 +01:00
Ferks-FK f1a3126758 Correct some types of values from the old table 2023-02-24 14:02:28 +01:00
Ferks-FK 49904b22bf Some things to be adjusted 2023-02-24 14:02:28 +01:00
Ferks-FK fc49c6490f More Variables.. 2023-02-24 14:02:28 +01:00
Ferks-FK f00f5addfe Change missing variables 2023-02-24 14:02:28 +01:00
Ferks-FK 9cd25034fc Another ton of modifications 2023-02-24 14:02:28 +01:00
Ferks-FK 8935dd6482 Missing locale datatables 2023-02-24 14:02:28 +01:00
Ferks-FK da4693b310 That's better xD 2023-02-24 14:02:28 +01:00
Ferks-FK 302ef9227a Implement settings cache 2023-02-24 14:02:28 +01:00
Ferks-FK 411441e1a8 Migrate all variables in the front-end 2023-02-24 14:02:28 +01:00
Ferks-FK cfd370eb6d Too many changes to mention. 2023-02-24 14:02:28 +01:00
Ferks-FK 1d2548a174 Update all imports 2023-02-24 14:02:28 +01:00
Ferks-FK 16ca760901 Several modifications, something already works 2023-02-24 14:02:28 +01:00
Ferks-FK 636d4e259e Register all classes in the config file 2023-02-24 14:02:28 +01:00
Ferks-FK 5305ae7803 fix: Ternary would always return 'true' 2023-02-24 14:02:28 +01:00
Ferks-FK 8e212889a4 Create all the settings files. 2023-02-24 14:02:28 +01:00
Ferks-FK 1086dd85a4 Ptero API keys are now encrypted. 2023-02-24 14:02:28 +01:00
Ferks-FK ca0fae7bdb Add missing keys 2023-02-24 14:02:28 +01:00
Ferks-FK 2229586b58 feat: implement laravel-settings 2023-02-24 14:02:28 +01:00
Dennis c8e82ca57b
Update app.php 2023-02-23 09:38:09 +01:00
Dennis fc575a9554
Update app.php 2023-02-23 09:37:56 +01:00
Dennis 485aeedbf1
0.9.3 (#752) 2023-02-23 09:32:37 +01:00
IceToast 24f1319007 chore: 🔥 remove datatablessortable trait 2023-02-16 12:28:17 +01:00
IceToast 82887c013b chore: 🔥 remove datatablessortable trait 2023-02-16 12:28:17 +01:00
IceToast aefa5ba1c8 fix: 🐛 admin/servers sort 2023-02-16 12:28:17 +01:00
IceToast 17ab473576 fix: 🐛 admin/users sort 2023-02-16 12:28:17 +01:00
IceToast 459069c5ee feat: 🐛 admin/servers sortable 2023-02-16 12:28:17 +01:00
IceToast d905171fcb fix: 🐛 admin/store sorting 2023-02-16 12:28:17 +01:00
IceToast a0268f1c47 fix: 🐛 Sorting on admin/users datatable 2023-02-16 12:28:17 +01:00
IceToast b25ce96efb feat: Add Datatables Sortable trait 2023-02-16 12:28:17 +01:00
Johannes F e78bd37da0 fix: 🚑️ Harmonize formatting and merge some try catch 2023-02-14 22:58:19 +01:00
LogischJo 371a37df7a fix: 🚑️ Use try catch to prevent 500 errors 2023-02-14 22:58:19 +01:00
Johannes F af5d28e2a5 feat: Reopen tickets 2023-02-14 22:58:19 +01:00
Johannes F 8c2289ed74 fix: 🚑️ Wrong Store Page Name 2023-02-14 22:58:19 +01:00
2IceCube 60359a19ba Fixed Mobile View 2023-02-13 23:25:51 +01:00
2IceCube faf9950562 Add Theme Watermark 2023-02-13 23:24:45 +01:00
Johannes F 040bcf2fa0 fix: 🚑️ Wrong ticket priority getting displayed 2023-02-11 22:23:17 +01:00
Dennis 495981cb5a
[Hotfix] Paypal payment -> blank page (#727) 2023-02-08 09:41:40 +01:00
IceToast 128015f0fa
chore: 🌐 localization 2023-02-07 14:18:22 +01:00
IceToast d491271e7a
Merge branch 'development' of https://github.com/IceToast/controlpanel into development 2023-02-07 14:00:55 +01:00
IceToast 1e9c6c5838
Merge branch 'ControlPanel-gg:development' into development 2023-02-07 13:59:21 +01:00
IceToast b8946d8666
fix: 🚑️ Paypal authentication error -> blank page 2023-02-07 13:59:09 +01:00
Dennis a4c2fa2bc9
[Hotfix] v0.9.2 (#726) 2023-02-06 20:54:34 +01:00
IceToast fbdb3f12a1 fix: 🚑️ Set Theme to default when no setting or setting null 2023-02-06 20:44:09 +01:00
IceToast 01fc633303
fix: 🚑️ Set Theme to default when no setting or setting null 2023-02-06 20:42:17 +01:00
IceToast 8da3e8cb67
Merge branch 'ControlPanel-gg:development' into development 2023-02-06 14:11:18 +01:00
Dennis bb6d99cb74
Update versionnumber 2023-02-06 12:53:57 +01:00
IceToast f6c8eecb87 fix: 🐛 Wrong class name 2023-02-06 12:01:29 +01:00
IceToast f1de845554 fix: 🐛 getCsrfIgnoredRoutes map all routes just once 2023-02-06 12:01:29 +01:00
IceToast 308d1775bf fix: 🐛 Wrong class name 2023-02-06 12:00:21 +01:00
IceToast ef5c063b09 fix: 🐛 getCsrfIgnoredRoutes map all routes just once 2023-02-06 12:00:21 +01:00
IceToast 29e9ed6e4a
fix: 🐛 Wrong class name 2023-02-06 11:57:14 +01:00
IceToast 33cc108900
fix: 🐛 getCsrfIgnoredRoutes map all routes just once 2023-02-06 11:32:19 +01:00
Dennis 0b173fb428
0.9.1 Hotfix (#717) 2023-02-06 10:53:32 +01:00
Dennis 9b193c74dd
[HOTFIX] Stripe extensions enable flag (#716) 2023-02-05 21:15:08 +01:00
IceToast 663e2370a2
fix: 🐛 Enable Stripe on local environment 2023-02-05 21:11:28 +01:00
IceToast b7a765bd8c
fix: 🚑️ Stripe extensions enable flag 2023-02-05 21:07:13 +01:00
Dennis f79d7d5380
sync main (#715) 2023-02-05 18:58:43 +01:00
Dennis 6b45719e79
v0.9.1 (#714) 2023-02-05 18:58:10 +01:00
1day2die fd6e8bd51e Revert "Merge branch 'main' of https://github.com/1day2die/dashboard into development"
This reverts commit 704548343b, reversing
changes made to 4657b3419b.
2023-02-05 18:36:33 +01:00
1day2die 704548343b Merge branch 'main' of https://github.com/1day2die/dashboard into development 2023-02-05 18:35:09 +01:00
Dennis 4657b3419b
[Fix] Not all tickets deleted on user deletion (#711) 2023-02-05 17:10:48 +01:00
IceToast 3522dfe4c7
Merge branch 'ControlPanel-gg:development' into development 2023-02-05 16:37:18 +01:00
IceToast 7283f6e887
fix: 🚑️ Delete all Tickets on user deletion 2023-02-05 16:36:55 +01:00
Dennis 1d2e453fc2
[FIX] Useful_links: Add Label for Position and links on home (#705) 2023-02-02 23:45:16 +01:00
1day2die e8efc743b2 Add Label for Position and Useful links on home 2023-02-02 23:44:13 +01:00
Dennis a5e276d50e
[Feature] Cleanup "open" payments once a day (#704) 2023-02-02 23:33:06 +01:00
IceToast 0ffb7ccb65
refactor: 🚚 Rename Cleanup command 2023-02-02 23:21:52 +01:00
IceToast 9d383600bc
fix: 🐛 Missing primary key on payments table 2023-02-02 23:20:19 +01:00
IceToast 62358aec4e
feat: Add open payments cleanup to schedule 2023-02-02 23:19:08 +01:00
IceToast c1a2c34a06 fix: 🐛 Wrong label name 2023-02-02 15:26:17 +01:00
IceToast aedf7c9a22 feat: Use better issue templates 2023-02-02 15:26:17 +01:00
Dennis 58917d0b3e
[FEATURE] Add/Delete Ticket Categories (#699) 2023-02-02 14:33:26 +01:00
1day2die 9420231b58 Edit category name 2023-02-02 13:47:21 +01:00
IceToast bd11bd2657
Revert "Merge branch 'v0.10' into development"
This reverts commit e6a545309f, reversing
changes made to 036fe6f47f.
2023-02-01 21:03:20 +01:00
IceToast e6a545309f
Merge branch 'v0.10' into development 2023-02-01 20:55:34 +01:00
1day2die 630ebc6b88 Editable Ticket categories 2023-02-01 11:07:37 +01:00
Dennis 036fe6f47f
[FIX] Ticket tweaks || [THEME] Update theme (#698) 2023-02-01 10:12:49 +01:00
1day2die f9735bdd35 Fix ticket message disapearing 2023-02-01 10:11:06 +01:00
1day2die 57577c95b4 Ticket Tweaks 2023-02-01 10:06:15 +01:00
1day2die 4351c8b678 Update BlueInfinity, Change AppVersion 2023-02-01 09:54:21 +01:00
Dennis 985a4e94cb
[FIX] Installation without git - wrong logs + showing branch "unknown" (#693) 2023-01-31 16:09:37 +01:00
1day2die bcd69b4582 Change error to notice if not installed with git 2023-01-31 16:08:42 +01:00
Dennis e180704dd1
[Fix] PartnerController Refactor | [Fix] Ticket improvements (#690) 2023-01-31 14:25:14 +01:00
1day2die 4b3ee928ff localization 2023-01-31 14:21:36 +01:00
1day2die c8c3bff636 Update Blue-ish Theme 2023-01-31 12:37:27 +01:00
1day2die a7ef7eb17d Refactor Partnercontroller 2023-01-31 10:39:06 +01:00
1day2die eeed88aba8 Refactor whole PartnerController 2023-01-31 10:38:43 +01:00
1day2die e90479e452 ,show priority on ticket 2023-01-31 10:23:18 +01:00
1day2die 826be5ce5b increase ticket ID lenght 2023-01-31 10:16:45 +01:00
Dennis d7ca83ef97
[Refactor] Move referral_code generation to trait | [Fix] Allow free products handling (#670) 2023-01-30 22:48:42 +01:00
IceToast 4449353f3a
fix: 🐛 Do not show "Payment Methods" if product is free 2023-01-30 22:46:14 +01:00
IceToast a077092631
feat: Allow to buy a product for free 2023-01-30 22:44:48 +01:00
IceToast ff2d0b794e
fix: 🐛 handle free products 2023-01-30 22:34:06 +01:00
IceToast cfdfaf2fb1
Merge branch 'ControlPanel-gg:development' into development 2023-01-30 22:23:47 +01:00
Dennis d75fe2f428
[FIX] Themes / Paypal config || [Feature] Add blue-ish Theme for case-study (#672) 2023-01-30 22:06:46 +01:00
1day2die 8fa42c9f30 [Fix] Delete vite.config.js 2023-01-30 11:20:01 +01:00
1day2die e1dbbb21ee [FIX] Paypal Checkout disabled even if keys are set 2023-01-30 11:19:50 +01:00
1day2die 65f777baae [Fix] Themes || [Feature] Add blue-ish theme for case study 2023-01-30 10:47:32 +01:00
1day2die 9cd65a3f02 [FIX] Default theme 2023-01-30 09:43:13 +01:00
Dennis 7cdf9c6c93
[FIX] TOS Editor (#671) 2023-01-30 09:13:20 +01:00
1day2die 360a70f3d8 Update web.php 2023-01-30 09:12:13 +01:00
1day2die 119a7fdebb edit info boxes 2023-01-29 23:31:53 +01:00
Dennis 6263f163f9
[FEATURE] wysiwyg editor for imprint/Tos/privacy (#669) 2023-01-29 23:15:35 +01:00
IceToast 5ae631ee4f
refactor: ♻️ Move referral_code generation to trait 2023-01-29 23:12:34 +01:00
1day2die 9f165580e5 back to default 2023-01-29 22:21:22 +01:00
1day2die 218ce1c785 [FEATURE] wysiwyg editor for imprint/Tos/privacy 2023-01-29 22:16:06 +01:00
Dennis fd8dbb10a5
[FIX] User creation command referral code (#668) 2023-01-29 21:49:48 +01:00
1day2die 2c16379ec1 [FIX] User creation command referral code 2023-01-29 21:01:14 +01:00
Dennis a4695681b5
finish usefullinks (#667) 2023-01-29 20:34:22 +01:00
1day2die 2c041bbe14 finish themes 2023-01-29 20:33:27 +01:00
Dennis 0919202599
Merge branch 'development' into development 2023-01-29 20:31:10 +01:00
Dennis ca26da77c7
Fix the theme selector. (#666) 2023-01-29 20:29:46 +01:00
Ferks-FK bc2d5088c5 Fix the theme selector. 2023-01-29 18:32:13 +00:00
1day2die 8b4477bc8d finish usefullinks, fix vite 2023-01-26 23:26:00 +01:00
Dennis 64a241c1f9
Merge branch 'ControlPanel-gg:main' into main 2023-01-26 16:47:21 +01:00
Dennis fb8138a69d
Revert "[Hotfix] Enable payment gateways" (#664) 2023-01-26 16:44:20 +01:00
Dennis e2c07edd7d
Revert "[Hotfix] Enable payment gateways" 2023-01-26 16:43:53 +01:00
Dennis 6455cb371f
Merge branch 'ControlPanel-gg:main' into main 2023-01-26 16:38:51 +01:00
IceToast 7de05a841f
[Hotfix] Enable payment gateways (#653) 2023-01-26 16:33:49 +01:00
Dennis 0cfa02b4ce
[Feature] Add useful links in top menubar (#662) 2023-01-26 16:08:57 +01:00
1day2die de1c2e7b57 fix Themes Settings Tab 2023-01-26 15:56:54 +01:00
1day2die d8dcad4991 better query 2023-01-26 15:29:38 +01:00
1day2die b343134c01 using enums, adding more positions 2023-01-26 15:22:42 +01:00
1day2die fbc9b53b6c disable "upgrade" badge on tiny 2023-01-26 14:34:32 +01:00
Dennis 93e39165c2
Update README.md (#660) 2023-01-25 22:54:58 +01:00
1day2die f923eef868 Useful Links in Topbar 2023-01-25 22:32:59 +01:00
GeckoBoy84 0547066b30
Update README.md 2023-01-25 21:08:49 +00:00
GeckoBoy84 573106ae65
Update README.md 2023-01-25 21:07:56 +00:00
GeckoBoy84 9bbdbfecfb
Update Server Creation Image 2023-01-25 20:49:17 +00:00
GeckoBoy84 b2efd238c4
Update Ticket System Image 2023-01-25 20:48:40 +00:00
GeckoBoy84 ba3f03c7ce
Update Example server products Image 2023-01-25 20:47:59 +00:00
GeckoBoy84 ec1ce2df83
Add Voucher System Image 2023-01-25 20:46:54 +00:00
GeckoBoy84 d06f7e4933
Add Partner System Image 2023-01-25 20:45:27 +00:00
GeckoBoy84 1644ae706a
Update Ticket System Image 2023-01-25 20:44:02 +00:00
GeckoBoy84 7d65dcc7ef
Update Overview image 2023-01-25 20:43:03 +00:00
GeckoBoy84 3f02e0077c
Update Example Products Image 2023-01-25 20:42:35 +00:00
Dennis 771d013087
Update README.md 2023-01-25 21:40:13 +01:00
Dennis 843f66575f
[Fix] User creation settings (#648) 2023-01-25 21:39:02 +01:00
Dennis 56f819b905
Update README.md (#658) 2023-01-25 21:38:21 +01:00
Dennis 7ae7ad92f8
[Feature] Adding billing cycle system (#646) 2023-01-25 21:38:02 +01:00
GeckoBoy84 9f6c8dc21d
New Picture 2023-01-25 20:38:02 +00:00
Dennis c0beaeb2b0
fix minimum credits display on create server (#659) 2023-01-25 21:36:01 +01:00
1day2die b26ebb3150 fix minimum credits display on create server 2023-01-25 21:34:45 +01:00
GeckoBoy84 329079567e
Add more to the features list 2023-01-25 20:33:45 +00:00
Ferks-FK 0042c3bbe4 Merge branch 'development' of https://github.com/Ferks-FK/dashboard into development 2023-01-25 18:43:31 +00:00
Ferks-FK 6b848b1446 Multiple changes 2023-01-25 18:42:54 +00:00
Ferks 8eb92ef7c6
Merge branch 'ControlPanel-gg:development' into development 2023-01-25 13:30:10 -04:00
Dennis 8fe523cacf
Merge branch 'ControlPanel-gg:main' into main 2023-01-25 13:14:03 +01:00
IceToast 8745591f97
[Feature] Add error logger for register controller (#654) 2023-01-23 21:44:32 +01:00
IceToast a3ba6257ba feat: 🔊 Add error logger on registration 2023-01-23 21:34:22 +01:00
IceToast a9c0df015c
[Hotfix] Enable Payment Gateways (#652) 2023-01-23 17:00:31 +01:00
IceToast f74c188d5b
Merge branch 'ControlPanel-gg:development' into development 2023-01-23 16:59:23 +01:00
IceToast 195eeb06b6
[Hotfix] Composer.lock mismatch (#651) 2023-01-23 16:58:35 +01:00
IceToast 9260b967b3 fix: 🚑️ Enable/Disable Payment Gateways TODO: Integrate into settings! 2023-01-23 16:57:28 +01:00
Dennis ec63b6e58e
Update Composer.lock (#650) 2023-01-23 16:29:26 +01:00
1day2die 7835392d95 Update composer.lock 2023-01-23 16:27:33 +01:00
1day2die 265a35a903 Update Composer.lock 2023-01-23 16:25:35 +01:00
Dennis e51f2aaf61
Merge branch 'ControlPanel-gg:main' into main 2023-01-23 16:01:51 +01:00
Dennis f8fcaa6d1f
[Release] Version 0.9 🔥 (#649) 2023-01-23 15:31:20 +01:00
Ferks-FK 977d2ddd18 Simple fix of a checkbox 2023-01-22 19:58:28 +00:00
Dennis c32bfc1c8a
[Fix/Features] CSRF Ignoring Routes support & Fix Invoice creation on webhook (#640) 2023-01-22 16:21:37 +01:00
IceToast 48b163fd6c Merge branch 'V0.10' of https://github.com/IceToast/controlpanel into V0.10 2023-01-21 15:13:51 +01:00
IceToast 5fd58514b5 Merge branch addons/billing_period into V0.10 2023-01-21 15:13:48 +01:00
IceToast e5dd05e701 Merge branch addons/billing_period into V0.10 2023-01-21 15:04:12 +01:00
Dennis 2dbe7268e4
Merge branch 'ControlPanel-gg:main' into main 2022-12-13 12:02:26 -08:00
Dennis 49291de381
Merge branch 'ControlPanel-gg:main' into main 2022-11-29 00:44:40 -08:00
Dennis 89bfa9c9d8
Merge branch 'ControlPanel-gg:main' into main 2022-10-27 09:01:08 +02:00
1day2die afd595c965 Merge branch 'main' of https://github.com/1day2die/dashboard 2022-10-11 15:26:29 +02:00
1day2die 6d46f8a6cc Merge branch 'main' of https://github.com/1day2die/dashboard 2022-08-16 23:03:26 +02:00
Dennis 8cbbcc66be
Update dependabot.yml 2022-08-11 10:01:42 +02:00
Dennis 822b4393c3
Update dependabot.yml 2022-08-11 10:01:31 +02:00
Dennis 4c20cb8969
Create dependabot.yml 2022-08-11 09:59:16 +02:00
Dennis 417f944b4d
Create codeql-analysis.yml 2022-08-11 09:55:16 +02:00
90 changed files with 4284 additions and 23873 deletions

View file

@ -1,5 +1,5 @@
### --- App Settings --- ###
APP_NAME=Controlpanel.gg
APP_NAME=Ctrlpanel.gg
APP_ENV=production
APP_KEY=
APP_DEBUG=false

View file

@ -1,38 +0,0 @@
---
name: "\U0001F41B Bug report"
about: Create a report to help us improve
title: ''
labels: bug
assignees: RamonRobben, AVMG20
---
**Describe the bug 🐛**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
**Additional context**
Add any other context about the problem here.

View file

@ -1,31 +0,0 @@
---
name: "\U0001F680 Feature request"
about: Suggest a feature or idea for this project
title: "[feature] "
labels: enhancement
assignees: RamonRobben, AVMG20
---
# 🚀 Feature Request
### Is your proposal related to a problem?
*Provide a clear and concise description of what the problem is.
For example, "I can't change x and it makes me have to do manual work"*
(Write your answer here.)
### Describe the solution you'd like
*Provide a clear and concise description of what you want to happen.
For Example, "Automate the changing of x so I don't have to do it manually"*
(Describe your proposed solution here.)
### Additional context
*Is there anything else you can add about the proposal?
You might want to link to related issues here, if you haven't already.*
(Write your answer here.)

43
.github/ISSUE_TEMPLATE/bug.yml vendored Normal file
View file

@ -0,0 +1,43 @@
name: "\U0001F41B Bug report"
description: Create a report to help us improve
title: "[Bug]: "
labels: ["bug"]
body:
- type: textarea
id: what-happened
attributes:
label: What is your request about?
description: |
Provide a clear description of what the problem is.
validations:
required: true
- type: dropdown
id: version
attributes:
label: Branch
description: What branch are you on?
multiple: false
options:
- "main"
- "development"
validations:
required: true
- type: textarea
id: solution
attributes:
label: Solution idea
description: |
Provide a clear description of how you want this bug to be fixed (Optional)
validations:
required: false
- type: textarea
id: ctrlpanel-logs
attributes:
label: Ctrlpanel Logs
description: Please copy and paste your laravel-log output. You may also provide a link to it using the following command `tail -n 100 /var/www/controlpanel/storage/logs/laravel.log | nc pteropaste.com 99`
render: Shell
- type: textarea
id: additional-info
attributes:
label: Additional Info
description: Anything else that could be used to narrow down the issue, like your config.

24
.github/ISSUE_TEMPLATE/feature.yml vendored Normal file
View file

@ -0,0 +1,24 @@
name: "\U0001F680 Feature request"
description: Suggest a feature or idea for this project
title: "[Feature] "
labels: ["feature"]
body:
- type: textarea
id: feature-description
attributes:
label: Feature Description
description: Provide a clear description of what your idea is all about, what it tries to solve and why it should be implemented.
validations:
required: true
- type: textarea
id: solution
attributes:
label: Solution Idea
description: Provide a clear description how the idea should be implemented and why.
validations:
required: true
- type: textarea
id: additional-info
attributes:
label: Additional Info
description: Anything else that could be used to implement your idea.

View file

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2021 ControlPanel.gg
Copyright (c) 2021 CtrlPanel.gg
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View file

@ -3,6 +3,7 @@
- PayPal Integration
- Stripe Integration
- Referral System
- Partner System
- Ticket System
- Upgrade/Downgrade Server Resources
- Store (credit system with hourly billing and invoices)
@ -12,46 +13,55 @@
- User/Server Management
- Customisable server plans
- Vouchers
- Alert System
- Theme Support
- and so much more!
# ControlPanel-gg
# CtrlPanel-gg
![controlpanel](https://user-images.githubusercontent.com/45005889/123518824-06b05000-d6a8-11eb-91b9-d1ed36bd2317.png)
![ctrlpanel](https://user-images.githubusercontent.com/67899387/214684708-739c1d21-06e8-4dec-a4f1-81533a46cc7e.png)
![](https://img.shields.io/endpoint?label=v0.8%20Installations&url=https%3A%2F%2Fmarket.controlpanel.gg%2Fcallhome.php%3Fgetinstalls)
![](https://img.shields.io/badge/Overall%20Installations-3500%2B-green)
![](https://img.shields.io/github/stars/ControlPanel-gg/dashboard) ![](https://img.shields.io/github/forks/ControlPanel-gg/dashboard) ![](https://img.shields.io/github/tag/ControlPanel-gg/dashboard) [![Crowdin](https://badges.crowdin.net/controlpanelgg/localized.svg)](https://crowdin.com/project/controlpanelgg) ![](https://img.shields.io/github/issues/ControlPanel-gg/dashboard) ![](https://img.shields.io/github/license/ControlPanel-gg/dashboard) ![](https://img.shields.io/discord/787829714483019826)
![](https://img.shields.io/endpoint?label=v0.9%20Installations&url=https%3A%2F%2Fmarket.ctrlpanel.gg%2Fcallhome.php%3Fgetinstalls)
![](https://img.shields.io/badge/Overall%20Installations-5000%2B-green)
![](https://img.shields.io/github/stars/CtrlPanel-gg/panel) ![](https://img.shields.io/github/forks/CtrlPanel-gg/panel) ![](https://img.shields.io/github/tag/CtrlPanel-gg/panel) [![Crowdin](https://badges.crowdin.net/controlpanelgg/localized.svg)](https://crowdin.com/project/controlpanelgg) ![](https://img.shields.io/github/issues/CtrlPanel-gg/panel) ![](https://img.shields.io/github/license/CtrlPanel-gg/panel) ![](https://img.shields.io/discord/787829714483019826)
## About
ControlPanel's Dashboard is a dashboard application designed to offer clients a management tool to manage their pterodactyl servers. This dashboard comes with a credit-based billing solution that credits users hourly for each server they have and suspends them if they run out of credits.
CtrlPanel's Dashboard is a dashboard application designed to offer clients a management tool to manage their pterodactyl servers. This dashboard comes with a credit-based billing solution that credits users hourly for each server they have and suspends them if they run out of credits.
This dashboard offers an easy to use and free billing solution for all starting and experienced hosting providers. This dashboard has many customization options and added discord 0auth verification to offer a solid link between your discord server and your dashboard. You can check our Demo here ([Demo](https://demo.controlpanel.gg "Demo"))
This dashboard offers an easy to use and free billing solution for all starting and experienced hosting providers. This dashboard has many customisation options and added discord Oauth verification to offer a solid link between your discord server and your dashboard. You can check our [Demo here](https://demo.ctrlpanel.gg "Demo").
### [Installation](https://controlpanel.gg/docs/intro "Installation")
### [Installation](https://ctrlpanel.gg/docs/intro "Installation")
### [Updating](https://controlpanel.gg/docs/Installation/updating "Updating")
### [Updating](https://ctrlpanel.gg/docs/Installation/updating "Updating")
### [Discord](https://discord.gg/4Y6HjD2uyU "discord")
### [Discord](https://discord.gg/4Y6HjD2uyU "Discord")
### [Contributing](https://controlpanel.gg/docs/Contributing/contributing "Contributing")
### [Contributing](https://ctrlpanel.gg/docs/Contributing/contributing "Contributing")
### [Donating](https://controlpanel.gg/docs/Contributing/donating "Donating")
### [Donating](https://ctrlpanel.gg/docs/Contributing/donating "Donating")
# Preview
### Server Creation
![image](https://user-images.githubusercontent.com/8725848/171575021-bc248f12-2aba-44e8-82aa-bdc907b1d3fc.png)
![image](https://user-images.githubusercontent.com/67899387/214687234-d1ae58c0-5667-4e99-ac39-adeaabfcc7f2.png)
### Overview
![image](https://user-images.githubusercontent.com/8725848/171575809-7620ed4f-5715-420f-8c25-8bfa1c4342f7.png)
![image](https://user-images.githubusercontent.com/67899387/214685859-03c8d9e1-c685-4a07-979f-df2e88ec3931.png)
### Example server products
![image](https://user-images.githubusercontent.com/8725848/171575987-c1398ff6-83fa-4cb8-bd1f-986cee4da565.png)
![image](https://user-images.githubusercontent.com/67899387/214686950-218e1ede-6a1f-4e53-b3f4-fe1abc371a9c.png)
### Ticket System
![image](https://user-images.githubusercontent.com/8725848/184131270-9d997ebf-8965-4910-90d2-b410ae37f201.png)
![image](https://user-images.githubusercontent.com/67899387/214687123-0a3d0f8f-b53c-4b0d-869a-4d5df45f5184.png)
### Voucher System
![image](https://user-images.githubusercontent.com/67899387/214686578-ec9f0b0f-6047-4665-835f-70594b56dfd5.png)
### Partner System
![image](https://user-images.githubusercontent.com/67899387/214686321-36ba97a3-4181-4e60-9ba3-c9b318fe66a8.png)

View file

@ -50,6 +50,7 @@ class System
'pterodactyl-admin-api-key' => 'required|string',
'enable-upgrades' => 'string',
'enable-disable-servers' => 'string',
'enable-disable-new-users' => 'string',
'show-imprint' => 'string',
'show-privacy' => 'string',
'show-tos' => 'string',

View file

@ -67,7 +67,7 @@ class ChargeCreditsCommand extends Command
$server->suspend();
//add user to notify list
if (! in_array($user, $this->usersToNotify)) {
if (!in_array($user, $this->usersToNotify)) {
array_push($this->usersToNotify, $user);
}
} catch (\Exception $exception) {
@ -85,7 +85,7 @@ class ChargeCreditsCommand extends Command
*/
public function notifyUsers()
{
if (! empty($this->usersToNotify)) {
if (!empty($this->usersToNotify)) {
/** @var User $user */
foreach ($this->usersToNotify as $user) {
$this->line("<fg=yellow>Notified user:</> <fg=blue>{$user->name}</>");

View file

@ -0,0 +1,42 @@
<?php
namespace App\Console\Commands;
use App\Models\Payment;
use Illuminate\Console\Command;
class CleanupOpenPayments extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'payments:open:clear';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Clears all payments from the database that have state "open"';
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
// delete all payments that have state "open" and are older than 1 hour
try {
Payment::where('status', 'open')->where('updated_at', '<', now()->subHour())->delete();
} catch (\Exception $e) {
$this->error('Could not delete payments: ' . $e->getMessage());
return 1;
}
$this->info('Successfully deleted all open payments');
return Command::SUCCESS;
}
}

View file

@ -32,7 +32,7 @@ class GetGithubVersion extends Command
public function handle()
{
try{
$latestVersion = Http::get('https://api.github.com/repos/controlpanel-gg/dashboard/tags')->json()[0]['name'];
$latestVersion = Http::get('https://api.github.com/repos/ctrlpanel-gg/panel/tags')->json()[0]['name'];
Storage::disk('local')->put('latestVersion', $latestVersion);
} catch (Exception $e) {
Storage::disk('local')->put('latestVersion', "unknown");

View file

@ -4,12 +4,16 @@ namespace App\Console\Commands;
use App\Classes\Pterodactyl;
use App\Models\User;
use App\Traits\Referral;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Str;
class MakeUserCommand extends Command
{
use Referral;
/**
* The name and signature of the console command.
*
@ -37,6 +41,7 @@ class MakeUserCommand extends Command
$this->pterodactyl = $pterodactyl;
}
/**
* Execute the console command.
*
@ -78,12 +83,12 @@ class MakeUserCommand extends Command
return 0;
}
$user = User::create([
'name' => $response['first_name'],
'email' => $response['email'],
'role' => 'admin',
'password' => Hash::make($password),
'referral_code' => $this->createReferralCode(),
'pterodactyl_id' => $response['id'],
]);
@ -93,6 +98,7 @@ class MakeUserCommand extends Command
['Username', $user->name],
['Ptero-ID', $user->pterodactyl_id],
['Admin', $user->role],
['Referral code', $user->referral_code],
]);
return 1;

View file

@ -18,10 +18,11 @@ class Kernel extends ConsoleKernel
{
$schedule->command('credits:charge')->hourly();
$schedule->command('cp:versioncheck:get')->daily();
$schedule->command('payments:open:clear')->daily();
//log cronjob activity
$schedule->call(function () {
Storage::disk('logs')->put('cron.log', 'Last activity from cronjobs - '.now());
Storage::disk('logs')->put('cron.log', 'Last activity from cronjobs - ' . now());
})->everyMinute();
}
@ -32,7 +33,7 @@ class Kernel extends ConsoleKernel
*/
protected function commands()
{
$this->load(__DIR__.'/Commands');
$this->load(__DIR__ . '/Commands');
require base_path('routes/console.php');
}

View file

@ -0,0 +1,19 @@
<?php
namespace App\Enums;
enum UsefulLinkLocation:String
{
/**
* Top bar
* Only visible in the dashboard view
*/
case topbar = "topbar";
/**
* Dashboard
* Only visible in the dashboard view
*/
case dashboard = "dashboard";
}

View file

@ -8,5 +8,6 @@ function getConfig()
"name" => "PayPal",
"description" => "PayPal payment gateway",
"RoutesIgnoreCsrf" => [],
"enabled" => (config('SETTINGS::PAYMENTS:PAYPAL:SECRET') && config('SETTINGS::PAYMENTS:PAYPAL:CLIENT_ID')) || (config('SETTINGS::PAYMENTS:PAYPAL:SANDBOX_SECRET') && config('SETTINGS::PAYMENTS:PAYPAL:SANDBOX_CLIENT_ID') && env("APP_ENV") === "local"),
];
}

View file

@ -9,6 +9,7 @@ use App\Models\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Redirect;
use Illuminate\Support\Facades\Log;
use PayPalCheckoutSdk\Core\PayPalHttpClient;
use PayPalCheckoutSdk\Core\ProductionEnvironment;
use PayPalCheckoutSdk\Core\SandboxEnvironment;
@ -74,7 +75,7 @@ function PaypalPay(Request $request)
"application_context" => [
"cancel_url" => route('payment.Cancel'),
"return_url" => route('payment.PayPalSuccess', ['payment' => $payment->id]),
'brand_name' => config('app.name', 'Laravel'),
'brand_name' => config('app.name', 'CtrlPanel.gg'),
'shipping_preference' => 'NO_SHIPPING'
]
@ -85,14 +86,23 @@ function PaypalPay(Request $request)
// Call API with your client and get a response for your call
$response = getPayPalClient()->execute($request);
// check for any errors in the response
if ($response->statusCode != 201) {
throw new \Exception($response->statusCode);
}
// make sure the link is not empty
if (empty($response->result->links[1]->href)) {
throw new \Exception('No redirect link found');
}
Redirect::away($response->result->links[1]->href)->send();
return;
} catch (HttpException $ex) {
error_log($ex->statusCode);
error_log($ex->getMessage());
Log::error('PayPal Payment: ' . $ex->getMessage());
$payment->delete();
Redirect::route('payment.Cancel');
Redirect::route('store.index')->with('error', __('Payment failed'))->send();
return;
}
}

View file

@ -10,5 +10,6 @@ function getConfig()
"RoutesIgnoreCsrf" => [
"payment/StripeWebhooks",
],
"enabled" => config('SETTINGS::PAYMENTS:STRIPE:SECRET') && config('SETTINGS::PAYMENTS:STRIPE:ENDPOINT_SECRET') || config('SETTINGS::PAYMENTS:STRIPE:ENDPOINT_TEST_SECRET') && config('SETTINGS::PAYMENTS:STRIPE:TEST_SECRET') && env("APP_ENV") === "local",
];
}

View file

@ -51,13 +51,11 @@ class ExtensionHelper
$routes = array_merge($routes, $config['RoutesIgnoreCsrf']);
}
// add extension/ infront of every route
foreach ($routes as $key => $route) {
$routes[$key] = 'extensions/' . $route;
}
// map over the routes and add the extension name as prefix
$result = array_map(fn ($item) => "extensions/{$item}", $routes);
}
return $routes;
return $result;
}
/**

View file

@ -0,0 +1,42 @@
<?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\File;
use Qirolab\Theme\Theme;
class LegalController extends Controller
{
/**
* Display
*
* @return View
*/
public function index()
{
$tos = File::get(Theme::path($path = 'views', "default") . '/information/tos-content.blade.php');
$privacy = File::get(Theme::path($path = 'views', "default") . '/information/privacy-content.blade.php');
$imprint = File::get(Theme::path($path = 'views', "default") . '/information/imprint-content.blade.php');
return view('admin.legal.index')->with([
"tos" => $tos,
"privacy" => $privacy,
"imprint" => $imprint,
]);
}
public function update(Request $request){
$tos = $request->tos;
$privacy = $request->privacy;
$imprint = $request->imprint;
File::put(Theme::path($path = 'views', "default") . '/information/tos-content.blade.php', $tos);
File::put(Theme::path($path = 'views', "default") . '/information/privacy-content.blade.php', $privacy);
File::put(Theme::path($path = 'views', "default") . '/information/imprint-content.blade.php', $imprint);
return back()->with("success",__("Legal pages updated"));
}
}

View file

@ -1,7 +1,8 @@
<?php
namespace App\Http\Controllers;
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use App\Models\PartnerDiscount;
use App\Models\User;
use Illuminate\Http\Request;
@ -40,26 +41,19 @@ class PartnerController extends Controller
'registered_user_discount' => 'required|integer|max:100|min:0',
]);
if(PartnerDiscount::where("user_id",$request->user_id)->exists()){
return redirect()->route('admin.partners.index')->with('error', __('Partner already exists'));
}
PartnerDiscount::create($request->all());
return redirect()->route('admin.partners.index')->with('success', __('partner has been created!'));
}
/**
* Display the specified resource.
*
* @param Voucher $voucher
* @return Response
*/
public function show(Voucher $voucher)
{
//
}
/**
* Show the form for editing the specified resource.
*
* @param Voucher $voucher
* @param Partner $partner
* @return Application|Factory|View
*/
public function edit(PartnerDiscount $partner)
@ -75,7 +69,7 @@ class PartnerController extends Controller
* Update the specified resource in storage.
*
* @param Request $request
* @param Voucher $voucher
* @param Partner $partner
* @return RedirectResponse
*/
public function update(Request $request, PartnerDiscount $partner)
@ -95,7 +89,7 @@ class PartnerController extends Controller
/**
* Remove the specified resource from storage.
*
* @param Voucher $voucher
* @param Partner $partner
* @return RedirectResponse
*/
public function destroy(PartnerDiscount $partner)
@ -105,81 +99,7 @@ class PartnerController extends Controller
return redirect()->back()->with('success', __('partner has been removed!'));
}
public function users(Voucher $voucher)
{
return view('admin.vouchers.users', [
'voucher' => $voucher,
]);
}
/**
* @param Request $request
* @return JsonResponse
*
* @throws ValidationException
*/
public function redeem(Request $request)
{
//general validations
$request->validate([
'code' => 'required|exists:vouchers,code',
]);
//get voucher by code
$voucher = Voucher::where('code', '=', $request->input('code'))->firstOrFail();
//extra validations
if ($voucher->getStatus() == 'USES_LIMIT_REACHED') {
throw ValidationException::withMessages([
'code' => __('This voucher has reached the maximum amount of uses'),
]);
}
if ($voucher->getStatus() == 'EXPIRED') {
throw ValidationException::withMessages([
'code' => __('This voucher has expired'),
]);
}
if (! $request->user()->vouchers()->where('id', '=', $voucher->id)->get()->isEmpty()) {
throw ValidationException::withMessages([
'code' => __('You already redeemed this voucher code'),
]);
}
if ($request->user()->credits + $voucher->credits >= 99999999) {
throw ValidationException::withMessages([
'code' => "You can't redeem this voucher because you would exceed the limit of ".CREDITS_DISPLAY_NAME,
]);
}
//redeem voucher
$voucher->redeem($request->user());
event(new UserUpdateCreditsEvent($request->user()));
return response()->json([
'success' => "{$voucher->credits} ".CREDITS_DISPLAY_NAME.' '.__('have been added to your balance!'),
]);
}
public function usersDataTable(Voucher $voucher)
{
$users = $voucher->users();
return datatables($users)
->editColumn('name', function (User $user) {
return '<a class="text-info" target="_blank" href="'.route('admin.users.show', $user->id).'">'.$user->name.'</a>';
})
->addColumn('credits', function (User $user) {
return '<i class="fas fa-coins mr-2"></i> '.$user->credits();
})
->addColumn('last_seen', function (User $user) {
return $user->last_seen ? $user->last_seen->diffForHumans() : '';
})
->rawColumns(['name', 'credits', 'last_seen'])
->make();
}
public function dataTable()
{

View file

@ -2,6 +2,7 @@
namespace App\Http\Controllers\Admin;
use App\Events\PaymentEvent;
use App\Events\UserUpdateCreditsEvent;
use App\Http\Controllers\Controller;
use App\Models\PartnerDiscount;
@ -38,19 +39,29 @@ class PaymentController extends Controller
*/
public function checkOut(ShopProduct $shopProduct)
{
$extensions = ExtensionHelper::getAllExtensionsByNamespace('PaymentGateways');
$discount = PartnerDiscount::getDiscount();
$price = $shopProduct->price - ($shopProduct->price * $discount / 100);
// build a paymentgateways array that contains the routes for the payment gateways and the image path for the payment gateway which lays in public/images/Extensions/PaymentGateways with the extensionname in lowercase
$paymentGateways = [];
foreach ($extensions as $extension) {
$extensionName = basename($extension);
$payment = new \stdClass();
$payment->name = ExtensionHelper::getExtensionConfig($extensionName, 'name');
$payment->image = asset('images/Extensions/PaymentGateways/' . strtolower($extensionName) . '_logo.png');
$paymentGateways[] = $payment;
if ($price > 0) {
$extensions = ExtensionHelper::getAllExtensionsByNamespace('PaymentGateways');
// build a paymentgateways array that contains the routes for the payment gateways and the image path for the payment gateway which lays in public/images/Extensions/PaymentGateways with the extensionname in lowercase
foreach ($extensions as $extension) {
$extensionName = basename($extension);
if (!ExtensionHelper::getExtensionConfig($extensionName, 'enabled')) continue; // skip if not enabled
$payment = new \stdClass();
$payment->name = ExtensionHelper::getExtensionConfig($extensionName, 'name');
$payment->image = asset('images/Extensions/PaymentGateways/' . strtolower($extensionName) . '_logo.png');
$paymentGateways[] = $payment;
}
}
$discount = PartnerDiscount::getDiscount();
return view('store.checkout')->with([
'product' => $shopProduct,
@ -61,6 +72,7 @@ class PaymentController extends Controller
'taxpercent' => $shopProduct->getTaxPercent(),
'total' => $shopProduct->getTotalPrice(),
'paymentGateways' => $paymentGateways,
'productIsFree' => $price <= 0,
]);
}
@ -69,29 +81,12 @@ class PaymentController extends Controller
* @param ShopProduct $shopProduct
* @return RedirectResponse
*/
public function FreePay(ShopProduct $shopProduct)
public function handleFreeProduct(ShopProduct $shopProduct)
{
//check if the product is really free or the discount is 100%
if ($shopProduct->getTotalPrice() > 0) return redirect()->route('home')->with('error', __('An error ocured. Please try again.'));
//give product
/** @var User $user */
$user = Auth::user();
//not updating server limit
//update User with bought item
if ($shopProduct->type == "Credits") {
$user->increment('credits', $shopProduct->quantity);
} elseif ($shopProduct->type == "Server slots") {
$user->increment('server_limit', $shopProduct->quantity);
}
//skipped the referral commission, because the user did not pay anything.
//not giving client role
//store payment
//create a payment
$payment = Payment::create([
'user_id' => $user->id,
'payment_id' => uniqid(),
@ -108,6 +103,7 @@ class PaymentController extends Controller
]);
event(new UserUpdateCreditsEvent($user));
event(new PaymentEvent($user, $payment, $shopProduct));
//not sending an invoice
@ -120,6 +116,12 @@ class PaymentController extends Controller
$product = ShopProduct::find($request->product_id);
$paymentGateway = $request->payment_method;
// on free products, we don't need to use a payment gateway
$realPrice = $product->price - ($product->price * PartnerDiscount::getDiscount() / 100);
if ($realPrice <= 0) {
return $this->handleFreeProduct($product);
}
return redirect()->route('payment.' . $paymentGateway . 'Pay', ['shopProduct' => $product->id]);
}

View file

@ -14,6 +14,7 @@ use Illuminate\Http\JsonResponse;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\Support\Facades\Log;
class ServerController extends Controller
{
@ -27,38 +28,6 @@ class ServerController extends Controller
return view('admin.servers.index');
}
/**
* Show the form for creating a new resource.
*
* @return Response
*/
public function create()
{
//
}
/**
* Store a newly created resource in storage.
*
* @param Request $request
* @return Response
*/
public function store(Request $request)
{
//
}
/**
* Display the specified resource.
*
* @param Server $server
* @return Response
*/
public function show(Server $server)
{
//
}
/**
* Show the form for editing the specified resource.
*
@ -196,6 +165,8 @@ class ServerController extends Controller
public function dataTable(Request $request)
{
$query = Server::with(['user', 'product']);
if ($request->has('product')) {
$query->where('product_id', '=', $request->input('product'));
}
@ -204,6 +175,9 @@ class ServerController extends Controller
}
$query->select('servers.*');
Log::info($request->input('order'));
return datatables($query)
->addColumn('user', function (Server $server) {
return '<a href="' . route('admin.users.show', $server->user->id) . '">' . $server->user->name . '</a>';
@ -232,7 +206,7 @@ class ServerController extends Controller
';
})
->addColumn('status', function (Server $server) {
$labelColor = $server->isSuspended() ? 'text-danger' : 'text-success';
$labelColor = $server->suspended ? 'text-danger' : 'text-success';
return '<i class="fas ' . $labelColor . ' fa-circle mr-2"></i>';
})

View file

@ -22,7 +22,13 @@ class SettingsController extends Controller
//Get all tabs as laravel view paths
$tabs = [];
foreach (glob(Theme::getViewPaths()[0] . '/admin/settings/tabs/*.blade.php') as $filename) {
if(file_exists(Theme::getViewPaths()[0] . '/admin/settings/tabs/')){
$tabspath = glob(Theme::getViewPaths()[0] . '/admin/settings/tabs/*.blade.php');
}else{
$tabspath = glob(Theme::path($path = 'views', $themeName = 'default').'/admin/settings/tabs/*.blade.php');
}
foreach ($tabspath as $filename) {
$tabs[] = 'admin.settings.tabs.'.basename($filename, '.blade.php');
}

View file

@ -14,6 +14,7 @@ use Illuminate\Validation\Rule;
class ShopProductController extends Controller
{
/**
* Display a listing of the resource.
*
@ -66,23 +67,12 @@ class ShopProductController extends Controller
'display' => 'required|string|max:60',
]);
$disabled = ! is_null($request->input('disabled'));
$disabled = !is_null($request->input('disabled'));
ShopProduct::create(array_merge($request->all(), ['disabled' => $disabled]));
return redirect()->route('admin.store.index')->with('success', __('Store item has been created!'));
}
/**
* Display the specified resource.
*
* @param ShopProduct $shopProduct
* @return Response
*/
public function show(ShopProduct $shopProduct)
{
//
}
/**
* Show the form for editing the specified resource.
*
@ -116,7 +106,7 @@ class ShopProductController extends Controller
'display' => 'required|string|max:60',
]);
$disabled = ! is_null($request->input('disabled'));
$disabled = !is_null($request->input('disabled'));
$shopProduct->update(array_merge($request->all(), ['disabled' => $disabled]));
return redirect()->route('admin.store.index')->with('success', __('Store item has been updated!'));
@ -129,7 +119,7 @@ class ShopProductController extends Controller
*/
public function disable(Request $request, ShopProduct $shopProduct)
{
$shopProduct->update(['disabled' => ! $shopProduct->disabled]);
$shopProduct->update(['disabled' => !$shopProduct->disabled]);
return redirect()->route('admin.store.index')->with('success', __('Product has been updated!'));
}
@ -147,19 +137,20 @@ class ShopProductController extends Controller
return redirect()->back()->with('success', __('Store item has been removed!'));
}
public function dataTable()
public function dataTable(Request $request)
{
$query = ShopProduct::query();
return datatables($query)
->addColumn('actions', function (ShopProduct $shopProduct) {
return '
<a data-content="'.__('Edit').'" data-toggle="popover" data-trigger="hover" data-placement="top" href="'.route('admin.store.edit', $shopProduct->id).'" class="btn btn-sm btn-info mr-1"><i class="fas fa-pen"></i></a>
<a data-content="' . __('Edit') . '" data-toggle="popover" data-trigger="hover" data-placement="top" href="' . route('admin.store.edit', $shopProduct->id) . '" class="btn btn-sm btn-info mr-1"><i class="fas fa-pen"></i></a>
<form class="d-inline" onsubmit="return submitResult();" method="post" action="'.route('admin.store.destroy', $shopProduct->id).'">
'.csrf_field().'
'.method_field('DELETE').'
<button data-content="'.__('Delete').'" data-toggle="popover" data-trigger="hover" data-placement="top" class="btn btn-sm btn-danger mr-1"><i class="fas fa-trash"></i></button>
<form class="d-inline" onsubmit="return submitResult();" method="post" action="' . route('admin.store.destroy', $shopProduct->id) . '">
' . csrf_field() . '
' . method_field('DELETE') . '
<button data-content="' . __('Delete') . '" data-toggle="popover" data-trigger="hover" data-placement="top" class="btn btn-sm btn-danger mr-1"><i class="fas fa-trash"></i></button>
</form>
';
})
@ -167,12 +158,12 @@ class ShopProductController extends Controller
$checked = $shopProduct->disabled == false ? 'checked' : '';
return '
<form class="d-inline" onsubmit="return submitResult();" method="post" action="'.route('admin.store.disable', $shopProduct->id).'">
'.csrf_field().'
'.method_field('PATCH').'
<form class="d-inline" onsubmit="return submitResult();" method="post" action="' . route('admin.store.disable', $shopProduct->id) . '">
' . csrf_field() . '
' . method_field('PATCH') . '
<div class="custom-control custom-switch">
<input '.$checked.' name="disabled" onchange="this.form.submit()" type="checkbox" class="custom-control-input" id="switch'.$shopProduct->id.'">
<label class="custom-control-label" for="switch'.$shopProduct->id.'"></label>
<input ' . $checked . ' name="disabled" onchange="this.form.submit()" type="checkbox" class="custom-control-input" id="switch' . $shopProduct->id . '">
<label class="custom-control-label" for="switch' . $shopProduct->id . '"></label>
</div>
</form>
';

View file

@ -2,6 +2,7 @@
namespace App\Http\Controllers\Admin;
use App\Enums\UsefulLinkLocation;
use App\Http\Controllers\Controller;
use App\Models\UsefulLink;
use Illuminate\Contracts\Foundation\Application;
@ -30,7 +31,8 @@ class UsefulLinkController extends Controller
*/
public function create()
{
return view('admin.usefullinks.create');
$positions = UsefulLinkLocation::cases();
return view('admin.usefullinks.create')->with('positions', $positions);
}
/**
@ -48,7 +50,14 @@ class UsefulLinkController extends Controller
'description' => 'required|string|max:2000',
]);
UsefulLink::create($request->all());
UsefulLink::create([
'icon' => $request->icon,
'title' => $request->title,
'link' => $request->link,
'description' => $request->description,
'position' => implode(",",$request->position),
]);
return redirect()->route('admin.usefullinks.index')->with('success', __('link has been created!'));
}
@ -72,8 +81,10 @@ class UsefulLinkController extends Controller
*/
public function edit(UsefulLink $usefullink)
{
$positions = UsefulLinkLocation::cases();
return view('admin.usefullinks.edit', [
'link' => $usefullink,
'positions' => $positions,
]);
}
@ -93,7 +104,13 @@ class UsefulLinkController extends Controller
'description' => 'required|string|max:2000',
]);
$usefullink->update($request->all());
$usefullink->update([
'icon' => $request->icon,
'title' => $request->title,
'link' => $request->link,
'description' => $request->description,
'position' => implode(",",$request->position),
]);
return redirect()->route('admin.usefullinks.index')->with('success', __('link has been updated!'));
}

View file

@ -26,6 +26,7 @@ use Spatie\QueryBuilder\QueryBuilder;
class UserController extends Controller
{
private Pterodactyl $pterodactyl;
public function __construct(Pterodactyl $pterodactyl)
@ -132,7 +133,7 @@ class UserController extends Controller
]);
}
if (! is_null($request->input('new_password'))) {
if (!is_null($request->input('new_password'))) {
$request->validate([
'new_password' => 'required|string|min:8',
'new_password_confirmation' => 'required|same:new_password',
@ -259,7 +260,7 @@ class UserController extends Controller
public function toggleSuspended(User $user)
{
try {
! $user->isSuspended() ? $user->suspend() : $user->unSuspend();
!$user->isSuspended() ? $user->suspend() : $user->unSuspend();
} catch (Exception $exception) {
return redirect()->back()->with('error', $exception->getMessage());
}
@ -270,52 +271,45 @@ class UserController extends Controller
/**
* @throws Exception
*/
public function dataTable()
public function dataTable(Request $request)
{
$query = User::with(['discordUser', 'servers'])->select('users.*');
$query = User::with('discordUser')->withCount('servers');
// manually count referrals in user_referrals table
$query->selectRaw('users.*, (SELECT COUNT(*) FROM user_referrals WHERE user_referrals.referral_id = users.id) as referrals_count');
return datatables($query)
->addColumn('avatar', function (User $user) {
return '<img width="28px" height="28px" class="rounded-circle ml-1" src="'.$user->getAvatar().'">';
return '<img width="28px" height="28px" class="rounded-circle ml-1" src="' . $user->getAvatar() . '">';
})
->addColumn('credits', function (User $user) {
return '<i class="fas fa-coins mr-2"></i> '.$user->credits();
return '<i class="fas fa-coins mr-2"></i> ' . $user->credits();
})
->addColumn('verified', function (User $user) {
return $user->getVerifiedStatus();
})
->addColumn('servers', function (User $user) {
return $user->servers->count();
})
->addColumn('referrals', function (User $user) {
return DB::table('user_referrals')->where('referral_id', '=', $user->id)->count();
})
->addColumn('discordId', function (User $user) {
return $user->discordUser ? $user->discordUser->id : '';
})
->addColumn('last_seen', function (User $user) {
return ['display' => $user->last_seen ? $user->last_seen->diffForHumans() : '',
'raw' => $user->last_seen ? strtotime($user->last_seen) : '', ];
})
->addColumn('actions', function (User $user) {
$suspendColor = $user->isSuspended() ? 'btn-success' : 'btn-warning';
$suspendIcon = $user->isSuspended() ? 'fa-play-circle' : 'fa-pause-circle';
$suspendText = $user->isSuspended() ? __('Unsuspend') : __('Suspend');
return '
<a data-content="'.__('Login as User').'" data-toggle="popover" data-trigger="hover" data-placement="top" href="'.route('admin.users.loginas', $user->id).'" class="btn btn-sm btn-primary mr-1"><i class="fas fa-sign-in-alt"></i></a>
<a data-content="'.__('Verify').'" data-toggle="popover" data-trigger="hover" data-placement="top" href="'.route('admin.users.verifyEmail', $user->id).'" class="btn btn-sm btn-secondary mr-1"><i class="fas fa-envelope"></i></a>
<a data-content="'.__('Show').'" data-toggle="popover" data-trigger="hover" data-placement="top" href="'.route('admin.users.show', $user->id).'" class="btn btn-sm text-white btn-warning mr-1"><i class="fas fa-eye"></i></a>
<a data-content="'.__('Edit').'" data-toggle="popover" data-trigger="hover" data-placement="top" href="'.route('admin.users.edit', $user->id).'" class="btn btn-sm btn-info mr-1"><i class="fas fa-pen"></i></a>
<form class="d-inline" method="post" action="'.route('admin.users.togglesuspend', $user->id).'">
'.csrf_field().'
<button data-content="'.$suspendText.'" data-toggle="popover" data-trigger="hover" data-placement="top" class="btn btn-sm '.$suspendColor.' text-white mr-1"><i class="far '.$suspendIcon.'"></i></button>
</form>
<form class="d-inline" onsubmit="return submitResult();" method="post" action="'.route('admin.users.destroy', $user->id).'">
'.csrf_field().'
'.method_field('DELETE').'
<button data-content="'.__('Delete').'" data-toggle="popover" data-trigger="hover" data-placement="top" class="btn btn-sm btn-danger mr-1"><i class="fas fa-trash"></i></button>
</form>
<a data-content="' . __('Login as User') . '" data-toggle="popover" data-trigger="hover" data-placement="top" href="' . route('admin.users.loginas', $user->id) . '" class="btn btn-sm btn-primary mr-1"><i class="fas fa-sign-in-alt"></i></a>
<a data-content="' . __('Verify') . '" data-toggle="popover" data-trigger="hover" data-placement="top" href="' . route('admin.users.verifyEmail', $user->id) . '" class="btn btn-sm btn-secondary mr-1"><i class="fas fa-envelope"></i></a>
<a data-content="' . __('Show') . '" data-toggle="popover" data-trigger="hover" data-placement="top" href="' . route('admin.users.show', $user->id) . '" class="btn btn-sm text-white btn-warning mr-1"><i class="fas fa-eye"></i></a>
<a data-content="' . __('Edit') . '" data-toggle="popover" data-trigger="hover" data-placement="top" href="' . route('admin.users.edit', $user->id) . '" class="btn btn-sm btn-info mr-1"><i class="fas fa-pen"></i></a>
<form class="d-inline" method="post" action="' . route('admin.users.togglesuspend', $user->id) . '">
' . csrf_field() . '
<button data-content="' . $suspendText . '" data-toggle="popover" data-trigger="hover" data-placement="top" class="btn btn-sm ' . $suspendColor . ' text-white mr-1"><i class="far ' . $suspendIcon . '"></i></button>
</form>
<form class="d-inline" onsubmit="return submitResult();" method="post" action="' . route('admin.users.destroy', $user->id) . '">
' . csrf_field() . '
' . method_field('DELETE') . '
<button data-content="' . __('Delete') . '" data-toggle="popover" data-trigger="hover" data-placement="top" class="btn btn-sm btn-danger mr-1"><i class="fas fa-trash"></i></button>
</form>
';
})
->editColumn('role', function (User $user) {
@ -334,15 +328,15 @@ class UserController extends Controller
break;
}
return '<span class="badge '.$badgeColor.'">'.$user->role.'</span>';
return '<span class="badge ' . $badgeColor . '">' . $user->role . '</span>';
})
->editColumn('last_seen', function (User $user) {
return $user->last_seen ? $user->last_seen->diffForHumans() : __('Never');
})
->editColumn('name', function (User $user) {
return '<a class="text-info" target="_blank" href="'.config('SETTINGS::SYSTEM:PTERODACTYL:URL').'/admin/users/view/'.$user->pterodactyl_id.'">'.strip_tags($user->name).'</a>';
return '<a class="text-info" target="_blank" href="' . config('SETTINGS::SYSTEM:PTERODACTYL:URL') . '/admin/users/view/' . $user->pterodactyl_id . '">' . strip_tags($user->name) . '</a>';
})
/*->orderColumn('last_seen', function ($query) {
$query->orderBy('last_seen', "desc");
})*/
->rawColumns(['avatar', 'name', 'credits', 'role', 'usage', 'referrals', 'actions', 'last_seen'])
->make(true);
->rawColumns(['avatar', 'name', 'credits', 'role', 'usage', 'actions'])
->make();
}
}

View file

@ -8,6 +8,7 @@ use App\Http\Controllers\Controller;
use App\Models\DiscordUser;
use App\Models\User;
use App\Notifications\ReferralNotification;
use App\Traits\Referral;
use Carbon\Carbon;
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
@ -27,6 +28,8 @@ use Spatie\QueryBuilder\QueryBuilder;
class UserController extends Controller
{
use Referral;
const ALLOWED_INCLUDES = ['servers', 'notifications', 'payments', 'vouchers', 'discordUser'];
const ALLOWED_FILTERS = ['name', 'server_limit', 'email', 'pterodactyl_id', 'role', 'suspended'];
@ -92,7 +95,7 @@ class UserController extends Controller
//Update Users Password on Pterodactyl
//Username,Mail,First and Lastname are required aswell
$response = Pterodactyl::client()->patch('/application/users/'.$user->pterodactyl_id, [
$response = Pterodactyl::client()->patch('/application/users/' . $user->pterodactyl_id, [
'username' => $request->name,
'first_name' => $request->name,
'last_name' => $request->name,
@ -229,7 +232,7 @@ class UserController extends Controller
$discordUser = DiscordUser::find($id);
$user = $discordUser ? $discordUser->user : User::findOrFail($id);
if (! $user->isSuspended()) {
if (!$user->isSuspended()) {
throw ValidationException::withMessages([
'error' => 'You cannot unsuspend an User who is not suspended.',
]);
@ -240,21 +243,6 @@ class UserController extends Controller
return $user;
}
/**
* Create a unique Referral Code for User
*
* @return string
*/
protected function createReferralCode()
{
$referralcode = STR::random(8);
if (User::where('referral_code', '=', $referralcode)->exists()) {
$this->createReferralCode();
}
return $referralcode;
}
/**
* @throws ValidationException
*/
@ -267,7 +255,7 @@ class UserController extends Controller
]);
// Prevent the creation of new users via API if this is enabled.
if (! config('SETTINGS::SYSTEM:CREATION_OF_NEW_USERS', 'true')) {
if (!config('SETTINGS::SYSTEM:CREATION_OF_NEW_USERS', 'true')) {
throw ValidationException::withMessages([
'error' => 'The creation of new users has been blocked by the system administrator.',
]);
@ -305,7 +293,7 @@ class UserController extends Controller
'pterodactyl_id' => $response->json()['attributes']['id'],
]);
//INCREMENT REFERRAL-USER CREDITS
if (! empty($request->input('referral_code'))) {
if (!empty($request->input('referral_code'))) {
$ref_code = $request->input('referral_code');
$new_user = $user->id;
if ($ref_user = User::query()->where('referral_code', '=', $ref_code)->first()) {

View file

@ -7,11 +7,13 @@ use App\Http\Controllers\Controller;
use App\Models\User;
use App\Notifications\ReferralNotification;
use App\Providers\RouteServiceProvider;
use App\Traits\Referral;
use Carbon\Carbon;
use Illuminate\Foundation\Auth\RegistersUsers;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Str;
use Illuminate\Validation\ValidationException;
@ -29,7 +31,7 @@ class RegisterController extends Controller
|
*/
use RegistersUsers;
use RegistersUsers, Referral;
/**
* Where to redirect users after registration.
@ -86,21 +88,6 @@ class RegisterController extends Controller
return Validator::make($data, $validationRules);
}
/**
* Create a unique Referral Code for User
*
* @return string
*/
protected function createReferralCode()
{
$referralcode = STR::random(8);
if (User::where('referral_code', '=', $referralcode)->exists()) {
$this->createReferralCode();
}
return $referralcode;
}
/**
* Create a new user instance after a valid registration.
*
@ -132,6 +119,7 @@ class RegisterController extends Controller
if ($response->failed()) {
$user->delete();
Log::error('Pterodactyl Registration Error: ' . $response->json()['errors'][0]['detail']);
throw ValidationException::withMessages([
'ptero_registration_error' => [__('Account already exists on Pterodactyl. Please contact the Support!')],
]);
@ -142,7 +130,7 @@ class RegisterController extends Controller
]);
//INCREMENT REFERRAL-USER CREDITS
if (! empty($data['referral_code'])) {
if (!empty($data['referral_code'])) {
$ref_code = $data['referral_code'];
$new_user = $user->id;
if ($ref_user = User::query()->where('referral_code', '=', $ref_code)->first()) {
@ -154,7 +142,7 @@ class RegisterController extends Controller
activity()
->performedOn($user)
->causedBy($ref_user)
->log('gained '.config('SETTINGS::REFERRAL::REWARD').' '.config('SETTINGS::SYSTEM:CREDITS_DISPLAY_NAME').' for sign-up-referral of '.$user->name.' (ID:'.$user->id.')');
->log('gained ' . config('SETTINGS::REFERRAL::REWARD') . ' ' . config('SETTINGS::SYSTEM:CREDITS_DISPLAY_NAME') . ' for sign-up-referral of ' . $user->name . ' (ID:' . $user->id . ')');
}
//INSERT INTO USER_REFERRALS TABLE
DB::table('user_referrals')->insert([

View file

@ -25,16 +25,18 @@ class HomeController extends Controller
$this->middleware('auth');
}
/*
* TODO: This is commented due to the fact the market is a bad dependency, will be changed later.
public function callHome()
{
if (Storage::exists('callHome')) {
return;
}
Http::asForm()->post('https://market.controlpanel.gg/callhome.php', [
Http::asForm()->post('https://market.ctrlpanel.gg/callhome.php', [
'id' => Hash::make(URL::current()),
]);
Storage::put('callHome', 'This is only used to count the installations of cpgg.');
}
}*/
/**
* @description Get the Background Color for the Days-Left-Box in HomeView
@ -105,13 +107,13 @@ class HomeController extends Controller
$unit = $daysLeft < 1 ? ($hoursLeft < 1 ? null : __('hours')) : __('days');
}
$this->callhome();
//$this->callhome(); TODO: Same as the function
// RETURN ALL VALUES
return view('home')->with([
'usage' => $usage,
'credits' => $credits,
'useful_links' => UsefulLink::all()->sortBy('id'),
'useful_links_dashboard' => UsefulLink::where("position","like","%dashboard%")->get()->sortby("id"),
'bg' => $bg,
'boxText' => $boxText,
'unit' => $unit,

View file

@ -0,0 +1,117 @@
<?php
namespace App\Http\Controllers\Moderation;
use App\Http\Controllers\Controller;
use App\Models\Ticket;
use App\Models\TicketCategory;
use Illuminate\Http\Request;
class TicketCategoryController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$categories = TicketCategory::all();
return view('moderator.ticket.category')->with("categories",$categories);
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
$request->validate([
'name' => 'required|string|max:191',
]);
TicketCategory::create($request->all());
return redirect(route("moderator.ticket.category.index"))->with("success",__("Category created"));
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function update(Request $request)
{
$request->validate([
'category' => 'required|int',
'name' => 'required|string|max:191',
]);
$category = TicketCategory::where("id",$request->category)->firstOrFail();
$category->name = $request->name;
$category->save();
return redirect()->back()->with("success",__("Category name updated"));
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
$category = TicketCategory::where("id",$id)->firstOrFail();
if($category->id == 5 ){ //cannot delete "other" category
return back()->with("error","You cannot delete that category");
}
$tickets = Ticket::where("ticketcategory_id",$category->id)->get();
foreach($tickets as $ticket){
$ticket->ticketcategory_id = "5";
$ticket->save();
}
$category->delete();
return redirect()
->route('moderator.ticket.category.index')
->with('success', __('Category removed'));
}
public function datatable()
{
$query = TicketCategory::withCount("tickets");
return datatables($query)
->addColumn('name', function ( TicketCategory $category) {
return $category->name;
})
->editColumn('tickets', function ( TicketCategory $category) {
return $category->tickets_count;
})
->addColumn('actions', function (TicketCategory $category) {
return '
<form class="d-inline" onsubmit="return submitResult();" method="post" action="'.route('moderator.ticket.category.destroy', $category->id).'">
'.csrf_field().'
'.method_field('DELETE').'
<button data-content="'.__('Delete').'" data-toggle="popover" data-trigger="hover" data-placement="top" class="btn btn-sm btn-danger mr-1"><i class="fas fa-trash"></i></button>
</form>
';
})
->editColumn('created_at', function (TicketCategory $category) {
return $category->created_at ? $category->created_at->diffForHumans() : '';
})
->rawColumns(['actions'])
->make();
}
}

View file

@ -25,7 +25,12 @@ class TicketsController extends Controller
public function show($ticket_id)
{
try {
$ticket = Ticket::where('ticket_id', $ticket_id)->firstOrFail();
} catch (Exception $e)
{
return redirect()->back()->with('warning', __('Ticket not found on the server. It potentially got deleted earlier'));
}
$ticketcomments = $ticket->ticketcomments;
$ticketcategory = $ticket->ticketcategory;
$server = Server::where('id', $ticket->server)->first();
@ -33,9 +38,20 @@ class TicketsController extends Controller
return view('moderator.ticket.show', compact('ticket', 'ticketcategory', 'ticketcomments', 'server'));
}
public function close($ticket_id)
public function changeStatus($ticket_id)
{
try {
$ticket = Ticket::where('ticket_id', $ticket_id)->firstOrFail();
} catch(Exception $e)
{
return redirect()->back()->with('warning', __('Ticket not found on the server. It potentially got deleted earlier'));
}
if($ticket->status == "Closed"){
$ticket->status = "Reopened";
$ticket->save();
return redirect()->back()->with('success', __('A ticket has been reopened, ID: #') . $ticket->ticket_id);
}
$ticket->status = 'Closed';
$ticket->save();
$ticketOwner = $ticket->user;
@ -45,7 +61,13 @@ class TicketsController extends Controller
public function delete($ticket_id)
{
try {
$ticket = Ticket::where('ticket_id', $ticket_id)->firstOrFail();
} catch (Exception $e)
{
return redirect()->back()->with('warning', __('Ticket not found on the server. It potentially got deleted earlier'));
}
TicketComment::where('ticket_id', $ticket->id)->delete();
$ticket->delete();
@ -55,7 +77,11 @@ class TicketsController extends Controller
public function reply(Request $request)
{
$this->validate($request, ['ticketcomment' => 'required']);
$ticket = Ticket::where('id', $request->input('ticket_id'))->firstOrFail();
try {
$ticket = Ticket::where('id', $request->input('ticket_id'))->firstOrFail();
} catch (Exception $e){
return redirect()->back()->with('warning', __('Ticket not found on the server. It potentially got deleted earlier'));
}
$ticket->status = 'Answered';
$ticket->update();
TicketComment::create([
@ -63,7 +89,12 @@ class TicketsController extends Controller
'user_id' => Auth::user()->id,
'ticketcomment' => $request->input('ticketcomment'),
]);
try {
$user = User::where('id', $ticket->user_id)->firstOrFail();
} catch(Exception $e)
{
return redirect()->back()->with('warning', __('User not found on the server. Check on the admin database or try again later.'));
}
$newmessage = $request->input('ticketcomment');
$user->notify(new ReplyNotification($ticket, $user, $newmessage));
@ -85,12 +116,16 @@ class TicketsController extends Controller
return '<a href="'.route('admin.users.show', $tickets->user->id).'">'.$tickets->user->name.'</a>';
})
->addColumn('actions', function (Ticket $tickets) {
$statusButtonColor = ($tickets->status == "Closed") ? 'btn-success' : 'btn-warning';
$statusButtonIcon = ($tickets->status == "Closed") ? 'fa-redo' : 'fa-times';
$statusButtonText = ($tickets->status == "Closed") ? __('Reopen') : __('Close');
return '
<a data-content="'.__('View').'" data-toggle="popover" data-trigger="hover" data-placement="top" href="'.route('moderator.ticket.show', ['ticket_id' => $tickets->ticket_id]).'" class="btn btn-sm text-white btn-info mr-1"><i class="fas fa-eye"></i></a>
<form class="d-inline" method="post" action="'.route('moderator.ticket.close', ['ticket_id' => $tickets->ticket_id]).'">
<form class="d-inline" method="post" action="'.route('moderator.ticket.changeStatus', ['ticket_id' => $tickets->ticket_id]).'">
'.csrf_field().'
'.method_field('POST').'
<button data-content="'.__('Close').'" data-toggle="popover" data-trigger="hover" data-placement="top" class="btn btn-sm text-white btn-warning mr-1"><i class="fas fa-times"></i></button>
<button data-content="'.__($statusButtonText).'" data-toggle="popover" data-trigger="hover" data-placement="top" class="btn btn-sm text-white '.$statusButtonColor.' mr-1"><i class="fas '.$statusButtonIcon.'"></i></button>
</form>
<form class="d-inline" method="post" action="'.route('moderator.ticket.delete', ['ticket_id' => $tickets->ticket_id]).'">
'.csrf_field().'
@ -101,6 +136,7 @@ class TicketsController extends Controller
})
->editColumn('status', function (Ticket $tickets) {
switch ($tickets->status) {
case 'Reopened':
case 'Open':
$badgeColor = 'badge-success';
break;
@ -135,8 +171,13 @@ class TicketsController extends Controller
public function blacklistAdd(Request $request)
{
$user = User::where('id', $request->user_id)->first();
try {
$user = User::where('id', $request->user_id)->firstOrFail();
$check = TicketBlacklist::where('user_id', $user->id)->first();
}
catch (Exception $e){
return redirect()->back()->with('warning', __('User not found on the server. Check the admin database or try again later.'));
}
if ($check) {
$check->reason = $request->reason;
$check->status = 'True';
@ -163,7 +204,12 @@ class TicketsController extends Controller
public function blacklistChange($id)
{
$blacklist = TicketBlacklist::where('id', $id)->first();
try {
$blacklist = TicketBlacklist::where('id', $id)->first();
}
catch (Exception $e){
return redirect()->back()->with('warning', __('User not found on the server. Check the admin database or try again later.'));
}
if ($blacklist->status == 'True') {
$blacklist->status = 'False';
} else {

View file

@ -26,53 +26,50 @@ class TicketsController extends Controller
return view('ticket.index', compact('tickets', 'ticketcategories'));
}
public function create()
{
//check in blacklist
$check = TicketBlacklist::where('user_id', Auth::user()->id)->first();
if ($check && $check->status == 'True') {
return redirect()->route('ticket.index')->with('error', __("You can't make a ticket because you're on the blacklist for a reason: '".$check->reason."', please contact the administrator"));
}
$ticketcategories = TicketCategory::all();
$servers = Auth::user()->servers;
return view('ticket.create', compact('ticketcategories', 'servers'));
}
public function store(Request $request)
{
$this->validate($request, [
'title' => 'required',
'ticketcategory' => 'required',
'priority' => 'required',
'message' => 'required', ]
'title' => 'required',
'ticketcategory' => 'required',
'priority' => 'required',
'message' => 'required',]
);
$ticket = new Ticket([
'title' => $request->input('title'),
'user_id' => Auth::user()->id,
'ticket_id' => strtoupper(Str::random(5)),
'ticketcategory_id' => $request->input('ticketcategory'),
'priority' => $request->input('priority'),
'message' => $request->input('message'),
'status' => 'Open',
'server' => $request->input('server'), ]
'title' => $request->input('title'),
'user_id' => Auth::user()->id,
'ticket_id' => strtoupper(Str::random(8)),
'ticketcategory_id' => $request->input('ticketcategory'),
'priority' => $request->input('priority'),
'message' => $request->input('message'),
'status' => 'Open',
'server' => $request->input('server'),]
);
$ticket->save();
$user = Auth::user();
if(config('SETTINGS::TICKET:NOTIFY') == "all"){ $admin = User::where('role', 'admin')->orWhere('role', 'mod')->get();}
if(config('SETTINGS::TICKET:NOTIFY') == "admin"){ $admin = User::where('role', 'admin')->get();}
if(config('SETTINGS::TICKET:NOTIFY') == "moderator"){ $admin = User::where('role', 'mod')->get();}
if (config('SETTINGS::TICKET:NOTIFY') == "all") {
$admin = User::where('role', 'admin')->orWhere('role', 'mod')->get();
}
if (config('SETTINGS::TICKET:NOTIFY') == "admin") {
$admin = User::where('role', 'admin')->get();
}
if (config('SETTINGS::TICKET:NOTIFY') == "moderator") {
$admin = User::where('role', 'mod')->get();
}
$user->notify(new CreateNotification($ticket));
if(config('SETTINGS::TICKET:NOTIFY') != "none"){
if (config('SETTINGS::TICKET:NOTIFY') != "none") {
Notification::send($admin, new AdminCreateNotification($ticket, $user));
}
return redirect()->route('ticket.index')->with('success', __('A ticket has been opened, ID: #').$ticket->ticket_id);
return redirect()->route('ticket.index')->with('success', __('A ticket has been opened, ID: #') . $ticket->ticket_id);
}
public function show($ticket_id)
{
$ticket = Ticket::where('ticket_id', $ticket_id)->firstOrFail();
try {
$ticket = Ticket::where('ticket_id', $ticket_id)->firstOrFail();
} catch (Exception $e) {
return redirect()->back()->with('warning', __('Ticket not found on the server. It potentially got deleted earlier'));
}
$ticketcomments = $ticket->ticketcomments;
$ticketcategory = $ticket->ticketcategory;
$server = Server::where('id', $ticket->server)->first();
@ -85,10 +82,14 @@ class TicketsController extends Controller
//check in blacklist
$check = TicketBlacklist::where('user_id', Auth::user()->id)->first();
if ($check && $check->status == 'True') {
return redirect()->route('ticket.index')->with('error', __("You can't reply a ticket because you're on the blacklist for a reason: '".$check->reason."', please contact the administrator"));
return redirect()->route('ticket.index')->with('error', __("You can't reply a ticket because you're on the blacklist for a reason: '" . $check->reason . "', please contact the administrator"));
}
$this->validate($request, ['ticketcomment' => 'required']);
$ticket = Ticket::where('id', $request->input('ticket_id'))->firstOrFail();
try {
$ticket = Ticket::where('id', $request->input('ticket_id'))->firstOrFail();
} catch (Exception $e) {
return redirect()->back()->with('warning', __('Ticket not found on the server. It potentially got deleted earlier'));
}
$ticket->status = 'Client Reply';
$ticket->update();
$ticketcomment = TicketComment::create([
@ -104,9 +105,32 @@ class TicketsController extends Controller
return redirect()->back()->with('success', __('Your comment has been submitted'));
}
public function close($ticket_id)
public function create()
{
$ticket = Ticket::where('user_id', Auth::user()->id)->where("ticket_id", $ticket_id)->firstOrFail();
//check in blacklist
$check = TicketBlacklist::where('user_id', Auth::user()->id)->first();
if ($check && $check->status == 'True') {
return redirect()->route('ticket.index')->with('error', __("You can't make a ticket because you're on the blacklist for a reason: '" . $check->reason . "', please contact the administrator"));
}
$ticketcategories = TicketCategory::all();
$servers = Auth::user()->servers;
return view('ticket.create', compact('ticketcategories', 'servers'));
}
public function changeStatus($ticket_id)
{
try {
$ticket = Ticket::where('user_id', Auth::user()->id)->where("ticket_id", $ticket_id)->firstOrFail();
} catch (Exception $e) {
return redirect()->back()->with('warning', __('Ticket not found on the server. It potentially got deleted earlier'));
}
if ($ticket->status == "Closed") {
$ticket->status = "Reopened";
$ticket->save();
return redirect()->back()->with('success', __('A ticket has been reopened, ID: #') . $ticket->ticket_id);
}
$ticket->status = "Closed";
$ticket->save();
return redirect()->back()->with('success', __('A ticket has been closed, ID: #') . $ticket->ticket_id);
@ -121,10 +145,11 @@ class TicketsController extends Controller
return $tickets->ticketcategory->name;
})
->editColumn('title', function (Ticket $tickets) {
return '<a class="text-info" href="'.route('ticket.show', ['ticket_id' => $tickets->ticket_id]).'">'.'#'.$tickets->ticket_id.' - '.htmlspecialchars($tickets->title).'</a>';
return '<a class="text-info" href="' . route('ticket.show', ['ticket_id' => $tickets->ticket_id]) . '">' . '#' . $tickets->ticket_id . ' - ' . htmlspecialchars($tickets->title) . '</a>';
})
->editColumn('status', function (Ticket $tickets) {
switch ($tickets->status) {
case 'Reopened':
case 'Open':
$badgeColor = 'badge-success';
break;
@ -139,21 +164,26 @@ class TicketsController extends Controller
break;
}
return '<span class="badge '.$badgeColor.'">'.$tickets->status.'</span>';
return '<span class="badge ' . $badgeColor . '">' . $tickets->status . '</span>';
})
->editColumn('priority', function (Ticket $tickets) {
return __($tickets->priority);
})
->editColumn('updated_at', function (Ticket $tickets) {
return $tickets->updated_at ? $tickets->updated_at->diffForHumans() : '';
return ['display' => $tickets->updated_at ? $tickets->updated_at->diffForHumans() : '',
'raw' => $tickets->updated_at ? strtotime($tickets->updated_at) : ''];
})
->addColumn('actions', function (Ticket $tickets) {
$statusButtonColor = ($tickets->status == "Closed") ? 'btn-success' : 'btn-warning';
$statusButtonIcon = ($tickets->status == "Closed") ? 'fa-redo' : 'fa-times';
$statusButtonText = ($tickets->status == "Closed") ? __('Reopen') : __('Close');
return '
<a data-content="'.__('View').'" data-toggle="popover" data-trigger="hover" data-placement="top" href="'.route('ticket.show', ['ticket_id' => $tickets->ticket_id]).'" class="btn btn-sm text-white btn-info mr-1"><i class="fas fa-eye"></i></a>
<form class="d-inline" method="post" action="'.route('ticket.close', ['ticket_id' => $tickets->ticket_id]).'">
'.csrf_field().'
'.method_field('POST').'
<button data-content="'.__('Close').'" data-toggle="popover" data-trigger="hover" data-placement="top" class="btn btn-sm text-white btn-warning mr-1"><i class="fas fa-times"></i></button>
<a data-content="' . __('View') . '" data-toggle="popover" data-trigger="hover" data-placement="top" href="' . route('ticket.show', ['ticket_id' => $tickets->ticket_id]) . '" class="btn btn-sm text-white btn-info mr-1"><i class="fas fa-eye"></i></a>
<form class="d-inline" method="post" action="' . route('ticket.changeStatus', ['ticket_id' => $tickets->ticket_id]) . '">
' . csrf_field() . '
' . method_field('POST') . '
<button data-content="' . __($statusButtonText) . '" data-toggle="popover" data-trigger="hover" data-placement="top" class="btn btn-sm text-white ' . $statusButtonColor . ' mr-1"><i class="fas ' . $statusButtonIcon . '"></i></button>
</form>
</form>

View file

@ -22,9 +22,10 @@ class Verified
*/
public function handle($event)
{
if (! $event->user->email_verified_reward) {
if (!$event->user->email_verified_reward) {
$event->user->increment('server_limit', config('SETTINGS::USER:SERVER_LIMIT_REWARD_AFTER_VERIFY_EMAIL'));
$event->user->increment('credits', config('SETTINGS::USER:CREDITS_REWARD_AFTER_VERIFY_EMAIL'));
$event->user->update(['email_verified_reward' => true]);
}
}
}

View file

@ -13,6 +13,7 @@ class Payment extends Model
use HasFactory;
public $incrementing = false;
protected $primaryKey = 'id';
/**
* @var string[]

View file

@ -10,6 +10,6 @@ class TicketCategory extends Model
public function tickets()
{
return $this->hasMany(Ticket::class);
return $this->hasMany(Ticket::class,'ticketcategory_id');
}
}

View file

@ -16,5 +16,6 @@ class UsefulLink extends Model
'title',
'link',
'description',
'position',
];
}

View file

@ -61,6 +61,7 @@ class User extends Authenticatable implements MustVerifyEmail
'avatar',
'suspended',
'referral_code',
'email_verified_reward'
];
/**
@ -83,6 +84,7 @@ class User extends Authenticatable implements MustVerifyEmail
'last_seen' => 'datetime',
'credits' => 'float',
'server_limit' => 'float',
'email_verified_reward' => 'boolean'
];
public static function boot()
@ -94,23 +96,16 @@ class User extends Authenticatable implements MustVerifyEmail
});
static::deleting(function (User $user) {
$user->servers()->chunk(10, function ($servers) {
foreach ($servers as $server) {
$server->delete();
}
// delete every server the user owns without using chunks
$user->servers()->each(function ($server) {
$server->delete();
});
$user->payments()->chunk(10, function ($payments) {
foreach ($payments as $payment) {
$payment->delete();
}
});
$user->payments()->delete();
$user->tickets()->chunk(10, function ($tickets) {
foreach ($tickets as $ticket) {
$ticket->delete();
}
});
$user->tickets()->delete();
$user->ticketBlackList()->delete();
@ -238,17 +233,17 @@ class User extends Authenticatable implements MustVerifyEmail
public function getAvatar()
{
//TODO loading the images to confirm they exist is causing to much load time. alternative has to be found :) maybe onerror tag on the <img tags>
// if ($this->discordUser()->exists()) {
// if(@getimagesize($this->discordUser->getAvatar())) {
// $avatar = $this->discordUser->getAvatar();
// } else {
// $avatar = "https://www.gravatar.com/avatar/" . md5(strtolower(trim($this->email)));
// }
// } else {
// $avatar = "https://www.gravatar.com/avatar/" . md5(strtolower(trim($this->email)));
// }
// if ($this->discordUser()->exists()) {
// if(@getimagesize($this->discordUser->getAvatar())) {
// $avatar = $this->discordUser->getAvatar();
// } else {
// $avatar = "https://www.gravatar.com/avatar/" . md5(strtolower(trim($this->email)));
// }
// } else {
// $avatar = "https://www.gravatar.com/avatar/" . md5(strtolower(trim($this->email)));
// }
return 'https://www.gravatar.com/avatar/'.md5(strtolower(trim($this->email)));
return 'https://www.gravatar.com/avatar/' . md5(strtolower(trim($this->email)));
}
/**
@ -291,16 +286,15 @@ class User extends Authenticatable implements MustVerifyEmail
public function reVerifyEmail()
{
$this->forceFill([
'email_verified_at' => null,
'email_verified_at' => null
])->save();
}
public function getActivitylogOptions(): LogOptions
{
return LogOptions::defaults()
-> logOnly(['role', 'name', 'server_limit', 'pterodactyl_id', 'email'])
-> logOnlyDirty()
-> dontSubmitEmptyLogs();
->logOnly(['role', 'name', 'server_limit', 'pterodactyl_id', 'email'])
->logOnlyDirty()
->dontSubmitEmptyLogs();
}
}

View file

@ -3,6 +3,7 @@
namespace App\Providers;
use App\Models\Settings;
use App\Models\UsefulLink;
use Exception;
use Illuminate\Pagination\Paginator;
use Illuminate\Support\Facades\Artisan;
@ -45,14 +46,23 @@ class AppServiceProvider extends ServiceProvider
}
//if none of result array is true. it sets ok to false
if (! in_array(true, $result)) {
if (!in_array(true, $result)) {
$ok = false;
$validator->setCustomMessages(['multiple_date_format' => 'The format must be one of '.implode(',', $parameters)]);
$validator->setCustomMessages(['multiple_date_format' => 'The format must be one of ' . implode(',', $parameters)]);
}
return $ok;
});
try {
if (Schema::hasColumn('useful_links', 'position')) {
$useful_links = UsefulLink::where("position", "like", "%topbar%")->get()->sortby("id");
view()->share('useful_links', $useful_links);
}
} catch (Exception $e) {
Log::error("Couldnt find useful_links. Probably the installation is not completet. " . $e);
}
//only run if the installer has been executed
try {
$settings = Settings::all();
@ -61,12 +71,14 @@ class AppServiceProvider extends ServiceProvider
config([$setting->key => $setting->value]);
}
if(!file_exists(base_path('themes')."/".config("SETTINGS::SYSTEM:THEME"))){
if (!file_exists(base_path('themes') . "/" . config("SETTINGS::SYSTEM:THEME"))) {
config(['SETTINGS::SYSTEM:THEME' => "default"]);
}
if(config('theme.active') == null){
Theme::set(config("SETTINGS::SYSTEM:THEME","default"), "default");
if (config('SETTINGS::SYSTEM:THEME') && config('SETTINGS::SYSTEM:THEME') !== config('theme.active')) {
Theme::set(config("SETTINGS::SYSTEM:THEME", "default"), "default");
} else {
Theme::set("default", "default");
}
// Set Mail Config
@ -116,7 +128,7 @@ class AppServiceProvider extends ServiceProvider
}
try {
$stringfromfile = file(base_path().'/.git/HEAD');
$stringfromfile = file(base_path() . '/.git/HEAD');
$firstLine = $stringfromfile[0]; //get the string from the array
@ -125,7 +137,7 @@ class AppServiceProvider extends ServiceProvider
$branchname = $explodedstring[2]; //get the one that is always the branch name
} catch (Exception $e) {
$branchname = 'unknown';
Log::error($e);
Log::notice($e);
}
config(['BRANCHNAME' => $branchname]);

View file

@ -7,11 +7,12 @@ use App\Events\UserUpdateCreditsEvent;
use App\Listeners\CreateInvoice;
use App\Listeners\UnsuspendServers;
use App\Listeners\UserPayment;
use App\Listeners\Verified;
use App\Listeners\Verified as VerifiedListener;
use Illuminate\Auth\Events\Registered;
use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
use SocialiteProviders\Manager\SocialiteWasCalled;
use Illuminate\Auth\Events\Verified;
class EventServiceProvider extends ServiceProvider
{
@ -35,8 +36,8 @@ class EventServiceProvider extends ServiceProvider
// ... other providers
'SocialiteProviders\\Discord\\DiscordExtendSocialite@handle',
],
'Illuminate\Auth\Events\Verified' => [
Verified::class,
Verified::class => [
VerifiedListener::class,
],
];

23
app/Traits/Referral.php Normal file
View file

@ -0,0 +1,23 @@
<?php
namespace App\Traits;
use App\Models\User;
use Illuminate\Support\Str;
trait Referral
{
public function createReferralCode()
{
$code = Str::random(8);
// check if code already exists
if (User::where('referral_code', $code)->exists()) {
// if exists, generate another code
return $this->generateReferralCode();
}
return $code;
}
}

361
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "be76c9bab8622d363a4eb843794e9e3e",
"content-hash": "d98e4be75e05c71049fe452b69b54901",
"packages": [
{
"name": "aws/aws-crt-php",
@ -58,16 +58,16 @@
},
{
"name": "aws/aws-sdk-php",
"version": "3.255.9",
"version": "3.257.5",
"source": {
"type": "git",
"url": "https://github.com/aws/aws-sdk-php.git",
"reference": "a001ab98b9e76a6f5cae327b3316b08fab37a296"
"reference": "c600a07da531d6c29af791b9d2e8b6df796aa14b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/a001ab98b9e76a6f5cae327b3316b08fab37a296",
"reference": "a001ab98b9e76a6f5cae327b3316b08fab37a296",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/c600a07da531d6c29af791b9d2e8b6df796aa14b",
"reference": "c600a07da531d6c29af791b9d2e8b6df796aa14b",
"shasum": ""
},
"require": {
@ -146,9 +146,9 @@
"support": {
"forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
"issues": "https://github.com/aws/aws-sdk-php/issues",
"source": "https://github.com/aws/aws-sdk-php/tree/3.255.9"
"source": "https://github.com/aws/aws-sdk-php/tree/3.257.5"
},
"time": "2023-01-04T19:24:09+00:00"
"time": "2023-01-20T19:34:14+00:00"
},
{
"name": "barryvdh/laravel-dompdf",
@ -524,16 +524,16 @@
},
{
"name": "doctrine/dbal",
"version": "3.5.2",
"version": "3.5.3",
"source": {
"type": "git",
"url": "https://github.com/doctrine/dbal.git",
"reference": "63e513cebbbaf96a6795e5c5ee34d205831bfc85"
"reference": "88fa7e5189fd5ec6682477044264dc0ed4e3aa1e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/dbal/zipball/63e513cebbbaf96a6795e5c5ee34d205831bfc85",
"reference": "63e513cebbbaf96a6795e5c5ee34d205831bfc85",
"url": "https://api.github.com/repos/doctrine/dbal/zipball/88fa7e5189fd5ec6682477044264dc0ed4e3aa1e",
"reference": "88fa7e5189fd5ec6682477044264dc0ed4e3aa1e",
"shasum": ""
},
"require": {
@ -548,7 +548,7 @@
"require-dev": {
"doctrine/coding-standard": "11.0.0",
"jetbrains/phpstorm-stubs": "2022.3",
"phpstan/phpstan": "1.9.2",
"phpstan/phpstan": "1.9.4",
"phpstan/phpstan-strict-rules": "^1.4",
"phpunit/phpunit": "9.5.27",
"psalm/plugin-phpunit": "0.18.4",
@ -615,7 +615,7 @@
],
"support": {
"issues": "https://github.com/doctrine/dbal/issues",
"source": "https://github.com/doctrine/dbal/tree/3.5.2"
"source": "https://github.com/doctrine/dbal/tree/3.5.3"
},
"funding": [
{
@ -631,7 +631,7 @@
"type": "tidelift"
}
],
"time": "2022-12-19T08:17:34+00:00"
"time": "2023-01-12T10:21:44+00:00"
},
{
"name": "doctrine/deprecations",
@ -860,28 +860,27 @@
},
{
"name": "doctrine/lexer",
"version": "2.1.0",
"version": "3.0.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/lexer.git",
"reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124"
"reference": "84a527db05647743d50373e0ec53a152f2cde568"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/lexer/zipball/39ab8fcf5a51ce4b85ca97c7a7d033eb12831124",
"reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124",
"url": "https://api.github.com/repos/doctrine/lexer/zipball/84a527db05647743d50373e0ec53a152f2cde568",
"reference": "84a527db05647743d50373e0ec53a152f2cde568",
"shasum": ""
},
"require": {
"doctrine/deprecations": "^1.0",
"php": "^7.1 || ^8.0"
"php": "^8.1"
},
"require-dev": {
"doctrine/coding-standard": "^9 || ^10",
"phpstan/phpstan": "^1.3",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
"doctrine/coding-standard": "^10",
"phpstan/phpstan": "^1.9",
"phpunit/phpunit": "^9.5",
"psalm/plugin-phpunit": "^0.18.3",
"vimeo/psalm": "^4.11 || ^5.0"
"vimeo/psalm": "^5.0"
},
"type": "library",
"autoload": {
@ -918,7 +917,7 @@
],
"support": {
"issues": "https://github.com/doctrine/lexer/issues",
"source": "https://github.com/doctrine/lexer/tree/2.1.0"
"source": "https://github.com/doctrine/lexer/tree/3.0.0"
},
"funding": [
{
@ -934,7 +933,7 @@
"type": "tidelift"
}
],
"time": "2022-12-14T08:49:07+00:00"
"time": "2022-12-15T16:57:16+00:00"
},
{
"name": "dompdf/dompdf",
@ -1061,26 +1060,26 @@
},
{
"name": "egulias/email-validator",
"version": "3.2.5",
"version": "4.0.1",
"source": {
"type": "git",
"url": "https://github.com/egulias/EmailValidator.git",
"reference": "b531a2311709443320c786feb4519cfaf94af796"
"reference": "3a85486b709bc384dae8eb78fb2eec649bdb64ff"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/egulias/EmailValidator/zipball/b531a2311709443320c786feb4519cfaf94af796",
"reference": "b531a2311709443320c786feb4519cfaf94af796",
"url": "https://api.github.com/repos/egulias/EmailValidator/zipball/3a85486b709bc384dae8eb78fb2eec649bdb64ff",
"reference": "3a85486b709bc384dae8eb78fb2eec649bdb64ff",
"shasum": ""
},
"require": {
"doctrine/lexer": "^1.2|^2",
"php": ">=7.2",
"symfony/polyfill-intl-idn": "^1.15"
"doctrine/lexer": "^2.0 || ^3.0",
"php": ">=8.1",
"symfony/polyfill-intl-idn": "^1.26"
},
"require-dev": {
"phpunit/phpunit": "^8.5.8|^9.3.3",
"vimeo/psalm": "^4"
"phpunit/phpunit": "^9.5.27",
"vimeo/psalm": "^4.30"
},
"suggest": {
"ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation"
@ -1088,7 +1087,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.0.x-dev"
"dev-master": "4.0.x-dev"
}
},
"autoload": {
@ -1116,7 +1115,7 @@
],
"support": {
"issues": "https://github.com/egulias/EmailValidator/issues",
"source": "https://github.com/egulias/EmailValidator/tree/3.2.5"
"source": "https://github.com/egulias/EmailValidator/tree/4.0.1"
},
"funding": [
{
@ -1124,7 +1123,7 @@
"type": "github"
}
],
"time": "2023-01-02T17:26:14+00:00"
"time": "2023-01-14T14:17:03+00:00"
},
{
"name": "facade/ignition-contracts",
@ -1702,29 +1701,29 @@
},
{
"name": "kkomelin/laravel-translatable-string-exporter",
"version": "1.17.0",
"version": "1.18.0",
"source": {
"type": "git",
"url": "https://github.com/kkomelin/laravel-translatable-string-exporter.git",
"reference": "0425f2c3add32df852c002b11bffe72c9c67ec89"
"reference": "c8b3364816d9f0ad2865c7538d8eb29ed8319136"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/kkomelin/laravel-translatable-string-exporter/zipball/0425f2c3add32df852c002b11bffe72c9c67ec89",
"reference": "0425f2c3add32df852c002b11bffe72c9c67ec89",
"url": "https://api.github.com/repos/kkomelin/laravel-translatable-string-exporter/zipball/c8b3364816d9f0ad2865c7538d8eb29ed8319136",
"reference": "c8b3364816d9f0ad2865c7538d8eb29ed8319136",
"shasum": ""
},
"require": {
"ext-json": "*",
"illuminate/support": "^5.4|^6|^7|^8|^9",
"illuminate/translation": "^5.4|^6|^7|^8|^9",
"php": "^7.2|^8.0",
"symfony/finder": "^3.2|^4|^5|^6"
"illuminate/support": "^8|^9",
"illuminate/translation": "^8|^9",
"php": "^8.0",
"symfony/finder": "^5|^6"
},
"require-dev": {
"nunomaduro/larastan": "^1.0|^2.0",
"orchestra/testbench": "^3.4|^4.0|^5.0|^6.0|^7.0",
"phpunit/phpunit": "^6.0|^7.0|^8.0|^9.0"
"orchestra/testbench": "^6.0|^7.0",
"phpunit/phpunit": "^9.0"
},
"type": "library",
"extra": {
@ -1761,28 +1760,29 @@
],
"support": {
"issues": "https://github.com/kkomelin/laravel-translatable-string-exporter/issues",
"source": "https://github.com/kkomelin/laravel-translatable-string-exporter/tree/1.17.0"
"source": "https://github.com/kkomelin/laravel-translatable-string-exporter/tree/1.18.0"
},
"time": "2022-06-13T07:13:55+00:00"
"time": "2023-01-12T15:11:42+00:00"
},
{
"name": "laravel/framework",
"version": "v9.46.0",
"version": "v9.48.0",
"source": {
"type": "git",
"url": "https://github.com/laravel/framework.git",
"reference": "62b05b6de5733d89378a279e40230a71e5ab5d92"
"reference": "c78ae7aeb0cbcb1a205050d3592247ba07f5b711"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/62b05b6de5733d89378a279e40230a71e5ab5d92",
"reference": "62b05b6de5733d89378a279e40230a71e5ab5d92",
"url": "https://api.github.com/repos/laravel/framework/zipball/c78ae7aeb0cbcb1a205050d3592247ba07f5b711",
"reference": "c78ae7aeb0cbcb1a205050d3592247ba07f5b711",
"shasum": ""
},
"require": {
"brick/math": "^0.10.2",
"doctrine/inflector": "^2.0",
"dragonmantank/cron-expression": "^3.3.2",
"egulias/email-validator": "^3.2.1",
"egulias/email-validator": "^3.2.1|^4.0",
"ext-mbstring": "*",
"ext-openssl": "*",
"fruitcake/php-cors": "^1.2",
@ -1867,10 +1867,12 @@
"mockery/mockery": "^1.5.1",
"orchestra/testbench-core": "^7.16",
"pda/pheanstalk": "^4.0",
"phpstan/phpdoc-parser": "^1.15",
"phpstan/phpstan": "^1.4.7",
"phpunit/phpunit": "^9.5.8",
"predis/predis": "^1.1.9|^2.0.2",
"symfony/cache": "^6.0"
"symfony/cache": "^6.0",
"symfony/http-client": "^6.0"
},
"suggest": {
"ably/ably-php": "Required to use the Ably broadcast driver (^1.0).",
@ -1949,7 +1951,7 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
"time": "2023-01-03T15:12:31+00:00"
"time": "2023-01-17T15:06:19+00:00"
},
{
"name": "laravel/serializable-closure",
@ -2013,30 +2015,30 @@
},
{
"name": "laravel/socialite",
"version": "v5.5.7",
"version": "v5.6.1",
"source": {
"type": "git",
"url": "https://github.com/laravel/socialite.git",
"reference": "ee6201f539ac47c3a55132449f9d20ee928f0ee2"
"reference": "a14a177f2cc71d8add71e2b19e00800e83bdda09"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/socialite/zipball/ee6201f539ac47c3a55132449f9d20ee928f0ee2",
"reference": "ee6201f539ac47c3a55132449f9d20ee928f0ee2",
"url": "https://api.github.com/repos/laravel/socialite/zipball/a14a177f2cc71d8add71e2b19e00800e83bdda09",
"reference": "a14a177f2cc71d8add71e2b19e00800e83bdda09",
"shasum": ""
},
"require": {
"ext-json": "*",
"guzzlehttp/guzzle": "^6.0|^7.0",
"illuminate/contracts": "^6.0|^7.0|^8.0|^9.0",
"illuminate/http": "^6.0|^7.0|^8.0|^9.0",
"illuminate/support": "^6.0|^7.0|^8.0|^9.0",
"illuminate/contracts": "^6.0|^7.0|^8.0|^9.0|^10.0",
"illuminate/http": "^6.0|^7.0|^8.0|^9.0|^10.0",
"illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0",
"league/oauth1-client": "^1.10.1",
"php": "^7.2|^8.0"
},
"require-dev": {
"mockery/mockery": "^1.0",
"orchestra/testbench": "^4.0|^5.0|^6.0|^7.0",
"orchestra/testbench": "^4.0|^5.0|^6.0|^7.0|^8.0",
"phpunit/phpunit": "^8.0|^9.3"
},
"type": "library",
@ -2078,26 +2080,26 @@
"issues": "https://github.com/laravel/socialite/issues",
"source": "https://github.com/laravel/socialite"
},
"time": "2022-12-28T12:35:23+00:00"
"time": "2023-01-20T15:42:35+00:00"
},
{
"name": "laravel/tinker",
"version": "v2.7.3",
"version": "v2.8.0",
"source": {
"type": "git",
"url": "https://github.com/laravel/tinker.git",
"reference": "5062061b4924af3392225dd482ca7b4d85d8b8ef"
"reference": "74d0b287cc4ae65d15c368dd697aae71d62a73ad"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/tinker/zipball/5062061b4924af3392225dd482ca7b4d85d8b8ef",
"reference": "5062061b4924af3392225dd482ca7b4d85d8b8ef",
"url": "https://api.github.com/repos/laravel/tinker/zipball/74d0b287cc4ae65d15c368dd697aae71d62a73ad",
"reference": "74d0b287cc4ae65d15c368dd697aae71d62a73ad",
"shasum": ""
},
"require": {
"illuminate/console": "^6.0|^7.0|^8.0|^9.0",
"illuminate/contracts": "^6.0|^7.0|^8.0|^9.0",
"illuminate/support": "^6.0|^7.0|^8.0|^9.0",
"illuminate/console": "^6.0|^7.0|^8.0|^9.0|^10.0",
"illuminate/contracts": "^6.0|^7.0|^8.0|^9.0|^10.0",
"illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0",
"php": "^7.2.5|^8.0",
"psy/psysh": "^0.10.4|^0.11.1",
"symfony/var-dumper": "^4.3.4|^5.0|^6.0"
@ -2107,7 +2109,7 @@
"phpunit/phpunit": "^8.5.8|^9.3.3"
},
"suggest": {
"illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0|^9.0)."
"illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0|^9.0|^10.0)."
},
"type": "library",
"extra": {
@ -2144,9 +2146,9 @@
],
"support": {
"issues": "https://github.com/laravel/tinker/issues",
"source": "https://github.com/laravel/tinker/tree/v2.7.3"
"source": "https://github.com/laravel/tinker/tree/v2.8.0"
},
"time": "2022-11-09T15:11:38+00:00"
"time": "2023-01-10T18:03:30+00:00"
},
{
"name": "laravel/ui",
@ -2465,16 +2467,16 @@
},
{
"name": "league/flysystem",
"version": "3.12.0",
"version": "3.12.2",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/flysystem.git",
"reference": "2aef65a47e44f2d6f9938f720f6dd697e7ba7b76"
"reference": "f6377c709d2275ed6feaf63e44be7a7162b0e77f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/2aef65a47e44f2d6f9938f720f6dd697e7ba7b76",
"reference": "2aef65a47e44f2d6f9938f720f6dd697e7ba7b76",
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/f6377c709d2275ed6feaf63e44be7a7162b0e77f",
"reference": "f6377c709d2275ed6feaf63e44be7a7162b0e77f",
"shasum": ""
},
"require": {
@ -2491,7 +2493,7 @@
"require-dev": {
"async-aws/s3": "^1.5",
"async-aws/simple-s3": "^1.1",
"aws/aws-sdk-php": "^3.198.1",
"aws/aws-sdk-php": "^3.220.0",
"composer/semver": "^3.0",
"ext-fileinfo": "*",
"ext-ftp": "*",
@ -2536,7 +2538,7 @@
],
"support": {
"issues": "https://github.com/thephpleague/flysystem/issues",
"source": "https://github.com/thephpleague/flysystem/tree/3.12.0"
"source": "https://github.com/thephpleague/flysystem/tree/3.12.2"
},
"funding": [
{
@ -2552,24 +2554,24 @@
"type": "tidelift"
}
],
"time": "2022-12-20T20:21:10+00:00"
"time": "2023-01-19T12:02:19+00:00"
},
{
"name": "league/flysystem-aws-s3-v3",
"version": "3.10.3",
"version": "3.12.2",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/flysystem-aws-s3-v3.git",
"reference": "f593bf91f94f2adf4f71513d29f1dfa693f2f640"
"reference": "645e14e4a80bd2da8b01e57388e7296a695a80c2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/flysystem-aws-s3-v3/zipball/f593bf91f94f2adf4f71513d29f1dfa693f2f640",
"reference": "f593bf91f94f2adf4f71513d29f1dfa693f2f640",
"url": "https://api.github.com/repos/thephpleague/flysystem-aws-s3-v3/zipball/645e14e4a80bd2da8b01e57388e7296a695a80c2",
"reference": "645e14e4a80bd2da8b01e57388e7296a695a80c2",
"shasum": ""
},
"require": {
"aws/aws-sdk-php": "^3.132.4",
"aws/aws-sdk-php": "^3.220.0",
"league/flysystem": "^3.10.0",
"league/mime-type-detection": "^1.0.0",
"php": "^8.0.2"
@ -2606,7 +2608,7 @@
],
"support": {
"issues": "https://github.com/thephpleague/flysystem-aws-s3-v3/issues",
"source": "https://github.com/thephpleague/flysystem-aws-s3-v3/tree/3.10.3"
"source": "https://github.com/thephpleague/flysystem-aws-s3-v3/tree/3.12.2"
},
"funding": [
{
@ -2622,7 +2624,7 @@
"type": "tidelift"
}
],
"time": "2022-10-26T18:15:09+00:00"
"time": "2023-01-17T14:15:08+00:00"
},
{
"name": "league/mime-type-detection",
@ -2990,16 +2992,16 @@
},
{
"name": "nesbot/carbon",
"version": "2.64.1",
"version": "2.65.0",
"source": {
"type": "git",
"url": "https://github.com/briannesbitt/Carbon.git",
"reference": "f2e59963f4c4f4fdfb9fcfd752e8d2e2b79a4e2c"
"reference": "09acf64155c16dc6f580f36569ae89344e9734a3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/f2e59963f4c4f4fdfb9fcfd752e8d2e2b79a4e2c",
"reference": "f2e59963f4c4f4fdfb9fcfd752e8d2e2b79a4e2c",
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/09acf64155c16dc6f580f36569ae89344e9734a3",
"reference": "09acf64155c16dc6f580f36569ae89344e9734a3",
"shasum": ""
},
"require": {
@ -3088,7 +3090,7 @@
"type": "tidelift"
}
],
"time": "2023-01-01T23:17:36+00:00"
"time": "2023-01-06T15:55:01+00:00"
},
{
"name": "nette/schema",
@ -3154,16 +3156,16 @@
},
{
"name": "nette/utils",
"version": "v3.2.8",
"version": "v3.2.9",
"source": {
"type": "git",
"url": "https://github.com/nette/utils.git",
"reference": "02a54c4c872b99e4ec05c4aec54b5a06eb0f6368"
"reference": "c91bac3470c34b2ecd5400f6e6fdf0b64a836a5c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nette/utils/zipball/02a54c4c872b99e4ec05c4aec54b5a06eb0f6368",
"reference": "02a54c4c872b99e4ec05c4aec54b5a06eb0f6368",
"url": "https://api.github.com/repos/nette/utils/zipball/c91bac3470c34b2ecd5400f6e6fdf0b64a836a5c",
"reference": "c91bac3470c34b2ecd5400f6e6fdf0b64a836a5c",
"shasum": ""
},
"require": {
@ -3173,6 +3175,7 @@
"nette/di": "<3.0.6"
},
"require-dev": {
"jetbrains/phpstorm-attributes": "dev-master",
"nette/tester": "~2.0",
"phpstan/phpstan": "^1.0",
"tracy/tracy": "^2.3"
@ -3233,22 +3236,22 @@
],
"support": {
"issues": "https://github.com/nette/utils/issues",
"source": "https://github.com/nette/utils/tree/v3.2.8"
"source": "https://github.com/nette/utils/tree/v3.2.9"
},
"time": "2022-09-12T23:36:20+00:00"
"time": "2023-01-18T03:26:20+00:00"
},
{
"name": "nikic/php-parser",
"version": "v4.15.2",
"version": "v4.15.3",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
"reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc"
"reference": "570e980a201d8ed0236b0a62ddf2c9cbb2034039"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc",
"reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/570e980a201d8ed0236b0a62ddf2c9cbb2034039",
"reference": "570e980a201d8ed0236b0a62ddf2c9cbb2034039",
"shasum": ""
},
"require": {
@ -3289,9 +3292,9 @@
],
"support": {
"issues": "https://github.com/nikic/PHP-Parser/issues",
"source": "https://github.com/nikic/PHP-Parser/tree/v4.15.2"
"source": "https://github.com/nikic/PHP-Parser/tree/v4.15.3"
},
"time": "2022-11-12T15:38:23+00:00"
"time": "2023-01-16T22:05:37+00:00"
},
{
"name": "nunomaduro/termwind",
@ -4438,16 +4441,16 @@
},
{
"name": "ramsey/uuid",
"version": "4.7.1",
"version": "4.7.3",
"source": {
"type": "git",
"url": "https://github.com/ramsey/uuid.git",
"reference": "a1acf96007170234a8399586a6e2ab8feba109d1"
"reference": "433b2014e3979047db08a17a205f410ba3869cf2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/ramsey/uuid/zipball/a1acf96007170234a8399586a6e2ab8feba109d1",
"reference": "a1acf96007170234a8399586a6e2ab8feba109d1",
"url": "https://api.github.com/repos/ramsey/uuid/zipball/433b2014e3979047db08a17a205f410ba3869cf2",
"reference": "433b2014e3979047db08a17a205f410ba3869cf2",
"shasum": ""
},
"require": {
@ -4514,7 +4517,7 @@
],
"support": {
"issues": "https://github.com/ramsey/uuid/issues",
"source": "https://github.com/ramsey/uuid/tree/4.7.1"
"source": "https://github.com/ramsey/uuid/tree/4.7.3"
},
"funding": [
{
@ -4526,7 +4529,7 @@
"type": "tidelift"
}
],
"time": "2022-12-31T22:20:34+00:00"
"time": "2023-01-12T18:13:24+00:00"
},
{
"name": "sabberworm/php-css-parser",
@ -4789,25 +4792,25 @@
},
{
"name": "spatie/laravel-package-tools",
"version": "1.13.8",
"version": "1.14.0",
"source": {
"type": "git",
"url": "https://github.com/spatie/laravel-package-tools.git",
"reference": "781a2f637237e69c277eb401063acf15e2b4156b"
"reference": "9964e65c318c30577ca1b91469f739d2b381359b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/laravel-package-tools/zipball/781a2f637237e69c277eb401063acf15e2b4156b",
"reference": "781a2f637237e69c277eb401063acf15e2b4156b",
"url": "https://api.github.com/repos/spatie/laravel-package-tools/zipball/9964e65c318c30577ca1b91469f739d2b381359b",
"reference": "9964e65c318c30577ca1b91469f739d2b381359b",
"shasum": ""
},
"require": {
"illuminate/contracts": "^9.28",
"illuminate/contracts": "^9.28|^10.0",
"php": "^8.0"
},
"require-dev": {
"mockery/mockery": "^1.5",
"orchestra/testbench": "^7.7",
"orchestra/testbench": "^7.7|^8.0",
"pestphp/pest": "^1.22",
"phpunit/phpunit": "^9.5.24",
"spatie/pest-plugin-test-time": "^1.1"
@ -4837,7 +4840,7 @@
],
"support": {
"issues": "https://github.com/spatie/laravel-package-tools/issues",
"source": "https://github.com/spatie/laravel-package-tools/tree/1.13.8"
"source": "https://github.com/spatie/laravel-package-tools/tree/1.14.0"
},
"funding": [
{
@ -4845,7 +4848,7 @@
"type": "github"
}
],
"time": "2022-12-20T14:09:05+00:00"
"time": "2023-01-10T14:09:55+00:00"
},
{
"name": "spatie/laravel-query-builder",
@ -5663,16 +5666,16 @@
},
{
"name": "symfony/http-client-contracts",
"version": "v3.1.1",
"version": "v3.2.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-client-contracts.git",
"reference": "fd038f08c623ab5d22b26e9ba35afe8c79071800"
"reference": "c5f587eb445224ddfeb05b5ee703476742d730bf"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/fd038f08c623ab5d22b26e9ba35afe8c79071800",
"reference": "fd038f08c623ab5d22b26e9ba35afe8c79071800",
"url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/c5f587eb445224ddfeb05b5ee703476742d730bf",
"reference": "c5f587eb445224ddfeb05b5ee703476742d730bf",
"shasum": ""
},
"require": {
@ -5684,7 +5687,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "3.1-dev"
"dev-main": "3.3-dev"
},
"thanks": {
"name": "symfony/contracts",
@ -5724,7 +5727,7 @@
"standards"
],
"support": {
"source": "https://github.com/symfony/http-client-contracts/tree/v3.1.1"
"source": "https://github.com/symfony/http-client-contracts/tree/v3.2.0"
},
"funding": [
{
@ -5740,7 +5743,7 @@
"type": "tidelift"
}
],
"time": "2022-04-22T07:30:54+00:00"
"time": "2022-11-25T10:21:52+00:00"
},
{
"name": "symfony/http-foundation",
@ -6014,28 +6017,29 @@
},
{
"name": "symfony/mailer",
"version": "v6.2.2",
"version": "6.3.x-dev",
"source": {
"type": "git",
"url": "https://github.com/symfony/mailer.git",
"reference": "b355ad81f1d2987c47dcd3b04d5dce669e1e62e6"
"reference": "de3acc2fbc81d26957b551aabeea8b6cb0dc1f72"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/mailer/zipball/b355ad81f1d2987c47dcd3b04d5dce669e1e62e6",
"reference": "b355ad81f1d2987c47dcd3b04d5dce669e1e62e6",
"url": "https://api.github.com/repos/symfony/mailer/zipball/de3acc2fbc81d26957b551aabeea8b6cb0dc1f72",
"reference": "de3acc2fbc81d26957b551aabeea8b6cb0dc1f72",
"shasum": ""
},
"require": {
"egulias/email-validator": "^2.1.10|^3",
"egulias/email-validator": "^2.1.10|^3|^4",
"php": ">=8.1",
"psr/event-dispatcher": "^1",
"psr/log": "^1|^2|^3",
"symfony/event-dispatcher": "^5.4|^6.0",
"symfony/mime": "^6.2",
"symfony/service-contracts": "^1.1|^2|^3"
"symfony/service-contracts": "^2.5|^3"
},
"conflict": {
"symfony/http-client-contracts": "<2.5",
"symfony/http-kernel": "<5.4",
"symfony/messenger": "<6.2",
"symfony/mime": "<6.2",
@ -6043,7 +6047,7 @@
},
"require-dev": {
"symfony/console": "^5.4|^6.0",
"symfony/http-client-contracts": "^1.1|^2|^3",
"symfony/http-client-contracts": "^2.5|^3",
"symfony/messenger": "^6.2",
"symfony/twig-bridge": "^6.2"
},
@ -6073,7 +6077,7 @@
"description": "Helps sending emails",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/mailer/tree/v6.2.2"
"source": "https://github.com/symfony/mailer/tree/6.3"
},
"funding": [
{
@ -6089,7 +6093,7 @@
"type": "tidelift"
}
],
"time": "2022-12-14T16:11:27+00:00"
"time": "2023-01-23T14:48:49+00:00"
},
{
"name": "symfony/mailgun-mailer",
@ -8000,30 +8004,30 @@
},
{
"name": "doctrine/instantiator",
"version": "1.5.0",
"version": "2.0.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/instantiator.git",
"reference": "0a0fa9780f5d4e507415a065172d26a98d02047b"
"reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b",
"reference": "0a0fa9780f5d4e507415a065172d26a98d02047b",
"url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0",
"reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
"php": "^8.1"
},
"require-dev": {
"doctrine/coding-standard": "^9 || ^11",
"doctrine/coding-standard": "^11",
"ext-pdo": "*",
"ext-phar": "*",
"phpbench/phpbench": "^0.16 || ^1",
"phpstan/phpstan": "^1.4",
"phpstan/phpstan-phpunit": "^1",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
"vimeo/psalm": "^4.30 || ^5.4"
"phpbench/phpbench": "^1.2",
"phpstan/phpstan": "^1.9.4",
"phpstan/phpstan-phpunit": "^1.3",
"phpunit/phpunit": "^9.5.27",
"vimeo/psalm": "^5.4"
},
"type": "library",
"autoload": {
@ -8050,7 +8054,7 @@
],
"support": {
"issues": "https://github.com/doctrine/instantiator/issues",
"source": "https://github.com/doctrine/instantiator/tree/1.5.0"
"source": "https://github.com/doctrine/instantiator/tree/2.0.0"
},
"funding": [
{
@ -8066,7 +8070,7 @@
"type": "tidelift"
}
],
"time": "2022-12-30T00:15:36+00:00"
"time": "2022-12-30T00:23:10+00:00"
},
{
"name": "fakerphp/faker",
@ -8260,22 +8264,22 @@
},
{
"name": "laravel/sail",
"version": "v1.17.0",
"version": "v1.18.1",
"source": {
"type": "git",
"url": "https://github.com/laravel/sail.git",
"reference": "7d69da7b2bdb8cbe8da6663eb2ae0e00c884bf80"
"reference": "a64f78a4ab86c04a4c5de39bea20a8d36ad48a22"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/sail/zipball/7d69da7b2bdb8cbe8da6663eb2ae0e00c884bf80",
"reference": "7d69da7b2bdb8cbe8da6663eb2ae0e00c884bf80",
"url": "https://api.github.com/repos/laravel/sail/zipball/a64f78a4ab86c04a4c5de39bea20a8d36ad48a22",
"reference": "a64f78a4ab86c04a4c5de39bea20a8d36ad48a22",
"shasum": ""
},
"require": {
"illuminate/console": "^8.0|^9.0",
"illuminate/contracts": "^8.0|^9.0",
"illuminate/support": "^8.0|^9.0",
"illuminate/console": "^8.0|^9.0|^10.0",
"illuminate/contracts": "^8.0|^9.0|^10.0",
"illuminate/support": "^8.0|^9.0|^10.0",
"php": "^7.3|^8.0"
},
"bin": [
@ -8316,7 +8320,7 @@
"issues": "https://github.com/laravel/sail/issues",
"source": "https://github.com/laravel/sail"
},
"time": "2022-12-22T14:46:08+00:00"
"time": "2023-01-11T14:35:04+00:00"
},
{
"name": "maximebf/debugbar",
@ -9034,20 +9038,20 @@
},
{
"name": "phpunit/phpunit",
"version": "9.5.27",
"version": "9.5.28",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "a2bc7ffdca99f92d959b3f2270529334030bba38"
"reference": "954ca3113a03bf780d22f07bf055d883ee04b65e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a2bc7ffdca99f92d959b3f2270529334030bba38",
"reference": "a2bc7ffdca99f92d959b3f2270529334030bba38",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/954ca3113a03bf780d22f07bf055d883ee04b65e",
"reference": "954ca3113a03bf780d22f07bf055d883ee04b65e",
"shasum": ""
},
"require": {
"doctrine/instantiator": "^1.3.1",
"doctrine/instantiator": "^1.3.1 || ^2",
"ext-dom": "*",
"ext-json": "*",
"ext-libxml": "*",
@ -9116,7 +9120,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.27"
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.28"
},
"funding": [
{
@ -9132,7 +9136,7 @@
"type": "tidelift"
}
],
"time": "2022-12-09T07:31:23+00:00"
"time": "2023-01-14T12:32:24+00:00"
},
{
"name": "sebastian/cli-parser",
@ -10162,16 +10166,16 @@
},
{
"name": "spatie/flare-client-php",
"version": "1.3.2",
"version": "1.3.3",
"source": {
"type": "git",
"url": "https://github.com/spatie/flare-client-php.git",
"reference": "609903bd154ba3d71f5e23a91c3b431fa8f71868"
"reference": "f5aea0629d1fff794b2aabbcd483bd83824b112f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/flare-client-php/zipball/609903bd154ba3d71f5e23a91c3b431fa8f71868",
"reference": "609903bd154ba3d71f5e23a91c3b431fa8f71868",
"url": "https://api.github.com/repos/spatie/flare-client-php/zipball/f5aea0629d1fff794b2aabbcd483bd83824b112f",
"reference": "f5aea0629d1fff794b2aabbcd483bd83824b112f",
"shasum": ""
},
"require": {
@ -10219,7 +10223,7 @@
],
"support": {
"issues": "https://github.com/spatie/flare-client-php/issues",
"source": "https://github.com/spatie/flare-client-php/tree/1.3.2"
"source": "https://github.com/spatie/flare-client-php/tree/1.3.3"
},
"funding": [
{
@ -10227,20 +10231,20 @@
"type": "github"
}
],
"time": "2022-12-26T14:36:46+00:00"
"time": "2022-12-26T14:37:55+00:00"
},
{
"name": "spatie/ignition",
"version": "1.4.1",
"version": "1.4.2",
"source": {
"type": "git",
"url": "https://github.com/spatie/ignition.git",
"reference": "dd3d456779108d7078baf4e43f8c2b937d9794a1"
"reference": "79a2eedbfa88955bb41411e61f7db9134c9a6a82"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/ignition/zipball/dd3d456779108d7078baf4e43f8c2b937d9794a1",
"reference": "dd3d456779108d7078baf4e43f8c2b937d9794a1",
"url": "https://api.github.com/repos/spatie/ignition/zipball/79a2eedbfa88955bb41411e61f7db9134c9a6a82",
"reference": "79a2eedbfa88955bb41411e61f7db9134c9a6a82",
"shasum": ""
},
"require": {
@ -10302,7 +10306,7 @@
"type": "github"
}
],
"time": "2022-08-26T11:51:15+00:00"
"time": "2023-01-23T15:14:00+00:00"
},
{
"name": "spatie/laravel-ignition",
@ -10451,9 +10455,12 @@
"prefer-stable": true,
"prefer-lowest": false,
"platform": {
"php": "^8.0|^7.4",
"php": "^8.1",
"ext-intl": "*"
},
"platform-dev": [],
"platform-overrides": {
"php": "8.1"
},
"plugin-api-version": "2.1.0"
}

View file

@ -4,7 +4,7 @@ use Illuminate\Support\Facades\Facade;
return [
'version' => '0.9',
'version' => '0.9.8',
/*
|--------------------------------------------------------------------------
@ -17,7 +17,7 @@ return [
|
*/
'name' => env('APP_NAME', 'Controlpanel.gg'),
'name' => env('APP_NAME', 'Ctrlpanel.gg'),
/*
|--------------------------------------------------------------------------

View file

@ -9,7 +9,7 @@ return [
| It will assign the default active theme to be used if one is not set during
| runtime.
*/
'active' => null,
'active' => "default",
/*
|--------------------------------------------------------------------------

View file

@ -14,7 +14,7 @@ return [
*/
'paths' => [
resource_path('views'),
base_path('themes'),
],
/*

View file

@ -1,6 +1,7 @@
<?php
use App\Models\User;
use App\Traits\Referral;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
@ -9,16 +10,13 @@ use Illuminate\Support\Str;
return new class extends Migration
{
public function generateCode($userid)
use Referral;
public function setReferralCode($userid)
{
$random = STR::random(8);
if (User::where('referral_code', '=', $random)->doesntExist()) {
DB::table('users')
->where('id', '=', $userid)
->update(['referral_code' => $random]);
} else {
$this->generateCode($userid);
}
$code = $this->createReferralCode();
DB::table('users')
->where('id', '=', $userid)
->update(['referral_code' => $code]);
}
/**
@ -35,7 +33,7 @@ return new class extends Migration
$existing_user = User::where('referral_code', '')->orWhere('referral_code', null)->get();
foreach ($existing_user as $user) {
$this->generateCode($user->id);
$this->setReferralCode($user->id);
}
}

View file

@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('useful_links', function (Blueprint $table) {
$table->string('position')->after("description")->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('useful_links', function (Blueprint $table) {
$table->dropColumn('position');
});
}
};

View file

@ -131,7 +131,7 @@ class SettingsSeeder extends Seeder
], [
'value' => 'Credits',
'type' => 'string',
'description' => 'Set the display name of your currency :)',
'description' => 'The display name of your currency.',
]);
//credits display name
@ -148,7 +148,7 @@ class SettingsSeeder extends Seeder
], [
'value' => '0',
'type' => 'integer',
'description' => 'The %-value of tax that will be added to the product price on checkout',
'description' => 'The %-value of tax that will be added to the product price on checkout.',
]);
//Invoices enabled
Settings::firstOrCreate([
@ -156,7 +156,7 @@ class SettingsSeeder extends Seeder
], [
'value' => 'false',
'type' => 'boolean',
'description' => 'Enables or disables the invoice feature for payments',
'description' => 'Enables or disables the invoice feature for payments.',
]);
//Invoice company name
Settings::firstOrCreate([
@ -164,7 +164,7 @@ class SettingsSeeder extends Seeder
], [
'value' => '',
'type' => 'string',
'description' => 'The name of the Company on the Invoices',
'description' => 'The name of the Company on the Invoices.',
]);
//Invoice company address
Settings::firstOrCreate([
@ -172,7 +172,7 @@ class SettingsSeeder extends Seeder
], [
'value' => '',
'type' => 'string',
'description' => 'The address of the Company on the Invoices',
'description' => 'The address of the Company on the Invoices.',
]);
//Invoice company phone
Settings::firstOrCreate([
@ -180,7 +180,7 @@ class SettingsSeeder extends Seeder
], [
'value' => '',
'type' => 'string',
'description' => 'The phone number of the Company on the Invoices',
'description' => 'The phone number of the Company on the Invoices.',
]);
//Invoice company mail
@ -189,7 +189,7 @@ class SettingsSeeder extends Seeder
], [
'value' => '',
'type' => 'string',
'description' => 'The email address of the Company on the Invoices',
'description' => 'The email address of the Company on the Invoices.',
]);
//Invoice VAT
@ -198,7 +198,7 @@ class SettingsSeeder extends Seeder
], [
'value' => '',
'type' => 'string',
'description' => 'The VAT-Number of the Company on the Invoices',
'description' => 'The VAT-Number of the Company on the Invoices.',
]);
//Invoice Website
@ -207,7 +207,7 @@ class SettingsSeeder extends Seeder
], [
'value' => '',
'type' => 'string',
'description' => 'The Website of the Company on the Invoices',
'description' => 'The Website of the Company on the Invoices.',
]);
//Invoice Website
@ -216,7 +216,7 @@ class SettingsSeeder extends Seeder
], [
'value' => 'INV',
'type' => 'string',
'description' => 'The invoice prefix',
'description' => 'The invoice prefix.',
]);
//Locale
@ -225,7 +225,7 @@ class SettingsSeeder extends Seeder
], [
'value' => 'en',
'type' => 'string',
'description' => 'The default Language the dashboard will be shown in',
'description' => 'The default dashboard language.',
]);
//Dynamic locale
Settings::firstOrCreate([
@ -247,9 +247,9 @@ class SettingsSeeder extends Seeder
Settings::firstOrCreate([
'key' => 'SETTINGS::LOCALE:AVAILABLE',
], [
'value' => '',
'value' => 'en',
'type' => 'string',
'description' => 'The available languages',
'description' => 'The available languages.',
]);
//Locale
Settings::firstOrCreate([
@ -265,63 +265,63 @@ class SettingsSeeder extends Seeder
], [
'value' => env('PAYPAL_SECRET', ''),
'type' => 'string',
'description' => 'Your PayPal Secret-Key ( https://developer.paypal.com/docs/integration/direct/rest/)',
'description' => 'Your PayPal Secret-Key (https://developer.paypal.com/docs/integration/direct/rest/).',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::PAYMENTS:PAYPAL:CLIENT_ID',
], [
'value' => env('PAYPAL_CLIENT_ID', ''),
'type' => 'string',
'description' => 'Your PayPal Client_ID',
'description' => 'Your PayPal Client_ID.',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::PAYMENTS:PAYPAL:SANDBOX_SECRET',
], [
'value' => env('PAYPAL_SANDBOX_SECRET', ''),
'type' => 'string',
'description' => 'Your PayPal SANDBOX Secret-Key used for testing ',
'description' => 'Your PayPal SANDBOX Secret-Key used for testing.',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::PAYMENTS:PAYPAL:SANDBOX_CLIENT_ID',
], [
'value' => env('PAYPAL_SANDBOX_CLIENT_ID', ''),
'type' => 'string',
'description' => 'Your PayPal SANDBOX Client-ID used for testing ',
'description' => 'Your PayPal SANDBOX Client-ID used for testing.',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::PAYMENTS:STRIPE:SECRET',
], [
'value' => env('STRIPE_SECRET', ''),
'type' => 'string',
'description' => 'Your Stripe Secret-Key ( https://dashboard.stripe.com/account/apikeys )',
'description' => 'Your Stripe Secret-Key (https://dashboard.stripe.com/account/apikeys).',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::PAYMENTS:STRIPE:ENDPOINT_SECRET',
], [
'value' => env('STRIPE_ENDPOINT_SECRET', ''),
'type' => 'string',
'description' => 'Your Stripe endpoint secret-key',
'description' => 'Your Stripe endpoint secret-key.',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::PAYMENTS:STRIPE:TEST_SECRET',
], [
'value' => env('STRIPE_TEST_SECRET', ''),
'type' => 'string',
'description' => 'Your Stripe test secret-key',
'description' => 'Your Stripe test secret-key.',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::PAYMENTS:STRIPE:ENDPOINT_TEST_SECRET',
], [
'value' => env('STRIPE_ENDPOINT_TEST_SECRET', ''),
'type' => 'string',
'description' => 'Your Stripe endpoint test secret-key',
'description' => 'Your Stripe endpoint test secret-key.',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::PAYMENTS:STRIPE:METHODS',
], [
'value' => env('STRIPE_METHODS', 'card,sepa_debit'),
'type' => 'string',
'description' => 'Comma seperated list of payment methods that are enabled (https://stripe.com/docs/payments/payment-methods/integration-options)',
'description' => 'Comma seperated list of payment methods that are enabled (https://stripe.com/docs/payments/payment-methods/integration-options).',
]);
Settings::firstOrCreate([
@ -329,7 +329,7 @@ class SettingsSeeder extends Seeder
], [
'value' => env('DISCORD_CLIENT_ID', ''),
'type' => 'string',
'description' => 'Discord API Credentials - https://discordapp.com/developers/applications/',
'description' => 'Discord API Credentials (https://discordapp.com/developers/applications/).',
]);
Settings::firstOrCreate([
@ -337,14 +337,14 @@ class SettingsSeeder extends Seeder
], [
'value' => env('DISCORD_CLIENT_SECRET', ''),
'type' => 'string',
'description' => 'Discord API Credentials - https://discordapp.com/developers/applications/',
'description' => 'Discord API Credentials (https://discordapp.com/developers/applications/).',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::DISCORD:BOT_TOKEN',
], [
'value' => env('DISCORD_BOT_TOKEN', ''),
'type' => 'string',
'description' => 'Discord API Credentials - https://discordapp.com/developers/applications/',
'description' => 'Discord API Credentials (https://discordapp.com/developers/applications/).',
]);
Settings::firstOrCreate([
@ -352,7 +352,7 @@ class SettingsSeeder extends Seeder
], [
'value' => env('DISCORD_GUILD_ID', ''),
'type' => 'string',
'description' => 'Discord API Credentials - https://discordapp.com/developers/applications/',
'description' => 'Discord API Credentials (https://discordapp.com/developers/applications/).',
]);
Settings::firstOrCreate([
@ -360,14 +360,14 @@ class SettingsSeeder extends Seeder
], [
'value' => env('DISCORD_ROLE_ID', ''),
'type' => 'string',
'description' => 'Discord role that will be assigned to users when they register',
'description' => 'Discord role that will be assigned to users when they register.',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::DISCORD:INVITE_URL',
], [
'value' => env('DISCORD_INVITE_URL', ''),
'type' => 'string',
'description' => 'The invite URL to your Discord Server',
'description' => 'The invite URL to your Discord Server.',
]);
Settings::firstOrCreate([
@ -404,7 +404,7 @@ class SettingsSeeder extends Seeder
], [
'value' => env('RECAPTCHA_SITE_KEY', '6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI'),
'type' => 'string',
'description' => 'Google Recaptcha API Credentials - https://www.google.com/recaptcha/admin - reCaptcha V2 (not v3)',
'description' => 'Google Recaptcha API Credentials (https://www.google.com/recaptcha/admin) - reCaptcha V2 (not v3)',
]);
Settings::firstOrCreate([
@ -412,14 +412,14 @@ class SettingsSeeder extends Seeder
], [
'value' => env('RECAPTCHA_SECRET_KEY', '6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe'),
'type' => 'string',
'description' => 'Google Recaptcha API Credentials - https://www.google.com/recaptcha/admin - reCaptcha V2 (not v3)',
'description' => 'Google Recaptcha API Credentials (https://www.google.com/recaptcha/admin) - reCaptcha V2 (not v3)',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::RECAPTCHA:ENABLED',
], [
'value' => 'true',
'type' => 'boolean',
'description' => 'Enables or disables the ReCaptcha feature on the registration/login page',
'description' => 'Enables or disables the ReCaptcha feature on the registration/login page.',
]);
Settings::firstOrCreate([
@ -427,63 +427,63 @@ class SettingsSeeder extends Seeder
], [
'value' => env('MAIL_MAILER', 'smtp'),
'type' => 'string',
'description' => 'Selected Mailer (smtp, mailgun, sendgrid, mailtrap)',
'description' => 'Selected Mailer (smtp, mailgun, sendgrid, mailtrap).',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::MAIL:HOST',
], [
'value' => env('MAIL_HOST', 'localhost'),
'type' => 'string',
'description' => 'Mailer Host Address',
'description' => 'Mailer Host Address.',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::MAIL:PORT',
], [
'value' => env('MAIL_PORT', '25'),
'type' => 'string',
'description' => 'Mailer Server Port',
'description' => 'Mailer Server Port.',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::MAIL:USERNAME',
], [
'value' => env('MAIL_USERNAME', ''),
'type' => 'string',
'description' => 'Mailer Username',
'description' => 'Mailer Username.',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::MAIL:PASSWORD',
], [
'value' => env('MAIL_PASSWORD', ''),
'type' => 'string',
'description' => 'Mailer Password',
'description' => 'Mailer Password.',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::MAIL:ENCRYPTION',
], [
'value' => env('MAIL_ENCRYPTION', 'tls'),
'type' => 'string',
'description' => 'Mailer Encryption (tls, ssl)',
'description' => 'Mailer Encryption (tls, ssl).',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::MAIL:FROM_ADDRESS',
], [
'value' => env('MAIL_FROM_ADDRESS', ''),
'type' => 'string',
'description' => 'Mailer From Address',
'description' => 'Mailer From Address.',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::MAIL:FROM_NAME',
], [
'value' => env('APP_NAME', 'Controlpanel'),
'value' => env('APP_NAME', 'Ctrlpanel'),
'type' => 'string',
'description' => 'Mailer From Name',
'description' => 'Mailer From Name.',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::REFERRAL::ENABLED',
], [
'value' => 'false',
'type' => 'string',
'description' => 'Enable or disable the referral system',
'description' => 'Enable or disable the referral system.',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::REFERRAL::ALWAYS_GIVE_COMMISSION',
@ -518,7 +518,7 @@ class SettingsSeeder extends Seeder
], [
'value' => 100,
'type' => 'integer',
'description' => 'The Percentage Value a referred user gets',
'description' => 'The Percentage value a referred user gets.',
]);
Settings::firstOrCreate([
@ -526,28 +526,28 @@ class SettingsSeeder extends Seeder
], [
'value' => '',
'type' => 'string',
'description' => 'The Client API Key of an Pterodactyl Admin Account',
'description' => 'The Client API Key of an Pterodactyl Admin Account.',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::SYSTEM:ENABLE_UPGRADE',
], [
'value' => 'false',
'type' => 'boolean',
'description' => 'Enables the updgrade/downgrade feature for servers',
'description' => 'Enables the updgrade/downgrade feature for servers.',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::SYSTEM:CREATION_OF_NEW_SERVERS',
], [
'value' => 'true',
'type' => 'boolean',
'description' => 'Enable/disable the creation of new servers',
'description' => 'Enable creation of new servers',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::SYSTEM:CREATION_OF_NEW_USERS',
], [
'value' => 'false',
'value' => 'true',
'type' => 'boolean',
'description' => 'Enable/disable the creation of new users',
'description' => 'Enable creation of new users',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::SYSTEM:SHOW_IMPRINT',
@ -555,7 +555,7 @@ class SettingsSeeder extends Seeder
'value' => "false",
'type' => 'boolean',
'description' => 'Enable/disable imprint in footer'
'description' => 'Enable imprint in footer.'
]);
Settings::firstOrCreate([
@ -564,7 +564,7 @@ class SettingsSeeder extends Seeder
'value' => "false",
'type' => 'boolean',
'description' => 'Enable/disable privacy policy in footer'
'description' => 'Enable privacy policy in footer.'
]);
Settings::firstOrCreate([
@ -572,7 +572,7 @@ class SettingsSeeder extends Seeder
], [
'value' => 'false',
'type' => 'boolean',
'description' => 'Enable/disable Terms of Service in footer',
'description' => 'Enable Terms of Service in footer.',
]);
Settings::firstOrCreate([
@ -580,14 +580,14 @@ class SettingsSeeder extends Seeder
], [
'value' => 'false',
'type' => 'boolean',
'description' => 'Enable/disable Alerts on Homepage',
'description' => 'Enable Alerts on Homepage.',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::SYSTEM:ALERT_TYPE',
], [
'value' => 'dark',
'type' => 'text',
'description' => 'Changes the Color of the Alert',
'description' => 'Changes the Color of the Alert.',
]);
Settings::firstOrCreate([
@ -595,14 +595,14 @@ class SettingsSeeder extends Seeder
], [
'value' => '',
'type' => 'text',
'description' => 'Changes the Content the Alert',
'description' => 'Changes the Content the Alert.',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::SYSTEM:THEME',
], [
'value' => 'default',
'type' => 'text',
'description' => 'Current active theme',
'description' => 'Current active theme.',
]);
Settings::firstOrCreate([
@ -610,7 +610,7 @@ class SettingsSeeder extends Seeder
], [
'value' => 'true',
'type' => 'boolean',
'description' => 'Enable/disable Useful Links on Homepage',
'description' => 'Enable Useful Links on Homepage.',
]);
Settings::firstOrCreate([
@ -618,24 +618,24 @@ class SettingsSeeder extends Seeder
], [
'value' => 'true',
'type' => 'boolean',
'description' => 'Enable/disable MOTD on Homepage',
'description' => 'Enable MOTD on Homepage.',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::SYSTEM:MOTD_MESSAGE',
], [
'value' => '<h1 style="text-align: center;"><img style="display: block; margin-left: auto; margin-right: auto;" src="https://controlpanel.gg/img/controlpanel.png" alt="" width="200" height="200"><span style="font-size: 36pt;">Controlpanel.gg</span></h1>
'value' => '<h1 style="text-align: center;"><img style="display: block; margin-left: auto; margin-right: auto;" src="https://ctrlpanel.gg/img/controlpanel.png" alt="" width="200" height="200"><span style="font-size: 36pt;">Ctrlpanel.gg</span></h1>
<p><span style="font-size: 18pt;">Thank you for using our Software</span></p>
<p><span style="font-size: 18pt;">If you have any questions, make sure to join our <a href="https://discord.com/invite/4Y6HjD2uyU" target="_blank" rel="noopener">Discord</a></span></p>
<p><span style="font-size: 10pt;">(you can change this message in the <a href="admin/settings#system">Settings</a> )</span></p>',
'type' => 'text',
'description' => 'MOTD Message',
'description' => 'MOTD Message.',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::SYSTEM:SEO_TITLE',
], [
'value' => 'Controlpanel.gg',
'value' => 'Ctrlpanel.gg',
'type' => 'text',
'description' => 'The SEO Title',
'description' => 'The SEO Title.',
]);
Settings::firstOrCreate([
@ -643,14 +643,14 @@ class SettingsSeeder extends Seeder
], [
'value' => 'Billing software for Pterodactyl Dashboard!',
'type' => 'text',
'description' => 'SEO Description',
'description' => 'SEO Description.',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::TICKET:NOTIFY',
], [
'value' => 'all',
'type' => 'text',
'description' => 'Who will get a Email Notifcation on new Tickets',
'description' => 'Who will get a Email Notifcation on new Tickets.',
]);
}
}

View file

@ -19,18 +19,21 @@ class UsefulLinksSeeder extends Seeder
'title' => 'Pterodactyl Panel',
'link' => env('PTERODACTYL_URL', 'http://localhost'),
'description' => 'Use your servers on our pterodactyl panel <small>(You can use the same login details)</small>',
'position' => 'dashboard',
]);
UsefulLink::create([
'icon' => 'fas fa-database',
'title' => 'phpMyAdmin',
'link' => env('PHPMYADMIN_URL', 'http://localhost'),
'description' => 'View your database online using phpMyAdmin',
'position' => 'dashboard,topbar',
]);
UsefulLink::create([
'icon' => 'fab fa-discord',
'title' => 'Discord',
'link' => env('DISCORD_INVITE_URL', 'https://discord.gg/4Y6HjD2uyU'),
'description' => 'Need a helping hand? Want to chat? Got any questions? Join our discord!',
'position' => 'dashboard',
]);
}
}

View file

@ -12,7 +12,7 @@ services:
ports:
- 80:80
volumes:
- "../:/var/www/html:delegated"
- "../:/var/www/html"
depends_on:
- php
- mysql
@ -42,7 +42,7 @@ services:
dockerfile: docker/php/Dockerfile
container_name: controlpanel_php
volumes:
- "../:/var/www/html:delegated"
- "../:/var/www/html"
networks:
- laravel

View file

@ -1,16 +1,14 @@
FROM php:8.0-fpm-alpine3.13
FROM php:8.1-fpm-buster
RUN apt-get update \
&& apt-get install -y build-essential zlib1g-dev default-mysql-client curl gnupg procps vim git unzip libzip-dev libpq-dev libicu-dev libonig-dev libpng-dev libjpeg-dev libfreetype6-dev
RUN apk update && apk upgrade
RUN apk add --no-cache --repository https://alpine.global.ssl.fastly.net/alpine/edge/community/
RUN apk add --no-cache curl-dev icu-dev libzip-dev
RUN docker-php-ext-install mysqli pdo pdo_mysql intl zip
RUN docker-php-ext-install mysqli pdo pdo_mysql intl zip gd bcmath
ADD ./docker/php/www.conf /usr/local/etc/php-fpm.d/
RUN mkdir -p /var/www/html
RUN addgroup -g 1000 laravel && adduser -G laravel -g laravel -s /bin/sh -D laravel
RUN addgroup --gid 1000 laravel && adduser --ingroup laravel --uid 1000 --shell /bin/sh --disabled-password --gecos "" laravel
RUN chown laravel:laravel /var/www/html
WORKDIR /var/www/html

View file

@ -160,7 +160,7 @@
"Support server": "Support server",
"Documentation": "Documentation",
"Github": "Github",
"Support ControlPanel": "Support ControlPanel",
"Support CtrlPanel": "Support CtrlPanel",
"Servers": "Servers",
"Total": "Total",
"Payments": "Payments",
@ -177,13 +177,13 @@
"Title": "Title",
"User": "User",
"Last updated": "Last updated",
"Controlpanel.gg": "Controlpanel.gg",
"Ctrlpanel.gg": "Ctrlpanel.gg",
"Version": "Version",
"Individual nodes": "Individual nodes",
"You reached the Pterodactyl perPage limit. Please make sure to set it higher than your server count.": "You reached the Pterodactyl perPage limit. Please make sure to set it higher than your server count.",
"You can do that in settings.": "You can do that in settings.",
"Note": "Note",
"If this error persists even after changing the limit, it might mean a server was deleted on Pterodactyl, but not on ControlPanel. Try clicking the button below.": "If this error persists even after changing the limit, it might mean a server was deleted on Pterodactyl, but not on ControlPanel. Try clicking the button below.",
"If this error persists even after changing the limit, it might mean a server was deleted on Pterodactyl, but not on CtrlPanel. Try clicking the button below.": "If this error persists even after changing the limit, it might mean a server was deleted on Pterodactyl, but not on CtrlPanel. Try clicking the button below.",
"Sync servers": "Sync servers",
"Node": "Node",
"Server count": "Server count",
@ -256,9 +256,9 @@
"You usually do not need to change anything here": "You usually do not need to change anything here",
"Edit Server": "Edit Server",
"Server identifier": "Server identifier",
"Change the server identifier on controlpanel to match a pterodactyl server.": "Change the server identifier on controlpanel to match a pterodactyl server.",
"Change the server identifier on ctrlpanel to match a pterodactyl server.": "Change the server identifier on ctrlpanel to match a pterodactyl server.",
"Server owner": "Server owner",
"Change the current server owner on controlpanel and pterodactyl.": "Change the current server owner on controlpanel and pterodactyl.",
"Change the current server owner on ctrlpanel and pterodactyl.": "Change the current server owner on ctrlpanel and pterodactyl.",
"Server id": "Server id",
"Config": "Config",
"Suspended at": "Suspended at",

24755
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,23 +1,13 @@
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "mix",
"watch": "mix watch",
"watch-poll": "mix watch -- --watch-options-poll=1000",
"hot": "mix watch --hot",
"prod": "npm run production",
"production": "mix --production",
"dev:default": "vite --config themes/default/vite.config.js",
"build:default": "vite build --config themes/default/vite.config.js",
"dev:1day2die": "vite --config themes/1day2die/vite.config.js",
"build:1day2die": "vite build --config themes/1day2die/vite.config.js"
"development": "vite",
"production": "vite build"
},
"devDependencies": {
"axios": "^0.25",
"bootstrap": "^4.6.0",
"jquery": "^3.5",
"laravel-mix": "^6.0.6",
"lodash": "^4.17.19",
"popper.js": "^1.16",
"postcss": "^8.1.14",
@ -26,6 +16,8 @@
"sass-loader": "^10.1.1"
},
"dependencies": {
"tinymce": "^6.3.1"
"tinymce": "^6.3.1",
"vite": "^4.0.4",
"laravel-vite-plugin": "^0.7.3"
}
}

11
public/build/assets/app-bac23d88.css vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,7 @@
{
"themes/default/sass/app.scss": {
"file": "assets/app-bac23d88.css",
"src": "themes/default/sass/app.scss",
"isEntry": true
}
}

View file

@ -8,7 +8,7 @@ if (file_exists('../../install.lock')) {
<html>
<head>
<title>Controlpanel.gg installer Script</title>
<title>Ctrlpanel.gg installer Script</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<style>
@ -48,7 +48,7 @@ if (file_exists('../../install.lock')) {
$cardheader = '
<div class="card card-outline-success bg-dark">
<div class="card-header text-center">
<b class="mr-1 text-light">Controlpanel.GG</b>
<b class="mr-1 text-light">Ctrlpanel.GG</b>
</div>
<div class="card-body bg-light">';
@ -57,7 +57,7 @@ if (! isset($_GET['step'])) {
echo run_console('cp .env.example .env');
}
echo $cardheader; ?>
<p class="login-box-msg">This installer will lead you through the most crucial Steps of Controlpanel.gg`s
<p class="login-box-msg">This installer will lead you through the most crucial Steps of Ctrlpanel.gg`s
setup</p>
<p class="<?php echo checkHTTPS() == true ? 'ok' : 'notok'; ?>">HTTPS is required</p>
@ -218,7 +218,7 @@ if (isset($_GET['step']) && $_GET['step'] == 2) {
<label for="name">Your Host-Name</label>
<input id="name" name="name" type="text"
required
value="Controlpanel.gg" class="form-control">
value="Ctrlpanel.gg" class="form-control">
</div>
</div>

View file

@ -1,4 +0,0 @@
{
"/js/app.js": "/js/app.js",
"/css/app.css": "/css/app.css"
}

1
public/themes/BlueInfinity/app.css vendored Normal file
View file

@ -0,0 +1 @@
@import "default.css";.layout-fixed .wrapper .sidebar{ height:calc(100vh - 3.5rem - 1px);background:radial-gradient(#061b29,black);}body:not(.sidebar-mini-md) .content-wrapper,body:not(.sidebar-mini-md) .main-footer,body:not(.sidebar-mini-md) .main-header{ transition:margin-left .3s ease-in-out;background:radial-gradient(#061b29,black);}[class*=sidebar-dark] .brand-link,[class*=sidebar-dark] .brand-link .pushmenu{ color:hsla(0,0%,100%,.8);background:radial-gradient(#061b29,black);}.main-sidebar .brand-text,.main-sidebar .logo-xl,.main-sidebar .logo-xs,.sidebar .nav-link p,.sidebar .user-panel .info{ transition:margin-left .3s linear,opacity .3s ease,visibility .3s ease;color:#d3d3d3;}.sidebar-dark-primary .nav-sidebar>.nav-item>.nav-link.active,.sidebar-light-primary .nav-sidebar>.nav-item>.nav-link.active{ color:#fff;background:radial-gradient(#1b4b61,#fd030300);border-radius:50px;}.dark-mode .card{ background-color:#00000000;color:#ffffff99;border-width:3px;border-color:#f7f7f7;border-style:double;border-radius:15px;}.btn-info{ color:#ffffff;background-color:#b8171700;border-color:#ffffff;box-shadow:none;}.btn-warning{ color:#ffffff;background-color:#ffc10700;border-color:#ffffff;box-shadow:none;}.card-title{ float:left;font-size:1.1rem;font-weight:400;margin:0;color:white;}.dark-mode .text-muted{ color:#ffffff99!important;}.dark-mode .list-group-item{ background-color:#343a4000;border-color:#ffffff99;}.dark-mode .info-box{ background-color:#343a4000;color:#fff;border:3px;border-style:double;border-radius:15px;border-color:white;}label:not(.form-check-label):not(.custom-file-label){ font-weight:700;color:#ffffffc2;}.dark-mode .custom-control-label:before,.dark-mode .custom-file-label,.dark-mode .custom-file-label:after,.dark-mode .custom-select,.dark-mode .form-control,.dark-mode .input-group-text{ background-color:#007af400;color:#828282;}.alert-success{ color:#fff;background-color:#28a745;border-color:#ffffff;border-radius:15px;border-style:double;}.dark-mode{ color:#fff;background:radial-gradient(#061b29,black);}.dark-mode .invoice{ background-color:#343a4000;border:3px;border-radius:15px;border-color:white;border:double;}.dark-mode .nav-tabs .nav-item.show .nav-link,.dark-mode .nav-tabs .nav-link.active{ background-color:#ffffff1c;color:#fff;}.slim-crop-area img,.slim-image-editor img,.slim-popover img,.slim img{ background:black;}.dark-mode .callout{ background-color:#00ff0333;}.callout.callout-info{ border-left-color:#00e11d;}.p-3{ padding:1rem!important;background:#061b29;}.small-box>.small-box-footer{ color:hsla(0,0%,100%,.8);display:block;padding:3px 0;position:relative;text-align:center;text-decoration:none;z-index:10;background:#061b29;}.dark-mode .dropdown-menu{ background-color:#061b29;border-color:white;}.card-header:first-child{ border-radius:14px 14px 0px 0px;background:#061b29;}.card-body{ flex:1 1 auto;min-height:1px;padding:1.25rem;background:#061b29;}.justify-content-between{ justify-content:space-between!important;background:#061b29;}.dark-mode .card .card-footer{ background-color:#061b29;border-radius:0px 0px 14px 14px;}.dark-mode .select2-selection--single{ background-color:#061b29;border-color:#6c757d;}.select2-search--dropdown{ display:block;padding:4px;background:#061b29;}.select2-container--default .select2-results__option{ padding:6px 12px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background:blue;background:#061b29;}.dark-mode .select2-dropdown,.dark-mode .select2-dropdown .select2-search__field,.dark-mode .select2-search--inline .select2-search__field{ background-color:#061b29;border-color:#ffffff;color:#fff;}.modal-header{ background:#061b29;}.modal-body{ position:relative;flex:1 1 auto;padding:1rem;background:#061b29;}.dark-mode .modal-footer,.dark-mode .modal-header{ border-color:#ffffff;background:#061b29;}

File diff suppressed because one or more lines are too long

20
public/themes/BlueInfinity/default.css vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -8,7 +8,9 @@ use App\Classes\Settings\System;
use App\Http\Controllers\Admin\ActivityLogController;
use App\Http\Controllers\Admin\ApplicationApiController;
use App\Http\Controllers\Admin\InvoiceController;
use App\Http\Controllers\Admin\LegalController;
use App\Http\Controllers\Admin\OverViewController;
use App\Http\Controllers\Admin\PartnerController;
use App\Http\Controllers\Admin\PaymentController;
use App\Http\Controllers\Admin\ProductController;
use App\Http\Controllers\Admin\ServerController as AdminServerController;
@ -19,9 +21,9 @@ use App\Http\Controllers\Admin\UserController;
use App\Http\Controllers\Admin\VoucherController;
use App\Http\Controllers\Auth\SocialiteController;
use App\Http\Controllers\HomeController;
use App\Http\Controllers\Moderation\TicketCategoryController;
use App\Http\Controllers\Moderation\TicketsController as ModTicketsController;
use App\Http\Controllers\NotificationController;
use App\Http\Controllers\PartnerController;
use App\Http\Controllers\ProductController as FrontProductController;
use App\Http\Controllers\ProfileController;
use App\Http\Controllers\ServerController;
@ -111,13 +113,15 @@ Route::middleware(['auth', 'checkSuspended'])->group(function () {
Route::post('ticket/new', [TicketsController::class, 'store'])->middleware(['throttle:ticket-new'])->name('ticket.new.store');
Route::get('ticket/show/{ticket_id}', [TicketsController::class, 'show'])->name('ticket.show');
Route::post('ticket/reply', [TicketsController::class, 'reply'])->middleware(['throttle:ticket-reply'])->name('ticket.reply');
Route::post('ticket/close/{ticket_id}', [TicketsController::class, 'close'])->name('ticket.close');
Route::post('ticket/status/{ticket_id}', [TicketsController::class, 'changeStatus'])->name('ticket.changeStatus');
}
//admin
Route::prefix('admin')->name('admin.')->middleware('admin')->group(function () {
//overview
Route::get('legal', [OverViewController::class, 'index'])->name('overview.index');
Route::get('overview', [OverViewController::class, 'index'])->name('overview.index');
Route::get('overview/sync', [OverViewController::class, 'syncPterodactyl'])->name('overview.sync');
@ -178,6 +182,10 @@ Route::middleware(['auth', 'checkSuspended'])->group(function () {
Route::get('usefullinks/datatable', [UsefulLinkController::class, 'datatable'])->name('usefullinks.datatable');
Route::resource('usefullinks', UsefulLinkController::class);
//legal
Route::get('legal', [LegalController::class, 'index'])->name('legal.index');
Route::patch('legal', [LegalController::class, 'update'])->name('legal.update');
//vouchers
Route::get('vouchers/datatable', [VoucherController::class, 'datatable'])->name('vouchers.datatable');
Route::get('vouchers/{voucher}/usersdatatable', [VoucherController::class, 'usersdatatable'])->name('vouchers.usersdatatable');
@ -203,7 +211,7 @@ Route::middleware(['auth', 'checkSuspended'])->group(function () {
Route::get('ticket/datatable', [ModTicketsController::class, 'datatable'])->name('ticket.datatable');
Route::get('ticket/show/{ticket_id}', [ModTicketsController::class, 'show'])->name('ticket.show');
Route::post('ticket/reply', [ModTicketsController::class, 'reply'])->name('ticket.reply');
Route::post('ticket/close/{ticket_id}', [ModTicketsController::class, 'close'])->name('ticket.close');
Route::post('ticket/status/{ticket_id}', [ModTicketsController::class, 'changeStatus'])->name('ticket.changeStatus');
Route::post('ticket/delete/{ticket_id}', [ModTicketsController::class, 'delete'])->name('ticket.delete');
//ticket moderation blacklist
Route::get('ticket/blacklist', [ModTicketsController::class, 'blacklist'])->name('ticket.blacklist');
@ -211,6 +219,11 @@ Route::middleware(['auth', 'checkSuspended'])->group(function () {
Route::post('ticket/blacklist/delete/{id}', [ModTicketsController::class, 'blacklistDelete'])->name('ticket.blacklist.delete');
Route::post('ticket/blacklist/change/{id}', [ModTicketsController::class, 'blacklistChange'])->name('ticket.blacklist.change');
Route::get('ticket/blacklist/datatable', [ModTicketsController::class, 'dataTableBlacklist'])->name('ticket.blacklist.datatable');
Route::get('ticket/category/datatable', [TicketCategoryController::class, 'datatable'])->name('ticket.category.datatable');
Route::resource("ticket/category", TicketCategoryController::class,['as' => 'ticket']);
});
Route::get('/home', [HomeController::class, 'index'])->name('home');

View file

@ -0,0 +1,66 @@
<!doctype html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta content="{{ config('SETTINGS::SYSTEM:SEO_TITLE') }}" property="og:title">
<meta content="{{ config('SETTINGS::SYSTEM:SEO_DESCRIPTION') }}" property="og:description">
<meta content='{{ \Illuminate\Support\Facades\Storage::disk('public')->exists('logo.png') ? asset('storage/logo.png') : asset('images/controlpanel_logo.png') }}' property="og:image">
<!-- CSRF Token -->
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>{{ config('app.name', 'Laravel') }}</title>
<link rel="icon"
href="{{ \Illuminate\Support\Facades\Storage::disk('public')->exists('favicon.ico') ? \Illuminate\Support\Facades\Storage::disk('public')->url('favicon.ico') : asset('favicon.ico') }}"
type="image/x-icon">
<script src="{{ asset('js/app.js') }}" defer></script>
<!-- Fonts -->
<link rel="dns-prefetch" href="//fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet">
<link rel="preload" href="{{ asset('plugins/fontawesome-free/css/all.min.css') }}" as="style"
onload="this.onload=null;this.rel='stylesheet'">
<noscript>
<link rel="stylesheet" href="{{ asset('plugins/fontawesome-free/css/all.min.css') }}">
</noscript>
@if (config('SETTINGS::RECAPTCHA:ENABLED') == 'true')
{!! htmlScriptTagJsApi() !!}
@endif
<link rel="stylesheet" href="{{ asset('themes/BlueInfinity/app.css') }}">
</head>
@yield('content')
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@10.14.1/dist/sweetalert2.all.min.js"></script>
<script>
@if (Session::has('error'))
Swal.fire({
icon: 'error',
title: 'Oops...',
html: '{{ Session::get('error') }}',
})
@endif
@if (Session::has('success'))
Swal.fire({
icon: 'success',
title: '{{ Session::get('success') }}',
position: 'top-end',
showConfirmButton: false,
background: '#343a40',
toast: true,
timer: 3000,
timerProgressBar: true,
didOpen: (toast) => {
toast.addEventListener('mouseenter', Swal.stopTimer)
toast.addEventListener('mouseleave', Swal.resumeTimer)
}
})
@endif
</script>
</html>

View file

@ -0,0 +1,544 @@
<!doctype html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- CSRF Token -->
<meta name="csrf-token" content="{{ csrf_token() }}">
<meta content="{{ config('SETTINGS::SYSTEM:SEO_TITLE') }}" property="og:title">
<meta content="{{ config('SETTINGS::SYSTEM:SEO_DESCRIPTION') }}" property="og:description">
<meta content='{{ \Illuminate\Support\Facades\Storage::disk('public')->exists('logo.png') ? asset('storage/logo.png') : asset('images/controlpanel_logo.png') }}' property="og:image">
<title>{{ config('app.name', 'Laravel') }}</title>
<link rel="icon"
href="{{ \Illuminate\Support\Facades\Storage::disk('public')->exists('favicon.ico') ? asset('storage/favicon.ico') : asset('favicon.ico') }}"
type="image/x-icon">
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>
{{-- <link rel="stylesheet" href="{{asset('css/adminlte.min.css')}}"> --}}
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/bs4/dt-1.10.24/datatables.min.css" />
{{-- summernote --}}
<link rel="stylesheet" href="{{ asset('plugins/summernote/summernote-bs4.min.css') }}">
{{-- datetimepicker --}}
<link rel="stylesheet"
href="{{ asset('plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css') }}">
{{-- select2 --}}
<link rel="stylesheet" href="{{ asset('plugins/select2/css/select2.min.css') }}">
<link rel="preload" href="{{ asset('plugins/fontawesome-free/css/all.min.css') }}" as="style"
onload="this.onload=null;this.rel='stylesheet'">
<noscript>
<link rel="stylesheet" href="{{ asset('plugins/fontawesome-free/css/all.min.css') }}">
</noscript>
<script src="{{ asset('js/app.js') }}"></script>
<!-- tinymce -->
<script src={{ asset('plugins/tinymce/js/tinymce/tinymce.min.js') }}></script>
<link rel="stylesheet" href="{{ asset('themes/BlueInfinity/app.css') }}">
</head>
<body class="sidebar-mini layout-fixed dark-mode" style="height: auto;">
<div class="wrapper">
<!-- Navbar -->
<nav class="main-header sticky-top navbar navbar-expand navbar-dark navbar-light">
<!-- Left navbar links -->
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" data-widget="pushmenu" href="#" role="button"><i
class="fas fa-bars"></i></a>
</li>
<li class="nav-item d-none d-sm-inline-block">
<a href="{{ route('home') }}" class="nav-link"><i
class="fas fa-home mr-2"></i>{{ __('Home') }}</a>
</li>
@if (config('SETTINGS::DISCORD:INVITE_URL'))
<li class="nav-item d-none d-sm-inline-block">
<a href="{{ config('SETTINGS::DISCORD:INVITE_URL') }}" class="nav-link" target="__blank"><i
class="fab fa-discord mr-2"></i>{{ __('Discord') }}</a>
</li>
@endif
<!-- Language Selection -->
@if (config('SETTINGS::LOCALE:CLIENTS_CAN_CHANGE') == 'true')
<li class="nav-item dropdown">
<a class="nav-link" href="#" id="languageDropdown" role="button" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
<span class="mr-1 d-lg-inline text-gray-600">
<small><i class="fa fa-language mr-2"></i></small>{{ __('Language') }}
</span>
</a>
<div class="dropdown-menu dropdown-menu-right shadow animated--grow-in"
aria-labelledby="changeLocale">
<form method="post" action="{{ route('changeLocale') }}" class="nav-item text-center">
@csrf
@foreach (explode(',', config('SETTINGS::LOCALE:AVAILABLE')) as $key)
<button class="dropdown-item" name="inputLocale" value="{{ $key }}">
{{ __($key) }}
</button>
@endforeach
</form>
</div>
</li>
<!-- End Language Selection -->
@endif
@foreach($useful_links as $link)
<li class="nav-item d-none d-sm-inline-block">
<a href="{{ $link->link }}" class="nav-link" target="__blank"><i
class="{{$link->icon}}"></i> {{ $link->title }}</a>
</li>
@endforeach
</ul>
<!-- Right navbar links -->
<ul class="navbar-nav ml-auto">
<!-- Notifications Dropdown Menu -->
<li class="nav-item dropdown">
<a class="nav-link" data-toggle="dropdown" href="#">
<i class="far fa-bell"></i>
@if (Auth::user()->unreadNotifications->count() != 0)
<span
class="badge badge-warning navbar-badge">{{ Auth::user()->unreadNotifications->count() }}</span>
@endif
</a>
<div class="dropdown-menu dropdown-menu-lg dropdown-menu-right">
<span class="dropdown-item dropdown-header">{{ Auth::user()->unreadNotifications->count() }}
{{ __('Notifications') }}</span>
<div class="dropdown-divider"></div>
@foreach (Auth::user()->unreadNotifications->sortBy('created_at')->take(5) as $notification)
<a href="{{ route('notifications.show', $notification->id) }}" class="dropdown-item">
<span class="d-inline-block text-truncate" style="max-width: 150px;"><i
class="fas fa-envelope mr-2"></i>{{ $notification->data['title'] }}</span>
<span
class="float-right text-muted text-sm">{{ $notification->created_at->longAbsoluteDiffForHumans() }}
ago</span>
</a>
@endforeach
<div class="dropdown-divider"></div>
<a href="{{ route('notifications.index') }}"
class="dropdown-item dropdown-footer">{{ __('See all Notifications') }}</a>
<div class="dropdown-divider"></div>
<a href="{{ route('notifications.readAll') }}"
class="dropdown-item dropdown-footer">{{ __('Mark all as read') }}</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link" href="#" id="userDropdown" role="button" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
<span class="mr-1 d-lg-inline text-gray-600">
<small><i class="fas fa-coins mr-2"></i></small>{{ Auth::user()->credits() }}
</span>
</a>
<div class="dropdown-menu dropdown-menu-right shadow animated--grow-in"
aria-labelledby="userDropdown">
<a class="dropdown-item" href="{{ route('store.index') }}">
<i class="fas fa-coins fa-sm fa-fw mr-2 text-gray-400"></i>
{{ __('Store') }}
</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" data-toggle="modal" data-target="#redeemVoucherModal"
href="javascript:void(0)">
<i class="fas fa-money-check-alt fa-sm fa-fw mr-2 text-gray-400"></i>
{{ __('Redeem code') }}
</a>
</div>
</li>
<li class="nav-item dropdown no-arrow">
<a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="mr-1 d-lg-inline text-gray-600 small">
{{ Auth::user()->name }}
<img width="28px" height="28px" class="rounded-circle ml-1"
src="{{ Auth::user()->getAvatar() }}">
</span>
</a>
<!-- Dropdown - User Information -->
<div class="dropdown-menu dropdown-menu-right shadow animated--grow-in"
aria-labelledby="userDropdown">
<a class="dropdown-item" href="{{ route('profile.index') }}">
<i class="fas fa-user fa-sm fa-fw mr-2 text-gray-400"></i>
{{ __('Profile') }}
</a>
{{-- <a class="dropdown-item" href="#"> --}}
{{-- <i class="fas fa-list fa-sm fa-fw mr-2 text-gray-400"></i> --}}
{{-- Activity Log --}}
{{-- </a> --}}
@if (session()->get('previousUser'))
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="{{ route('users.logbackin') }}">
<i class="fas fa-sign-in-alt fa-sm fa-fw mr-2 text-gray-400"></i>
{{ __('Log back in') }}
</a>
@endif
<div class="dropdown-divider"></div>
<form method="post" action="{{ route('logout') }}">
@csrf
<button class="dropdown-item" href="#" data-toggle="modal"
data-target="#logoutModal">
<i class="fas fa-sign-out-alt fa-sm fa-fw mr-2 text-gray-400"></i>
{{ __('Logout') }}
</button>
</form>
</div>
</li>
</ul>
</nav>
<!-- /.navbar -->
<!-- Main Sidebar Container -->
<aside class="main-sidebar sidebar-open sidebar-dark-primary elevation-4">
<!-- Brand Logo -->
<a href="{{ route('home') }}" class="brand-link">
<img width="64" height="64"
src="{{ \Illuminate\Support\Facades\Storage::disk('public')->exists('icon.png') ? asset('storage/icon.png') : asset('images/controlpanel_logo.png') }}"
alt="{{ config('app.name', 'Laravel') }} Logo" class="brand-image img-circle"
style="opacity: .8">
<span class="brand-text font-weight-light">{{ config('app.name', 'Ctrlpanel.gg') }}</span>
</a>
<!-- Sidebar -->
<div class="sidebar" style="overflow-y: auto">
<!-- Sidebar Menu -->
<nav class="my-2">
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu"
data-accordion="false">
<!-- Add icons to the links using the .nav-icon class
with font-awesome or any other icon font library -->
<li class="nav-item">
<a href="{{ route('home') }}"
class="nav-link @if (Request::routeIs('home')) active @endif">
<i class="nav-icon fa fa-home"></i>
<p>{{ __('Dashboard') }}</p>
</a>
</li>
<li class="nav-item">
<a href="{{ route('servers.index') }}"
class="nav-link @if (Request::routeIs('servers.*')) active @endif">
<i class="nav-icon fa fa-server"></i>
<p>{{ __('Servers') }}
<span class="badge badge-info right">{{ Auth::user()->servers()->count() }} /
{{ Auth::user()->server_limit }}</span>
</p>
</a>
</li>
@if (env('APP_ENV') == 'local' ||
(config('SETTINGS::PAYMENTS:PAYPAL:SECRET') && config('SETTINGS::PAYMENTS:PAYPAL:CLIENT_ID')) ||
(config('SETTINGS::PAYMENTS:STRIPE:SECRET') &&
config('SETTINGS::PAYMENTS:STRIPE:ENDPOINT_SECRET') &&
config('SETTINGS::PAYMENTS:STRIPE:METHODS')))
<li class="nav-item">
<a href="{{ route('store.index') }}"
class="nav-link @if (Request::routeIs('store.*') || Request::routeIs('checkout')) active @endif">
<i class="nav-icon fa fa-coins"></i>
<p>{{ __('Store') }}</p>
</a>
</li>
@endif
@if (config('SETTINGS::TICKET:ENABLED'))
<li class="nav-item">
<a href="{{ route('ticket.index') }}"
class="nav-link @if (Request::routeIs('ticket.*')) active @endif">
<i class="nav-icon fas fas fa-ticket-alt"></i>
<p>{{ __('Support Ticket') }}</p>
</a>
</li>
@endif
@if ((Auth::user()->role == 'admin' || Auth::user()->role == 'moderator') && config('SETTINGS::TICKET:ENABLED'))
<li class="nav-header">{{ __('Moderation') }}</li>
<li class="nav-item">
<a href="{{ route('moderator.ticket.index') }}"
class="nav-link @if (Request::routeIs('moderator.ticket.index')) active @endif">
<i class="nav-icon fas fa-ticket-alt"></i>
<p>{{ __('Ticket List') }}</p>
</a>
</li>
<li class="nav-item">
<a href="{{ route('moderator.ticket.blacklist') }}"
class="nav-link @if (Request::routeIs('moderator.ticket.blacklist')) active @endif">
<i class="nav-icon fas fa-user-times"></i>
<p>{{ __('Ticket Blacklist') }}</p>
</a>
</li>
@endif
@if (Auth::user()->role == 'admin')
<li class="nav-header">{{ __('Administration') }}</li>
<li class="nav-item">
<a href="{{ route('admin.overview.index') }}"
class="nav-link @if (Request::routeIs('admin.overview.*')) active @endif">
<i class="nav-icon fa fa-home"></i>
<p>{{ __('Overview') }}</p>
</a>
</li>
<li class="nav-item">
<a href="{{ route('admin.settings.index') }}"
class="nav-link @if (Request::routeIs('admin.settings.*')) active @endif">
<i class="nav-icon fas fa-tools"></i>
<p>{{ __('Settings') }}</p>
</a>
</li>
<li class="nav-item">
<a href="{{ route('admin.api.index') }}"
class="nav-link @if (Request::routeIs('admin.api.*')) active @endif">
<i class="nav-icon fa fa-gamepad"></i>
<p>{{ __('Application API') }}</p>
</a>
</li>
<li class="nav-header">{{ __('Management') }}</li>
<li class="nav-item">
<a href="{{ route('admin.users.index') }}"
class="nav-link @if (Request::routeIs('admin.users.*')) active @endif">
<i class="nav-icon fas fa-users"></i>
<p>{{ __('Users') }}</p>
</a>
</li>
<li class="nav-item">
<a href="{{ route('admin.servers.index') }}"
class="nav-link @if (Request::routeIs('admin.servers.*')) active @endif">
<i class="nav-icon fas fa-server"></i>
<p>{{ __('Servers') }}</p>
</a>
</li>
<li class="nav-item">
<a href="{{ route('admin.products.index') }}"
class="nav-link @if (Request::routeIs('admin.products.*')) active @endif">
<i class="nav-icon fas fa-sliders-h"></i>
<p>{{ __('Products') }}</p>
</a>
</li>
<li class="nav-item">
<a href="{{ route('admin.store.index') }}"
class="nav-link @if (Request::routeIs('admin.store.*')) active @endif">
<i class="nav-icon fas fa-shopping-basket"></i>
<p>{{ __('Store') }}</p>
</a>
</li>
<li class="nav-item">
<a href="{{ route('admin.vouchers.index') }}"
class="nav-link @if (Request::routeIs('admin.vouchers.*')) active @endif">
<i class="nav-icon fas fa-money-check-alt"></i>
<p>{{ __('Vouchers') }}</p>
</a>
</li>
<li class="nav-item">
<a href="{{ route('admin.partners.index') }}"
class="nav-link @if (Request::routeIs('admin.partners.*')) active @endif">
<i class="nav-icon fas fa-handshake"></i>
<p>{{ __('Partners') }}</p>
</a>
</li>
{{-- <li class="nav-header">Pterodactyl</li> --}}
{{-- <li class="nav-item"> --}}
{{-- <a href="{{route('admin.nodes.index')}}" --}}
{{-- class="nav-link @if (Request::routeIs('admin.nodes.*')) active @endif"> --}}
{{-- <i class="nav-icon fas fa-sitemap"></i> --}}
{{-- <p>Nodes</p> --}}
{{-- </a> --}}
{{-- </li> --}}
{{-- <li class="nav-item"> --}}
{{-- <a href="{{route('admin.nests.index')}}" --}}
{{-- class="nav-link @if (Request::routeIs('admin.nests.*')) active @endif"> --}}
{{-- <i class="nav-icon fas fa-th-large"></i> --}}
{{-- <p>Nests</p> --}}
{{-- </a> --}}
{{-- </li> --}}
<li class="nav-header">{{ __('Other') }}</li>
<li class="nav-item">
<a href="{{ route('admin.usefullinks.index') }}"
class="nav-link @if (Request::routeIs('admin.usefullinks.*')) active @endif">
<i class="nav-icon fas fa-link"></i>
<p>{{ __('Useful Links') }}</p>
</a>
</li>
<li class="nav-item">
<a href="{{ route('admin.legal.index') }}"
class="nav-link @if (Request::routeIs('admin.legal.*')) active @endif">
<i class="nav-icon fas fa-link"></i>
<p>{{ __('Legal Sites') }}</p>
</a>
</li>
<li class="nav-header">{{ __('Logs') }}</li>
<li class="nav-item">
<a href="{{ route('admin.payments.index') }}"
class="nav-link @if (Request::routeIs('admin.payments.*')) active @endif">
<i class="nav-icon fas fa-money-bill-wave"></i>
<p>{{ __('Payments') }}
<span
class="badge badge-success right">{{ \App\Models\Payment::count() }}</span>
</p>
</a>
</li>
<li class="nav-item">
<a href="{{ route('admin.activitylogs.index') }}"
class="nav-link @if (Request::routeIs('admin.activitylogs.*')) active @endif">
<i class="nav-icon fas fa-clipboard-list"></i>
<p>{{ __('Activity Logs') }}</p>
</a>
</li>
@endif
</ul>
</nav>
<!-- /.sidebar-menu -->
</div>
<!-- /.sidebar -->
</aside>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
@if (!Auth::user()->hasVerifiedEmail())
@if (Auth::user()->created_at->diffInHours(now(), false) > 1)
<div class="alert alert-warning p-2 m-2">
<h5><i class="icon fas fa-exclamation-circle"></i> {{ __('Warning!') }}</h5>
{{ __('You have not yet verified your email address') }} <a class="text-primary"
href="{{ route('verification.send') }}">{{ __('Click here to resend verification email') }}</a>
<br>
{{ __('Please contact support If you didnt receive your verification email.') }}
</div>
@endif
@endif
@yield('content')
@include('models.redeem_voucher_modal')
</div>
<!-- /.content-wrapper -->
<footer class="main-footer">
<strong>Copyright &copy; 2021-{{ date('Y') }} <a
href="{{ url('/') }}">{{ env('APP_NAME', 'Laravel') }}</a>.</strong>
All rights
reserved. Powered by <a href="https://ctrlpanel.gg">CtrlPanel</a>. | Theme by <a href="https://2icecube.de/cpgg">2IceCube</a>
@if (!str_contains(config('BRANCHNAME'), 'main') && !str_contains(config('BRANCHNAME'), 'unknown'))
Version <b>{{ config('app')['version'] }} - {{ config('BRANCHNAME') }}</b>
@endif
{{-- Show imprint and privacy link --}}
<div class="float-right d-none d-sm-inline-block">
@if (config('SETTINGS::SYSTEM:SHOW_IMPRINT') == "true")
<a target="_blank" href="{{ route('imprint') }}"><strong>{{ __('Imprint') }}</strong></a> |
@endif
@if (config('SETTINGS::SYSTEM:SHOW_PRIVACY') == "true")
<a target="_blank" href="{{ route('privacy') }}"><strong>{{ __('Privacy') }}</strong></a>
@endif
@if (config('SETTINGS::SYSTEM:SHOW_TOS') == "true")
| <a target="_blank" href="{{ route('tos') }}"><strong>{{ __('Terms of Service') }}</strong></a>
@endif
</div>
</footer>
<!-- Control Sidebar -->
<aside class="control-sidebar control-sidebar-dark">
<!-- Control sidebar content goes here -->
</aside>
<!-- /.control-sidebar -->
</div>
<!-- ./wrapper -->
<!-- Scripts -->
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@10.14.1/dist/sweetalert2.all.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/v/bs4/dt-1.10.24/datatables.min.js"></script>
<!-- Summernote -->
<script src="{{ asset('plugins/summernote/summernote-bs4.min.js') }}"></script>
<!-- select2 -->
<script src="{{ asset('plugins/select2/js/select2.min.js') }}"></script>
<!-- Moment.js -->
<script src="{{ asset('plugins/moment/moment.min.js') }}"></script>
<!-- Datetimepicker -->
<script src="{{ asset('plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js') }}"></script>
<!-- Select2 -->
<script src={{ asset('plugins/select2/js/select2.min.js') }}></script>
<script>
$(document).ready(function() {
$('[data-toggle="popover"]').popover();
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
});
</script>
<script>
@if (Session::has('error'))
Swal.fire({
icon: 'error',
title: 'Oops...',
html: '{{ Session::get('error') }}',
})
@endif
@if (Session::has('success'))
Swal.fire({
icon: 'success',
title: '{{ Session::get('success') }}',
position: 'top-end',
showConfirmButton: false,
background: '#343a40',
toast: true,
timer: 3000,
timerProgressBar: true,
didOpen: (toast) => {
toast.addEventListener('mouseenter', Swal.stopTimer)
toast.addEventListener('mouseleave', Swal.resumeTimer)
}
})
@endif
@if (Session::has('info'))
Swal.fire({
icon: 'info',
title: '{{ Session::get('info') }}',
position: 'top-end',
showConfirmButton: false,
background: '#343a40',
toast: true,
timer: 3000,
timerProgressBar: true,
didOpen: (toast) => {
toast.addEventListener('mouseenter', Swal.stopTimer)
toast.addEventListener('mouseleave', Swal.resumeTimer)
}
})
@endif
</script>
</body>
</html>

View file

@ -33,7 +33,7 @@
@else
<div class="callout callout-danger">
<h4>{{ __('No recent activity from cronjobs')}}</h4>
<p>{{ __('Are cronjobs running?')}} <a class="text-primary" target="_blank" href="https://controlpanel.gg/docs/Installation/getting-started#crontab-configuration">{{ __('Check the docs for it here')}}</a></p>
<p>{{ __('Are cronjobs running?')}} <a class="text-primary" target="_blank" href="https://ctrlpanel.gg/docs/Installation/getting-started#crontab-configuration">{{ __('Check the docs for it here')}}</a></p>
</div>
@endif

View file

@ -0,0 +1,113 @@
@extends('layouts.main')
@section('content')
<!-- CONTENT HEADER -->
<section class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1>{{__('Legal')}}</h1>
</div>
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item"><a href="{{route('home')}}">{{__('Dashboard')}}</a></li>
<li class="breadcrumb-item"><a class="text-muted"
href="{{route('admin.legal.index')}}">{{__('Legal')}}</a></li>
</ol>
</div>
</div>
</div>
</section>
<!-- END CONTENT HEADER -->
<!-- MAIN CONTENT -->
<section class="content">
<div class="container-fluid">
<form method="POST" enctype="multipart/form-data" class="mb-3"
action="{{ route('admin.legal.update') }}">
@csrf
@method('PATCH')
<div class="row">
<div class="col-md-6">
{{-- TOS --}}
<div class="row mb-2">
<div class="col text-center">
<h1>{{__("Terms of Service")}}</h1>
</div>
</div>
<div class="custom-control mb-3 p-0">
<textarea x-model="tos" id="tos" name="tos"
class="form-control @error('tos') is-invalid @enderror">
{{ $tos }}
</textarea>
@error('motd-message')
<div class="text-danger">
{{ $message }}
</div>
@enderror
</div>
</div>
<div class="col-md-6">
{{-- PRIVACY --}}
<div class="row mb-2">
<div class="col text-center">
<h1>{{__("Privacy Policy")}}</h1>
</div>
</div>
<div class="custom-control mb-3 p-0">
<textarea x-model="privacy" id="privacy" name="privacy"
class="form-control @error('privacy') is-invalid @enderror">
{{ $privacy }}
</textarea>
@error('privacy')
<div class="text-danger">
{{ $message }}
</div>
@enderror
</div>
</div>
<div class="col-md-6">
{{-- Imprint --}}
<div class="row mb-2">
<div class="col text-center">
<h1>{{__("Imprint")}}</h1>
</div>
</div>
<div class="custom-control mb-3 p-0">
<textarea x-model="imprint" id="imprint" name="imprint"
class="form-control @error('imprint') is-invalid @enderror">
{{ $imprint }}
</textarea>
@error('imprint')
<div class="text-danger">
{{ $message }}
</div>
@enderror
</div>
</div>
</div>
<div class="row">
<button class="btn btn-primary ml-3 mt-3">{{ __('Save') }}</button>
</div>
</form>
</div>
<!-- END CUSTOM CONTENT -->
</section>
<!-- END CONTENT -->
<script>tinymce.init({selector:'textarea',promotion: false,skin: "oxide-dark",
content_css: "dark",branding: false, height: 500,
plugins: ['image','link'],});
</script>
@endsection

View file

@ -23,7 +23,7 @@
<b><i class="fas fa-shield-alt"></i> {{__("Version Outdated:")}}</b></br>
{{__("You are running on")}} v{{config("app.version")}}-{{config("BRANCHNAME")}}.
{{__("The latest Version is")}} v{{Storage::get('latestVersion')}}</br>
<a href="https://controlpanel.gg/docs/Installation/updating">{{__("Consider updating now")}}</a>
<a href="https://ctrlpanel.gg/docs/Installation/updating">{{__("Consider updating now")}}</a>
</div>
@endif
</section>
@ -39,16 +39,16 @@
class="fab fa-discord mr-2"></i> {{__('Support server')}}</a>
</div>
<div class="col-md-3">
<a href="https://controlpanel.gg/docs/intro" class="btn btn-dark btn-block px-3"><i
<a href="https://ctrlpanel.gg/docs/intro" class="btn btn-dark btn-block px-3"><i
class="fas fa-link mr-2"></i> {{__('Documentation')}}</a>
</div>
<div class="col-md-3">
<a href="https://github.com/ControlPanel-gg/dashboard" class="btn btn-dark btn-block px-3"><i
<a href="https://github.com/CtrlPanel-gg/panel" class="btn btn-dark btn-block px-3"><i
class="fab fa-github mr-2"></i> {{__('Github')}}</a>
</div>
<div class="col-md-3">
<a href="https://controlpanel.gg/docs/Contributing/donating" class="btn btn-dark btn-block px-3"><i
class="fas fa-money-bill mr-2"></i> {{__('Support ControlPanel')}}</a>
<a href="https://ctrlpanel.gg/docs/Contributing/donating" class="btn btn-dark btn-block px-3"><i
class="fas fa-money-bill mr-2"></i> {{__('Support CtrlPanel')}}</a>
</div>
</div>
@ -199,7 +199,7 @@
<div class="card-header">
<div class="d-flex justify-content-between">
<div class="card-title ">
<span><i class="fas fa-server mr-2"></i>{{__('Controlpanel.gg')}}</span>
<span><i class="fas fa-server mr-2"></i>{{__('Ctrlpanel.gg')}}</span>
</div>
</div>
<div class="card-body py-1">
@ -227,7 +227,7 @@
<p class="mb-2">
{{ __('You reached the Pterodactyl perPage limit. Please make sure to set it higher than your server count.') }}<br>
{{ __('You can do that in settings.') }}<br><br>
{{ __('Note') }}: {{ __('If this error persists even after changing the limit, it might mean a server was deleted on Pterodactyl, but not on ControlPanel. Try clicking the button below.') }}
{{ __('Note') }}: {{ __('If this error persists even after changing the limit, it might mean a server was deleted on Pterodactyl, but not on CtrlPanel. Try clicking the button below.') }}
</p>
<a href="{{route('admin.servers.sync')}}" class="btn btn-primary btn-md"><i
class="fas fa-sync mr-2"></i>{{__('Sync servers')}}</a>

View file

@ -6,12 +6,12 @@
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1>{{__('Vouchers')}}</h1>
<h1>{{__('Partner')}}</h1>
</div>
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item"><a href="{{route('home')}}">{{__('Dashboard')}}</a></li>
<li class="breadcrumb-item"><a href="{{route('admin.partners.index')}}">{{__('Vouchers')}}</a>
<li class="breadcrumb-item"><a href="{{route('admin.partners.index')}}">{{__('Partner')}}</a>
</li>
<li class="breadcrumb-item"><a class="text-muted"
href="{{route('admin.partners.create')}}">{{__('Create')}}</a>
@ -40,19 +40,14 @@
@csrf
<div class="form-group">
<label for="user_id">{{__('User')}}</label>
<select id="user_id" style="width:100%"
class="custom-select @error('user') is-invalid @enderror" name="user_id" autocomplete="off">
@foreach($users as $user)
<option @if($partners->contains('user_id' , $user->id)) disabled @endif
value="{{$user->id}}">{{$user->name}} ({{$user->email}})</option>
@endforeach
</select>
@error('user')
<div class="text-danger">
{{$message}}
<div class="custom-control mb-3 p-0">
<label for="user_id">{{ __('User') }}:
</label>
<select id="user_id" style="width:100%" class="custom-select" name="user_id" required
autocomplete="off" @error('user_id') is-invalid @enderror>
</select>
</div>
@enderror
</div>
<div class="form-group">
@ -143,5 +138,75 @@
})
</script>
<script type="application/javascript">
function initUserIdSelect(data) {
function escapeHtml(str) {
var div = document.createElement('div');
div.appendChild(document.createTextNode(str));
return div.innerHTML;
}
@endsection
$('#user_id').select2({
ajax: {
url: '/admin/users.json',
dataType: 'json',
delay: 250,
data: function (params) {
return {
filter: { name: params.term },
page: params.page,
};
},
processResults: function (data, params) {
return { results: data };
},
cache: true,
},
data: data,
escapeMarkup: function (markup) { return markup; },
minimumInputLength: 2,
templateResult: function (data) {
if (data.loading) return escapeHtml(data.text);
return '<div class="user-block"> \
<img class="img-circle img-bordered-xs" src="' + escapeHtml(data.avatarUrl) + '?s=120" alt="User Image"> \
<span class="username"> \
<a href="#">' + escapeHtml(data.name) +'</a> \
</span> \
<span class="description"><strong>' + escapeHtml(data.email) + '</strong>' + '</span> \
</div>';
},
templateSelection: function (data) {
return '<div> \
<span> \
<img class="img-rounded img-bordered-xs" src="' + escapeHtml(data.avatarUrl) + '?s=120" style="height:28px;margin-top:-4px;" alt="User Image"> \
</span> \
<span style="padding-left:5px;"> \
' + escapeHtml(data.name) + ' (<strong>' + escapeHtml(data.email) + '</strong>) \
</span> \
</div>';
}
});
}
$(document).ready(function() {
@if (old('user_id'))
$.ajax({
url: '/admin/users.json?user_id={{ old('user_id') }}',
dataType: 'json',
}).then(function (data) {
initUserIdSelect([ data ]);
});
@else
initUserIdSelect();
@endif
});
</script>
@endsection

View file

@ -43,7 +43,7 @@
<div class="form-group">
<label for="identifier">{{ __('Server identifier') }}
<i data-toggle="popover" data-trigger="hover"
data-content="{{ __('Change the server identifier on controlpanel to match a pterodactyl server.') }}"
data-content="{{ __('Change the server identifier on ctrlpanel to match a pterodactyl server.') }}"
class="fas fa-info-circle"></i>
</label>
<input value="{{ $server->identifier }}" id="identifier" name="identifier"
@ -59,7 +59,7 @@
<div class="form-group">
<label for="user_id">{{ __('Server owner') }}
<i data-toggle="popover" data-trigger="hover"
data-content="{{ __('Change the current server owner on controlpanel and pterodactyl.') }}"
data-content="{{ __('Change the current server owner on ctrlpanel and pterodactyl.') }}"
class="fas fa-info-circle"></i>
</label>
<select name="user_id" id="user_id" class="form-control">

View file

@ -1,15 +1,15 @@
<table id="datatable" class="table table-striped">
<thead>
<tr>
<th width="20"></th>
<th>{{__('Name')}}</th>
<th>{{__('User')}}</th>
<th>{{__('Server id')}}</th>
<th>{{__('Config')}}</th>
<th>{{__('Suspended at')}}</th>
<th>{{__('Created at')}}</th>
<th></th>
</tr>
<tr>
<th width="20"></th>
<th>{{ __('Name') }}</th>
<th>{{ __('User') }}</th>
<th>{{ __('Server id') }}</th>
<th>{{ __('Config') }}</th>
<th>{{ __('Suspended at') }}</th>
<th>{{ __('Created at') }}</th>
<th></th>
</tr>
</thead>
<tbody>
</tbody>
@ -17,30 +17,53 @@
<script>
function submitResult() {
return confirm("{{__('Are you sure you wish to delete?')}}") !== false;
return confirm("{{ __('Are you sure you wish to delete?') }}") !== false;
}
document.addEventListener("DOMContentLoaded", function () {
document.addEventListener("DOMContentLoaded", function() {
$('#datatable').DataTable({
language: {
url: '//cdn.datatables.net/plug-ins/1.11.3/i18n/{{config("SETTINGS::LOCALE:DATATABLES")}}.json'
url: '//cdn.datatables.net/plug-ins/1.11.3/i18n/{{ config('SETTINGS::LOCALE:DATATABLES') }}.json'
},
processing: true,
serverSide: true,
stateSave: true,
ajax: "{{route('admin.servers.datatable')}}{{$filter ?? ''}}",
order: [[ 5, "desc" ]],
columns: [
{data: 'status' , name : 'servers.suspended'},
{data: 'name'},
{data: 'user' , name : 'user.name'},
{data: 'identifier'},
{data: 'resources' , name : 'product.name'},
{data: 'suspended'},
{data: 'created_at'},
{data: 'actions' , sortable : false},
ajax: "{{ route('admin.servers.datatable') }}{{ $filter ?? '' }}",
order: [
[6, "desc"]
],
fnDrawCallback: function( oSettings ) {
columns: [{
data: 'status',
name: 'servers.suspended',
sortable: false
},
{
data: 'name'
},
{
data: 'user',
name: 'user.name',
},
{
data: 'identifier'
},
{
data: 'resources',
name: 'product.name',
sortable: false
},
{
data: 'suspended'
},
{
data: 'created_at'
},
{
data: 'actions',
sortable: false
},
],
fnDrawCallback: function(oSettings) {
$('[data-toggle="popover"]').popover();
}
});

View file

@ -20,11 +20,9 @@
<input value="true" id="show-tos" name="show-tos"
{{ config('SETTINGS::SYSTEM:SHOW_TOS') == 'true' ? 'checked' : '' }}
type="checkbox">
<label for="show-tos">{{ __('Show Terms of Service') }} </label>
<label for="show-tos">{{ __('Show Terms of Service') }} <small><a href="/admin/legal">({{ __('edit content') }})</a></small> </label>
</div>
<i data-toggle="popover" data-trigger="hover" data-html="true"
data-content="{{ __('Show the TOS link in the footer of every page. <br> Edit the content in <b>'.Qirolab\Theme\Theme::path($path = "views").'/information/tos-content.blade.php</b>') }}"
class="fas fa-info-circle"></i>
</div>
</div>
<div class="custom-control mb-1 p-0">
@ -33,11 +31,9 @@
<input value="true" id="show-imprint" name="show-imprint"
{{ config('SETTINGS::SYSTEM:SHOW_IMPRINT') == 'true' ? 'checked' : '' }}
type="checkbox">
<label for="show-imprint">{{ __('Show Imprint') }} </label>
<label for="show-imprint">{{ __('Show Imprint') }} <small><a href="/admin/legal">({{ __('edit content') }})</a></small> </label>
</div>
<i data-toggle="popover" data-trigger="hover" data-html="true"
data-content="{{ __('Show the imprint link in the footer of every page. <br> Edit the content in <b>'.Qirolab\Theme\Theme::path($path = "views").'/resources/views/information/imprint-content.blade.php</b>') }}"
class="fas fa-info-circle"></i>
</div>
</div>
<div class="custom-control mb-1 p-0">
@ -46,11 +42,9 @@
<input value="true" id="show-privacy" name="show-privacy"
{{ config('SETTINGS::SYSTEM:SHOW_PRIVACY') == 'true' ? 'checked' : '' }}
type="checkbox">
<label for="show-privacy">{{ __('Show Privacy Policy') }} </label>
<label for="show-privacy">{{ __('Show Privacy Policy') }} <small><a href="/admin/legal">({{ __('edit content') }})</a></small> </label>
</div>
<i data-toggle="popover" data-trigger="hover" data-html="true"
data-content="{{ __('Show the privacy policy link in the footer of every page. <br> Edit the content in <b>'.Qirolab\Theme\Theme::path($path = "views").'/resources/views/information/privacy-content.blade.php</b>') }}"
class="fas fa-info-circle"></i>
</div>
</div>
<div class="custom-control mb-1 p-0">
@ -184,7 +178,7 @@
type="checkbox">
<label for="enable-disable-new-users">{{ __('Creation of new users') }} </label>
<i data-toggle="popover" data-trigger="hover" data-html="true" class="fas fa-info-circle"
data-content="{{ __('If unchecked, it will disable the registration of new users in the system, and this will also apply to the API.') }}">
data-content="{{ __('Enable the registration of new users on the system.') }}">
</i>
</div>
@ -271,7 +265,7 @@
<label for="enable-disable-servers">{{ __('Creation of new servers') }} </label>
</div>
<i data-toggle="popover" data-trigger="hover" data-html="true"
data-content="{{ __('If unchecked, it will disable the creation of new servers for regular users and system moderators, this has no effect for administrators.') }}"
data-content="{{ __('Enables the creation of new servers for regular users.') }}"
class="fas fa-info-circle"></i>
</div>
</div>
@ -481,7 +475,7 @@
</div>
</form>
</div>
<script>tinymce.init({selector:'textarea',skin: "oxide-dark",
<script>tinymce.init({selector:'textarea',promotion: false,skin: "oxide-dark",
content_css: "dark",branding: false, height: 500,
plugins: ['image','link'],});
</script>

View file

@ -102,10 +102,12 @@
data: 'price'
},
{
data: 'display'
data: 'display',
sortable: false
},
{
data: 'description'
data: 'description',
sortable: false
},
{
data: 'created_at'
@ -121,7 +123,4 @@
});
});
</script>
@endsection

View file

@ -94,6 +94,23 @@
@enderror
</div>
<div class="form-group">
<label for="position">{{__('Position')}}</label>
<select id="position" style="width:100%" class="custom-select" name="position[]"
required multiple autocomplete="off" @error('position') is-invalid @enderror>
@foreach ($positions as $position)
<option id="{{$position->value}}" value="{{ $position->value }}">
{{ __($position->value) }}
</option>
@endforeach
</select>
@error('position')
<div class="text-danger">
{{$message}}
</div>
@enderror
</div>
<div class="form-group text-right">
<button type="submit" class="btn btn-primary">
@ -111,6 +128,7 @@
<!-- END CONTENT -->
<script>
document.addEventListener('DOMContentLoaded', (event) => {
$('.custom-select').select2();
// Summernote
$('#description').summernote({
height: 100,
@ -127,6 +145,8 @@
]
})
})
</script>
@endsection

View file

@ -95,6 +95,23 @@
@enderror
</div>
<div class="form-group">
<label for="position">{{__('Position')}}</label>
<select id="position" style="width:100%" class="custom-select" name="position[]"
required multiple autocomplete="off" @error('position') is-invalid @enderror>
@foreach ($positions as $position)
<option id="{{$position->value}}" value="{{ $position->value }}" @if (strpos($link->position, $position->value) !== false) selected @endif>
{{ __($position->value) }}
</option>
@endforeach
</select>
@error('position')
<div class="text-danger">
{{$message}}
</div>
@enderror
</div>
<div class="form-group text-right">
<button type="submit" class="btn btn-primary">
@ -113,6 +130,7 @@
<script>
document.addEventListener('DOMContentLoaded', (event) => {
$('.custom-select').select2();
// Summernote
$('#description').summernote({
height: 100,

View file

@ -41,6 +41,7 @@
<th width="50">{{__('Icon')}}</th>
<th>{{__('Title')}}</th>
<th>{{__('Link')}}</th>
<th>{{__('Position')}}</th>
<th>{{__('Created at')}}</th>
<th></th>
</tr>
@ -79,6 +80,7 @@
{data: 'icon'},
{data: 'title'},
{data: 'link'},
{data: 'position'},
{data: 'created_at'},
{data: 'actions', sortable: false},
],

View file

@ -6,12 +6,13 @@
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1>{{__('Users')}}</h1>
<h1>{{ __('Users') }}</h1>
</div>
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item"><a href="{{route('home')}}">{{__('Dashboard')}}</a></li>
<li class="breadcrumb-item"><a class="text-muted" href="{{route('admin.users.index')}}">{{__('Users')}}</a></li>
<li class="breadcrumb-item"><a href="{{ route('home') }}">{{ __('Dashboard') }}</a></li>
<li class="breadcrumb-item"><a class="text-muted"
href="{{ route('admin.users.index') }}">{{ __('Users') }}</a></li>
</ol>
</div>
</div>
@ -27,9 +28,9 @@
<div class="card-header">
<div class="d-flex justify-content-between">
<h5 class="card-title"><i class="fas fa-users mr-2"></i>{{__('Users')}}</h5>
<a href="{{route('admin.users.notifications')}}" class="btn btn-sm btn-primary"><i
class="fas fa-paper-plane mr-1"></i>{{__('Notify')}}</a>
<h5 class="card-title"><i class="fas fa-users mr-2"></i>{{ __('Users') }}</h5>
<a href="{{ route('admin.users.notifications') }}" class="btn btn-sm btn-primary"><i
class="fas fa-paper-plane mr-1"></i>{{ __('Notify') }}</a>
</div>
</div>
@ -37,21 +38,21 @@
<table id="datatable" class="table table-striped">
<thead>
<tr>
<th>discordId</th>
<th>ip</th>
<th>pterodactyl_id</th>
<th>{{__('Avatar')}}</th>
<th>{{__('Name')}}</th>
<th>{{__('Role')}}</th>
<th>{{__('Email')}}</th>
<th>{{CREDITS_DISPLAY_NAME}}</th>
<th>{{__('Servers')}}</th>
<th>{{__("Referrals")}}</th>
<th>{{__('Verified')}}</th>
<th>{{__('Last seen')}}</th>
<th></th>
</tr>
<tr>
<th>discordId</th>
<th>ip</th>
<th>pterodactyl_id</th>
<th>{{ __('Avatar') }}</th>
<th>{{ __('Name') }}</th>
<th>{{ __('Role') }}</th>
<th>{{ __('Email') }}</th>
<th>{{ CREDITS_DISPLAY_NAME }}</th>
<th>{{ __('Servers') }}</th>
<th>{{ __('Referrals') }}</th>
<th>{{ __('Verified') }}</th>
<th>{{ __('Last seen') }}</th>
<th></th>
</tr>
</thead>
<tbody>
</tbody>
@ -68,41 +69,76 @@
<script>
function submitResult() {
return confirm("{{__('Are you sure you wish to delete?')}}") !== false;
return confirm("{{ __('Are you sure you wish to delete?') }}") !== false;
}
document.addEventListener("DOMContentLoaded", function () {
document.addEventListener("DOMContentLoaded", function() {
$('#datatable').DataTable({
language: {
url: '//cdn.datatables.net/plug-ins/1.11.3/i18n/{{config("SETTINGS::LOCALE:DATATABLES")}}.json'
url: '//cdn.datatables.net/plug-ins/1.11.3/i18n/{{ config('SETTINGS::LOCALE:DATATABLES') }}.json'
},
processing: true,
serverSide: true, //why was this set to false before? increased loadingtimes by 10 seconds
stateSave: true,
ajax: "{{route('admin.users.datatable')}}",
order: [[ 11, "asc" ]],
columns: [
{data: 'discordId', visible: false, name: 'discordUser.id'},
{data: 'pterodactyl_id', visible: false},
{data: 'ip', visible: false},
{data: 'avatar' , sortable : false},
{data: 'name'},
{data: 'role'},
{data: 'email', name: 'users.email'},
{data: 'credits' , name : 'users.credits'},
{data: 'servers'},
{data: 'referrals'},
{data: 'verified' , sortable : false},
{data: 'last_seen', type: 'num', render: {_: 'display', sort: 'raw'}},
{data: 'actions' , sortable : false},
ajax: "{{ route('admin.users.datatable') }}{{ $filter ?? '' }}",
order: [
[11, "desc"]
],
fnDrawCallback: function( oSettings ) {
columns: [{
data: 'discordId',
visible: false,
name: 'discordUser.id'
},
{
data: 'pterodactyl_id',
visible: false
},
{
data: 'ip',
visible: false
},
{
data: 'avatar',
sortable: false
},
{
data: 'name'
},
{
data: 'role'
},
{
data: 'email',
name: 'users.email'
},
{
data: 'credits',
name: 'users.credits'
},
{
data: 'servers_count',
searchable: false
},
{
data: 'referrals_count',
searchable: false
},
{
data: 'verified',
sortable: false
},
{
data: 'last_seen',
},
{
data: 'actions',
sortable: false
},
],
fnDrawCallback: function(oSettings) {
$('[data-toggle="popover"]').popover();
}
});
});
</script>
@endsection

View file

@ -11,7 +11,7 @@
class="mr-1">{{ config('app.name', 'Laravel') }}</b></a>
@if (config('SETTINGS::SYSTEM:ENABLE_LOGIN_LOGO'))
<img src="{{ \Illuminate\Support\Facades\Storage::disk('public')->exists('logo.png') ? asset('storage/logo.png') : asset('images/controlpanel_logo.png') }}"
alt="{{ config('app.name', 'Controlpanel.gg') }} Logo" style="opacity: .8;max-width:100%">
alt="{{ config('app.name', 'Ctrlpanel.gg') }} Logo" style="opacity: .8;max-width:100%">
@endif
</div>
<div class="card-body">

View file

@ -133,7 +133,7 @@
</div>
<!-- /.card-header -->
<div class="card-body">
@foreach ($useful_links as $useful_link)
@foreach ($useful_links_dashboard as $useful_link)
<div class="alert alert-dismissible">
<button type="button" class="close" data-dismiss="alert"
aria-hidden="true">×</button>

View file

@ -18,7 +18,7 @@
</li>
<li>
<p><strong>Company</strong> (referred to as either &quot;the Company&quot;, &quot;We&quot;, &quot;Us&quot; or
&quot;Our&quot; in this Agreement) refers to controlpanel.</p>
&quot;Our&quot; in this Agreement) refers to ctrlpanel.</p>
</li>
<li>
<p><strong>Cookies</strong> are small files that are placed on Your computer, mobile device or any other device
@ -49,8 +49,8 @@
Service or from the Service infrastructure itself (for example, the duration of a page visit).</p>
</li>
<li>
<p><strong>Website</strong> refers to controlpanel, accessible from <a href="controlpanel"
rel="external nofollow noopener" target="_blank">controlpanel</a></p>
<p><strong>Website</strong> refers to ctrlpanel, accessible from <a href="ctrlpanel"
rel="external nofollow noopener" target="_blank">ctrlpanel</a></p>
</li>
<li>
<p><strong>You</strong> means the individual accessing or using the Service, or the company, or other legal

View file

@ -16,24 +16,21 @@
href="{{ \Illuminate\Support\Facades\Storage::disk('public')->exists('favicon.ico') ? \Illuminate\Support\Facades\Storage::disk('public')->url('favicon.ico') : asset('favicon.ico') }}"
type="image/x-icon">
<!-- Scripts -->
<script src="{{ asset('js/app.js') }}" defer></script>
<!-- Fonts -->
<link rel="dns-prefetch" href="//fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet">
<link rel="stylesheet" href="{{ asset('css/app.css') }}">
<link rel="preload" href="{{ asset('plugins/fontawesome-free/css/all.min.css') }}" as="style"
onload="this.onload=null;this.rel='stylesheet'">
<link rel="stylesheet" href="{{ asset('css/app.css') }}">
<noscript>
<link rel="stylesheet" href="{{ asset('plugins/fontawesome-free/css/all.min.css') }}">
</noscript>
@if (config('SETTINGS::RECAPTCHA:ENABLED') == 'true')
{!! htmlScriptTagJsApi() !!}
@endif
@vite('themes/default/sass/app.scss')
</head>
@yield('content')

View file

@ -14,7 +14,7 @@
href="{{ \Illuminate\Support\Facades\Storage::disk('public')->exists('favicon.ico') ? asset('storage/favicon.ico') : asset('favicon.ico') }}"
type="image/x-icon">
<script defer src="https://unpkg.com/alpinejs@3.x.x/dist/cdn.min.js"></script>
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>
{{-- <link rel="stylesheet" href="{{asset('css/adminlte.min.css')}}"> --}}
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/bs4/dt-1.10.24/datatables.min.css" />
@ -22,8 +22,6 @@
{{-- summernote --}}
<link rel="stylesheet" href="{{ asset('plugins/summernote/summernote-bs4.min.css') }}">
{{-- datetimepicker --}}
<link rel="stylesheet"
href="{{ asset('plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css') }}">
@ -31,7 +29,6 @@
{{-- select2 --}}
<link rel="stylesheet" href="{{ asset('plugins/select2/css/select2.min.css') }}">
<link rel="stylesheet" href="{{ asset('css/app.css') }}">
<link rel="preload" href="{{ asset('plugins/fontawesome-free/css/all.min.css') }}" as="style"
onload="this.onload=null;this.rel='stylesheet'">
<noscript>
@ -40,6 +37,7 @@
<script src="{{ asset('js/app.js') }}"></script>
<!-- tinymce -->
<script src={{ asset('plugins/tinymce/js/tinymce/tinymce.min.js') }}></script>
@vite('themes/default/sass/app.scss')
</head>
<body class="sidebar-mini layout-fixed dark-mode" style="height: auto;">
@ -62,6 +60,7 @@
class="fab fa-discord mr-2"></i>{{ __('Discord') }}</a>
</li>
@endif
<!-- Language Selection -->
@if (config('SETTINGS::LOCALE:CLIENTS_CAN_CHANGE') == 'true')
<li class="nav-item dropdown">
@ -86,6 +85,12 @@
</li>
<!-- End Language Selection -->
@endif
@foreach($useful_links as $link)
<li class="nav-item d-none d-sm-inline-block">
<a href="{{ $link->link }}" class="nav-link" target="__blank"><i
class="{{$link->icon}}"></i> {{ $link->title }}</a>
</li>
@endforeach
</ul>
<!-- Right navbar links -->
@ -194,7 +199,7 @@
src="{{ \Illuminate\Support\Facades\Storage::disk('public')->exists('icon.png') ? asset('storage/icon.png') : asset('images/controlpanel_logo.png') }}"
alt="{{ config('app.name', 'Laravel') }} Logo" class="brand-image img-circle"
style="opacity: .8">
<span class="brand-text font-weight-light">{{ config('app.name', 'Controlpanel.gg') }}</span>
<span class="brand-text font-weight-light">{{ config('app.name', 'Ctrlpanel.gg') }}</span>
</a>
<!-- Sidebar -->
@ -374,6 +379,14 @@
</a>
</li>
<li class="nav-item">
<a href="{{ route('admin.legal.index') }}"
class="nav-link @if (Request::routeIs('admin.legal.*')) active @endif">
<i class="nav-icon fas fa-link"></i>
<p>{{ __('Legal Sites') }}</p>
</a>
</li>
<li class="nav-header">{{ __('Logs') }}</li>
<li class="nav-item">
@ -428,8 +441,8 @@
<strong>Copyright &copy; 2021-{{ date('Y') }} <a
href="{{ url('/') }}">{{ env('APP_NAME', 'Laravel') }}</a>.</strong>
All rights
reserved. Powered by <a href="https://controlpanel.gg">ControlPanel</a>.
@if (!str_contains(config('BRANCHNAME'), 'main'))
reserved. Powered by <a href="https://ctrlpanel.gg">CtrlPanel</a>.
@if (!str_contains(config('BRANCHNAME'), 'main') && !str_contains(config('BRANCHNAME'), 'unknown'))
Version <b>{{ config('app')['version'] }} - {{ config('BRANCHNAME') }}</b>
@endif

View file

@ -0,0 +1,132 @@
@extends('layouts.main')
@section('content')
<!-- CONTENT HEADER -->
<section class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1>{{ __('Ticket Categories') }}</h1>
</div>
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item"><a href="{{ route('home') }}">{{ __('Dashboard') }}</a></li>
<li class="breadcrumb-item"><a class="text-muted"
href="{{ route("moderator.ticket.category.index") }}">{{ __('Ticket Categories') }}</a>
</li>
</ol>
</div>
</div>
</div>
</section>
<!-- END CONTENT HEADER -->
<!-- MAIN CONTENT -->
<section class="content">
<div class="container-fluid">
<div class="row">
<div class="col-lg-8">
<div class="card">
<div class="card-header">
<div class="d-flex justify-content-between">
<h5 class="card-title"><i class="fas fas fa-users mr-2"></i>{{__('Categories')}}</h5>
</div>
</div>
<div class="card-body table-responsive">
<table id="datatable" class="table table-striped">
<thead>
<tr>
<th>{{__('ID')}}</th>
<th>{{__('Name')}}</th>
<th>{{__('Tickets')}}</th>
<th>{{__('Created At')}}</th>
<th>{{__('Actions')}}</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
<div class="col-lg-4">
<div class="card">
<div class="card-header">
<h5 class="card-title">{{__('Add Category')}}
</div>
<div class="card-body">
<form action="{{route("moderator.ticket.category.store")}}" method="POST" class="ticket-form">
@csrf
<div class="form-group ">
<label for="name" class="control-label">{{__("Name")}}</label>
<input id="name" type="text" class="form-control" name="name" required>
</div>
<button type="submit" class="btn btn-primary">
{{__('Submit')}}
</button>
</form>
</div>
</div>
<div class="card">
<div class="card-header">
<h5 class="card-title">{{__('Edit Category')}}
</div>
<div class="card-body">
<form action="{{route("moderator.ticket.category.update","1")}}" method="POST" class="ticket-form">
@csrf
@method('PATCH')
<select id="category" style="width:100%" class="custom-select" name="category"
required autocomplete="off" @error('category') is-invalid @enderror>
@foreach ($categories as $category)
<option value="{{ $category->id }}">{{ __($category->name) }}</option>
@endforeach
</select>
<div class="form-group ">
<label for="name" class="control-label">{{__("New Name")}}</label>
<input id="name" type="text" class="form-control" name="name" required>
</div>
<button type="submit" class="btn btn-primary">
{{__('Submit')}}
</button>
</form>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- END CONTENT -->
<script>
document.addEventListener("DOMContentLoaded", function () {
$('#datatable').DataTable({
language: {
url: '//cdn.datatables.net/plug-ins/1.11.3/i18n/{{config("SETTINGS::LOCALE:DATATABLES")}}.json'
},
processing: true,
serverSide: true,
stateSave: true,
ajax: "{{route('moderator.ticket.category.datatable')}}",
columns: [
{data: 'id'},
{data: 'name'},
{data: 'tickets'},
{data: 'created_at', sortable: false},
{data: 'actions', sortable: false},
],
fnDrawCallback: function( oSettings ) {
$('[data-toggle="popover"]').popover();
}
});
});
document.addEventListener('DOMContentLoaded', (event) => {
$('.custom-select').select2();
})
</script>
@endsection

View file

@ -30,8 +30,11 @@
<div class="d-flex justify-content-between">
<h5 class="card-title"><i class="fas fa-ticket-alt mr-2"></i>{{__('Ticket List')}}</h5>
</div>
<a href="{{route("moderator.ticket.category.index")}}"><button class="btn btn-primary float-right">+ {{__("Add Category")}}</button></a>
</div>
<div class="card-body table-responsive">
<table id="datatable" class="table table-striped">

View file

@ -35,29 +35,64 @@
<div class="card-body">
<div class="ticket-info">
@if(!empty($server))
<p><b>Server:</b> <a href="{{ config("SETTINGS::SYSTEM:PTERODACTYL:URL") . '/admin/servers/view/' . $server->pterodactyl_id }}" target="__blank">{{ $server->name }}</a></p>
<p><b>{{__("Server")}}:</b> <a href="{{ config("SETTINGS::SYSTEM:PTERODACTYL:URL") . '/admin/servers/view/' . $server->pterodactyl_id }}" target="__blank">{{ $server->name }}</a></p>
@endif
<p><b>Title:</b> {{ $ticket->title }}</p>
<p><b>Category:</b> {{ $ticketcategory->name }}</p>
<p>
@if ($ticket->status === 'Open')
<b>Status:</b> <span class="badge badge-success">Open</span>
@elseif ($ticket->status === 'Closed')
<b>Status:</b> <span class="badge badge-danger">Closed</span>
@elseif ($ticket->status === 'Answered')
<b>Status:</b> <span class="badge badge-info">Answered</span>
@elseif ($ticket->status === 'Client Reply')
<b>Status:</b> <span class="badge badge-warning">Client Reply</span>
@endif
<p><b>{{__("Title")}}:</b> {{ $ticket->title }}</p>
<p><b>{{__("Category")}}:</b> {{ $ticketcategory->name }}</p>
<p><b>{{__("Status")}}:</b>
@switch($ticket->status)
@case("Open")
<span class="badge badge-success">{{__("Open")}}</span>
@break
@case("Reopened")
<span class="badge badge-success">{{__("Reopened")}}</span>
@break
@case("Closed")
<span class="badge badge-danger">{{__("Closed")}}</span>
@break
@case("Answered")
<span class="badge badge-info">{{__("Answered")}}</span>
@break
@case("Client Reply")
<span class="badge badge-warning">{{__("Client Reply")}}</span>
@break
@endswitch
</p>
<p><b>Created on:</b> {{ $ticket->created_at->diffForHumans() }}</p>
@if($ticket->status!='Closed')
<form class="d-inline" method="post" action="{{route('moderator.ticket.close', ['ticket_id' => $ticket->ticket_id ])}}">
{{csrf_field()}}
{{method_field("POST") }}
<button data-content="{{__("Close")}}" data-toggle="popover" data-trigger="hover" data-placement="top" class="btn btn-sm text-white btn-warning mr-1"><i class="fas fa-times"></i>{{__("Close")}}</button>
</form>
@endif
<p><b>Priority:</b>
@switch($ticket->priority)
@case("Low")
<span class="badge badge-success">{{__("Low")}}</span>
@break
@case("Medium")
<span class="badge badge-warning">{{__("Medium")}}</span>
@break
@case("High")
<span class="badge badge-danger">{{__("High")}}</span>
@break
@endswitch
</p>
<p><b>{{__("Created on")}}:</b> {{ $ticket->created_at->diffForHumans() }}</p>
@if($ticket->status=='Closed')
<form class="d-inline" method="post"
action="{{route('moderator.ticket.changeStatus', ['ticket_id' => $ticket->ticket_id ])}}">
{{csrf_field()}}
{{method_field("POST") }}
<button data-content="{{__("Reopen")}}" data-toggle="popover"
data-trigger="hover" data-placement="top"
class="btn btn-sm text-white btn-success mr-1"><i
class="fas fa-redo"></i>{{__("Reopen")}}</button>
</form>
@else
<form class="d-inline" method="post"
action="{{route('moderator.ticket.changeStatus', ['ticket_id' => $ticket->ticket_id ])}}">
{{csrf_field()}}
{{method_field("POST") }}
<button data-content="{{__("Close")}}" data-toggle="popover"
data-trigger="hover" data-placement="top"
class="btn btn-sm text-white btn-warning mr-1"><i
class="fas fa-times"></i>{{__("Close")}}</button>
</form>
@endif
</div>
</div>
</div>

View file

@ -212,7 +212,7 @@
{{ __('Required') }} {{ CREDITS_DISPLAY_NAME }}
{{ __('to create this server') }}</span>
<span class="d-inline-block"
x-text="product.minimum_credits === -1 ? {{ config('SETTINGS::USER:MINIMUM_REQUIRED_CREDITS_TO_MAKE_SERVER') }} : product.minimum_credit"></span>
x-text="product.minimum_credits == -1 ? {{ config('SETTINGS::USER:MINIMUM_REQUIRED_CREDITS_TO_MAKE_SERVER') }} : product.minimum_credits"></span>
</li>
</ul>
</div>

View file

@ -77,21 +77,25 @@
<div class="row">
<!-- accepted payments column -->
<div class="col-6">
<p class="lead">{{ __('Payment Methods') }}:</p>
@if (!$productIsFree)
<p class="lead">{{ __('Payment Methods') }}:</p>
<div class="d-flex flex-wrap flex-direction-row">
@foreach ($paymentGateways as $gateway)
<div class="ml-2">
<label class="text-center" for="{{ $gateway->name }}">
<img class="mb-3" height="50" src="{{ $gateway->image }}"></br>
<input x-on:click="console.log(payment_method)" x-model="payment_method"
type="radio" id="{{ $gateway->name }}"
value="{{ $gateway->name }}">
</input>
</label>
</div>
@endforeach
</div>
<div class="d-flex flex-wrap flex-direction-row">
@foreach ($paymentGateways as $gateway)
<div class="ml-2">
<label class="text-center" for="{{ $gateway->name }}">
<img class="mb-3" height="50"
src="{{ $gateway->image }}"></br>
<input x-on:click="console.log(payment_method)"
x-model="payment_method" type="radio"
id="{{ $gateway->name }}" value="{{ $gateway->name }}">
</input>
</label>
</div>
@endforeach
</div>
@endif
</div>
<!-- /.col -->
@ -129,11 +133,15 @@
<!-- this row will not appear when printing -->
<div class="row no-print">
<div class="col-12">
<button :disabled="!payment_method || clicked"
:class="!payment_method || clicked ? 'disabled' : ''"
<button :disabled="(!payment_method || clicked) && {{ !$productIsFree }}"
:class="(!payment_method || clicked) && {{ !$productIsFree }} ? 'disabled' : ''"
class="btn btn-success float-right"><i class="far fa-credit-card mr-2"
@click="clicked = true"></i>
{{ __('Submit Payment') }}
@if ($productIsFree)
{{ __('Get for free') }}
@else
{{ __('Submit Payment') }}
@endif
</button>
</div>
</div>

View file

@ -46,14 +46,14 @@
</div>
@if ($servers->count() >= 1)
<div class="form-group col-sm-12 {{ $errors->has('server') ? ' has-error' : '' }}">
<label for="server" class="control-label">Servers</label>
<label for="server" class="control-label">{{__("Server")}}</label>
<select id="server" type="server" class="form-control" name="server">
<option value="">Select Servers</option>
<option value="">{{__("Select Servers")}}</option>
@foreach ($servers as $server)
<option value="{{ $server->id }}">{{ $server->name }}</option>
@endforeach
</select>
@if ($errors->has('category'))
<span class="help-block">
<strong>{{ $errors->first('ticketcategory') }}</strong>
@ -62,14 +62,14 @@
</div>
@endif
<div class="form-group col-sm-12 {{ $errors->has('ticketcategory') ? ' has-error' : '' }}">
<label for="ticketcategory" class="control-label">Category</label>
<select id="ticketcategory" type="ticketcategory" class="form-control" name="ticketcategory">
<option value="">Select Category</option>
<label for="ticketcategory" class="control-label">{{__("Category")}}</label>
<select id="ticketcategory" type="ticketcategory" class="form-control" required name="ticketcategory">
<option value="" disabled selected>{{__("Select Category")}}</option>
@foreach ($ticketcategories as $ticketcategory)
<option value="{{ $ticketcategory->id }}">{{ $ticketcategory->name }}</option>
@endforeach
</select>
@if ($errors->has('category'))
<span class="help-block">
<strong>{{ $errors->first('ticketcategory') }}</strong>
@ -79,10 +79,10 @@
<div class="form-group col-sm-12 {{ $errors->has('priority') ? ' has-error' : '' }}">
<label for="priority" class="control-label">Priority</label>
<select id="priority" type="" class="form-control" name="priority">
<option value="">Select Priority</option>
<option value="Low">Low</option>
<option value="Medium">Medium</option>
<option value="High">High</option>
<option value="" disabled selected>{{__("Select Priority")}}</option>
<option value="Low">{{__("Low")}}</option>
<option value="Medium">{{__("Medium")}}</option>
<option value="High">{{__("High")}}</option>
</select>
@if ($errors->has('priority'))
<span class="help-block">
@ -108,7 +108,7 @@
<div class="card-body">
<div class="form-group col-sm-12 {{ $errors->has('message') ? ' has-error' : '' }}">
<label for="message" class="control-label">Message</label>
<textarea rows="8" id="message" class="form-control" name="message"></textarea>
<textarea rows="8" id="message" class="form-control" name="message">{{old("message")}}</textarea>
@if ($errors->has('message'))
<span class="help-block">
<strong>{{ $errors->first('message') }}</strong>
@ -124,12 +124,12 @@
</section>
<!-- END CONTENT -->
<script type="text/javascript">
$(".ticket-form").submit(function (e) {
$(".ticket-once").attr("disabled", true);
$(".ticket-form").submit(function (e) {
$(".ticket-once").attr("disabled", true);
return true;
})
</script>
@endsection

View file

@ -86,12 +86,13 @@
serverSide: true,
stateSave: true,
ajax: "{{route('ticket.datatable')}}",
order: [[ 4, "desc" ]],
columns: [
{data: 'category'},
{data: 'title'},
{data: 'priority'},
{data: 'status'},
{data: 'updated_at', sortable: false},
{data: 'updated_at', type: 'num', render: {_: 'display', sort: 'raw'}},
{data: 'actions', sortable: false},
],
fnDrawCallback: function( oSettings ) {

View file

@ -35,25 +35,58 @@
<div class="card-body">
<div class="ticket-info">
@if(!empty($server))
<p><b>Server:</b> <a href="{{ config('SETTINGS::SYSTEM:PTERODACTYL:URL') }}/server/{{ $server->identifier }}" target="__blank">{{ $server->name }} </a></p>
<p><b>{{__("Server")}}:</b> <a
href="{{ config('SETTINGS::SYSTEM:PTERODACTYL:URL') }}/server/{{ $server->identifier }}"
target="__blank">{{ $server->name }} </a></p>
@endif
<p><b>Title:</b> {{ $ticket->title }}</p>
<p><b>Category:</b> {{ $ticketcategory->name }}</p>
<p>
@if ($ticket->status === 'Open')
<b>Status:</b> <span class="badge badge-success">Open</span>
@elseif ($ticket->status === 'Closed')
<b>Status:</b> <span class="badge badge-danger">Closed</span>
@elseif ($ticket->status === 'Answered')
<b>Status:</b> <span class="badge badge-info">Answered</span>
@elseif ($ticket->status === 'Client Reply')
<b>Status:</b> <span class="badge badge-warning">Client Reply</span>
@endif
<p><b>{{__("Title")}}:</b> {{ $ticket->title }}</p>
<p><b>{{__("Category")}}:</b> {{ $ticketcategory->name }}</p>
<p><b>{{__("Status")}}:</b>
@switch($ticket->status)
@case("Open")
<span class="badge badge-success">{{__("Open")}}</span>
@break
@case("Reopened")
<span class="badge badge-success">{{__("Reopened")}}</span>
@break
@case("Closed")
<span class="badge badge-danger">{{__("Closed")}}</span>
@break
@case("Answered")
<span class="badge badge-info">{{__("Answered")}}</span>
@break
@case("Client Reply")
<span class="badge badge-warning">{{__("Client Reply")}}</span>
@break
@endswitch
</p>
<p><b>Created on:</b> {{ $ticket->created_at->diffForHumans() }}</p>
@if($ticket->status!='Closed')
<p><b>Priority:</b>
@switch($ticket->priority)
@case("Low")
<span class="badge badge-success">{{__("Low")}}</span>
@break
@case("Medium")
<span class="badge badge-warning">{{__("Medium")}}</span>
@break
@case("High")
<span class="badge badge-danger">{{__("High")}}</span>
@break
@endswitch
</p>
<p><b>{{__("Created on")}}:</b> {{ $ticket->created_at->diffForHumans() }}</p>
@if($ticket->status=='Closed')
<form class="d-inline" method="post"
action="{{route('ticket.close', ['ticket_id' => $ticket->ticket_id ])}}">
action="{{route('ticket.changeStatus', ['ticket_id' => $ticket->ticket_id ])}}">
{{csrf_field()}}
{{method_field("POST") }}
<button data-content="{{__("Reopen")}}" data-toggle="popover"
data-trigger="hover" data-placement="top"
class="btn btn-sm text-white btn-success mr-1"><i
class="fas fa-redo"></i>{{__("Reopen")}}</button>
</form>
@else
<form class="d-inline" method="post"
action="{{route('ticket.changeStatus', ['ticket_id' => $ticket->ticket_id ])}}">
{{csrf_field()}}
{{method_field("POST") }}
<button data-content="{{__("Close")}}" data-toggle="popover"
@ -78,56 +111,60 @@
<div class="card-header">
<div class="d-flex justify-content-between">
<h5 class="card-title"><img
src="https://www.gravatar.com/avatar/{{ md5(strtolower($ticket->user->email)) }}?s=25"
class="user-image" alt="User Image">
<a href="/admin/users/{{$ticket->user->id}}">{{ $ticket->user->name }} </a>
@if($ticket->user->role === "member")
<span class="badge badge-secondary"> Member </span>
@elseif ($ticket->user->role === "client")
<span class="badge badge-success"> Client </span>
@elseif ($ticket->user->role === "moderator")
<span class="badge badge-info"> Moderator </span>
@elseif ($ticket->user->role === "admin")
<span class="badge badge-danger"> Admin </span>
@endif
src="https://www.gravatar.com/avatar/{{ md5(strtolower($ticket->user->email)) }}?s=25"
class="user-image" alt="User Image">
<a href="/admin/users/{{$ticket->user->id}}">{{ $ticket->user->name }} </a>
@if($ticket->user->role === "member")
<span class="badge badge-secondary"> Member </span>
@elseif ($ticket->user->role === "client")
<span class="badge badge-success"> Client </span>
@elseif ($ticket->user->role === "moderator")
<span class="badge badge-info"> Moderator </span>
@elseif ($ticket->user->role === "admin")
<span class="badge badge-danger"> Admin </span>
@endif
</h5>
<span class="badge badge-primary">{{ $ticket->created_at->diffForHumans() }}</span>
<span
class="badge badge-primary">{{ $ticket->created_at->diffForHumans() }}</span>
</div>
</div>
<div class="card-body" style="white-space:pre-wrap">{{ $ticket->message }}</div>
</div>
@foreach ($ticketcomments as $ticketcomment)
<div class="card">
<div class="card-header">
<div class="d-flex justify-content-between">
<h5 class="card-title"><img
src="https://www.gravatar.com/avatar/{{ md5(strtolower($ticketcomment->user->email)) }}?s=25"
class="user-image" alt="User Image">
<a href="/admin/users/{{$ticketcomment->user->id}}">{{ $ticketcomment->user->name }}</a>
@if($ticketcomment->user->role === "member")
<span class="badge badge-secondary"> Member </span>
@elseif ($ticketcomment->user->role === "client")
<span class="badge badge-success"> Client </span>
@elseif ($ticketcomment->user->role === "moderator")
<span class="badge badge-info"> Moderator </span>
@elseif ($ticketcomment->user->role === "admin")
<span class="badge badge-danger"> Admin </span>
@endif
</h5>
<span class="badge badge-primary">{{ $ticketcomment->created_at->diffForHumans() }}</span>
<div class="card">
<div class="card-header">
<div class="d-flex justify-content-between">
<h5 class="card-title"><img
src="https://www.gravatar.com/avatar/{{ md5(strtolower($ticketcomment->user->email)) }}?s=25"
class="user-image" alt="User Image">
<a href="/admin/users/{{$ticketcomment->user->id}}">{{ $ticketcomment->user->name }}</a>
@if($ticketcomment->user->role === "member")
<span class="badge badge-secondary"> Member </span>
@elseif ($ticketcomment->user->role === "client")
<span class="badge badge-success"> Client </span>
@elseif ($ticketcomment->user->role === "moderator")
<span class="badge badge-info"> Moderator </span>
@elseif ($ticketcomment->user->role === "admin")
<span class="badge badge-danger"> Admin </span>
@endif
</h5>
<span
class="badge badge-primary">{{ $ticketcomment->created_at->diffForHumans() }}</span>
</div>
</div>
<div class="card-body"
style="white-space:pre-wrap">{{ $ticketcomment->ticketcomment }}</div>
</div>
<div class="card-body" style="white-space:pre-wrap">{{ $ticketcomment->ticketcomment }}</div>
</div>
@endforeach
<div class="comment-form">
<form action="{{ route('ticket.reply')}}" method="POST" class="form reply-form">
{!! csrf_field() !!}
<input type="hidden" name="ticket_id" value="{{ $ticket->id }}">
<div class="form-group{{ $errors->has('ticketcomment') ? ' has-error' : '' }}">
<textarea rows="10" id="ticketcomment" class="form-control" name="ticketcomment"></textarea>
<textarea rows="10" id="ticketcomment" class="form-control"
name="ticketcomment"></textarea>
@if ($errors->has('ticketcomment'))
<span class="help-block">
<span class="help-block">
<strong>{{ $errors->first('ticketcomment') }}</strong>
</span>
@endif
@ -145,12 +182,12 @@
</section>
<!-- END CONTENT -->
<script type="text/javascript">
$(".reply-form").submit(function (e) {
$(".reply-once").attr("disabled", true);
$(".reply-form").submit(function (e) {
$(".reply-once").attr("disabled", true);
return true;
})
</script>
@endsection

View file

@ -11,7 +11,7 @@ export default defineConfig({
"themes/default/sass/app.scss",
"themes/default/js/app.js"
],
buildDirectory: "default",
buildDirectory: "build",
}),

16
webpack.mix.js vendored
View file

@ -1,16 +0,0 @@
const mix = require('laravel-mix');
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel application. By default, we are compiling the Sass
| file for the application as well as bundling up all the JS files.
|
*/
mix.js('resources/js/app.js', 'public/js')
.sass('resources/sass/app.scss', 'public/css')
.sourceMaps();