├── .editorconfig
├── .gitattributes
├── .gitignore
├── .jshintrc
├── README.md
├── application
├── .htaccess
├── cache
│ ├── .htaccess
│ └── index.html
├── config
│ ├── autoload.php
│ ├── config.php
│ ├── constants.php
│ ├── database.php
│ ├── doctypes.php
│ ├── foreign_chars.php
│ ├── hooks.php
│ ├── index.html
│ ├── ion_auth.php
│ ├── language.php
│ ├── migration.php
│ ├── mimes.php
│ ├── profiler.php
│ ├── rest.php
│ ├── routes.php
│ ├── smileys.php
│ ├── template.php
│ └── user_agents.php
├── controllers
│ ├── api
│ │ └── topic.php
│ ├── auth.php
│ ├── index.html
│ ├── topic.php
│ └── welcome.php
├── core
│ ├── MY_Lang.php
│ ├── MY_Model.php
│ └── index.html
├── errors
│ ├── error_404.php
│ ├── error_db.php
│ ├── error_general.php
│ ├── error_php.php
│ └── index.html
├── helpers
│ └── index.html
├── hooks
│ └── index.html
├── index.html
├── language
│ ├── english
│ │ ├── auth_lang.php
│ │ ├── index.html
│ │ ├── ion_auth_lang.php
│ │ └── welcome_lang.php
│ ├── index.html
│ └── zh-tw
│ │ ├── auth_lang.php
│ │ ├── index.html
│ │ ├── ion_auth_lang.php
│ │ └── welcome_lang.php
├── libraries
│ ├── Bcrypt.php
│ ├── Format.php
│ ├── Ion_auth.php
│ ├── REST_Controller.php
│ ├── index.html
│ └── template.php
├── logs
│ └── index.html
├── models
│ ├── index.html
│ ├── ion_auth_model.php
│ ├── topic_model.php
│ └── user_model.php
├── third_party
│ └── index.html
└── views
│ ├── auth
│ ├── change_password.php
│ ├── create_group.php
│ ├── create_user.php
│ ├── deactivate_user.php
│ ├── edit_group.php
│ ├── edit_user.php
│ ├── email
│ │ ├── activate.tpl.php
│ │ ├── forgot_password.tpl.php
│ │ └── new_password.tpl.php
│ ├── forgot_password.php
│ ├── index.php
│ ├── login.php
│ └── reset_password.php
│ ├── index.html
│ ├── template
│ └── layout.php
│ ├── topic
│ ├── create.php
│ ├── index.php
│ ├── items.php
│ └── update.php
│ └── welcome_message.php
├── gulpfile.coffee
├── package.json
├── public
├── .htaccess
├── assets
│ ├── css
│ │ ├── alertify.core.css
│ │ ├── alertify.default.css
│ │ ├── bootstrap-theme.min.css
│ │ └── bootstrap.min.css
│ ├── fonts
│ │ ├── glyphicons-halflings-regular.eot
│ │ ├── glyphicons-halflings-regular.svg
│ │ ├── glyphicons-halflings-regular.ttf
│ │ └── glyphicons-halflings-regular.woff
│ └── js
│ │ ├── alertify.js
│ │ ├── app.js
│ │ ├── bootstrap.min.js
│ │ ├── handlebars.js
│ │ ├── jquery.min.js
│ │ └── jquery.scrollTo.min.js
└── index.php
├── screenshot
└── screenshot.png
├── sql
└── app.sql
└── system
├── .htaccess
├── core
├── Benchmark.php
├── CodeIgniter.php
├── Common.php
├── Config.php
├── Controller.php
├── Exceptions.php
├── Hooks.php
├── Input.php
├── Lang.php
├── Loader.php
├── Model.php
├── Output.php
├── Router.php
├── Security.php
├── URI.php
├── Utf8.php
└── index.html
├── database
├── DB.php
├── DB_active_rec.php
├── DB_cache.php
├── DB_driver.php
├── DB_forge.php
├── DB_result.php
├── DB_utility.php
├── drivers
│ ├── cubrid
│ │ ├── cubrid_driver.php
│ │ ├── cubrid_forge.php
│ │ ├── cubrid_result.php
│ │ ├── cubrid_utility.php
│ │ └── index.html
│ ├── index.html
│ ├── mssql
│ │ ├── index.html
│ │ ├── mssql_driver.php
│ │ ├── mssql_forge.php
│ │ ├── mssql_result.php
│ │ └── mssql_utility.php
│ ├── mysql
│ │ ├── index.html
│ │ ├── mysql_driver.php
│ │ ├── mysql_forge.php
│ │ ├── mysql_result.php
│ │ └── mysql_utility.php
│ ├── mysqli
│ │ ├── index.html
│ │ ├── mysqli_driver.php
│ │ ├── mysqli_forge.php
│ │ ├── mysqli_result.php
│ │ └── mysqli_utility.php
│ ├── oci8
│ │ ├── index.html
│ │ ├── oci8_driver.php
│ │ ├── oci8_forge.php
│ │ ├── oci8_result.php
│ │ └── oci8_utility.php
│ ├── odbc
│ │ ├── index.html
│ │ ├── odbc_driver.php
│ │ ├── odbc_forge.php
│ │ ├── odbc_result.php
│ │ └── odbc_utility.php
│ ├── pdo
│ │ ├── index.html
│ │ ├── pdo_driver.php
│ │ ├── pdo_forge.php
│ │ ├── pdo_result.php
│ │ └── pdo_utility.php
│ ├── postgre
│ │ ├── index.html
│ │ ├── postgre_driver.php
│ │ ├── postgre_forge.php
│ │ ├── postgre_result.php
│ │ └── postgre_utility.php
│ ├── sqlite
│ │ ├── index.html
│ │ ├── sqlite_driver.php
│ │ ├── sqlite_forge.php
│ │ ├── sqlite_result.php
│ │ └── sqlite_utility.php
│ └── sqlsrv
│ │ ├── index.html
│ │ ├── sqlsrv_driver.php
│ │ ├── sqlsrv_forge.php
│ │ ├── sqlsrv_result.php
│ │ └── sqlsrv_utility.php
└── index.html
├── fonts
├── index.html
└── texb.ttf
├── helpers
├── array_helper.php
├── captcha_helper.php
├── cookie_helper.php
├── date_helper.php
├── directory_helper.php
├── download_helper.php
├── email_helper.php
├── file_helper.php
├── form_helper.php
├── html_helper.php
├── index.html
├── inflector_helper.php
├── language_helper.php
├── number_helper.php
├── path_helper.php
├── security_helper.php
├── smiley_helper.php
├── string_helper.php
├── text_helper.php
├── typography_helper.php
├── url_helper.php
└── xml_helper.php
├── index.html
├── language
├── english
│ ├── calendar_lang.php
│ ├── date_lang.php
│ ├── db_lang.php
│ ├── email_lang.php
│ ├── form_validation_lang.php
│ ├── ftp_lang.php
│ ├── imglib_lang.php
│ ├── index.html
│ ├── migration_lang.php
│ ├── number_lang.php
│ ├── profiler_lang.php
│ ├── unit_test_lang.php
│ └── upload_lang.php
├── index.html
└── zh-tw
│ ├── calendar_lang.php
│ ├── date_lang.php
│ ├── db_lang.php
│ ├── email_lang.php
│ ├── form_validation_lang.php
│ ├── ftp_lang.php
│ ├── imglib_lang.php
│ ├── index.html
│ ├── migration_lang.php
│ ├── number_lang.php
│ ├── profiler_lang.php
│ ├── unit_test_lang.php
│ └── upload_lang.php
└── libraries
├── Cache
├── Cache.php
├── drivers
│ ├── Cache_apc.php
│ ├── Cache_dummy.php
│ ├── Cache_file.php
│ ├── Cache_memcached.php
│ └── index.html
└── index.html
├── Calendar.php
├── Cart.php
├── Driver.php
├── Email.php
├── Encrypt.php
├── Form_validation.php
├── Ftp.php
├── Image_lib.php
├── Javascript.php
├── Log.php
├── Migration.php
├── Pagination.php
├── Parser.php
├── Profiler.php
├── Session.php
├── Sha1.php
├── Table.php
├── Trackback.php
├── Typography.php
├── Unit_test.php
├── Upload.php
├── User_agent.php
├── Xmlrpc.php
├── Xmlrpcs.php
├── Zip.php
├── index.html
└── javascript
├── Jquery.php
└── index.html
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | indent_style = space
5 | indent_size = 2
6 | end_of_line = lf
7 | charset = utf-8
8 | trim_trailing_whitespace = true
9 | insert_final_newline = true
10 |
11 | [*.php]
12 | indent_size = 4
13 |
14 | [*.md]
15 | trim_trailing_whitespace = false
16 |
17 | [Makefile]
18 | indent_style = tab
19 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .sass-cache
2 | npm-debug.log
3 | node_modules
4 | .tmp
5 |
--------------------------------------------------------------------------------
/.jshintrc:
--------------------------------------------------------------------------------
1 | {
2 | "node": true,
3 | "esnext": true,
4 | "bitwise": true,
5 | "camelcase": true,
6 | "curly": true,
7 | "eqeqeq": true,
8 | "immed": true,
9 | "indent": 2,
10 | "latedef": true,
11 | "newcap": true,
12 | "noarg": true,
13 | "quotmark": "single",
14 | "regexp": true,
15 | "undef": true,
16 | "unused": true,
17 | "strict": true
18 | }
19 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # CodeIgniter App
2 |
3 | Integrate RESTfull API, Base Model, Ion Auth module and Template module.
4 |
5 | ## Features
6 |
7 | * [CodeIgniter-Ion-Auth][1]: Simple and Lightweight Auth System for CodeIgniter
8 | * [Codeigniter-restserver][2]: A fully RESTful server implementation for CodeIgniter using one library, one config file and one controller.
9 | * [codeigniter-base-model][3]: CodeIgniter base CRUD model to remove repetition and increase productivity
10 | * [CodeIgniter-Template][4]: A Lightweight Codeigniter Template Libray
11 | * [CodeIgniter-i18n][5]: i18n library for CodeIgniter 2.1.x
12 | * [CodeIgniter-Native-Session][6]: codeigniter native session
13 | * [Handlebars.js][7]: Minimal Templating on Steroids
14 |
15 | [1]: https://github.com/benedmunds/CodeIgniter-Ion-Auth
16 | [2]: https://github.com/chriskacerguis/codeigniter-restserver
17 | [3]: https://github.com/appleboy/Codeigniter-Base-Model
18 | [4]: https://github.com/appleboy/CodeIgniter-Template
19 | [5]: https://github.com/appleboy/CodeIgniter-i18n
20 | [6]: https://github.com/appleboy/CodeIgniter-Native-Session
21 | [7]: http://handlebarsjs.com/
22 |
23 | ## Installtaion
24 |
25 | add new virtual hostname on `hosts` file (`/etc/hosts`)
26 |
27 | ```
28 | 127.0.0.1 ci.localhost
29 | ```
30 |
31 | [Apache](http://httpd.apache.org/): create `.htaccess`.
32 |
33 | ```
34 | RewriteEngine on
35 | RewriteBase /
36 | RewriteCond $1 !^(index\.php|assets|robots\.txt|$)
37 | RewriteRule ^(.*)$ index.php/$1 [L,QSA]
38 | ```
39 |
40 | [Nginx](http://nginx.org/): please add the following to virtualhost config.
41 |
42 | ```
43 | location / {
44 | try_files $uri $uri/ /index.php;
45 | }
46 | ```
47 |
48 | Import the SQL structure
49 |
50 | ```
51 | $ mysql -u root -p app < sql/app.sql
52 | ```
53 |
54 | ## Installtaion with [Homestead](http://laravel.com/docs/4.2/homestead)
55 |
56 | Please read [Chinese Blog](http://blog.wu-boy.com/2014/12/codeigniter-with-homestead-development/) or refer the following steps.
57 |
58 | Clone the project init `/home/git` foloder.
59 |
60 | ```bash
61 | $ git clone https://github.com/appleboy/CodeIgniter-App.git /home/git/CodeIgniter-App
62 | ```
63 |
64 | Update `~/.homestead/Homestead.yaml` setting.
65 |
66 | ```ruby
67 | folders:
68 | - map: /home/appleboy/newProject
69 | to: /home/vagrant/Code
70 | - map: /home/git/CodeIgniter-App
71 | to: /home/vagrant/codeigniter-app
72 |
73 | sites:
74 | - map: homestead.app
75 | to: /home/vagrant/Code/public
76 | - map: codeigniter.app
77 | to: /home/vagrant/codeigniter-app/public
78 |
79 | databases:
80 | - homestead
81 | - app
82 | ```
83 |
84 | Update `after.sh` as the following:
85 |
86 | ```
87 | #!/bin/sh
88 |
89 | # If you would like to do some extra provisioning you may
90 | # add any commands you wish to this file and they will
91 | # be run after the Homestead machine is provisioned.
92 |
93 | mysql -uhomestead -psecret app < /home/vagrant/codeigniter-app/sql/app.sql
94 | ```
95 |
96 | Start the virtual machine.
97 |
98 | ```
99 | $ homestead up --provision
100 | ```
101 |
102 | open youre browser url: http://codeigniter.app:8000
103 | ## Screenshot
104 |
105 |
106 |
107 |
--------------------------------------------------------------------------------
/application/.htaccess:
--------------------------------------------------------------------------------
1 | Deny from all
--------------------------------------------------------------------------------
/application/cache/.htaccess:
--------------------------------------------------------------------------------
1 | Deny from all
--------------------------------------------------------------------------------
/application/cache/index.html:
--------------------------------------------------------------------------------
1 |
2 |
Directory access is forbidden.
8 | 9 | 10 | -------------------------------------------------------------------------------- /application/config/autoload.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 */ -------------------------------------------------------------------------------- /application/config/foreign_chars.php: -------------------------------------------------------------------------------- 1 | 'ae', 12 | '/ö|œ/' => 'oe', 13 | '/ü/' => 'ue', 14 | '/Ä/' => 'Ae', 15 | '/Ü/' => 'Ue', 16 | '/Ö/' => 'Oe', 17 | '/À|Á|Â|Ã|Ä|Å|Ǻ|Ā|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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 */ -------------------------------------------------------------------------------- /application/config/hooks.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |Directory access is forbidden.
8 | 9 | 10 |