├── ci_vue
├── system
│ ├── .htaccess
│ ├── fonts
│ │ ├── texb.ttf
│ │ └── index.html
│ ├── index.html
│ ├── core
│ │ ├── index.html
│ │ ├── Model.php
│ │ ├── Controller.php
│ │ ├── Benchmark.php
│ │ ├── Utf8.php
│ │ ├── Lang.php
│ │ └── Exceptions.php
│ ├── database
│ │ ├── index.html
│ │ ├── drivers
│ │ │ ├── index.html
│ │ │ ├── cubrid
│ │ │ │ ├── index.html
│ │ │ │ ├── cubrid_utility.php
│ │ │ │ └── cubrid_result.php
│ │ │ ├── mssql
│ │ │ │ ├── index.html
│ │ │ │ ├── mssql_utility.php
│ │ │ │ └── mssql_result.php
│ │ │ ├── mysql
│ │ │ │ ├── index.html
│ │ │ │ ├── mysql_result.php
│ │ │ │ └── mysql_utility.php
│ │ │ ├── mysqli
│ │ │ │ ├── index.html
│ │ │ │ ├── mysqli_utility.php
│ │ │ │ └── mysqli_result.php
│ │ │ ├── oci8
│ │ │ │ ├── index.html
│ │ │ │ ├── oci8_utility.php
│ │ │ │ └── oci8_result.php
│ │ │ ├── odbc
│ │ │ │ ├── index.html
│ │ │ │ └── odbc_utility.php
│ │ │ ├── pdo
│ │ │ │ ├── index.html
│ │ │ │ ├── pdo_utility.php
│ │ │ │ └── pdo_result.php
│ │ │ ├── sqlite
│ │ │ │ ├── index.html
│ │ │ │ ├── sqlite_utility.php
│ │ │ │ └── sqlite_result.php
│ │ │ ├── sqlsrv
│ │ │ │ ├── index.html
│ │ │ │ ├── sqlsrv_utility.php
│ │ │ │ └── sqlsrv_result.php
│ │ │ └── postgre
│ │ │ │ ├── index.html
│ │ │ │ ├── postgre_utility.php
│ │ │ │ └── postgre_result.php
│ │ ├── DB.php
│ │ └── DB_cache.php
│ ├── helpers
│ │ ├── index.html
│ │ ├── language_helper.php
│ │ ├── email_helper.php
│ │ ├── path_helper.php
│ │ ├── xml_helper.php
│ │ ├── number_helper.php
│ │ ├── directory_helper.php
│ │ ├── typography_helper.php
│ │ ├── cookie_helper.php
│ │ ├── array_helper.php
│ │ ├── download_helper.php
│ │ └── security_helper.php
│ ├── language
│ │ ├── index.html
│ │ └── english
│ │ │ ├── index.html
│ │ │ ├── number_lang.php
│ │ │ ├── migration_lang.php
│ │ │ ├── unit_test_lang.php
│ │ │ ├── profiler_lang.php
│ │ │ ├── ftp_lang.php
│ │ │ ├── calendar_lang.php
│ │ │ ├── upload_lang.php
│ │ │ ├── email_lang.php
│ │ │ ├── form_validation_lang.php
│ │ │ ├── imglib_lang.php
│ │ │ ├── db_lang.php
│ │ │ └── date_lang.php
│ └── libraries
│ │ ├── index.html
│ │ ├── Cache
│ │ ├── index.html
│ │ └── drivers
│ │ │ ├── index.html
│ │ │ ├── Cache_dummy.php
│ │ │ ├── Cache_apc.php
│ │ │ └── Cache_file.php
│ │ ├── javascript
│ │ └── index.html
│ │ ├── Log.php
│ │ └── Parser.php
├── application
│ ├── .htaccess
│ ├── cache
│ │ ├── .htaccess
│ │ └── index.html
│ ├── index.html
│ ├── config
│ │ ├── index.html
│ │ ├── hooks.php
│ │ ├── profiler.php
│ │ ├── doctypes.php
│ │ ├── migration.php
│ │ ├── constants.php
│ │ ├── routes.php
│ │ ├── foreign_chars.php
│ │ ├── database.php
│ │ ├── smileys.php
│ │ ├── autoload.php
│ │ └── mimes.php
│ ├── core
│ │ └── index.html
│ ├── errors
│ │ ├── index.html
│ │ ├── error_php.php
│ │ ├── error_general.php
│ │ ├── error_db.php
│ │ └── error_404.php
│ ├── helpers
│ │ └── index.html
│ ├── hooks
│ │ └── index.html
│ ├── language
│ │ ├── index.html
│ │ └── english
│ │ │ └── index.html
│ ├── logs
│ │ └── index.html
│ ├── models
│ │ ├── index.html
│ │ └── home_model.php
│ ├── views
│ │ └── index.html
│ ├── controllers
│ │ ├── index.html
│ │ └── home.php
│ ├── libraries
│ │ └── index.html
│ └── third_party
│ │ └── index.html
├── .htaccess
├── README.md
├── asset
│ └── js
│ │ └── index.js
└── vue.sql
└── README.md
/ci_vue/system/.htaccess:
--------------------------------------------------------------------------------
1 | Deny from all
--------------------------------------------------------------------------------
/ci_vue/application/.htaccess:
--------------------------------------------------------------------------------
1 | Deny from all
--------------------------------------------------------------------------------
/ci_vue/application/cache/.htaccess:
--------------------------------------------------------------------------------
1 | Deny from all
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Basic-CRUD-in-Codeigniter-using-Vue-Js
2 | Basic CRUD in Codeigniter using Vue Js For Beginners
3 |
--------------------------------------------------------------------------------
/ci_vue/system/fonts/texb.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eboominathan/Basic-CRUD-in-Codeigniter-using-Vue-Js/HEAD/ci_vue/system/fonts/texb.ttf
--------------------------------------------------------------------------------
/ci_vue/.htaccess:
--------------------------------------------------------------------------------
1 | RewriteEngine on
2 | RewriteCond %{REQUEST_FILENAME} !-f
3 | RewriteCond %{REQUEST_FILENAME} !-d
4 | RewriteRule .* index.php?/$0 [PT,L]
--------------------------------------------------------------------------------
/ci_vue/system/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | 403 Forbidden
4 |
5 |
6 |
7 | Directory access is forbidden.
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ci_vue/application/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | 403 Forbidden
4 |
5 |
6 |
7 | Directory access is forbidden.
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ci_vue/system/core/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | 403 Forbidden
4 |
5 |
6 |
7 | Directory access is forbidden.
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ci_vue/system/database/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | 403 Forbidden
4 |
5 |
6 |
7 | Directory access is forbidden.
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ci_vue/system/fonts/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | 403 Forbidden
4 |
5 |
6 |
7 | Directory access is forbidden.
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ci_vue/system/helpers/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | 403 Forbidden
4 |
5 |
6 |
7 | Directory access is forbidden.
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ci_vue/system/language/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | 403 Forbidden
4 |
5 |
6 |
7 | Directory access is forbidden.
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ci_vue/application/cache/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | 403 Forbidden
4 |
5 |
6 |
7 | Directory access is forbidden.
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ci_vue/application/config/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | 403 Forbidden
4 |
5 |
6 |
7 | Directory access is forbidden.
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ci_vue/application/core/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | 403 Forbidden
4 |
5 |
6 |
7 | Directory access is forbidden.
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ci_vue/application/errors/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | 403 Forbidden
4 |
5 |
6 |
7 | Directory access is forbidden.
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ci_vue/application/helpers/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | 403 Forbidden
4 |
5 |
6 |
7 | Directory access is forbidden.
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ci_vue/application/hooks/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | 403 Forbidden
4 |
5 |
6 |
7 | Directory access is forbidden.
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ci_vue/application/language/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | 403 Forbidden
4 |
5 |
6 |
7 | Directory access is forbidden.
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ci_vue/application/logs/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | 403 Forbidden
4 |
5 |
6 |
7 | Directory access is forbidden.
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ci_vue/application/models/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | 403 Forbidden
4 |
5 |
6 |
7 | Directory access is forbidden.
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ci_vue/application/views/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | 403 Forbidden
4 |
5 |
6 |
7 | Directory access is forbidden.
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ci_vue/system/libraries/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | 403 Forbidden
4 |
5 |
6 |
7 | Directory access is forbidden.
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ci_vue/application/controllers/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | 403 Forbidden
4 |
5 |
6 |
7 | Directory access is forbidden.
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ci_vue/application/libraries/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | 403 Forbidden
4 |
5 |
6 |
7 | Directory access is forbidden.
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ci_vue/application/third_party/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | 403 Forbidden
4 |
5 |
6 |
7 | Directory access is forbidden.
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ci_vue/system/database/drivers/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | 403 Forbidden
4 |
5 |
6 |
7 | Directory access is forbidden.
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ci_vue/system/language/english/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | 403 Forbidden
4 |
5 |
6 |
7 | Directory access is forbidden.
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ci_vue/system/libraries/Cache/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | 403 Forbidden
4 |
5 |
6 |
7 | Directory access is forbidden.
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ci_vue/application/language/english/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | 403 Forbidden
4 |
5 |
6 |
7 | Directory access is forbidden.
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ci_vue/system/database/drivers/cubrid/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | 403 Forbidden
4 |
5 |
6 |
7 | Directory access is forbidden.
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ci_vue/system/database/drivers/mssql/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | 403 Forbidden
4 |
5 |
6 |
7 | Directory access is forbidden.
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ci_vue/system/database/drivers/mysql/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | 403 Forbidden
4 |
5 |
6 |
7 | Directory access is forbidden.
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ci_vue/system/database/drivers/mysqli/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | 403 Forbidden
4 |
5 |
6 |
7 | Directory access is forbidden.
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ci_vue/system/database/drivers/oci8/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | 403 Forbidden
4 |
5 |
6 |
7 | Directory access is forbidden.
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ci_vue/system/database/drivers/odbc/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | 403 Forbidden
4 |
5 |
6 |
7 | Directory access is forbidden.
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ci_vue/system/database/drivers/pdo/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | 403 Forbidden
4 |
5 |
6 |
7 | Directory access is forbidden.
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ci_vue/system/database/drivers/sqlite/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | 403 Forbidden
4 |
5 |
6 |
7 | Directory access is forbidden.
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ci_vue/system/database/drivers/sqlsrv/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | 403 Forbidden
4 |
5 |
6 |
7 | Directory access is forbidden.
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ci_vue/system/libraries/Cache/drivers/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | 403 Forbidden
4 |
5 |
6 |
7 | Directory access is forbidden.
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ci_vue/system/libraries/javascript/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | 403 Forbidden
4 |
5 |
6 |
7 | Directory access is forbidden.
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ci_vue/system/database/drivers/postgre/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | 403 Forbidden
4 |
5 |
6 |
7 | Directory access is forbidden.
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ci_vue/system/language/english/number_lang.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | A PHP Error was encountered
4 |
5 | Severity:
6 | Message:
7 | Filename:
8 | Line Number:
9 |
10 |
--------------------------------------------------------------------------------
/ci_vue/README.md:
--------------------------------------------------------------------------------
1 | # CodeIgniter 2
2 | Open Source PHP Framework (originally from EllisLab)
3 |
4 | For more info, please refer to the user-guide at http://www.codeigniter.com/userguide2/
5 | (also available within the download package for offline use)
6 |
7 | **WARNING:** *CodeIgniter 2.x is no longer under development and only receives security patches until October 31st, 2015.
8 | Please update your installation to the latest CodeIgniter 3.x version available
9 | (upgrade instructions [here](http://www.codeigniter.com/userguide3/installation/upgrade_300.html)).*
10 |
--------------------------------------------------------------------------------
/ci_vue/application/config/hooks.php:
--------------------------------------------------------------------------------
1 | load->model('home_model','home');
9 | }
10 |
11 | Public function index()
12 | {
13 | $this->load->view('home');
14 | }
15 |
16 | Public function insert()
17 | {
18 |
19 | echo $this->home->insert();
20 | }
21 | Public function update($id)
22 | {
23 |
24 | echo $this->home->update($id);
25 | }
26 | Public function edit($id)
27 | {
28 | $data = $this->home->edit($id);
29 | echo json_encode($data);
30 |
31 | }
32 | public function delete()
33 | {
34 | $data = json_decode(file_get_contents("php://input"));
35 | echo $this->home->delete($data);
36 |
37 | }
38 | Public function get_data()
39 | {
40 | $data = array();
41 | $data = $this->home->get_data();
42 | echo json_encode($data);
43 |
44 | }
45 |
46 |
47 | }
48 |
49 | /* End of file home.php */
50 | /* Location: ./application/controllers/home.php */
--------------------------------------------------------------------------------
/ci_vue/application/models/home_model.php:
--------------------------------------------------------------------------------
1 | $_POST['code'], 'name'=>$_POST['name']);
15 | return $this->db->insert('items',$data);
16 |
17 | }
18 | Public function edit($id)
19 | {
20 | return $this->db->get_where('items',array('id'=>$id))->row();
21 | }
22 |
23 | Public function update($id)
24 | {
25 | $data = array('code' => $_POST['code'], 'name'=>$_POST['name']);
26 | $where = array('id'=>$id);
27 | return $this->db->update('items',$data,$where);
28 |
29 | }
30 |
31 | Public function delete($data)
32 | {
33 |
34 | for ($i=0; $i db->delete('items',array('id' => $data[$i]->id));
36 | }
37 | return true;
38 |
39 | }
40 | Public function get_data()
41 | {
42 | return $this->db->get('items')->result();
43 | }
44 |
45 | }
46 |
47 | /* End of file */
48 | /* Location: ./application/models/ */
--------------------------------------------------------------------------------
/ci_vue/application/config/doctypes.php:
--------------------------------------------------------------------------------
1 | '',
5 | 'xhtml1-strict' => '',
6 | 'xhtml1-trans' => '',
7 | 'xhtml1-frame' => '',
8 | 'html5' => '',
9 | 'html4-strict' => '',
10 | 'html4-trans' => '',
11 | 'html4-frame' => ''
12 | );
13 |
14 | /* End of file doctypes.php */
15 | /* Location: ./application/config/doctypes.php */
--------------------------------------------------------------------------------
/ci_vue/system/language/english/profiler_lang.php:
--------------------------------------------------------------------------------
1 | This is a todo'
63 | })
--------------------------------------------------------------------------------
/ci_vue/application/errors/error_general.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Error
5 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/ci_vue/application/errors/error_db.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Database Error
5 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/ci_vue/application/errors/error_404.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 404 Page Not Found
5 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/ci_vue/application/config/migration.php:
--------------------------------------------------------------------------------
1 | migration->latest() this is the version that schema will
21 | | be upgraded / downgraded to.
22 | |
23 | */
24 | $config['migration_version'] = 0;
25 |
26 |
27 | /*
28 | |--------------------------------------------------------------------------
29 | | Migrations Path
30 | |--------------------------------------------------------------------------
31 | |
32 | | Path to your migrations folder.
33 | | Typically, it will be within your application path.
34 | | Also, writing permission is required within the migrations path.
35 | |
36 | */
37 | $config['migration_path'] = APPPATH . 'migrations/';
38 |
39 |
40 | /* End of file migration.php */
41 | /* Location: ./application/config/migration.php */
--------------------------------------------------------------------------------
/ci_vue/system/core/Model.php:
--------------------------------------------------------------------------------
1 | $key;
53 | }
54 | }
55 | // END Model Class
56 |
57 | /* End of file Model.php */
58 | /* Location: ./system/core/Model.php */
--------------------------------------------------------------------------------
/ci_vue/system/language/english/calendar_lang.php:
--------------------------------------------------------------------------------
1 | lang->line($line);
47 |
48 | if ($id != '')
49 | {
50 | $line = '";
51 | }
52 |
53 | return $line;
54 | }
55 | }
56 |
57 | // ------------------------------------------------------------------------
58 | /* End of file language_helper.php */
59 | /* Location: ./system/helpers/language_helper.php */
--------------------------------------------------------------------------------
/ci_vue/system/language/english/email_lang.php:
--------------------------------------------------------------------------------
1 | 'ae',
12 | '/ö|œ/' => 'oe',
13 | '/ü/' => 'ue',
14 | '/Ä/' => 'Ae',
15 | '/Ü/' => 'Ue',
16 | '/Ö/' => 'Oe',
17 | '/À|Á|Â|Ã|Ä|Å|Ǻ|Ā|Ă|Ą|Ǎ/' => 'A',
18 | '/à|á|â|ã|å|ǻ|ā|ă|ą|ǎ|ª/' => 'a',
19 | '/Ç|Ć|Ĉ|Ċ|Č/' => 'C',
20 | '/ç|ć|ĉ|ċ|č/' => 'c',
21 | '/Ð|Ď|Đ/' => 'D',
22 | '/ð|ď|đ/' => 'd',
23 | '/È|É|Ê|Ë|Ē|Ĕ|Ė|Ę|Ě/' => 'E',
24 | '/è|é|ê|ë|ē|ĕ|ė|ę|ě/' => 'e',
25 | '/Ĝ|Ğ|Ġ|Ģ/' => 'G',
26 | '/ĝ|ğ|ġ|ģ/' => 'g',
27 | '/Ĥ|Ħ/' => 'H',
28 | '/ĥ|ħ/' => 'h',
29 | '/Ì|Í|Î|Ï|Ĩ|Ī|Ĭ|Ǐ|Į|İ/' => 'I',
30 | '/ì|í|î|ï|ĩ|ī|ĭ|ǐ|į|ı/' => 'i',
31 | '/Ĵ/' => 'J',
32 | '/ĵ/' => 'j',
33 | '/Ķ/' => 'K',
34 | '/ķ/' => 'k',
35 | '/Ĺ|Ļ|Ľ|Ŀ|Ł/' => 'L',
36 | '/ĺ|ļ|ľ|ŀ|ł/' => 'l',
37 | '/Ñ|Ń|Ņ|Ň/' => 'N',
38 | '/ñ|ń|ņ|ň|ʼn/' => 'n',
39 | '/Ò|Ó|Ô|Õ|Ō|Ŏ|Ǒ|Ő|Ơ|Ø|Ǿ/' => 'O',
40 | '/ò|ó|ô|õ|ō|ŏ|ǒ|ő|ơ|ø|ǿ|º/' => 'o',
41 | '/Ŕ|Ŗ|Ř/' => 'R',
42 | '/ŕ|ŗ|ř/' => 'r',
43 | '/Ś|Ŝ|Ş|Š/' => 'S',
44 | '/ś|ŝ|ş|š|ſ/' => 's',
45 | '/Ţ|Ť|Ŧ/' => 'T',
46 | '/ţ|ť|ŧ/' => 't',
47 | '/Ù|Ú|Û|Ũ|Ū|Ŭ|Ů|Ű|Ų|Ư|Ǔ|Ǖ|Ǘ|Ǚ|Ǜ/' => 'U',
48 | '/ù|ú|û|ũ|ū|ŭ|ů|ű|ų|ư|ǔ|ǖ|ǘ|ǚ|ǜ/' => 'u',
49 | '/Ý|Ÿ|Ŷ/' => 'Y',
50 | '/ý|ÿ|ŷ/' => 'y',
51 | '/Ŵ/' => 'W',
52 | '/ŵ/' => 'w',
53 | '/Ź|Ż|Ž/' => 'Z',
54 | '/ź|ż|ž/' => 'z',
55 | '/Æ|Ǽ/' => 'AE',
56 | '/ß/'=> 'ss',
57 | '/IJ/' => 'IJ',
58 | '/ij/' => 'ij',
59 | '/Œ/' => 'OE',
60 | '/ƒ/' => 'f'
61 | );
62 |
63 | /* End of file foreign_chars.php */
64 | /* Location: ./application/config/foreign_chars.php */
--------------------------------------------------------------------------------
/ci_vue/system/core/Controller.php:
--------------------------------------------------------------------------------
1 | $class)
46 | {
47 | $this->$var =& load_class($class);
48 | }
49 |
50 | $this->load =& load_class('Loader', 'core');
51 |
52 | $this->load->initialize();
53 |
54 | log_message('debug', "Controller Class Initialized");
55 | }
56 |
57 | public static function &get_instance()
58 | {
59 | return self::$instance;
60 | }
61 | }
62 | // END Controller class
63 |
64 | /* End of file Controller.php */
65 | /* Location: ./system/core/Controller.php */
--------------------------------------------------------------------------------
/ci_vue/system/language/english/form_validation_lang.php:
--------------------------------------------------------------------------------
1 | ","\"", "'", "-"),
54 | array("&", "<", ">", """, "'", "-"),
55 | $str);
56 |
57 | // Decode the temp markers back to entities
58 | $str = preg_replace("/$temp(\d+);/","\\1;",$str);
59 |
60 | if ($protect_all === TRUE)
61 | {
62 | $str = preg_replace("/$temp(\w+);/","&\\1;", $str);
63 | }
64 |
65 | return $str;
66 | }
67 | }
68 |
69 | // ------------------------------------------------------------------------
70 |
71 | /* End of file xml_helper.php */
72 | /* Location: ./system/helpers/xml_helper.php */
--------------------------------------------------------------------------------
/ci_vue/system/helpers/number_helper.php:
--------------------------------------------------------------------------------
1 | lang->load('number');
44 |
45 | if ($num >= 1000000000000)
46 | {
47 | $num = round($num / 1099511627776, $precision);
48 | $unit = $CI->lang->line('terabyte_abbr');
49 | }
50 | elseif ($num >= 1000000000)
51 | {
52 | $num = round($num / 1073741824, $precision);
53 | $unit = $CI->lang->line('gigabyte_abbr');
54 | }
55 | elseif ($num >= 1000000)
56 | {
57 | $num = round($num / 1048576, $precision);
58 | $unit = $CI->lang->line('megabyte_abbr');
59 | }
60 | elseif ($num >= 1000)
61 | {
62 | $num = round($num / 1024, $precision);
63 | $unit = $CI->lang->line('kilobyte_abbr');
64 | }
65 | else
66 | {
67 | $unit = $CI->lang->line('bytes');
68 | return number_format($num).' '.$unit;
69 | }
70 |
71 | return number_format($num, $precision).' '.$unit;
72 | }
73 | }
74 |
75 |
76 | /* End of file number_helper.php */
77 | /* Location: ./system/helpers/number_helper.php */
--------------------------------------------------------------------------------
/ci_vue/system/database/drivers/postgre/postgre_utility.php:
--------------------------------------------------------------------------------
1 | db->display_error('db_unsuported_feature');
84 | }
85 | }
86 |
87 |
88 | /* End of file postgre_utility.php */
89 | /* Location: ./system/database/drivers/postgre/postgre_utility.php */
--------------------------------------------------------------------------------
/ci_vue/system/language/english/db_lang.php:
--------------------------------------------------------------------------------
1 | db->display_error('db_unsuported_feature');
84 | }
85 | }
86 |
87 | /* End of file oci8_utility.php */
88 | /* Location: ./system/database/drivers/oci8/oci8_utility.php */
--------------------------------------------------------------------------------
/ci_vue/system/database/drivers/mssql/mssql_utility.php:
--------------------------------------------------------------------------------
1 | db->display_error('db_unsuported_feature');
84 | }
85 |
86 | }
87 |
88 | /* End of file mssql_utility.php */
89 | /* Location: ./system/database/drivers/mssql/mssql_utility.php */
--------------------------------------------------------------------------------
/ci_vue/system/database/drivers/mysqli/mysqli_utility.php:
--------------------------------------------------------------------------------
1 | db->_escape_identifiers($table);
53 | }
54 |
55 | // --------------------------------------------------------------------
56 |
57 | /**
58 | * Repair table query
59 | *
60 | * Generates a platform-specific query so that a table can be repaired
61 | *
62 | * @access private
63 | * @param string the table name
64 | * @return object
65 | */
66 | function _repair_table($table)
67 | {
68 | return "REPAIR TABLE ".$this->db->_escape_identifiers($table);
69 | }
70 |
71 | // --------------------------------------------------------------------
72 |
73 | /**
74 | * MySQLi Export
75 | *
76 | * @access private
77 | * @param array Preferences
78 | * @return mixed
79 | */
80 | function _backup($params = array())
81 | {
82 | // Currently unsupported
83 | return $this->db->display_error('db_unsuported_feature');
84 | }
85 | }
86 |
87 | /* End of file mysqli_utility.php */
88 | /* Location: ./system/database/drivers/mysqli/mysqli_utility.php */
--------------------------------------------------------------------------------
/ci_vue/system/database/drivers/sqlsrv/sqlsrv_utility.php:
--------------------------------------------------------------------------------
1 | db->display_error('db_unsuported_feature');
84 | }
85 |
86 | }
87 |
88 | /* End of file mssql_utility.php */
89 | /* Location: ./system/database/drivers/mssql/mssql_utility.php */
--------------------------------------------------------------------------------
/ci_vue/system/helpers/directory_helper.php:
--------------------------------------------------------------------------------
1 | 0) && @is_dir($source_dir.$file))
62 | {
63 | $filedata[$file] = directory_map($source_dir.$file.DIRECTORY_SEPARATOR, $new_depth, $hidden);
64 | }
65 | else
66 | {
67 | $filedata[] = $file;
68 | }
69 | }
70 |
71 | closedir($fp);
72 | return $filedata;
73 | }
74 |
75 | return FALSE;
76 | }
77 | }
78 |
79 |
80 | /* End of file directory_helper.php */
81 | /* Location: ./system/helpers/directory_helper.php */
--------------------------------------------------------------------------------
/ci_vue/system/database/drivers/sqlite/sqlite_utility.php:
--------------------------------------------------------------------------------
1 | db_debug)
42 | {
43 | return $this->db->display_error('db_unsuported_feature');
44 | }
45 | return array();
46 | }
47 |
48 | // --------------------------------------------------------------------
49 |
50 | /**
51 | * Optimize table query
52 | *
53 | * Is optimization even supported in SQLite?
54 | *
55 | * @access private
56 | * @param string the table name
57 | * @return object
58 | */
59 | function _optimize_table($table)
60 | {
61 | return FALSE;
62 | }
63 |
64 | // --------------------------------------------------------------------
65 |
66 | /**
67 | * Repair table query
68 | *
69 | * Are table repairs even supported in SQLite?
70 | *
71 | * @access private
72 | * @param string the table name
73 | * @return object
74 | */
75 | function _repair_table($table)
76 | {
77 | return FALSE;
78 | }
79 |
80 | // --------------------------------------------------------------------
81 |
82 | /**
83 | * SQLite Export
84 | *
85 | * @access private
86 | * @param array Preferences
87 | * @return mixed
88 | */
89 | function _backup($params = array())
90 | {
91 | // Currently unsupported
92 | return $this->db->display_error('db_unsuported_feature');
93 | }
94 | }
95 |
96 | /* End of file sqlite_utility.php */
97 | /* Location: ./system/database/drivers/sqlite/sqlite_utility.php */
--------------------------------------------------------------------------------
/ci_vue/system/helpers/typography_helper.php:
--------------------------------------------------------------------------------
1 | load->library('typography');
45 |
46 | return $CI->typography->nl2br_except_pre($str);
47 | }
48 | }
49 |
50 | // ------------------------------------------------------------------------
51 |
52 | /**
53 | * Auto Typography Wrapper Function
54 | *
55 | *
56 | * @access public
57 | * @param string
58 | * @param bool whether to allow javascript event handlers
59 | * @param bool whether to reduce multiple instances of double newlines to two
60 | * @return string
61 | */
62 | if ( ! function_exists('auto_typography'))
63 | {
64 | function auto_typography($str, $strip_js_event_handlers = TRUE, $reduce_linebreaks = FALSE)
65 | {
66 | $CI =& get_instance();
67 | $CI->load->library('typography');
68 | return $CI->typography->auto_typography($str, $strip_js_event_handlers, $reduce_linebreaks);
69 | }
70 | }
71 |
72 |
73 | // --------------------------------------------------------------------
74 |
75 | /**
76 | * HTML Entities Decode
77 | *
78 | * This function is a replacement for html_entity_decode()
79 | *
80 | * @access public
81 | * @param string
82 | * @return string
83 | */
84 | if ( ! function_exists('entity_decode'))
85 | {
86 | function entity_decode($str, $charset='UTF-8')
87 | {
88 | global $SEC;
89 | return $SEC->entity_decode($str, $charset);
90 | }
91 | }
92 |
93 | /* End of file typography_helper.php */
94 | /* Location: ./system/helpers/typography_helper.php */
--------------------------------------------------------------------------------
/ci_vue/system/database/drivers/pdo/pdo_utility.php:
--------------------------------------------------------------------------------
1 | db->db_debug)
38 | {
39 | return $this->db->display_error('db_unsuported_feature');
40 | }
41 | return FALSE;
42 | }
43 |
44 | // --------------------------------------------------------------------
45 |
46 | /**
47 | * Optimize table query
48 | *
49 | * Generates a platform-specific query so that a table can be optimized
50 | *
51 | * @access private
52 | * @param string the table name
53 | * @return object
54 | */
55 | function _optimize_table($table)
56 | {
57 | // Not a supported PDO feature
58 | if ($this->db->db_debug)
59 | {
60 | return $this->db->display_error('db_unsuported_feature');
61 | }
62 | return FALSE;
63 | }
64 |
65 | // --------------------------------------------------------------------
66 |
67 | /**
68 | * Repair table query
69 | *
70 | * Generates a platform-specific query so that a table can be repaired
71 | *
72 | * @access private
73 | * @param string the table name
74 | * @return object
75 | */
76 | function _repair_table($table)
77 | {
78 | // Not a supported PDO feature
79 | if ($this->db->db_debug)
80 | {
81 | return $this->db->display_error('db_unsuported_feature');
82 | }
83 | return FALSE;
84 | }
85 |
86 | // --------------------------------------------------------------------
87 |
88 | /**
89 | * PDO Export
90 | *
91 | * @access private
92 | * @param array Preferences
93 | * @return mixed
94 | */
95 | function _backup($params = array())
96 | {
97 | // Currently unsupported
98 | return $this->db->display_error('db_unsuported_feature');
99 | }
100 |
101 | }
102 |
103 | /* End of file pdo_utility.php */
104 | /* Location: ./system/database/drivers/pdo/pdo_utility.php */
--------------------------------------------------------------------------------
/ci_vue/system/database/drivers/odbc/odbc_utility.php:
--------------------------------------------------------------------------------
1 | db->db_debug)
38 | {
39 | return $this->db->display_error('db_unsuported_feature');
40 | }
41 | return FALSE;
42 | }
43 |
44 | // --------------------------------------------------------------------
45 |
46 | /**
47 | * Optimize table query
48 | *
49 | * Generates a platform-specific query so that a table can be optimized
50 | *
51 | * @access private
52 | * @param string the table name
53 | * @return object
54 | */
55 | function _optimize_table($table)
56 | {
57 | // Not a supported ODBC feature
58 | if ($this->db->db_debug)
59 | {
60 | return $this->db->display_error('db_unsuported_feature');
61 | }
62 | return FALSE;
63 | }
64 |
65 | // --------------------------------------------------------------------
66 |
67 | /**
68 | * Repair table query
69 | *
70 | * Generates a platform-specific query so that a table can be repaired
71 | *
72 | * @access private
73 | * @param string the table name
74 | * @return object
75 | */
76 | function _repair_table($table)
77 | {
78 | // Not a supported ODBC feature
79 | if ($this->db->db_debug)
80 | {
81 | return $this->db->display_error('db_unsuported_feature');
82 | }
83 | return FALSE;
84 | }
85 |
86 | // --------------------------------------------------------------------
87 |
88 | /**
89 | * ODBC Export
90 | *
91 | * @access private
92 | * @param array Preferences
93 | * @return mixed
94 | */
95 | function _backup($params = array())
96 | {
97 | // Currently unsupported
98 | return $this->db->display_error('db_unsuported_feature');
99 | }
100 |
101 | }
102 |
103 | /* End of file odbc_utility.php */
104 | /* Location: ./system/database/drivers/odbc/odbc_utility.php */
--------------------------------------------------------------------------------
/ci_vue/system/helpers/cookie_helper.php:
--------------------------------------------------------------------------------
1 | input->set_cookie($name, $value, $expire, $domain, $path, $prefix, $secure);
53 | }
54 | }
55 |
56 | // --------------------------------------------------------------------
57 |
58 | /**
59 | * Fetch an item from the COOKIE array
60 | *
61 | * @access public
62 | * @param string
63 | * @param bool
64 | * @return mixed
65 | */
66 | if ( ! function_exists('get_cookie'))
67 | {
68 | function get_cookie($index = '', $xss_clean = FALSE)
69 | {
70 | $CI =& get_instance();
71 |
72 | $prefix = '';
73 |
74 | if ( ! isset($_COOKIE[$index]) && config_item('cookie_prefix') != '')
75 | {
76 | $prefix = config_item('cookie_prefix');
77 | }
78 |
79 | return $CI->input->cookie($prefix.$index, $xss_clean);
80 | }
81 | }
82 |
83 | // --------------------------------------------------------------------
84 |
85 | /**
86 | * Delete a COOKIE
87 | *
88 | * @param mixed
89 | * @param string the cookie domain. Usually: .yourdomain.com
90 | * @param string the cookie path
91 | * @param string the cookie prefix
92 | * @return void
93 | */
94 | if ( ! function_exists('delete_cookie'))
95 | {
96 | function delete_cookie($name = '', $domain = '', $path = '/', $prefix = '')
97 | {
98 | set_cookie($name, '', '', $domain, $path, $prefix);
99 | }
100 | }
101 |
102 |
103 | /* End of file cookie_helper.php */
104 | /* Location: ./system/helpers/cookie_helper.php */
--------------------------------------------------------------------------------
/ci_vue/system/helpers/array_helper.php:
--------------------------------------------------------------------------------
1 | '1', 'DEBUG' => '2', 'INFO' => '3', 'ALL' => '4');
35 |
36 | /**
37 | * Constructor
38 | */
39 | public function __construct()
40 | {
41 | $config =& get_config();
42 |
43 | $this->_log_path = ($config['log_path'] != '') ? $config['log_path'] : APPPATH.'logs/';
44 |
45 | if ( ! is_dir($this->_log_path) OR ! is_really_writable($this->_log_path))
46 | {
47 | $this->_enabled = FALSE;
48 | }
49 |
50 | if (is_numeric($config['log_threshold']))
51 | {
52 | $this->_threshold = $config['log_threshold'];
53 | }
54 |
55 | if ($config['log_date_format'] != '')
56 | {
57 | $this->_date_fmt = $config['log_date_format'];
58 | }
59 | }
60 |
61 | // --------------------------------------------------------------------
62 |
63 | /**
64 | * Write Log File
65 | *
66 | * Generally this function will be called using the global log_message() function
67 | *
68 | * @param string the error level
69 | * @param string the error message
70 | * @param bool whether the error is a native PHP error
71 | * @return bool
72 | */
73 | public function write_log($level = 'error', $msg, $php_error = FALSE)
74 | {
75 | if ($this->_enabled === FALSE)
76 | {
77 | return FALSE;
78 | }
79 |
80 | $level = strtoupper($level);
81 |
82 | if ( ! isset($this->_levels[$level]) OR ($this->_levels[$level] > $this->_threshold))
83 | {
84 | return FALSE;
85 | }
86 |
87 | $filepath = $this->_log_path.'log-'.date('Y-m-d').'.php';
88 | $message = '';
89 |
90 | if ( ! file_exists($filepath))
91 | {
92 | $message .= "<"."?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?".">\n\n";
93 | }
94 |
95 | if ( ! $fp = @fopen($filepath, FOPEN_WRITE_CREATE))
96 | {
97 | return FALSE;
98 | }
99 |
100 | $message .= $level.' '.(($level == 'INFO') ? ' -' : '-').' '.date($this->_date_fmt). ' --> '.$msg."\n";
101 |
102 | flock($fp, LOCK_EX);
103 | fwrite($fp, $message);
104 | flock($fp, LOCK_UN);
105 | fclose($fp);
106 |
107 | @chmod($filepath, FILE_WRITE_MODE);
108 | return TRUE;
109 | }
110 |
111 | }
112 | // END Log Class
113 |
114 | /* End of file Log.php */
115 | /* Location: ./system/libraries/Log.php */
--------------------------------------------------------------------------------
/ci_vue/system/language/english/date_lang.php:
--------------------------------------------------------------------------------
1 | security->xss_clean($str, $is_image);
45 | }
46 | }
47 |
48 | // ------------------------------------------------------------------------
49 |
50 | /**
51 | * Sanitize Filename
52 | *
53 | * @access public
54 | * @param string
55 | * @return string
56 | */
57 | if ( ! function_exists('sanitize_filename'))
58 | {
59 | function sanitize_filename($filename)
60 | {
61 | $CI =& get_instance();
62 | return $CI->security->sanitize_filename($filename);
63 | }
64 | }
65 |
66 | // --------------------------------------------------------------------
67 |
68 | /**
69 | * Hash encode a string
70 | *
71 | * @access public
72 | * @param string
73 | * @return string
74 | */
75 | if ( ! function_exists('do_hash'))
76 | {
77 | function do_hash($str, $type = 'sha1')
78 | {
79 | if ($type == 'sha1')
80 | {
81 | return sha1($str);
82 | }
83 | else
84 | {
85 | return md5($str);
86 | }
87 | }
88 | }
89 |
90 | // ------------------------------------------------------------------------
91 |
92 | /**
93 | * Strip Image Tags
94 | *
95 | * @access public
96 | * @param string
97 | * @return string
98 | */
99 | if ( ! function_exists('strip_image_tags'))
100 | {
101 | function strip_image_tags($str)
102 | {
103 | $str = preg_replace("#
#", "\\1", $str);
104 | $str = preg_replace("#
#", "\\1", $str);
105 |
106 | return $str;
107 | }
108 | }
109 |
110 | // ------------------------------------------------------------------------
111 |
112 | /**
113 | * Convert PHP tags to entities
114 | *
115 | * @access public
116 | * @param string
117 | * @return string
118 | */
119 | if ( ! function_exists('encode_php_tags'))
120 | {
121 | function encode_php_tags($str)
122 | {
123 | return str_replace(array(''), array('<?php', '<?PHP', '<?', '?>'), $str);
124 | }
125 | }
126 |
127 |
128 | /* End of file security_helper.php */
129 | /* Location: ./system/helpers/security_helper.php */
--------------------------------------------------------------------------------
/ci_vue/application/config/database.php:
--------------------------------------------------------------------------------
1 | array('grin.gif', '19', '19', 'grin'),
20 | ':lol:' => array('lol.gif', '19', '19', 'LOL'),
21 | ':cheese:' => array('cheese.gif', '19', '19', 'cheese'),
22 | ':)' => array('smile.gif', '19', '19', 'smile'),
23 | ';-)' => array('wink.gif', '19', '19', 'wink'),
24 | ';)' => array('wink.gif', '19', '19', 'wink'),
25 | ':smirk:' => array('smirk.gif', '19', '19', 'smirk'),
26 | ':roll:' => array('rolleyes.gif', '19', '19', 'rolleyes'),
27 | ':-S' => array('confused.gif', '19', '19', 'confused'),
28 | ':wow:' => array('surprise.gif', '19', '19', 'surprised'),
29 | ':bug:' => array('bigsurprise.gif', '19', '19', 'big surprise'),
30 | ':-P' => array('tongue_laugh.gif', '19', '19', 'tongue laugh'),
31 | '%-P' => array('tongue_rolleye.gif', '19', '19', 'tongue rolleye'),
32 | ';-P' => array('tongue_wink.gif', '19', '19', 'tongue wink'),
33 | ':P' => array('raspberry.gif', '19', '19', 'raspberry'),
34 | ':blank:' => array('blank.gif', '19', '19', 'blank stare'),
35 | ':long:' => array('longface.gif', '19', '19', 'long face'),
36 | ':ohh:' => array('ohh.gif', '19', '19', 'ohh'),
37 | ':grrr:' => array('grrr.gif', '19', '19', 'grrr'),
38 | ':gulp:' => array('gulp.gif', '19', '19', 'gulp'),
39 | '8-/' => array('ohoh.gif', '19', '19', 'oh oh'),
40 | ':down:' => array('downer.gif', '19', '19', 'downer'),
41 | ':red:' => array('embarrassed.gif', '19', '19', 'red face'),
42 | ':sick:' => array('sick.gif', '19', '19', 'sick'),
43 | ':shut:' => array('shuteye.gif', '19', '19', 'shut eye'),
44 | ':-/' => array('hmm.gif', '19', '19', 'hmmm'),
45 | '>:(' => array('mad.gif', '19', '19', 'mad'),
46 | ':mad:' => array('mad.gif', '19', '19', 'mad'),
47 | '>:-(' => array('angry.gif', '19', '19', 'angry'),
48 | ':angry:' => array('angry.gif', '19', '19', 'angry'),
49 | ':zip:' => array('zip.gif', '19', '19', 'zipper'),
50 | ':kiss:' => array('kiss.gif', '19', '19', 'kiss'),
51 | ':ahhh:' => array('shock.gif', '19', '19', 'shock'),
52 | ':coolsmile:' => array('shade_smile.gif', '19', '19', 'cool smile'),
53 | ':coolsmirk:' => array('shade_smirk.gif', '19', '19', 'cool smirk'),
54 | ':coolgrin:' => array('shade_grin.gif', '19', '19', 'cool grin'),
55 | ':coolhmm:' => array('shade_hmm.gif', '19', '19', 'cool hmm'),
56 | ':coolmad:' => array('shade_mad.gif', '19', '19', 'cool mad'),
57 | ':coolcheese:' => array('shade_cheese.gif', '19', '19', 'cool cheese'),
58 | ':vampire:' => array('vampire.gif', '19', '19', 'vampire'),
59 | ':snake:' => array('snake.gif', '19', '19', 'snake'),
60 | ':exclaim:' => array('exclaim.gif', '19', '19', 'excaim'),
61 | ':question:' => array('question.gif', '19', '19', 'question') // no comma after last item
62 |
63 | );
64 |
65 | /* End of file smileys.php */
66 | /* Location: ./application/config/smileys.php */
--------------------------------------------------------------------------------
/ci_vue/system/database/drivers/cubrid/cubrid_utility.php:
--------------------------------------------------------------------------------
1 | conn_id)
42 | {
43 | return "SELECT '" . $this->database . "'";
44 | }
45 | else
46 | {
47 | return FALSE;
48 | }
49 | }
50 |
51 | // --------------------------------------------------------------------
52 |
53 | /**
54 | * Optimize table query
55 | *
56 | * Generates a platform-specific query so that a table can be optimized
57 | *
58 | * @access private
59 | * @param string the table name
60 | * @return object
61 | * @link http://www.cubrid.org/manual/840/en/Optimize%20Database
62 | */
63 | function _optimize_table($table)
64 | {
65 | // No SQL based support in CUBRID as of version 8.4.0. Database or
66 | // table optimization can be performed using CUBRID Manager
67 | // database administration tool. See the link above for more info.
68 | return FALSE;
69 | }
70 |
71 | // --------------------------------------------------------------------
72 |
73 | /**
74 | * Repair table query
75 | *
76 | * Generates a platform-specific query so that a table can be repaired
77 | *
78 | * @access private
79 | * @param string the table name
80 | * @return object
81 | * @link http://www.cubrid.org/manual/840/en/Checking%20Database%20Consistency
82 | */
83 | function _repair_table($table)
84 | {
85 | // Not supported in CUBRID as of version 8.4.0. Database or
86 | // table consistency can be checked using CUBRID Manager
87 | // database administration tool. See the link above for more info.
88 | return FALSE;
89 | }
90 |
91 | // --------------------------------------------------------------------
92 | /**
93 | * CUBRID Export
94 | *
95 | * @access private
96 | * @param array Preferences
97 | * @return mixed
98 | */
99 | function _backup($params = array())
100 | {
101 | // No SQL based support in CUBRID as of version 8.4.0. Database or
102 | // table backup can be performed using CUBRID Manager
103 | // database administration tool.
104 | return $this->db->display_error('db_unsuported_feature');
105 | }
106 | }
107 |
108 | /* End of file cubrid_utility.php */
109 | /* Location: ./system/database/drivers/cubrid/cubrid_utility.php */
--------------------------------------------------------------------------------
/ci_vue/system/core/Benchmark.php:
--------------------------------------------------------------------------------
1 | marker[$name] = microtime();
55 | }
56 |
57 | // --------------------------------------------------------------------
58 |
59 | /**
60 | * Calculates the time difference between two marked points.
61 | *
62 | * If the first parameter is empty this function instead returns the
63 | * {elapsed_time} pseudo-variable. This permits the full system
64 | * execution time to be shown in a template. The output class will
65 | * swap the real value for this variable.
66 | *
67 | * @access public
68 | * @param string a particular marked point
69 | * @param string a particular marked point
70 | * @param integer the number of decimal places
71 | * @return mixed
72 | */
73 | function elapsed_time($point1 = '', $point2 = '', $decimals = 4)
74 | {
75 | if ($point1 == '')
76 | {
77 | return '{elapsed_time}';
78 | }
79 |
80 | if ( ! isset($this->marker[$point1]))
81 | {
82 | return '';
83 | }
84 |
85 | if ( ! isset($this->marker[$point2]))
86 | {
87 | $this->marker[$point2] = microtime();
88 | }
89 |
90 | list($sm, $ss) = explode(' ', $this->marker[$point1]);
91 | list($em, $es) = explode(' ', $this->marker[$point2]);
92 |
93 | return number_format(($em + $es) - ($sm + $ss), $decimals);
94 | }
95 |
96 | // --------------------------------------------------------------------
97 |
98 | /**
99 | * Memory Usage
100 | *
101 | * This function returns the {memory_usage} pseudo-variable.
102 | * This permits it to be put it anywhere in a template
103 | * without the memory being calculated until the end.
104 | * The output class will swap the real value for this variable.
105 | *
106 | * @access public
107 | * @return string
108 | */
109 | function memory_usage()
110 | {
111 | return '{memory_usage}';
112 | }
113 |
114 | }
115 |
116 | // END CI_Benchmark class
117 |
118 | /* End of file Benchmark.php */
119 | /* Location: ./system/core/Benchmark.php */
--------------------------------------------------------------------------------
/ci_vue/application/config/autoload.php:
--------------------------------------------------------------------------------
1 | $time + $ttl,
121 | 'mtime' => $time,
122 | 'data' => $data
123 | );
124 | }
125 |
126 | // ------------------------------------------------------------------------
127 |
128 | /**
129 | * is_supported()
130 | *
131 | * Check to see if APC is available on this system, bail if it isn't.
132 | */
133 | public function is_supported()
134 | {
135 | if ( ! extension_loaded('apc') OR ini_get('apc.enabled') != "1")
136 | {
137 | log_message('error', 'The APC PHP extension must be loaded to use APC Cache.');
138 | return FALSE;
139 | }
140 |
141 | return TRUE;
142 | }
143 |
144 | }
145 |
146 | /* End of file Cache_apc.php */
147 | /* Location: ./system/libraries/Cache/drivers/Cache_apc.php */
--------------------------------------------------------------------------------
/ci_vue/system/database/drivers/mssql/mssql_result.php:
--------------------------------------------------------------------------------
1 | result_id);
39 | }
40 |
41 | // --------------------------------------------------------------------
42 |
43 | /**
44 | * Number of fields in the result set
45 | *
46 | * @access public
47 | * @return integer
48 | */
49 | function num_fields()
50 | {
51 | return @mssql_num_fields($this->result_id);
52 | }
53 |
54 | // --------------------------------------------------------------------
55 |
56 | /**
57 | * Fetch Field Names
58 | *
59 | * Generates an array of column names
60 | *
61 | * @access public
62 | * @return array
63 | */
64 | function list_fields()
65 | {
66 | $field_names = array();
67 | while ($field = mssql_fetch_field($this->result_id))
68 | {
69 | $field_names[] = $field->name;
70 | }
71 |
72 | return $field_names;
73 | }
74 |
75 | // --------------------------------------------------------------------
76 |
77 | /**
78 | * Field data
79 | *
80 | * Generates an array of objects containing field meta-data
81 | *
82 | * @access public
83 | * @return array
84 | */
85 | function field_data()
86 | {
87 | $retval = array();
88 | while ($field = mssql_fetch_field($this->result_id))
89 | {
90 | $F = new stdClass();
91 | $F->name = $field->name;
92 | $F->type = $field->type;
93 | $F->max_length = $field->max_length;
94 | $F->primary_key = 0;
95 | $F->default = '';
96 |
97 | $retval[] = $F;
98 | }
99 |
100 | return $retval;
101 | }
102 |
103 | // --------------------------------------------------------------------
104 |
105 | /**
106 | * Free the result
107 | *
108 | * @return null
109 | */
110 | function free_result()
111 | {
112 | if (is_resource($this->result_id))
113 | {
114 | mssql_free_result($this->result_id);
115 | $this->result_id = FALSE;
116 | }
117 | }
118 |
119 | // --------------------------------------------------------------------
120 |
121 | /**
122 | * Data Seek
123 | *
124 | * Moves the internal pointer to the desired offset. We call
125 | * this internally before fetching results to make sure the
126 | * result set starts at zero
127 | *
128 | * @access private
129 | * @return array
130 | */
131 | function _data_seek($n = 0)
132 | {
133 | return mssql_data_seek($this->result_id, $n);
134 | }
135 |
136 | // --------------------------------------------------------------------
137 |
138 | /**
139 | * Result - associative array
140 | *
141 | * Returns the result set as an array
142 | *
143 | * @access private
144 | * @return array
145 | */
146 | function _fetch_assoc()
147 | {
148 | return mssql_fetch_assoc($this->result_id);
149 | }
150 |
151 | // --------------------------------------------------------------------
152 |
153 | /**
154 | * Result - object
155 | *
156 | * Returns the result set as an object
157 | *
158 | * @access private
159 | * @return object
160 | */
161 | function _fetch_object()
162 | {
163 | return mssql_fetch_object($this->result_id);
164 | }
165 |
166 | }
167 |
168 |
169 | /* End of file mssql_result.php */
170 | /* Location: ./system/database/drivers/mssql/mssql_result.php */
--------------------------------------------------------------------------------
/ci_vue/system/database/drivers/sqlsrv/sqlsrv_result.php:
--------------------------------------------------------------------------------
1 | result_id);
39 | }
40 |
41 | // --------------------------------------------------------------------
42 |
43 | /**
44 | * Number of fields in the result set
45 | *
46 | * @access public
47 | * @return integer
48 | */
49 | function num_fields()
50 | {
51 | return @sqlsrv_num_fields($this->result_id);
52 | }
53 |
54 | // --------------------------------------------------------------------
55 |
56 | /**
57 | * Fetch Field Names
58 | *
59 | * Generates an array of column names
60 | *
61 | * @access public
62 | * @return array
63 | */
64 | function list_fields()
65 | {
66 | $field_names = array();
67 | foreach(sqlsrv_field_metadata($this->result_id) as $offset => $field)
68 | {
69 | $field_names[] = $field['Name'];
70 | }
71 |
72 | return $field_names;
73 | }
74 |
75 | // --------------------------------------------------------------------
76 |
77 | /**
78 | * Field data
79 | *
80 | * Generates an array of objects containing field meta-data
81 | *
82 | * @access public
83 | * @return array
84 | */
85 | function field_data()
86 | {
87 | $retval = array();
88 | foreach(sqlsrv_field_metadata($this->result_id) as $offset => $field)
89 | {
90 | $F = new stdClass();
91 | $F->name = $field['Name'];
92 | $F->type = $field['Type'];
93 | $F->max_length = $field['Size'];
94 | $F->primary_key = 0;
95 | $F->default = '';
96 |
97 | $retval[] = $F;
98 | }
99 |
100 | return $retval;
101 | }
102 |
103 | // --------------------------------------------------------------------
104 |
105 | /**
106 | * Free the result
107 | *
108 | * @return null
109 | */
110 | function free_result()
111 | {
112 | if (is_resource($this->result_id))
113 | {
114 | sqlsrv_free_stmt($this->result_id);
115 | $this->result_id = FALSE;
116 | }
117 | }
118 |
119 | // --------------------------------------------------------------------
120 |
121 | /**
122 | * Data Seek
123 | *
124 | * Moves the internal pointer to the desired offset. We call
125 | * this internally before fetching results to make sure the
126 | * result set starts at zero
127 | *
128 | * @access private
129 | * @return array
130 | */
131 | function _data_seek($n = 0)
132 | {
133 | // Not implemented
134 | }
135 |
136 | // --------------------------------------------------------------------
137 |
138 | /**
139 | * Result - associative array
140 | *
141 | * Returns the result set as an array
142 | *
143 | * @access private
144 | * @return array
145 | */
146 | function _fetch_assoc()
147 | {
148 | return sqlsrv_fetch_array($this->result_id, SQLSRV_FETCH_ASSOC);
149 | }
150 |
151 | // --------------------------------------------------------------------
152 |
153 | /**
154 | * Result - object
155 | *
156 | * Returns the result set as an object
157 | *
158 | * @access private
159 | * @return object
160 | */
161 | function _fetch_object()
162 | {
163 | return sqlsrv_fetch_object($this->result_id);
164 | }
165 |
166 | }
167 |
168 |
169 | /* End of file mssql_result.php */
170 | /* Location: ./system/database/drivers/mssql/mssql_result.php */
--------------------------------------------------------------------------------
/ci_vue/system/database/drivers/postgre/postgre_result.php:
--------------------------------------------------------------------------------
1 | result_id);
39 | }
40 |
41 | // --------------------------------------------------------------------
42 |
43 | /**
44 | * Number of fields in the result set
45 | *
46 | * @access public
47 | * @return integer
48 | */
49 | function num_fields()
50 | {
51 | return @pg_num_fields($this->result_id);
52 | }
53 |
54 | // --------------------------------------------------------------------
55 |
56 | /**
57 | * Fetch Field Names
58 | *
59 | * Generates an array of column names
60 | *
61 | * @access public
62 | * @return array
63 | */
64 | function list_fields()
65 | {
66 | $field_names = array();
67 | for ($i = 0; $i < $this->num_fields(); $i++)
68 | {
69 | $field_names[] = pg_field_name($this->result_id, $i);
70 | }
71 |
72 | return $field_names;
73 | }
74 |
75 | // --------------------------------------------------------------------
76 |
77 | /**
78 | * Field data
79 | *
80 | * Generates an array of objects containing field meta-data
81 | *
82 | * @access public
83 | * @return array
84 | */
85 | function field_data()
86 | {
87 | $retval = array();
88 | for ($i = 0; $i < $this->num_fields(); $i++)
89 | {
90 | $F = new stdClass();
91 | $F->name = pg_field_name($this->result_id, $i);
92 | $F->type = pg_field_type($this->result_id, $i);
93 | $F->max_length = pg_field_size($this->result_id, $i);
94 | $F->primary_key = 0;
95 | $F->default = '';
96 |
97 | $retval[] = $F;
98 | }
99 |
100 | return $retval;
101 | }
102 |
103 | // --------------------------------------------------------------------
104 |
105 | /**
106 | * Free the result
107 | *
108 | * @return null
109 | */
110 | function free_result()
111 | {
112 | if (is_resource($this->result_id))
113 | {
114 | pg_free_result($this->result_id);
115 | $this->result_id = FALSE;
116 | }
117 | }
118 |
119 | // --------------------------------------------------------------------
120 |
121 | /**
122 | * Data Seek
123 | *
124 | * Moves the internal pointer to the desired offset. We call
125 | * this internally before fetching results to make sure the
126 | * result set starts at zero
127 | *
128 | * @access private
129 | * @return array
130 | */
131 | function _data_seek($n = 0)
132 | {
133 | return pg_result_seek($this->result_id, $n);
134 | }
135 |
136 | // --------------------------------------------------------------------
137 |
138 | /**
139 | * Result - associative array
140 | *
141 | * Returns the result set as an array
142 | *
143 | * @access private
144 | * @return array
145 | */
146 | function _fetch_assoc()
147 | {
148 | return pg_fetch_assoc($this->result_id);
149 | }
150 |
151 | // --------------------------------------------------------------------
152 |
153 | /**
154 | * Result - object
155 | *
156 | * Returns the result set as an object
157 | *
158 | * @access private
159 | * @return object
160 | */
161 | function _fetch_object()
162 | {
163 | return pg_fetch_object($this->result_id);
164 | }
165 |
166 | }
167 |
168 |
169 | /* End of file postgre_result.php */
170 | /* Location: ./system/database/drivers/postgre/postgre_result.php */
--------------------------------------------------------------------------------
/ci_vue/system/core/Utf8.php:
--------------------------------------------------------------------------------
1 | item('charset') == 'UTF-8' // Application charset must be UTF-8
49 | )
50 | {
51 | log_message('debug', "UTF-8 Support Enabled");
52 |
53 | define('UTF8_ENABLED', TRUE);
54 |
55 | // set internal encoding for multibyte string functions if necessary
56 | // and set a flag so we don't have to repeatedly use extension_loaded()
57 | // or function_exists()
58 | if (extension_loaded('mbstring'))
59 | {
60 | define('MB_ENABLED', TRUE);
61 | mb_internal_encoding('UTF-8');
62 | }
63 | else
64 | {
65 | define('MB_ENABLED', FALSE);
66 | }
67 | }
68 | else
69 | {
70 | log_message('debug', "UTF-8 Support Disabled");
71 | define('UTF8_ENABLED', FALSE);
72 | }
73 | }
74 |
75 | // --------------------------------------------------------------------
76 |
77 | /**
78 | * Clean UTF-8 strings
79 | *
80 | * Ensures strings are UTF-8
81 | *
82 | * @access public
83 | * @param string
84 | * @return string
85 | */
86 | function clean_string($str)
87 | {
88 | if ($this->_is_ascii($str) === FALSE)
89 | {
90 | $str = @iconv('UTF-8', 'UTF-8//IGNORE', $str);
91 | }
92 |
93 | return $str;
94 | }
95 |
96 | // --------------------------------------------------------------------
97 |
98 | /**
99 | * Remove ASCII control characters
100 | *
101 | * Removes all ASCII control characters except horizontal tabs,
102 | * line feeds, and carriage returns, as all others can cause
103 | * problems in XML
104 | *
105 | * @access public
106 | * @param string
107 | * @return string
108 | */
109 | function safe_ascii_for_xml($str)
110 | {
111 | return remove_invisible_characters($str, FALSE);
112 | }
113 |
114 | // --------------------------------------------------------------------
115 |
116 | /**
117 | * Convert to UTF-8
118 | *
119 | * Attempts to convert a string to UTF-8
120 | *
121 | * @access public
122 | * @param string
123 | * @param string - input encoding
124 | * @return string
125 | */
126 | function convert_to_utf8($str, $encoding)
127 | {
128 | if (function_exists('iconv'))
129 | {
130 | $str = @iconv($encoding, 'UTF-8', $str);
131 | }
132 | elseif (function_exists('mb_convert_encoding'))
133 | {
134 | $str = @mb_convert_encoding($str, 'UTF-8', $encoding);
135 | }
136 | else
137 | {
138 | return FALSE;
139 | }
140 |
141 | return $str;
142 | }
143 |
144 | // --------------------------------------------------------------------
145 |
146 | /**
147 | * Is ASCII?
148 | *
149 | * Tests if a string is standard 7-bit ASCII or not
150 | *
151 | * @access public
152 | * @param string
153 | * @return bool
154 | */
155 | function _is_ascii($str)
156 | {
157 | return (preg_match('/[^\x00-\x7F]/S', $str) == 0);
158 | }
159 |
160 | // --------------------------------------------------------------------
161 |
162 | }
163 | // End Utf8 Class
164 |
165 | /* End of file Utf8.php */
166 | /* Location: ./system/core/Utf8.php */
--------------------------------------------------------------------------------
/ci_vue/system/core/Lang.php:
--------------------------------------------------------------------------------
1 | is_loaded, TRUE))
78 | {
79 | return;
80 | }
81 |
82 | $config =& get_config();
83 |
84 | if ($idiom == '')
85 | {
86 | $deft_lang = ( ! isset($config['language'])) ? 'english' : $config['language'];
87 | $idiom = ($deft_lang == '') ? 'english' : $deft_lang;
88 | }
89 |
90 | // Determine where the language file is and load it
91 | if ($alt_path != '' && file_exists($alt_path.'language/'.$idiom.'/'.$langfile))
92 | {
93 | include($alt_path.'language/'.$idiom.'/'.$langfile);
94 | }
95 | else
96 | {
97 | $found = FALSE;
98 |
99 | foreach (get_instance()->load->get_package_paths(TRUE) as $package_path)
100 | {
101 | if (file_exists($package_path.'language/'.$idiom.'/'.$langfile))
102 | {
103 | include($package_path.'language/'.$idiom.'/'.$langfile);
104 | $found = TRUE;
105 | break;
106 | }
107 | }
108 |
109 | if ($found !== TRUE)
110 | {
111 | show_error('Unable to load the requested language file: language/'.$idiom.'/'.$langfile);
112 | }
113 | }
114 |
115 |
116 | if ( ! isset($lang))
117 | {
118 | log_message('error', 'Language file contains no data: language/'.$idiom.'/'.$langfile);
119 | return;
120 | }
121 |
122 | if ($return == TRUE)
123 | {
124 | return $lang;
125 | }
126 |
127 | $this->is_loaded[] = $langfile;
128 | $this->language = array_merge($this->language, $lang);
129 | unset($lang);
130 |
131 | log_message('debug', 'Language file loaded: language/'.$idiom.'/'.$langfile);
132 | return TRUE;
133 | }
134 |
135 | // --------------------------------------------------------------------
136 |
137 | /**
138 | * Fetch a single line of text from the language array
139 | *
140 | * @access public
141 | * @param string $line the language line
142 | * @return string
143 | */
144 | function line($line = '')
145 | {
146 | $value = ($line == '' OR ! isset($this->language[$line])) ? FALSE : $this->language[$line];
147 |
148 | // Because killer robots like unicorns!
149 | if ($value === FALSE)
150 | {
151 | log_message('error', 'Could not find the language line "'.$line.'"');
152 | }
153 |
154 | return $value;
155 | }
156 |
157 | }
158 | // END Language Class
159 |
160 | /* End of file Lang.php */
161 | /* Location: ./system/core/Lang.php */
162 |
--------------------------------------------------------------------------------
/ci_vue/system/database/drivers/pdo/pdo_result.php:
--------------------------------------------------------------------------------
1 | num_rows))
40 | {
41 | return $this->num_rows;
42 | }
43 | elseif (($this->num_rows = $this->result_id->rowCount()) > 0)
44 | {
45 | return $this->num_rows;
46 | }
47 |
48 | $this->num_rows = count($this->result_id->fetchAll());
49 | $this->result_id->execute();
50 | return $this->num_rows;
51 | }
52 |
53 | // --------------------------------------------------------------------
54 |
55 | /**
56 | * Number of fields in the result set
57 | *
58 | * @access public
59 | * @return integer
60 | */
61 | function num_fields()
62 | {
63 | return $this->result_id->columnCount();
64 | }
65 |
66 | // --------------------------------------------------------------------
67 |
68 | /**
69 | * Fetch Field Names
70 | *
71 | * Generates an array of column names
72 | *
73 | * @access public
74 | * @return array
75 | */
76 | function list_fields()
77 | {
78 | if ($this->db->db_debug)
79 | {
80 | return $this->db->display_error('db_unsuported_feature');
81 | }
82 | return FALSE;
83 | }
84 |
85 | // --------------------------------------------------------------------
86 |
87 | /**
88 | * Field data
89 | *
90 | * Generates an array of objects containing field meta-data
91 | *
92 | * @access public
93 | * @return array
94 | */
95 | function field_data()
96 | {
97 | $data = array();
98 |
99 | try
100 | {
101 | for($i = 0; $i < $this->num_fields(); $i++)
102 | {
103 | $data[] = $this->result_id->getColumnMeta($i);
104 | }
105 |
106 | return $data;
107 | }
108 | catch (Exception $e)
109 | {
110 | if ($this->db->db_debug)
111 | {
112 | return $this->db->display_error('db_unsuported_feature');
113 | }
114 | return FALSE;
115 | }
116 | }
117 |
118 | // --------------------------------------------------------------------
119 |
120 | /**
121 | * Free the result
122 | *
123 | * @return null
124 | */
125 | function free_result()
126 | {
127 | if (is_object($this->result_id))
128 | {
129 | $this->result_id = FALSE;
130 | }
131 | }
132 |
133 | // --------------------------------------------------------------------
134 |
135 | /**
136 | * Data Seek
137 | *
138 | * Moves the internal pointer to the desired offset. We call
139 | * this internally before fetching results to make sure the
140 | * result set starts at zero
141 | *
142 | * @access private
143 | * @return array
144 | */
145 | function _data_seek($n = 0)
146 | {
147 | return FALSE;
148 | }
149 |
150 | // --------------------------------------------------------------------
151 |
152 | /**
153 | * Result - associative array
154 | *
155 | * Returns the result set as an array
156 | *
157 | * @access private
158 | * @return array
159 | */
160 | function _fetch_assoc()
161 | {
162 | return $this->result_id->fetch(PDO::FETCH_ASSOC);
163 | }
164 |
165 | // --------------------------------------------------------------------
166 |
167 | /**
168 | * Result - object
169 | *
170 | * Returns the result set as an object
171 | *
172 | * @access private
173 | * @return object
174 | */
175 | function _fetch_object()
176 | {
177 | return $this->result_id->fetchObject();
178 | }
179 |
180 | }
181 |
182 |
183 | /* End of file pdo_result.php */
184 | /* Location: ./system/database/drivers/pdo/pdo_result.php */
--------------------------------------------------------------------------------
/ci_vue/system/database/drivers/sqlite/sqlite_result.php:
--------------------------------------------------------------------------------
1 | result_id);
39 | }
40 |
41 | // --------------------------------------------------------------------
42 |
43 | /**
44 | * Number of fields in the result set
45 | *
46 | * @access public
47 | * @return integer
48 | */
49 | function num_fields()
50 | {
51 | return @sqlite_num_fields($this->result_id);
52 | }
53 |
54 | // --------------------------------------------------------------------
55 |
56 | /**
57 | * Fetch Field Names
58 | *
59 | * Generates an array of column names
60 | *
61 | * @access public
62 | * @return array
63 | */
64 | function list_fields()
65 | {
66 | $field_names = array();
67 | for ($i = 0; $i < $this->num_fields(); $i++)
68 | {
69 | $field_names[] = sqlite_field_name($this->result_id, $i);
70 | }
71 |
72 | return $field_names;
73 | }
74 |
75 | // --------------------------------------------------------------------
76 |
77 | /**
78 | * Field data
79 | *
80 | * Generates an array of objects containing field meta-data
81 | *
82 | * @access public
83 | * @return array
84 | */
85 | function field_data()
86 | {
87 | $retval = array();
88 | for ($i = 0; $i < $this->num_fields(); $i++)
89 | {
90 | $F = new stdClass();
91 | $F->name = sqlite_field_name($this->result_id, $i);
92 | $F->type = 'varchar';
93 | $F->max_length = 0;
94 | $F->primary_key = 0;
95 | $F->default = '';
96 |
97 | $retval[] = $F;
98 | }
99 |
100 | return $retval;
101 | }
102 |
103 | // --------------------------------------------------------------------
104 |
105 | /**
106 | * Free the result
107 | *
108 | * @return null
109 | */
110 | function free_result()
111 | {
112 | // Not implemented in SQLite
113 | }
114 |
115 | // --------------------------------------------------------------------
116 |
117 | /**
118 | * Data Seek
119 | *
120 | * Moves the internal pointer to the desired offset. We call
121 | * this internally before fetching results to make sure the
122 | * result set starts at zero
123 | *
124 | * @access private
125 | * @return array
126 | */
127 | function _data_seek($n = 0)
128 | {
129 | return sqlite_seek($this->result_id, $n);
130 | }
131 |
132 | // --------------------------------------------------------------------
133 |
134 | /**
135 | * Result - associative array
136 | *
137 | * Returns the result set as an array
138 | *
139 | * @access private
140 | * @return array
141 | */
142 | function _fetch_assoc()
143 | {
144 | return sqlite_fetch_array($this->result_id);
145 | }
146 |
147 | // --------------------------------------------------------------------
148 |
149 | /**
150 | * Result - object
151 | *
152 | * Returns the result set as an object
153 | *
154 | * @access private
155 | * @return object
156 | */
157 | function _fetch_object()
158 | {
159 | if (function_exists('sqlite_fetch_object'))
160 | {
161 | return sqlite_fetch_object($this->result_id);
162 | }
163 | else
164 | {
165 | $arr = sqlite_fetch_array($this->result_id, SQLITE_ASSOC);
166 | if (is_array($arr))
167 | {
168 | $obj = (object) $arr;
169 | return $obj;
170 | } else {
171 | return NULL;
172 | }
173 | }
174 | }
175 |
176 | }
177 |
178 |
179 | /* End of file sqlite_result.php */
180 | /* Location: ./system/database/drivers/sqlite/sqlite_result.php */
--------------------------------------------------------------------------------
/ci_vue/system/database/drivers/mysql/mysql_result.php:
--------------------------------------------------------------------------------
1 | result_id);
39 | }
40 |
41 | // --------------------------------------------------------------------
42 |
43 | /**
44 | * Number of fields in the result set
45 | *
46 | * @access public
47 | * @return integer
48 | */
49 | function num_fields()
50 | {
51 | return @mysql_num_fields($this->result_id);
52 | }
53 |
54 | // --------------------------------------------------------------------
55 |
56 | /**
57 | * Fetch Field Names
58 | *
59 | * Generates an array of column names
60 | *
61 | * @access public
62 | * @return array
63 | */
64 | function list_fields()
65 | {
66 | $field_names = array();
67 | while ($field = mysql_fetch_field($this->result_id))
68 | {
69 | $field_names[] = $field->name;
70 | }
71 |
72 | return $field_names;
73 | }
74 |
75 | // --------------------------------------------------------------------
76 |
77 | /**
78 | * Field data
79 | *
80 | * Generates an array of objects containing field meta-data
81 | *
82 | * @access public
83 | * @return array
84 | */
85 | function field_data()
86 | {
87 | $retval = array();
88 | while ($field = mysql_fetch_object($this->result_id))
89 | {
90 | preg_match('/([a-zA-Z]+)(\(\d+\))?/', $field->Type, $matches);
91 |
92 | $type = (array_key_exists(1, $matches)) ? $matches[1] : NULL;
93 | $length = (array_key_exists(2, $matches)) ? preg_replace('/[^\d]/', '', $matches[2]) : NULL;
94 |
95 | $F = new stdClass();
96 | $F->name = $field->Field;
97 | $F->type = $type;
98 | $F->default = $field->Default;
99 | $F->max_length = $length;
100 | $F->primary_key = ( $field->Key == 'PRI' ? 1 : 0 );
101 |
102 | $retval[] = $F;
103 | }
104 |
105 | return $retval;
106 | }
107 |
108 | // --------------------------------------------------------------------
109 |
110 | /**
111 | * Free the result
112 | *
113 | * @return null
114 | */
115 | function free_result()
116 | {
117 | if (is_resource($this->result_id))
118 | {
119 | mysql_free_result($this->result_id);
120 | $this->result_id = FALSE;
121 | }
122 | }
123 |
124 | // --------------------------------------------------------------------
125 |
126 | /**
127 | * Data Seek
128 | *
129 | * Moves the internal pointer to the desired offset. We call
130 | * this internally before fetching results to make sure the
131 | * result set starts at zero
132 | *
133 | * @access private
134 | * @return array
135 | */
136 | function _data_seek($n = 0)
137 | {
138 | return mysql_data_seek($this->result_id, $n);
139 | }
140 |
141 | // --------------------------------------------------------------------
142 |
143 | /**
144 | * Result - associative array
145 | *
146 | * Returns the result set as an array
147 | *
148 | * @access private
149 | * @return array
150 | */
151 | function _fetch_assoc()
152 | {
153 | return mysql_fetch_assoc($this->result_id);
154 | }
155 |
156 | // --------------------------------------------------------------------
157 |
158 | /**
159 | * Result - object
160 | *
161 | * Returns the result set as an object
162 | *
163 | * @access private
164 | * @return object
165 | */
166 | function _fetch_object()
167 | {
168 | return mysql_fetch_object($this->result_id);
169 | }
170 |
171 | }
172 |
173 |
174 | /* End of file mysql_result.php */
175 | /* Location: ./system/database/drivers/mysql/mysql_result.php */
--------------------------------------------------------------------------------
/ci_vue/system/database/drivers/mysqli/mysqli_result.php:
--------------------------------------------------------------------------------
1 | result_id);
39 | }
40 |
41 | // --------------------------------------------------------------------
42 |
43 | /**
44 | * Number of fields in the result set
45 | *
46 | * @access public
47 | * @return integer
48 | */
49 | function num_fields()
50 | {
51 | return @mysqli_num_fields($this->result_id);
52 | }
53 |
54 | // --------------------------------------------------------------------
55 |
56 | /**
57 | * Fetch Field Names
58 | *
59 | * Generates an array of column names
60 | *
61 | * @access public
62 | * @return array
63 | */
64 | function list_fields()
65 | {
66 | $field_names = array();
67 | while ($field = mysqli_fetch_field($this->result_id))
68 | {
69 | $field_names[] = $field->name;
70 | }
71 |
72 | return $field_names;
73 | }
74 |
75 | // --------------------------------------------------------------------
76 |
77 | /**
78 | * Field data
79 | *
80 | * Generates an array of objects containing field meta-data
81 | *
82 | * @access public
83 | * @return array
84 | */
85 | function field_data()
86 | {
87 | $retval = array();
88 | while ($field = mysqli_fetch_object($this->result_id))
89 | {
90 | preg_match('/([a-zA-Z]+)(\(\d+\))?/', $field->Type, $matches);
91 |
92 | $type = (array_key_exists(1, $matches)) ? $matches[1] : NULL;
93 | $length = (array_key_exists(2, $matches)) ? preg_replace('/[^\d]/', '', $matches[2]) : NULL;
94 |
95 | $F = new stdClass();
96 | $F->name = $field->Field;
97 | $F->type = $type;
98 | $F->default = $field->Default;
99 | $F->max_length = $length;
100 | $F->primary_key = ( $field->Key == 'PRI' ? 1 : 0 );
101 |
102 | $retval[] = $F;
103 | }
104 |
105 | return $retval;
106 | }
107 |
108 | // --------------------------------------------------------------------
109 |
110 | /**
111 | * Free the result
112 | *
113 | * @return null
114 | */
115 | function free_result()
116 | {
117 | if (is_object($this->result_id))
118 | {
119 | mysqli_free_result($this->result_id);
120 | $this->result_id = FALSE;
121 | }
122 | }
123 |
124 | // --------------------------------------------------------------------
125 |
126 | /**
127 | * Data Seek
128 | *
129 | * Moves the internal pointer to the desired offset. We call
130 | * this internally before fetching results to make sure the
131 | * result set starts at zero
132 | *
133 | * @access private
134 | * @return array
135 | */
136 | function _data_seek($n = 0)
137 | {
138 | return mysqli_data_seek($this->result_id, $n);
139 | }
140 |
141 | // --------------------------------------------------------------------
142 |
143 | /**
144 | * Result - associative array
145 | *
146 | * Returns the result set as an array
147 | *
148 | * @access private
149 | * @return array
150 | */
151 | function _fetch_assoc()
152 | {
153 | return mysqli_fetch_assoc($this->result_id);
154 | }
155 |
156 | // --------------------------------------------------------------------
157 |
158 | /**
159 | * Result - object
160 | *
161 | * Returns the result set as an object
162 | *
163 | * @access private
164 | * @return object
165 | */
166 | function _fetch_object()
167 | {
168 | return mysqli_fetch_object($this->result_id);
169 | }
170 |
171 | }
172 |
173 |
174 | /* End of file mysqli_result.php */
175 | /* Location: ./system/database/drivers/mysqli/mysqli_result.php */
--------------------------------------------------------------------------------
/ci_vue/application/config/mimes.php:
--------------------------------------------------------------------------------
1 | 'application/mac-binhex40',
12 | 'cpt' => 'application/mac-compactpro',
13 | 'csv' => array('text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'application/x-csv', 'text/x-csv', 'text/csv', 'application/csv', 'application/excel', 'application/vnd.msexcel'),
14 | 'bin' => 'application/macbinary',
15 | 'dms' => 'application/octet-stream',
16 | 'lha' => 'application/octet-stream',
17 | 'lzh' => 'application/octet-stream',
18 | 'exe' => array('application/octet-stream', 'application/x-msdownload'),
19 | 'class' => 'application/octet-stream',
20 | 'psd' => 'application/x-photoshop',
21 | 'so' => 'application/octet-stream',
22 | 'sea' => 'application/octet-stream',
23 | 'dll' => 'application/octet-stream',
24 | 'oda' => 'application/oda',
25 | 'pdf' => array('application/pdf', 'application/x-download'),
26 | 'ai' => 'application/postscript',
27 | 'eps' => 'application/postscript',
28 | 'ps' => 'application/postscript',
29 | 'smi' => 'application/smil',
30 | 'smil' => 'application/smil',
31 | 'mif' => 'application/vnd.mif',
32 | 'xls' => array('application/excel', 'application/vnd.ms-excel', 'application/msexcel'),
33 | 'ppt' => array('application/powerpoint', 'application/vnd.ms-powerpoint'),
34 | 'wbxml' => 'application/wbxml',
35 | 'wmlc' => 'application/wmlc',
36 | 'dcr' => 'application/x-director',
37 | 'dir' => 'application/x-director',
38 | 'dxr' => 'application/x-director',
39 | 'dvi' => 'application/x-dvi',
40 | 'gtar' => 'application/x-gtar',
41 | 'gz' => 'application/x-gzip',
42 | 'php' => 'application/x-httpd-php',
43 | 'php4' => 'application/x-httpd-php',
44 | 'php3' => 'application/x-httpd-php',
45 | 'phtml' => 'application/x-httpd-php',
46 | 'phps' => 'application/x-httpd-php-source',
47 | 'js' => 'application/x-javascript',
48 | 'swf' => 'application/x-shockwave-flash',
49 | 'sit' => 'application/x-stuffit',
50 | 'tar' => 'application/x-tar',
51 | 'tgz' => array('application/x-tar', 'application/x-gzip-compressed'),
52 | 'xhtml' => 'application/xhtml+xml',
53 | 'xht' => 'application/xhtml+xml',
54 | 'zip' => array('application/x-zip', 'application/zip', 'application/x-zip-compressed'),
55 | 'mid' => 'audio/midi',
56 | 'midi' => 'audio/midi',
57 | 'mpga' => 'audio/mpeg',
58 | 'mp2' => 'audio/mpeg',
59 | 'mp3' => array('audio/mpeg', 'audio/mpg', 'audio/mpeg3', 'audio/mp3'),
60 | 'aif' => 'audio/x-aiff',
61 | 'aiff' => 'audio/x-aiff',
62 | 'aifc' => 'audio/x-aiff',
63 | 'ram' => 'audio/x-pn-realaudio',
64 | 'rm' => 'audio/x-pn-realaudio',
65 | 'rpm' => 'audio/x-pn-realaudio-plugin',
66 | 'ra' => 'audio/x-realaudio',
67 | 'rv' => 'video/vnd.rn-realvideo',
68 | 'wav' => array('audio/x-wav', 'audio/wave', 'audio/wav'),
69 | 'bmp' => array('image/bmp', 'image/x-windows-bmp'),
70 | 'gif' => 'image/gif',
71 | 'jpeg' => array('image/jpeg', 'image/pjpeg'),
72 | 'jpg' => array('image/jpeg', 'image/pjpeg'),
73 | 'jpe' => array('image/jpeg', 'image/pjpeg'),
74 | 'png' => array('image/png', 'image/x-png'),
75 | 'tiff' => 'image/tiff',
76 | 'tif' => 'image/tiff',
77 | 'css' => 'text/css',
78 | 'html' => 'text/html',
79 | 'htm' => 'text/html',
80 | 'shtml' => 'text/html',
81 | 'txt' => 'text/plain',
82 | 'text' => 'text/plain',
83 | 'log' => array('text/plain', 'text/x-log'),
84 | 'rtx' => 'text/richtext',
85 | 'rtf' => 'text/rtf',
86 | 'xml' => 'text/xml',
87 | 'xsl' => 'text/xml',
88 | 'mpeg' => 'video/mpeg',
89 | 'mpg' => 'video/mpeg',
90 | 'mpe' => 'video/mpeg',
91 | 'qt' => 'video/quicktime',
92 | 'mov' => 'video/quicktime',
93 | 'avi' => 'video/x-msvideo',
94 | 'movie' => 'video/x-sgi-movie',
95 | 'doc' => 'application/msword',
96 | 'docx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip'),
97 | 'xlsx' => array('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/zip'),
98 | 'word' => array('application/msword', 'application/octet-stream'),
99 | 'xl' => 'application/excel',
100 | 'eml' => 'message/rfc822',
101 | 'json' => array('application/json', 'text/json')
102 | );
103 |
104 |
105 | /* End of file mimes.php */
106 | /* Location: ./application/config/mimes.php */
107 |
--------------------------------------------------------------------------------
/ci_vue/system/database/DB.php:
--------------------------------------------------------------------------------
1 | $dns['scheme'],
78 | 'hostname' => (isset($dns['host'])) ? rawurldecode($dns['host']) : '',
79 | 'username' => (isset($dns['user'])) ? rawurldecode($dns['user']) : '',
80 | 'password' => (isset($dns['pass'])) ? rawurldecode($dns['pass']) : '',
81 | 'database' => (isset($dns['path'])) ? rawurldecode(substr($dns['path'], 1)) : ''
82 | );
83 |
84 | // were additional config items set?
85 | if (isset($dns['query']))
86 | {
87 | parse_str($dns['query'], $extra);
88 |
89 | foreach ($extra as $key => $val)
90 | {
91 | // booleans please
92 | if (strtoupper($val) == "TRUE")
93 | {
94 | $val = TRUE;
95 | }
96 | elseif (strtoupper($val) == "FALSE")
97 | {
98 | $val = FALSE;
99 | }
100 |
101 | $params[$key] = $val;
102 | }
103 | }
104 | }
105 |
106 | // No DB specified yet? Beat them senseless...
107 | if ( ! isset($params['dbdriver']) OR $params['dbdriver'] == '')
108 | {
109 | show_error('You have not selected a database type to connect to.');
110 | }
111 |
112 | // Load the DB classes. Note: Since the active record class is optional
113 | // we need to dynamically create a class that extends proper parent class
114 | // based on whether we're using the active record class or not.
115 | // Kudos to Paul for discovering this clever use of eval()
116 |
117 | if ($active_record_override !== NULL)
118 | {
119 | $active_record = $active_record_override;
120 | }
121 |
122 | require_once(BASEPATH.'database/DB_driver.php');
123 |
124 | if ( ! isset($active_record) OR $active_record == TRUE)
125 | {
126 | require_once(BASEPATH.'database/DB_active_rec.php');
127 |
128 | if ( ! class_exists('CI_DB'))
129 | {
130 | eval('class CI_DB extends CI_DB_active_record { }');
131 | }
132 | }
133 | else
134 | {
135 | if ( ! class_exists('CI_DB'))
136 | {
137 | eval('class CI_DB extends CI_DB_driver { }');
138 | }
139 | }
140 |
141 | require_once(BASEPATH.'database/drivers/'.$params['dbdriver'].'/'.$params['dbdriver'].'_driver.php');
142 |
143 | // Instantiate the DB adapter
144 | $driver = 'CI_DB_'.$params['dbdriver'].'_driver';
145 | $DB = new $driver($params);
146 |
147 | if ($DB->autoinit == TRUE)
148 | {
149 | $DB->initialize();
150 | }
151 |
152 | if (isset($params['stricton']) && $params['stricton'] == TRUE)
153 | {
154 | $DB->query('SET SESSION sql_mode="STRICT_ALL_TABLES"');
155 | }
156 |
157 | return $DB;
158 | }
159 |
160 |
161 |
162 | /* End of file DB.php */
163 | /* Location: ./system/database/DB.php */
--------------------------------------------------------------------------------
/ci_vue/system/libraries/Cache/drivers/Cache_file.php:
--------------------------------------------------------------------------------
1 | load->helper('file');
39 |
40 | $path = $CI->config->item('cache_path');
41 |
42 | $this->_cache_path = ($path == '') ? APPPATH.'cache/' : $path;
43 | }
44 |
45 | // ------------------------------------------------------------------------
46 |
47 | /**
48 | * Fetch from cache
49 | *
50 | * @param mixed unique key id
51 | * @return mixed data on success/false on failure
52 | */
53 | public function get($id)
54 | {
55 | if ( ! file_exists($this->_cache_path.$id))
56 | {
57 | return FALSE;
58 | }
59 |
60 | $data = read_file($this->_cache_path.$id);
61 | $data = unserialize($data);
62 |
63 | if (time() > $data['time'] + $data['ttl'])
64 | {
65 | unlink($this->_cache_path.$id);
66 | return FALSE;
67 | }
68 |
69 | return $data['data'];
70 | }
71 |
72 | // ------------------------------------------------------------------------
73 |
74 | /**
75 | * Save into cache
76 | *
77 | * @param string unique key
78 | * @param mixed data to store
79 | * @param int length of time (in seconds) the cache is valid
80 | * - Default is 60 seconds
81 | * @return boolean true on success/false on failure
82 | */
83 | public function save($id, $data, $ttl = 60)
84 | {
85 | $contents = array(
86 | 'time' => time(),
87 | 'ttl' => $ttl,
88 | 'data' => $data
89 | );
90 |
91 | if (write_file($this->_cache_path.$id, serialize($contents)))
92 | {
93 | @chmod($this->_cache_path.$id, 0777);
94 | return TRUE;
95 | }
96 |
97 | return FALSE;
98 | }
99 |
100 | // ------------------------------------------------------------------------
101 |
102 | /**
103 | * Delete from Cache
104 | *
105 | * @param mixed unique identifier of item in cache
106 | * @return boolean true on success/false on failure
107 | */
108 | public function delete($id)
109 | {
110 | return unlink($this->_cache_path.$id);
111 | }
112 |
113 | // ------------------------------------------------------------------------
114 |
115 | /**
116 | * Clean the Cache
117 | *
118 | * @return boolean false on failure/true on success
119 | */
120 | public function clean()
121 | {
122 | return delete_files($this->_cache_path);
123 | }
124 |
125 | // ------------------------------------------------------------------------
126 |
127 | /**
128 | * Cache Info
129 | *
130 | * Not supported by file-based caching
131 | *
132 | * @param string user/filehits
133 | * @return mixed FALSE
134 | */
135 | public function cache_info($type = NULL)
136 | {
137 | return get_dir_file_info($this->_cache_path);
138 | }
139 |
140 | // ------------------------------------------------------------------------
141 |
142 | /**
143 | * Get Cache Metadata
144 | *
145 | * @param mixed key to get cache metadata on
146 | * @return mixed FALSE on failure, array on success.
147 | */
148 | public function get_metadata($id)
149 | {
150 | if ( ! file_exists($this->_cache_path.$id))
151 | {
152 | return FALSE;
153 | }
154 |
155 | $data = read_file($this->_cache_path.$id);
156 | $data = unserialize($data);
157 |
158 | if (is_array($data))
159 | {
160 | $mtime = filemtime($this->_cache_path.$id);
161 |
162 | if ( ! isset($data['ttl']))
163 | {
164 | return FALSE;
165 | }
166 |
167 | return array(
168 | 'expire' => $mtime + $data['ttl'],
169 | 'mtime' => $mtime
170 | );
171 | }
172 |
173 | return FALSE;
174 | }
175 |
176 | // ------------------------------------------------------------------------
177 |
178 | /**
179 | * Is supported
180 | *
181 | * In the file driver, check to see that the cache directory is indeed writable
182 | *
183 | * @return boolean
184 | */
185 | public function is_supported()
186 | {
187 | return is_really_writable($this->_cache_path);
188 | }
189 |
190 | }
191 |
192 | /* End of file Cache_file.php */
193 | /* Location: ./system/libraries/Cache/drivers/Cache_file.php */
--------------------------------------------------------------------------------
/ci_vue/system/database/DB_cache.php:
--------------------------------------------------------------------------------
1 | CI
40 | // and load the file helper since we use it a lot
41 | $this->CI =& get_instance();
42 | $this->db =& $db;
43 | $this->CI->load->helper('file');
44 | }
45 |
46 | // --------------------------------------------------------------------
47 |
48 | /**
49 | * Set Cache Directory Path
50 | *
51 | * @access public
52 | * @param string the path to the cache directory
53 | * @return bool
54 | */
55 | function check_path($path = '')
56 | {
57 | if ($path == '')
58 | {
59 | if ($this->db->cachedir == '')
60 | {
61 | return $this->db->cache_off();
62 | }
63 |
64 | $path = $this->db->cachedir;
65 | }
66 |
67 | // Add a trailing slash to the path if needed
68 | $path = preg_replace("/(.+?)\/*$/", "\\1/", $path);
69 |
70 | if ( ! is_dir($path) OR ! is_really_writable($path))
71 | {
72 | // If the path is wrong we'll turn off caching
73 | return $this->db->cache_off();
74 | }
75 |
76 | $this->db->cachedir = $path;
77 | return TRUE;
78 | }
79 |
80 | // --------------------------------------------------------------------
81 |
82 | /**
83 | * Retrieve a cached query
84 | *
85 | * The URI being requested will become the name of the cache sub-folder.
86 | * An MD5 hash of the SQL statement will become the cache file name
87 | *
88 | * @access public
89 | * @return string
90 | */
91 | function read($sql)
92 | {
93 | if ( ! $this->check_path())
94 | {
95 | return $this->db->cache_off();
96 | }
97 |
98 | $segment_one = ($this->CI->uri->segment(1) == FALSE) ? 'default' : $this->CI->uri->segment(1);
99 |
100 | $segment_two = ($this->CI->uri->segment(2) == FALSE) ? 'index' : $this->CI->uri->segment(2);
101 |
102 | $filepath = $this->db->cachedir.$segment_one.'+'.$segment_two.'/'.md5($sql);
103 |
104 | if (FALSE === ($cachedata = read_file($filepath)))
105 | {
106 | return FALSE;
107 | }
108 |
109 | return unserialize($cachedata);
110 | }
111 |
112 | // --------------------------------------------------------------------
113 |
114 | /**
115 | * Write a query to a cache file
116 | *
117 | * @access public
118 | * @return bool
119 | */
120 | function write($sql, $object)
121 | {
122 | if ( ! $this->check_path())
123 | {
124 | return $this->db->cache_off();
125 | }
126 |
127 | $segment_one = ($this->CI->uri->segment(1) == FALSE) ? 'default' : $this->CI->uri->segment(1);
128 |
129 | $segment_two = ($this->CI->uri->segment(2) == FALSE) ? 'index' : $this->CI->uri->segment(2);
130 |
131 | $dir_path = $this->db->cachedir.$segment_one.'+'.$segment_two.'/';
132 |
133 | $filename = md5($sql);
134 |
135 | if ( ! @is_dir($dir_path))
136 | {
137 | if ( ! @mkdir($dir_path, DIR_WRITE_MODE))
138 | {
139 | return FALSE;
140 | }
141 |
142 | @chmod($dir_path, DIR_WRITE_MODE);
143 | }
144 |
145 | if (write_file($dir_path.$filename, serialize($object)) === FALSE)
146 | {
147 | return FALSE;
148 | }
149 |
150 | @chmod($dir_path.$filename, FILE_WRITE_MODE);
151 | return TRUE;
152 | }
153 |
154 | // --------------------------------------------------------------------
155 |
156 | /**
157 | * Delete cache files within a particular directory
158 | *
159 | * @access public
160 | * @return bool
161 | */
162 | function delete($segment_one = '', $segment_two = '')
163 | {
164 | if ($segment_one == '')
165 | {
166 | $segment_one = ($this->CI->uri->segment(1) == FALSE) ? 'default' : $this->CI->uri->segment(1);
167 | }
168 |
169 | if ($segment_two == '')
170 | {
171 | $segment_two = ($this->CI->uri->segment(2) == FALSE) ? 'index' : $this->CI->uri->segment(2);
172 | }
173 |
174 | $dir_path = $this->db->cachedir.$segment_one.'+'.$segment_two.'/';
175 |
176 | delete_files($dir_path, TRUE);
177 | }
178 |
179 | // --------------------------------------------------------------------
180 |
181 | /**
182 | * Delete all existing cache files
183 | *
184 | * @access public
185 | * @return bool
186 | */
187 | function delete_all()
188 | {
189 | delete_files($this->db->cachedir, TRUE);
190 | }
191 |
192 | }
193 |
194 |
195 | /* End of file DB_cache.php */
196 | /* Location: ./system/database/DB_cache.php */
--------------------------------------------------------------------------------
/ci_vue/system/libraries/Parser.php:
--------------------------------------------------------------------------------
1 | load->view($template, $data, TRUE);
50 |
51 | return $this->_parse($template, $data, $return);
52 | }
53 |
54 | // --------------------------------------------------------------------
55 |
56 | /**
57 | * Parse a String
58 | *
59 | * Parses pseudo-variables contained in the specified string,
60 | * replacing them with the data in the second param
61 | *
62 | * @access public
63 | * @param string
64 | * @param array
65 | * @param bool
66 | * @return string
67 | */
68 | function parse_string($template, $data, $return = FALSE)
69 | {
70 | return $this->_parse($template, $data, $return);
71 | }
72 |
73 | // --------------------------------------------------------------------
74 |
75 | /**
76 | * Parse a template
77 | *
78 | * Parses pseudo-variables contained in the specified template,
79 | * replacing them with the data in the second param
80 | *
81 | * @access public
82 | * @param string
83 | * @param array
84 | * @param bool
85 | * @return string
86 | */
87 | function _parse($template, $data, $return = FALSE)
88 | {
89 | if ($template == '')
90 | {
91 | return FALSE;
92 | }
93 |
94 | foreach ($data as $key => $val)
95 | {
96 | if (is_array($val))
97 | {
98 | $template = $this->_parse_pair($key, $val, $template);
99 | }
100 | else
101 | {
102 | $template = $this->_parse_single($key, (string)$val, $template);
103 | }
104 | }
105 |
106 | if ($return == FALSE)
107 | {
108 | $CI =& get_instance();
109 | $CI->output->append_output($template);
110 | }
111 |
112 | return $template;
113 | }
114 |
115 | // --------------------------------------------------------------------
116 |
117 | /**
118 | * Set the left/right variable delimiters
119 | *
120 | * @access public
121 | * @param string
122 | * @param string
123 | * @return void
124 | */
125 | function set_delimiters($l = '{', $r = '}')
126 | {
127 | $this->l_delim = $l;
128 | $this->r_delim = $r;
129 | }
130 |
131 | // --------------------------------------------------------------------
132 |
133 | /**
134 | * Parse a single key/value
135 | *
136 | * @access private
137 | * @param string
138 | * @param string
139 | * @param string
140 | * @return string
141 | */
142 | function _parse_single($key, $val, $string)
143 | {
144 | return str_replace($this->l_delim.$key.$this->r_delim, $val, $string);
145 | }
146 |
147 | // --------------------------------------------------------------------
148 |
149 | /**
150 | * Parse a tag pair
151 | *
152 | * Parses tag pairs: {some_tag} string... {/some_tag}
153 | *
154 | * @access private
155 | * @param string
156 | * @param array
157 | * @param string
158 | * @return string
159 | */
160 | function _parse_pair($variable, $data, $string)
161 | {
162 | if (FALSE === ($match = $this->_match_pair($string, $variable)))
163 | {
164 | return $string;
165 | }
166 |
167 | $str = '';
168 | foreach ($data as $row)
169 | {
170 | $temp = $match['1'];
171 | foreach ($row as $key => $val)
172 | {
173 | if ( ! is_array($val))
174 | {
175 | $temp = $this->_parse_single($key, $val, $temp);
176 | }
177 | else
178 | {
179 | $temp = $this->_parse_pair($key, $val, $temp);
180 | }
181 | }
182 |
183 | $str .= $temp;
184 | }
185 |
186 | return str_replace($match['0'], $str, $string);
187 | }
188 |
189 | // --------------------------------------------------------------------
190 |
191 | /**
192 | * Matches a variable pair
193 | *
194 | * @access private
195 | * @param string
196 | * @param string
197 | * @return mixed
198 | */
199 | function _match_pair($string, $variable)
200 | {
201 | if ( ! preg_match("|" . preg_quote($this->l_delim) . $variable . preg_quote($this->r_delim) . "(.+?)". preg_quote($this->l_delim) . '/' . $variable . preg_quote($this->r_delim) . "|s", $string, $match))
202 | {
203 | return FALSE;
204 | }
205 |
206 | return $match;
207 | }
208 |
209 | }
210 | // END Parser Class
211 |
212 | /* End of file Parser.php */
213 | /* Location: ./system/libraries/Parser.php */
214 |
--------------------------------------------------------------------------------
/ci_vue/system/database/drivers/cubrid/cubrid_result.php:
--------------------------------------------------------------------------------
1 | result_id);
39 | }
40 |
41 | // --------------------------------------------------------------------
42 |
43 | /**
44 | * Number of fields in the result set
45 | *
46 | * @access public
47 | * @return integer
48 | */
49 | function num_fields()
50 | {
51 | return @cubrid_num_fields($this->result_id);
52 | }
53 |
54 | // --------------------------------------------------------------------
55 |
56 | /**
57 | * Fetch Field Names
58 | *
59 | * Generates an array of column names
60 | *
61 | * @access public
62 | * @return array
63 | */
64 | function list_fields()
65 | {
66 | return cubrid_column_names($this->result_id);
67 | }
68 |
69 | // --------------------------------------------------------------------
70 |
71 | /**
72 | * Field data
73 | *
74 | * Generates an array of objects containing field meta-data
75 | *
76 | * @access public
77 | * @return array
78 | */
79 | function field_data()
80 | {
81 | $retval = array();
82 |
83 | $tablePrimaryKeys = array();
84 |
85 | while ($field = cubrid_fetch_field($this->result_id))
86 | {
87 | $F = new stdClass();
88 | $F->name = $field->name;
89 | $F->type = $field->type;
90 | $F->default = $field->def;
91 | $F->max_length = $field->max_length;
92 |
93 | // At this moment primary_key property is not returned when
94 | // cubrid_fetch_field is called. The following code will
95 | // provide a patch for it. primary_key property will be added
96 | // in the next release.
97 |
98 | // TODO: later version of CUBRID will provide primary_key
99 | // property.
100 | // When PK is defined in CUBRID, an index is automatically
101 | // created in the db_index system table in the form of
102 | // pk_tblname_fieldname. So the following will count how many
103 | // columns are there which satisfy this format.
104 | // The query will search for exact single columns, thus
105 | // compound PK is not supported.
106 | $res = cubrid_query($this->conn_id,
107 | "SELECT COUNT(*) FROM db_index WHERE class_name = '" . $field->table .
108 | "' AND is_primary_key = 'YES' AND index_name = 'pk_" .
109 | $field->table . "_" . $field->name . "'"
110 | );
111 |
112 | if ($res)
113 | {
114 | $row = cubrid_fetch_array($res, CUBRID_NUM);
115 | $F->primary_key = ($row[0] > 0 ? 1 : null);
116 | }
117 | else
118 | {
119 | $F->primary_key = null;
120 | }
121 |
122 | if (is_resource($res))
123 | {
124 | cubrid_close_request($res);
125 | $this->result_id = FALSE;
126 | }
127 |
128 | $retval[] = $F;
129 | }
130 |
131 | return $retval;
132 | }
133 |
134 | // --------------------------------------------------------------------
135 |
136 | /**
137 | * Free the result
138 | *
139 | * @return null
140 | */
141 | function free_result()
142 | {
143 | if(is_resource($this->result_id) ||
144 | get_resource_type($this->result_id) == "Unknown" &&
145 | preg_match('/Resource id #/', strval($this->result_id)))
146 | {
147 | cubrid_close_request($this->result_id);
148 | $this->result_id = FALSE;
149 | }
150 | }
151 |
152 | // --------------------------------------------------------------------
153 |
154 | /**
155 | * Data Seek
156 | *
157 | * Moves the internal pointer to the desired offset. We call
158 | * this internally before fetching results to make sure the
159 | * result set starts at zero
160 | *
161 | * @access private
162 | * @return array
163 | */
164 | function _data_seek($n = 0)
165 | {
166 | return cubrid_data_seek($this->result_id, $n);
167 | }
168 |
169 | // --------------------------------------------------------------------
170 |
171 | /**
172 | * Result - associative array
173 | *
174 | * Returns the result set as an array
175 | *
176 | * @access private
177 | * @return array
178 | */
179 | function _fetch_assoc()
180 | {
181 | return cubrid_fetch_assoc($this->result_id);
182 | }
183 |
184 | // --------------------------------------------------------------------
185 |
186 | /**
187 | * Result - object
188 | *
189 | * Returns the result set as an object
190 | *
191 | * @access private
192 | * @return object
193 | */
194 | function _fetch_object()
195 | {
196 | return cubrid_fetch_object($this->result_id);
197 | }
198 |
199 | }
200 |
201 |
202 | /* End of file cubrid_result.php */
203 | /* Location: ./system/database/drivers/cubrid/cubrid_result.php */
--------------------------------------------------------------------------------
/ci_vue/system/database/drivers/oci8/oci8_result.php:
--------------------------------------------------------------------------------
1 | num_rows === 0 && count($this->result_array()) > 0)
45 | {
46 | $this->num_rows = count($this->result_array());
47 | @oci_execute($this->stmt_id, OCI_DEFAULT);
48 |
49 | if ($this->curs_id)
50 | {
51 | @oci_execute($this->curs_id, OCI_DEFAULT);
52 | }
53 | }
54 |
55 | return $this->num_rows;
56 | }
57 |
58 | // --------------------------------------------------------------------
59 |
60 | /**
61 | * Number of fields in the result set
62 | *
63 | * @access public
64 | * @return integer
65 | */
66 | public function num_fields()
67 | {
68 | $count = @oci_num_fields($this->stmt_id);
69 |
70 | // if we used a limit we subtract it
71 | if ($this->limit_used)
72 | {
73 | $count = $count - 1;
74 | }
75 |
76 | return $count;
77 | }
78 |
79 | // --------------------------------------------------------------------
80 |
81 | /**
82 | * Fetch Field Names
83 | *
84 | * Generates an array of column names
85 | *
86 | * @access public
87 | * @return array
88 | */
89 | public function list_fields()
90 | {
91 | $field_names = array();
92 | for ($c = 1, $fieldCount = $this->num_fields(); $c <= $fieldCount; $c++)
93 | {
94 | $field_names[] = oci_field_name($this->stmt_id, $c);
95 | }
96 | return $field_names;
97 | }
98 |
99 | // --------------------------------------------------------------------
100 |
101 | /**
102 | * Field data
103 | *
104 | * Generates an array of objects containing field meta-data
105 | *
106 | * @access public
107 | * @return array
108 | */
109 | public function field_data()
110 | {
111 | $retval = array();
112 | for ($c = 1, $fieldCount = $this->num_fields(); $c <= $fieldCount; $c++)
113 | {
114 | $F = new stdClass();
115 | $F->name = oci_field_name($this->stmt_id, $c);
116 | $F->type = oci_field_type($this->stmt_id, $c);
117 | $F->max_length = oci_field_size($this->stmt_id, $c);
118 |
119 | $retval[] = $F;
120 | }
121 |
122 | return $retval;
123 | }
124 |
125 | // --------------------------------------------------------------------
126 |
127 | /**
128 | * Free the result
129 | *
130 | * @return null
131 | */
132 | public function free_result()
133 | {
134 | if (is_resource($this->result_id))
135 | {
136 | oci_free_statement($this->result_id);
137 | $this->result_id = FALSE;
138 | }
139 | }
140 |
141 | // --------------------------------------------------------------------
142 |
143 | /**
144 | * Result - associative array
145 | *
146 | * Returns the result set as an array
147 | *
148 | * @access protected
149 | * @return array
150 | */
151 | protected function _fetch_assoc()
152 | {
153 | $id = ($this->curs_id) ? $this->curs_id : $this->stmt_id;
154 | return oci_fetch_assoc($id);
155 | }
156 |
157 | // --------------------------------------------------------------------
158 |
159 | /**
160 | * Result - object
161 | *
162 | * Returns the result set as an object
163 | *
164 | * @access protected
165 | * @return object
166 | */
167 | protected function _fetch_object()
168 | {
169 | $id = ($this->curs_id) ? $this->curs_id : $this->stmt_id;
170 | return @oci_fetch_object($id);
171 | }
172 |
173 | // --------------------------------------------------------------------
174 |
175 | /**
176 | * Query result. "array" version.
177 | *
178 | * @access public
179 | * @return array
180 | */
181 | public function result_array()
182 | {
183 | if (count($this->result_array) > 0)
184 | {
185 | return $this->result_array;
186 | }
187 |
188 | $row = NULL;
189 | while ($row = $this->_fetch_assoc())
190 | {
191 | $this->result_array[] = $row;
192 | }
193 |
194 | return $this->result_array;
195 | }
196 |
197 | // --------------------------------------------------------------------
198 |
199 | /**
200 | * Data Seek
201 | *
202 | * Moves the internal pointer to the desired offset. We call
203 | * this internally before fetching results to make sure the
204 | * result set starts at zero
205 | *
206 | * @access protected
207 | * @return array
208 | */
209 | protected function _data_seek($n = 0)
210 | {
211 | return FALSE; // Not needed
212 | }
213 |
214 | }
215 |
216 |
217 | /* End of file oci8_result.php */
218 | /* Location: ./system/database/drivers/oci8/oci8_result.php */
219 |
--------------------------------------------------------------------------------
/ci_vue/system/core/Exceptions.php:
--------------------------------------------------------------------------------
1 | 'Error',
51 | E_WARNING => 'Warning',
52 | E_PARSE => 'Parsing Error',
53 | E_NOTICE => 'Notice',
54 | E_CORE_ERROR => 'Core Error',
55 | E_CORE_WARNING => 'Core Warning',
56 | E_COMPILE_ERROR => 'Compile Error',
57 | E_COMPILE_WARNING => 'Compile Warning',
58 | E_USER_ERROR => 'User Error',
59 | E_USER_WARNING => 'User Warning',
60 | E_USER_NOTICE => 'User Notice',
61 | E_STRICT => 'Runtime Notice'
62 | );
63 |
64 |
65 | /**
66 | * Constructor
67 | */
68 | public function __construct()
69 | {
70 | $this->ob_level = ob_get_level();
71 | // Note: Do not log messages from this constructor.
72 | }
73 |
74 | // --------------------------------------------------------------------
75 |
76 | /**
77 | * Exception Logger
78 | *
79 | * This function logs PHP generated error messages
80 | *
81 | * @access private
82 | * @param string the error severity
83 | * @param string the error string
84 | * @param string the error filepath
85 | * @param string the error line number
86 | * @return string
87 | */
88 | function log_exception($severity, $message, $filepath, $line)
89 | {
90 | $severity = ( ! isset($this->levels[$severity])) ? $severity : $this->levels[$severity];
91 |
92 | log_message('error', 'Severity: '.$severity.' --> '.$message. ' '.$filepath.' '.$line, TRUE);
93 | }
94 |
95 | // --------------------------------------------------------------------
96 |
97 | /**
98 | * 404 Page Not Found Handler
99 | *
100 | * @access private
101 | * @param string the page
102 | * @param bool log error yes/no
103 | * @return string
104 | */
105 | function show_404($page = '', $log_error = TRUE)
106 | {
107 | $heading = "404 Page Not Found";
108 | $message = "The page you requested was not found.";
109 |
110 | // By default we log this, but allow a dev to skip it
111 | if ($log_error)
112 | {
113 | log_message('error', '404 Page Not Found --> '.$page);
114 | }
115 |
116 | echo $this->show_error($heading, $message, 'error_404', 404);
117 | exit;
118 | }
119 |
120 | // --------------------------------------------------------------------
121 |
122 | /**
123 | * General Error Page
124 | *
125 | * This function takes an error message as input
126 | * (either as a string or an array) and displays
127 | * it using the specified template.
128 | *
129 | * @access private
130 | * @param string the heading
131 | * @param string the message
132 | * @param string the template name
133 | * @param int the status code
134 | * @return string
135 | */
136 | function show_error($heading, $message, $template = 'error_general', $status_code = 500)
137 | {
138 | set_status_header($status_code);
139 |
140 | $message = ''.implode('
', ( ! is_array($message)) ? array($message) : $message).'
';
141 |
142 | if (ob_get_level() > $this->ob_level + 1)
143 | {
144 | ob_end_flush();
145 | }
146 | ob_start();
147 | include(APPPATH.'errors/'.$template.'.php');
148 | $buffer = ob_get_contents();
149 | ob_end_clean();
150 | return $buffer;
151 | }
152 |
153 | // --------------------------------------------------------------------
154 |
155 | /**
156 | * Native PHP error handler
157 | *
158 | * @access private
159 | * @param string the error severity
160 | * @param string the error string
161 | * @param string the error filepath
162 | * @param string the error line number
163 | * @return string
164 | */
165 | function show_php_error($severity, $message, $filepath, $line)
166 | {
167 | $severity = ( ! isset($this->levels[$severity])) ? $severity : $this->levels[$severity];
168 |
169 | $filepath = str_replace("\\", "/", $filepath);
170 |
171 | // For safety reasons we do not show the full file path
172 | if (FALSE !== strpos($filepath, '/'))
173 | {
174 | $x = explode('/', $filepath);
175 | $filepath = $x[count($x)-2].'/'.end($x);
176 | }
177 |
178 | if (ob_get_level() > $this->ob_level + 1)
179 | {
180 | ob_end_flush();
181 | }
182 | ob_start();
183 | include(APPPATH.'errors/error_php.php');
184 | $buffer = ob_get_contents();
185 | ob_end_clean();
186 | echo $buffer;
187 | }
188 |
189 |
190 | }
191 | // END Exceptions Class
192 |
193 | /* End of file Exceptions.php */
194 | /* Location: ./system/core/Exceptions.php */
--------------------------------------------------------------------------------
/ci_vue/system/database/drivers/mysql/mysql_utility.php:
--------------------------------------------------------------------------------
1 | db->_escape_identifiers($table);
53 | }
54 |
55 | // --------------------------------------------------------------------
56 |
57 | /**
58 | * Repair table query
59 | *
60 | * Generates a platform-specific query so that a table can be repaired
61 | *
62 | * @access private
63 | * @param string the table name
64 | * @return object
65 | */
66 | function _repair_table($table)
67 | {
68 | return "REPAIR TABLE ".$this->db->_escape_identifiers($table);
69 | }
70 |
71 | // --------------------------------------------------------------------
72 | /**
73 | * MySQL Export
74 | *
75 | * @access private
76 | * @param array Preferences
77 | * @return mixed
78 | */
79 | function _backup($params = array())
80 | {
81 | if (count($params) == 0)
82 | {
83 | return FALSE;
84 | }
85 |
86 | // Extract the prefs for simplicity
87 | extract($params);
88 |
89 | // Build the output
90 | $output = '';
91 | foreach ((array)$tables as $table)
92 | {
93 | // Is the table in the "ignore" list?
94 | if (in_array($table, (array)$ignore, TRUE))
95 | {
96 | continue;
97 | }
98 |
99 | // Get the table schema
100 | $query = $this->db->query("SHOW CREATE TABLE `".$this->db->database.'`.`'.$table.'`');
101 |
102 | // No result means the table name was invalid
103 | if ($query === FALSE)
104 | {
105 | continue;
106 | }
107 |
108 | // Write out the table schema
109 | $output .= '#'.$newline.'# TABLE STRUCTURE FOR: '.$table.$newline.'#'.$newline.$newline;
110 |
111 | if ($add_drop == TRUE)
112 | {
113 | $output .= 'DROP TABLE IF EXISTS '.$table.';'.$newline.$newline;
114 | }
115 |
116 | $i = 0;
117 | $result = $query->result_array();
118 | foreach ($result[0] as $val)
119 | {
120 | if ($i++ % 2)
121 | {
122 | $output .= $val.';'.$newline.$newline;
123 | }
124 | }
125 |
126 | // If inserts are not needed we're done...
127 | if ($add_insert == FALSE)
128 | {
129 | continue;
130 | }
131 |
132 | // Grab all the data from the current table
133 | $query = $this->db->query("SELECT * FROM $table");
134 |
135 | if ($query->num_rows() == 0)
136 | {
137 | continue;
138 | }
139 |
140 | // Fetch the field names and determine if the field is an
141 | // integer type. We use this info to decide whether to
142 | // surround the data with quotes or not
143 |
144 | $i = 0;
145 | $field_str = '';
146 | $is_int = array();
147 | while ($field = mysql_fetch_field($query->result_id))
148 | {
149 | // Most versions of MySQL store timestamp as a string
150 | $is_int[$i] = (in_array(
151 | strtolower(mysql_field_type($query->result_id, $i)),
152 | array('tinyint', 'smallint', 'mediumint', 'int', 'bigint'), //, 'timestamp'),
153 | TRUE)
154 | ) ? TRUE : FALSE;
155 |
156 | // Create a string of field names
157 | $field_str .= '`'.$field->name.'`, ';
158 | $i++;
159 | }
160 |
161 | // Trim off the end comma
162 | $field_str = preg_replace( "/, $/" , "" , $field_str);
163 |
164 |
165 | // Build the insert string
166 | foreach ($query->result_array() as $row)
167 | {
168 | $val_str = '';
169 |
170 | $i = 0;
171 | foreach ($row as $v)
172 | {
173 | // Is the value NULL?
174 | if ($v === NULL)
175 | {
176 | $val_str .= 'NULL';
177 | }
178 | else
179 | {
180 | // Escape the data if it's not an integer
181 | if ($is_int[$i] == FALSE)
182 | {
183 | $val_str .= $this->db->escape($v);
184 | }
185 | else
186 | {
187 | $val_str .= $v;
188 | }
189 | }
190 |
191 | // Append a comma
192 | $val_str .= ', ';
193 | $i++;
194 | }
195 |
196 | // Remove the comma at the end of the string
197 | $val_str = preg_replace( "/, $/" , "" , $val_str);
198 |
199 | // Build the INSERT string
200 | $output .= 'INSERT INTO '.$table.' ('.$field_str.') VALUES ('.$val_str.');'.$newline;
201 | }
202 |
203 | $output .= $newline.$newline;
204 | }
205 |
206 | return $output;
207 | }
208 | }
209 |
210 | /* End of file mysql_utility.php */
211 | /* Location: ./system/database/drivers/mysql/mysql_utility.php */
--------------------------------------------------------------------------------