change database username

This commit is contained in:
Serghey Rodin 2013-10-28 23:16:33 +02:00
commit 8f9c7272b9
4 changed files with 133 additions and 9 deletions

View file

@ -89,13 +89,21 @@ if (isset($_SESSION['look']) && ( $_SESSION['look'] != 'admin' )) {
}
function check_error($return_var){
function check_error($return_var) {
if ( $return_var > 0 ) {
header("Location: /error/");
exit;
}
}
function check_return_code($return_var,$output) {
if ($return_var != 0) {
$error = implode('<br>', $output);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
}
function top_panel($user, $TAB) {
global $panel;
$command = VESTA_CMD."v-list-user '".$user."' 'json'";