function GroupList() { include "global.php"; $sql = "SELECT id, name " . "FROM groups WHERE is_deleted=0 " . "ORDER by name"; $colums = array("name" => new Column("Название"), "delete" => new Column_Button("Действие", "?action=group_delete", "id", "удалить")); $colums["name"]->SetLink("group_edit.php", "id"); $table = new Table($db, "system_group_list", $sql, $colums); $table->SetTheme("system"); $table->Show_PageSwitch(false); $table->Show(); }
function LocateList() { include "global.php"; $sql = "SELECT id, name FROM locations ORDER by id"; $colums = array("id" => new Column_Number("ID", 0), "name" => new Column("Название")); $colums["name"]->SetLink("locate_edit.php", "id"); $table = new Table($db, "locations_list", $sql, $colums); $table->SetTheme("system"); $table->Show_PageSwitch(false); $table->Show(); }
function UserList() { include "global.php"; $sql = "SELECT id, login, family, name, mobile_telephone, register " . "FROM users WHERE is_deleted=0 ORDER by login"; $colums = array("login" => new Column("Логин"), "family" => new Column_Custom("Полное имя", "[[family]] [[name]]"), "mobile_telephone" => new Column("Мобильный"), "register" => new Column("Зарегистрирован"), "delete" => new Column_Button("Действие", "?action=user_delete", "id", "удалить")); $colums["login"]->SetLink("user_edit.php", "id"); $table = new Table($db, "system_user_list", $sql, $colums); $table->SetTheme("system"); $table->Show_PageSwitch(false); $table->Show(); }
function users_connection_list() { include "global.php"; // echo $db->QueryNums(); $sql = "SELECT uid as id, users.login as login, ip, last_view, time_last_active, time_login " . "FROM users_online LEFT JOIN users ON users_online.uid=users.id " . "ORDER by time_last_active DESC"; $colums = array("login" => new Column("Логин"), "ip" => new Column_IP("IP"), "last_view" => new Column("Последний просмотр", 1, "left"), "time_last_active" => new Column("Активность"), "time_login" => new Column("Время входа")); $colums["login"]->SetLink("user_edit.php", "id"); $table = new Table($db, "system_users_online", $sql, $colums); $table->SetTheme("system"); $table->Show_PageSwitch(false); $table->Show(); // echo $db->QueryNums(); }
function users_connection_history() { include "global.php"; $sql = "SELECT users_connection_history.id as id, uid, login, ip, time_active, state " . "FROM users_connection_history LEFT JOIN users ON users_connection_history.uid=users.id " . "ORDER by id DESC"; $columns = array("id" => new Column_Number("ID", 0), "login" => new Column("Логин"), "ip" => new Column_IP("IP"), "time_active" => new Column("Время"), "state" => new Column_Bool("Статус", "пришёл", "ушёл")); $columns["id"]->SetDBTableName("users_connection_history"); $columns["login"]->SetLink("user_edit.php", "uid"); $badlines = array("state" => new Row("=", 0)); $table = new Table($db, "system_users_history", $sql, $columns, $badlines, "95%"); $table->SetTheme("system"); $table->Show_PageSwitch(true); $table->Show_Search("login"); $table->Show(); }