From c48e3fc92ede58d682a60ed4aa81ccbfc6168798 Mon Sep 17 00:00:00 2001 From: nolanwhy Date: Sat, 4 Feb 2023 22:52:07 +0100 Subject: [PATCH 01/11] Update config.php --- core/config.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/core/config.php b/core/config.php index 587f2bc..f0ebe3b 100644 --- a/core/config.php +++ b/core/config.php @@ -13,8 +13,17 @@ if(isset($_SERVER["HTTP_CF_CONNECTING_IP"])) { $_SERVER["REMOTE_ADDR"] = $_SERVER["HTTP_CF_CONNECTING_IP"]; } +// easier to edit shit +$sql = [ + "dbname" => "GruBlox", + "host" => "localhost", + "port" => 3306, + "user" => "root", + "pass" => "" +]; + try { - $con = new PDO("mysql:dbname=GruBlox;host=localhost", "root", ""); + $con = new PDO("mysql:dbname=".$sql["dbname"].";host=".$sql["host"].";port=".$sql["port"], $sql["user"], $sql["pass"]); $con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); } catch (PDOException $e) { echo "Connection failed: " . $e->getMessage(); From 1b0d1b34a4a686d717b9b174746bc98d2961f4a8 Mon Sep 17 00:00:00 2001 From: nolanwhy Date: Sat, 4 Feb 2023 22:52:54 +0100 Subject: [PATCH 02/11] s --- core/config.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/config.php b/core/config.php index f0ebe3b..658ac12 100644 --- a/core/config.php +++ b/core/config.php @@ -1,10 +1,8 @@ Date: Sat, 4 Feb 2023 22:54:03 +0100 Subject: [PATCH 03/11] Update config.php --- core/config.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/config.php b/core/config.php index 658ac12..fe256d2 100644 --- a/core/config.php +++ b/core/config.php @@ -4,14 +4,15 @@ $sitename = "Grublox"; $version = 1.0; $maintainers = array("Mario1", "qzip", "nolanwhy"); + $arraybackground = array('win7.png', 'win8.png', 'epic.png', 'yosemite.png', 'aurora.png', 'tiger.png', 'fish.png', 'baconbloxii.png'); + $youtubefunnies = array('bitqf13QU7Q', 'Z_V6yKKIk5U', '2tHl6O5Sp8w', '-5WcDfKndxU', 'cwyTleTL06Y','Rr8XkF5TBLU'); if(isset($_SERVER["HTTP_CF_CONNECTING_IP"])) { $_SERVER["REMOTE_ADDR"] = $_SERVER["HTTP_CF_CONNECTING_IP"]; } -// easier to edit shit $sql = [ "dbname" => "GruBlox", "host" => "localhost", @@ -24,5 +25,5 @@ try { $con = new PDO("mysql:dbname=".$sql["dbname"].";host=".$sql["host"].";port=".$sql["port"], $sql["user"], $sql["pass"]); $con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); } catch (PDOException $e) { - echo "Connection failed: " . $e->getMessage(); + die("Connection failed: " . $e->getMessage()); } From 8d423e4baa7de896d6c1b510b08869bb004a4453 Mon Sep 17 00:00:00 2001 From: nolanwhy Date: Sat, 4 Feb 2023 22:55:39 +0100 Subject: [PATCH 04/11] Update config.php --- core/config.php | 1 + 1 file changed, 1 insertion(+) diff --git a/core/config.php b/core/config.php index fe256d2..7a96552 100644 --- a/core/config.php +++ b/core/config.php @@ -24,6 +24,7 @@ $sql = [ try { $con = new PDO("mysql:dbname=".$sql["dbname"].";host=".$sql["host"].";port=".$sql["port"], $sql["user"], $sql["pass"]); $con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); + unset($sql); } catch (PDOException $e) { die("Connection failed: " . $e->getMessage()); } From e36437efb9042e3f7418e79041e106d3c42a5fc0 Mon Sep 17 00:00:00 2001 From: nolanwhy Date: Sat, 4 Feb 2023 22:56:20 +0100 Subject: [PATCH 05/11] Update config.php --- core/config.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/config.php b/core/config.php index 7a96552..22c99c8 100644 --- a/core/config.php +++ b/core/config.php @@ -21,6 +21,8 @@ $sql = [ "pass" => "" ]; +//fsd + try { $con = new PDO("mysql:dbname=".$sql["dbname"].";host=".$sql["host"].";port=".$sql["port"], $sql["user"], $sql["pass"]); $con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); From f351e92704360e2c5d31a5a1515e192116024a8b Mon Sep 17 00:00:00 2001 From: nolanwhy Date: Sat, 4 Feb 2023 22:56:34 +0100 Subject: [PATCH 06/11] Update config.php --- core/config.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/core/config.php b/core/config.php index 22c99c8..7a96552 100644 --- a/core/config.php +++ b/core/config.php @@ -21,8 +21,6 @@ $sql = [ "pass" => "" ]; -//fsd - try { $con = new PDO("mysql:dbname=".$sql["dbname"].";host=".$sql["host"].";port=".$sql["port"], $sql["user"], $sql["pass"]); $con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); From 5d6ec8d9a181120fd6e81692307bbac02e1fe8f1 Mon Sep 17 00:00:00 2001 From: nolanwhy Date: Sat, 4 Feb 2023 22:59:15 +0100 Subject: [PATCH 07/11] Update grublox.sql --- grublox.sql | 52 +++++++++++++++++++++++++++++++++++----------------- 1 file changed, 35 insertions(+), 17 deletions(-) diff --git a/grublox.sql b/grublox.sql index 8380b1a..2eb3bd9 100644 --- a/grublox.sql +++ b/grublox.sql @@ -1,28 +1,38 @@ +-- nolanwhy -- phpMyAdmin SQL Dump -- version 5.2.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 --- Generation Time: Jan 24, 2023 at 08:45 PM --- Server version: 10.4.24-MariaDB --- PHP Version: 7.4.29 +-- Generation Time: Feb 04, 2023 at 10:58 PM +-- Server version: 10.4.27-MariaDB +-- PHP Version: 8.0.25 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8mb4 */; - -- -- Database: `grublox` -- -- -------------------------------------------------------- +-- +-- Table structure for table `games` +-- + +CREATE TABLE `games` ( + `id` int(11) NOT NULL, + `name` varchar(50) NOT NULL, + `description` varchar(255) NOT NULL, + `creator` int(11) NOT NULL, + `date` datetime NOT NULL DEFAULT current_timestamp(), + `updateddate` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; + +-- -------------------------------------------------------- + -- -- Table structure for table `users` -- @@ -30,17 +40,23 @@ SET time_zone = "+00:00"; CREATE TABLE `users` ( `id` int(11) NOT NULL, `username` varchar(20) NOT NULL, - `password` varchar(500) NOT NULL, + `password` varchar(450) NOT NULL, `date` datetime NOT NULL DEFAULT current_timestamp(), `token` varchar(25) DEFAULT NULL COMMENT 'Token for joining. Useful to secure joining to prevent unauthorized users to use other names.', `description` varchar(250) DEFAULT NULL, `money` int(11) NOT NULL DEFAULT 0 -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -- -- Indexes for dumped tables -- +-- +-- Indexes for table `games` +-- +ALTER TABLE `games` + ADD PRIMARY KEY (`id`); + -- -- Indexes for table `users` -- @@ -51,13 +67,15 @@ ALTER TABLE `users` -- AUTO_INCREMENT for dumped tables -- +-- +-- AUTO_INCREMENT for table `games` +-- +ALTER TABLE `games` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; + -- -- AUTO_INCREMENT for table `users` -- ALTER TABLE `users` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -COMMIT; - -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; +COMMIT; \ No newline at end of file From 63970f0c38f204745b05c4d89a600f78dd348344 Mon Sep 17 00:00:00 2001 From: nolanwhy Date: Sat, 4 Feb 2023 23:00:21 +0100 Subject: [PATCH 08/11] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index db1a91c..ce885a2 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ A Bootstrap based ROBLOX revival website. - [ ] User page
- [ ] Search (maybe)
- [ ] Messaging system
-- [x] Make games page grab games from the database
+- [ ] Make games page grab games from the database
- [ ] Make Create assets/game page
- [x] Make Catalog page (functional)
- [ ] Make Credits page
From fa8a312a332695f880ad9ec3e8f96e83a2ca40d5 Mon Sep 17 00:00:00 2001 From: nolanwhy Date: Sat, 4 Feb 2023 23:12:17 +0100 Subject: [PATCH 09/11] Update games.php --- games.php | 92 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 48 insertions(+), 44 deletions(-) diff --git a/games.php b/games.php index eea16a1..cc03e74 100644 --- a/games.php +++ b/games.php @@ -27,14 +27,25 @@ $getitstarted->header(); @@ -79,14 +81,25 @@ $getitstarted->header(); From f258b44314f059f87bf92a7507aea5f9a5c52574 Mon Sep 17 00:00:00 2001 From: nolanwhy Date: Sat, 4 Feb 2023 23:15:33 +0100 Subject: [PATCH 10/11] Update games.php --- games.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/games.php b/games.php index cc03e74..3cf202c 100644 --- a/games.php +++ b/games.php @@ -41,7 +41,7 @@ $getitstarted->header(); for ($i = 1; $i <= $x; $i++) { ?>
" style="text-decoration: none; text-align: left; margin-bottom: 9px;"> - " class="card-img-top rounded-top" alt=""> + " class="card-img-top rounded-top" alt="">

@@ -95,7 +95,7 @@ $getitstarted->header(); for ($i = 1; $i <= $x; $i++) { ?>
" style="text-decoration: none; text-align: left; margin-bottom: 9px;"> - " class="card-img-top rounded-top" alt=""> + " class="card-img-top rounded-top" alt="">

From 3a63938f53d5a566e515a17ab3a23b5d9e09c4f7 Mon Sep 17 00:00:00 2001 From: nolanwhy Date: Sat, 4 Feb 2023 23:24:20 +0100 Subject: [PATCH 11/11] added new thumbnail/headshot file (better for future), added dev mode (core/config.php) --- assets/renders/user/headshot.php | 1 + assets/renders/user/thumbnail.php | 1 + core/config.php | 8 ++++++++ home.php | 30 +++++++++++++++--------------- user.php | 2 +- 5 files changed, 26 insertions(+), 16 deletions(-) create mode 100644 assets/renders/user/headshot.php create mode 100644 assets/renders/user/thumbnail.php diff --git a/assets/renders/user/headshot.php b/assets/renders/user/headshot.php new file mode 100644 index 0000000..608382c --- /dev/null +++ b/assets/renders/user/headshot.php @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/renders/user/thumbnail.php b/assets/renders/user/thumbnail.php new file mode 100644 index 0000000..608382c --- /dev/null +++ b/assets/renders/user/thumbnail.php @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/core/config.php b/core/config.php index 7a96552..5b70c19 100644 --- a/core/config.php +++ b/core/config.php @@ -1,8 +1,16 @@ header();


- - , getUsername(); ?>! + + , getUsername()); ?>!

Friends (2)