initial code comit

This commit is contained in:
2018-11-22 21:02:44 +03:00
parent dda0488d4b
commit 801bbd37b7
117 changed files with 7612 additions and 0 deletions

43
system/settings.php Normal file
View File

@@ -0,0 +1,43 @@
<?php
/* ----- Begin of settings block ----- */
/* Security check constants */
const FILE_OWNER = 'wwwrun';
const FILE_GROUP = 'www';
/* Shutdown and reboot options */
const SHUTDOWN_ENABLED = false;
const REBOOT_ENABLED = false;
/* Control panel directory relative to server root */
const CP_ROOT_REL = '';
/* Wrere downloadable file must be stored */
const FILE_DOWNLOAD_DIR = '';
/* Transmission widget */
const W_TRANSMISSION_ENABLED = false;
const W_TRANSMISSION_HOST = '127.0.0.1';
const W_TRANSMISSION_NAME = 'transmission';
const W_TRANSMISSION_PASS = 'transmission';
/* ----- End of settings block ----- */
/* Don't change lines below */
$cp_root = filter_input(INPUT_SERVER, 'DOCUMENT_ROOT') . CP_ROOT_REL;
$settings = array('shutdown_enabled' => SHUTDOWN_ENABLED,
'reboot_enabled' => REBOOT_ENABLED,
'w_transmisson_enabled' => W_TRANSMISSION_ENABLED);
/* Configure autoloader */
require_once($cp_root . '/system/classes/CAI/CAICP/src/PSR4Autoloader.php');
$autoloader = new \CAI\CAICP\PSR4Autoloader;
$autoloader->register();
$autoloader->addNamespace('CAI\CAICP', $cp_root . '/system/classes/CAI/CAICP/src');
//$Autoloader->addNamespace('CAI\CAICP', $cp_root . '/system/classes/CAI/CAICP/tests');
/* Create system objects */
$user_cfg = new \CAI\CAICP\Settings(CP_ROOT_REL);
$lang = new \CAI\CAICP\Localization(CP_ROOT_REL, $user_cfg->get());