Skip to content

Commit

Permalink
Setup Project
Browse files Browse the repository at this point in the history
  • Loading branch information
91ahmed committed Feb 3, 2025
0 parents commit cc551ce
Show file tree
Hide file tree
Showing 944 changed files with 114,143 additions and 0 deletions.
Empty file added .gitignore
Empty file.
25 changes: 25 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>

DirectoryIndex index.php

RewriteEngine On

# Hide directories
IndexIgnore *

# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]

# Redirect to index.php
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
**Project Name:** PHPluse

### Overview
**PHPluse** is a multi-purpose application designed as a centralized dashboard for managing applications and data efficiently. It provides a unified platform to monitor and analyze performance, manage users, control settings, and organize various types of data.


### **Key Features**
**Application Management** – Easily add, update, and remove applications through an intuitive interface.
**Data Management** – Store and organize data flexibly with support for multiple database types.
**Analytics & Reports** – Generate comprehensive statistics on performance, users, and data.
**User & Role Management** – Advanced access control system with role-based permissions.
**API Integration** – Seamless integration with external systems and applications via RESTful APIs.
**Real-Time Alerts & Notifications** – Get instant updates on important changes within the system.
**Responsive Design** – Fully optimized for both desktop and mobile devices.
**High Security** – Implements best security practices, including encryption and two-factor authentication.

### **Potential Use Cases**
**SaaS Management Dashboard** – Perfect for overseeing web applications and cloud services.
**Enterprise Data Management** – Organize and control business-critical data efficiently.
**Admin Panel for Web & Mobile Apps** – Manage content, users, and analytics from a single interface.
26 changes: 26 additions & 0 deletions app/controller/AdminsController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php
namespace App\Controller;

use Core\Modules\Template\Render;
use App\Model\Admins;
use App\Model\AccountStatus;
use App\Model\AccountPrivacy;
use App\Model\Genders;

class AdminsController
{
public function create ()
{
$admins = new Admins();
$all_admins = $admins->all()->fetch();

$genders = new Genders();
$all_genders = $genders->all()->fetch();

$privacy = new AccountPrivacy();
$all_privacy = $privacy->all()->fetch();

Render::view('admins/create', compact('all_admins', 'all_genders', 'all_privacy'));
}
}
?>
22 changes: 22 additions & 0 deletions app/controller/HomeController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php
namespace App\Controller;

use Core\Modules\Template\Render;
use App\Model\Admins;

class HomeController
{
public function index ()
{
// $admins = new Admins();
// $all = $admins->select(['*'])->fetch();

Render::view('home');
}

public static function admin ()
{
return 'ahmed hassan';
}
}
?>
14 changes: 14 additions & 0 deletions app/middleware/app.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php
namespace App\Middleware;

use Core\Modules\Sessions\Session;

class App
{
public function __construct ()
{
$session = new Session();
$session->start();
}
}
?>
11 changes: 11 additions & 0 deletions app/middleware/auth.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php
namespace App\Middleware;

class Auth
{
public function __construct ()
{
echo 'Auth Middleware';
}
}
?>
22 changes: 22 additions & 0 deletions app/model/accountprivacy.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php
namespace App\Model;

use Core\Modules\Database\Sql\Db;

class AccountPrivacy extends Db
{
protected $table = 'account_privacy';

/** Configure new connection
----------------------------
protected $connection = [
'driver' => 'pgsql',
'host' => 'localhost',
'user' => 'ahmed',
'password' => '24882533',
'database' => 'sys',
'port' => '5432'
];
**/
}
?>
22 changes: 22 additions & 0 deletions app/model/accountstatus.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php
namespace App\Model;

use Core\Modules\Database\Sql\Db;

class AccountStatus extends Db
{
protected $table = 'account_status';

/** Configure new connection
----------------------------
protected $connection = [
'driver' => 'pgsql',
'host' => 'localhost',
'user' => 'ahmed',
'password' => '24882533',
'database' => 'sys',
'port' => '5432'
];
**/
}
?>
22 changes: 22 additions & 0 deletions app/model/admins.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php
namespace App\Model;

use Core\Modules\Database\Sql\Db;

class Admins extends Db
{
protected $table = 'admins';

/** Configure new connection
----------------------------
protected $connection = [
'driver' => 'pgsql',
'host' => 'localhost',
'user' => 'ahmed',
'password' => '24882533',
'database' => 'sys',
'port' => '5432'
];
**/
}
?>
22 changes: 22 additions & 0 deletions app/model/genders.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php
namespace App\Model;

use Core\Modules\Database\Sql\Db;

class Genders extends Db
{
protected $table = 'genders';

/** Configure new connection
----------------------------
protected $connection = [
'driver' => 'pgsql',
'host' => 'localhost',
'user' => 'ahmed',
'password' => '24882533',
'database' => 'sys',
'port' => '5432'
];
**/
}
?>
41 changes: 41 additions & 0 deletions app/routes.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php

$route = new \Core\Modules\Routes\Route();

// Remove specific words from the URL
$route->remove([DIR]);

$route->middleware(['app'])->get('/dashboard', 'HomeController@index');

// Admins
$route->middleware(['app'])->get('/dashboard/admin/create', 'AdminsController@create');

// $route->get('{lang}/home', function () {
// echo 'Lang';
// });

// Start Group Middlewares
// $route->middlewareGroup(['app']);

// $route->middleware(['auth'])
// ->regex(['id' => '^[a-z0-9{}?\/]+$'])
// ->get('/home/en/{id}/{email}', 'HomeController@index');

// $route->get('/home/ar/{username}', function ($username) {
// var_dump(ROUTE_URL_PARAMS);
// echo 'username = '.$username;
// });

// End Group Middlewares
// $route->middlewareEnd();


// $route->get('/hello/world', function () {
// echo 'Hello World';
// });

// 404 Not Found Error
// $route->error404(function () {
// exit('404 - Page Not Found.');
// });
?>
Loading

0 comments on commit cc551ce

Please sign in to comment.