Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Initial Import

  • Loading branch information...
commit b0dd10f8171945e0c1f3527dd1e9d18b043e01a7 0 parents
admin authored
Showing with 35,613 additions and 0 deletions.
  1. +81 −0 index.php
  2. +52 −0 license.txt
  3. +101 −0 system/application/config/autoload.php
  4. +244 −0 system/application/config/config.php
  5. +57 −0 system/application/config/database.php
  6. +15 −0 system/application/config/index.html
  7. +103 −0 system/application/config/mimes.php
  8. +49 −0 system/application/config/routes.php
  9. +15 −0 system/application/controllers/index.html
  10. +15 −0 system/application/controllers/welcome.php
  11. +35 −0 system/application/errors/error_404.php
  12. +34 −0 system/application/errors/error_db.php
  13. +34 −0 system/application/errors/error_general.php
  14. +10 −0 system/application/errors/error_php.php
  15. +15 −0 system/application/errors/index.html
  16. +15 −0 system/application/models/index.html
  17. +15 −0 system/application/scripts/index.html
  18. +15 −0 system/application/views/index.html
  19. +62 −0 system/application/views/welcome_message.php
  20. +15 −0 system/cache/index.html
  21. +58 −0 system/codeigniter/Base4.php
  22. +62 −0 system/codeigniter/Base5.php
  23. +256 −0 system/codeigniter/CodeIgniter.php
  24. +238 −0 system/codeigniter/Common.php
  25. +15 −0 system/codeigniter/index.html
  26. +875 −0 system/drivers/DB_active_record.php
  27. +948 −0 system/drivers/DB_driver.php
  28. +472 −0 system/drivers/DB_mssql.php
  29. +495 −0 system/drivers/DB_mysql.php
  30. +496 −0 system/drivers/DB_mysqli.php
  31. +468 −0 system/drivers/DB_odbc.php
  32. +476 −0 system/drivers/DB_postgre.php
  33. +501 −0 system/drivers/DB_sqlite.php
  34. +15 −0 system/drivers/index.html
  35. +15 −0 system/fonts/index.html
  36. BIN  system/fonts/texb.ttf
  37. +47 −0 system/helpers/array_helper.php
  38. +77 −0 system/helpers/cookie_helper.php
  39. +530 −0 system/helpers/date_helper.php
  40. +69 −0 system/helpers/directory_helper.php
  41. +139 −0 system/helpers/file_helper.php
  42. +382 −0 system/helpers/form_helper.php
  43. +76 −0 system/helpers/html_helper.php
  44. +15 −0 system/helpers/index.html
  45. +112 −0 system/helpers/security_helper.php
  46. +154 −0 system/helpers/string_helper.php
  47. +386 −0 system/helpers/text_helper.php
  48. +490 −0 system/helpers/typography_helper.php
  49. +487 −0 system/helpers/url_helper.php
  50. +55 −0 system/helpers/xml_helper.php
  51. +15 −0 system/init/index.html
  52. +19 −0 system/init/init_calendar.php
  53. +24 −0 system/init/init_email.php
  54. +18 −0 system/init/init_encrypt.php
  55. +24 −0 system/init/init_image_lib.php
  56. +24 −0 system/init/init_pagination.php
  57. +19 −0 system/init/init_parser.php
  58. +18 −0 system/init/init_session.php
  59. +18 −0 system/init/init_trackback.php
  60. +18 −0 system/init/init_unit_test.php
  61. +24 −0 system/init/init_upload.php
  62. +18 −0 system/init/init_validation.php
  63. +24 −0 system/init/init_xmlrpc.php
  64. +27 −0 system/init/init_xmlrpcs.php
  65. +49 −0 system/language/english/calendar_lang.php
  66. +49 −0 system/language/english/date_lang.php
  67. +15 −0 system/language/english/db_lang.php
  68. +21 −0 system/language/english/email_lang.php
  69. +21 −0 system/language/english/imglib_lang.php
  70. +15 −0 system/language/english/index.html
  71. +15 −0 system/language/english/scaffolding_lang.php
  72. +22 −0 system/language/english/unit_test_lang.php
  73. +16 −0 system/language/english/upload_lang.php
  74. +15 −0 system/language/english/validation_lang.php
  75. +15 −0 system/language/index.html
  76. +117 −0 system/libraries/Benchmark.php
  77. +473 −0 system/libraries/Calendar.php
  78. +181 −0 system/libraries/Config.php
  79. +445 −0 system/libraries/Controller.php
  80. +1,740 −0 system/libraries/Email.php
  81. +378 −0 system/libraries/Encrypt.php
  82. +165 −0 system/libraries/Exceptions.php
  83. +237 −0 system/libraries/Hooks.php
  84. +1,550 −0 system/libraries/Image_lib.php
  85. +585 −0 system/libraries/Input.php
  86. +113 −0 system/libraries/Language.php
  87. +611 −0 system/libraries/Loader.php
  88. +117 −0 system/libraries/Log.php
  89. +72 −0 system/libraries/Model.php
  90. +241 −0 system/libraries/Output.php
  91. +207 −0 system/libraries/Pagination.php
  92. +178 −0 system/libraries/Parser.php
  93. +318 −0 system/libraries/Router.php
  94. +499 −0 system/libraries/Session.php
  95. +254 −0 system/libraries/Sha1.php
  96. +561 −0 system/libraries/Trackback.php
  97. +243 −0 system/libraries/URI.php
  98. +331 −0 system/libraries/Unit_test.php
  99. +775 −0 system/libraries/Upload.php
  100. +692 −0 system/libraries/Validation.php
  101. +1,409 −0 system/libraries/Xmlrpc.php
  102. +492 −0 system/libraries/Xmlrpcs.php
  103. +15 −0 system/libraries/index.html
  104. +15 −0 system/logs/index.html
  105. +346 −0 system/plugins/captcha_pi.php
  106. +15 −0 system/plugins/index.html
  107. +604 −0 system/plugins/js_calendar_pi.php
  108. +285 −0 system/scaffolding/Scaffolding.php
  109. BIN  system/scaffolding/images/background.jpg
  110. +15 −0 system/scaffolding/images/index.html
  111. BIN  system/scaffolding/images/logo.jpg
  112. +15 −0 system/scaffolding/index.html
  113. +30 −0 system/scaffolding/views/add.php
  114. +7 −0 system/scaffolding/views/delete.php
  115. +31 −0 system/scaffolding/views/edit.php
  116. +10 −0 system/scaffolding/views/footer.php
  117. +31 −0 system/scaffolding/views/header.php
  118. +15 −0 system/scaffolding/views/index.html
  119. +6 −0 system/scaffolding/views/no_data.php
  120. +143 −0 system/scaffolding/views/stylesheet.css
  121. +25 −0 system/scaffolding/views/view.php
  122. +142 −0 user_guide/general/alternative_php.html
  123. +122 −0 user_guide/general/ancillary_classes.html
  124. +106 −0 user_guide/general/autoloader.html
  125. +127 −0 user_guide/general/base_classes.html
  126. +119 −0 user_guide/general/caching.html
  127. +248 −0 user_guide/general/changelog.html
  128. +317 −0 user_guide/general/controllers.html
  129. +222 −0 user_guide/general/creating_libraries.html
  130. +96 −0 user_guide/general/credits.html
  131. +142 −0 user_guide/general/errors.html
  132. +140 −0 user_guide/general/helpers.html
  133. +184 −0 user_guide/general/hooks.html
  134. +95 −0 user_guide/general/index.html
  135. +111 −0 user_guide/general/libraries.html
  136. +256 −0 user_guide/general/models.html
  137. +116 −0 user_guide/general/multiple_apps.html
  138. +125 −0 user_guide/general/plugins.html
  139. +83 −0 user_guide/general/quick_reference.html
  140. +88 −0 user_guide/general/requirements.html
  141. +163 −0 user_guide/general/routing.html
  142. +153 −0 user_guide/general/scaffolding.html
  143. +115 −0 user_guide/general/scripts.html
  144. +159 −0 user_guide/general/security.html
  145. +159 −0 user_guide/general/urls.html
  146. +249 −0 user_guide/general/views.html
  147. +111 −0 user_guide/helpers/array_helper.html
  148. +133 −0 user_guide/helpers/cookie_helper.html
  149. +340 −0 user_guide/helpers/date_helper.html
  150. +145 −0 user_guide/helpers/directory_helper.html
  151. +144 −0 user_guide/helpers/file_helper.html
  152. +343 −0 user_guide/helpers/form_helper.html
  153. +117 −0 user_guide/helpers/html_helper.html
  154. +131 −0 user_guide/helpers/index.html
  155. +131 −0 user_guide/helpers/security_helper.html
  156. +144 −0 user_guide/helpers/string_helper.html
  157. +197 −0 user_guide/helpers/text_helper.html
  158. +129 −0 user_guide/helpers/typography_helper.html
  159. +269 −0 user_guide/helpers/url_helper.html
  160. +110 −0 user_guide/helpers/xml_helper.html
  161. BIN  user_guide/images/appflowchart.gif
  162. BIN  user_guide/images/arrow.gif
  163. BIN  user_guide/images/ci_logo.jpg
  164. BIN  user_guide/images/ci_logo_mini.jpg
  165. BIN  user_guide/images/ci_quick_ref.png
  166. BIN  user_guide/images/file.gif
  167. BIN  user_guide/images/folder.gif
  168. BIN  user_guide/images/nav_bg.jpg
  169. BIN  user_guide/images/nav_separator.jpg
  170. BIN  user_guide/images/nav_toggle.jpg
  171. BIN  user_guide/images/transparent.gif
  172. +106 −0 user_guide/index.html
  173. +97 −0 user_guide/installation/downloads.html
  174. +116 −0 user_guide/installation/index.html
  175. +98 −0 user_guide/installation/upgrade_120.html
  176. +209 −0 user_guide/installation/upgrade_130.html
  177. +108 −0 user_guide/installation/upgrade_131.html
  178. +106 −0 user_guide/installation/upgrade_132.html
  179. +118 −0 user_guide/installation/upgrade_133.html
  180. +111 −0 user_guide/installation/upgrade_140.html
  181. +150 −0 user_guide/installation/upgrade_b11.html
  182. +95 −0 user_guide/installation/upgrading.html
  183. +160 −0 user_guide/libraries/benchmark.html
  184. +258 −0 user_guide/libraries/calendar.html
  185. +158 −0 user_guide/libraries/config.html
  186. +610 −0 user_guide/libraries/database/active_record.html
  187. +123 −0 user_guide/libraries/database/call_function.html
  188. +144 −0 user_guide/libraries/database/configuration.html
  189. +172 −0 user_guide/libraries/database/connecting.html
  190. +183 −0 user_guide/libraries/database/examples.html
  191. +144 −0 user_guide/libraries/database/fields.html
  192. +99 −0 user_guide/libraries/database/index.html
  193. +180 −0 user_guide/libraries/database/queries.html
  194. +235 −0 user_guide/libraries/database/results.html
  195. +116 −0 user_guide/libraries/database/table_data.html
  196. +294 −0 user_guide/libraries/email.html
  197. +187 −0 user_guide/libraries/encryption.html
  198. +429 −0 user_guide/libraries/file_uploading.html
Sorry, we could not display the entire diff because it was too big.
81 index.php
@@ -0,0 +1,81 @@
+<?php
+
+error_reporting(E_ALL);
+
+/*
+|------------------------------------------------
+| SYSTEM FOLDER NAME
+|------------------------------------------------
+|
+| This variable must contain the name of your "system"
+| folder. Include the path if the folder is not in the same
+| directory as this file. No trailing slash
+*/
+
+ $system_folder = "system";
+
+/*
+|------------------------------------------------
+| APPLICATION FOLDER NAME
+|------------------------------------------------
+|
+| If you want this front controller to use a specific
+| "application" folder you can set its name here.
+| By doing so you can have multiple applications share
+| a common set of Code Igniter system files.
+| Note: It is assumed that your application folder will
+| be located within the main system/application folder.
+| For example, lets say you have two applications,
+| "foo" and "bar":
+|
+| system/application/foo/
+| system/application/foo/config/
+| system/application/foo/controllers/
+| system/application/foo/errors/
+| system/application/foo/scripts/
+| system/application/foo/views/
+| system/application/bar/
+| system/application/bar/config/
+| system/application/bar/controllers/
+| system/application/bar/errors/
+| system/application/bar/scripts/
+| system/application/bar/views/
+|
+| If you would like to use the "foo" application you'll
+| set the variable like this:
+|
+| $application_folder = "foo";
+|
+*/
+
+ $application_folder = "";
+
+/*
+|================================================
+| END OF USER CONFIGURABLE SETTINGS
+|================================================
+*/
+
+if (function_exists('realpath') AND @realpath(dirname(__FILE__)) !== FALSE)
+{
+ $system_folder = str_replace("\\", "/", realpath(dirname(__FILE__))).'/'.$system_folder;
+}
+
+if ($application_folder != '')
+{
+ $application_folder .= '/';
+}
+
+// Older versions of PHP don't support this so we'll explicitly define it
+if ( ! defined('E_STRICT'))
+{
+ define('E_STRICT', 2048);
+}
+
+define('EXT', '.'.pathinfo(__FILE__, PATHINFO_EXTENSION));
+define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
+define('BASEPATH', $system_folder.'/');
+define('APPPATH', BASEPATH.'application/'.$application_folder);
+
+require_once BASEPATH.'codeigniter/CodeIgniter'.EXT;
+?>
52 license.txt
@@ -0,0 +1,52 @@
+Copyright (c) 2006, pMachine, Inc.
+All rights reserved.
+
+This license is a legal agreement between you and pMachine Inc. for the use
+of Code Igniter Software (the "Software"). By obtaining the Software you
+agree to comply with the terms and conditions of this license.
+
+PERMITTED USE
+You are permitted to use, copy, modify, and distribute the Software and its
+documentation, with or without modification, for any purpose, provided that
+the following conditions are met:
+
+1. A copy of this license agreement must be included with the distribution.
+
+2. Redistributions of source code must retain the above copyright notice in
+ all source code files.
+
+3. Redistributions in binary form must reproduce the above copyright notice
+ in the documentation and/or other materials provided with the distribution.
+
+4. Any files that have been modified must carry notices stating the nature
+ of the change and the names of those who changed them.
+
+5. Products derived from the Software must include an acknowledgment that
+ they are derived from Code Igniter in their documentation and/or other
+ materials provided with the distribution.
+
+6. Products derived from the Software may not be called "Code Igniter",
+ nor may "Code Igniter" appear in their name, without prior written
+ permission from pMachine, Inc.
+
+
+INDEMNITY
+You agree to indemnify and hold harmless the authors of the Software and
+any contributors for any direct, indirect, incidental, or consequential
+third-party claims, actions or suits, as well as any related expenses,
+liabilities, damages, settlements or fees arising from your use or misuse
+of the Software, or a violation of any terms of this license.
+
+DISCLAIMER OF WARRANTY
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESSED OR
+IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF QUALITY, PERFORMANCE,
+NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
+
+LIMITATIONS OF LIABILITY
+YOU ASSUME ALL RISK ASSOCIATED WITH THE INSTALLATION AND USE OF THE SOFTWARE.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS OF THE SOFTWARE BE LIABLE
+FOR CLAIMS, DAMAGES OR OTHER LIABILITY ARISING FROM, OUT OF, OR IN CONNECTION
+WITH THE SOFTWARE. LICENSE HOLDERS ARE SOLELY RESPONSIBLE FOR DETERMINING THE
+APPROPRIATENESS OF USE AND ASSUME ALL RISKS ASSOCIATED WITH ITS USE, INCLUDING
+BUT NOT LIMITED TO THE RISKS OF PROGRAM ERRORS, DAMAGE TO EQUIPMENT, LOSS OF
+DATA OR SOFTWARE PROGRAMS, OR UNAVAILABILITY OR INTERRUPTION OF OPERATIONS.
101 system/application/config/autoload.php
@@ -0,0 +1,101 @@
+<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
+/*
+| -------------------------------------------------------------------
+| AUTO-LOADER
+| -------------------------------------------------------------------
+| This file specifies which systems should be loaded by default.
+|
+| In order to keep the framework as light-weight as possible only the
+| absolute minimal resources are loaded by default. For example,
+| the database is not connected to automatically since no assumption
+| is made regarding whether you intend to use it. This file lets
+| you globally define which systems you would like loaded with every
+| request. In addition to core systems you can auto-load plugins,
+| helper files, config files, and your own scripts.
+|
+| -------------------------------------------------------------------
+| Instructions
+| -------------------------------------------------------------------
+|
+| These are the things you can load automatically:
+|
+| 1. Core classes
+| 2. Helper files
+| 3. Plugins
+| 4. Scripts
+| 5. Custom config files
+|
+| Note: The items will be loaded in the order that they are defined
+|
+| Please read the user guide for more detailed information
+*/
+
+/*
+| -------------------------------------------------------------------
+| Auto-load Core Classes
+| -------------------------------------------------------------------
+| Prototype:
+|
+| $autoload['core'] = array('database', 'session', 'xmlrpc');
+*/
+
+$autoload['core'] = array('session');
+
+
+/*
+| -------------------------------------------------------------------
+| Auto-load Helper Files
+| -------------------------------------------------------------------
+| Prototype:
+|
+| $autoload['helper'] = array('url', 'file');
+*/
+
+$autoload['helper'] = array();
+
+
+/*
+| -------------------------------------------------------------------
+| Auto-load Plugins
+| -------------------------------------------------------------------
+| Prototype:
+|
+| $autoload['plugin'] = array('captcha', 'js_calendar');
+*/
+
+$autoload['plugin'] = array();
+
+
+/*
+| -------------------------------------------------------------------
+| Auto-load Scripts
+| -------------------------------------------------------------------
+| The term "scripts" refers to you own PHP scripts that you've
+| placed in the application/scripts/ folder
+|
+| Prototype:
+|
+| $autoload['script'] = array('my_script1', 'my_script2');
+*/
+
+$autoload['script'] = array();
+
+
+/*
+| -------------------------------------------------------------------
+| Auto-load Config files
+| -------------------------------------------------------------------
+| Prototype:
+|
+| $autoload['config'] = array('config1', 'config2');
+|
+| NOTE: This item is intended for use ONLY if you have created custom
+| config files. Otherwise, leave it blank.
+|
+*/
+
+$autoload['config'] = array();
+
+
+
+?>
244 system/application/config/config.php
@@ -0,0 +1,244 @@
+<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
+
+/*
+|--------------------------------------------------------------------------
+| Base Site URL
+|--------------------------------------------------------------------------
+|
+| URL to your Code Igniter root. Typically this will be your base URL,
+| WITH a trailing slash:
+|
+| http://www.your-site.com/
+|
+*/
+$config['base_url'] = "http://127.0.0.1/CodeIgniter/";
+
+/*
+|--------------------------------------------------------------------------
+| Index File
+|--------------------------------------------------------------------------
+|
+| Typically this will be your index.php file, unless you've renamed it to
+| something else. If you are using mod_rewrite to remove the page set this
+| variable so that it is blank.
+|
+*/
+$config['index_page'] = "index.php";
+
+/*
+|--------------------------------------------------------------------------
+| URI PROTOCOL
+|--------------------------------------------------------------------------
+|
+| This item determines which server global should be used to retrieve the
+| URI string. The default setting of "auto" works for most servers.
+| If your links do not seem to work, try one of the other delicious flavors:
+|
+| 'auto' Default - auto detects
+| 'path_info' Uses the PATH_INFO
+| 'query_string' Uses the QUERY_STRING
+|
+*/
+$config['uri_protocol'] = "auto";
+
+/*
+|--------------------------------------------------------------------------
+| URL suffix
+|--------------------------------------------------------------------------
+|
+| This option allows you to add a suffix to all URLs generated by Code Igniter.
+| For more information please see the user guide:
+|
+| http://www.codeigniter.com/user_guide/general/urls.html
+*/
+
+$config['url_suffix'] = "";
+
+/*
+|--------------------------------------------------------------------------
+| Default Language
+|--------------------------------------------------------------------------
+|
+| This determines which set of language files should be used. Make sure
+| there is an available translation if you intend to use something other
+| than english.
+|
+*/
+$config['language'] = "english";
+
+
+/*
+|--------------------------------------------------------------------------
+| Enable/Disable System Hooks
+|--------------------------------------------------------------------------
+|
+| If you would like to use the "hooks" feature you must enable it by
+| setting this variable to TRUE (boolean). See the user guide for details.
+|
+*/
+$config['enable_hooks'] = TRUE;
+
+
+/*
+|--------------------------------------------------------------------------
+| Enable Query Strings
+|--------------------------------------------------------------------------
+|
+| By default Code Igniter uses search-engine friendly segment based URLs:
+| www.your-site.com/who/what/where/
+|
+| You can optionally enable standard query string based URLs:
+| www.your-site.com?who=me&what=something&where=here
+|
+| Options are: TRUE or FALSE (boolean)
+|
+| The two other items let you set the query string "words" that will
+| invoke your controllers and its functions:
+| www.your-site.com/index.php?c=controller&m=function
+|
+| Please note that some of the helpers won't work as expected when
+| this feature is enabled, since Code Igniter is designed primarily to
+| use segment based URLs.
+|
+*/
+$config['enable_query_strings'] = FALSE;
+$config['controller_trigger'] = 'c';
+$config['function_trigger'] = 'm';
+
+/*
+|--------------------------------------------------------------------------
+| Master Time Reference
+|--------------------------------------------------------------------------
+|
+| Options are "local" or "gmt". This pref tells the system whether to use
+| your server's local time as the master "now" reference, or convert it to
+| GMT. See the "date helper" page of the user guide for information
+| regarding date handling.
+|
+*/
+$config['time_reference'] = 'local';
+
+/*
+|--------------------------------------------------------------------------
+| Enable/Disable Error Logging
+|--------------------------------------------------------------------------
+|
+| If you would like errors or debug messages logged set this variable to
+| TRUE (boolean). Note: You must set the file permissions on the "logs" folder
+| such that it is writable.
+|
+*/
+$config['log_errors'] = FALSE;
+
+/*
+|--------------------------------------------------------------------------
+| Error Logging Threshold
+|--------------------------------------------------------------------------
+|
+| If you have enabled error logging, you can set an error threshold to
+| determine what gets logged. Threshold options are:
+|
+| 1 = Error Messages (including PHP errors)
+| 2 = Debug Messages
+| 3 = Informational Messages
+| 4 = All Messages
+|
+| For a live site you'll usually only enable Errors (1) to be logged otherwise
+| your log files will fill up very fast.
+|
+*/
+$config['log_threshold'] = 4;
+
+/*
+|--------------------------------------------------------------------------
+| Error Logging Directory Path
+|--------------------------------------------------------------------------
+|
+| Leave this BLANK unless you would like to set something other than the default
+| system/logs/ folder. Use a full server path with trailing slash.
+|
+*/
+$config['log_path'] = '';
+
+/*
+|--------------------------------------------------------------------------
+| Date Format for Logs
+|--------------------------------------------------------------------------
+|
+| Each item that is logged has an associated date. You can use PHP date
+| codes to set your own date formatting
+|
+*/
+$config['log_date_format'] = 'Y-m-d H:i:s';
+
+/*
+|--------------------------------------------------------------------------
+| Cache Directory Path
+|--------------------------------------------------------------------------
+|
+| Leave this BLANK unless you would like to set something other than the default
+| system/cache/ folder. Use a full server path with trailing slash.
+|
+*/
+$config['cache_path'] = '';
+
+
+/*
+|--------------------------------------------------------------------------
+| Encryption Key
+|--------------------------------------------------------------------------
+|
+| If you use the Encryption class or the Sessions class with encryption
+| enabled you MUST set an encryption key. See the user guide for info.
+|
+*/
+$config['encryption_key'] = "";
+
+
+/*
+|--------------------------------------------------------------------------
+| Session Variables
+|--------------------------------------------------------------------------
+|
+| 'session_cookie_name' = the name you want for the cookie
+| 'encrypt_sess_cookie' = TRUE/FALSE (boolean). Whether to encrypt the cookie
+| 'session_expiration' = the number of SECONDS you want the session to last.
+| by default sessions last 7200 seconds (two hours). Set to zero for no expiration.
+|
+*/
+$config['sess_cookie_name'] = 'ci_session';
+$config['sess_expiration'] = 7200;
+$config['sess_encrypt_cookie'] = FALSE;
+$config['sess_use_database'] = FALSE;
+$config['sess_table_name'] = '';
+$config['sess_match_ip'] = TRUE;
+$config['sess_match_useragent'] = TRUE;
+
+
+/*
+|--------------------------------------------------------------------------
+| Cookie Related Variables
+|--------------------------------------------------------------------------
+|
+| 'cookie_prefix' = Set a prefix if you need to avoid collisions
+| 'cookie_domain' = Set to .your-domain.com for site-wide cookies
+| 'cookie_path' = Typically will be a forward slash
+|
+*/
+$config['cookie_prefix'] = "";
+$config['cookie_domain'] = "";
+$config['cookie_path'] = "/";
+
+/*
+|--------------------------------------------------------------------------
+| Global XSS Filtering
+|--------------------------------------------------------------------------
+|
+| Determines whether the XSS filter is always active when GET, POST or
+| COOKIE data is encountered
+|
+*/
+$config['global_xss_filtering'] = FALSE;
+
+
+?>
57 system/application/config/database.php
@@ -0,0 +1,57 @@
+<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
+/*
+| -------------------------------------------------------------------
+| DATABASE CONNECTIVITY SETTINGS
+| -------------------------------------------------------------------
+| This file will contain the settings needed to access your database.
+|
+| For complete instructions please consult the "Database Connection"
+| page of the User Guide.
+|
+| -------------------------------------------------------------------
+| EXPLANATION OF VARIABLES
+| -------------------------------------------------------------------
+|
+| ['hostname'] The hostname of your database server.
+| ['username'] The username used to connect to the database
+| ['password'] The password used to connect to the database
+| ['database'] The name of the database you want to connect to
+| ['dbdriver'] The database type. ie: mysql. Currently supported:
+ mysql, mysqli, postgre, odbc, mssql
+| ['dbprefix'] You can add an optional prefix, which will be added
+| to the table name when using the Active Record class
+| ['pconnect'] TRUE/FALSE - Whether to use a persistent connection
+| ['db_debug'] TRUE/FALSE - Whether database errors should be displayed.
+| ['active_r'] TRUE/FALSE - Whether to load the active record class
+|
+| The $active_group variable lets you choose which connection group to
+| make active. By default there is only one group (the "default" group).
+|
+*/
+
+$active_group = "test";
+
+$db['default']['hostname'] = "localhost";
+$db['default']['username'] = "root";
+$db['default']['password'] = "";
+$db['default']['database'] = "ellislab";
+$db['default']['dbdriver'] = "mysql";
+$db['default']['dbprefix'] = "";
+$db['default']['active_r'] = TRUE;
+$db['default']['pconnect'] = FALSE;
+$db['default']['db_debug'] = TRUE;
+
+
+
+$db['test']['hostname'] = "localhost";
+$db['test']['username'] = "root";
+$db['test']['password'] = "";
+$db['test']['database'] = "tester";
+$db['test']['dbdriver'] = "mysql";
+$db['test']['dbprefix'] = "";
+$db['test']['active_r'] = TRUE;
+$db['test']['pconnect'] = FALSE;
+$db['test']['db_debug'] = TRUE;
+
+
+?>
15 system/application/config/index.html
@@ -0,0 +1,15 @@
+<html>
+
+<head>
+
+<title>403 Forbidden</title>
+
+</head>
+
+<body bgcolor='#ffffff'>
+
+<p>Directory access is forbidden.<p>
+
+</body>
+
+</html>
103 system/application/config/mimes.php
@@ -0,0 +1,103 @@
+<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
+/*
+| -------------------------------------------------------------------
+| MIME TYPES
+| -------------------------------------------------------------------
+| This file contains an array of mime types. It is used by the
+| Upload class to help identyfiy allowed file types.
+|
+*/
+
+$mimes = array( 'hqx' => 'application/mac-binhex40',
+ 'cpt' => 'application/mac-compactpro',
+ 'csv' => array('text/x-comma-separated-values', 'application/vnd.ms-excel'),
+ 'doc' => 'application/msword',
+ 'bin' => 'application/macbinary',
+ 'dms' => 'application/octet-stream',
+ 'lha' => 'application/octet-stream',
+ 'lzh' => 'application/octet-stream',
+ 'exe' => 'application/octet-stream',
+ 'class' => 'application/octet-stream',
+ 'psd' => 'application/x-photoshop',
+ 'so' => 'application/octet-stream',
+ 'sea' => 'application/octet-stream',
+ 'dll' => 'application/octet-stream',
+ 'oda' => 'application/oda',
+ 'pdf' => 'application/pdf',
+ 'ai' => 'application/postscript',
+ 'eps' => 'application/postscript',
+ 'ps' => 'application/postscript',
+ 'smi' => 'application/smil',
+ 'smil' => 'application/smil',
+ 'mif' => 'application/vnd.mif',
+ 'xls' => array('application/excel', 'application/vnd.ms-excel'),
+ 'ppt' => 'application/powerpoint',
+ 'wbxml' => 'application/wbxml',
+ 'wmlc' => 'application/wmlc',
+ 'dcr' => 'application/x-director',
+ 'dir' => 'application/x-director',
+ 'dxr' => 'application/x-director',
+ 'dvi' => 'application/x-dvi',
+ 'gtar' => 'application/x-gtar',
+ 'php' => 'application/x-httpd-php',
+ 'php4' => 'application/x-httpd-php',
+ 'php3' => 'application/x-httpd-php',
+ 'phtml' => 'application/x-httpd-php',
+ 'phps' => 'application/x-httpd-php-source',
+ 'js' => 'application/x-javascript',
+ 'swf' => 'application/x-shockwave-flash',
+ 'sit' => 'application/x-stuffit',
+ 'tar' => 'application/x-tar',
+ 'tgz' => 'application/x-tar',
+ 'xhtml' => 'application/xhtml+xml',
+ 'xht' => 'application/xhtml+xml',
+ 'zip' => array('application/zip', 'application/x-zip-compressed'),
+ 'zip' => 'application/zip',
+ 'mid' => 'audio/midi',
+ 'midi' => 'audio/midi',
+ 'mpga' => 'audio/mpeg',
+ 'mp2' => 'audio/mpeg',
+ 'mp3' => 'audio/mpeg',
+ 'aif' => 'audio/x-aiff',
+ 'aiff' => 'audio/x-aiff',
+ 'aifc' => 'audio/x-aiff',
+ 'ram' => 'audio/x-pn-realaudio',
+ 'rm' => 'audio/x-pn-realaudio',
+ 'rpm' => 'audio/x-pn-realaudio-plugin',
+ 'ra' => 'audio/x-realaudio',
+ 'rv' => 'video/vnd.rn-realvideo',
+ 'wav' => 'audio/x-wav',
+ 'bmp' => 'image/bmp',
+ 'gif' => 'image/gif',
+ 'jpeg' => array('image/jpeg', 'image/pjpeg'),
+ 'jpg' => array('image/jpeg', 'image/pjpeg'),
+ 'jpe' => array('image/jpeg', 'image/pjpeg'),
+ 'png' => array('image/png', 'image/x-png'),
+ 'tiff' => 'image/tiff',
+ 'tif' => 'image/tiff',
+ 'css' => 'text/css',
+ 'html' => 'text/html',
+ 'htm' => 'text/html',
+ 'shtml' => 'text/html',
+ 'txt' => 'text/plain',
+ 'text' => 'text/plain',
+ 'log' => array('text/plain', 'text/x-log'),
+ 'rtx' => 'text/richtext',
+ 'rtf' => 'text/rtf',
+ 'xml' => 'text/xml',
+ 'xsl' => 'text/xml',
+ 'mpeg' => 'video/mpeg',
+ 'mpg' => 'video/mpeg',
+ 'mpe' => 'video/mpeg',
+ 'qt' => 'video/quicktime',
+ 'mov' => 'video/quicktime',
+ 'avi' => 'video/x-msvideo',
+ 'movie' => 'video/x-sgi-movie',
+ 'doc' => 'application/msword',
+ 'word' => 'application/msword',
+ 'xl' => 'application/excel',
+ 'eml' => 'message/rfc822'
+ );
+
+
+?>
49 system/application/config/routes.php
@@ -0,0 +1,49 @@
+<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
+/*
+| -------------------------------------------------------------------------
+| URI ROUTING
+| -------------------------------------------------------------------------
+| This file lets you re-map URI requests to specific controller functions.
+|
+| Typically there is a one-to-one relationship between a URL string
+| and its corresponding controller class/method. The segments in a
+| URL normally follow this pattern:
+|
+| www.your-site.com/class/method/id/
+|
+| In some instances, however, you may want to remap this relationship
+| so that a different class/function is called than the one
+| corresponding to the URL.
+|
+| Please see the user guide for complete details:
+|
+| http://www.codeigniter.com/user_guide/general/routing.html
+|
+| -------------------------------------------------------------------------
+| RESERVED ROUTES
+| -------------------------------------------------------------------------
+|
+| There are two reserved routes:
+|
+| $route['default_controller'] = 'welcome';
+|
+| This route indicates which controller class should be loaded if the
+| URI contains no data. In the above example, the "welcome" class
+| would be loaded.
+|
+| $route['scaffolding_trigger'] = 'scaffolding';
+|
+| This route lets you set a "secret" word that will trigger the
+| scaffolding feature for added security. Note: Scaffolding must be
+| enabled in the controller in which you intend to use it.
+|
+*/
+
+$route['default_controller'] = "welcome";
+
+$route['scaffolding_trigger'] = "scaffolding";
+
+// Define your own routes below -------------------------------------------
+
+
+?>
15 system/application/controllers/index.html
@@ -0,0 +1,15 @@
+<html>
+
+<head>
+
+<title>403 Forbidden</title>
+
+</head>
+
+<body bgcolor='#ffffff'>
+
+<p>Directory access is forbidden.<p>
+
+</body>
+
+</html>
15 system/application/controllers/welcome.php
@@ -0,0 +1,15 @@
+<?php
+
+class Welcome extends Controller {
+
+ function Welcome()
+ {
+ parent::Controller();
+ }
+
+ function index()
+ {
+ $this->load->view('welcome_message');
+ }
+}
+?>
35 system/application/errors/error_404.php
@@ -0,0 +1,35 @@
+<?php header("HTTP/1.1 404 Not Found"); ?>
+<html>
+<head>
+<title>404 Page Not Found</title>
+<style type="text/css">
+
+body {
+background-color: #fff;
+margin: 40px;
+font-family: Lucida Grande, Verdana, Sans-serif;
+font-size: 12px;
+color: #000;
+}
+
+#content {
+border: #999 1px solid;
+background-color: #fff;
+padding: 20px 20px 12px 20px;
+}
+
+h1 {
+font-weight: normal;
+font-size: 14px;
+color: #990000;
+margin: 0 0 4px 0;
+}
+</style>
+</head>
+<body>
+ <div id="content">
+ <h1><?php echo $heading; ?></h1>
+ <?php echo $message; ?>
+ </div>
+</body>
+</html>
34 system/application/errors/error_db.php
@@ -0,0 +1,34 @@
+<html>
+<head>
+<title>Database Error</title>
+<style type="text/css">
+
+body {
+background-color: #fff;
+margin: 40px;
+font-family: Lucida Grande, Verdana, Sans-serif;
+font-size: 12px;
+color: #000;
+}
+
+#content {
+border: #999 1px solid;
+background-color: #fff;
+padding: 20px 20px 12px 20px;
+}
+
+h1 {
+font-weight: normal;
+font-size: 14px;
+color: #990000;
+margin: 0 0 4px 0;
+}
+</style>
+</head>
+<body>
+ <div id="content">
+ <h1><?php echo $heading; ?></h1>
+ <?php echo $message; ?>
+ </div>
+</body>
+</html>
34 system/application/errors/error_general.php
@@ -0,0 +1,34 @@
+<html>
+<head>
+<title>Error</title>
+<style type="text/css">
+
+body {
+background-color: #fff;
+margin: 40px;
+font-family: Lucida Grande, Verdana, Sans-serif;
+font-size: 12px;
+color: #000;
+}
+
+#content {
+border: #999 1px solid;
+background-color: #fff;
+padding: 20px 20px 12px 20px;
+}
+
+h1 {
+font-weight: normal;
+font-size: 14px;
+color: #990000;
+margin: 0 0 4px 0;
+}
+</style>
+</head>
+<body>
+ <div id="content">
+ <h1><?php echo $heading; ?></h1>
+ <?php echo $message; ?>
+ </div>
+</body>
+</html>
10 system/application/errors/error_php.php
@@ -0,0 +1,10 @@
+<div style="border:1px solid #990000;padding-left:20px;margin:10px;">
+
+<h4>A PHP Error was encountered</h4>
+
+<p>Severity: <?php echo $severity; ?></p>
+<p>Message: <?php echo $message; ?></p>
+<p>Filename: <?php echo $filepath; ?></p>
+<p>Line Number: <?php echo $line; ?></p>
+
+</div>
15 system/application/errors/index.html
@@ -0,0 +1,15 @@
+<html>
+
+<head>
+
+<title>403 Forbidden</title>
+
+</head>
+
+<body bgcolor='#ffffff'>
+
+<p>Directory access is forbidden.<p>
+
+</body>
+
+</html>
15 system/application/models/index.html
@@ -0,0 +1,15 @@
+<html>
+
+<head>
+
+<title>403 Forbidden</title>
+
+</head>
+
+<body bgcolor='#ffffff'>
+
+<p>Directory access is forbidden.<p>
+
+</body>
+
+</html>
15 system/application/scripts/index.html
@@ -0,0 +1,15 @@
+<html>
+
+<head>
+
+<title>403 Forbidden</title>
+
+</head>
+
+<body bgcolor='#ffffff'>
+
+<p>Directory access is forbidden.<p>
+
+</body>
+
+</html>
15 system/application/views/index.html
@@ -0,0 +1,15 @@
+<html>
+
+<head>
+
+<title>403 Forbidden</title>
+
+</head>
+
+<body bgcolor='#ffffff'>
+
+<p>Directory access is forbidden.<p>
+
+</body>
+
+</html>
62 system/application/views/welcome_message.php
@@ -0,0 +1,62 @@
+<html>
+<head>
+<title>Welcome to Code Igniter</title>
+
+<style type="text/css">
+
+body {
+ background-color: #fff;
+ margin: 40px;
+ font-family: Lucida Grande, Verdana, Sans-serif;
+ font-size: 14px;
+ color: #4F5155;
+}
+
+a {
+ color: #003399;
+ background-color: transparent;
+ font-weight: normal;
+}
+
+h1 {
+ color: #444;
+ background-color: transparent;
+ border-bottom: 1px solid #D0D0D0;
+ font-size: 16px;
+ font-weight: bold;
+ margin: 24px 0 2px 0;
+ padding: 5px 0 6px 0;
+}
+
+code {
+ font-family: Monaco, Verdana, Sans-serif;
+ font-size: 12px;
+ background-color: #f9f9f9;
+ border: 1px solid #D0D0D0;
+ color: #002166;
+ display: block;
+ margin: 14px 0 14px 0;
+ padding: 12px 10px 12px 10px;
+}
+
+</style>
+</head>
+<body>
+
+<h1>Welcome to Code Igniter!</h1>
+
+<p>The page you are looking at is being generated dynamically by Code Igniter.</p>
+
+<p>If you would like to edit this page you'll find it located at:</p>
+<code>system/application/views/welcome_message.php</code>
+
+<p>The corresponding controller for this page is found at:</p>
+<code>system/application/controllers/welcome.php</code>
+
+<p>If you are exploring Code Igniter for the very first time, you should start by reading the <a href="user_guide/">User Guide</a>.</p>
+
+
+<p><br />Page rendered in {elapsed_time} seconds</p>
+
+</body>
+</html>
15 system/cache/index.html
@@ -0,0 +1,15 @@
+<html>
+
+<head>
+
+<title>403 Forbidden</title>
+
+</head>
+
+<body bgcolor='#ffffff'>
+
+<p>Directory access is forbidden.<p>
+
+</body>
+
+</html>
58 system/codeigniter/Base4.php
@@ -0,0 +1,58 @@
+<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
+/**
+ * Code Igniter
+ *
+ * An open source application development framework for PHP 4.3.2 or newer
+ *
+ * @package CodeIgniter
+ * @author Rick Ellis
+ * @copyright Copyright (c) 2006, pMachine, Inc.
+ * @license http://www.codeignitor.com/user_guide/license.html
+ * @link http://www.codeigniter.com
+ * @since Version 1.3
+ * @filesource
+ */
+
+// ------------------------------------------------------------------------
+
+/**
+ * CI_BASE - For PHP 4
+ *
+ * This file is used only when Code Igniter is being run under PHP 4.
+ * Since PHP 4 has such poor object handling we had to come up with
+ * a hack to resolve some scoping problems. PHP 5 doesn't suffer from
+ * this problem so we load one of two files based on the version of
+ * PHP being run.
+ *
+ * @package CodeIgniter
+ * @subpackage codeigniter
+ * @category front-controller
+ * @author Rick Ellis
+ * @link http://www.codeigniter.com/user_guide/
+ */
+ class CI_Base extends CI_Loader {
+
+ function CI_Base()
+ {
+ global $OBJ;
+ parent::CI_Loader();
+ $this->load =& $this;
+ $OBJ = $this->load;
+ }
+}
+
+function &get_instance()
+{
+ global $OBJ, $CI;
+
+ if (is_object($CI))
+ {
+ return $CI;
+ }
+ else
+ {
+ return $OBJ->load;
+ }
+}
+
+?>
62 system/codeigniter/Base5.php
@@ -0,0 +1,62 @@
+<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
+/**
+ * Code Igniter
+ *
+ * An open source application development framework for PHP 4.3.2 or newer
+ *
+ * @package CodeIgniter
+ * @author Rick Ellis
+ * @copyright Copyright (c) 2006, pMachine, Inc.
+ * @license http://www.codeignitor.com/user_guide/license.html
+ * @link http://www.codeigniter.com
+ * @since Version 1.3
+ * @filesource
+ */
+
+
+// ------------------------------------------------------------------------
+
+/**
+ * CI_BASE - For PHP 5
+ *
+ * This file contains some code used only when Code Igniter is being
+ * run under PHP 5. It allows us to manage the CI super object more
+ * gracefully than what is possible with PHP 4.
+ *
+ * @package CodeIgniter
+ * @subpackage codeigniter
+ * @category front-controller
+ * @author Rick Ellis
+ * @link http://www.codeigniter.com/user_guide/
+ */
+
+class CI_Base {
+
+ public function CI_Base()
+ {
+ $instance =& _load_class('Instance');
+ $instance->set_instance($this);
+ }
+}
+
+class Instance {
+ public static $instance;
+
+ public function set_instance(&$object)
+ {
+ self::$instance =& $object;
+ }
+
+ public function &get_instance()
+ {
+ return self::$instance;
+ }
+}
+
+function &get_instance()
+{
+ $instance =& _load_class('Instance');
+ return $instance->get_instance();
+}
+
+?>
256 system/codeigniter/CodeIgniter.php
@@ -0,0 +1,256 @@
+<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
+/**
+ * Code Igniter
+ *
+ * An open source application development framework for PHP 4.3.2 or newer
+ *
+ * @package CodeIgniter
+ * @author Rick Ellis
+ * @copyright Copyright (c) 2006, pMachine, Inc.
+ * @license http://www.codeignitor.com/user_guide/license.html
+ * @link http://www.codeigniter.com
+ * @since Version 1.0
+ * @filesource
+ */
+
+// ------------------------------------------------------------------------
+
+/**
+ * System Front Controller
+ *
+ * Loads the base classes and executes the request.
+ *
+ * @package CodeIgniter
+ * @subpackage codeigniter
+ * @category Front-controller
+ * @author Rick Ellis
+ * @link http://www.codeigniter.com/user_guide/
+ */
+
+define('APPVER', '1.4');
+
+/*
+ * ------------------------------------------------------
+ * Load the global functions
+ * ------------------------------------------------------
+ */
+require(BASEPATH.'codeigniter/Common'.EXT);
+
+/*
+ * ------------------------------------------------------
+ * Define a custom error handler so we can log errors
+ * ------------------------------------------------------
+ */
+set_error_handler('_exception_handler');
+set_magic_quotes_runtime(0); // Kill magic quotes
+
+/*
+ * ------------------------------------------------------
+ * Start the timer... tick tock tick tock...
+ * ------------------------------------------------------
+ */
+
+$BM =& _load_class('CI_Benchmark');
+$BM->mark('code_igniter_start');
+
+/*
+ * ------------------------------------------------------
+ * Instantiate the hooks classe
+ * ------------------------------------------------------
+ */
+
+$EXT =& _load_class('CI_Hooks');
+
+/*
+ * ------------------------------------------------------
+ * Is there a "pre_system" hook?
+ * ------------------------------------------------------
+ */
+if ($EXT->_hook_exists('pre_system'))
+{
+ $EXT->_call_hook('pre_system');
+}
+
+/*
+ * ------------------------------------------------------
+ * Instantiate the base classes
+ * ------------------------------------------------------
+ */
+
+$CFG =& _load_class('CI_Config');
+$RTR =& _load_class('CI_Router');
+$OUT =& _load_class('CI_Output');
+
+/*
+ * ------------------------------------------------------
+ * Is there a valid cache file? If so, we're done...
+ * ------------------------------------------------------
+ */
+
+if ($EXT->_hook_exists('cache_override'))
+{
+ $EXT->_call_hook('cache_override');
+}
+else
+{
+ if ($OUT->_display_cache() == TRUE)
+ {
+ exit;
+ }
+}
+
+/*
+ * ------------------------------------------------------
+ * Does the requested controller exist?
+ * ------------------------------------------------------
+ */
+if ( ! file_exists(APPPATH.'controllers/'.$RTR->fetch_class().EXT))
+{
+ show_404();
+}
+
+/*
+ * ------------------------------------------------------
+ * Load the remaining base classes
+ * ------------------------------------------------------
+ */
+
+$IN =& _load_class('CI_Input');
+$URI =& _load_class('CI_URI');
+$LANG =& _load_class('CI_Language');
+
+/*
+ * ------------------------------------------------------
+ * Load the app controller and local controller
+ * ------------------------------------------------------
+ *
+ * Note: Due to the poor object handling in PHP 4 we'll
+ * contditionally load different versions of the base
+ * class. Retaining PHP 4 compatibility requires a bit of a hack.
+ *
+ * Note: The Loader class needs to be included first
+ *
+ */
+
+
+_load_class('CI_Loader');
+
+if (floor(phpversion()) < 5)
+{
+ require(BASEPATH.'codeigniter/Base4'.EXT);
+}
+else
+{
+ require(BASEPATH.'codeigniter/Base5'.EXT);
+}
+
+_load_class('CI_Controller');
+
+require(APPPATH.'controllers/'.$RTR->fetch_class().EXT);
+
+/*
+ * ------------------------------------------------------
+ * Security check
+ * ------------------------------------------------------
+ *
+ * None of the functions in the app controller or the
+ * loader class can be called via the URI, nor can
+ * controller functions that begin with an underscore
+ */
+$class = $RTR->fetch_class();
+$method = $RTR->fetch_method();
+
+if ( ! class_exists($class)
+ OR $method == 'controller'
+ OR substr($method, 0, 1) == '_'
+ OR in_array($method, get_class_methods('Controller'))
+ )
+{
+ show_404();
+}
+
+/*
+ * ------------------------------------------------------
+ * Is there a "pre_controller" hook?
+ * ------------------------------------------------------
+ */
+if ($EXT->_hook_exists('pre_controller'))
+{
+ $EXT->_call_hook('pre_controller');
+}
+
+/*
+ * ------------------------------------------------------
+ * Instantiate the controller and call requested method
+ * ------------------------------------------------------
+ */
+$CI = new $class();
+
+if ($RTR->scaffolding_request === TRUE)
+{
+ if ($EXT->_hook_exists('scaffolding_override'))
+ {
+ $EXT->_call_hook('scaffolding_override');
+ }
+ else
+ {
+ $CI->_ci_scaffolding();
+ }
+}
+else
+{
+ if ( ! method_exists($CI, $method))
+ {
+ show_404();
+ }
+
+ $CI->$method();
+}
+
+/*
+ * ------------------------------------------------------
+ * Is there a "post_controller" hook?
+ * ------------------------------------------------------
+ */
+if ($EXT->_hook_exists('post_controller'))
+{
+ $EXT->_call_hook('post_controller');
+}
+
+/*
+ * ------------------------------------------------------
+ * Send the final rendered output to the browser
+ * ------------------------------------------------------
+ */
+
+if ($EXT->_hook_exists('display_override'))
+{
+ $EXT->_call_hook('display_override');
+}
+else
+{
+ $OUT->_display();
+}
+
+/*
+ * ------------------------------------------------------
+ * Is there a "post_system" hook?
+ * ------------------------------------------------------
+ */
+if ($EXT->_hook_exists('post_system'))
+{
+ $EXT->_call_hook('post_system');
+}
+
+/*
+ * ------------------------------------------------------
+ * Close the DB connection of one exists
+ * ------------------------------------------------------
+ */
+if ($CI->_ci_is_loaded('db'))
+{
+ $CI->db->close();
+}
+
+
+?>
238 system/codeigniter/Common.php
@@ -0,0 +1,238 @@
+<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
+/**
+ * Code Igniter
+ *
+ * An open source application development framework for PHP 4.3.2 or newer
+ *
+ * @package CodeIgniter
+ * @author Rick Ellis
+ * @copyright Copyright (c) 2006, pMachine, Inc.
+ * @license http://www.codeignitor.com/user_guide/license.html
+ * @link http://www.codeigniter.com
+ * @since Version 1.0
+ * @filesource
+ */
+
+// ------------------------------------------------------------------------
+
+/**
+ * Common Functions
+ *
+ * Loads the base classes and executes the request.
+ *
+ * @package CodeIgniter
+ * @subpackage codeigniter
+ * @category Common Functions
+ * @author Rick Ellis
+ * @link http://www.codeigniter.com/user_guide/
+ */
+
+// ------------------------------------------------------------------------
+
+/**
+* Class registry
+*
+*
+* @access public
+* @return object
+*/
+function &_load_class($class, $instantiate = TRUE)
+{
+ static $objects;
+
+ if ( ! isset($objects[$class]))
+ {
+ if (FALSE !== strpos($class, 'CI_'))
+ {
+ if (file_exists(APPPATH.'libraries/'.str_replace('CI_', '', $class).EXT))
+ {
+ require(APPPATH.'libraries/'.str_replace('CI_', '', $class).EXT);
+ }
+ else
+ {
+ require(BASEPATH.'libraries/'.str_replace('CI_', '', $class).EXT);
+ }
+ }
+
+ if ($instantiate == TRUE)
+ {
+ if ($class == 'CI_Controller')
+ $class = 'Controller';
+
+ $objects[$class] =& new $class();
+ }
+ else
+ {
+ $objects[$class] = TRUE;
+ }
+ }
+
+
+ return $objects[$class];
+}
+
+/**
+* Loads the main config.php file
+*
+*
+* @access private
+* @return array
+*/
+function &_get_config()
+{
+ static $conf;
+
+ if ( ! isset($conf))
+ {
+ require(APPPATH.'config/config'.EXT);
+
+ if ( ! isset($config) OR ! is_array($config))
+ {
+ show_error('Your config file does not appear to be formatted correctly.');
+ }
+
+ $conf[0] =& $config;
+ }
+ return $conf[0];
+}
+
+
+/**
+* Error Handler
+*
+* This function lets us invoke the exception class and
+* display errors using the standard error template located
+* in application/errors/errors.php
+* This function will send the error page directly to the
+* browser and exit.
+*
+* @access public
+* @return void
+*/
+function show_error($message)
+{
+ if ( ! class_exists('CI_Exceptions'))
+ {
+ include_once(BASEPATH.'libraries/Exceptions.php');
+ }
+
+ $error = new CI_Exceptions();
+ echo $error->show_error('An Error Was Encountered', $message);
+ exit;
+}
+
+
+/**
+* 404 Page Handler
+*
+* This function is similar to the show_error() function above
+* However, instead of the standard error template it displays
+* 404 errors.
+*
+* @access public
+* @return void
+*/
+function show_404($page = '')
+{
+ if ( ! class_exists('CI_Exceptions'))
+ {
+ include_once(BASEPATH.'libraries/Exceptions.php');
+ }
+
+ $error = new CI_Exceptions();
+ $error->show_404($page);
+ exit;
+}
+
+
+/**
+* Error Logging Interface
+*
+* We use this as a simple mechanism to access the logging
+* class and send messages to be logged.
+*
+* @access public
+* @return void
+*/
+function log_message($level = 2, $message, $php_error = FALSE)
+{
+ $config =& _get_config();
+ if ($config['log_errors'] === FALSE)
+ {
+ return;
+ }
+
+ if ( ! class_exists('CI_Log'))
+ {
+ include_once(BASEPATH.'libraries/Log.php');
+ }
+
+ if ( ! isset($LOG))
+ {
+ $LOG = new CI_Log(
+ $config['log_path'],
+ $config['log_threshold'],
+ $config['log_date_format']
+ );
+ }
+
+ $LOG->write_log($level, $message, $php_error);
+}
+
+
+/**
+* Exception Handler
+*
+* This is the custom exception handler we defined at the
+* top of this file. The main reason we use this is permit
+* PHP errors to be logged in our own log files since we may
+* not have access to server logs. Since this function
+* effectively intercepts PHP errors, however, we also need
+* to display errors based on the current error_reporting level.
+* We do that with the use of a PHP error template.
+*
+* @access private
+* @return void
+*/
+function _exception_handler($severity, $message, $filepath, $line)
+{
+ // We don't bother with "strict" notices since they will fill up
+ // the log file with information that isn't normally very
+ // helpful. For example, if you are running PHP 5 and you
+ // use version 4 style class functions (without prefixes
+ // like "public", "private", etc.) you'll get notices telling
+ // you that these have been deprecated.
+
+ if ($severity == E_STRICT)
+ {
+ return;
+ }
+
+ // Send the PHP error to the log file...
+ if ( ! class_exists('CI_Exceptions'))
+ {
+ include_once(BASEPATH.'libraries/Exceptions.php');
+ }
+ $error = new CI_Exceptions();
+
+ // Should we display the error?
+ // We'll get the current error_reporting level and add its bits
+ // with the severity bits to find out.
+
+ if (($severity & error_reporting()) == $severity)
+ {
+ $error->show_php_error($severity, $message, $filepath, $line);
+ }
+
+ // Should we log the error? No? We're done...
+ $config =& _get_config();
+ if ($config['log_errors'] === FALSE)
+ {
+ return;
+ }
+
+ $error->log_exception($severity, $message, $filepath, $line);
+}
+
+
+?>
15 system/codeigniter/index.html
@@ -0,0 +1,15 @@
+<html>
+
+<head>
+
+<title>403 Forbidden</title>
+
+</head>
+
+<body bgcolor='#ffffff'>
+
+<p>Directory access is forbidden.<p>
+
+</body>
+
+</html>
875 system/drivers/DB_active_record.php
@@ -0,0 +1,875 @@
+<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
+/**
+ * Code Igniter
+ *
+ * An open source application development framework for PHP 4.3.2 or newer
+ *
+ * @package CodeIgniter
+ * @author Rick Ellis
+ * @copyright Copyright (c) 2006, pMachine, Inc.
+ * @license http://www.codeignitor.com/user_guide/license.html
+ * @link http://www.codeigniter.com
+ * @since Version 1.0
+ * @filesource
+ */
+
+// ------------------------------------------------------------------------
+
+/**
+ * Active Record Class
+ *
+ * This is the platform-independent base Active Record implementation class.
+ *
+ * @package CodeIgniter
+ * @subpackage Drivers
+ * @category Database
+ * @author Rick Ellis
+ * @link http://www.codeigniter.com/user_guide/libraries/database/
+ */
+class CI_DB_active_record extends CI_DB_driver {
+
+ var $ar_select = array();
+ var $ar_distinct = FALSE;
+ var $ar_from = array();
+ var $ar_join = array();
+ var $ar_where = array();
+ var $ar_like = array();
+ var $ar_groupby = array();
+ var $ar_having = array();
+ var $ar_limit = FALSE;
+ var $ar_offset = FALSE;
+ var $ar_order = FALSE;
+ var $ar_orderby = array();
+ var $ar_set = array();
+
+
+ /**
+ * Select
+ *
+ * Generates the SELECT portion of the query
+ *
+ * @access public
+ * @param string
+ * @return object
+ */
+ function select($select = '*')
+ {
+ if (is_string($select))
+ {
+ $select = explode(',', $select);
+ }
+
+ foreach ($select as $val)
+ {
+ $val = trim($val);
+
+ if ($val != '')
+ $this->ar_select[] = $val;
+ }
+ return $this;
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
+ * DISTINCT
+ *
+ * Sets a flag which tells the query string compiler to add DISTINCT
+ *
+ * @access public
+ * @param bool
+ * @return object
+ */
+ function distinct($val = TRUE)
+ {
+ $this->ar_distinct = (is_bool($val)) ? $val : TRUE;
+ return $this;
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
+ * From
+ *
+ * Generates the FROM portion of the query
+ *
+ * @access public
+ * @param mixed can be a string or array
+ * @return object
+ */
+ function from($from)
+ {
+ foreach ((array)$from as $val)
+ {
+ $this->ar_from[] = $this->dbprefix.$val;
+ }
+ return $this;
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
+ * Join
+ *
+ * Generates the JOIN portion of the query
+ *
+ * @access public
+ * @param string
+ * @param string the join condition
+ * @param string the type of join
+ * @return object
+ */
+ function join($table, $cond, $type = '')
+ {
+ if ($type != '')
+ {
+ $type = strtoupper(trim($type));
+
+ if ( ! in_array($type, array('LEFT', 'RIGHT', 'OUTER', 'INNER', 'LEFT OUTER', 'RIGHT OUTER')))
+ {
+ $type = '';
+ }
+ else
+ {
+ $type .= ' ';
+ }
+ }
+
+ $this->ar_join[] = $type.'JOIN '.$table.' ON '.$cond;
+ return $this;
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
+ * Where
+ *
+ * Generates the WHERE portion of the query. Separates
+ * multiple calls with AND
+ *
+ * @access public
+ * @param mixed
+ * @param mixed
+ * @return object
+ */
+ function where($key, $value = NULL)
+ {
+ return $this->_where($key, $value, 'AND ');
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
+ * OR Where
+ *
+ * Generates the WHERE portion of the query. Separates
+ * multiple calls with OR
+ *
+ * @access public
+ * @param mixed
+ * @param mixed
+ * @return object
+ */
+ function orwhere($key, $value = NULL)
+ {
+ return $this->_where($key, $value, 'OR ');
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
+ * Where
+ *
+ * Called by where() or orwhere()
+ *
+ * @access private
+ * @param mixed
+ * @param mixed
+ * @param string
+ * @return object
+ */
+ function _where($key, $value = NULL, $type = 'AND ')
+ {
+ if ( ! is_array($key))
+ {
+ $key = array($key => $value);
+ }
+
+ foreach ($key as $k => $v)
+ {
+ $prefix = (count($this->ar_where) == 0) ? '' : $type;
+
+ if ( ! is_null($v))
+ {
+ if ( ! $this->_has_operator($k))
+ {
+ $k .= ' =';
+ }
+
+ $v = ' '.$this->escape($v);
+ }
+
+ $this->ar_where[] = $prefix.$k.$v;
+ }
+ return $this;
+ }
+
+
+
+ // --------------------------------------------------------------------
+
+ /**
+ * Like
+ *
+ * Generates a %LIKE% portion of the query. Separates
+ * multiple calls with AND
+ *
+ * @access public
+ * @param mixed
+ * @param mixed
+ * @return object
+ */
+ function like($field, $match = '')
+ {
+ return $this->_like($field, $match, 'AND ');
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
+ * OR Like
+ *
+ * Generates a %LIKE% portion of the query. Separates
+ * multiple calls with OR
+ *
+ * @access public
+ * @param mixed
+ * @param mixed
+ * @return object
+ */
+ function orlike($field, $match = '')
+ {
+ return $this->_like($field, $match, 'OR ');
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
+ * Like
+ *
+ * Called by like() or olike()
+ *
+ * @access private
+ * @param mixed
+ * @param mixed
+ * @param string
+ * @return object
+ */
+ function _like($field, $match = '', $type = 'AND ')
+ {
+ if ( ! is_array($field))
+ {
+ $field = array($field => $match);
+ }
+
+ foreach ($field as $k => $v)
+ {
+ $prefix = (count($this->ar_like) == 0) ? '' : $type;
+
+ $v = $this->escape_str($v);
+
+ $this->ar_like[] = $prefix." $k LIKE '%{$v}%'";
+ }
+ return $this;
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
+ * GROUP BY
+ *
+ * @access public
+ * @param string