mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 08:45:12 +02:00
2008-07-17 Evi Vanoost <vanooste@rcbi.rochester.edu>
* pandora_console/operation/messages/message.php: Rewrote large parts. Simplified functions. Fixed a bug where group messages sent a message only to one member of a group. Also fixed a bug where it only displayed your own group(s), right now it will display all users and groups a user has rights to (using get_user_groups ()) so that you can send messages to everyone. - This commit is only for adherence to style git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@970 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
cb62240f4c
commit
74c39bd1a8
@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
// Pandora - the Free monitoring system
|
||||
// ====================================
|
||||
// Copyright (c) 2004-2006 Sancho Lerena, slerena@gmail.com
|
||||
// Copyright (c) 2005-2006 Artica Soluciones Tecnologicas S.L, info@artica.es
|
||||
// Copyright (c) 2004-2006 Raul Mateos Martin, raulofpandora@gmail.com
|
||||
// Copyright (c) 2008-2008 Evi Vanoost, vanooste@rcbi.rochester.edu
|
||||
// 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
|
||||
@ -18,7 +18,7 @@
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
// Load global vars
|
||||
require("include/config.php");
|
||||
require_once ("include/config.php");
|
||||
|
||||
function create_message ($usuario_origen, $usuario_destino, $subject, $mensaje){
|
||||
global $lang_label;
|
||||
@ -26,9 +26,9 @@ function create_message($usuario_origen, $usuario_destino, $subject, $mensaje){
|
||||
VALUES ('%s', '%s', '%s', '%s',NOW())",$usuario_origen,$usuario_destino,$subject,$mensaje);
|
||||
(int) $result = process_sql ($sql);
|
||||
if ($result == 1) {
|
||||
echo "<h3 class='suc'>".$lang_label["message_ok"]."</h3>";
|
||||
echo '<h3 class="suc">'.$lang_label["message_ok"].'</h3>';
|
||||
} else {
|
||||
echo "<h3 class='error'>".$lang_label["message_no"]." - Dest: ".$usuario_destino."</h3>";
|
||||
echo '<h3 class="error">'.$lang_label["message_no"].' - Dest: '.$usuario_destino.'</h3>';
|
||||
}
|
||||
}
|
||||
|
||||
@ -163,7 +163,7 @@ if(isset($_GET["leer"]) || (!isset($_GET["nuevo"]) && !isset($_GET["nuevo_g"])))
|
||||
//Delete messages if borrar is set
|
||||
if (isset ($_GET["borrar"])){
|
||||
$id_message = get_parameter_get ("id_mensaje");
|
||||
$sql = sprintf("DELETE FROM tmensajes WHERE id_usuario_destino='%s' AND id_mensaje='%d'",$iduser,$id_message);
|
||||
$sql = sprintf ("DELETE FROM tmensajes WHERE id_usuario_destino='%s' AND id_mensaje=%d",$iduser,$id_message);
|
||||
(int) $result = process_sql ($sql);
|
||||
if ($result > 0) {
|
||||
echo '<h3 class="suc">'.$lang_label["del_message_ok"].'</h3>';
|
||||
@ -224,7 +224,5 @@ echo '<table width=650 cellpadding=4 cellspacing=4><tr>';
|
||||
echo '<td>';
|
||||
echo '<form method="post" name="new_mes" action="index.php?sec=messages&sec2=operation/messages/message&nuevo">
|
||||
<input type="submit" class="sub next" name="send_mes" value="'.$lang_label["new_message"].'"></form></td></tr></table>';
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user