/var/www/hkosl.com/littleark/webadmin/configure.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php
    define
("PRODUCTION"0);

    if(
PRODUCTION == 1){
        
$_database    = array(
            
'driver'    => 'mysql',
            
'charset'   => 'utf8',
            
'collation' => 'utf8_general_ci',
            
'database'  => 'b2b2c_application',
            
'prefix'    => '',
            
'host'      => '',
            
'username'  => '',
            
'password'  => '',
        );

        
error_reporting(E_ALL ^E_NOTICE ^E_DEPRECATED ^E_WARNING);
        
ini_set('display_errors'0);

        
$debug_tool false;
    }else{
        
$_database    = array(
            
'driver'    => 'mysql',
            
'charset'   => 'utf8',
            
'collation' => 'utf8_general_ci',
            
'database'  => 'b2b2c_application',
            
'prefix'    => '',
            
'host'      => '192.168.155.13',
            
'username'  => 'admin',
            
'password'  => 'PHac7dru',
        );

        
error_reporting(E_ALL ^E_NOTICE ^E_DEPRECATED ^E_WARNING);
        
ini_set('display_errors'1);

        
$debug_tool true;
    }


    
// Require composer autoloader
    
require_once __DIR__ '/libraies/autoload.php';

    
// temp database include for webadmin2
    
require_once "database.php";

    if (
session_id() === "") {
        
session_start();
    }

    
ini_set('session.cookie_httponly'1);
    
header("Content-Type:text/html; charset=utf-8");
    
header("x-frame-options:SAMEORIGIN");
    
date_default_timezone_set("Asia/Hong_Kong");
    
$nowdate date("Y-m-d H:i:s");

    
$_SESSION["langcode"] = "tc";
    
$langcode $_SESSION["langcode"];

    if(
$debug_tool){
        
$whoops = new Whoops\Run();
        
$handler = new Whoops\Handler\PrettyPageHandler();
        
$handler->setEditor('sublime');
        
$whoops->pushHandler($handler)->register();
        if (
Whoops\Util\Misc::isAjaxRequest()) {
            
$whoops->pushHandler(new Whoops\Handler\JsonResponseHandler);
        }
        include_once 
"_helpers.php";
    }

    
$session_factory = new \Aura\Session\SessionFactory;
    
$session $session_factory->newInstance($_COOKIE);
    
$segment $session->getSegment('Onesolution\Frontend');

    require_once(
"_functions.php");