* include/functions_modules.php, include/functions_reporting.php,
include/functions_gis.php, include/functions_servers.php,
include/ajax/reporting.ajax.php, include/fgraph.php,
include/functions_db.php, include/functions_alerts.php,
include/functions_reports.php, extensions/system_info.php,
extensions/agents_modules.php, operation/agentes/group_view.php,
operation/events/events_rss.php, operation/reporting/reporting_xml.php,
operation/reporting/reporting_viewer.php, extras/pandora_diag.php,
general/logon_ok.php, godmode/db/db_audit.php, godmode/db/db_event.php,
godmode/db/db_purge.php, godmode/agentes/planned_downtime.php,
godmode/setup/setup.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_delete_modules.php,
godmode/massive/massive_standby_alerts.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/reporting/reporting_builder.list_items.php,
godmode/reporting/reporting_builder.preview.php,
godmode/reporting/reporting_builder.php: changes for to use character " in
the SQL queries for PostgreSQL, in some cases. In other case there are more
changes for to create SQL query PostgreSQL.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4062 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* include/functions_events.php, include/functions_reporting.php,
include/functions_db.php, extensions/users_connected.php,
general/logon_ok.php: added the SQL queries PostgreSQL
compatible, in this case with the function to get unix_timestamp.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4060 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* include/functions_db.php: made rollback the version of function
"select_db_engine" because I had a mistake in the previous commit.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4059 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* include/db/postgresql.php, include/db/mysql.php, include/functions_db.php:
the function "get_system_time" and derivate functions in DB engines.
* include/functions_gis.php, include/functions_servers.php,
include/help/en/help_timesource.php, include/help/es/help_timesource.php,
include/help/ja/help_timesource.php, include/functions.php,
operation/agentes/estado_agente.php, operation/agentes/gis_view.php,
operation/gis_maps/render_view.php: added the SQL queries PostgreSQL
compatible, in this case with the function to get unix_timestamp.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4058 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* include/db/postgresql.php, include/db/mysql.php, include/functions_db.php:
fixed the function "get_db_all_rows_filter" for PostgreSQL engine, added
new function "get_db_last_error" and derivate functions in DB engines. And
added new parameter $status in function "process_sql".
* extensions/dbmanager.php, general/error_authconfig.php,
general/error_dbconfig.php, godmode/groups/modu_group_list.php,
godmode/groups/group_list.php, godmode/db/db_sanity.php,
godmode/agentes/fields_manager.php,
godmode/agentes/manage_config_remote.php, godmode/servers/recon_script.php,
godmode/servers/plugin.php, godmode/modules/module_list.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/reporting/graphs.php: changed the calls to mysql functions to own
functions, and rewrote some parts of source code for this action.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4057 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* godmode/setup/news.php, godmode/setup/links.php, include/fgraph.php,
operation/agentes/status_monitor.php, operation/reporting/graph_viewer.php:
changed the calls to mysql functions to own functions.
* godmode/agentes/module_manager.php: marked with a comment the source code
the SQL postgreSQL and mySQL standar querys.
* include/functions_html.php, include/db/postgresql.php,
include/functions_reporting.php, include/pchart_graph.php,
include/functions_db.php: cleaned source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4056 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* include/functions*.php: Updated year in files changed this year. Also
changed spaces to tabs.
* pandora_console_install, pandora_console_upgrade,
pandora.data.postgreSQL.sql, pandoradb_data.sql
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4053 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* include/functions_reporting.php: added the call to
"get_agentmodule_status" without check the alerts status for the color.
* include/functions_db.php: in function "get_agentmodule_status" added new
parameter "$without_alerts" flag for check without alerts.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4049 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* include/db/postgresql.php, include/db/mysql.php, include/functions_db.php:
separate the function "process_sql_rollback" into the two version for
MySQL and PostgreSQL engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4042 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* include/db/postgresql.php, include/db/mysql.php, include/functions_db.php:
separate the function "get_db_all_row_by_steps_sql", "process_sql_begin",
"process_sql_commit" and "process_sql_rollback" into the two version for
MySQL and PostgreSQL engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4040 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* include/ajax/skins.ajax.php: Replaced "give_acl" function call to
"check_acl".
* include/config_process.php: "block_size" and "flash_charts" user options
override global options.
* include/functions_ui.php: If user has assigned a skin then use skins's
css files if it's possible.
* include/functions_db.php: Added missing function get_profile_filter.
* include/functions_themes.php: New parameter "path" in order to list all
css files of an specific path.
* index.php: Added functions_themes.php include statement.
* operation/users/user_edit.php
godmode/users/configure_user.php: Added new user options: "skin", "block_size"
and "flash_charts".
* godmode/setup/setup_visuals.php: Removed "custom_logo" options in setup for
pandora enterprise version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4038 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* include/db/postgresql.php, include/db/mysql.php, include/functions_db.php:
separate the function "format_array_to_update_sql", "process_sql_update",
"process_sql_delete" into the two version for MySQL and PostgreSQL engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4037 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* include/db/postgresql.php, include/db/mysql.php, include/functions_db.php:
separate the function "get_db_all_rows_filter", "get_db_num_rows",
"get_db_all_rows_field_filter" and "get_db_all_fields_in_table" into the two
version for MySQL and PostgreSQL engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4035 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* include/db/postgresql.php, include/db/mysql.php, include/functions_db.php:
separate the function "get_db_value_sql", "get_db_row_sql" and
"get_db_row_filter" into the two version for MySQL and PostgreSQL engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4034 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* include/db/postgresql.php, include/db/mysql.php, include/functions_db.php:
separate the function "get_db_value_filter" and
"format_array_to_where_clause_sql" into the two version for MySQL and
PostgreSQL engine.
* operation/events/events_list.php: cleaned source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4033 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* pandoradb_data.sql, pandoradb.data.postgreSQL.sql: in the table "tgrupo"
reordered the last field, this field is "custom_id" with '' value.
* pandoradb.postgreSQL.sql: commented the first lines before it was for
make manuallity the schema. Fixed in the "talert_templates" the column
"id_alert_action" can be null, and fixed the type of column "id_language"
in table "tlanguage". And move to empty lines some end line comments and
group in one line the functions for avoid the error in the install.
* include/db/postgresql.php: fixed in the function "postgresql_get_db_row"
the quotes for the field, the correct quotes is " for PostgreSQL.
* include/auth/mysql.php, include/functions_db.php: cleaned source code
style.
* install.php: now the installer can install a schema and data in PostgreSQL
database.
* extensions/update_manager.php: added some code and TODO comment to fix or
develop the method to use postgreSQL.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4021 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* include/db/postgresql.php, include/db/mysql.php,include/functions_db.php:
created the function "postgresql_get_db_row" in to the engines mysql and
postgreSQL.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4017 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* include/db/postgresql.php, include/db/mysql.php, include/functions_db.php:
create the function "get_db_value" for the engine mysql and postgreSQL.
* index.php: cleaned source code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4014 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* pandora_console/include/functions_db.php: fixed in the function
"get_agent_modules" extract the agents when the current user user is admin.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4004 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* include/functions_db.php: added in function "get_group_agents" the
parameter "$childGroups" for get the child groups. And in the function
"get_user_groups" added the parameter "$id_groups" for to get groups. Add
the function "get_id_groups_recursive" for to get groups in the tree groups.
* godmode/reporting/visual_console_builder.wizard.php: fixed the select box
of agents when user have agents in subgroup in any subgroup in the tree
group.
Fixes: #3180902
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3947 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* include/functions_db.php, operation/search_modules.php,
operation/search_agents.php: sorry, I didn't think about the subgroups may
have other subgroups (and this may be recursive), rewrite the SQL for
search with groups, now the groups come from the PHP function to get
all groups, children groups, grandchildren groups...
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3927 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* include/functions_db.php, operation/search_modules.php,
operation/search_agents.php: fixed SQL querys, this querys in previous
version haven't lines SQL code for to search into subgroups.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3925 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* include/functions_db.php: fixed check "<>" in other case as the ajax
calls in the visual map.
* godmode/reporting/visual_console_builder.editor.js: cleaned source code
and added some comments.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3871 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* include/functions_db.php: added in function "get_agent_modules" the
default value null for get modules of agents in user's group.
* godmode/massive/massive_delete_modules.php: fixed the select of modules
now get only the modules of agents in user's group and now you can delete
and view correcly the modules with acent or other not ascii characters.
Fixes: #3182143 and #3175722
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3849 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* include/functions_db.php: fixed the include of extensions, mysql or
postgresql for the api call or Pandora Mobile.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3828 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* include/db/postgresql.php: fixed in function "postgresql_insert_id" the
lost var. Erased traces in the function "postgresql_process_sql". Added
function "postgresql_escape_string_sql".
* include/db/mysql.php: fixed duplicated function "mysql_process_sql". And
added function "mysql_escape_string_sql".
* include/auth/mysql.php: added method to autenticate with postgreSQL.
* include/functions_db.php: added functions "select_db_engine",
"connect_db". And divided the function "escape_string_sql" into avaliable
engines.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3827 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* include/db/postgresql.php, include/db/mysql.php,
include/functions_db.php: initial division of the DB core in several
engines, at the moment mysql and postgreSQL (not complete).
* include/functions_config.php, include/config_process.php: change source
code to use new functions.
* install.php: mark the mysql engine (in future select).
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3826 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* include/functions_config.php: Loads relative_path variable in user
session.
* include/functions_db.php: Added include call to
functions_extensions.php.
* godmode/groups/configure_group.php
godmode/groups/group_list.php: Added functionality to assign a skin to
a group.
* godmode/menu.php: Added an entry to skins submenu.
* godmode/users/configure_user.php: Added functionality to assign a skin to
a user.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3823 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* include/functions_db.php,
godmode/modules/manage_network_templates_form.php: cleaned source style.
* extensions/resource_registration.php: added extensión to import by xml
file the network component, wmi component, smnp component and local
component. And if the xml content a template, this component add into
template.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3785 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* include/functions_db.php: fixed the check ACL in function
"get_agent_modules", the global search alert fixed with this, and I think
that fixed in other places.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3783 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* include/functions_reporting.php, include/fgraph.php,
include/functions_db.php, images/image_problem.opaque.png: fixed the bug
because this bug was two things the access to graph with not login in the
same machine to generate, and the transparent png that not crash with the
pdf library.
Fixes: #3139079
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3674 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* include/functions_db.php: in function __ fixed when the Pandora don't
have extensions.
* operation/events/events_rss.php: cleaned source code.
* operation/events/events_list.php: added more info in the hidden expanded
row.
Fixes: #3102826
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3523 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* include/functions_html.php: added the function
"print_autocomplete_modules". This function is same to magic-select box for
agents instead this for modules.
* include/javascript/jquery.ui.datepicker.js,
include/javascript/jquery.ui.droppable.js: fixed end of lines that it
haven't semicolon end char.
* include/ajax/module.php: fix version of file that responds to ajax
request for the magic-select box for modules.
* include/functions_ui.php: in function "format_alert_row" use new call
for the "isAlertInPolicy2".
* include/functions_db.php: added in function "get_agent_modules" for the
parameter $filter, the posibility to search with the "like" mysql operator.
* images/lightning_blue.png: blue lighting for new magic-select box agents.
* godmode/agentes/configurar_agente.php: cleaned source code style.
* godmode/alerts/alert_list.list.php: use new call for the
"isAlertInPolicy2". And fixed the column align for policies and actions.
* godmode/reporting/reporting_builder.list_items.php: erased old source
code lines comments.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3509 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* pandoradb_data.sql: Updated build
* include/config_process.php: Updated build.
* include/functions_db.php: Fixed the way takes agent status for visual maps,
was a wrong filter on remote_contact timestamp, that info is not used to
calculate agent unknown status !.
* index.php: develop mode set to 0
* operation/snmpconsole/snmp_view.php: Removed a notice for a noninit var (again)
* images/*: New images for visual maps, old ones are moved to another dir
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3505 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* include/functions_db.php: in function "format_array_to_where_clause_sql"
added lines for test when is a string start with % for check with LIKE
operator.
Fixes: #3098170
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3487 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* include/functions_db.php: in function "pandora_audit" added new parameter
$info for to set more info in the audit. Cleaned source code style.
* godmode/users/configure_user.php, godmode/users/configure_profile.php: now
in the source code pick more info in the audit for actions to create,
update and delete profiles and user, and for action to add and remove
profiles to user.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3470 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* include/functions_db.php: in function "pandora_audit" clean source code
style, use the Pandora DB interface and now return id the row in tsesion.
* index.php: fixed when login failed the audit.
* godmode/users/user_list.php: clean source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3468 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* include/functions_config.php: fixed the change the flag tconfig
"can_block_policies", now the operation is between policy semaphore.
Fixes: #3091940
* include/functions_db.php: fixed the save user IP when the $config don't
load this var yet.
* include/functions_networkmap.php: fixed the translation call function when
the pandora don't load the function.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3444 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f