diff --git a/app/Controllers/Api/Register.php b/app/Controllers/Api/Register.php
index 95afa22..1eb0bf0 100644
--- a/app/Controllers/Api/Register.php
+++ b/app/Controllers/Api/Register.php
@@ -98,7 +98,7 @@ class Register
)
);
- DB::query('INSERT INTO users VALUES (\'0\', :username, :email, :password, :photourl, 5, :online, :content)', array(':username' => ltrim($username), ':password' => password_hash(ltrim($password), PASSWORD_BCRYPT), ':photourl'=>'/static/img/avatar.png', ':email' => $email, ':content' => $content, ':online'=>time()));
+ DB::query('INSERT INTO users VALUES (\'0\', :username, :email, :password, :photourl, 5, 0, :online, :content)', array(':username' => ltrim($username), ':password' => password_hash(ltrim($password), PASSWORD_BCRYPT), ':photourl'=>'/static/img/avatar.png', ':email' => $email, ':content' => $content, ':online'=>time()));
$cstrong = True;
$token = GenerateRandomStr::gen_uuid();
$user_id = DB::query('SELECT id FROM users WHERE username=:username', array(':username' => $username))[0]['id'];
diff --git a/app/Controllers/MainController.php b/app/Controllers/MainController.php
index 361a3d5..4e955d5 100644
--- a/app/Controllers/MainController.php
+++ b/app/Controllers/MainController.php
@@ -16,6 +16,11 @@ class MainController
{
Page::set('Main');
+ }
+ public static function about()
+ {
+ Page::set('About');
+
}
public static function logout()
diff --git a/app/Core/Routes.php b/app/Core/Routes.php
index dfdffb7..29c9286 100644
--- a/app/Core/Routes.php
+++ b/app/Core/Routes.php
@@ -19,6 +19,7 @@ class Routes
Router::get('/author/$id', 'ProfileController@i');
Router::post('/api/login', 'ApiController@login');
Router::post('/api/register', 'ApiController@register');
+ Router::get('/about', 'MainController@about');
@@ -34,6 +35,7 @@ class Routes
Router::post('/api/photo/getcomments/$id', 'ApiController@photocommentload');
Router::get('/api/photo/vote', 'ApiController@photovote');
Router::get('/api/photo/comment/rate', 'ApiController@photocommentvote');
+ Router::get('/logout', 'MainController@logout');
Router::get('/404', 'ExceptionRegister@notfound');
} else {
Router::redirect('/login?return='.$_SERVER['HTTP_REFERER']);
diff --git a/index.php b/index.php
index f05e0b7..d9f7cb5 100644
--- a/index.php
+++ b/index.php
@@ -26,11 +26,10 @@ class App
Page::set('Errors/ServerDown');
}
} catch (PDOException $ex) {
- echo $ex;
- Page::set('Errors/DB_42000');
+ echo 'Произошла ошибка MySQL
'.nl2br($ex).'Произошла скриптовая ошибка PHP
'.nl2br($ex).'
+ О сервере = NGALLERY['root']['title'] ?>+=NGALLERY['root']['description']?> + |
+