This repository has been archived by the owner on Mar 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
recordset.php
36 lines (36 loc) · 1.26 KB
/
recordset.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
<?php
session_start();
$key_test=$_COOKIE['session_key'];
if (empty($key_test) || ($key_test != $_SESSION['key']))
{
session_destroy();
header("Location: login.php");
header("Pragma: no-cache");
exit;
}
include_once("lib/etc/site.conf");
include_once("$cfg_class_dir/lang.php");
include_once("$cfg_class_dir/display.php");
$_lang = new lang;
$_display = new display;
$lang_file = $_lang -> get_lang_file();
if (file_exists("$cfg_translations_dir/$lang_file") && ($lang_file)) {
include ("$cfg_translations_dir/$lang_file");
}
if (!empty($_COOKIE['current_table']))
{
$table = $_COOKIE['current_table'];
$rights = $_SESSION['user_rights'][$table]['view'];
if ($_SESSION['db_admin']) $rights = 't';
$_SESSION['recordset_action'] = $_COOKIE['recordset_action'];
if ($_SESSION['current_table'] != $_COOKIE['current_table']) {
$_SESSION['current_table'] = $_COOKIE['current_table'];
}
if ($rights === 't') {
$_display->disp_table();
} else {
echo "<div id=\"messages\" class=\"messages\" OnmouseOver=\"HideElement('messages');\">Naudotojas „".$_SESSION['user']['user']."“ negali žiūrėti šios lentelės.</div>";
$_display->disp_dashboard($cfg_dashboard_columns);
}
} else $_display->disp_dashboard($cfg_dashboard_columns);
?>