-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
53 lines (45 loc) · 1.13 KB
/
index.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
<?php
include_once __DIR__ . '/fw/cemes.php';
// initialize framework
$cemes = Cemes::load();
// set error handler
$cemes->handleErrors(E_ALL ^ E_STRICT);
$fci = new Fci_Controller();
if (Cemes::isCli()) {
for ($i = 1; $i < $argc; $i += 2) {
if ($argv[$i] === '--config') {
$_GET['config'] = $argv[$i + 1];
continue;
}
if ($argv[$i] === '--dev') {
$_GET['dev'] = $argv[$i + 1];
continue;
}
}
}
if (array_key_exists('config', $_GET) && $_GET['config'] !== '') {
$fci->setConfig($_GET['config']);
}
$fci->initialisize();
?>
<?php if (!Cemes::isCli()): ?>
<!DOCTYPE html>
<html>
<head>
<title>HighspeedImportScript</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="robots" content="NOINDEX,NOFOLLOW">
<?php $cemes->insertCSS(); ?>
</head>
<body>
<?php endif; ?>
<?php
$fci->run();
if (array_key_exists('dev', $_GET) && $_GET['dev'] !== '') {
$cemes->displayErrors((int)$_GET['dev']);
}
?>
<?php if (!Cemes::isCli()): ?>
</body>
</html>
<?php endif; ?>