| Last Updated | | Ratings | | Unique User Downloads | | Download Rankings |
2026-02-03 (4 months ago)  | | Not yet rated by the users | | Total: Not yet counted | | Not yet ranked |
|
| Description | | Author |
This package provides a framework to handle Website requests.
It provides a router class that can take a variable name and checks the request variables to determine which controller and view classes that will handle the request.
The router class will call the controller class, passing the name of the view that will be used to generate the output of the pages.
The package provides base controller class, user login and logout classes, and example controller class. | |
 |
|
Innovation award
 Nominee: 8x |
|
Instructions
Example
<?php
/***********************
Nikházy Ákos
index.php
Loads head with that all settings and decides what to show
to the user based on the presence and value of $_GET['view']
and the login status
***********************/
require_once __DIR__ . '/require/head.php';
$user = new User();
$view = $_GET['view'] ?? 'main';
// if user not logged in the login page is the only place they can go
if(!$user -> getLoginStatus()) $view = 'login';
$router = new Router($view);
$router->route();
|
Details
very-simple-site-framework
Just a very simple almost static website framework I use for small projects to build them very fast.
It is static, because you have to hard code pages in the Router class and create Controller classes with the same name you described in the Router class.
Setup
The username and password are admin and admin. You can generate a new one by using the following code anywhere in MainController.php's handle() method. Or in index.php or wherever you find it good to print this out.
$pw = new Password(APPKEY); // you should change the APPKEY value for even more safety in the require/head.php ?
echo '<pre>';
var_dum($pw ->createPasswordHash('YOUR PRECIOUS SECRET PASSWORD'));
die();
Then you should edit the auth.yzhk file with the data you just printed to look like this:
Or even better: create a better login scheme for it. I run small apps with this on my local server, so this is fine, but on more public spaces you should consider secuirty much more than this.
# Loginless
If you want it without login (eg.: a simple website) just go to the index.php and get rid of the ```if(!$user -> getLoginStatus()) $view = 'login';```. Then the program routes the visitor to main. Also then you do not need the ```$user = new User();``` line either.
| |
Applications that use this package |
|
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.