mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
2010-08-04 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_filemanager.php: added parameter $readOnly in the function "file_explorer". *pandoradb.sql, extras/pandoradb_migrate_v3.1_to_v3.2.sql: added into the table "talert_template_modules" the column "id_policy_alerts". git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3106 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
23a7e047a3
commit
33e11d7034
@ -1,3 +1,10 @@
|
|||||||
|
2010-08-04 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
* include/functions_filemanager.php: added parameter $readOnly in the
|
||||||
|
function "file_explorer".
|
||||||
|
|
||||||
|
*pandoradb.sql, extras/pandoradb_migrate_v3.1_to_v3.2.sql: added into the
|
||||||
|
table "talert_template_modules" the column "id_policy_alerts".
|
||||||
|
|
||||||
2010-08-05 Sergio Martin <sergio.martin@artica.es>
|
2010-08-05 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
* operation/agentes/networkmap.php: Change the default map to topology map
|
* operation/agentes/networkmap.php: Change the default map to topology map
|
||||||
|
@ -67,3 +67,8 @@ CREATE TABLE IF NOT EXISTS `tnetwork_map` (
|
|||||||
-- -----------------------------------------------------
|
-- -----------------------------------------------------
|
||||||
|
|
||||||
ALTER TABLE `tagente_modulo` ADD COLUMN `id_policy_module` INTEGER UNSIGNED NOT NULL DEFAULT 0 AFTER `nombre`;
|
ALTER TABLE `tagente_modulo` ADD COLUMN `id_policy_module` INTEGER UNSIGNED NOT NULL DEFAULT 0 AFTER `nombre`;
|
||||||
|
|
||||||
|
-- -----------------------------------------------------
|
||||||
|
-- Table `talert_template_modules`
|
||||||
|
-- -----------------------------------------------------
|
||||||
|
ALTER TABLE `talert_template_modules` ADD COLUMN `id_policy_alerts` int(10) unsigned NOT NULL default '0';
|
||||||
|
@ -423,7 +423,7 @@ function read_recursive_dir($dir, $relative_path = '') {
|
|||||||
* @param string $father The directory father don't navigate bottom this.
|
* @param string $father The directory father don't navigate bottom this.
|
||||||
* @param boolean $editor The flag to set the edition of text files.
|
* @param boolean $editor The flag to set the edition of text files.
|
||||||
*/
|
*/
|
||||||
function file_explorer($real_directory, $relative_directory, $url, $father = '', $editor = false) {
|
function file_explorer($real_directory, $relative_directory, $url, $father = '', $editor = false, $readOnly = false) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@ -606,7 +606,7 @@ function file_explorer($real_directory, $relative_directory, $url, $father = '',
|
|||||||
$data[4] .= print_input_hidden ('delete_file', 1, true);
|
$data[4] .= print_input_hidden ('delete_file', 1, true);
|
||||||
$data[4] .= '</form>';
|
$data[4] .= '</form>';
|
||||||
|
|
||||||
if ($editor) {
|
if (($editor) && (!$readOnly)) {
|
||||||
if ($fileinfo['mime'] == MIME_TEXT) {
|
if ($fileinfo['mime'] == MIME_TEXT) {
|
||||||
$data[4] .= "<a style='vertical-align: top;' href='$url&edit_file=1&location_file=" . $fileinfo['realpath'] . "&hash=" . md5($fileinfo['realpath'] . $config['dbpass']) . "' style='float: left;'><img src='images/edit.png' style='margin-top: 2px;' /></a>";
|
$data[4] .= "<a style='vertical-align: top;' href='$url&edit_file=1&location_file=" . $fileinfo['realpath'] . "&hash=" . md5($fileinfo['realpath'] . $config['dbpass']) . "' style='float: left;'><img src='images/edit.png' style='margin-top: 2px;' /></a>";
|
||||||
}
|
}
|
||||||
@ -617,23 +617,25 @@ function file_explorer($real_directory, $relative_directory, $url, $father = '',
|
|||||||
array_push ($table->data, $data);
|
array_push ($table->data, $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_writable ($real_directory)) {
|
if (!$readOnly) {
|
||||||
echo "<div style='text-align: right; width: " . $table->width . ";'>";
|
if (is_writable ($real_directory)) {
|
||||||
echo "<a href='javascript:show_form_create_folder();' style='margin-right: 3px;' title='" . __('Create directory') . "'>";
|
echo "<div style='text-align: right; width: " . $table->width . ";'>";
|
||||||
echo "<img src='images/mimetypes/directory.png' />";
|
echo "<a href='javascript:show_form_create_folder();' style='margin-right: 3px;' title='" . __('Create directory') . "'>";
|
||||||
echo "</a>";
|
echo "<img src='images/mimetypes/directory.png' />";
|
||||||
echo "<a href='javascript: show_create_text_file();' style='margin-right: 3px;' title='" . __('Create text') . "'>";
|
echo "</a>";
|
||||||
echo "<img src='images/mimetypes/text.png' />";
|
echo "<a href='javascript: show_create_text_file();' style='margin-right: 3px;' title='" . __('Create text') . "'>";
|
||||||
echo "</a>";
|
echo "<img src='images/mimetypes/text.png' />";
|
||||||
echo "<a href='javascript: show_upload_file();' title='" . __('Upload file/s') . "'>";
|
echo "</a>";
|
||||||
echo "<img src='images/mimetypes/unknown.png' />";
|
echo "<a href='javascript: show_upload_file();' title='" . __('Upload file/s') . "'>";
|
||||||
echo "</a>";
|
echo "<img src='images/mimetypes/unknown.png' />";
|
||||||
echo "</div>";
|
echo "</a>";
|
||||||
}
|
echo "</div>";
|
||||||
else {
|
}
|
||||||
echo "<div style='text-align: right; width: " . $table->width . "; color:#AC4444;'>";
|
else {
|
||||||
echo "<image src='images/info.png' />" . __('The directory is only readble.');
|
echo "<div style='text-align: right; width: " . $table->width . "; color:#AC4444;'>";
|
||||||
echo "</div>";
|
echo "<image src='images/info.png' />" . __('The directory is only readble.');
|
||||||
|
echo "</div>";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
print_table ($table);
|
print_table ($table);
|
||||||
}
|
}
|
||||||
|
@ -277,23 +277,24 @@ CREATE TABLE IF NOT EXISTS `talert_templates` (
|
|||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `talert_template_modules` (
|
CREATE TABLE IF NOT EXISTS `talert_template_modules` (
|
||||||
`id` int(10) unsigned NOT NULL auto_increment,
|
`id` int(10) unsigned NOT NULL auto_increment,
|
||||||
`id_agent_module` int(10) unsigned NOT NULL,
|
`id_agent_module` int(10) unsigned NOT NULL,
|
||||||
`id_alert_template` int(10) unsigned NOT NULL,
|
`id_alert_template` int(10) unsigned NOT NULL,
|
||||||
`internal_counter` int(4) default '0',
|
`id_policy_alerts` int(10) unsigned NOT NULL default '0',
|
||||||
`last_fired` bigint(20) NOT NULL default '0',
|
`internal_counter` int(4) default '0',
|
||||||
`last_reference` bigint(20) NOT NULL default '0',
|
`last_fired` bigint(20) NOT NULL default '0',
|
||||||
`times_fired` int(3) NOT NULL default '0',
|
`last_reference` bigint(20) NOT NULL default '0',
|
||||||
`disabled` tinyint(1) default '0',
|
`times_fired` int(3) NOT NULL default '0',
|
||||||
`priority` tinyint(4) default '0',
|
`disabled` tinyint(1) default '0',
|
||||||
`force_execution` tinyint(1) default '0',
|
`priority` tinyint(4) default '0',
|
||||||
PRIMARY KEY (`id`),
|
`force_execution` tinyint(1) default '0',
|
||||||
KEY `idx_template_module` (`id_agent_module`),
|
PRIMARY KEY (`id`),
|
||||||
FOREIGN KEY (`id_agent_module`) REFERENCES tagente_modulo(`id_agente_modulo`)
|
KEY `idx_template_module` (`id_agent_module`),
|
||||||
ON DELETE CASCADE ON UPDATE CASCADE,
|
FOREIGN KEY (`id_agent_module`) REFERENCES tagente_modulo(`id_agente_modulo`)
|
||||||
FOREIGN KEY (`id_alert_template`) REFERENCES talert_templates(`id`)
|
ON DELETE CASCADE ON UPDATE CASCADE,
|
||||||
ON DELETE CASCADE ON UPDATE CASCADE,
|
FOREIGN KEY (`id_alert_template`) REFERENCES talert_templates(`id`)
|
||||||
UNIQUE (`id_agent_module`, `id_alert_template`)
|
ON DELETE CASCADE ON UPDATE CASCADE,
|
||||||
|
UNIQUE (`id_agent_module`, `id_alert_template`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `talert_template_module_actions` (
|
CREATE TABLE IF NOT EXISTS `talert_template_module_actions` (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user