mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
2008-08-05 Esteban Sanchez <estebans@artica.es>
* include/functions_extensions.php: Added function to call login functions of the extensions. Functions renamed. * include/styles/pandora.css: Added style to notify bubble. * general/logon_ok.php: Added extensions login functions call. Style correction. * include/functions.php: Fixed array values cleanup on safe_input(). Documentation added to clean_output_breaks(). * index.php: Renamed functions fix. * operation/menu.php: Style correction. * ChangeLog: Added comment about commit #1000. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1001 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
ca1cffa083
commit
c6716bb41a
@ -1,3 +1,22 @@
|
|||||||
|
2008-08-05 Esteban Sanchez <estebans@artica.es>
|
||||||
|
|
||||||
|
* include/functions_extensions.php: Added function to call login
|
||||||
|
functions of the extensions. Functions renamed.
|
||||||
|
|
||||||
|
* include/styles/pandora.css: Added style to notify bubble.
|
||||||
|
|
||||||
|
* general/logon_ok.php: Added extensions login functions call. Style
|
||||||
|
correction.
|
||||||
|
|
||||||
|
* include/functions.php: Fixed array values cleanup on safe_input().
|
||||||
|
Documentation added to clean_output_breaks().
|
||||||
|
|
||||||
|
* index.php: Renamed functions fix.
|
||||||
|
|
||||||
|
* operation/menu.php: Style correction.
|
||||||
|
|
||||||
|
* ChangeLog: Added comment about commit #1000.
|
||||||
|
|
||||||
2008-08-04 Esteban Sanchez <estebans@artica.es>
|
2008-08-04 Esteban Sanchez <estebans@artica.es>
|
||||||
|
|
||||||
* index.php: Set id_user in config array when login. This fixes errors
|
* index.php: Set id_user in config array when login. This fixes errors
|
||||||
@ -12,6 +31,10 @@
|
|||||||
* godmode/extensions.php: It was showing main functions of extensions
|
* godmode/extensions.php: It was showing main functions of extensions
|
||||||
instead of godmode ones.
|
instead of godmode ones.
|
||||||
|
|
||||||
|
This commit is #1000. Congratulations to all the Pandora crew and
|
||||||
|
thanks all the Pandora users around the world. Pandora 2.0 is a bit
|
||||||
|
closer now.
|
||||||
|
|
||||||
2008-08-04 Esteban Sánchez <estebans@artica.es>
|
2008-08-04 Esteban Sánchez <estebans@artica.es>
|
||||||
|
|
||||||
* extensions/hello.php: Fixed old function name. Activate the
|
* extensions/hello.php: Fixed old function name. Activate the
|
||||||
|
@ -19,6 +19,9 @@
|
|||||||
|
|
||||||
require ("include/functions_reporting.php");
|
require ("include/functions_reporting.php");
|
||||||
|
|
||||||
|
/* Call all extensions login function */
|
||||||
|
extensions_call_login_function ();
|
||||||
|
|
||||||
echo "<div class='jus'>";
|
echo "<div class='jus'>";
|
||||||
$nick = $_SESSION['id_usuario'];
|
$nick = $_SESSION['id_usuario'];
|
||||||
echo "<h1>" . lang_string ("welcome_title") . "</h1>";
|
echo "<h1>" . lang_string ("welcome_title") . "</h1>";
|
||||||
|
@ -46,7 +46,7 @@ function safe_input ($value) {
|
|||||||
if (is_numeric ($value))
|
if (is_numeric ($value))
|
||||||
return $value;
|
return $value;
|
||||||
if (is_array ($value)) {
|
if (is_array ($value)) {
|
||||||
$value = array_walk($value,'safe_input');
|
array_walk (&$value,'safe_input');
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
return htmlentities (utf8_decode ($value), ENT_QUOTES);
|
return htmlentities (utf8_decode ($value), ENT_QUOTES);
|
||||||
@ -86,15 +86,15 @@ function salida_limpia ($string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Replace all \n characters with <br /> to show line breaks in HTML code.
|
||||||
*
|
*
|
||||||
|
* @param string String to replace the characters
|
||||||
*
|
*
|
||||||
* @param string
|
* @return The string with the characters replaced.
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
function clean_output_breaks ($string){
|
function clean_output_breaks ($string){
|
||||||
$myoutput = salida_limpia ($string);
|
$myoutput = salida_limpia ($string);
|
||||||
return preg_replace ('/\n/',"<br>", $myoutput);
|
return preg_replace ('/\n/',"<br />", $myoutput);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
$extension_file = '';
|
$extension_file = '';
|
||||||
|
|
||||||
function extension_main_function ($filename) {
|
function extension_call_main_function ($filename) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
$extension = &$config['extensions'][$filename];
|
$extension = &$config['extensions'][$filename];
|
||||||
@ -12,7 +12,7 @@ function extension_main_function ($filename) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function extension_godmode_function ($filename) {
|
function extension_call_godmode_function ($filename) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
$extension = &$config['extensions'][$filename];
|
$extension = &$config['extensions'][$filename];
|
||||||
@ -22,6 +22,17 @@ function extension_godmode_function ($filename) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function extensions_call_login_function () {
|
||||||
|
global $config;
|
||||||
|
|
||||||
|
$params = array ();
|
||||||
|
foreach ($config['extensions'] as $extension) {
|
||||||
|
if ($extension['login_function'] == '')
|
||||||
|
continue;
|
||||||
|
call_user_func_array ($extension['login_function'], $params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function is_extension ($page) {
|
function is_extension ($page) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
@ -113,7 +124,7 @@ function add_extension_godmode_function ($function_name) {
|
|||||||
$extension['godmode_function'] = $function_name;
|
$extension['godmode_function'] = $function_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
function add_login_action_function ($function_name) {
|
function add_extension_login_function ($function_name) {
|
||||||
global $config;
|
global $config;
|
||||||
global $extension_file;
|
global $extension_file;
|
||||||
|
|
||||||
|
@ -375,11 +375,6 @@ td.datos_jus, td.datos2_jus {
|
|||||||
border-bottom: 1px solid #708090;
|
border-bottom: 1px solid #708090;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
.suc {
|
|
||||||
color: #5a8629;
|
|
||||||
background: url(../../images/suc.png) no-repeat 1px;
|
|
||||||
padding: 4px 1px 6px 30px;
|
|
||||||
}
|
|
||||||
.green {
|
.green {
|
||||||
color: #5a8629;
|
color: #5a8629;
|
||||||
}
|
}
|
||||||
@ -754,3 +749,10 @@ a.big_data {
|
|||||||
text-decoration: none; font: bold 1em Arial, Sans-serif;
|
text-decoration: none; font: bold 1em Arial, Sans-serif;
|
||||||
color: #000;
|
color: #000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.notify {
|
||||||
|
background-color: #f7ffa5;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: bold;
|
||||||
|
padding: 8px;
|
||||||
|
}
|
||||||
|
@ -241,9 +241,9 @@ if ($page != "") {
|
|||||||
require ($page);
|
require ($page);
|
||||||
} else {
|
} else {
|
||||||
if ($sec[0] == 'g') {
|
if ($sec[0] == 'g') {
|
||||||
extension_godmode_function (basename ($page));
|
extension_call_godmode_function (basename ($page));
|
||||||
} else {
|
} else {
|
||||||
extension_main_function (basename ($page));
|
extension_call_main_function (basename ($page));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -238,7 +238,7 @@ if (give_acl ($config['id_user'], 0, "AR")) {
|
|||||||
echo '<div id="op6" class="operation-menu'.$selected.'">';
|
echo '<div id="op6" class="operation-menu'.$selected.'">';
|
||||||
echo '<ul class="mn"><li><a href="index.php?sec=snmpconsole&sec2=operation/snmpconsole/snmp_view&refr=30" class="mn">'.lang_string ("SNMP_console").'</a></li></ul></div>';
|
echo '<ul class="mn"><li><a href="index.php?sec=snmpconsole&sec2=operation/snmpconsole/snmp_view&refr=30" class="mn">'.lang_string ("SNMP_console").'</a></li></ul></div>';
|
||||||
|
|
||||||
if ((give_acl($config['id_user'], 0, "AW")==1)){
|
if (give_acl($config['id_user'], 0, "AW")) {
|
||||||
// SNMP Console alert (submenu)
|
// SNMP Console alert (submenu)
|
||||||
if ($sec == "snmpconsole") {
|
if ($sec == "snmpconsole") {
|
||||||
if ($sec2 == "operation/snmpconsole/snmp_alert") {
|
if ($sec2 == "operation/snmpconsole/snmp_alert") {
|
||||||
@ -289,9 +289,8 @@ if (give_acl ($config['id_user'], 0, "AR")) {
|
|||||||
|
|
||||||
// Custom reporting
|
// Custom reporting
|
||||||
if ($sec == "reporting") {
|
if ($sec == "reporting") {
|
||||||
if ($sec2 ==
|
if ($sec2 == "operation/reporting/custom_reporting"
|
||||||
"operation/reporting/custom_reporting" || $sec2 ==
|
|| $sec2 == "operation/reporting/reporting_viewer") {
|
||||||
"operation/reporting/reporting_viewer") {
|
|
||||||
echo "<div class='operation-submenu submenu-selected'>";
|
echo "<div class='operation-submenu submenu-selected'>";
|
||||||
} else {
|
} else {
|
||||||
echo "<div class='operation-submenu'>";
|
echo "<div class='operation-submenu'>";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user