PHP Classes

File: uploady/init.php

Recommend this page to a friend!
  Classes of Faris AL-Otabi   Uploady PHP Upload File to MySQL   uploady/init.php   Download  
File: uploady/init.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Uploady PHP Upload File to MySQL
Store file upload details in a MySQL database
Author: By
Last change:
Date: 2 months ago
Size: 1,119 bytes
 

Contents

Class file image Download
<?php

$db
= new Uploady\Database();
$utils = new Uploady\Utils();
$user = new Uploady\User($db, $utils);
$auth = new Uploady\Auth($db, $utils, $user);
$settings = new Uploady\Settings($db);
$localization = new Uploady\Localization($db);
$role = new Uploady\Role($db, $user);


if (
ENVIRONMENT != "installation") {
   
$st = $settings->getSettings();

    if (
ENVIRONMENT == 'development' || ENVIRONMENT == 'testing') {
       
$whoops = new \Whoops\Run;
       
$whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler);
       
$whoops->register();
    }

    if (
$st['maintenance_mode'] == 1) {
        if (!
strpos($_SERVER['REQUEST_URI'], "maintenance.php")) {
           
$utils->redirect($utils->siteUrl('/maintenance.php'));
        }
    }

   
$allowed_pages = array(
       
'login.php',
       
'signup.php',
       
'auth.php',
       
'page.php',
       
'download.php',
       
'activate.php',
       
'maintenance.php',
       
'forgot-password.php',
       
'reset.php',
       
'supported.php',
       
'reportabuse.php',
    );

   
$current_url = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
}