mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-09-25 10:59:15 +02:00
(Pandora Console)
* user_edit.php: Add new text about authors. Add a line between table and button. Add different colors between rows (cosmetic changes). * menu.php: Add new text about authors. Add code to highlight "edit my user" when editing the authenticated user. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@124 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
bb40c36c54
commit
17cc3339ac
@ -1,5 +1,9 @@
|
|||||||
2006-07-11 Raul Mateos <raulofpandora@gmail.com>
|
2006-07-11 Raul Mateos <raulofpandora@gmail.com>
|
||||||
|
|
||||||
|
* user_edit.php: Add new text about authors. Add a line between table and button. Add different colors between rows (cosmetic changes).
|
||||||
|
|
||||||
|
* menu.php: Add new text about authors. Add code to highlight "edit my user" when editing the user authenticated.
|
||||||
|
|
||||||
* index.php: Add new text about authors.
|
* index.php: Add new text about authors.
|
||||||
|
|
||||||
* functions.php: Add new text about authors. Change PATH to noaccess.php file.
|
* functions.php: Add new text about authors. Change PATH to noaccess.php file.
|
||||||
|
@ -82,10 +82,10 @@ if (comprueba_login() == 0)
|
|||||||
|
|
||||||
if (dame_password($nombre_viejo)!=$password){
|
if (dame_password($nombre_viejo)!=$password){
|
||||||
$password=md5($password);
|
$password=md5($password);
|
||||||
$sql = "UPDATE tusuario set nombre_real ='".$nombre_real."', id_usuario ='".$nombre."', password = '".$password."', telefono ='".$telefono."', direccion ='".$direccion." ', nivel = '".$nivel."', comentarios = '".$comentarios."' WHERE id_usuario = '".$nombre_viejo."'";
|
$sql = "UPDATE tusuario SET nombre_real ='".$nombre_real."', id_usuario ='".$nombre."', password = '".$password."', telefono ='".$telefono."', direccion ='".$direccion." ', nivel = '".$nivel."', comentarios = '".$comentarios."' WHERE id_usuario = '".$nombre_viejo."'";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
$sql = "UPDATE tusuario set nombre_real ='".$nombre_real."', id_usuario ='".$nombre."', telefono ='".$telefono."', direccion ='".$direccion." ', nivel = '".$nivel."', comentarios = '".$comentarios."' WHERE id_usuario = '".$nombre_viejo."'";
|
$sql = "UPDATE tusuario SET nombre_real ='".$nombre_real."', id_usuario ='".$nombre."', telefono ='".$telefono."', direccion ='".$direccion." ', nivel = '".$nivel."', comentarios = '".$comentarios."' WHERE id_usuario = '".$nombre_viejo."'";
|
||||||
$resq2=mysql_query($sql);
|
$resq2=mysql_query($sql);
|
||||||
|
|
||||||
// Añadimos grupo
|
// Añadimos grupo
|
||||||
|
@ -111,18 +111,18 @@ if (isset($_SESSION["id_usuario"])) {
|
|||||||
echo "<ul class='mn'><li><a href='index.php?sec=eventos&sec2=operation/events/event_statistics' class='mn'>".$lang_label["statistics"]."</a></li></ul></div>";
|
echo "<ul class='mn'><li><a href='index.php?sec=eventos&sec2=operation/events/event_statistics' class='mn'>".$lang_label["statistics"]."</a></li></ul></div>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(isset($_GET["sec2"]) && $_GET["sec2"] == "operation/users/user") {
|
if(isset($_GET["sec2"]) && ($_GET["sec2"] == "operation/users/user" || $_GET["sec2"] == "operation/users/user_edit" )) {
|
||||||
echo '<div id="op5s">';
|
echo '<div id="op5s">';
|
||||||
}
|
}
|
||||||
else echo '<div id="op5">';
|
else echo '<div id="op5">';
|
||||||
echo '<ul class="mn"><li><a href="index.php?sec=usuarios&sec2=operation/users/user" class="mn">'.$lang_label["view_users"].'</a></li></ul></div>';
|
echo '<ul class="mn"><li><a href="index.php?sec=usuarios&sec2=operation/users/user" class="mn">'.$lang_label["view_users"].'</a></li></ul></div>';
|
||||||
|
|
||||||
if (isset($_GET["sec"]) && $_GET["sec"] == "usuarios"){
|
if (isset($_GET["sec"]) && $_GET["sec"] == "usuarios"){
|
||||||
if(isset($_GET["sec2"]) && $_GET["sec2"] == "operation/users/user_edit"){
|
if(isset($_GET["ver"]) && $_GET["ver"] == $_SESSION["id_usuario"]){
|
||||||
echo "<div id='arrows1'>";
|
echo "<div id='arrows1'>";
|
||||||
}
|
}
|
||||||
else echo "<div id='arrow1'>";
|
else echo "<div id='arrow1'>";
|
||||||
echo "<ul class='mn'><li><a href='index.php?sec=usuarios&sec2=operation/users/user_edit&ver=".$_SESSION["id_usuario"]."' class='mn'>".$lang_label["index_myuser"]."</a></li></ul></div>";
|
echo "<ul class='mn'><li><a href='index.php?sec=usuarios&sec2=operation/users/user_edit&ver=".$_SESSION["id_usuario"]."' class='mn'>".$lang_label["index_myuser"]."</a></li></ul></div>";
|
||||||
|
|
||||||
if(isset($_GET["sec2"]) && $_GET["sec2"] == "operation/users/user_statistics") {
|
if(isset($_GET["sec2"]) && $_GET["sec2"] == "operation/users/user_statistics") {
|
||||||
echo "<div id='arrows1'>";
|
echo "<div id='arrows1'>";
|
||||||
|
@ -1,14 +1,25 @@
|
|||||||
<?php
|
<?php
|
||||||
// Pandora - The Free Monitoring System
|
|
||||||
// This code is protected by GPL license.
|
// Pandora - the Free monitoring system
|
||||||
// Este codigo esta protegido por la licencia GPL.
|
// ====================================
|
||||||
// Sancho Lerena <slerena@gmail.com>, 2003-2006
|
// Copyright (c) 2004-2006 Sancho Lerena, slerena@gmail.com
|
||||||
// Raul Mateos <raulofpandora@gmail.com>, 2005-2006
|
// Copyright (c) 2005-2006 Artica Soluciones Tecnológicas S.L, info@artica.es
|
||||||
|
// Copyright (c) 2004-2006 Raul Mateos Martin, raulofpandora@gmail.com
|
||||||
|
// This program is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU General Public License
|
||||||
|
// as published by the Free Software Foundation; either version 2
|
||||||
|
// of the License, or (at your option) any later version.
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
// Load global vars
|
// Load global vars
|
||||||
require("include/config.php");
|
require("include/config.php");
|
||||||
//require("include/functions.php");
|
|
||||||
//require("include/functions_db.php");
|
|
||||||
if (comprueba_login() == 0) {
|
if (comprueba_login() == 0) {
|
||||||
|
|
||||||
$view_mode = 0;
|
$view_mode = 0;
|
||||||
@ -27,9 +38,7 @@ if (comprueba_login() == 0) {
|
|||||||
$rowdup=mysql_fetch_array($resq1);
|
$rowdup=mysql_fetch_array($resq1);
|
||||||
$nombre=$rowdup["id_usuario"];
|
$nombre=$rowdup["id_usuario"];
|
||||||
|
|
||||||
// Obtenemos el ID del usuario para modificar los datos del usuario actual
|
// Get user ID to modify data of current user.
|
||||||
// no podemos pasar el ID como parámetro, sino seria muy facil acceder
|
|
||||||
// a los datos de otro usuario
|
|
||||||
|
|
||||||
if (isset ($_GET["modificado"])){
|
if (isset ($_GET["modificado"])){
|
||||||
// Se realiza la modificación
|
// Se realiza la modificación
|
||||||
@ -75,7 +84,7 @@ if (comprueba_login() == 0) {
|
|||||||
echo "<h2>".$lang_label["users_"]."</h2>";
|
echo "<h2>".$lang_label["users_"]."</h2>";
|
||||||
echo "<h3>".$lang_label["user_edit_title"]."<a href='help/".$help_code."/chap2.php#22' target='_help' class='help'> <span>".$lang_label["help"]."</span></a></h3>";
|
echo "<h3>".$lang_label["user_edit_title"]."<a href='help/".$help_code."/chap2.php#22' target='_help' class='help'> <span>".$lang_label["help"]."</span></a></h3>";
|
||||||
|
|
||||||
// Sino se obtiene la variable "modificado" es que se esta visualizando la informacion y
|
// Si no se obtiene la variable "modificado" es que se esta visualizando la informacion y
|
||||||
// preparandola para su modificacion, no se almacenan los datos
|
// preparandola para su modificacion, no se almacenan los datos
|
||||||
|
|
||||||
$nombre=$rowdup["id_usuario"];
|
$nombre=$rowdup["id_usuario"];
|
||||||
@ -117,21 +126,30 @@ if (comprueba_login() == 0) {
|
|||||||
// Don't delete this!!
|
// Don't delete this!!
|
||||||
if ($view_mode ==0){
|
if ($view_mode ==0){
|
||||||
echo '<tr><td colspan="3" align="right">';
|
echo '<tr><td colspan="3" align="right">';
|
||||||
echo "<input name='uptbutton' type='submit' class='sub' value='".$lang_label["update"]."'>";
|
echo "<input name='uptbutton' type='submit' class='sub' value='".$lang_label["update"]."'></td></tr>";
|
||||||
}
|
}
|
||||||
echo '<tr><td></td></tr>';
|
echo '</table><br>';
|
||||||
|
echo '<h3>'.$lang_label["listGroupUser"].'<a href="help/'.$help_code.'/chap2.php#22" target="_help" class="help"> <span>'.$lang_label["help"].'</span></a></h3>';
|
||||||
|
echo "<table width='500' cellpadding='3' cellspacing='3' class='fon'>";
|
||||||
$sql1='SELECT * FROM tusuario_perfil WHERE id_usuario = "'.$nombre.'"';
|
$sql1='SELECT * FROM tusuario_perfil WHERE id_usuario = "'.$nombre.'"';
|
||||||
$result=mysql_query($sql1);
|
$result=mysql_query($sql1);
|
||||||
if (mysql_num_rows($result)){
|
if (mysql_num_rows($result)){
|
||||||
echo '<tr><td colspan="3"><h3>'.$lang_label["listGroupUser"].'</h3></td>';
|
echo '<tr><td class="lb" rowspan="'.mysql_num_rows($result).'" width="5">';
|
||||||
|
$color=1;
|
||||||
while ($row=mysql_fetch_array($result)){
|
while ($row=mysql_fetch_array($result)){
|
||||||
echo '<tr><td colspan="3">';
|
if ($color == 1){
|
||||||
echo " ";
|
$tdcolor = "datos";
|
||||||
echo "<b>".dame_perfil($row["id_perfil"])."</b> / ";
|
$color = 0;
|
||||||
echo "<b>".dame_grupo($row["id_grupo"])."</b>";
|
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
$tdcolor = "datos2";
|
||||||
|
$color = 1;
|
||||||
|
}
|
||||||
|
echo '<td class="'.$tdcolor.'">';
|
||||||
|
echo "<b>".dame_perfil($row["id_perfil"])."</b> / ";
|
||||||
|
echo "<b>".dame_grupo($row["id_grupo"])."</b><tr>";
|
||||||
|
}
|
||||||
|
echo "<tr><td colspan='3'><div class='raya'></div></td></tr>";
|
||||||
}
|
}
|
||||||
else { echo '<tr><td class="red" colspan="3">'.$lang_label["no_profile"]; }
|
else { echo '<tr><td class="red" colspan="3">'.$lang_label["no_profile"]; }
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user