diff --git a/Flare/Controllers/EFTEKHARI.php b/Flare/Controllers/BaseController.php similarity index 95% rename from Flare/Controllers/EFTEKHARI.php rename to Flare/Controllers/BaseController.php index b990962..853946a 100644 --- a/Flare/Controllers/EFTEKHARI.php +++ b/Flare/Controllers/BaseController.php @@ -3,17 +3,17 @@ //use Respect\Validation\Validator as v; //use Email ; //use Libraries\Captcha ; -class EFTEKHARI +class BaseController { public function index() { - global $db,$session ; + // global $db,$session ; $data2 =['welcome' => 'Flare Framework ' ]; $data = ['content'=> View('Layout/welcome',$data2) ,'title' => 'Flare Framework ' ] ; return View('Layout/w-layout',$data) ; } public function alldata() { - View('home') ; + return View('home') ; } public function alldata2() { // Array with names diff --git a/Flare/app/Router.php b/Flare/app/Router.php index 061202e..31c398e 100644 --- a/Flare/app/Router.php +++ b/Flare/app/Router.php @@ -1,6 +1,8 @@ setNamespace('Controllers'); $router->get('/','BaseController@index'); $router->get('/home','BaseController@alldata'); @@ -11,8 +13,8 @@ echo 'Powerful like the king'; }); -$router->set404(function() { - return View2('404/404') ; -}); +//$router->set404(function() { +// return View2('404/404') ; +//}); $router->run(); diff --git a/Flare/app/config.php b/Flare/app/config.php index a4fa716..af967a9 100644 --- a/Flare/app/config.php +++ b/Flare/app/config.php @@ -17,7 +17,8 @@ require_once (CONFIG.'/../Global_Functions/Flare.php') ; spl_autoload_register('autoLoader'); if (isset($_ENV['URL'])){ - if (isset( $_ENV['DB_PREFIX'])){$_FE_prefix =$_ENV['DB_PREFIX'];}else{$_FE_prefix="";} + define("URL", $_ENV['URL']); + (isset( $_ENV['DB_PREFIX'])) ? $_FE_prefix =$_ENV['DB_PREFIX']:$_FE_prefix="" ; $db= new MysqliDb(Array ( 'host' => $_ENV['DB_HOST'], 'username' => $_ENV['DB_USER'], @@ -26,11 +27,9 @@ 'port' => 3306, 'prefix' => $_FE_prefix , 'charset' => 'utf8')); - define("URL", $_ENV['URL']); - unset($_ENV,$dotenv) ; + unset($_ENV,$dotenv,$_FE_prefix) ; } dbObject::autoload(CONFIG."/../Models"); spl_autoload_register('lautoLoader'); spl_autoload_register('CautoLoader'); require_once __DIR__.'/Router.php' ; - diff --git a/composer.lock b/composer.lock index ccf6875..844428f 100644 --- a/composer.lock +++ b/composer.lock @@ -1085,12 +1085,12 @@ "source": { "type": "git", "url": "https://github.com/verot/class.upload.php.git", - "reference": "c8e63e96ebe32bb67d40800d91a073be00ada3c3" + "reference": "ef7936caa1ed51fccf611a3908fb6d4b7bb5b89c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/verot/class.upload.php/zipball/c8e63e96ebe32bb67d40800d91a073be00ada3c3", - "reference": "c8e63e96ebe32bb67d40800d91a073be00ada3c3", + "url": "https://api.github.com/repos/verot/class.upload.php/zipball/ef7936caa1ed51fccf611a3908fb6d4b7bb5b89c", + "reference": "ef7936caa1ed51fccf611a3908fb6d4b7bb5b89c", "shasum": "" }, "require": { @@ -1123,7 +1123,7 @@ "issues": "https://github.com/verot/class.upload.php/issues", "source": "https://github.com/verot/class.upload.php/tree/2.x" }, - "time": "2022-08-30T12:44:48+00:00" + "time": "2022-09-02T13:10:40+00:00" }, { "name": "vlucas/phpdotenv", diff --git a/public/.htaccess b/public/.htaccess index 4670b67..3a95952 100644 --- a/public/.htaccess +++ b/public/.htaccess @@ -6,7 +6,6 @@ # Handle Authorization Header RewriteCond %{HTTP:Authorization} . RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] - # Redirect Trailing Slashes If Not A Folder... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} (.+)/$ diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 3f1e5ad..bf3f852 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -1128,18 +1128,18 @@ "source": { "type": "git", "url": "https://github.com/verot/class.upload.php.git", - "reference": "c8e63e96ebe32bb67d40800d91a073be00ada3c3" + "reference": "ef7936caa1ed51fccf611a3908fb6d4b7bb5b89c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/verot/class.upload.php/zipball/c8e63e96ebe32bb67d40800d91a073be00ada3c3", - "reference": "c8e63e96ebe32bb67d40800d91a073be00ada3c3", + "url": "https://api.github.com/repos/verot/class.upload.php/zipball/ef7936caa1ed51fccf611a3908fb6d4b7bb5b89c", + "reference": "ef7936caa1ed51fccf611a3908fb6d4b7bb5b89c", "shasum": "" }, "require": { "php": ">=5.3" }, - "time": "2022-08-30T12:44:48+00:00", + "time": "2022-09-02T13:10:40+00:00", "type": "library", "installation-source": "dist", "autoload": { diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index a8eab2c..505220e 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -5,7 +5,7 @@ 'type' => 'flare-framework', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), - 'reference' => '966a374f39aab060a57c58d6face09752939429c', + 'reference' => '936b0acea8ad5c0fa57ac5b769c718c51c795d5b', 'name' => 'flare-framework/flare', 'dev' => true, ), @@ -25,7 +25,7 @@ 'type' => 'flare-framework', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), - 'reference' => '966a374f39aab060a57c58d6face09752939429c', + 'reference' => '936b0acea8ad5c0fa57ac5b769c718c51c795d5b', 'dev_requirement' => false, ), 'graham-campbell/result-type' => array( @@ -185,7 +185,7 @@ 'type' => 'library', 'install_path' => __DIR__ . '/../verot/class.upload.php', 'aliases' => array(), - 'reference' => 'c8e63e96ebe32bb67d40800d91a073be00ada3c3', + 'reference' => 'ef7936caa1ed51fccf611a3908fb6d4b7bb5b89c', 'dev_requirement' => false, ), 'vlucas/phpdotenv' => array( diff --git a/vendor/verot/class.upload.php/test/upload.php b/vendor/verot/class.upload.php/test/upload.php index 47a1c2d..4906743 100644 --- a/vendor/verot/class.upload.php/test/upload.php +++ b/vendor/verot/class.upload.php/test/upload.php @@ -173,18 +173,9 @@ // yes, the file is on the server // below are some example settings which can be used if the uploaded file is an image. - /*$handle->image_resize = true; + $handle->image_resize = true; $handle->image_ratio_y = true; $handle->image_x = 300; -*/ - -$handle->image_text = 'TEST 2022-08-30'; -$handle->image_text_x = 79; -$handle->image_text_y = 72; -$handle->image_text_color = '#132D66'; -$handle->image_text_size = 26; -$handle->image_text_padding = 0; -$handle->image_text_font = 'Inter-Regular.ttf'; // now, we start the upload 'process'. That is, to copy the uploaded file // from its temporary location to the wanted location