diff --git a/code_igniter/application/config/config.php b/code_igniter/application/config/config.php index 0c6fb8bd4..e83f4b3c0 100644 --- a/code_igniter/application/config/config.php +++ b/code_igniter/application/config/config.php @@ -2,8 +2,8 @@ if (! defined('BASEPATH')) { exit('No direct script access allowed'); } -$config['web_internal_version'] = '20160401'; -$config['web_display_version'] = '1.12.4'; +$config['web_internal_version'] = '20160409'; +$config['web_display_version'] = '1.12.6'; # $config['debug'] = FALSE; /* |-------------------------------------------------------------------------- diff --git a/code_igniter/application/controllers/admin.php b/code_igniter/application/controllers/admin.php index 00c749314..12e552440 100644 --- a/code_igniter/application/controllers/admin.php +++ b/code_igniter/application/controllers/admin.php @@ -28,7 +28,7 @@ /** * @author Mark Unwin * - * @version 1.12.4 + * @version 1.12.6 * * @copyright Copyright (c) 2014, Opmantek * @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3 @@ -264,7 +264,7 @@ public function set_config() $this->load->model('m_oa_config'); foreach ($config as $name => $value) { $value = urldecode($value); - $this->m_oa_config->update_config($name, $value, $this->user->user_id, date('Y-m-d H:i:s')); + $this->m_oa_config->update_config($name, $value, $this->user->id, date('Y-m-d H:i:s')); } header(' ', true, 200); } else { @@ -724,6 +724,19 @@ public function scan_ad() ldap_set_option($ad, LDAP_OPT_REFERRALS, 0); $bind = @ldap_bind($ad, $ad_user, $ad_secret); if ($bind) { + # get the list of subnets from AD + $dn = "CN=Subnets,CN=Sites,CN=Configuration,dc=".implode(", dc=", explode(".", $ad_domain)); + $filter = "(&(objectclass=*))"; + $justthese = array("distinguishedName", "name"); + $sr = ldap_search($ad, $dn, $filter, $justthese); + $info = ldap_get_entries($ad, $sr); + for ($i = 0; $i < count($info)-1; $i++) { + if ( $info[$i]['name'][0] != 'Subnets') { + //echo "Subnet: " . $info[$i]['name'][0] . "\n"; + $this->m_oa_config->update_blessed($info[$i]['name'][0]); + } + } + # extract the list of computers from AD $filter = "(&(objectclass=computer))"; $justthese = array("dnshostname", "name", "location", "operatingSystem", "lastLogon", "pwdLastSet", "lastlogon", "distinguishedName"); @@ -799,8 +812,7 @@ public function scan_ad() $details->last_seen = date("Y-m-d H:i:s", $m); $details->last_seen_by = 'active directory'; $details->audits_ip = '127.0.0.1'; - $details->last_user = $this->user->user_full_name; - #$details->location = @$info[$i]['location'][0]; + $details->last_user = $this->user->full_name; $details->windows_active_directory_ou = ''; $j = explode(",", @strtolower($info[$i]['distinguishedname'][0])); for ($k = 1; $kwindows_active_directory_ou = substr($details->windows_active_directory_ou, 1); $details->icon = strtolower(str_replace(" ", "_", $details->os_family)); - $details->man_icon = $details->icon; $full_name = $details->dns_hostname; $details->man_ip_address = gethostbyname($full_name); @@ -828,8 +839,8 @@ public function scan_ad() # insert a new system $details->system_id = $this->m_system->insert_system($details); } - if (isset($this->user->user_full_name)) { - $temp_user = $this->user->user_full_name; + if (isset($this->user->full_name)) { + $temp_user = $this->user->full_name; } else { $temp_user = ''; } @@ -968,17 +979,17 @@ public function list_devices_in_location() { $this->load->model("m_oa_location"); $this->load->model("m_oa_group_column"); - $this->data['query'] = $this->m_oa_location->list_devices_in_location($this->data['id'], $this->user->user_id); + $this->data['query'] = $this->m_oa_location->list_devices_in_location($this->data['id'], $this->user->id); $this->data['column'] = $this->m_oa_group_column->get_group_column(); - $location_name = $this->m_oa_location->get_location_name($this->data['id']); - $this->data['heading'] = 'Systems in Location - '.$location_name; + $name = $this->m_oa_location->get_location_name($this->data['id']); + $this->data['heading'] = 'Systems in Location - '.$name; $this->data['include'] = 'v_report'; $this->data['export_report'] = 'y'; $this->data['group_id'] = '0'; - if ($this->user->user_admin == 'y') { - $this->user->user_access_level = '10'; + if ($this->user->admin == 'y') { + $this->user->access_level = '10'; } else { - $this->user->user_access_level = '3'; + $this->user->access_level = '3'; } $this->determine_output($this->uri->segment($this->uri->total_rsegments())); } @@ -987,18 +998,18 @@ public function list_devices_in_org() { $this->load->model("m_oa_org"); $this->load->model("m_oa_group_column"); - $this->user->user_access_level = '7'; - $this->data['query'] = $this->m_oa_org->list_devices_in_org($this->data['id'], $this->user->user_id); + $this->user->access_level = '7'; + $this->data['query'] = $this->m_oa_org->list_devices_in_org($this->data['id'], $this->user->id); $this->data['column'] = $this->m_oa_group_column->get_group_column(); $org_name = $this->m_oa_org->get_org_name($this->data['id']); $this->data['heading'] = 'Systems in Org - '.$org_name; $this->data['include'] = 'v_report'; $this->data['export_report'] = 'y'; $this->data['group_id'] = '0'; - if ($this->user->user_admin == 'y') { - $this->user->user_access_level = '10'; + if ($this->user->admin == 'y') { + $this->user->access_level = '10'; } else { - $this->user->user_access_level = '3'; + $this->user->access_level = '3'; } $this->determine_output($this->uri->segment($this->uri->total_rsegments())); } @@ -2299,7 +2310,7 @@ public function upgrade() foreach ($user_array as $user) { $sql = "INSERT INTO oa_group_user (group_user_id, user_id, group_id, group_user_access_level) VALUES (NULL, ?, '1', ?)"; - $data = array($user->user_id, $user->group_user_access_level); + $data = array($user->id, $user->group_user_access_level); $query = $this->db->query($sql, $data); $this->data['output'] .= $this->db->last_query()."

\n"; } @@ -3354,7 +3365,7 @@ public function upgrade() $this->load->model('m_oa_group'); $configs = array('default_ipmi_password', 'default_ssh_password', 'default_snmp_community', 'default_windows_password'); - $user_id = $this->user->user_id; + $user_id = $this->user->id; $timestamp = date('Y-m-d H:i:s'); foreach ($configs as $config_name) { $config_value = $this->m_oa_config->get_config_item($config_name); @@ -4698,23 +4709,11 @@ public function upgrade() $sql[] = "DELETE FROM `oa_config` WHERE config_name = 'discovery_nmap_os'"; $sql[] = "INSERT INTO `oa_config` VALUES ('discovery_nmap_os','n','y','0000-00-00 00:00:00',0,'When discovery runs Nmap, should we use the -O flag to capture OS information (will slow down scan and requires SUID on the Nmap binary under Linux).')"; - $sql[] = "ALTER TABLE oa_user ADD permissions text NOT NULL default ''"; $sql[] = "UPDATE oa_org SET org_name = 'Default Organisation' WHERE org_name = '' AND org_id = 0"; $sql[] = "UPDATE oa_org SET org_comments = '' WHERE org_comments = 'Default Organisation.' AND org_id = 0"; - # change the oa_org to the new SQL schema style - // $sql[] = "ALTER TABLE oa_org CHANGE org_id id int(10) unsigned NOT NULL AUTO_INCREMENT"; - // $sql[] = "ALTER TABLE oa_org CHANGE org_name name varchar(100) NOT NULL DEFAULT ''"; - // $sql[] = "ALTER TABLE oa_org CHANGE org_parent_id parent_id int(10) unsigned DEFAULT NULL"; - // $sql[] = "ALTER TABLE oa_org CHANGE org_group_id group_id int(10) unsigned DEFAULT NULL"; - // $sql[] = "ALTER TABLE oa_org DROP contact_id"; - // $sql[] = "ALTER TABLE oa_org DROP org_picture"; - // $sql[] = "ALTER TABLE oa_org CHANGE org_comments comments text NOT NULL DEFAULT ''"; - // $sql[] = "UPDATE oa_org SET name = 'Default Organisation' WHERE id = 0"; - // $sql[] = "ALTER TABLE oa_org ADD CONSTRAINT oa_org_parent FOREIGN KEY (parent_id) REFERENCES oa_org (id)"; - $sql[] = "DROP TABLE IF EXISTS `oa_user_org`"; $sql[] = "CREATE TABLE `oa_user_org` ( `id` int(10) NOT NULL AUTO_INCREMENT, @@ -4866,6 +4865,181 @@ public function upgrade() } + + if (($db_internal_version < '20160409') and ($this->db->platform() == 'mysql')) { + # upgrade for 1.12.6 + + $log_details = new stdClass(); + $log_details->file = 'system'; + $log_details->message = 'Upgrade database to 1.12.6 commenced'; + stdlog($log_details); + + $this->load->model('m_system'); + $this->m_system->reset_icons(); + + unset($sql); + $sql = array(); + # we're removving the foreign key between additional fields and groups + $sql[] = "ALTER TABLE sys_man_additional_fields DROP FOREIGN KEY sys_man_additional_fields_group_id"; + + # this should be unused now - groups and reports refreshed further down + $sql[] = "ALTER TABLE system DROP man_icon"; + + # drop this key so we can change org_id to id + $sql[] = "ALTER TABLE oa_user_org DROP FOREIGN KEY oa_user_org_org_id"; + + # change the oa_org to the new SQL schema style + $sql[] = "ALTER TABLE oa_org CHANGE org_id id int(10) unsigned NOT NULL AUTO_INCREMENT"; + $sql[] = "ALTER TABLE oa_org CHANGE org_name name varchar(100) NOT NULL DEFAULT ''"; + $sql[] = "ALTER TABLE oa_org CHANGE org_parent_id parent_id int(10) unsigned DEFAULT NULL"; + $sql[] = "ALTER TABLE oa_org CHANGE org_group_id group_id int(10) unsigned DEFAULT NULL"; + $sql[] = "ALTER TABLE oa_org DROP contact_id"; + $sql[] = "ALTER TABLE oa_org DROP org_picture"; + $sql[] = "ALTER TABLE oa_org CHANGE org_comments comments text NOT NULL DEFAULT ''"; + $sql[] = "UPDATE oa_org SET name = 'Default Organisation' WHERE id = 0"; + + # now add the key back + $sql[] = "ALTER TABLE oa_user_org ADD CONSTRAINT oa_user_org_org_id FOREIGN KEY (org_id) REFERENCES oa_org (id)"; + + # drop these foreign keys so we can change user_id to id + $sql[] = "ALTER TABLE edit_log DROP FOREIGN KEY edit_log_user_id"; + $sql[] = "ALTER TABLE oa_change DROP FOREIGN KEY oa_change_user_id"; + $sql[] = "ALTER TABLE oa_group_user DROP FOREIGN KEY oa_group_user_user_id"; + $sql[] = "ALTER TABLE oa_user_org DROP FOREIGN KEY oa_user_org_user_id"; + $sql[] = "ALTER TABLE sys_man_attachment DROP FOREIGN KEY att_user_id"; + $sql[] = "ALTER TABLE sys_man_notes DROP FOREIGN KEY sys_man_notes_user_id"; + + # change the user table to the new SQL schema format + $sql[] = "ALTER TABLE oa_user CHANGE user_id id int(10) unsigned NOT NULL AUTO_INCREMENT"; + $sql[] = "ALTER TABLE oa_user CHANGE user_name name varchar(100) NOT NULL"; + $sql[] = "ALTER TABLE oa_user CHANGE user_password password varchar(250) NOT NULL"; + $sql[] = "ALTER TABLE oa_user CHANGE user_full_name full_name varchar(100) NOT NULL"; + $sql[] = "ALTER TABLE oa_user CHANGE user_email email varchar(100) NOT NULL"; + $sql[] = "ALTER TABLE oa_user CHANGE user_lang lang varchar(100) NOT NULL"; + $sql[] = "ALTER TABLE oa_user CHANGE user_display_number display_count smallint(6) NOT NULL DEFAULT '10'"; + $sql[] = "ALTER TABLE oa_user CHANGE user_theme theme varchar(100) NOT NULL"; + $sql[] = "ALTER TABLE oa_user CHANGE user_admin admin varchar(1) NOT NULL"; + $sql[] = "ALTER TABLE oa_user CHANGE user_active active varchar(1) NOT NULL DEFAULT 'y'"; + $sql[] = "ALTER TABLE oa_user CHANGE user_sam sam int(10) NOT NULL DEFAULT '1'"; + $sql[] = "ALTER TABLE oa_user DROP user_change"; + + # now add the foreign keys back + $sql[] = "ALTER TABLE edit_log ADD CONSTRAINT edit_log_user_id FOREIGN KEY (user_id) REFERENCES oa_user (id)"; + $sql[] = "ALTER TABLE oa_change ADD CONSTRAINT oa_change_user_id FOREIGN KEY (user_id) REFERENCES oa_user (id)"; + $sql[] = "ALTER TABLE oa_group_user ADD CONSTRAINT oa_group_user_user_id FOREIGN KEY (user_id) REFERENCES oa_user (id)"; + $sql[] = "ALTER TABLE oa_user_org ADD CONSTRAINT oa_user_org_user_id FOREIGN KEY (user_id) REFERENCES oa_user (id)"; + $sql[] = "ALTER TABLE sys_man_attachment ADD CONSTRAINT att_user_id FOREIGN KEY (user_id) REFERENCES oa_user (id)"; + $sql[] = "ALTER TABLE sys_man_notes ADD CONSTRAINT sys_man_notes_user_id FOREIGN KEY (user_id) REFERENCES oa_user (id)"; + + # change the location table to use the new SQL schema format + $sql[] = "ALTER TABLE oa_location CHANGE location_id id int(10) unsigned NOT NULL AUTO_INCREMENT"; + $sql[] = "ALTER TABLE oa_location CHANGE location_name name varchar(100) NOT NULL DEFAULT ''"; + $sql[] = "ALTER TABLE oa_location CHANGE location_type type varchar(100) NOT NULL DEFAULT ''"; + $sql[] = "ALTER TABLE oa_location CHANGE location_room room varchar(100) NOT NULL DEFAULT ''"; + $sql[] = "ALTER TABLE oa_location CHANGE location_suite suite varchar(100) NOT NULL DEFAULT ''"; + $sql[] = "ALTER TABLE oa_location CHANGE location_level level varchar(100) NOT NULL DEFAULT ''"; + $sql[] = "ALTER TABLE oa_location CHANGE location_address address varchar(100) NOT NULL DEFAULT ''"; + $sql[] = "ALTER TABLE oa_location CHANGE location_suburb suburb varchar(100) NOT NULL DEFAULT ''"; + $sql[] = "ALTER TABLE oa_location CHANGE location_city city varchar(100) NOT NULL DEFAULT ''"; + $sql[] = "ALTER TABLE oa_location CHANGE location_district district varchar(100) NOT NULL DEFAULT ''"; + $sql[] = "ALTER TABLE oa_location CHANGE location_region region varchar(100) NOT NULL DEFAULT ''"; + $sql[] = "ALTER TABLE oa_location CHANGE location_area area varchar(100) NOT NULL DEFAULT ''"; + $sql[] = "ALTER TABLE oa_location CHANGE location_state state varchar(100) NOT NULL DEFAULT ''"; + $sql[] = "ALTER TABLE oa_location CHANGE location_postcode postcode varchar(10) NOT NULL DEFAULT ''"; + $sql[] = "ALTER TABLE oa_location CHANGE location_country country varchar(100) NOT NULL DEFAULT ''"; + $sql[] = "ALTER TABLE oa_location CHANGE location_tags tags varchar(250) NOT NULL DEFAULT ''"; + $sql[] = "ALTER TABLE oa_location CHANGE location_phone phone varchar(20) NOT NULL DEFAULT ''"; + $sql[] = "ALTER TABLE oa_location CHANGE location_picture picture varchar(100) NOT NULL DEFAULT ''"; + $sql[] = "ALTER TABLE oa_location CHANGE location_latitude latitude float(10,6) NOT NULL"; + $sql[] = "ALTER TABLE oa_location CHANGE location_longitude longitude float(10,6) NOT NULL"; + $sql[] = "ALTER TABLE oa_location CHANGE location_geo geo varchar(200) NOT NULL DEFAULT ''"; + $sql[] = "ALTER TABLE oa_location CHANGE location_comments comments varchar(100) NOT NULL DEFAULT ''"; + $sql[] = "ALTER TABLE oa_location CHANGE location_icon icon varchar(100) NOT NULL DEFAULT ''"; + $sql[] = "ALTER TABLE oa_location CHANGE location_group_id group_id int(10) unsigned NOT NULL DEFAULT '0'"; + + # this is unused and having 'count' as a column name is not ideal because it's a SQL reserved word + $sql[] = "ALTER TABLE service DROP count"; + + # allow for some silly long serial numbers + $sql[] = "ALTER TABLE system CHANGE `serial` `serial` varchar(250) NOT NULL DEFAULT ''"; + $sql[] = "ALTER TABLE system CHANGE `man_serial` `man_serial` varchar(250) NOT NULL DEFAULT ''"; + $sql[] = "ALTER TABLE system ADD `dbus_identifier` varchar(250) NOT NULL DEFAULT '' AFTER uuid"; + + # a new function we'll use for checking if an IP is in a blessed subnet + $sql[] = "DROP FUNCTION IF EXISTS cidr_to_mask"; + $sql[] = "CREATE FUNCTION cidr_to_mask (cidr INT(2)) RETURNS CHAR(15) DETERMINISTIC RETURN INET_NTOA(CONV(CONCAT(REPEAT(1,cidr),REPEAT(0,32-cidr)),2,10))"; + + # our new blessed subnets config item + $sql[] = "UPDATE `ip` SET `network` = REPLACE(`network`, ' ', '')"; + $sql[] = "INSERT INTO `oa_config` VALUES ('blessed_subnets_use','y','y','0000-00-00 00:00:00',0,'Should we only accept data from the blessed subnets list.')"; + + # new table for network descriptions and blessed subnets + $sql[] = "DROP TABLE IF EXISTS `networks`"; + $sql[] = "CREATE TABLE `networks` (`id` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(200) NOT NULL DEFAULT '', `description` text NOT NULL, `edited_by` varchar(200) NOT NULL DEFAULT '', `edited_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8"; + $sql[] = "INSERT INTO `networks` SELECT NULL, REPLACE(REPLACE(`group_name`, ' ', ''), 'Network-', '') AS name, TRIM(both '\t' from group_description) as description, 'system upgrade' as edited_by, NOW() as edited_date FROM oa_group WHERE group_category = 'network' AND SUBSTR(REPLACE(REPLACE(`group_name`, ' ', ''), 'Network-', ''),1,LOCATE('/',REPLACE(REPLACE(`group_name`, ' ', ''), 'Network-', ''))-1) != `group_description`"; + + $sql[] = "INSERT INTO `networks` (SELECT NULL, ip.network as name, '' as description, 'system upgrade' as edited_by, NOW() as edited_date FROM ip WHERE network NOT IN (SELECT networks.name FROM networks) AND ip.network != '' GROUP BY ip.network)"; + + $sql[] = "DROP TABLE IF EXISTS `chart`"; + + $sql[] = "CREATE TABLE `chart` ( `when` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `what` varchar(50) NOT NULL DEFAULT '', `org_id` int unsigned NOT NULL DEFAULT 0, `count` int unsigned NOT NULL DEFAULT 0, PRIMARY KEY (`when`, `what`, `org_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8"; + + $sql[] = "INSERT INTO chart (`when`, `what`, `org_id`, `count`) (SELECT DATE(audit_log.timestamp) as `when`, 'audit' as `what`, system.man_org_id as `org_id`, count(audit_log.system_id) AS `new_count` FROM audit_log LEFT JOIN system ON (audit_log.system_id = system.system_id) WHERE audit_log.type = 'audit' AND system.man_org_id IS NOT NULL GROUP BY system.man_org_id, DATE(audit_log.timestamp) ORDER BY DATE(audit_log.timestamp))"; + + $sql[] = "INSERT INTO chart (`when`, `what`, `org_id`, `count`) (SELECT DATE(audit_log.timestamp) as `when`, 'snmp' as `what`, system.man_org_id as `org_id`, count(audit_log.system_id) AS `count` FROM audit_log LEFT JOIN system ON (audit_log.system_id = system.system_id) WHERE audit_log.type = 'snmp' AND system.man_org_id IS NOT NULL GROUP BY system.man_org_id, DATE(audit_log.timestamp) ORDER BY DATE(audit_log.timestamp))"; + + $sql[] = "INSERT INTO chart (`when`, `what`, `org_id`, `count`) (SELECT DATE(audit_log.timestamp) as `when`, 'nmap' as `what`, system.man_org_id as `org_id`, count(audit_log.system_id) AS `count` FROM audit_log LEFT JOIN system ON (audit_log.system_id = system.system_id) WHERE audit_log.type = 'nmap' AND system.man_org_id IS NOT NULL GROUP BY system.man_org_id, DATE(audit_log.timestamp) ORDER BY DATE(audit_log.timestamp))"; + + $sql[] = "INSERT INTO chart (`when`, `what`, `org_id`, `count`) (SELECT DATE(change_log.timestamp) as `when`, CONCAT(change_log.db_table, '_', change_log.db_action) as `what`, system.man_org_id as `org_id`, count(change_log.id) AS `count` FROM change_log LEFT JOIN system ON (change_log.system_id = system.system_id) WHERE DATE(change_log.timestamp) >= '2015-01-01' AND change_log.db_table != 'system' GROUP BY system.man_org_id, CONCAT(change_log.db_table, '_', change_log.db_action), DATE(change_log.timestamp) ORDER BY DATE(change_log.timestamp))"; + + $sql[] = "INSERT INTO chart (`when`, `what`, `org_id`, `count`) (SELECT DATE(`first_timestamp`) as `when`, 'system_create' as `what`, system.man_org_id as `org_id`, count(system_id) AS `count` FROM system WHERE DATE(`first_timestamp`) >= '2015-01-01' GROUP BY DATE(`first_timestamp`), man_org_id ORDER BY DATE(`first_timestamp`))"; + + # set our versions + $sql[] = "UPDATE oa_config SET config_value = '20160409' WHERE config_name = 'internal_version'"; + $sql[] = "UPDATE oa_config SET config_value = '1.12.6' WHERE config_name = 'display_version'"; + + foreach ($sql as $this_query) { + $this->data['output'] .= $this_query."

\n"; + $query = $this->db->query($this_query); + } + + # refresh the reports + $this->load->helper('report_helper'); + refresh_report_definitions(); + + # refresh the groups + $this->load->helper('group_helper'); + refresh_group_definitions(); + + // update any leftover group definitions by changing man_icon to icon + $sql = "UPDATE oa_group SET group_display_sql = REPLACE(group_display_sql, 'man_icon', 'icon')"; + $query = $this->db->query($sql); + $sql = "UPDATE oa_group_column SET column_variable = 'icon' WHERE column_variable = 'man_icon'"; + $query = $this->db->query($sql); + + // update any leftover report definitions by changing man_icon to icon + $sql = "UPDATE oa_report SET report_sql = REPLACE(report_sql, 'man_icon', 'icon')"; + $query = $this->db->query($sql); + $sql = "UPDATE oa_report_column SET column_variable = 'icon' WHERE column_variable = 'man_icon'"; + $query = $this->db->query($sql); + + # have to re-run this as we left it in the original SQL script. + $sql = "UPDATE oa_group SET group_category = 'org' WHERE group_category = 'owner'"; + $query = $this->db->query($sql); + $sql = "ALTER TABLE oa_group CHANGE group_category group_category enum('application','device','general','location','network','org','os') NOT NULL DEFAULT 'general'"; + $query = $this->db->query($sql); + + foreach ($this->m_oa_config->get_server_subnets() as $subnet) { + $this->m_oa_config->update_blessed($subnet, 0); + } + + $log_details->message = 'Upgrade database to 1.12.6 completed'; + stdlog($log_details); + unset($log_details); + } + + + $this->m_oa_config->load_config(); $this->data['message'] .= "New (now current) database version: ".$this->config->item('display_version')." (".$this->config->item('internal_version').")
Don't forget to use the new audit scripts!
\n"; $this->data['include'] = 'v_upgrade'; diff --git a/code_igniter/application/controllers/admin_config.php b/code_igniter/application/controllers/admin_config.php index 97f80112c..9c7f84b9d 100644 --- a/code_igniter/application/controllers/admin_config.php +++ b/code_igniter/application/controllers/admin_config.php @@ -28,7 +28,7 @@ /** * @author Mark Unwin * - * @version 1.12.4 + * @version 1.12.6 * * @copyright Copyright (c) 2014, Opmantek * @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3 @@ -56,7 +56,7 @@ public function update_config() { // must be an admin to access this function - if ($this->user->user_admin != 'y') { + if ($this->user->admin != 'y') { if (isset($_SERVER['HTTP_REFERER']) and $_SERVER['HTTP_REFERER'] > "") { redirect($_SERVER['HTTP_REFERER']); } else { @@ -83,7 +83,7 @@ public function update_config() $config_value = ''; } - $this->m_oa_config->update_config($config_name, $config_value, $this->user->user_id, date('Y-m-d H:i:s')); + $this->m_oa_config->update_config($config_name, $config_value, $this->user->id, date('Y-m-d H:i:s')); if (isset($_SERVER['HTTP_REFERER']) and $_SERVER['HTTP_REFERER'] > "") { redirect($_SERVER['HTTP_REFERER']); diff --git a/code_igniter/application/controllers/admin_connection.php b/code_igniter/application/controllers/admin_connection.php index 246f5d8cf..01d4b71cb 100644 --- a/code_igniter/application/controllers/admin_connection.php +++ b/code_igniter/application/controllers/admin_connection.php @@ -28,7 +28,7 @@ /** * @author Mark Unwin * - * @version 1.12.4 + * @version 1.12.6 * * @copyright Copyright (c) 2014, Opmantek * @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3 diff --git a/code_igniter/application/controllers/admin_db.php b/code_igniter/application/controllers/admin_db.php index dd34e5629..25dd2ade6 100644 --- a/code_igniter/application/controllers/admin_db.php +++ b/code_igniter/application/controllers/admin_db.php @@ -28,7 +28,7 @@ /** * @author Mark Unwin * - * @version 1.12.4 + * @version 1.12.6 * * @copyright Copyright (c) 2014, Opmantek * @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3 diff --git a/code_igniter/application/controllers/admin_device.php b/code_igniter/application/controllers/admin_device.php index 2545aa67a..ad29ceca9 100644 --- a/code_igniter/application/controllers/admin_device.php +++ b/code_igniter/application/controllers/admin_device.php @@ -28,7 +28,7 @@ /** * @author Mark Unwin * - * @version 1.12.4 + * @version 1.12.6 * * @copyright Copyright (c) 2014, Opmantek * @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3 diff --git a/code_igniter/application/controllers/admin_field.php b/code_igniter/application/controllers/admin_field.php index 5e2dd4ad3..ef1923c10 100644 --- a/code_igniter/application/controllers/admin_field.php +++ b/code_igniter/application/controllers/admin_field.php @@ -28,7 +28,7 @@ /** * @author Mark Unwin * - * @version 1.12.4 + * @version 1.12.6 * * @copyright Copyright (c) 2014, Opmantek * @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3 diff --git a/code_igniter/application/controllers/admin_group.php b/code_igniter/application/controllers/admin_group.php index 24f96ef18..90951dc84 100644 --- a/code_igniter/application/controllers/admin_group.php +++ b/code_igniter/application/controllers/admin_group.php @@ -28,7 +28,7 @@ /** * @author Mark Unwin * - * @version 1.12.4 + * @version 1.12.6 * * @copyright Copyright (c) 2014, Opmantek * @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3 @@ -50,6 +50,7 @@ public function index() public function activate_group() { + $log_details = new stdClass(); if ($handle = opendir(BASEPATH.'../application/controllers/groups')) { $i = 0; $this->load->model("m_oa_group"); @@ -59,9 +60,14 @@ public function activate_group() $file_handle = fopen(BASEPATH.'../application/controllers/groups/'.$file, "rb"); $contents = fread($file_handle, filesize(BASEPATH.'../application/controllers/groups/'.$file)); try { - $xml = new SimpleXMLElement($contents); - } catch (Exception $e) { - echo $e; + $xml = @new SimpleXMLElement($contents); + } catch (Exception $error) { + // $errors = libxml_get_errors(); + // print_r($errors); + $log_details->message = "Invalid XML for group in file " . BASEPATH.'../application/controllers/groups/'.$file; + $log_details->file = 'system'; + stdlog($log_details); + continue; } $group_name = $xml->details->group_name; $group_icon = $xml->details->group_icon; @@ -312,6 +318,8 @@ public function process_add_group() } if ($details->dynamic_other_table == 'sys_man_additional_fields' or $details->dynamic_other_table == 'sys_man_additional_fields_data') { $details->group_dynamic_select = "SELECT distinct(system.system_id) FROM ".$details->dynamic_other_table.$system_table." WHERE ".$details->dynamic_other_table.".system_id = system.system_id AND ".$details->dynamic_other_field." ".$condition." '".$like_wildcard.$selection.$like_wildcard."' AND system.man_status = 'production'"; + } elseif ($details->dynamic_other_table == 'system') { + $details->group_dynamic_select = "SELECT distinct(system.system_id) FROM system WHERE system.".$details->dynamic_other_field." ".$condition." '".$like_wildcard.$selection.$like_wildcard."' AND system.man_status = 'production'"; } else { $details->group_dynamic_select = "SELECT distinct(system.system_id) FROM ".$details->dynamic_other_table." LEFT JOIN system ON ".$details->dynamic_other_table.".system_id = system.system_id WHERE ".$details->dynamic_other_table.'.'.$details->dynamic_other_field." ".$condition." '".$like_wildcard.$selection.$like_wildcard."' AND system.man_status = 'production' AND ".$details->dynamic_other_table.".current = 'y'"; } diff --git a/code_igniter/application/controllers/admin_location.php b/code_igniter/application/controllers/admin_location.php index 9a4dccb7d..b3e065b97 100644 --- a/code_igniter/application/controllers/admin_location.php +++ b/code_igniter/application/controllers/admin_location.php @@ -28,7 +28,7 @@ /** * @author Mark Unwin * - * @version 1.12.4 + * @version 1.12.6 * * @copyright Copyright (c) 2014, Opmantek * @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3 @@ -62,12 +62,12 @@ public function delete_location() { $this->load->model("m_oa_location"); $this->load->model("m_oa_group"); - $location_id = $this->data['id']; + $id = $this->data['id']; // Delete the group. - $group_id = $this->m_oa_location->get_group_id($location_id); + $group_id = $this->m_oa_location->get_group_id($id); $this->m_oa_group->delete_group($group_id); // Delete the location. - $this->m_oa_location->delete_location($location_id); + $this->m_oa_location->delete_location($id); redirect('admin_location/list_locations'); } @@ -75,13 +75,13 @@ public function delete_group() { $this->load->model("m_oa_group"); $this->load->model("m_oa_location"); - // We have the location_id, need to get the correct group_id - $location_id = $this->data['id']; - $group_id = $this->m_oa_location->get_group_id($location_id); + // We have the location id, need to get the correct group id + $id = $this->data['id']; + $group_id = $this->m_oa_location->get_group_id($id); // Delete the group $this->m_oa_group->delete_group($group_id); // Update the oa_org by removing the group_id - $this->m_oa_location->set_group_id($location_id, '0'); + $this->m_oa_location->set_group_id($id, '0'); redirect('admin_location/list_locations'); } @@ -94,24 +94,24 @@ public function add_location() $this->load->view('v_template', $this->data); } else { # process the form - $details = new stdClass(); + $location = new stdClass(); foreach ($_POST as $key => $value) { - $details->$key = $value; + $location->$key = $value; } - $details->picture = ''; + $location->picture = ''; $this->load->model("m_oa_location"); - if (is_null($this->m_oa_location->get_location_id($details->location_name))) { + if (is_null($this->m_oa_location->get_location_id($location->name))) { #location does not exist - good - $details->location_id = $this->m_oa_location->add_location($details); + $location->id = $this->m_oa_location->add_location($location); } else { $this->data['error_message'] = "Location Name already exists."; $this->data['heading'] = 'Add Location'; $this->data['include'] = 'v_add_location'; $this->load->view('v_template', $this->data); } - if ($details->location_group == 'on') { + if ($location->group == 'on') { # activate the group - redirect('admin_location/activate_group/'.$details->location_id); + redirect('admin_location/activate_group/'.$location->id); } else { redirect('admin_location/list_locations'); } @@ -123,28 +123,28 @@ public function activate_group() # insert a matching Group $this->load->model("m_oa_location"); $this->load->model("m_oa_group"); - $location_id = $this->data['id']; - $location_name = $this->m_oa_location->get_location_name($location_id); - $location_group_id = $this->m_oa_location->get_group_id($location_id); + $id = $this->data['id']; + $name = $this->m_oa_location->get_location_name($id); + $group_id = $this->m_oa_location->get_group_id($id); $group = new stdClass(); $group->group_id = ''; - $group->group_name = "Items in ".$location_name; + $group->group_name = "Items in ".$name; $group->group_padded_name = ''; - $group->group_description = "Items in ".$location_name; + $group->group_description = "Items in ".$name; $group->group_icon = 'location'; $group->group_category = 'location'; - $group->group_dynamic_select = "SELECT distinct(system.system_id) FROM system WHERE (system.man_location_id = '".$this->data['id']."' OR LOWER(system.sysLocation) LIKE LOWER('%".str_replace("'", "\'", $location_name)."%')) AND system.man_status = 'production'"; + $group->group_dynamic_select = "SELECT distinct(system.system_id) FROM system WHERE (system.man_location_id = '".$id."' OR LOWER(system.sysLocation) LIKE LOWER('%".str_replace("'", "\'", $name)."%')) AND system.man_status = 'production'"; $group->group_parent = ''; $group->group_display_sql = ''; - if (isset($location_group_id) and $location_group_id != '' and $location_group_id != '0') { + if (!empty($group_id)) { # update an existing group - $group->group_id = $location_group_id; + $group->group_id = $group_id; $this->m_oa_group->update_group($group); } else { # insert a new group $group->group_id = $this->m_oa_group->insert_group($group); # update the oa_org with the correct group_id - $this->m_oa_location->set_group_id($location_id, $group->group_id); + $this->m_oa_location->set_group_id($id, $group->group_id); } # and now update the group contents @@ -195,15 +195,15 @@ public function add_locations() $details[$attributes[$cell_number]] = $cell->getValue(); $cell_number++; } - if ($details['location_name'] != '') { - if ($location_id = $this->m_oa_location->get_location_id($details['location_name'])) { + if ($details['name'] != '') { + if ($location_id = $this->m_oa_location->get_location_id($details['name'])) { // we need to update an existing location $sql = "UPDATE oa_location SET "; foreach ($details as $detail => $value) { $sql .= $detail." = '".mysql_real_escape_string($value)."', "; } $sql = mb_substr($sql, 0, mb_strlen($sql)-2); - $sql .= " WHERE location_name = '".mysql_real_escape_string($details['location_name'])."'"; + $sql .= " WHERE name = '".mysql_real_escape_string($details['name'])."'"; } else { // this is a new location (we don't have a name match) $sql = "INSERT INTO oa_location ( "; @@ -236,14 +236,14 @@ public function add_locations() $this->load->model("m_oa_location"); $xml = new SimpleXMLElement(utf8_encode(str_replace('&', '&', $_POST['form_systemXML']))); foreach ($xml->children() as $child) { - if ($location_id = $this->m_oa_location->get_location_id($child->location_name)) { + if ($location_id = $this->m_oa_location->get_location_id($child->name)) { # we need to update an existing location $sql = "UPDATE oa_location SET "; foreach ($child->children() as $detail) { $sql .= $detail->getName()." = '".$detail."', "; } $sql = mb_substr($sql, 0, mb_strlen($sql)-2); - $sql .= " WHERE location_name = '".$child->location_name."'"; + $sql .= " WHERE name = '".$child->name."'"; } else { # this is a new location (we don't have a name match) $sql = "INSERT INTO oa_location ( "; @@ -258,7 +258,7 @@ public function add_locations() $sql = mb_substr($sql, 0, mb_strlen($sql)-2); $sql .= ")"; } - if ($child->location_name != '') { + if ($child->name != '') { # run the query !!! $sql = '/* admin_location::add_locations */ ' . $sql; $query = $this->db->query($sql); @@ -285,22 +285,22 @@ public function edit_location() # process the form $error = '0'; foreach ($_POST as $key => $value) { - $details->$key = $value; + $location->$key = $value; } - $details->picture = ''; - if ($this->m_oa_location->check_location_name($details->location_name, $details->location_id) == false) { + $location->picture = ''; + if ($this->m_oa_location->check_location_name($location->name, $location->id) == false) { $error = '1'; $this->data['error_message'] = "Location name already exists."; - $this->data['location'] = $this->m_oa_location->get_location($details->location_id); + $this->data['location'] = $this->m_oa_location->get_location($location->id); $this->data['heading'] = 'Edit Location'; $this->data['include'] = 'v_edit_location'; $this->load->view('v_template', $this->data); } if ($error == '0') { - $this->m_oa_location->edit_location($details); - if ($_POST['location_group'] == 'on') { - redirect('admin_location/activate_group/'.$_POST['location_id']); + $this->m_oa_location->edit_location($location); + if ($_POST['group'] == 'on') { + redirect('admin_location/activate_group/'.$_POST['id']); } else { redirect('admin_location/list_locations'); } diff --git a/code_igniter/application/controllers/admin_org.php b/code_igniter/application/controllers/admin_org.php index e82ad2498..ee0cee93f 100644 --- a/code_igniter/application/controllers/admin_org.php +++ b/code_igniter/application/controllers/admin_org.php @@ -28,7 +28,7 @@ /** * @author Mark Unwin * - * @version 1.12.4 + * @version 1.12.6 * * @copyright Copyright (c) 2014, Opmantek * @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3 @@ -141,9 +141,7 @@ public function add_orgs() $group->group_padded_name = ''; $group->group_icon = 'contact-new'; $group->group_category = 'owner'; - $group->group_dynamic_select = "SELECT distinct(system.system_id) FROM - system WHERE system.man_org_id = '".$group->org_id."' - AND system.man_status = 'production'"; + $group->group_dynamic_select = "SELECT distinct(system.system_id) FROM system WHERE system.man_org_id = '".$group->org_id."' AND system.man_status = 'production'"; $group->group_parent = ''; $group->group_display_sql = ''; $this->m_oa_group->insert_group($group); @@ -260,7 +258,7 @@ public function activate_group() $group->group_padded_name = ''; $group->group_description = $org_name." owned items"; $group->group_icon = 'contact'; - $group->group_category = 'owner'; + $group->group_category = 'org'; $group->group_dynamic_select = "SELECT distinct(system.system_id) FROM system WHERE system.man_org_id = '".$this->data['id']."' AND system.man_status = 'production'"; $group->group_parent = ''; $group->group_display_sql = ''; @@ -294,9 +292,9 @@ public function add_org() foreach ($_POST as $key => $value) { $details->$key = $value; } - if (is_null($this->m_oa_org->select_org($details->org_name))) { + if (is_null($this->m_oa_org->select_org($details->name))) { #org does not exist - good - $details->org_id = $this->m_oa_org->add_org($details); + $details->id = $this->m_oa_org->add_org($details); } else { $this->data['error_message'] = "Organisation name already exists."; $this->data['heading'] = 'Add Organisation'; @@ -330,10 +328,10 @@ public function edit_org() foreach ($_POST as $key => $value) { $details->$key = $value; } - if ($this->m_oa_org->check_org_name($details->org_name, $details->org_id) == false) { + if ($this->m_oa_org->check_org_name($details->name, $details->id) == false) { $error = '1'; $this->data['error_message'] = "Organisation name already exists."; - $this->data['org'] = $this->m_oa_org->get_org_details($details->org_id); + $this->data['org'] = $this->m_oa_org->get_org_details($details->id); $this->data['heading'] = 'Edit Organisation'; $this->data['include'] = 'v_edit_org'; $this->load->view('v_template', $this->data); diff --git a/code_igniter/application/controllers/admin_report.php b/code_igniter/application/controllers/admin_report.php index ca7a40275..2d15b8421 100644 --- a/code_igniter/application/controllers/admin_report.php +++ b/code_igniter/application/controllers/admin_report.php @@ -28,7 +28,7 @@ /** * @author Mark Unwin * - * @version 1.12.4 + * @version 1.12.6 * * @copyright Copyright (c) 2014, Opmantek * @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3 @@ -50,6 +50,7 @@ public function index() public function activate_report() { + $log_details = new stdClass(); if ($handle = opendir(BASEPATH.'../application/controllers/reports')) { $i = 0; $this->load->model("m_oa_report"); @@ -60,16 +61,14 @@ public function activate_report() $file_handle = fopen(BASEPATH.'../application/controllers/reports/'.$file, "rb"); $contents = fread($file_handle, filesize(BASEPATH.'../application/controllers/reports/'.$file)); try { - $xml = new SimpleXMLElement($contents); + $xml = @new SimpleXMLElement($contents); } catch (Exception $error) { - $errors = libxml_get_errors(); - echo "Invalid XML.
\n
\n";
-                        print_r($errors);
-                        // not a valid XML string
-                        echo'Invalid XML input for: '.$file;
-                        echo "
\n";
-                        print_r($xml);
-                        exit;
+                        // $errors = libxml_get_errors();
+                        // print_r($errors);
+                        $log_details->message = "Invalid XML for report in file " . BASEPATH.'../application/controllers/reports/'.$file;
+                        $log_details->file = 'system';
+                        stdlog($log_details);
+                        continue;
                     }
                     $report_name = $xml->details->report_name;
                     $report_description = $xml->details->report_description;
diff --git a/code_igniter/application/controllers/admin_system.php b/code_igniter/application/controllers/admin_system.php
index 6c8df1143..9d1891cd4 100644
--- a/code_igniter/application/controllers/admin_system.php
+++ b/code_igniter/application/controllers/admin_system.php
@@ -28,7 +28,7 @@
 /**
  * @author Mark Unwin 
  *
- * @version 1.12.4
+ * @version 1.12.6
  *
  * @copyright Copyright (c) 2014, Opmantek
  * @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3
@@ -48,61 +48,6 @@ public function index()
         redirect('/');
     }
 
-    public function add_system_def()
-    {
-        if (!isset($_POST['submit'])) {
-            $this->load->model("m_oa_admin_database");
-            $this->data['fields'] = $this->m_oa_admin_database->get_fields('system');
-            $this->data['custom_fields'] = $this->m_oa_admin_database->export_table('sys_man_additional_fields');
-            $result = array();
-            foreach ($this->data['fields'] as $field) {
-                if ((mb_strpos($field, 'man_') !== false) and
-                    (mb_strpos($field, 'man_type') === false)) {
-                    $result[] = $field;
-                }
-            }
-            sort($result);
-            $this->data['fields'] = $result;
-            $this->data['heading'] = 'Add System Definition';
-            $this->data['include'] = 'v_add_system_def';
-            $this->load->view('v_template', $this->data);
-        } else {
-            # process the form
-            $this->data['error_message'] = '';
-            echo "
\n";
-            print_r($_POST);
-            echo "
\n"; - $select_string = ''; - foreach ($_POST as $key => $value) { - if (($value == 'on') and (strpos($key, "man_") !== false)) { - $select_string .= 'system.'.$key.', '; - } - } - $select_string = substr($select_string, 0, strlen($select_string)-2); - - echo "NAME: ".$_POST['name']."
\n"; - echo "TYPE: ".$_POST['man_type']."
\n"; - echo "SELECT: ".$select_string."
\n"; - - $select_custom = ''; - foreach ($_POST as $key => $value) { - if (strpos($key, "custom_new_") !== false) { - echo "CUSTOM: ".$key." - ".$value."
\n"; - $select_custom .= 'sys_man_additional_fields.'.$value.', '; - } - } - foreach ($_POST as $key => $value) { - if (($value == 'on') and (strpos($key, "custom_exist_") !== false)) { - echo "Custom Existing: ".$key." - ".$value."
\n"; - $new_key = str_replace("custom_exist_", "", $key); - $select_custom .= 'sys_man_additional_fields.'.$new_key.', '; - } - } - $select_custom = substr($select_custom, 0, strlen($select_custom)-2); - echo "SELECT CUSTOM: ".$select_custom."
\n"; - } - } - public function system_add_new_credentials() { $details = new stdClass(); @@ -224,7 +169,7 @@ function createRequestObject() { var http = createRequestObject(); function update(name) { - http.open('get', '".$base_url."index.php/ajax/update_system_man/".$system_id."/man_icon/'+name); + http.open('get', '".$base_url."index.php/ajax/update_system_man/".$system_id."/icon/'+name); http.onreadystatechange = receive_update; http.send(null); } @@ -334,7 +279,7 @@ function CloseMe() $details->last_seen_by = 'snmp'; $details->timestamp = date('Y-m-d G:i:s'); $details->last_seen = $details->timestamp; - $details->last_user = $this->user->user_full_name; + $details->last_user = $this->user->full_name; $details->audits_ip = '127.0.0.1'; $details = dns_validate($details, 'y'); @@ -345,8 +290,8 @@ function CloseMe() if (isset($details->snmp_oid) and $details->snmp_oid > '') { $details->original_timestamp = $this->m_devices_components->read($details->system_id, 'y', 'system', '', 'timestamp'); $this->m_system->update_system($details); - if (isset($this->user->user_full_name)) { - $temp_user = $this->user->user_full_name; + if (isset($this->user->full_name)) { + $temp_user = $this->user->full_name; } else { $temp_user = ''; } @@ -449,7 +394,7 @@ public function add_system() } $details->last_seen_by = 'web form'; $details->last_seen = date('Y-m-d G:i:s'); - $details->last_user = $this->user->user_full_name; + $details->last_user = $this->user->full_name; if (($details->man_type == 'access token' or $details->man_type == 'cell phone' or @@ -506,20 +451,17 @@ public function add_system() } $details->timestamp = date('Y-m-d H:i:s'); $details->first_timestamp = $details->timestamp; - $details->icon = $details->man_icon; $details->last_seen_by = 'web form'; - if ($details->icon == '') { - $details->icon = $details->man_type; - } unset($details->AddSystem); if ($this->data['error'] == '') { # add the system $details->system_id = $this->m_system->insert_system($details); + $this->m_system->reset_icons($details->system_id); $this->m_oa_group->update_system_groups($details); - if (isset($this->user->user_full_name)) { - $temp_user = $this->user->user_full_name; + if (isset($this->user->full_name)) { + $temp_user = $this->user->full_name; } else { $temp_user = ''; } @@ -642,7 +584,7 @@ public function add_systems() $details = (object) $details; $details->last_seen_by = "spreadsheet"; $details->last_seen = $timestamp; - $details->last_user = $this->user->user_full_name; + $details->last_user = $this->user->full_name; $details->timestamp = $timestamp; $error = ''; @@ -748,8 +690,8 @@ public function add_systems() $details->type = $this->m_system->get_system_type($details->system_id); } - if (isset($this->user->user_full_name)) { - $temp_user = $this->user->user_full_name; + if (isset($this->user->full_name)) { + $temp_user = $this->user->full_name; } else { $temp_user = ''; } diff --git a/code_igniter/application/controllers/admin_test.php b/code_igniter/application/controllers/admin_test.php index c5f6f21e6..95d340a4b 100644 --- a/code_igniter/application/controllers/admin_test.php +++ b/code_igniter/application/controllers/admin_test.php @@ -28,7 +28,7 @@ /** * @author Mark Unwin * - * @version 1.12.4 + * @version 1.12.6 * * @copyright Copyright (c) 2014, Opmantek * @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3 @@ -92,193 +92,193 @@ public function data() $this->load->model("m_oa_group_column"); $this->load->model("m_oa_org"); - $details->location_name = "Brisbane Office"; - $details->location_type = "Office"; - $details->location_room = ""; - $details->location_suite = ""; - $details->location_level = ""; - $details->location_address = "111 Eagle Street"; - $details->location_postcode = "4000"; - $details->location_city = "Brisbane"; - $details->location_state = "Queensland"; - $details->location_country = "Australia"; - $details->location_geo = ""; - $details->location_latitude = "-27.46759"; - $details->location_longitude = "153.030355"; - $details->location_id = $this->m_oa_location->add_location($details); + $details->name = "Brisbane Office"; + $details->type = "Office"; + $details->room = ""; + $details->suite = ""; + $details->level = ""; + $details->address = "111 Eagle Street"; + $details->postcode = "4000"; + $details->city = "Brisbane"; + $details->state = "Queensland"; + $details->country = "Australia"; + $details->geo = ""; + $details->latitude = "-27.46759"; + $details->longitude = "153.030355"; + $details->id = $this->m_oa_location->add_location($details); $group = new stdClass(); - $group->group_name = "Items in ".$details->location_name; + $group->group_name = "Items in ".$details->name; $group->group_padded_name = ''; - $group->group_description = "Items in ".$details->location_name; + $group->group_description = "Items in ".$details->name; $group->group_icon = 'location'; $group->group_category = 'location'; - $group->group_dynamic_select = "SELECT distinct(system.system_id) FROM system WHERE system.man_location_id = '".$details->location_id."' AND system.man_status = 'production'"; + $group->group_dynamic_select = "SELECT distinct(system.system_id) FROM system WHERE system.man_location_id = '".$details->id."' AND system.man_status = 'production'"; $group->group_parent = ''; $group->group_display_sql = ''; $group_id = $this->m_oa_group->insert_group($group); - $this->m_oa_location->set_group_id($details->location_id, $group_id); + $this->m_oa_location->set_group_id($details->id, $group_id); $this->m_oa_group->update_specific_group($group_id); - $details->location_name = "Sydney Office"; - $details->location_type = "Office"; - $details->location_room = ""; - $details->location_suite = ""; - $details->location_level = ""; - $details->location_address = "10 Shelley Street"; - $details->location_postcode = "2000"; - $details->location_city = "Sydney"; - $details->location_state = "New South Wales"; - $details->location_country = "Australia"; - $details->location_geo = ""; - $details->location_latitude = "-33.8659025"; - $details->location_longitude = "151.2024921"; - $details->location_id = $this->m_oa_location->add_location($details); + $details->name = "Sydney Office"; + $details->type = "Office"; + $details->room = ""; + $details->suite = ""; + $details->level = ""; + $details->address = "10 Shelley Street"; + $details->postcode = "2000"; + $details->city = "Sydney"; + $details->state = "New South Wales"; + $details->country = "Australia"; + $details->geo = ""; + $details->latitude = "-33.8659025"; + $details->longitude = "151.2024921"; + $details->id = $this->m_oa_location->add_location($details); $group = new stdClass(); - $group->group_name = "Items in ".$details->location_name; + $group->group_name = "Items in ".$details->name; $group->group_padded_name = ''; - $group->group_description = "Items in ".$details->location_name; + $group->group_description = "Items in ".$details->name; $group->group_icon = 'location'; $group->group_category = 'location'; - $group->group_dynamic_select = "SELECT distinct(system.system_id) FROM system WHERE system.man_location_id = '".$details->location_id."' AND system.man_status = 'production'"; + $group->group_dynamic_select = "SELECT distinct(system.system_id) FROM system WHERE system.man_location_id = '".$details->id."' AND system.man_status = 'production'"; $group->group_parent = ''; $group->group_display_sql = ''; $group_id = $this->m_oa_group->insert_group($group); - $this->m_oa_location->set_group_id($details->location_id, $group_id); + $this->m_oa_location->set_group_id($details->id, $group_id); $this->m_oa_group->update_specific_group($group_id); - $details->location_name = "Canberra Office"; - $details->location_type = "Office"; - $details->location_room = ""; - $details->location_suite = ""; - $details->location_level = ""; - $details->location_address = "1 Newlands Street"; - $details->location_postcode = "2600"; - $details->location_city = "Canberra"; - $details->location_state = "ACT"; - $details->location_country = "Australia"; - $details->location_geo = ""; - $details->location_latitude = "-35.299066"; - $details->location_longitude = "149.1280834"; - $details->location_id = $this->m_oa_location->add_location($details); + $details->name = "Canberra Office"; + $details->type = "Office"; + $details->room = ""; + $details->suite = ""; + $details->level = ""; + $details->address = "1 Newlands Street"; + $details->postcode = "2600"; + $details->city = "Canberra"; + $details->state = "ACT"; + $details->country = "Australia"; + $details->geo = ""; + $details->latitude = "-35.299066"; + $details->longitude = "149.1280834"; + $details->id = $this->m_oa_location->add_location($details); $group = new stdClass(); - $group->group_name = "Items in ".$details->location_name; + $group->group_name = "Items in ".$details->name; $group->group_padded_name = ''; - $group->group_description = "Items in ".$details->location_name; + $group->group_description = "Items in ".$details->name; $group->group_icon = 'location'; $group->group_category = 'location'; - $group->group_dynamic_select = "SELECT distinct(system.system_id) FROM system WHERE system.man_location_id = '".$details->location_id."' AND system.man_status = 'production'"; + $group->group_dynamic_select = "SELECT distinct(system.system_id) FROM system WHERE system.man_location_id = '".$details->id."' AND system.man_status = 'production'"; $group->group_parent = ''; $group->group_display_sql = ''; $group_id = $this->m_oa_group->insert_group($group); - $this->m_oa_location->set_group_id($details->location_id, $group_id); + $this->m_oa_location->set_group_id($details->id, $group_id); $this->m_oa_group->update_specific_group($group_id); - $details->location_name = "Melbourne Office"; - $details->location_type = "Office"; - $details->location_room = ""; - $details->location_suite = ""; - $details->location_level = ""; - $details->location_address = "1 Freshwater Place"; - $details->location_postcode = "3006"; - $details->location_city = "Southbank"; - $details->location_state = "Victoria"; - $details->location_country = "Australia"; - $details->location_geo = ""; - $details->location_latitude = "-37.821938"; - $details->location_longitude = "144.962095"; - $details->location_id = $this->m_oa_location->add_location($details); + $details->name = "Melbourne Office"; + $details->type = "Office"; + $details->room = ""; + $details->suite = ""; + $details->level = ""; + $details->address = "1 Freshwater Place"; + $details->postcode = "3006"; + $details->city = "Southbank"; + $details->state = "Victoria"; + $details->country = "Australia"; + $details->geo = ""; + $details->latitude = "-37.821938"; + $details->longitude = "144.962095"; + $details->id = $this->m_oa_location->add_location($details); $group = new stdClass(); - $group->group_name = "Items in ".$details->location_name; + $group->group_name = "Items in ".$details->name; $group->group_padded_name = ''; - $group->group_description = "Items in ".$details->location_name; + $group->group_description = "Items in ".$details->name; $group->group_icon = 'location'; $group->group_category = 'location'; - $group->group_dynamic_select = "SELECT distinct(system.system_id) FROM system WHERE system.man_location_id = '".$details->location_id."' AND system.man_status = 'production'"; + $group->group_dynamic_select = "SELECT distinct(system.system_id) FROM system WHERE system.man_location_id = '".$details->id."' AND system.man_status = 'production'"; $group->group_parent = ''; $group->group_display_sql = ''; $group_id = $this->m_oa_group->insert_group($group); - $this->m_oa_location->set_group_id($details->location_id, $group_id); + $this->m_oa_location->set_group_id($details->id, $group_id); $this->m_oa_group->update_specific_group($group_id); - $details->location_name = "Perth Office"; - $details->location_type = "Office"; - $details->location_room = ""; - $details->location_suite = ""; - $details->location_level = ""; - $details->location_address = "1 Victoria Avenua"; - $details->location_postcode = "6000"; - $details->location_city = "Perth"; - $details->location_state = "Western Australia"; - $details->location_country = "Australia"; - $details->location_geo = ""; - $details->location_latitude = "-31.958617"; - $details->location_longitude = "115.864341"; - $details->location_id = $this->m_oa_location->add_location($details); + $details->name = "Perth Office"; + $details->type = "Office"; + $details->room = ""; + $details->suite = ""; + $details->level = ""; + $details->address = "1 Victoria Avenua"; + $details->postcode = "6000"; + $details->city = "Perth"; + $details->state = "Western Australia"; + $details->country = "Australia"; + $details->geo = ""; + $details->latitude = "-31.958617"; + $details->longitude = "115.864341"; + $details->id = $this->m_oa_location->add_location($details); $group = new stdClass(); - $group->group_name = "Items in ".$details->location_name; + $group->group_name = "Items in ".$details->name; $group->group_padded_name = ''; - $group->group_description = "Items in ".$details->location_name; + $group->group_description = "Items in ".$details->name; $group->group_icon = 'location'; $group->group_category = 'location'; - $group->group_dynamic_select = "SELECT distinct(system.system_id) FROM system WHERE system.man_location_id = '".$details->location_id."' AND system.man_status = 'production'"; + $group->group_dynamic_select = "SELECT distinct(system.system_id) FROM system WHERE system.man_location_id = '".$details->id."' AND system.man_status = 'production'"; $group->group_parent = ''; $group->group_display_sql = ''; $group_id = $this->m_oa_group->insert_group($group); - $this->m_oa_location->set_group_id($details->location_id, $group_id); + $this->m_oa_location->set_group_id($details->id, $group_id); $this->m_oa_group->update_specific_group($group_id); - $details->location_name = "New Zealand Office"; - $details->location_type = "Office"; - $details->location_room = ""; - $details->location_suite = ""; - $details->location_level = ""; - $details->location_address = "1 Willis Street"; - $details->location_postcode = "6011"; - $details->location_city = "Wellington"; - $details->location_state = ""; - $details->location_country = "New Zealand"; - $details->location_geo = ""; - $details->location_latitude = "-41.286772"; - $details->location_longitude = "174.776258"; - $details->location_id = $this->m_oa_location->add_location($details); + $details->name = "New Zealand Office"; + $details->type = "Office"; + $details->room = ""; + $details->suite = ""; + $details->level = ""; + $details->address = "1 Willis Street"; + $details->postcode = "6011"; + $details->city = "Wellington"; + $details->state = ""; + $details->country = "New Zealand"; + $details->geo = ""; + $details->latitude = "-41.286772"; + $details->longitude = "174.776258"; + $details->id = $this->m_oa_location->add_location($details); $group = new stdClass(); - $group->group_name = "Items in ".$details->location_name; + $group->group_name = "Items in ".$details->name; $group->group_padded_name = ''; - $group->group_description = "Items in ".$details->location_name; + $group->group_description = "Items in ".$details->name; $group->group_icon = 'location'; $group->group_category = 'location'; - $group->group_dynamic_select = "SELECT distinct(system.system_id) FROM system WHERE system.man_location_id = '".$details->location_id."' AND system.man_status = 'production'"; + $group->group_dynamic_select = "SELECT distinct(system.system_id) FROM system WHERE system.man_location_id = '".$details->id."' AND system.man_status = 'production'"; $group->group_parent = ''; $group->group_display_sql = ''; $group_id = $this->m_oa_group->insert_group($group); - $this->m_oa_location->set_group_id($details->location_id, $group_id); + $this->m_oa_location->set_group_id($details->id, $group_id); $this->m_oa_group->update_specific_group($group_id); - $details->location_name = "Brisbane Data Center"; - $details->location_type = "Data Center"; - $details->location_room = ""; - $details->location_suite = ""; - $details->location_level = ""; - $details->location_address = "20 Warf Street"; - $details->location_postcode = "4000"; - $details->location_city = "Brisbane"; - $details->location_state = "Queensland"; - $details->location_country = "Australia"; - $details->location_geo = ""; - $details->location_latitude = "-27.4654981"; - $details->location_longitude = "153.0297626"; - $details->location_id = $this->m_oa_location->add_location($details); + $details->name = "Brisbane Data Center"; + $details->type = "Data Center"; + $details->room = ""; + $details->suite = ""; + $details->level = ""; + $details->address = "20 Warf Street"; + $details->postcode = "4000"; + $details->city = "Brisbane"; + $details->state = "Queensland"; + $details->country = "Australia"; + $details->geo = ""; + $details->latitude = "-27.4654981"; + $details->longitude = "153.0297626"; + $details->id = $this->m_oa_location->add_location($details); $group = new stdClass(); - $group->group_name = "Items in ".$details->location_name; + $group->group_name = "Items in ".$details->name; $group->group_padded_name = ''; - $group->group_description = "Items in ".$details->location_name; + $group->group_description = "Items in ".$details->name; $group->group_icon = 'location'; $group->group_category = 'location'; - $group->group_dynamic_select = "SELECT distinct(system.system_id) FROM system WHERE system.man_location_id = '".$details->location_id."' AND system.man_status = 'production'"; + $group->group_dynamic_select = "SELECT distinct(system.system_id) FROM system WHERE system.man_location_id = '".$details->id."' AND system.man_status = 'production'"; $group->group_parent = ''; $group->group_display_sql = ''; $group_id = $this->m_oa_group->insert_group($group); - $this->m_oa_location->set_group_id($details->location_id, $group_id); + $this->m_oa_location->set_group_id($details->id, $group_id); $this->m_oa_group->update_specific_group($group_id); $details->org_name = "Open-AudIT Organisation"; diff --git a/code_igniter/application/controllers/admin_user.php b/code_igniter/application/controllers/admin_user.php index 97d410bea..d896d36d3 100644 --- a/code_igniter/application/controllers/admin_user.php +++ b/code_igniter/application/controllers/admin_user.php @@ -28,7 +28,7 @@ /** * @author Mark Unwin * - * @version 1.12.4 + * @version 1.12.6 * * @copyright Copyright (c) 2014, Opmantek * @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3 diff --git a/code_igniter/application/controllers/ajax.php b/code_igniter/application/controllers/ajax.php index 22c3cf849..7edf8a39c 100644 --- a/code_igniter/application/controllers/ajax.php +++ b/code_igniter/application/controllers/ajax.php @@ -28,7 +28,7 @@ /** * @author Mark Unwin * - * @version 1.12.4 + * @version 1.12.6 * * @copyright Copyright (c) 2014, Opmantek * @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3 @@ -51,10 +51,10 @@ public function __construct() $this->data['title'] = 'Open-AudIT'; - if (!isset($this->user->user_lang) or $this->user->user_lang == "") { + if (!isset($this->user->lang) or $this->user->lang == "") { $user_lang = "en"; } else { - $user_lang = $this->user->user_lang; + $user_lang = $this->user->lang; } $language_file = APPPATH."/views/lang/".$user_lang.".inc"; @@ -118,7 +118,7 @@ public function update_config() // must be an admin to access this function - if ($this->user->user_admin != 'y') { + if ($this->user->admin != 'y') { $log_details->message = "A non-admin user attempted to use ajax/update_config."; stdlog($log_details); if (isset($_SERVER['HTTP_REFERER']) and $_SERVER['HTTP_REFERER'] > "") { @@ -176,7 +176,7 @@ public function update_config() $config_value = ''; } - $this->m_oa_config->update_config($config_name, $config_value, $this->user->user_id, date('Y-m-d H:i:s')); + $this->m_oa_config->update_config($config_name, $config_value, $this->user->id, date('Y-m-d H:i:s')); $masked = str_pad('', strlen($config_value), '*'); if ($config_name == 'default_windows_password' and $this->config->config['show_passwords'] == 'n') { @@ -213,7 +213,7 @@ public function update_system_man() $this->load->model("m_system"); $this->load->model("m_oa_group"); $this->load->model("m_devices_components"); - $access_level = $this->m_system->get_system_access_level($this->data['system_id'], $this->user->user_id); + $access_level = $this->m_system->get_system_access_level($this->data['system_id'], $this->user->id); if ($access_level > 7) { $field_ok = 0; $this->load->model("m_edit_log"); @@ -235,7 +235,7 @@ public function update_system_man() $query = $this->db->query($sql, $data_array); $row = $query->row(); $group_id = $row->group_id; - $group_result = $this->m_system->get_system_groups($this->data['system_id'], $this->user->user_id); + $group_result = $this->m_system->get_system_groups($this->data['system_id'], $this->user->id); $group_allowed = 'n'; foreach ($group_result as $row) { if ($row->group_id == $group_id) { @@ -309,36 +309,33 @@ public function update_system_man() $this->load->model("m_oa_location"); $data = $this->m_oa_location->get_location($this->data['field_data']); foreach ($data as $key) { - if ($key->location_address == '') { - $key->location_address = '-'; + if ($key->address == '') { + $key->address = '-'; } - if ($key->location_city == '') { - $key->location_city = '-'; + if ($key->city == '') { + $key->city = '-'; } - if ($key->location_state == '') { - $key->location_state = '-'; + if ($key->state == '') { + $key->state = '-'; } - if ($key->location_country == '') { - $key->location_country = '-'; + if ($key->country == '') { + $key->country = '-'; } - echo "

".htmlentities($key->location_name)."

\n"; - echo "

".htmlentities($key->location_address)."

\n"; - echo "

".htmlentities($key->location_city)."

\n"; - echo "

".htmlentities($key->location_state)."

\n"; - echo "

".htmlentities($key->location_country)."

\n"; + echo "

".htmlentities($key->name)."

\n"; + echo "

".htmlentities($key->address)."

\n"; + echo "

".htmlentities($key->city)."

\n"; + echo "

".htmlentities($key->state)."

\n"; + echo "

".htmlentities($key->country)."

\n"; } } if (mb_substr_count($this->data['field_name'], 'man_org_id') > 0) { $this->load->model("m_oa_org"); $key = $this->m_oa_org->get_org_details($this->data['field_data']); - if (empty($key->org_name)) { - $key->org_name = '-'; + if (empty($key->name)) { + $key->name = '-'; } - echo "

".$key->org_name."

\n"; - echo "

".htmlentities($key->org_parent_name)."

\n"; - #echo "

".htmlentities($key->contact_id)."

\n"; - #echo "

".htmlentities($key->org_comments)."

\n"; - ##echo "

" . $key->org_picture . "

\n"; + echo "

".$key->name."

\n"; + echo "

".htmlentities($key->parent_name)."

\n"; } # finally update any groups that this change has caused @@ -359,7 +356,7 @@ public function get_fields() stdlog($log_details); unset($log_details); - if ($this->user->user_admin == 'y') { + if ($this->user->admin == 'y') { $this->load->model("m_oa_group"); $fields = $this->m_oa_group->get_fields($this->uri->segment(3, '')); echo " + + + + + + \ No newline at end of file diff --git a/code_igniter/application/views/theme-bootstrap/v_devices_collection.php b/code_igniter/application/views/theme-bootstrap/v_devices_collection.php new file mode 100644 index 000000000..5104207e0 --- /dev/null +++ b/code_igniter/application/views/theme-bootstrap/v_devices_collection.php @@ -0,0 +1,213 @@ + +# +# For further information on Open-AudIT or for a license other than AGPL please see +# www.opmantek.com or email contact@opmantek.com +# +# ***************************************************************************** + +/** + * @author Mark Unwin + * + * @version 1.12.6 + * + * @copyright Copyright (c) 2014, Opmantek + * @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3 + */ +$refine_link = $_SERVER["REQUEST_URI"]; +if (strpos($refine_link, '?') === false) { + $refine_link .= '?'; +} else if (strrpos($refine_link, '&') !== strlen($refine_link)-1){ + $refine_link .= '&'; +} +?> + +
+
+

+ Devices + response->filtered . ' of ' . $this->response->total . ' results'; ?> +

+
+
+ +
+
+
+ + + + +
+
+
+response->filter) > 0) { + echo '
'; + echo '
'; + #echo '
'; + foreach ($this->response->filter as $item) { + if ($item->operator == '=') { + $label = 'label-success'; + } else if ($item->operator == '!=') { + $label = 'label-danger'; + } else { + $label = 'label-info'; + } + if ($item->operator == '=') { + $operator = ''; + } else { + $operator = $item->operator; + } + $link = str_replace($item->name . '=' . $operator . $item->value, '', $_SERVER["REQUEST_URI"]); + $link = str_replace($item->name . '=' . $operator . urlencode($item->value), '', $_SERVER["REQUEST_URI"]); + if ($item->name == 'status' and $item->operator == '=' and $item->value == 'production') { + $link = $refine_link . 'man_status=!=""'; + } + $label = 'label-info'; + echo '' . $item->name . ' ' . $item->operator . ' ' . urldecode($item->value) . '  × '; + } + echo '
'; + echo '
'; +} + +if (!empty($this->response->data)) { ?> +
+ + + +response->data[0]); + foreach ($properties as $key => $value) { + if (strpos($key, '.') !== false) { + $key = substr($key, strpos($key, '.')+1); + } + if ($key == 'man_ip_address' or $key == 'system.man_ip_address' or $key == 'ip_padded') { + continue; + } + if ($key == 'system_id') { + $key = 'ID'; + } + $key = str_replace('man_', '', $key); + $key = str_replace('_', ' ', $key); + $key = str_replace('os ', 'OS ', $key); + $key = str_replace(' id', ' ID', $key); + $key = ucwords($key); + if ($key == 'Ip') { $key = 'IP'; } + if (stripos($key, 'icon') !== false) { + echo " \n"; + } else { + echo " \n"; + } + } + ?> + + + + +response->data as $item) { + + # grab the system_id if it exists + $system_id = ''; + if (!empty($item->system_id)) { + $system_id = $item->system_id; + } + if (!empty($item->{'system.system_id'})) { + $system_id = $item->{'system.system_id'}; + } + echo " \n"; + + # for every attribute in our retrned row + foreach ($properties as $property => $value) { + + # remove any extra spacing + $property = trim($property); + # do we have a .? + # if so, set the property name as the first character after the . onwards + // if (strpos($property, '.') !== false) { + // $property = substr($property, strpos($property, '.')); + // } + # never output these - we shoudl have an attribute called ip instead + if ($property == 'man_ip_address' or $property == 'system.man_ip_address' or $property == 'ip_padded') { + continue; + } + + if (!empty($item->$property)) { + if ($property == 'ip' and !empty($item->ip_padded)) { + echo " \n"; + } elseif ($property == 'system_id' or $property == 'system.system_id') { + echo " \n"; + } elseif ($property == 'icon' or $property == 'system.icon') { + echo " \n"; + } else { + if (strlen($item->$property) > 50) { + $display = substr($item->$property, 0, 50) . '....'; + } else { + $display = $item->$property; + } + echo " \n"; + } + } else { + echo " \n"; + } + } + + if (!empty($system_id)) { + echo " \n"; + } + echo " \n"; + } + ?> + +
" . __($key) . "" . __($key) . " +   + +
" . str_replace('.', '', $item->ip_padded) . "" . $item->ip . "" . $item->$property . "$property))).".svg\" style='border-width:0px; width:24px;' title=\"".htmlentities($item->$property)."\" alt=\"".htmlentities($item->$property)."\"/>Exclude
Include
\">
 " . $display . "
+
+response->error)) { + echo '
'; + echo "
\n";
+  print_r($this->response->error);
+  echo "
\n"; +} +?> +
+ + + + + \ No newline at end of file diff --git a/code_igniter/application/views/theme-bootstrap/v_devices_read.php b/code_igniter/application/views/theme-bootstrap/v_devices_read.php new file mode 100644 index 000000000..a822e1e7f --- /dev/null +++ b/code_igniter/application/views/theme-bootstrap/v_devices_read.php @@ -0,0 +1,1051 @@ + +# +# For further information on Open-AudIT or for a license other than AGPL please see +# www.opmantek.com or email contact@opmantek.com +# +# ***************************************************************************** + +/** + * @author Mark Unwin + * + * @version 1.6.4 + * + * @copyright Copyright (c) 2014, Opmantek + * @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3 + */ +#print_r($data); +?> + + + + +os_group) == 'windows') { + $attributes['software'] = array('name' => 'Name', 'version' => 'Version', 'installed_on' => 'Installed On', 'installed_by' => 'Installed By', 'first_seen' => 'First Seen', 'location' => 'Location', 'type' => 'Type'); + $attributes['service'] = array('name' => 'Name', 'description' => 'Description', 'executable' => 'Executable', 'user' => 'User', 'start_mode' => 'Start Mode', 'state' => 'State'); + $attributes['disk'] = array('manufacturer' => 'Manufacturer', 'model' => 'Model', 'serial' => 'Serial', 'hard_drive_index' => 'Index', 'interface_type' => 'Interface', 'partition_count' => 'Partitions', 'size' => 'Size', 'status' => 'Status', 'firmware' => 'Firmware'); + $attributes['partition'] = array('mount_type' => 'Type', 'mount_point' => 'Mount Point', 'device' => 'Device', 'hard_drive_index' => 'Disk Index', 'format' => 'Format', 'size' => 'Size', 'used' => 'Used', 'free' => 'Free', 'type' => 'Type'); +} else { + $attributes['software'] = array('name' => 'Name', 'version' => 'Version', 'first_seen' => 'First Seen'); + $attributes['service'] = array('name' => 'Name', 'description' => 'Description', 'start_mode' => 'Start Mode', 'state' => 'State'); + $attributes['disk'] = array('manufacturer' => 'Manufacturer', 'model' => 'Model', 'model_family' => 'Family', 'serial' => 'Serial', 'hard_drive_index' => 'Index', 'interface_type' => 'Interface', 'partition_count' => 'Partitions', 'size' => 'Size', 'status' => 'Status', 'firmware' => 'Firmware'); + $attributes['partition'] = array('mount_type' => 'Type', 'mount_point' => 'Mount Point', 'device' => 'Device', 'hard_drive_index' => 'Disk Index', 'format' => 'Format', 'size' => 'Size', 'used' => 'Used', 'free' => 'Free', 'type' => 'Type'); +} + +?> + + + +
+
+
+
+ +
+
+
    +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
+
+
+
+ +
+ +
+
+
    + +
  • + +
+
+
+ + + +
+ +
+
+
    + +
  • + +
+
+
+ + + +
+ +
+
+
    + +
  • + +
+
+
+ + +
+
+ +
+ + +
+
+

Device Details

+
+
+
+
+
+
+ +
+ +
+ + + + +
+
+ + +
+ +
+ + + + +
+
+ + +
+ +
+ + + + +
+
+ + +
+ +
+ + +
+
+ + type == 'computer') { + ?> +
+ +
+ + +
+
+ + + +
+ +
+ + + + +
+
+ + +
+ +
+ + +
+
+ +
+ +
+ + +
+
+ +
+ +
+ + + + +
+
+ + +
+ +
+ + + + +
+
+ + +
+ +
+ + + + +
+
+ + +
+ +
+ + + + +
+
+ +
+
+
+ +
+ + + + +
+
+
+ +
+ + + + +
+
+
+ +
+ + + + +
+
+ type == 'computer') { + ?> +
+ +
+ + + + +
+
+ +
+ +
+ uptime) or $data['system'][0]->uptime == '') { + $uptime = ''; + } else { + $uptime = intval($data['system'][0]->uptime/ 86400) . ' days, ' . gmdate("H:i:s", $data['system'][0]->uptime); + } + ?> + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ type == 'computer') { + ?> +
+ +
+ + + + +
+
+ + form_factor) == 'virtual') { + ?> +
+ +
+ + + + +
+
+
+ +
+ + + + +
+
+ + type, 'printer') !== false) { + ?> +
+ +
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ + +
+
+
+
+ +

+ + + + + + +
+
+
+
+
+
+ + + + + +
+
+
+

+ +
+
+
+ $value) { + if ($key != 'id' and $key != 'system_id' and $key != 'current' and $key != 'first_seen' and $key != 'last_seen') { + $show_key = ucfirst(str_replace('_', ' ', $key)); + ?> +
+ +
+ +
+
+ +
+
+
+ + + + + + 0) { + ?> +
+
+
+

+ +
+
+
+ + + + $value) { + echo ""; + } + } else { + foreach ($data[$item][0] as $key => $value) { + if ($key != 'id' and $key != 'system_id' and $key != 'current' and $key != 'first_seen' and $key != 'last_seen' and $key != 'ip_padded') { + # some special cases for cisco modules + if ($item == 'module') { + if ($key != 'software_revision' and $key != 'object_id' and $key != 'class') { + echo ''; + } + } else { + # everything else + if (is_int($value)) { + echo "\n"; + } + } + } + } + } + ?> + + + + "; + foreach ($attributes[$item] as $key => $value) { + if (is_integer($row->$key)) { + echo "\n"; + } else { + echo "\n"; + } + } + echo "\n"; + } + } else { + foreach ($data[$item] as $row) { + echo ''; + foreach ($row as $key => $value) { + if ($key != 'id' and $key != 'system_id' and $key != 'current' and $key != 'first_seen' and $key != 'last_seen' and $key != 'ip_padded') { + # some special cases for cisco modules + if ($item == 'module') { + if ($key != 'software_revision' and $key != 'object_id' and $key != 'class') { + if (is_int($value)) { + echo "\n"; + } else { + echo "\n"; + } + } + } else { + # everything else + if (is_int($value)) { + echo "\n"; + } else { + echo "\n"; + } + } + } + } + echo ''; + } + } + ?> + +
$value' . ucwords(str_replace('_', ' ', $key)) . '" . ucwords(str_replace('_', ' ', $key)) . "\n"; + } else { + echo "" . ucwords(str_replace('_', ' ', $key)) . "
" . number_format($row->$key) . "" . $row->$key . "
" . number_format($value) . "" . $value . "" . number_format($value) . "" . $value . "
+
+
+
+ + + + + +type == 'computer') { + $list = array ('network' => 'ip', 'disk' => 'partition'); + foreach ($list as $item => $sub_item) { + if (isset($data[$item]) and count($data[$item]) > 0) { + ?> +
+
+
+

+ +
+
+
+ '; + echo '
'; + echo '
'; + $row_attribute_count = intval(count((array)$item_row) / 2); + $count = 0; + echo '
'; + foreach ($item_row as $key => $value) { + if ($key != 'id' and $key != 'system_id' and $key != 'current' and $key != 'first_seen' and $key != 'last_seen') { + $count++; + $show_key = ucwords(str_replace('_', ' ', $key)); + if ($count == $row_attribute_count) { + echo "
\n"; + } + ?> +
+ +
+ +
+
+ '; # end of class = md-col-6 + echo '
'; # end of class = row + ?> + + + + $sub_value) { + if ($sub_key != 'id' and $sub_key != 'system_id' and $sub_key != 'current' and $sub_key != 'first_seen' and $sub_key != 'last_seen' and $sub_key != 'ip_padded') { + ?> + + + + + + net_index == $sub_row->net_index) or ($item == 'disk' and $item_row->hard_drive_index == $sub_row->hard_drive_index)) { + ?> + + $sub_value) { + if ($sub_key != 'id' and $sub_key != 'system_id' and $sub_key != 'current' and $sub_key != 'first_seen' and $sub_key != 'last_seen' and $sub_key != 'ip_padded') { + if (is_int($sub_value)) { + echo "\n"; + } else { + echo "\n"; + } + } + } + ?> + + + +
" . number_format($sub_value) . "" . $sub_value . "
+
+
+ +
+
+
+ 0) { + ?> +
+
+

+
+ + + + + + + + + + + + + + + + speed) < 1000) { + $speed = number_format(intval($row->speed))." b/s"; + } + if (intval($row->speed) >= 1000 and intval($row->speed) < 1000000) { + $speed = number_format(intval($row->speed / 1000))." Kb/s"; + } + if (intval($row->speed) >= 1000000 and intval($row->speed) < 1000000000) { + $speed = number_format(intval($row->speed / 1000 / 1000))." Mb/s"; + } + if (intval($row->speed) >= 1000000000) { + $speed = number_format(intval($row->speed / 1000 / 1000 / 1000))." Gb/s"; + } + + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + } + ?> + +
' . $row->net_index . '' . $row->mac . '' . $row->connection . '' . $row->description . '' . $row->alias . '' . $row->type . '' . $row->ip_enabled . '' . $row->ifadminstatus . '' . $speed . '
+
+ 0) { + ?> + + + + + + + + + + + + + '; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + } + ?> + +
' . $row->net_index . '' . $row->mac . '' . $row->ip . '' . $row->netmask . '' . $row->cidr . '' . $row->network . '
+ +
+
+ +
+
+ \ No newline at end of file diff --git a/code_igniter/application/views/theme-bootstrap/v_error_good.php b/code_igniter/application/views/theme-bootstrap/v_error_good.php new file mode 100644 index 000000000..13ad63c6c --- /dev/null +++ b/code_igniter/application/views/theme-bootstrap/v_error_good.php @@ -0,0 +1,53 @@ + +# +# For further information on Open-AudIT or for a license other than AGPL please see +# www.opmantek.com or email contact@opmantek.com +# +# ***************************************************************************** + +/** + * @author Mark Unwin + * + * @version 1.12.6 + * + * @copyright Copyright (c) 2014, Opmantek + * @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3 + */ +echo "

Error

\n"; +echo "
\n"; +if (!empty($this->response->errors)) { + echo "
\n";
+    print_r($this->response->errors);
+    echo "
\n"; +} + +if (!empty($this->response->error)) { + echo "
\n";
+    print_r($this->response->error);
+    echo "
\n"; +} + +?> +
+ \ No newline at end of file diff --git a/code_igniter/application/views/theme-bootstrap/v_lang.php b/code_igniter/application/views/theme-bootstrap/v_lang.php new file mode 100644 index 000000000..041ecb0e9 --- /dev/null +++ b/code_igniter/application/views/theme-bootstrap/v_lang.php @@ -0,0 +1,87 @@ + +# +# For further information on Open-AudIT or for a license other than AGPL please see +# www.opmantek.com or email contact@opmantek.com +# +# ***************************************************************************** + +/** + * @author Mark Unwin + * + * @version 1.6.4 + * + * @copyright Copyright (c) 2014, Opmantek + * @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3 + */ +if (!isset($this->user->lang) or $this->user->lang == "") { + $GLOBALS["user_lang"] = 'en'; +} else { + $GLOBALS["user_lang"] = $this->user->lang; +} + +$language_file = APPPATH."/views/lang/".$GLOBALS["user_lang"].".inc"; +$language_file = APPPATH."views/lang/".$GLOBALS["user_lang"].".inc"; + +include $language_file; + +if (!function_exists('__')) { + function __($word) + { + + //Learning-Mode + //Only for Developers !!!! + $language_learning_mode = 0; + + if ($language_learning_mode == 1) { + $language_file = APPPATH."views/lang/".$GLOBALS["user_lang"].".inc"; + include $language_file; + } + $word = (string) $word; + if (isset($GLOBALS["lang"][$word])) { + return $GLOBALS["lang"][$word]; + } else { + //Learning-Mode + if ($language_learning_mode == 1 and isset($word) and $word != "") { + if (is_writable($language_file)) { + //Deleting + $buffer = ""; + $handle = fopen($language_file, "r"); + while (!feof($handle)) { + $line = fgets($handle, 4096); + if (!preg_match('/\?>/', $line)) { + $buffer .= $line; + } + } + fclose($handle); + //Writing new Variables + $handle = fopen($language_file, "w+"); + fwrite($handle, $buffer.""."\$GLOBALS[\"lang\"][\"$word\"]=\"$word\";\n?>"); + fclose($handle); + } else { + die("Language-Learning-Mode, but $language_file not writeable"); + } + } + + return $word; + } + } +} diff --git a/code_igniter/application/views/theme-bootstrap/v_networks_collection_good.php b/code_igniter/application/views/theme-bootstrap/v_networks_collection_good.php new file mode 100644 index 000000000..42a2c4a4c --- /dev/null +++ b/code_igniter/application/views/theme-bootstrap/v_networks_collection_good.php @@ -0,0 +1,77 @@ + +# +# For further information on Open-AudIT or for a license other than AGPL please see +# www.opmantek.com or email contact@opmantek.com +# +# ***************************************************************************** + +/** + * @author Mark Unwin + * + * @version 1.12.6 + * + * @copyright Copyright (c) 2014, Opmantek + * @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3 + */ +?> +
+
+

+ Devices + Count: response->data); ?> +

+
+
+ + + + + + + + + + + + + + response->data as $item): + $edit_pic = ''; + $delete_pic = ''; + ?> + + + + + + + + + + + +
id)?>name)?>description)?>edited_by)?>edited_date)?>
+
+
+ diff --git a/code_igniter/application/views/theme-bootstrap/v_orgs_collection.php b/code_igniter/application/views/theme-bootstrap/v_orgs_collection.php new file mode 100644 index 000000000..8eee04a10 --- /dev/null +++ b/code_igniter/application/views/theme-bootstrap/v_orgs_collection.php @@ -0,0 +1,166 @@ + +# +# For further information on Open-AudIT or for a license other than AGPL please see +# www.opmantek.com or email contact@opmantek.com +# +# ***************************************************************************** + +/** + * @author Mark Unwin + * + * @version 1.12.6 + * + * @copyright Copyright (c) 2014, Opmantek + * @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3 + */ +#echo "
\n"; +if (!empty($this->response->data)) { +?> +
+
+

+ Orgs + response->filtered . ' of ' . $this->response->total . ' results'; ?> +

+
+
+ +
+
+
+ + + + +
+
+
+ response->filter) > 0) { + echo '
'; + echo '
'; + #echo '
'; + foreach ($this->response->filter as $item) { + if ($item->operator == '=') { + $label = 'label-success'; + } else if ($item->operator == '!=') { + $label = 'label-danger'; + } else { + $label = 'label-info'; + } + if ($item->operator == '=') { + $operator = ''; + } else { + $operator = $item->operator; + } + $link = str_replace($item->name . '=' . $operator . $item->value, '', $_SERVER["REQUEST_URI"]); + $link = str_replace($item->name . '=' . $operator . urlencode($item->value), '', $_SERVER["REQUEST_URI"]); + if ($item->name == 'status' and $item->operator == '=' and $item->value == 'production') { + $link = $refine_link . 'man_status=!=""'; + } + $label = 'label-info'; + echo '' . $item->name . ' ' . $item->operator . ' ' . urldecode($item->value) . '  × '; + } + echo '
'; + echo '
'; + } ?> + + + + + + + + + + + + + + + + + + + + + + + + + + 0) { + foreach ($data as $key): + $edit_pic = ''; + $delete_pic = ''; + if ($key->name == '') { + $key->name = '-'; + } + if ($key->group_id != '0') { + $show_pic = ''; + $deactivate_pic = ''; + $activate_pic = ''; + } else { + $show_pic = ''; + $deactivate_pic = ''; + $activate_pic = ''; + } + ?> + + + + + + + + + + + + + + + + + + + + + + +
device_count?>name)?>comments)?>parent_name)?>
 
+
+
+response->error)) { + echo "
\n";
+    print_r($error);
+    echo "
\n"; +} +?> +
+ \ No newline at end of file diff --git a/code_igniter/application/views/theme-bootstrap/v_template.php b/code_igniter/application/views/theme-bootstrap/v_template.php new file mode 100644 index 000000000..272958ce0 --- /dev/null +++ b/code_igniter/application/views/theme-bootstrap/v_template.php @@ -0,0 +1,64 @@ + +# +# For further information on Open-AudIT or for a license other than AGPL please see +# www.opmantek.com or email contact@opmantek.com +# +# ***************************************************************************** + +/** + * @author Mark Unwin + * + * @version 1.6.4 + * + * @copyright Copyright (c) 2014, Opmantek + * @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3 + */ +include "v_lang.php"; +?> + + + + + + + Open-AudIT + + + + + + + + + + + +
+ +
+ + diff --git a/code_igniter/application/views/theme-tango/include_header.php b/code_igniter/application/views/theme-tango/include_header.php index 1ccfbc76c..aed1a0032 100644 --- a/code_igniter/application/views/theme-tango/include_header.php +++ b/code_igniter/application/views/theme-tango/include_header.php @@ -27,7 +27,7 @@ /** * @author Mark Unwin * - * @version 1.12.4 + * @version 1.12.6 * * @copyright Copyright (c) 2014, Opmantek * @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3 @@ -53,13 +53,13 @@
- user->user_admin == 'y') { - if (isset($this->user->user_debug) and $this->user->user_debug == 'y') { + user->admin == 'y') { + if (isset($this->user->debug) and $this->user->debug == 'y') { $image = ''; } else { $image = ''; @@ -70,7 +70,7 @@

Version
config->item('display_version')); ?> - config->item('internal_version') < $this->config->item('web_internal_version') and ($this->user->user_admin == 'y')) { + config->item('internal_version') < $this->config->item('web_internal_version') and ($this->user->admin == 'y')) { echo '
upgrade'; } ?>
diff --git a/code_igniter/application/views/theme-tango/include_menu.php b/code_igniter/application/views/theme-tango/include_menu.php index f0f7701af..eeab0d16e 100644 --- a/code_igniter/application/views/theme-tango/include_menu.php +++ b/code_igniter/application/views/theme-tango/include_menu.php @@ -27,7 +27,7 @@ /** * @author Mark Unwin * - * @version 1.12.4 + * @version 1.12.6 * * @copyright Copyright (c) 2014, Opmantek * @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3 @@ -79,7 +79,7 @@ $new_object->report_name = 'Partition Alerts'; $menu[] = $new_object; - if ($this->user->user_sam > '0') { + if ($this->user->sam > '0') { $new_object = new stdClass(); $new_object->report_id = ''; $new_object->report_name = 'Software Licensing'; @@ -118,7 +118,7 @@ function cmp($a, $b) --> user->user_admin == 'y') { + if ($this->user->admin == 'y') { ?>
  • @@ -211,6 +211,12 @@ function cmp($a, $b)
  • +
  • +
      +
    • +
    • +
    +
    • @@ -244,7 +250,7 @@ function cmp($a, $b) user->user_admin == 'y') and (isset($this->config->config['nmis']) and $this->config->config['nmis'] == 'y')) { ?> + if (($this->user->admin == 'y') and (isset($this->config->config['nmis']) and $this->config->config['nmis'] == 'y')) { ?>
      • @@ -298,7 +304,7 @@ function cmp($a, $b) - config->config['non_admin_search'] == 'y') or ($this->user->user_admin == 'y')) { ?> + config->config['non_admin_search'] == 'y') or ($this->user->admin == 'y')) { ?>
      • @@ -322,7 +328,7 @@ function cmp($a, $b) } if ($hit == 'y') { ?> -
      • RSS Link
      • +
      • RSS Link
      • <?php echo __('Export as XML')?>
      • diff --git a/code_igniter/application/views/theme-tango/popup_css.php b/code_igniter/application/views/theme-tango/popup_css.php index 4c0e51e80..ae6b53570 100644 --- a/code_igniter/application/views/theme-tango/popup_css.php +++ b/code_igniter/application/views/theme-tango/popup_css.php @@ -27,7 +27,7 @@ /** * @author Mark Unwin * - * @version 1.12.4 + * @version 1.12.6 * * @copyright Copyright (c) 2014, Opmantek * @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3 diff --git a/code_igniter/application/views/theme-tango/popup_js.php b/code_igniter/application/views/theme-tango/popup_js.php index a55c4e3b0..ba8073a80 100644 --- a/code_igniter/application/views/theme-tango/popup_js.php +++ b/code_igniter/application/views/theme-tango/popup_js.php @@ -27,7 +27,7 @@ /** * @author Mark Unwin * - * @version 1.12.4 + * @version 1.12.6 * * @copyright Copyright (c) 2014, Opmantek * @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3 diff --git a/code_igniter/application/views/theme-tango/v_add_connection.php b/code_igniter/application/views/theme-tango/v_add_connection.php index b6d3603b6..6e48094f0 100644 --- a/code_igniter/application/views/theme-tango/v_add_connection.php +++ b/code_igniter/application/views/theme-tango/v_add_connection.php @@ -27,7 +27,7 @@ /** * @author Mark Unwin * - * @version 1.12.4 + * @version 1.12.6 * * @copyright Copyright (c) 2014, Opmantek * @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3 @@ -48,7 +48,7 @@ - +

        @@ -58,11 +58,11 @@

        diff --git a/code_igniter/application/views/theme-tango/v_add_device.php b/code_igniter/application/views/theme-tango/v_add_device.php index 70648e2e1..a1401b61b 100644 --- a/code_igniter/application/views/theme-tango/v_add_device.php +++ b/code_igniter/application/views/theme-tango/v_add_device.php @@ -27,7 +27,7 @@ /** * @author Mark Unwin * - * @version 1.12.4 + * @version 1.12.6 * * @copyright Copyright (c) 2014, Opmantek * @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3 diff --git a/code_igniter/application/views/theme-tango/v_add_field.php b/code_igniter/application/views/theme-tango/v_add_field.php index d17455dc6..f89d97d4e 100644 --- a/code_igniter/application/views/theme-tango/v_add_field.php +++ b/code_igniter/application/views/theme-tango/v_add_field.php @@ -27,7 +27,7 @@ /** * @author Mark Unwin * - * @version 1.12.4 + * @version 1.12.6 * * @copyright Copyright (c) 2014, Opmantek * @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3 diff --git a/code_igniter/application/views/theme-tango/v_add_group.php b/code_igniter/application/views/theme-tango/v_add_group.php index 86049a49c..e1747cee9 100644 --- a/code_igniter/application/views/theme-tango/v_add_group.php +++ b/code_igniter/application/views/theme-tango/v_add_group.php @@ -27,7 +27,7 @@ /** * @author Mark Unwin * - * @version 1.12.4 + * @version 1.12.6 * * @copyright Copyright (c) 2014, Opmantek * @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3 @@ -68,7 +68,7 @@

        @@ -139,7 +139,7 @@
        @@ -140,28 +134,28 @@ diff --git a/code_igniter/application/views/theme-tango/v_add_locations.php b/code_igniter/application/views/theme-tango/v_add_locations.php index 84195b077..2663cc330 100644 --- a/code_igniter/application/views/theme-tango/v_add_locations.php +++ b/code_igniter/application/views/theme-tango/v_add_locations.php @@ -27,7 +27,7 @@ /** * @author Mark Unwin * - * @version 1.12.4 + * @version 1.12.6 * * @copyright Copyright (c) 2014, Opmantek * @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3 diff --git a/code_igniter/application/views/theme-tango/v_add_org.php b/code_igniter/application/views/theme-tango/v_add_org.php index fcceda6a7..690ba3dc3 100644 --- a/code_igniter/application/views/theme-tango/v_add_org.php +++ b/code_igniter/application/views/theme-tango/v_add_org.php @@ -27,7 +27,7 @@ /** * @author Mark Unwin * - * @version 1.12.4 + * @version 1.12.6 * * @copyright Copyright (c) 2014, Opmantek * @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3 @@ -40,29 +40,26 @@ echo form_open('admin_org/add_org')."\n"; ?> -
        +
         
        -

        ' />

        -

        ' />

        +

        -

        ' />

        -

        ' />

        -

        ' />

        -

        ' />

        - -

        ' />

        +

        ' />

        +

        ' />

        +

        ' />

        +

        ' />

        +

        ' />

        -

        ' />

        -

        ' />

        -

        ' />

        -

        ' />

        -

        ' />

        - - - - - -

        ' />

        -

        ' />

        +

        ' />

        +

        ' />

        +

        ' />

        +

        ' />

        +

        ' />

        +

        ' />

        +

        ' />


        @@ -125,9 +119,9 @@




        -

        -

        -

        : ' checked />

        +

        +

        +

        : ' checked />

        'submit', 'name' => 'submit'), __('Submit') ); ?>

        -

        -

        -

        +

        +

        - -

        -

        -

        +

        +

        'submit', 'name' => 'submit'), __('Submit') ); ?>

        session->flashdata('message'); ?> 

        - diff --git a/code_igniter/application/views/theme-tango/v_add_orgs.php b/code_igniter/application/views/theme-tango/v_add_orgs.php index 2880f96d4..565c9ff3d 100644 --- a/code_igniter/application/views/theme-tango/v_add_orgs.php +++ b/code_igniter/application/views/theme-tango/v_add_orgs.php @@ -27,7 +27,7 @@ /** * @author Mark Unwin * - * @version 1.12.4 + * @version 1.12.6 * * @copyright Copyright (c) 2014, Opmantek * @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3 diff --git a/code_igniter/application/views/theme-tango/v_add_reports.php b/code_igniter/application/views/theme-tango/v_add_reports.php index 6cec841fe..3ff3d9ef6 100644 --- a/code_igniter/application/views/theme-tango/v_add_reports.php +++ b/code_igniter/application/views/theme-tango/v_add_reports.php @@ -27,7 +27,7 @@ /** * @author Mark Unwin * - * @version 1.12.4 + * @version 1.12.6 * * @copyright Copyright (c) 2014, Opmantek * @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3 diff --git a/code_igniter/application/views/theme-tango/v_add_script_audit_windows.php b/code_igniter/application/views/theme-tango/v_add_script_audit_windows.php index 80b71f86c..8e07865f7 100644 --- a/code_igniter/application/views/theme-tango/v_add_script_audit_windows.php +++ b/code_igniter/application/views/theme-tango/v_add_script_audit_windows.php @@ -27,7 +27,7 @@ /** * @author Mark Unwin * - * @version 1.12.4 + * @version 1.12.6 * * @copyright Copyright (c) 2014, Opmantek * @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3 @@ -87,7 +87,7 @@

        diff --git a/code_igniter/application/views/theme-tango/v_add_system.php b/code_igniter/application/views/theme-tango/v_add_system.php index e169aa7b3..8e6a961ba 100644 --- a/code_igniter/application/views/theme-tango/v_add_system.php +++ b/code_igniter/application/views/theme-tango/v_add_system.php @@ -27,7 +27,7 @@ /** * @author Mark Unwin * - * @version 1.12.4 + * @version 1.12.6 * * @copyright Copyright (c) 2014, Opmantek * @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3 @@ -60,13 +60,13 @@ location_id."'>".$location->location_name."<\/option>"; + $location_form .= "