UI update

This commit is contained in:
Serghey Rodin 2015-06-03 02:31:03 +03:00
commit 527e4a9a62
139 changed files with 2046 additions and 124 deletions

View file

@ -9,6 +9,12 @@ include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
// Check POST request
if (!empty($_POST['ok'])) {
// Check token
if ((!isset($_POST['token'])) || ($_SESSION['token'] != $_POST['token'])) {
header('location: /login/');
exit();
}
// Check empty fields
if (empty($_POST['v_database'])) $errors[] = __('database');
if (empty($_POST['v_dbuser'])) $errors[] = __('username');
@ -91,7 +97,7 @@ if (!empty($_POST['ok'])) {
// Flush field values on success
if (empty($_SESSION['error_msg'])) {
$_SESSION['ok_msg'] = __('DATABASE_CREATED_OK',$user."_".$_POST['v_database'],$user."_".$_POST['v_database']);
$_SESSION['ok_msg'] = __('DATABASE_CREATED_OK',htmlentities($user)."_".htmlentities($_POST['v_database']),htmlentities($user)."_".htmlentities($_POST['v_database']));
$_SESSION['ok_msg'] .= " / <a href=".$db_admin_link." target='_blank'>" . __('open %s',$db_admin) . "</a>";
unset($v_database);
unset($v_dbuser);