diff --git a/.htaccess b/.htaccess index abeece8..207e958 100644 --- a/.htaccess +++ b/.htaccess @@ -12,4 +12,5 @@ RewriteEngine On RewriteRule ^admin/dashboard$ admin/dashboard.php -RewriteRule ^admin/products$ admin/dashboard.php \ No newline at end of file +RewriteRule ^admin/products$ admin/dashboard.php +RewriteRule ^admin/accounts$ admin/dashboard.php \ No newline at end of file diff --git a/account/accounts.php b/account/accounts.php new file mode 100644 index 0000000..78ff6df --- /dev/null +++ b/account/accounts.php @@ -0,0 +1,55 @@ + + + + + + + + Accounts + + + + + + + + + + + + + + getAll(); + $i = 1; + + foreach($accounts as $account) { + ?> + + + + + + + + +
NoNameUsernameRoleActions
+ + +
+ + + \ No newline at end of file diff --git a/account/view-accounts.php b/account/view-accounts.php new file mode 100644 index 0000000..d425106 --- /dev/null +++ b/account/view-accounts.php @@ -0,0 +1,51 @@ +
+
+
+
+

Accounts

+
+
+
+
+
+
+
+
+ + + + + + + + + + + + getAll(); + $i = 1; + + foreach($accounts as $account) { + ?> + + + + + + + + + +
NoNameUsernameRoleActions
+ + +
+
+
+
+
+
+
diff --git a/classes/account.class.php b/classes/account.class.php index 29626f5..12c1896 100644 --- a/classes/account.class.php +++ b/classes/account.class.php @@ -81,8 +81,21 @@ function fetch($username){ return $data; } + + function getAll(){ + $sql = "SELECT * FROM account;"; + $query = $this->db->connect()->prepare($sql); + $data = null; + + if($query->execute()){ + $data = $query->fetchAll(); + } + + return $data; + } + } // $obj = new Account(); -// $obj->add(); \ No newline at end of file +// $obj->add(); diff --git a/includes/sidebar.php b/includes/sidebar.php index 87e0572..cd477cd 100644 --- a/includes/sidebar.php +++ b/includes/sidebar.php @@ -38,7 +38,7 @@