-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
61 lines (51 loc) · 1.88 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
54
55
56
57
58
59
60
61
<?php
/**
* Main entrance point to the ZeroG framework
*
* @author Radu Mogos <radu.mogos@pixelplant.ro>
* @copyright Radu Mogos, www.pixelplant.ro
* @version 1.0.8
*/
namespace
{
define('ROOT_DIRECTORY', realpath(dirname(__FILE__)));
set_include_path(get_include_path() . PATH_SEPARATOR . ROOT_DIRECTORY);
include "app/global.functions.php";
//error_reporting(E_ALL);
//ini_set('display_errors', '1');
// framework version number
const ZEROG_VERSION = '1.0.8';
try
{
// possible types: website, website_view
// $code is the website or website_view code
$code = isset($_SERVER['ZEROG_RUN_CODE']) ? $_SERVER['ZEROG_RUN_CODE'] : '';
$type = isset($_SERVER['ZEROG_RUN_TYPE']) ? $_SERVER['ZEROG_RUN_TYPE'] : 'website';
\Z::run($code, $type);
/*$mail = new \Sys\Mail();
$mail->setFrom('me@me.com', 'Gringo Deluxe');
$mail->addRecipient('test@test.com', 'Blabla');
$mail->addRecipient('test2@test.com', 'Blabla2');
$mail->addCcRecipient('hey@test.com', 'New man on the block');
$mail->addRecipient('hey@test.com', 'Vasile Șeicaru');
$mail->setTextBody('Acesta este doar text, nu-i asa?');
$mail->setHtmlBody('<p>Un paragraf</p><p>Multe mașinuțe se plimbă peste tot... <b>paragraf</b></p>');
$mail->setSubject('bunăseara țărăniștilor');
var_dump($mail);*/
// test start - remove these lines
/*$res = new Sys\Model\Resource("profiles/user");
$res->getField('password')->setValue('fdsafsadfsfg4yb546buy45ubj54buj54ub5jtjgfdsafsadfsfg4yb546buy45ubj54buj54ub5jtjg
fdsafsadfsfg4yb546buy45ubj54buj54ub5jtjgfdsafsadfsfg4yb546buy45ubj54buj54ub5jtjgfdsafsadfsfg4yb546buy45ubj54buj54ub5jtjg
dsafsafsfsdfsdfdgdfgdgdgdgdgggggggggggggggggg');
$res->getField('age')->setValue(13);
var_dump($res->validateFields());
var_dump($res);*/
// test end
//echo \Z::getProfiler();
}
catch (\Sys\Exception $e)
{
//header('Location: error/index.html');
echo $e;
}
}