/home/b/bitworld/system/libraries/mk_db.php on line 28
23 @$this->DB = new mysqli($this->HOST, $this->USER, $this->PASS, $this->NAME);
24 if(!mysqli_connect_errno()) {
25 $this->DB->set_charset($this->ENCODING);
26 } else {
27 $err = iconv('cp1251', $this->ENCODING, mysqli_connect_error());
28 throw new mkError($err);
29 }
30 }
31 /home/b/bitworld/system/mk_lib.php on line 32
27 public function __get($name) {
28 if(!isset($this->libs[$name])) {
29 $class = MK::$app->getClass($name);
30 $config = MK::$app->getConfig($name);
31 if(class_exists($class)) {
32 $this->libs[$name] = new $class($config);
33 } else {
34 throw new mkError('Lib `' . $name . '` not found!');
35
/home/b/bitworld/system/Model.php on line 151
146 return $obj[0];
147 }
148
149 public function query() {
150 $this->_res = call_user_func_array(
151 array(MK::$lib->DB, 'query'),
152 func_get_args()
153 );
154
/home/b/bitworld/bit-world.ru/public_html/pdd.bit-world.ru/modules/main/model/User.php on line 19
14 }
15
16 public function findByLoginPass($login, $password) {
17 $this->query(
18 'SELECT * FROM ?n WHERE `login`=?s AND `password`=?s',
19 'users', $login, $password
20 );
21 return $this->get_count();
22
/home/b/bitworld/bit-world.ru/public_html/pdd.bit-world.ru/modules/main/model/User.php on line 33
28 public function loadProfile() {
29 $this->fetch_one();
30 }
31
32 private function select($login, $password) {
33 if($this->findByLoginPass($login, $password) == 1) {
34 $this->loadProfile();
35 return true;
36
/home/b/bitworld/bit-world.ru/public_html/pdd.bit-world.ru/modules/main/model/User.php on line 50
45 isset($_SESSION['login'], $_SESSION['password'])) {
46 //__construct
47 return !$this->select($_SESSION['login'], $_SESSION['password']);
48 } else {
49 $password = MK::$core->getToken($password);
50 if($this->select($login, $password)) {
51 $_SESSION['login'] = $login;
52 $_SESSION['password'] = $password;
53
/home/b/bitworld/system/libraries/user.php on line 16
11 $this->user = new model\User;
12 $this->auth();
13 }
14
15 public function auth() {
16 $result = call_user_func_array([$this->user, 'auth'], func_get_args());
17 //text error is true
18 $this->is_auth = !$result;
19
/home/b/bitworld/system/libraries/user.php on line 12
7 private $user;
8 public $is_auth = false;
9
10 public function __construct() {
11 $this->user = new model\User;
12 $this->auth();
13 }
14
15
/home/b/bitworld/system/mk_lib.php on line 32
27 public function __get($name) {
28 if(!isset($this->libs[$name])) {
29 $class = MK::$app->getClass($name);
30 $config = MK::$app->getConfig($name);
31 if(class_exists($class)) {
32 $this->libs[$name] = new $class($config);
33 } else {
34 throw new mkError('Lib `' . $name . '` not found!');
35
/home/b/bitworld/bit-world.ru/public_html/pdd.bit-world.ru/modules/main/design.php on line 24
19 }
20
21 public function render($data) {
22 $btns = [
23 'url' => MK::$core->URL,
24 'auth' => MK::$lib->user->is_auth,
25 'group' => MK::$lib->user->getGroup()
26 ];
27
/home/b/bitworld/bit-world.ru/public_html/pdd.bit-world.ru/modules/pdd/pdd.php on line 20
15 $design->render([
16 'content' => (string)$view,
17 'title' => $view->title,
18 'description' => isset($view->description) ? $view->description : '',
19 'styles' => MK::$core->getView('sys/styles'),
20 'scripts' => MK::$core->getView('sys/scripts')
21 ]);
22 }
23
/home/b/bitworld/system/Controller.php on line 67
62 return view or view in layout
63 */
64 protected function getView($_file, $_params = []) {
65 $view = MK::$core->getView($_file, $_params);
66 if(method_exists($this, 'baseView')) {
67 return $this->baseView($view);
68 } else {
69 return $view;
70
/home/b/bitworld/bit-world.ru/public_html/pdd.bit-world.ru/modules/pdd/pdd.php on line 228
223 }
224 }
225
226 private function notFound() {
227 header('HTTP/1.0 404 Not Found');
228 $this->getView('main\404');
229 }
230
231
/home/b/bitworld/bit-world.ru/public_html/pdd.bit-world.ru/modules/pdd/pdd.php on line 78
73 if(strpos($ticket, 'bilet') !== false) {
74 $this->pdd_ticket($ticket, $abcd);
75 } elseif(strpos($ticket, 'tema') !== false) {
76 $this->pdd_theme($ticket, $abcd);
77 } else {
78 $this->notFound();
79 }
80 }
81
/home/b/bitworld/bit-world.ru/public_html/pdd.bit-world.ru/modules/pdd/pdd.php on line 42
37 break;
38 case 'list':
39 $this->pdd_list($category);
40 break;
41 default:
42 $this->pdd_default($args['page'], $category);
43 break;
44 }
45
/home/b/bitworld/system/Controller.php on line 30
25 foreach($perm as $val) {
26 $this->permissions[$key][$val] = true;
27 }
28 }
29 }
30 $this->main($args);
31 }
32
33
/home/b/bitworld/system/mk_app.php on line 154
149 ob_start();
150 if($this->_action == null) {
151 $args['page'] = '404';
152 $controller = new $class($args);
153 } else {
154 $controller = new $class($args);
155 $action = $this->_action;
156 $controller->$action($args);
157
/home/b/bitworld/bit-world.ru/public_html/pdd.bit-world.ru/index.php on line 33
28 require mk_sys . 'MK.php';
29
30 /* CMS Автоподгрузка классов */
31 spl_autoload_register(['system\MK', 'autoload']);
32
33 (new system\mk_app($config))->start();