OpenSencillo  2016.106
Long live the simplicity of PHP
 All Data Structures Namespaces Files Functions Pages
D:/DATA/GIT/GH/OpenSencillo/basicstrap.php
1 <?php
2 /*~ basicstrap.php
3 .---------------------------------------------------------------------------.
4 | Software: OpenSencillo Basic Bootstrap |
5 | Version: 2015.109 |
6 | Contact: mail@phorvath.com |
7 | ------------------------------------------------------------------------- |
8 | Author: Bc. Peter Horváth (original founder) |
9 | Copyright (c) 2015, Bc. Peter Horváth. All Rights Reserved. |
10 | ------------------------------------------------------------------------- |
11 | License: Distributed under the General Public License (GPL) |
12 | http://www.gnu.org/licenses/gpl-3.0.html |
13 | This program is distributed in the hope that it will be useful - WITHOUT |
14 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
15 | FITNESS FOR A PARTICULAR PURPOSE. |
16 '---------------------------------------------------------------------------'
17 ~*/
18 error_reporting(E_ERROR | E_PARSE);
19 if((defined('DB_USER'))&&(defined('DB_NAME'))&&(defined('DB_PASS'))&&(defined('DB_HOST')))
20 {
21  class database
22  {
23  const host = DB_HOST;
24  const name = DB_NAME;
25  const user = DB_USER;
26  const pass = DB_PASS;
27  const type = "sams";
28  const hash = "sams";
29  const cache= "0";
30  }
31 
32  require_once(__DIR__ . "/fw_core/core_interface.php");
33  require(__DIR__ . "/fw_core/core_sql.php");
34 }
35 else
36 {
37  include(__DIR__ . "/fw_headers/mysql-config.php");
38  include(__DIR__ . "/fw_headers/main-config.php");
39  require_once(__DIR__ . "/fw_core/core_interface.php");
40  require(__DIR__ . "/fw_core/core_sql.php");
41  require(__DIR__ . "/cache.php");
42 }
43 require(__DIR__ . "/fw_libraries/lib_identificator.php");
44 require(__DIR__ . "/fw_core/core_functions.php");
45 $inc=new library;
46 $inc->start();
47 $paths = $inc->exportPath();
48 $realPath = array();
49 foreach($paths as $val)
50 {
51  if(file_exists($val))
52  {
53  require_once("$val");
54  $realPath[] = $val;
55  }
56 }
57 unset($paths);
58 $core = new bootUp(false);
59 
60 if(PAGE=='admin')
61 {
62  require_once(__DIR__ . "/fw_core/core_admin.php");
63 }
64 ?>