codeigniter_vender 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +2 -0
- data/MIT-LICENSE +20 -0
- data/README +40 -0
- data/Rakefile +18 -0
- data/VERSION +1 -0
- data/codeigniter_vender.gemspec +389 -0
- data/generators/ci_app/USAGE +8 -0
- data/generators/ci_app/ci_app_generator.rb +12 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/index.php +118 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/license.txt +52 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/autoload.php +116 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/config.php +329 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/constants.php +41 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/database.php +55 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/doctypes.php +15 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/hooks.php +16 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/mimes.php +105 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/routes.php +48 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/smileys.php +66 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/user_agents.php +175 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/controllers/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/controllers/welcome.php +17 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/errors/error_404.php +34 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/errors/error_db.php +34 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/errors/error_general.php +34 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/errors/error_php.php +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/errors/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/helpers/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/hooks/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/language/english/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/libraries/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/models/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/views/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/views/welcome_message.php +62 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/cache/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/codeigniter/Base4.php +69 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/codeigniter/Base5.php +56 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/codeigniter/CodeIgniter.php +280 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/codeigniter/Common.php +421 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/codeigniter/Compat.php +93 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/codeigniter/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/DB.php +146 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/DB_active_rec.php +1820 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/DB_cache.php +195 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/DB_driver.php +1366 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/DB_forge.php +375 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/DB_result.php +342 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/DB_utility.php +389 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mssql/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mssql/mssql_driver.php +667 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mssql/mssql_forge.php +248 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mssql/mssql_result.php +169 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mssql/mssql_utility.php +123 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysql/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysql/mysql_driver.php +670 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysql/mysql_forge.php +254 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysql/mysql_result.php +169 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysql/mysql_utility.php +245 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysqli/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysqli/mysqli_driver.php +671 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysqli/mysqli_forge.php +254 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysqli/mysqli_result.php +169 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysqli/mysqli_utility.php +123 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/oci8/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/oci8/oci8_driver.php +780 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/oci8/oci8_forge.php +248 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/oci8/oci8_result.php +249 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/oci8/oci8_utility.php +122 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/odbc/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/odbc/odbc_driver.php +639 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/odbc/odbc_forge.php +266 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/odbc/odbc_result.php +228 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/odbc/odbc_utility.php +148 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/postgre/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/postgre/postgre_driver.php +684 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/postgre/postgre_forge.php +248 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/postgre/postgre_result.php +169 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/postgre/postgre_utility.php +124 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/sqlite/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/sqlite/sqlite_driver.php +657 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/sqlite/sqlite_forge.php +265 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/sqlite/sqlite_result.php +179 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/sqlite/sqlite_utility.php +141 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/fonts/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/fonts/texb.ttf +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/array_helper.php +78 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/compatibility_helper.php +498 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/cookie_helper.php +144 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/date_helper.php +611 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/directory_helper.php +84 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/download_helper.php +100 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/email_helper.php +62 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/file_helper.php +464 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/form_helper.php +1025 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/html_helper.php +416 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/inflector_helper.php +171 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/language_helper.php +58 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/number_helper.php +75 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/path_helper.php +72 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/security_helper.php +126 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/smiley_helper.php +273 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/string_helper.php +273 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/text_helper.php +462 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/typography_helper.php +71 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/url_helper.php +593 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/xml_helper.php +62 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/calendar_lang.php +51 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/date_lang.php +60 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/db_lang.php +28 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/email_lang.php +24 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/form_validation_lang.php +24 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/ftp_lang.php +17 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/imglib_lang.php +24 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/number_lang.php +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/profiler_lang.php +19 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/scaffolding_lang.php +17 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/unit_test_lang.php +24 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/upload_lang.php +22 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/validation_lang.php +24 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Benchmark.php +113 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Calendar.php +477 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Cart.php +550 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Config.php +244 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Controller.php +127 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Email.php +2041 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Encrypt.php +484 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Exceptions.php +174 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Form_validation.php +1278 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Ftp.php +618 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Hooks.php +226 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Image_lib.php +1544 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Input.php +1067 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Language.php +123 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Loader.php +1085 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Log.php +117 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Model.php +83 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Output.php +409 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Pagination.php +244 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Parser.php +173 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Profiler.php +392 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Router.php +389 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Session.php +758 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Sha1.php +251 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Table.php +440 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Trackback.php +547 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Typography.php +406 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/URI.php +586 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Unit_test.php +347 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Upload.php +970 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/User_agent.php +502 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Validation.php +875 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Xmlrpc.php +1421 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Xmlrpcs.php +536 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Zip.php +359 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/logs/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/plugins/captcha_pi.php +356 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/plugins/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/plugins/js_calendar_pi.php +629 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/Scaffolding.php +291 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/images/background.jpg +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/images/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/images/logo.jpg +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/add.php +32 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/delete.php +9 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/edit.php +33 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/footer.php +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/header.php +29 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/no_data.php +8 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/stylesheet.css +143 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/view.php +27 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/changelog.html +1080 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/active_record.html +757 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/caching.html +220 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/call_function.html +118 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/configuration.html +157 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/connecting.html +186 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/examples.html +217 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/fields.html +163 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/forge.html +234 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/helpers.html +151 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/index.html +99 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/queries.html +153 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/results.html +238 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/table_data.html +113 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/transactions.html +200 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/utilities.html +295 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/doc_style/index.html +86 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/doc_style/template.html +128 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/alternative_php.html +147 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/ancillary_classes.html +117 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/autoloader.html +101 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/caching.html +115 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/common_functions.html +119 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/controllers.html +385 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/core_classes.html +185 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/creating_libraries.html +298 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/credits.html +86 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/errors.html +138 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/helpers.html +185 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/hooks.html +167 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/libraries.html +94 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/managing_apps.html +133 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/models.html +251 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/plugins.html +127 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/profiling.html +104 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/quick_reference.html +77 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/requirements.html +82 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/reserved_names.html +156 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/routing.html +176 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/scaffolding.html +147 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/security.html +153 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/styleguide.html +687 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/urls.html +151 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/views.html +274 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/array_helper.html +119 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/compatibility_helper.html +118 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/cookie_helper.html +147 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/date_helper.html +408 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/directory_helper.html +143 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/download_helper.html +112 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/email_helper.html +102 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/file_helper.html +178 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/form_helper.html +484 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/html_helper.html +385 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/inflector_helper.html +151 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/language_helper.html +98 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/number_helper.html +107 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/path_helper.html +106 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/security_helper.html +125 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/smiley_helper.html +215 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/string_helper.html +176 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/text_helper.html +192 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/typography_helper.html +112 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/url_helper.html +289 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/xml_helper.html +105 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/appflowchart.gif +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/arrow.gif +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/ci_logo.jpg +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/ci_logo_flame.jpg +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/ci_quick_ref.png +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/codeigniter_1.7.1_helper_reference.pdf +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/codeigniter_1.7.1_helper_reference.png +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/codeigniter_1.7.1_library_reference.pdf +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/codeigniter_1.7.1_library_reference.png +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/file.gif +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/folder.gif +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/nav_bg_darker.jpg +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/nav_separator_darker.jpg +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/nav_toggle_darker.jpg +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/smile.gif +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/transparent.gif +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/index.html +99 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/downloads.html +105 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/index.html +97 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/troubleshooting.html +90 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_120.html +92 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_130.html +203 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_131.html +102 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_132.html +100 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_133.html +112 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_140.html +145 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_141.html +148 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_150.html +178 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_152.html +111 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_153.html +100 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_154.html +116 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_160.html +125 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_161.html +98 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_162.html +106 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_163.html +99 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_170.html +121 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_171.html +98 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_172.html +105 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_b11.html +144 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrading.html +101 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/benchmark.html +198 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/calendar.html +249 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/cart.html +346 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/config.html +181 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/email.html +307 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/encryption.html +182 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/file_uploading.html +451 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/form_validation.html +1221 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/ftp.html +303 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/image_lib.html +666 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/input.html +231 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/language.html +137 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/loader.html +214 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/output.html +145 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/pagination.html +218 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/parser.html +208 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/sessions.html +311 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/table.html +292 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/trackback.html +246 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/typography.html +160 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/unit_testing.html +205 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/uri.html +252 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/user_agent.html +201 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/validation.html +740 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/xmlrpc.html +517 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/zip.html +278 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/license.html +107 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/nav/hacks.txt +9 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/nav/moo.fx.js +119 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/nav/moo.fx.pack.js +241 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/nav/nav.js +139 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/nav/prototype.lite.js +127 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/nav/user_guide_menu.js +4 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/overview/appflow.html +95 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/overview/at_a_glance.html +172 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/overview/cheatsheets.html +83 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/overview/features.html +120 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/overview/getting_started.html +92 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/overview/goals.html +98 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/overview/index.html +84 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/overview/mvc.html +100 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/toc.html +209 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/userguide.css +406 -0
- data/generators/ci_app/templates/README +1 -0
- data/generators/ci_controller/USAGE +2 -0
- data/generators/ci_controller/ci_controller_generator.rb +11 -0
- data/generators/ci_controller/templates/ci_controller.php.erb +15 -0
- data/generators/ci_controller/templates/ci_view.php.erb +8 -0
- data/generators/ci_layout/USAGE +2 -0
- data/generators/ci_layout/ci_layout_generator.rb +24 -0
- data/generators/ci_layout/templates/application_layout.php.erb +19 -0
- data/generators/ci_model/USAGE +2 -0
- data/generators/ci_model/ci_model_generator.rb +42 -0
- data/generators/ci_model/templates/ci_model.php.erb +15 -0
- data/generators/ci_model/templates/model.rb +5 -0
- data/generators/ci_model/templates/model_migration.rb.erb +16 -0
- data/init.rb +1 -0
- data/install.rb +1 -0
- data/lib/codeigniter_vender.rb +1 -0
- data/lib/tasks/app.rake +8 -0
- data/test/codeigniter_vender_test.rb +8 -0
- data/test/test_helper.rb +3 -0
- data/uninstall.rb +1 -0
- metadata +411 -0
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
|
2
|
+
/**
|
|
3
|
+
* CodeIgniter
|
|
4
|
+
*
|
|
5
|
+
* An open source application development framework for PHP 4.3.2 or newer
|
|
6
|
+
*
|
|
7
|
+
* @package CodeIgniter
|
|
8
|
+
* @author ExpressionEngine Dev Team
|
|
9
|
+
* @copyright Copyright (c) 2008 - 2010, EllisLab, Inc.
|
|
10
|
+
* @license http://codeigniter.com/user_guide/license.html
|
|
11
|
+
* @link http://codeigniter.com
|
|
12
|
+
* @since Version 1.0
|
|
13
|
+
* @filesource
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
// ------------------------------------------------------------------------
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Determines if the current version of PHP is greater then the supplied value
|
|
20
|
+
*
|
|
21
|
+
* Since there are a few places where we conditionally test for PHP > 5
|
|
22
|
+
* we'll set a static variable.
|
|
23
|
+
*
|
|
24
|
+
* @access public
|
|
25
|
+
* @param string
|
|
26
|
+
* @return bool
|
|
27
|
+
*/
|
|
28
|
+
function is_php($version = '5.0.0')
|
|
29
|
+
{
|
|
30
|
+
static $_is_php;
|
|
31
|
+
$version = (string)$version;
|
|
32
|
+
|
|
33
|
+
if ( ! isset($_is_php[$version]))
|
|
34
|
+
{
|
|
35
|
+
$_is_php[$version] = (version_compare(PHP_VERSION, $version) < 0) ? FALSE : TRUE;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return $_is_php[$version];
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// ------------------------------------------------------------------------
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Tests for file writability
|
|
45
|
+
*
|
|
46
|
+
* is_writable() returns TRUE on Windows servers when you really can't write to
|
|
47
|
+
* the file, based on the read-only attribute. is_writable() is also unreliable
|
|
48
|
+
* on Unix servers if safe_mode is on.
|
|
49
|
+
*
|
|
50
|
+
* @access private
|
|
51
|
+
* @return void
|
|
52
|
+
*/
|
|
53
|
+
function is_really_writable($file)
|
|
54
|
+
{
|
|
55
|
+
// If we're on a Unix server with safe_mode off we call is_writable
|
|
56
|
+
if (DIRECTORY_SEPARATOR == '/' AND @ini_get("safe_mode") == FALSE)
|
|
57
|
+
{
|
|
58
|
+
return is_writable($file);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// For windows servers and safe_mode "on" installations we'll actually
|
|
62
|
+
// write a file then read it. Bah...
|
|
63
|
+
if (is_dir($file))
|
|
64
|
+
{
|
|
65
|
+
$file = rtrim($file, '/').'/'.md5(rand(1,100));
|
|
66
|
+
|
|
67
|
+
if (($fp = @fopen($file, FOPEN_WRITE_CREATE)) === FALSE)
|
|
68
|
+
{
|
|
69
|
+
return FALSE;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
fclose($fp);
|
|
73
|
+
@chmod($file, DIR_WRITE_MODE);
|
|
74
|
+
@unlink($file);
|
|
75
|
+
return TRUE;
|
|
76
|
+
}
|
|
77
|
+
elseif (($fp = @fopen($file, FOPEN_WRITE_CREATE)) === FALSE)
|
|
78
|
+
{
|
|
79
|
+
return FALSE;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
fclose($fp);
|
|
83
|
+
return TRUE;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// ------------------------------------------------------------------------
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Class registry
|
|
90
|
+
*
|
|
91
|
+
* This function acts as a singleton. If the requested class does not
|
|
92
|
+
* exist it is instantiated and set to a static variable. If it has
|
|
93
|
+
* previously been instantiated the variable is returned.
|
|
94
|
+
*
|
|
95
|
+
* @access public
|
|
96
|
+
* @param string the class name being requested
|
|
97
|
+
* @param bool optional flag that lets classes get loaded but not instantiated
|
|
98
|
+
* @return object
|
|
99
|
+
*/
|
|
100
|
+
function &load_class($class, $instantiate = TRUE)
|
|
101
|
+
{
|
|
102
|
+
static $objects = array();
|
|
103
|
+
|
|
104
|
+
// Does the class exist? If so, we're done...
|
|
105
|
+
if (isset($objects[$class]))
|
|
106
|
+
{
|
|
107
|
+
return $objects[$class];
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// If the requested class does not exist in the application/libraries
|
|
111
|
+
// folder we'll load the native class from the system/libraries folder.
|
|
112
|
+
if (file_exists(APPPATH.'libraries/'.config_item('subclass_prefix').$class.EXT))
|
|
113
|
+
{
|
|
114
|
+
require(BASEPATH.'libraries/'.$class.EXT);
|
|
115
|
+
require(APPPATH.'libraries/'.config_item('subclass_prefix').$class.EXT);
|
|
116
|
+
$is_subclass = TRUE;
|
|
117
|
+
}
|
|
118
|
+
else
|
|
119
|
+
{
|
|
120
|
+
if (file_exists(APPPATH.'libraries/'.$class.EXT))
|
|
121
|
+
{
|
|
122
|
+
require(APPPATH.'libraries/'.$class.EXT);
|
|
123
|
+
$is_subclass = FALSE;
|
|
124
|
+
}
|
|
125
|
+
else
|
|
126
|
+
{
|
|
127
|
+
require(BASEPATH.'libraries/'.$class.EXT);
|
|
128
|
+
$is_subclass = FALSE;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
if ($instantiate == FALSE)
|
|
133
|
+
{
|
|
134
|
+
$objects[$class] = TRUE;
|
|
135
|
+
return $objects[$class];
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
if ($is_subclass == TRUE)
|
|
139
|
+
{
|
|
140
|
+
$name = config_item('subclass_prefix').$class;
|
|
141
|
+
|
|
142
|
+
$objects[$class] =& instantiate_class(new $name());
|
|
143
|
+
return $objects[$class];
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
$name = ($class != 'Controller') ? 'CI_'.$class : $class;
|
|
147
|
+
|
|
148
|
+
$objects[$class] =& instantiate_class(new $name());
|
|
149
|
+
return $objects[$class];
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Instantiate Class
|
|
154
|
+
*
|
|
155
|
+
* Returns a new class object by reference, used by load_class() and the DB class.
|
|
156
|
+
* Required to retain PHP 4 compatibility and also not make PHP 5.3 cry.
|
|
157
|
+
*
|
|
158
|
+
* Use: $obj =& instantiate_class(new Foo());
|
|
159
|
+
*
|
|
160
|
+
* @access public
|
|
161
|
+
* @param object
|
|
162
|
+
* @return object
|
|
163
|
+
*/
|
|
164
|
+
function &instantiate_class(&$class_object)
|
|
165
|
+
{
|
|
166
|
+
return $class_object;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Loads the main config.php file
|
|
171
|
+
*
|
|
172
|
+
* @access private
|
|
173
|
+
* @return array
|
|
174
|
+
*/
|
|
175
|
+
function &get_config()
|
|
176
|
+
{
|
|
177
|
+
static $main_conf;
|
|
178
|
+
|
|
179
|
+
if ( ! isset($main_conf))
|
|
180
|
+
{
|
|
181
|
+
if ( ! file_exists(APPPATH.'config/config'.EXT))
|
|
182
|
+
{
|
|
183
|
+
exit('The configuration file config'.EXT.' does not exist.');
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
require(APPPATH.'config/config'.EXT);
|
|
187
|
+
|
|
188
|
+
if ( ! isset($config) OR ! is_array($config))
|
|
189
|
+
{
|
|
190
|
+
exit('Your config file does not appear to be formatted correctly.');
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
$main_conf[0] =& $config;
|
|
194
|
+
}
|
|
195
|
+
return $main_conf[0];
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Gets a config item
|
|
200
|
+
*
|
|
201
|
+
* @access public
|
|
202
|
+
* @return mixed
|
|
203
|
+
*/
|
|
204
|
+
function config_item($item)
|
|
205
|
+
{
|
|
206
|
+
static $config_item = array();
|
|
207
|
+
|
|
208
|
+
if ( ! isset($config_item[$item]))
|
|
209
|
+
{
|
|
210
|
+
$config =& get_config();
|
|
211
|
+
|
|
212
|
+
if ( ! isset($config[$item]))
|
|
213
|
+
{
|
|
214
|
+
return FALSE;
|
|
215
|
+
}
|
|
216
|
+
$config_item[$item] = $config[$item];
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
return $config_item[$item];
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Error Handler
|
|
225
|
+
*
|
|
226
|
+
* This function lets us invoke the exception class and
|
|
227
|
+
* display errors using the standard error template located
|
|
228
|
+
* in application/errors/errors.php
|
|
229
|
+
* This function will send the error page directly to the
|
|
230
|
+
* browser and exit.
|
|
231
|
+
*
|
|
232
|
+
* @access public
|
|
233
|
+
* @return void
|
|
234
|
+
*/
|
|
235
|
+
function show_error($message, $status_code = 500)
|
|
236
|
+
{
|
|
237
|
+
$error =& load_class('Exceptions');
|
|
238
|
+
echo $error->show_error('An Error Was Encountered', $message, 'error_general', $status_code);
|
|
239
|
+
exit;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* 404 Page Handler
|
|
245
|
+
*
|
|
246
|
+
* This function is similar to the show_error() function above
|
|
247
|
+
* However, instead of the standard error template it displays
|
|
248
|
+
* 404 errors.
|
|
249
|
+
*
|
|
250
|
+
* @access public
|
|
251
|
+
* @return void
|
|
252
|
+
*/
|
|
253
|
+
function show_404($page = '')
|
|
254
|
+
{
|
|
255
|
+
$error =& load_class('Exceptions');
|
|
256
|
+
$error->show_404($page);
|
|
257
|
+
exit;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* Error Logging Interface
|
|
263
|
+
*
|
|
264
|
+
* We use this as a simple mechanism to access the logging
|
|
265
|
+
* class and send messages to be logged.
|
|
266
|
+
*
|
|
267
|
+
* @access public
|
|
268
|
+
* @return void
|
|
269
|
+
*/
|
|
270
|
+
function log_message($level = 'error', $message, $php_error = FALSE)
|
|
271
|
+
{
|
|
272
|
+
static $LOG;
|
|
273
|
+
|
|
274
|
+
$config =& get_config();
|
|
275
|
+
if ($config['log_threshold'] == 0)
|
|
276
|
+
{
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
$LOG =& load_class('Log');
|
|
281
|
+
$LOG->write_log($level, $message, $php_error);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* Set HTTP Status Header
|
|
287
|
+
*
|
|
288
|
+
* @access public
|
|
289
|
+
* @param int the status code
|
|
290
|
+
* @param string
|
|
291
|
+
* @return void
|
|
292
|
+
*/
|
|
293
|
+
function set_status_header($code = 200, $text = '')
|
|
294
|
+
{
|
|
295
|
+
$stati = array(
|
|
296
|
+
200 => 'OK',
|
|
297
|
+
201 => 'Created',
|
|
298
|
+
202 => 'Accepted',
|
|
299
|
+
203 => 'Non-Authoritative Information',
|
|
300
|
+
204 => 'No Content',
|
|
301
|
+
205 => 'Reset Content',
|
|
302
|
+
206 => 'Partial Content',
|
|
303
|
+
|
|
304
|
+
300 => 'Multiple Choices',
|
|
305
|
+
301 => 'Moved Permanently',
|
|
306
|
+
302 => 'Found',
|
|
307
|
+
304 => 'Not Modified',
|
|
308
|
+
305 => 'Use Proxy',
|
|
309
|
+
307 => 'Temporary Redirect',
|
|
310
|
+
|
|
311
|
+
400 => 'Bad Request',
|
|
312
|
+
401 => 'Unauthorized',
|
|
313
|
+
403 => 'Forbidden',
|
|
314
|
+
404 => 'Not Found',
|
|
315
|
+
405 => 'Method Not Allowed',
|
|
316
|
+
406 => 'Not Acceptable',
|
|
317
|
+
407 => 'Proxy Authentication Required',
|
|
318
|
+
408 => 'Request Timeout',
|
|
319
|
+
409 => 'Conflict',
|
|
320
|
+
410 => 'Gone',
|
|
321
|
+
411 => 'Length Required',
|
|
322
|
+
412 => 'Precondition Failed',
|
|
323
|
+
413 => 'Request Entity Too Large',
|
|
324
|
+
414 => 'Request-URI Too Long',
|
|
325
|
+
415 => 'Unsupported Media Type',
|
|
326
|
+
416 => 'Requested Range Not Satisfiable',
|
|
327
|
+
417 => 'Expectation Failed',
|
|
328
|
+
|
|
329
|
+
500 => 'Internal Server Error',
|
|
330
|
+
501 => 'Not Implemented',
|
|
331
|
+
502 => 'Bad Gateway',
|
|
332
|
+
503 => 'Service Unavailable',
|
|
333
|
+
504 => 'Gateway Timeout',
|
|
334
|
+
505 => 'HTTP Version Not Supported'
|
|
335
|
+
);
|
|
336
|
+
|
|
337
|
+
if ($code == '' OR ! is_numeric($code))
|
|
338
|
+
{
|
|
339
|
+
show_error('Status codes must be numeric', 500);
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
if (isset($stati[$code]) AND $text == '')
|
|
343
|
+
{
|
|
344
|
+
$text = $stati[$code];
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
if ($text == '')
|
|
348
|
+
{
|
|
349
|
+
show_error('No status text available. Please check your status code number or supply your own message text.', 500);
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
$server_protocol = (isset($_SERVER['SERVER_PROTOCOL'])) ? $_SERVER['SERVER_PROTOCOL'] : FALSE;
|
|
353
|
+
|
|
354
|
+
if (substr(php_sapi_name(), 0, 3) == 'cgi')
|
|
355
|
+
{
|
|
356
|
+
header("Status: {$code} {$text}", TRUE);
|
|
357
|
+
}
|
|
358
|
+
elseif ($server_protocol == 'HTTP/1.1' OR $server_protocol == 'HTTP/1.0')
|
|
359
|
+
{
|
|
360
|
+
header($server_protocol." {$code} {$text}", TRUE, $code);
|
|
361
|
+
}
|
|
362
|
+
else
|
|
363
|
+
{
|
|
364
|
+
header("HTTP/1.1 {$code} {$text}", TRUE, $code);
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* Exception Handler
|
|
371
|
+
*
|
|
372
|
+
* This is the custom exception handler that is declaired at the top
|
|
373
|
+
* of Codeigniter.php. The main reason we use this is permit
|
|
374
|
+
* PHP errors to be logged in our own log files since we may
|
|
375
|
+
* not have access to server logs. Since this function
|
|
376
|
+
* effectively intercepts PHP errors, however, we also need
|
|
377
|
+
* to display errors based on the current error_reporting level.
|
|
378
|
+
* We do that with the use of a PHP error template.
|
|
379
|
+
*
|
|
380
|
+
* @access private
|
|
381
|
+
* @return void
|
|
382
|
+
*/
|
|
383
|
+
function _exception_handler($severity, $message, $filepath, $line)
|
|
384
|
+
{
|
|
385
|
+
// We don't bother with "strict" notices since they will fill up
|
|
386
|
+
// the log file with information that isn't normally very
|
|
387
|
+
// helpful. For example, if you are running PHP 5 and you
|
|
388
|
+
// use version 4 style class functions (without prefixes
|
|
389
|
+
// like "public", "private", etc.) you'll get notices telling
|
|
390
|
+
// you that these have been deprecated.
|
|
391
|
+
|
|
392
|
+
if ($severity == E_STRICT)
|
|
393
|
+
{
|
|
394
|
+
return;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
$error =& load_class('Exceptions');
|
|
398
|
+
|
|
399
|
+
// Should we display the error?
|
|
400
|
+
// We'll get the current error_reporting level and add its bits
|
|
401
|
+
// with the severity bits to find out.
|
|
402
|
+
|
|
403
|
+
if (($severity & error_reporting()) == $severity)
|
|
404
|
+
{
|
|
405
|
+
$error->show_php_error($severity, $message, $filepath, $line);
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
// Should we log the error? No? We're done...
|
|
409
|
+
$config =& get_config();
|
|
410
|
+
if ($config['log_threshold'] == 0)
|
|
411
|
+
{
|
|
412
|
+
return;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
$error->log_exception($severity, $message, $filepath, $line);
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
|
|
420
|
+
/* End of file Common.php */
|
|
421
|
+
/* Location: ./system/codeigniter/Common.php */
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
|
2
|
+
/**
|
|
3
|
+
* CodeIgniter
|
|
4
|
+
*
|
|
5
|
+
* An open source application development framework for PHP 4.3.2 or newer
|
|
6
|
+
*
|
|
7
|
+
* @package CodeIgniter
|
|
8
|
+
* @author ExpressionEngine Dev Team
|
|
9
|
+
* @copyright Copyright (c) 2008 - 2010, EllisLab, Inc.
|
|
10
|
+
* @license http://codeigniter.com/user_guide/license.html
|
|
11
|
+
* @link http://codeigniter.com
|
|
12
|
+
* @since Version 1.0
|
|
13
|
+
* @filesource
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
// ------------------------------------------------------------------------
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Compatibility Functions
|
|
20
|
+
*
|
|
21
|
+
* Function overrides for older versions of PHP or PHP environments missing
|
|
22
|
+
* certain extensions / libraries
|
|
23
|
+
*
|
|
24
|
+
* @package CodeIgniter
|
|
25
|
+
* @subpackage codeigniter
|
|
26
|
+
* @category Compatibility Functions
|
|
27
|
+
* @author ExpressionEngine Development Team
|
|
28
|
+
* @link http://codeigniter.com/user_guide/
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
// ------------------------------------------------------------------------
|
|
32
|
+
|
|
33
|
+
/*
|
|
34
|
+
* PHP versions prior to 5.0 don't support the E_STRICT constant
|
|
35
|
+
* so we need to explicitly define it otherwise the Exception class
|
|
36
|
+
* will generate errors when running under PHP 4
|
|
37
|
+
*
|
|
38
|
+
*/
|
|
39
|
+
if ( ! defined('E_STRICT'))
|
|
40
|
+
{
|
|
41
|
+
define('E_STRICT', 2048);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* ctype_digit()
|
|
46
|
+
*
|
|
47
|
+
* Determines if a string is comprised only of digits
|
|
48
|
+
* http://us.php.net/manual/en/function.ctype_digit.php
|
|
49
|
+
*
|
|
50
|
+
* @access public
|
|
51
|
+
* @param string
|
|
52
|
+
* @return bool
|
|
53
|
+
*/
|
|
54
|
+
if ( ! function_exists('ctype_digit'))
|
|
55
|
+
{
|
|
56
|
+
function ctype_digit($str)
|
|
57
|
+
{
|
|
58
|
+
if ( ! is_string($str) OR $str == '')
|
|
59
|
+
{
|
|
60
|
+
return FALSE;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
return ! preg_match('/[^0-9]/', $str);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// --------------------------------------------------------------------
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* ctype_alnum()
|
|
71
|
+
*
|
|
72
|
+
* Determines if a string is comprised of only alphanumeric characters
|
|
73
|
+
* http://us.php.net/manual/en/function.ctype-alnum.php
|
|
74
|
+
*
|
|
75
|
+
* @access public
|
|
76
|
+
* @param string
|
|
77
|
+
* @return bool
|
|
78
|
+
*/
|
|
79
|
+
if ( ! function_exists('ctype_alnum'))
|
|
80
|
+
{
|
|
81
|
+
function ctype_alnum($str)
|
|
82
|
+
{
|
|
83
|
+
if ( ! is_string($str) OR $str == '')
|
|
84
|
+
{
|
|
85
|
+
return FALSE;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return ! preg_match('/[^0-9a-z]/i', $str);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* End of file Compat.php */
|
|
93
|
+
/* Location: ./system/codeigniter/Compat.php */
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
|
2
|
+
/**
|
|
3
|
+
* CodeIgniter
|
|
4
|
+
*
|
|
5
|
+
* An open source application development framework for PHP 4.3.2 or newer
|
|
6
|
+
*
|
|
7
|
+
* @package CodeIgniter
|
|
8
|
+
* @author ExpressionEngine Dev Team
|
|
9
|
+
* @copyright Copyright (c) 2008 - 2010, EllisLab, Inc.
|
|
10
|
+
* @license http://codeigniter.com/user_guide/license.html
|
|
11
|
+
* @link http://codeigniter.com
|
|
12
|
+
* @since Version 1.0
|
|
13
|
+
* @filesource
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
// ------------------------------------------------------------------------
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Initialize the database
|
|
20
|
+
*
|
|
21
|
+
* @category Database
|
|
22
|
+
* @author ExpressionEngine Dev Team
|
|
23
|
+
* @link http://codeigniter.com/user_guide/database/
|
|
24
|
+
*/
|
|
25
|
+
function &DB($params = '', $active_record_override = FALSE)
|
|
26
|
+
{
|
|
27
|
+
// Load the DB config file if a DSN string wasn't passed
|
|
28
|
+
if (is_string($params) AND strpos($params, '://') === FALSE)
|
|
29
|
+
{
|
|
30
|
+
include(APPPATH.'config/database'.EXT);
|
|
31
|
+
|
|
32
|
+
if ( ! isset($db) OR count($db) == 0)
|
|
33
|
+
{
|
|
34
|
+
show_error('No database connection settings were found in the database config file.');
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
if ($params != '')
|
|
38
|
+
{
|
|
39
|
+
$active_group = $params;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
if ( ! isset($active_group) OR ! isset($db[$active_group]))
|
|
43
|
+
{
|
|
44
|
+
show_error('You have specified an invalid database connection group.');
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
$params = $db[$active_group];
|
|
48
|
+
}
|
|
49
|
+
elseif (is_string($params))
|
|
50
|
+
{
|
|
51
|
+
|
|
52
|
+
/* parse the URL from the DSN string
|
|
53
|
+
* Database settings can be passed as discreet
|
|
54
|
+
* parameters or as a data source name in the first
|
|
55
|
+
* parameter. DSNs must have this prototype:
|
|
56
|
+
* $dsn = 'driver://username:password@hostname/database';
|
|
57
|
+
*/
|
|
58
|
+
|
|
59
|
+
if (($dns = @parse_url($params)) === FALSE)
|
|
60
|
+
{
|
|
61
|
+
show_error('Invalid DB Connection String');
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
$params = array(
|
|
65
|
+
'dbdriver' => $dns['scheme'],
|
|
66
|
+
'hostname' => (isset($dns['host'])) ? rawurldecode($dns['host']) : '',
|
|
67
|
+
'username' => (isset($dns['user'])) ? rawurldecode($dns['user']) : '',
|
|
68
|
+
'password' => (isset($dns['pass'])) ? rawurldecode($dns['pass']) : '',
|
|
69
|
+
'database' => (isset($dns['path'])) ? rawurldecode(substr($dns['path'], 1)) : ''
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
// were additional config items set?
|
|
73
|
+
if (isset($dns['query']))
|
|
74
|
+
{
|
|
75
|
+
parse_str($dns['query'], $extra);
|
|
76
|
+
|
|
77
|
+
foreach($extra as $key => $val)
|
|
78
|
+
{
|
|
79
|
+
// booleans please
|
|
80
|
+
if (strtoupper($val) == "TRUE")
|
|
81
|
+
{
|
|
82
|
+
$val = TRUE;
|
|
83
|
+
}
|
|
84
|
+
elseif (strtoupper($val) == "FALSE")
|
|
85
|
+
{
|
|
86
|
+
$val = FALSE;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
$params[$key] = $val;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// No DB specified yet? Beat them senseless...
|
|
95
|
+
if ( ! isset($params['dbdriver']) OR $params['dbdriver'] == '')
|
|
96
|
+
{
|
|
97
|
+
show_error('You have not selected a database type to connect to.');
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// Load the DB classes. Note: Since the active record class is optional
|
|
101
|
+
// we need to dynamically create a class that extends proper parent class
|
|
102
|
+
// based on whether we're using the active record class or not.
|
|
103
|
+
// Kudos to Paul for discovering this clever use of eval()
|
|
104
|
+
|
|
105
|
+
if ($active_record_override == TRUE)
|
|
106
|
+
{
|
|
107
|
+
$active_record = TRUE;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
require_once(BASEPATH.'database/DB_driver'.EXT);
|
|
111
|
+
|
|
112
|
+
if ( ! isset($active_record) OR $active_record == TRUE)
|
|
113
|
+
{
|
|
114
|
+
require_once(BASEPATH.'database/DB_active_rec'.EXT);
|
|
115
|
+
|
|
116
|
+
if ( ! class_exists('CI_DB'))
|
|
117
|
+
{
|
|
118
|
+
eval('class CI_DB extends CI_DB_active_record { }');
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
else
|
|
122
|
+
{
|
|
123
|
+
if ( ! class_exists('CI_DB'))
|
|
124
|
+
{
|
|
125
|
+
eval('class CI_DB extends CI_DB_driver { }');
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
require_once(BASEPATH.'database/drivers/'.$params['dbdriver'].'/'.$params['dbdriver'].'_driver'.EXT);
|
|
130
|
+
|
|
131
|
+
// Instantiate the DB adapter
|
|
132
|
+
$driver = 'CI_DB_'.$params['dbdriver'].'_driver';
|
|
133
|
+
$DB =& instantiate_class(new $driver($params));
|
|
134
|
+
|
|
135
|
+
if ($DB->autoinit == TRUE)
|
|
136
|
+
{
|
|
137
|
+
$DB->initialize();
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
return $DB;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
/* End of file DB.php */
|
|
146
|
+
/* Location: ./system/database/DB.php */
|