From d63c79eccd876a12d1762438923900fee3d0da6b Mon Sep 17 00:00:00 2001 From: raulmateos Date: Sun, 27 Dec 2009 21:31:54 +0000 Subject: [PATCH] =?UTF-8?q?2009-12-27=20=20Ra=C3=BAl=20Mateos=20=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * extensions/users/menu.png: New file * extensions/users_connected.php : Added icon and changed menu section. Added new godmode function that allows the user to be edited. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2244 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 7 +++ pandora_console/extensions/users/icon.png | Bin 0 -> 849 bytes .../extensions/users_connected.php | 47 +++++++++++++++++- 3 files changed, 53 insertions(+), 1 deletion(-) create mode 100755 pandora_console/extensions/users/icon.png diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index b036b455ca..907da01172 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2009-12-27 Raúl Mateos + + * extensions/users/menu.png: New file + + * extensions/users_connected.php: Added icon and changed menu section. + Added new godmode function that allows the user to be edited. + 2009-12-24 Raúl Mateos * images/pandora_logo.jpg: New file, used in dashboard (dashboard should diff --git a/pandora_console/extensions/users/icon.png b/pandora_console/extensions/users/icon.png new file mode 100755 index 0000000000000000000000000000000000000000..452e757d757abbf729a9d020d7b7f8de4f981ef0 GIT binary patch literal 849 zcmV-X1FrmuP)Px#24YJ`L;wH)0002_L%V+f000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iXM< z4G%1ALi~FG001>~MObu0Z*6U5Zgc=BV<{jqFfcSAN?~htVjxp=Wod3@ataDVa%Ew3 zWn>_CX>@2HRA^-&M@dakklBlG0007zNklOj))=*q@)m3xS|g}m{1V*Vj@xc67~{>(u*$ep@Q`irP9L!15F|f^~Ky=B6#Q0 z{khxj-M#1Z5EFw{_<1@9exDCN4u_xw_Zb`IKqm+M0Ei9ProhXg{rx-m7ekDle!y5P z-q$CLNJQ{lPFSgw(3h8m+Sw^atEzTJ7^^w#ki(Y|#_(r)Q04GM}j|8{nM4Gzlz=TU%S(lrhxB z<0pK(yJu$e`49lmV!%#FmwR9URwA)VoK8W@%Q=xG0e}l#HvsVT#Kb$fs|yZ7ZWKLR z@t_I8r0Qyz>+8C3I6PpiMe_S0`Tej1$OMBQ3u|ku#O=mU&dWkxFKty-eh{Dl5xE?A zDn-G$Ci#3YW3ffPzb{!kJElHA|24}w_2lzK#R)(=2pp$0Yeu6LJe4}ecXyNah6d>K z^IwFf2{Rfsa&vR>3R$i)x3*9%NrhHb)&6(`iI7jpu`y7WtKL{%)&RiV*syZpa56JJ zttJWuyWHJCaPoAT$z7Da?7>".__('Extensions'). " » ".__("Users connected"). ""; -add_operation_menu_option(__('Users connected'), 'estado_server',""); + $sql = "SELECT id_usuario, ip_origen, fecha, accion FROM tsesion WHERE descripcion = 'Logged in' AND utimestamp > (UNIX_TIMESTAMP(NOW()) - 3600) GROUP BY id_usuario, ip_origen, accion"; + $rows = get_db_all_rows_sql ($sql); + if (empty ($rows)) { + $rows = array (); + } + + $table->cellpadding = 4; + $table->cellspacing = 4; + $table->width = 600; + $table->class = "databox"; + $table->size = array (); + $table->data = array (); + $table->head = array (); + + $table->head[0] = __('User'); + $table->head[1] = __('IP'); + $table->head[2] = __('Date'); + + $rowPair = true; + $iterator = 0; + + // Get data + foreach ($rows as $row) { + if ($rowPair) + $table->rowclass[$iterator] = 'rowPair'; + else + $table->rowclass[$iterator] = 'rowOdd'; + $rowPair = !$rowPair; + $iterator++; + + $data = array (); + $data[0] = ''.$row["id_usuario"].''; + $data[1] = $row["ip_origen"]; + $data[2] = $row["fecha"]; + array_push ($table->data, $data); + } + + print_table ($table); + +} +add_godmode_menu_option (__('Users connected'), 'UM','gusuarios',"users/icon.png"); +add_operation_menu_option(__('Users connected'), 'usuarios',"users/icon.png"); + +add_extension_godmode_function ('users_extension_main_god'); add_extension_main_function ('users_extension_main'); ?>