├── .gitignore ├── README.md ├── application ├── .htaccess ├── cache │ ├── .htaccess │ └── index.html ├── config │ ├── autoload.php │ ├── config.php │ ├── constants.php │ ├── database.php │ ├── doctypes.php │ ├── foreign_chars.php │ ├── hooks.php │ ├── index.html │ ├── memcached.php │ ├── migration.php │ ├── mimes.php │ ├── profiler.php │ ├── routes.php │ ├── smileys.php │ └── user_agents.php ├── controllers │ ├── Sample.php │ ├── Welcome.php │ └── index.html ├── core │ └── index.html ├── helpers │ ├── index.html │ └── widget_helper.php ├── hooks │ └── index.html ├── index.html ├── language │ ├── english │ │ └── index.html │ └── index.html ├── libraries │ ├── Blog_widget.php │ └── index.html ├── models │ └── index.html ├── third_party │ └── index.html └── views │ ├── blog │ └── list_latest.php │ ├── errors │ ├── cli │ │ ├── error_404.php │ │ ├── error_db.php │ │ ├── error_exception.php │ │ ├── error_general.php │ │ ├── error_php.php │ │ └── index.html │ ├── html │ │ ├── error_404.php │ │ ├── error_db.php │ │ ├── error_exception.php │ │ ├── error_general.php │ │ ├── error_php.php │ │ └── index.html │ └── index.html │ ├── index.html │ ├── sample │ └── index.php │ └── welcome_message.php ├── bin ├── .placeholder ├── check-diff.sh ├── install.php ├── my-codeigniter.sh ├── router.php └── server.sh ├── composer.json ├── composer.lock └── public ├── .htaccess └── index.php /.gitignore: -------------------------------------------------------------------------------- 1 | nbproject 2 | ._* 3 | .~lock.* 4 | .buildpath 5 | .DS_Store 6 | .idea 7 | .project 8 | .settings 9 | cache.properties 10 | build 11 | vendor/ 12 | composer.phar 13 | application/logs/ 14 | application/cache/ 15 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CodeIgniter Widget (View Partial) Sample 2 | 3 | This is CodeIgniter 3 with [myth:Bay](https://github.com/newmythmedia/bay) which is a simple, framework-agnostic widget system. 4 | 5 | * Widget Helper 6 | * [helpers/widget_helper.php](https://github.com/kenjis/codeigniter-widgets/blob/master/application/helpers/widget_helper.php) 7 | 8 | * Controller 9 | * [controllers/Sample.php](https://github.com/kenjis/codeigniter-widgets/blob/master/application/controllers/Sample.php) 10 | * [views/sample/index.php](https://github.com/kenjis/codeigniter-widgets/blob/master/application/views/sample/index.php) 11 | 12 | * Widget 13 | * [libraries/Blog_widget.php](https://github.com/kenjis/codeigniter-widgets/blob/master/application/libraries/Blog_widget.php) 14 | * [views/blog/list_latest.php](https://github.com/kenjis/codeigniter-widgets/blob/master/application/views/blog/list_latest.php) 15 | 16 | ## Requirements 17 | 18 | * PHP 5.4 or later 19 | * `composer` command (See [Composer Installation](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx)) 20 | * Git 21 | 22 | ## Reference 23 | 24 | * 25 | -------------------------------------------------------------------------------- /application/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | Require all denied 3 | 4 | 5 | Deny from all 6 | -------------------------------------------------------------------------------- /application/cache/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | Require all denied 3 | 4 | 5 | Deny from all 6 | -------------------------------------------------------------------------------- /application/cache/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/config/autoload.php: -------------------------------------------------------------------------------- 1 | 'ua'); 60 | */ 61 | $autoload['libraries'] = array(); 62 | 63 | /* 64 | | ------------------------------------------------------------------- 65 | | Auto-load Drivers 66 | | ------------------------------------------------------------------- 67 | | These classes are located in system/libraries/ or in your 68 | | application/libraries/ directory, but are also placed inside their 69 | | own subdirectory and they extend the CI_Driver_Library class. They 70 | | offer multiple interchangeable driver options. 71 | | 72 | | Prototype: 73 | | 74 | | $autoload['drivers'] = array('cache'); 75 | */ 76 | $autoload['drivers'] = array(); 77 | 78 | /* 79 | | ------------------------------------------------------------------- 80 | | Auto-load Helper Files 81 | | ------------------------------------------------------------------- 82 | | Prototype: 83 | | 84 | | $autoload['helper'] = array('url', 'file'); 85 | */ 86 | $autoload['helper'] = array('widget'); 87 | 88 | /* 89 | | ------------------------------------------------------------------- 90 | | Auto-load Config files 91 | | ------------------------------------------------------------------- 92 | | Prototype: 93 | | 94 | | $autoload['config'] = array('config1', 'config2'); 95 | | 96 | | NOTE: This item is intended for use ONLY if you have created custom 97 | | config files. Otherwise, leave it blank. 98 | | 99 | */ 100 | $autoload['config'] = array(); 101 | 102 | /* 103 | | ------------------------------------------------------------------- 104 | | Auto-load Language files 105 | | ------------------------------------------------------------------- 106 | | Prototype: 107 | | 108 | | $autoload['language'] = array('lang1', 'lang2'); 109 | | 110 | | NOTE: Do not include the "_lang" part of your file. For example 111 | | "codeigniter_lang.php" would be referenced as array('codeigniter'); 112 | | 113 | */ 114 | $autoload['language'] = array(); 115 | 116 | /* 117 | | ------------------------------------------------------------------- 118 | | Auto-load Models 119 | | ------------------------------------------------------------------- 120 | | Prototype: 121 | | 122 | | $autoload['model'] = array('first_model', 'second_model'); 123 | | 124 | | You can also supply an alternative model name to be assigned 125 | | in the controller: 126 | | 127 | | $autoload['model'] = array('first_model' => 'first'); 128 | */ 129 | $autoload['model'] = array(); 130 | -------------------------------------------------------------------------------- /application/config/config.php: -------------------------------------------------------------------------------- 1 | ]+$/i 157 | | 158 | | DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!! 159 | | 160 | */ 161 | $config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-'; 162 | 163 | /* 164 | |-------------------------------------------------------------------------- 165 | | Enable Query Strings 166 | |-------------------------------------------------------------------------- 167 | | 168 | | By default CodeIgniter uses search-engine friendly segment based URLs: 169 | | example.com/who/what/where/ 170 | | 171 | | By default CodeIgniter enables access to the $_GET array. If for some 172 | | reason you would like to disable it, set 'allow_get_array' to FALSE. 173 | | 174 | | You can optionally enable standard query string based URLs: 175 | | example.com?who=me&what=something&where=here 176 | | 177 | | Options are: TRUE or FALSE (boolean) 178 | | 179 | | The other items let you set the query string 'words' that will 180 | | invoke your controllers and its functions: 181 | | example.com/index.php?c=controller&m=function 182 | | 183 | | Please note that some of the helpers won't work as expected when 184 | | this feature is enabled, since CodeIgniter is designed primarily to 185 | | use segment based URLs. 186 | | 187 | */ 188 | $config['allow_get_array'] = TRUE; 189 | $config['enable_query_strings'] = FALSE; 190 | $config['controller_trigger'] = 'c'; 191 | $config['function_trigger'] = 'm'; 192 | $config['directory_trigger'] = 'd'; 193 | 194 | /* 195 | |-------------------------------------------------------------------------- 196 | | Error Logging Threshold 197 | |-------------------------------------------------------------------------- 198 | | 199 | | You can enable error logging by setting a threshold over zero. The 200 | | threshold determines what gets logged. Threshold options are: 201 | | 202 | | 0 = Disables logging, Error logging TURNED OFF 203 | | 1 = Error Messages (including PHP errors) 204 | | 2 = Debug Messages 205 | | 3 = Informational Messages 206 | | 4 = All Messages 207 | | 208 | | You can also pass an array with threshold levels to show individual error types 209 | | 210 | | array(2) = Debug Messages, without Error Messages 211 | | 212 | | For a live site you'll usually only enable Errors (1) to be logged otherwise 213 | | your log files will fill up very fast. 214 | | 215 | */ 216 | $config['log_threshold'] = 0; 217 | 218 | /* 219 | |-------------------------------------------------------------------------- 220 | | Error Logging Directory Path 221 | |-------------------------------------------------------------------------- 222 | | 223 | | Leave this BLANK unless you would like to set something other than the default 224 | | application/logs/ directory. Use a full server path with trailing slash. 225 | | 226 | */ 227 | $config['log_path'] = ''; 228 | 229 | /* 230 | |-------------------------------------------------------------------------- 231 | | Log File Extension 232 | |-------------------------------------------------------------------------- 233 | | 234 | | The default filename extension for log files. The default 'php' allows for 235 | | protecting the log files via basic scripting, when they are to be stored 236 | | under a publicly accessible directory. 237 | | 238 | | Note: Leaving it blank will default to 'php'. 239 | | 240 | */ 241 | $config['log_file_extension'] = ''; 242 | 243 | /* 244 | |-------------------------------------------------------------------------- 245 | | Log File Permissions 246 | |-------------------------------------------------------------------------- 247 | | 248 | | The file system permissions to be applied on newly created log files. 249 | | 250 | | IMPORTANT: This MUST be an integer (no quotes) and you MUST use octal 251 | | integer notation (i.e. 0700, 0644, etc.) 252 | */ 253 | $config['log_file_permissions'] = 0644; 254 | 255 | /* 256 | |-------------------------------------------------------------------------- 257 | | Date Format for Logs 258 | |-------------------------------------------------------------------------- 259 | | 260 | | Each item that is logged has an associated date. You can use PHP date 261 | | codes to set your own date formatting 262 | | 263 | */ 264 | $config['log_date_format'] = 'Y-m-d H:i:s'; 265 | 266 | /* 267 | |-------------------------------------------------------------------------- 268 | | Error Views Directory Path 269 | |-------------------------------------------------------------------------- 270 | | 271 | | Leave this BLANK unless you would like to set something other than the default 272 | | application/views/errors/ directory. Use a full server path with trailing slash. 273 | | 274 | */ 275 | $config['error_views_path'] = ''; 276 | 277 | /* 278 | |-------------------------------------------------------------------------- 279 | | Cache Directory Path 280 | |-------------------------------------------------------------------------- 281 | | 282 | | Leave this BLANK unless you would like to set something other than the default 283 | | application/cache/ directory. Use a full server path with trailing slash. 284 | | 285 | */ 286 | $config['cache_path'] = ''; 287 | 288 | /* 289 | |-------------------------------------------------------------------------- 290 | | Cache Include Query String 291 | |-------------------------------------------------------------------------- 292 | | 293 | | Whether to take the URL query string into consideration when generating 294 | | output cache files. Valid options are: 295 | | 296 | | FALSE = Disabled 297 | | TRUE = Enabled, take all query parameters into account. 298 | | Please be aware that this may result in numerous cache 299 | | files generated for the same page over and over again. 300 | | array('q') = Enabled, but only take into account the specified list 301 | | of query parameters. 302 | | 303 | */ 304 | $config['cache_query_string'] = FALSE; 305 | 306 | /* 307 | |-------------------------------------------------------------------------- 308 | | Encryption Key 309 | |-------------------------------------------------------------------------- 310 | | 311 | | If you use the Encryption class, you must set an encryption key. 312 | | See the user guide for more info. 313 | | 314 | | https://codeigniter.com/user_guide/libraries/encryption.html 315 | | 316 | */ 317 | $config['encryption_key'] = ''; 318 | 319 | /* 320 | |-------------------------------------------------------------------------- 321 | | Session Variables 322 | |-------------------------------------------------------------------------- 323 | | 324 | | 'sess_driver' 325 | | 326 | | The storage driver to use: files, database, redis, memcached 327 | | 328 | | 'sess_cookie_name' 329 | | 330 | | The session cookie name, must contain only [0-9a-z_-] characters 331 | | 332 | | 'sess_expiration' 333 | | 334 | | The number of SECONDS you want the session to last. 335 | | Setting to 0 (zero) means expire when the browser is closed. 336 | | 337 | | 'sess_save_path' 338 | | 339 | | The location to save sessions to, driver dependent. 340 | | 341 | | For the 'files' driver, it's a path to a writable directory. 342 | | WARNING: Only absolute paths are supported! 343 | | 344 | | For the 'database' driver, it's a table name. 345 | | Please read up the manual for the format with other session drivers. 346 | | 347 | | IMPORTANT: You are REQUIRED to set a valid save path! 348 | | 349 | | 'sess_match_ip' 350 | | 351 | | Whether to match the user's IP address when reading the session data. 352 | | 353 | | WARNING: If you're using the database driver, don't forget to update 354 | | your session table's PRIMARY KEY when changing this setting. 355 | | 356 | | 'sess_time_to_update' 357 | | 358 | | How many seconds between CI regenerating the session ID. 359 | | 360 | | 'sess_regenerate_destroy' 361 | | 362 | | Whether to destroy session data associated with the old session ID 363 | | when auto-regenerating the session ID. When set to FALSE, the data 364 | | will be later deleted by the garbage collector. 365 | | 366 | | Other session cookie settings are shared with the rest of the application, 367 | | except for 'cookie_prefix' and 'cookie_httponly', which are ignored here. 368 | | 369 | */ 370 | $config['sess_driver'] = 'files'; 371 | $config['sess_cookie_name'] = 'ci_session'; 372 | $config['sess_expiration'] = 7200; 373 | $config['sess_save_path'] = NULL; 374 | $config['sess_match_ip'] = FALSE; 375 | $config['sess_time_to_update'] = 300; 376 | $config['sess_regenerate_destroy'] = FALSE; 377 | 378 | /* 379 | |-------------------------------------------------------------------------- 380 | | Cookie Related Variables 381 | |-------------------------------------------------------------------------- 382 | | 383 | | 'cookie_prefix' = Set a cookie name prefix if you need to avoid collisions 384 | | 'cookie_domain' = Set to .your-domain.com for site-wide cookies 385 | | 'cookie_path' = Typically will be a forward slash 386 | | 'cookie_secure' = Cookie will only be set if a secure HTTPS connection exists. 387 | | 'cookie_httponly' = Cookie will only be accessible via HTTP(S) (no javascript) 388 | | 389 | | Note: These settings (with the exception of 'cookie_prefix' and 390 | | 'cookie_httponly') will also affect sessions. 391 | | 392 | */ 393 | $config['cookie_prefix'] = ''; 394 | $config['cookie_domain'] = ''; 395 | $config['cookie_path'] = '/'; 396 | $config['cookie_secure'] = FALSE; 397 | $config['cookie_httponly'] = FALSE; 398 | 399 | /* 400 | |-------------------------------------------------------------------------- 401 | | Standardize newlines 402 | |-------------------------------------------------------------------------- 403 | | 404 | | Determines whether to standardize newline characters in input data, 405 | | meaning to replace \r\n, \r, \n occurrences with the PHP_EOL value. 406 | | 407 | | This is particularly useful for portability between UNIX-based OSes, 408 | | (usually \n) and Windows (\r\n). 409 | | 410 | */ 411 | $config['standardize_newlines'] = FALSE; 412 | 413 | /* 414 | |-------------------------------------------------------------------------- 415 | | Global XSS Filtering 416 | |-------------------------------------------------------------------------- 417 | | 418 | | Determines whether the XSS filter is always active when GET, POST or 419 | | COOKIE data is encountered 420 | | 421 | | WARNING: This feature is DEPRECATED and currently available only 422 | | for backwards compatibility purposes! 423 | | 424 | */ 425 | $config['global_xss_filtering'] = FALSE; 426 | 427 | /* 428 | |-------------------------------------------------------------------------- 429 | | Cross Site Request Forgery 430 | |-------------------------------------------------------------------------- 431 | | Enables a CSRF cookie token to be set. When set to TRUE, token will be 432 | | checked on a submitted form. If you are accepting user data, it is strongly 433 | | recommended CSRF protection be enabled. 434 | | 435 | | 'csrf_token_name' = The token name 436 | | 'csrf_cookie_name' = The cookie name 437 | | 'csrf_expire' = The number in seconds the token should expire. 438 | | 'csrf_regenerate' = Regenerate token on every submission 439 | | 'csrf_exclude_uris' = Array of URIs which ignore CSRF checks 440 | */ 441 | $config['csrf_protection'] = FALSE; 442 | $config['csrf_token_name'] = 'csrf_test_name'; 443 | $config['csrf_cookie_name'] = 'csrf_cookie_name'; 444 | $config['csrf_expire'] = 7200; 445 | $config['csrf_regenerate'] = TRUE; 446 | $config['csrf_exclude_uris'] = array(); 447 | 448 | /* 449 | |-------------------------------------------------------------------------- 450 | | Output Compression 451 | |-------------------------------------------------------------------------- 452 | | 453 | | Enables Gzip output compression for faster page loads. When enabled, 454 | | the output class will test whether your server supports Gzip. 455 | | Even if it does, however, not all browsers support compression 456 | | so enable only if you are reasonably sure your visitors can handle it. 457 | | 458 | | Only used if zlib.output_compression is turned off in your php.ini. 459 | | Please do not use it together with httpd-level output compression. 460 | | 461 | | VERY IMPORTANT: If you are getting a blank page when compression is enabled it 462 | | means you are prematurely outputting something to your browser. It could 463 | | even be a line of whitespace at the end of one of your scripts. For 464 | | compression to work, nothing can be sent before the output buffer is called 465 | | by the output class. Do not 'echo' any values with compression enabled. 466 | | 467 | */ 468 | $config['compress_output'] = FALSE; 469 | 470 | /* 471 | |-------------------------------------------------------------------------- 472 | | Master Time Reference 473 | |-------------------------------------------------------------------------- 474 | | 475 | | Options are 'local' or any PHP supported timezone. This preference tells 476 | | the system whether to use your server's local time as the master 'now' 477 | | reference, or convert it to the configured one timezone. See the 'date 478 | | helper' page of the user guide for information regarding date handling. 479 | | 480 | */ 481 | $config['time_reference'] = 'local'; 482 | 483 | /* 484 | |-------------------------------------------------------------------------- 485 | | Rewrite PHP Short Tags 486 | |-------------------------------------------------------------------------- 487 | | 488 | | If your PHP installation does not have short tag support enabled CI 489 | | can rewrite the tags on-the-fly, enabling you to utilize that syntax 490 | | in your view files. Options are TRUE or FALSE (boolean) 491 | | 492 | | Note: You need to have eval() enabled for this to work. 493 | | 494 | */ 495 | $config['rewrite_short_tags'] = FALSE; 496 | 497 | /* 498 | |-------------------------------------------------------------------------- 499 | | Reverse Proxy IPs 500 | |-------------------------------------------------------------------------- 501 | | 502 | | If your server is behind a reverse proxy, you must whitelist the proxy 503 | | IP addresses from which CodeIgniter should trust headers such as 504 | | HTTP_X_FORWARDED_FOR and HTTP_CLIENT_IP in order to properly identify 505 | | the visitor's IP address. 506 | | 507 | | You can use both an array or a comma-separated list of proxy addresses, 508 | | as well as specifying whole subnets. Here are a few examples: 509 | | 510 | | Comma-separated: '10.0.1.200,192.168.5.0/24' 511 | | Array: array('10.0.1.200', '192.168.5.0/24') 512 | */ 513 | $config['proxy_ips'] = ''; 514 | -------------------------------------------------------------------------------- /application/config/constants.php: -------------------------------------------------------------------------------- 1 | db->last_query() and profiling of DB queries. 62 | | When you run a query, with this setting set to TRUE (default), 63 | | CodeIgniter will store the SQL statement for debugging purposes. 64 | | However, this may cause high memory usage, especially if you run 65 | | a lot of SQL queries ... disable this to avoid that problem. 66 | | 67 | | The $active_group variable lets you choose which connection group to 68 | | make active. By default there is only one group (the 'default' group). 69 | | 70 | | The $query_builder variables lets you determine whether or not to load 71 | | the query builder class. 72 | */ 73 | $active_group = 'default'; 74 | $query_builder = TRUE; 75 | 76 | $db['default'] = array( 77 | 'dsn' => '', 78 | 'hostname' => 'localhost', 79 | 'username' => '', 80 | 'password' => '', 81 | 'database' => '', 82 | 'dbdriver' => 'mysqli', 83 | 'dbprefix' => '', 84 | 'pconnect' => FALSE, 85 | 'db_debug' => (ENVIRONMENT !== 'production'), 86 | 'cache_on' => FALSE, 87 | 'cachedir' => '', 88 | 'char_set' => 'utf8', 89 | 'dbcollat' => 'utf8_general_ci', 90 | 'swap_pre' => '', 91 | 'encrypt' => FALSE, 92 | 'compress' => FALSE, 93 | 'stricton' => FALSE, 94 | 'failover' => array(), 95 | 'save_queries' => TRUE 96 | ); 97 | -------------------------------------------------------------------------------- /application/config/doctypes.php: -------------------------------------------------------------------------------- 1 | '', 6 | 'xhtml1-strict' => '', 7 | 'xhtml1-trans' => '', 8 | 'xhtml1-frame' => '', 9 | 'xhtml-basic11' => '', 10 | 'html5' => '', 11 | 'html4-strict' => '', 12 | 'html4-trans' => '', 13 | 'html4-frame' => '', 14 | 'mathml1' => '', 15 | 'mathml2' => '', 16 | 'svg10' => '', 17 | 'svg11' => '', 18 | 'svg11-basic' => '', 19 | 'svg11-tiny' => '', 20 | 'xhtml-math-svg-xh' => '', 21 | 'xhtml-math-svg-sh' => '', 22 | 'xhtml-rdfa-1' => '', 23 | 'xhtml-rdfa-2' => '' 24 | ); 25 | -------------------------------------------------------------------------------- /application/config/foreign_chars.php: -------------------------------------------------------------------------------- 1 | 'ae', 14 | '/ö|œ/' => 'oe', 15 | '/ü/' => 'ue', 16 | '/Ä/' => 'Ae', 17 | '/Ü/' => 'Ue', 18 | '/Ö/' => 'Oe', 19 | '/À|Á|Â|Ã|Ä|Å|Ǻ|Ā|Ă|Ą|Ǎ|Α|Ά|Ả|Ạ|Ầ|Ẫ|Ẩ|Ậ|Ằ|Ắ|Ẵ|Ẳ|Ặ|А/' => 'A', 20 | '/à|á|â|ã|å|ǻ|ā|ă|ą|ǎ|ª|α|ά|ả|ạ|ầ|ấ|ẫ|ẩ|ậ|ằ|ắ|ẵ|ẳ|ặ|а/' => 'a', 21 | '/Б/' => 'B', 22 | '/б/' => 'b', 23 | '/Ç|Ć|Ĉ|Ċ|Č/' => 'C', 24 | '/ç|ć|ĉ|ċ|č/' => 'c', 25 | '/Д/' => 'D', 26 | '/д/' => 'd', 27 | '/Ð|Ď|Đ|Δ/' => 'Dj', 28 | '/ð|ď|đ|δ/' => 'dj', 29 | '/È|É|Ê|Ë|Ē|Ĕ|Ė|Ę|Ě|Ε|Έ|Ẽ|Ẻ|Ẹ|Ề|Ế|Ễ|Ể|Ệ|Е|Э/' => 'E', 30 | '/è|é|ê|ë|ē|ĕ|ė|ę|ě|έ|ε|ẽ|ẻ|ẹ|ề|ế|ễ|ể|ệ|е|э/' => 'e', 31 | '/Ф/' => 'F', 32 | '/ф/' => 'f', 33 | '/Ĝ|Ğ|Ġ|Ģ|Γ|Г|Ґ/' => 'G', 34 | '/ĝ|ğ|ġ|ģ|γ|г|ґ/' => 'g', 35 | '/Ĥ|Ħ/' => 'H', 36 | '/ĥ|ħ/' => 'h', 37 | '/Ì|Í|Î|Ï|Ĩ|Ī|Ĭ|Ǐ|Į|İ|Η|Ή|Ί|Ι|Ϊ|Ỉ|Ị|И|Ы/' => 'I', 38 | '/ì|í|î|ï|ĩ|ī|ĭ|ǐ|į|ı|η|ή|ί|ι|ϊ|ỉ|ị|и|ы|ї/' => 'i', 39 | '/Ĵ/' => 'J', 40 | '/ĵ/' => 'j', 41 | '/Ķ|Κ|К/' => 'K', 42 | '/ķ|κ|к/' => 'k', 43 | '/Ĺ|Ļ|Ľ|Ŀ|Ł|Λ|Л/' => 'L', 44 | '/ĺ|ļ|ľ|ŀ|ł|λ|л/' => 'l', 45 | '/М/' => 'M', 46 | '/м/' => 'm', 47 | '/Ñ|Ń|Ņ|Ň|Ν|Н/' => 'N', 48 | '/ñ|ń|ņ|ň|ʼn|ν|н/' => 'n', 49 | '/Ò|Ó|Ô|Õ|Ō|Ŏ|Ǒ|Ő|Ơ|Ø|Ǿ|Ο|Ό|Ω|Ώ|Ỏ|Ọ|Ồ|Ố|Ỗ|Ổ|Ộ|Ờ|Ớ|Ỡ|Ở|Ợ|О/' => 'O', 50 | '/ò|ó|ô|õ|ō|ŏ|ǒ|ő|ơ|ø|ǿ|º|ο|ό|ω|ώ|ỏ|ọ|ồ|ố|ỗ|ổ|ộ|ờ|ớ|ỡ|ở|ợ|о/' => 'o', 51 | '/П/' => 'P', 52 | '/п/' => 'p', 53 | '/Ŕ|Ŗ|Ř|Ρ|Р/' => 'R', 54 | '/ŕ|ŗ|ř|ρ|р/' => 'r', 55 | '/Ś|Ŝ|Ş|Ș|Š|Σ|С/' => 'S', 56 | '/ś|ŝ|ş|ș|š|ſ|σ|ς|с/' => 's', 57 | '/Ț|Ţ|Ť|Ŧ|τ|Т/' => 'T', 58 | '/ț|ţ|ť|ŧ|т/' => 't', 59 | '/Þ|þ/' => 'th', 60 | '/Ù|Ú|Û|Ũ|Ū|Ŭ|Ů|Ű|Ų|Ư|Ǔ|Ǖ|Ǘ|Ǚ|Ǜ|Ũ|Ủ|Ụ|Ừ|Ứ|Ữ|Ử|Ự|У/' => 'U', 61 | '/ù|ú|û|ũ|ū|ŭ|ů|ű|ų|ư|ǔ|ǖ|ǘ|ǚ|ǜ|υ|ύ|ϋ|ủ|ụ|ừ|ứ|ữ|ử|ự|у/' => 'u', 62 | '/Ý|Ÿ|Ŷ|Υ|Ύ|Ϋ|Ỳ|Ỹ|Ỷ|Ỵ|Й/' => 'Y', 63 | '/ý|ÿ|ŷ|ỳ|ỹ|ỷ|ỵ|й/' => 'y', 64 | '/В/' => 'V', 65 | '/в/' => 'v', 66 | '/Ŵ/' => 'W', 67 | '/ŵ/' => 'w', 68 | '/Ź|Ż|Ž|Ζ|З/' => 'Z', 69 | '/ź|ż|ž|ζ|з/' => 'z', 70 | '/Æ|Ǽ/' => 'AE', 71 | '/ß/' => 'ss', 72 | '/IJ/' => 'IJ', 73 | '/ij/' => 'ij', 74 | '/Œ/' => 'OE', 75 | '/ƒ/' => 'f', 76 | '/ξ/' => 'ks', 77 | '/π/' => 'p', 78 | '/β/' => 'v', 79 | '/μ/' => 'm', 80 | '/ψ/' => 'ps', 81 | '/Ё/' => 'Yo', 82 | '/ё/' => 'yo', 83 | '/Є/' => 'Ye', 84 | '/є/' => 'ye', 85 | '/Ї/' => 'Yi', 86 | '/Ж/' => 'Zh', 87 | '/ж/' => 'zh', 88 | '/Х/' => 'Kh', 89 | '/х/' => 'kh', 90 | '/Ц/' => 'Ts', 91 | '/ц/' => 'ts', 92 | '/Ч/' => 'Ch', 93 | '/ч/' => 'ch', 94 | '/Ш/' => 'Sh', 95 | '/ш/' => 'sh', 96 | '/Щ/' => 'Shch', 97 | '/щ/' => 'shch', 98 | '/Ъ|ъ|Ь|ь/' => '', 99 | '/Ю/' => 'Yu', 100 | '/ю/' => 'yu', 101 | '/Я/' => 'Ya', 102 | '/я/' => 'ya' 103 | ); 104 | -------------------------------------------------------------------------------- /application/config/hooks.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/config/memcached.php: -------------------------------------------------------------------------------- 1 | array( 15 | 'hostname' => '127.0.0.1', 16 | 'port' => '11211', 17 | 'weight' => '1', 18 | ), 19 | ); 20 | -------------------------------------------------------------------------------- /application/config/migration.php: -------------------------------------------------------------------------------- 1 | migration->current() this is the version that schema will 69 | | be upgraded / downgraded to. 70 | | 71 | */ 72 | $config['migration_version'] = 0; 73 | 74 | /* 75 | |-------------------------------------------------------------------------- 76 | | Migrations Path 77 | |-------------------------------------------------------------------------- 78 | | 79 | | Path to your migrations folder. 80 | | Typically, it will be within your application path. 81 | | Also, writing permission is required within the migrations path. 82 | | 83 | */ 84 | $config['migration_path'] = APPPATH.'migrations/'; 85 | -------------------------------------------------------------------------------- /application/config/mimes.php: -------------------------------------------------------------------------------- 1 | array('application/mac-binhex40', 'application/mac-binhex', 'application/x-binhex40', 'application/x-mac-binhex40'), 14 | 'cpt' => 'application/mac-compactpro', 15 | 'csv' => array('text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'application/x-csv', 'text/x-csv', 'text/csv', 'application/csv', 'application/excel', 'application/vnd.msexcel', 'text/plain'), 16 | 'bin' => array('application/macbinary', 'application/mac-binary', 'application/octet-stream', 'application/x-binary', 'application/x-macbinary'), 17 | 'dms' => 'application/octet-stream', 18 | 'lha' => 'application/octet-stream', 19 | 'lzh' => 'application/octet-stream', 20 | 'exe' => array('application/octet-stream', 'application/x-msdownload'), 21 | 'class' => 'application/octet-stream', 22 | 'psd' => array('application/x-photoshop', 'image/vnd.adobe.photoshop'), 23 | 'so' => 'application/octet-stream', 24 | 'sea' => 'application/octet-stream', 25 | 'dll' => 'application/octet-stream', 26 | 'oda' => 'application/oda', 27 | 'pdf' => array('application/pdf', 'application/force-download', 'application/x-download', 'binary/octet-stream'), 28 | 'ai' => array('application/pdf', 'application/postscript'), 29 | 'eps' => 'application/postscript', 30 | 'ps' => 'application/postscript', 31 | 'smi' => 'application/smil', 32 | 'smil' => 'application/smil', 33 | 'mif' => 'application/vnd.mif', 34 | 'xls' => array('application/vnd.ms-excel', 'application/msexcel', 'application/x-msexcel', 'application/x-ms-excel', 'application/x-excel', 'application/x-dos_ms_excel', 'application/xls', 'application/x-xls', 'application/excel', 'application/download', 'application/vnd.ms-office', 'application/msword'), 35 | 'ppt' => array('application/powerpoint', 'application/vnd.ms-powerpoint', 'application/vnd.ms-office', 'application/msword'), 36 | 'pptx' => array('application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/x-zip', 'application/zip'), 37 | 'wbxml' => 'application/wbxml', 38 | 'wmlc' => 'application/wmlc', 39 | 'dcr' => 'application/x-director', 40 | 'dir' => 'application/x-director', 41 | 'dxr' => 'application/x-director', 42 | 'dvi' => 'application/x-dvi', 43 | 'gtar' => 'application/x-gtar', 44 | 'gz' => 'application/x-gzip', 45 | 'gzip' => 'application/x-gzip', 46 | 'php' => array('application/x-httpd-php', 'application/php', 'application/x-php', 'text/php', 'text/x-php', 'application/x-httpd-php-source'), 47 | 'php4' => 'application/x-httpd-php', 48 | 'php3' => 'application/x-httpd-php', 49 | 'phtml' => 'application/x-httpd-php', 50 | 'phps' => 'application/x-httpd-php-source', 51 | 'js' => array('application/x-javascript', 'text/plain'), 52 | 'swf' => 'application/x-shockwave-flash', 53 | 'sit' => 'application/x-stuffit', 54 | 'tar' => 'application/x-tar', 55 | 'tgz' => array('application/x-tar', 'application/x-gzip-compressed'), 56 | 'z' => 'application/x-compress', 57 | 'xhtml' => 'application/xhtml+xml', 58 | 'xht' => 'application/xhtml+xml', 59 | 'zip' => array('application/x-zip', 'application/zip', 'application/x-zip-compressed', 'application/s-compressed', 'multipart/x-zip'), 60 | 'rar' => array('application/x-rar', 'application/rar', 'application/x-rar-compressed'), 61 | 'mid' => 'audio/midi', 62 | 'midi' => 'audio/midi', 63 | 'mpga' => 'audio/mpeg', 64 | 'mp2' => 'audio/mpeg', 65 | 'mp3' => array('audio/mpeg', 'audio/mpg', 'audio/mpeg3', 'audio/mp3'), 66 | 'aif' => array('audio/x-aiff', 'audio/aiff'), 67 | 'aiff' => array('audio/x-aiff', 'audio/aiff'), 68 | 'aifc' => 'audio/x-aiff', 69 | 'ram' => 'audio/x-pn-realaudio', 70 | 'rm' => 'audio/x-pn-realaudio', 71 | 'rpm' => 'audio/x-pn-realaudio-plugin', 72 | 'ra' => 'audio/x-realaudio', 73 | 'rv' => 'video/vnd.rn-realvideo', 74 | 'wav' => array('audio/x-wav', 'audio/wave', 'audio/wav'), 75 | 'bmp' => array('image/bmp', 'image/x-bmp', 'image/x-bitmap', 'image/x-xbitmap', 'image/x-win-bitmap', 'image/x-windows-bmp', 'image/ms-bmp', 'image/x-ms-bmp', 'application/bmp', 'application/x-bmp', 'application/x-win-bitmap'), 76 | 'gif' => 'image/gif', 77 | 'jpeg' => array('image/jpeg', 'image/pjpeg'), 78 | 'jpg' => array('image/jpeg', 'image/pjpeg'), 79 | 'jpe' => array('image/jpeg', 'image/pjpeg'), 80 | 'jp2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), 81 | 'j2k' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), 82 | 'jpf' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), 83 | 'jpg2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), 84 | 'jpx' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), 85 | 'jpm' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), 86 | 'mj2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), 87 | 'mjp2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), 88 | 'png' => array('image/png', 'image/x-png'), 89 | 'tiff' => 'image/tiff', 90 | 'tif' => 'image/tiff', 91 | 'css' => array('text/css', 'text/plain'), 92 | 'html' => array('text/html', 'text/plain'), 93 | 'htm' => array('text/html', 'text/plain'), 94 | 'shtml' => array('text/html', 'text/plain'), 95 | 'txt' => 'text/plain', 96 | 'text' => 'text/plain', 97 | 'log' => array('text/plain', 'text/x-log'), 98 | 'rtx' => 'text/richtext', 99 | 'rtf' => 'text/rtf', 100 | 'xml' => array('application/xml', 'text/xml', 'text/plain'), 101 | 'xsl' => array('application/xml', 'text/xsl', 'text/xml'), 102 | 'mpeg' => 'video/mpeg', 103 | 'mpg' => 'video/mpeg', 104 | 'mpe' => 'video/mpeg', 105 | 'qt' => 'video/quicktime', 106 | 'mov' => 'video/quicktime', 107 | 'avi' => array('video/x-msvideo', 'video/msvideo', 'video/avi', 'application/x-troff-msvideo'), 108 | 'movie' => 'video/x-sgi-movie', 109 | 'doc' => array('application/msword', 'application/vnd.ms-office'), 110 | 'docx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip', 'application/msword', 'application/x-zip'), 111 | 'dot' => array('application/msword', 'application/vnd.ms-office'), 112 | 'dotx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip', 'application/msword'), 113 | 'xlsx' => array('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/zip', 'application/vnd.ms-excel', 'application/msword', 'application/x-zip'), 114 | 'word' => array('application/msword', 'application/octet-stream'), 115 | 'xl' => 'application/excel', 116 | 'eml' => 'message/rfc822', 117 | 'json' => array('application/json', 'text/json'), 118 | 'pem' => array('application/x-x509-user-cert', 'application/x-pem-file', 'application/octet-stream'), 119 | 'p10' => array('application/x-pkcs10', 'application/pkcs10'), 120 | 'p12' => 'application/x-pkcs12', 121 | 'p7a' => 'application/x-pkcs7-signature', 122 | 'p7c' => array('application/pkcs7-mime', 'application/x-pkcs7-mime'), 123 | 'p7m' => array('application/pkcs7-mime', 'application/x-pkcs7-mime'), 124 | 'p7r' => 'application/x-pkcs7-certreqresp', 125 | 'p7s' => 'application/pkcs7-signature', 126 | 'crt' => array('application/x-x509-ca-cert', 'application/x-x509-user-cert', 'application/pkix-cert'), 127 | 'crl' => array('application/pkix-crl', 'application/pkcs-crl'), 128 | 'der' => 'application/x-x509-ca-cert', 129 | 'kdb' => 'application/octet-stream', 130 | 'pgp' => 'application/pgp', 131 | 'gpg' => 'application/gpg-keys', 132 | 'sst' => 'application/octet-stream', 133 | 'csr' => 'application/octet-stream', 134 | 'rsa' => 'application/x-pkcs7', 135 | 'cer' => array('application/pkix-cert', 'application/x-x509-ca-cert'), 136 | '3g2' => 'video/3gpp2', 137 | '3gp' => array('video/3gp', 'video/3gpp'), 138 | 'mp4' => 'video/mp4', 139 | 'm4a' => 'audio/x-m4a', 140 | 'f4v' => array('video/mp4', 'video/x-f4v'), 141 | 'flv' => 'video/x-flv', 142 | 'webm' => 'video/webm', 143 | 'aac' => 'audio/x-acc', 144 | 'm4u' => 'application/vnd.mpegurl', 145 | 'm3u' => 'text/plain', 146 | 'xspf' => 'application/xspf+xml', 147 | 'vlc' => 'application/videolan', 148 | 'wmv' => array('video/x-ms-wmv', 'video/x-ms-asf'), 149 | 'au' => 'audio/x-au', 150 | 'ac3' => 'audio/ac3', 151 | 'flac' => 'audio/x-flac', 152 | 'ogg' => array('audio/ogg', 'video/ogg', 'application/ogg'), 153 | 'kmz' => array('application/vnd.google-earth.kmz', 'application/zip', 'application/x-zip'), 154 | 'kml' => array('application/vnd.google-earth.kml+xml', 'application/xml', 'text/xml'), 155 | 'ics' => 'text/calendar', 156 | 'ical' => 'text/calendar', 157 | 'zsh' => 'text/x-scriptzsh', 158 | '7zip' => array('application/x-compressed', 'application/x-zip-compressed', 'application/zip', 'multipart/x-zip'), 159 | 'cdr' => array('application/cdr', 'application/coreldraw', 'application/x-cdr', 'application/x-coreldraw', 'image/cdr', 'image/x-cdr', 'zz-application/zz-winassoc-cdr'), 160 | 'wma' => array('audio/x-ms-wma', 'video/x-ms-asf'), 161 | 'jar' => array('application/java-archive', 'application/x-java-application', 'application/x-jar', 'application/x-compressed'), 162 | 'svg' => array('image/svg+xml', 'application/xml', 'text/xml'), 163 | 'vcf' => 'text/x-vcard', 164 | 'srt' => array('text/srt', 'text/plain'), 165 | 'vtt' => array('text/vtt', 'text/plain'), 166 | 'ico' => array('image/x-icon', 'image/x-ico', 'image/vnd.microsoft.icon') 167 | ); 168 | -------------------------------------------------------------------------------- /application/config/profiler.php: -------------------------------------------------------------------------------- 1 | my_controller/index 50 | | my-controller/my-method -> my_controller/my_method 51 | */ 52 | $route['default_controller'] = 'welcome'; 53 | $route['404_override'] = ''; 54 | $route['translate_uri_dashes'] = FALSE; 55 | -------------------------------------------------------------------------------- /application/config/smileys.php: -------------------------------------------------------------------------------- 1 | array('grin.gif', '19', '19', 'grin'), 21 | ':lol:' => array('lol.gif', '19', '19', 'LOL'), 22 | ':cheese:' => array('cheese.gif', '19', '19', 'cheese'), 23 | ':)' => array('smile.gif', '19', '19', 'smile'), 24 | ';-)' => array('wink.gif', '19', '19', 'wink'), 25 | ';)' => array('wink.gif', '19', '19', 'wink'), 26 | ':smirk:' => array('smirk.gif', '19', '19', 'smirk'), 27 | ':roll:' => array('rolleyes.gif', '19', '19', 'rolleyes'), 28 | ':-S' => array('confused.gif', '19', '19', 'confused'), 29 | ':wow:' => array('surprise.gif', '19', '19', 'surprised'), 30 | ':bug:' => array('bigsurprise.gif', '19', '19', 'big surprise'), 31 | ':-P' => array('tongue_laugh.gif', '19', '19', 'tongue laugh'), 32 | '%-P' => array('tongue_rolleye.gif', '19', '19', 'tongue rolleye'), 33 | ';-P' => array('tongue_wink.gif', '19', '19', 'tongue wink'), 34 | ':P' => array('raspberry.gif', '19', '19', 'raspberry'), 35 | ':blank:' => array('blank.gif', '19', '19', 'blank stare'), 36 | ':long:' => array('longface.gif', '19', '19', 'long face'), 37 | ':ohh:' => array('ohh.gif', '19', '19', 'ohh'), 38 | ':grrr:' => array('grrr.gif', '19', '19', 'grrr'), 39 | ':gulp:' => array('gulp.gif', '19', '19', 'gulp'), 40 | '8-/' => array('ohoh.gif', '19', '19', 'oh oh'), 41 | ':down:' => array('downer.gif', '19', '19', 'downer'), 42 | ':red:' => array('embarrassed.gif', '19', '19', 'red face'), 43 | ':sick:' => array('sick.gif', '19', '19', 'sick'), 44 | ':shut:' => array('shuteye.gif', '19', '19', 'shut eye'), 45 | ':-/' => array('hmm.gif', '19', '19', 'hmmm'), 46 | '>:(' => array('mad.gif', '19', '19', 'mad'), 47 | ':mad:' => array('mad.gif', '19', '19', 'mad'), 48 | '>:-(' => array('angry.gif', '19', '19', 'angry'), 49 | ':angry:' => array('angry.gif', '19', '19', 'angry'), 50 | ':zip:' => array('zip.gif', '19', '19', 'zipper'), 51 | ':kiss:' => array('kiss.gif', '19', '19', 'kiss'), 52 | ':ahhh:' => array('shock.gif', '19', '19', 'shock'), 53 | ':coolsmile:' => array('shade_smile.gif', '19', '19', 'cool smile'), 54 | ':coolsmirk:' => array('shade_smirk.gif', '19', '19', 'cool smirk'), 55 | ':coolgrin:' => array('shade_grin.gif', '19', '19', 'cool grin'), 56 | ':coolhmm:' => array('shade_hmm.gif', '19', '19', 'cool hmm'), 57 | ':coolmad:' => array('shade_mad.gif', '19', '19', 'cool mad'), 58 | ':coolcheese:' => array('shade_cheese.gif', '19', '19', 'cool cheese'), 59 | ':vampire:' => array('vampire.gif', '19', '19', 'vampire'), 60 | ':snake:' => array('snake.gif', '19', '19', 'snake'), 61 | ':exclaim:' => array('exclaim.gif', '19', '19', 'exclaim'), 62 | ':question:' => array('question.gif', '19', '19', 'question') 63 | 64 | ); 65 | -------------------------------------------------------------------------------- /application/config/user_agents.php: -------------------------------------------------------------------------------- 1 | 'Windows 10', 15 | 'windows nt 6.3' => 'Windows 8.1', 16 | 'windows nt 6.2' => 'Windows 8', 17 | 'windows nt 6.1' => 'Windows 7', 18 | 'windows nt 6.0' => 'Windows Vista', 19 | 'windows nt 5.2' => 'Windows 2003', 20 | 'windows nt 5.1' => 'Windows XP', 21 | 'windows nt 5.0' => 'Windows 2000', 22 | 'windows nt 4.0' => 'Windows NT 4.0', 23 | 'winnt4.0' => 'Windows NT 4.0', 24 | 'winnt 4.0' => 'Windows NT', 25 | 'winnt' => 'Windows NT', 26 | 'windows 98' => 'Windows 98', 27 | 'win98' => 'Windows 98', 28 | 'windows 95' => 'Windows 95', 29 | 'win95' => 'Windows 95', 30 | 'windows phone' => 'Windows Phone', 31 | 'windows' => 'Unknown Windows OS', 32 | 'android' => 'Android', 33 | 'blackberry' => 'BlackBerry', 34 | 'iphone' => 'iOS', 35 | 'ipad' => 'iOS', 36 | 'ipod' => 'iOS', 37 | 'os x' => 'Mac OS X', 38 | 'ppc mac' => 'Power PC Mac', 39 | 'freebsd' => 'FreeBSD', 40 | 'ppc' => 'Macintosh', 41 | 'linux' => 'Linux', 42 | 'debian' => 'Debian', 43 | 'sunos' => 'Sun Solaris', 44 | 'beos' => 'BeOS', 45 | 'apachebench' => 'ApacheBench', 46 | 'aix' => 'AIX', 47 | 'irix' => 'Irix', 48 | 'osf' => 'DEC OSF', 49 | 'hp-ux' => 'HP-UX', 50 | 'netbsd' => 'NetBSD', 51 | 'bsdi' => 'BSDi', 52 | 'openbsd' => 'OpenBSD', 53 | 'gnu' => 'GNU/Linux', 54 | 'unix' => 'Unknown Unix OS', 55 | 'symbian' => 'Symbian OS' 56 | ); 57 | 58 | 59 | // The order of this array should NOT be changed. Many browsers return 60 | // multiple browser types so we want to identify the sub-type first. 61 | $browsers = array( 62 | 'OPR' => 'Opera', 63 | 'Flock' => 'Flock', 64 | 'Edge' => 'Spartan', 65 | 'Chrome' => 'Chrome', 66 | // Opera 10+ always reports Opera/9.80 and appends Version/ to the user agent string 67 | 'Opera.*?Version' => 'Opera', 68 | 'Opera' => 'Opera', 69 | 'MSIE' => 'Internet Explorer', 70 | 'Internet Explorer' => 'Internet Explorer', 71 | 'Trident.* rv' => 'Internet Explorer', 72 | 'Shiira' => 'Shiira', 73 | 'Firefox' => 'Firefox', 74 | 'Chimera' => 'Chimera', 75 | 'Phoenix' => 'Phoenix', 76 | 'Firebird' => 'Firebird', 77 | 'Camino' => 'Camino', 78 | 'Netscape' => 'Netscape', 79 | 'OmniWeb' => 'OmniWeb', 80 | 'Safari' => 'Safari', 81 | 'Mozilla' => 'Mozilla', 82 | 'Konqueror' => 'Konqueror', 83 | 'icab' => 'iCab', 84 | 'Lynx' => 'Lynx', 85 | 'Links' => 'Links', 86 | 'hotjava' => 'HotJava', 87 | 'amaya' => 'Amaya', 88 | 'IBrowse' => 'IBrowse', 89 | 'Maxthon' => 'Maxthon', 90 | 'Ubuntu' => 'Ubuntu Web Browser' 91 | ); 92 | 93 | $mobiles = array( 94 | // legacy array, old values commented out 95 | 'mobileexplorer' => 'Mobile Explorer', 96 | // 'openwave' => 'Open Wave', 97 | // 'opera mini' => 'Opera Mini', 98 | // 'operamini' => 'Opera Mini', 99 | // 'elaine' => 'Palm', 100 | 'palmsource' => 'Palm', 101 | // 'digital paths' => 'Palm', 102 | // 'avantgo' => 'Avantgo', 103 | // 'xiino' => 'Xiino', 104 | 'palmscape' => 'Palmscape', 105 | // 'nokia' => 'Nokia', 106 | // 'ericsson' => 'Ericsson', 107 | // 'blackberry' => 'BlackBerry', 108 | // 'motorola' => 'Motorola' 109 | 110 | // Phones and Manufacturers 111 | 'motorola' => 'Motorola', 112 | 'nokia' => 'Nokia', 113 | 'palm' => 'Palm', 114 | 'iphone' => 'Apple iPhone', 115 | 'ipad' => 'iPad', 116 | 'ipod' => 'Apple iPod Touch', 117 | 'sony' => 'Sony Ericsson', 118 | 'ericsson' => 'Sony Ericsson', 119 | 'blackberry' => 'BlackBerry', 120 | 'cocoon' => 'O2 Cocoon', 121 | 'blazer' => 'Treo', 122 | 'lg' => 'LG', 123 | 'amoi' => 'Amoi', 124 | 'xda' => 'XDA', 125 | 'mda' => 'MDA', 126 | 'vario' => 'Vario', 127 | 'htc' => 'HTC', 128 | 'samsung' => 'Samsung', 129 | 'sharp' => 'Sharp', 130 | 'sie-' => 'Siemens', 131 | 'alcatel' => 'Alcatel', 132 | 'benq' => 'BenQ', 133 | 'ipaq' => 'HP iPaq', 134 | 'mot-' => 'Motorola', 135 | 'playstation portable' => 'PlayStation Portable', 136 | 'playstation 3' => 'PlayStation 3', 137 | 'playstation vita' => 'PlayStation Vita', 138 | 'hiptop' => 'Danger Hiptop', 139 | 'nec-' => 'NEC', 140 | 'panasonic' => 'Panasonic', 141 | 'philips' => 'Philips', 142 | 'sagem' => 'Sagem', 143 | 'sanyo' => 'Sanyo', 144 | 'spv' => 'SPV', 145 | 'zte' => 'ZTE', 146 | 'sendo' => 'Sendo', 147 | 'nintendo dsi' => 'Nintendo DSi', 148 | 'nintendo ds' => 'Nintendo DS', 149 | 'nintendo 3ds' => 'Nintendo 3DS', 150 | 'wii' => 'Nintendo Wii', 151 | 'open web' => 'Open Web', 152 | 'openweb' => 'OpenWeb', 153 | 154 | // Operating Systems 155 | 'android' => 'Android', 156 | 'symbian' => 'Symbian', 157 | 'SymbianOS' => 'SymbianOS', 158 | 'elaine' => 'Palm', 159 | 'series60' => 'Symbian S60', 160 | 'windows ce' => 'Windows CE', 161 | 162 | // Browsers 163 | 'obigo' => 'Obigo', 164 | 'netfront' => 'Netfront Browser', 165 | 'openwave' => 'Openwave Browser', 166 | 'mobilexplorer' => 'Mobile Explorer', 167 | 'operamini' => 'Opera Mini', 168 | 'opera mini' => 'Opera Mini', 169 | 'opera mobi' => 'Opera Mobile', 170 | 'fennec' => 'Firefox Mobile', 171 | 172 | // Other 173 | 'digital paths' => 'Digital Paths', 174 | 'avantgo' => 'AvantGo', 175 | 'xiino' => 'Xiino', 176 | 'novarra' => 'Novarra Transcoder', 177 | 'vodafone' => 'Vodafone', 178 | 'docomo' => 'NTT DoCoMo', 179 | 'o2' => 'O2', 180 | 181 | // Fallback 182 | 'mobile' => 'Generic Mobile', 183 | 'wireless' => 'Generic Mobile', 184 | 'j2me' => 'Generic Mobile', 185 | 'midp' => 'Generic Mobile', 186 | 'cldc' => 'Generic Mobile', 187 | 'up.link' => 'Generic Mobile', 188 | 'up.browser' => 'Generic Mobile', 189 | 'smartphone' => 'Generic Mobile', 190 | 'cellphone' => 'Generic Mobile' 191 | ); 192 | 193 | // There are hundreds of bots but these are the most common. 194 | $robots = array( 195 | 'googlebot' => 'Googlebot', 196 | 'msnbot' => 'MSNBot', 197 | 'baiduspider' => 'Baiduspider', 198 | 'bingbot' => 'Bing', 199 | 'slurp' => 'Inktomi Slurp', 200 | 'yahoo' => 'Yahoo', 201 | 'ask jeeves' => 'Ask Jeeves', 202 | 'fastcrawler' => 'FastCrawler', 203 | 'infoseek' => 'InfoSeek Robot 1.0', 204 | 'lycos' => 'Lycos', 205 | 'yandex' => 'YandexBot', 206 | 'mediapartners-google' => 'MediaPartners Google', 207 | 'CRAZYWEBCRAWLER' => 'Crazy Webcrawler', 208 | 'adsbot-google' => 'AdsBot Google', 209 | 'feedfetcher-google' => 'Feedfetcher Google', 210 | 'curious george' => 'Curious George' 211 | ); 212 | -------------------------------------------------------------------------------- /application/controllers/Sample.php: -------------------------------------------------------------------------------- 1 | load->view('sample/index'); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /application/controllers/Welcome.php: -------------------------------------------------------------------------------- 1 | 19 | * @see https://codeigniter.com/user_guide/general/urls.html 20 | */ 21 | public function index() 22 | { 23 | $this->load->view('welcome_message'); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /application/controllers/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/core/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/helpers/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/helpers/widget_helper.php: -------------------------------------------------------------------------------- 1 | 6 | * @license MIT License 7 | * @copyright 2016 Kenji Suzuki 8 | * @link https://github.com/kenjis/codeigniter-widgets 9 | */ 10 | 11 | /** 12 | * Widget helper 13 | * 14 | * @staticvar Myth\Bay\Bay $bay 15 | * @param string $library Widget library and method 16 | * @param array $params Params for the method 17 | * @param int $cache_ttl Time to live (in minutes) 18 | * @param string $cache_name Cache name 19 | * @return string 20 | */ 21 | function widget($library, $params = null, $cache_ttl = 0, $cache_name = null) 22 | { 23 | static $bay; 24 | 25 | if ($bay === null) 26 | { 27 | $CI =& get_instance(); 28 | $CI->load->driver('cache', array('adapter' => 'file')); 29 | 30 | $bay = new Myth\Bay\Bay( 31 | new Myth\Bay\CI3Finder(), 32 | new Myth\Bay\CI3Cache() 33 | ); 34 | } 35 | 36 | return $bay->display($library, $params, $cache_name, $cache_ttl); 37 | } 38 | -------------------------------------------------------------------------------- /application/hooks/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/language/english/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/language/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/libraries/Blog_widget.php: -------------------------------------------------------------------------------- 1 | load->view('blog/list_latest'); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /application/libraries/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/models/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/third_party/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/views/blog/list_latest.php: -------------------------------------------------------------------------------- 1 | Here is `views/blog/list_latest.php`. 2 | -------------------------------------------------------------------------------- /application/views/errors/cli/error_404.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | An uncaught Exception was encountered 4 | 5 | Type: 6 | Message: 7 | Filename: getFile(), "\n"; ?> 8 | Line Number: getLine(); ?> 9 | 10 | 11 | 12 | Backtrace: 13 | getTrace() as $error): ?> 14 | 15 | File: 16 | Line: 17 | Function: 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /application/views/errors/cli/error_general.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | A PHP Error was encountered 4 | 5 | Severity: 6 | Message: 7 | Filename: 8 | Line Number: 9 | 10 | 11 | 12 | Backtrace: 13 | 14 | 15 | File: 16 | Line: 17 | Function: 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /application/views/errors/cli/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/views/errors/html/error_404.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 404 Page Not Found 8 | 57 | 58 | 59 |
60 |

61 | 62 |
63 | 64 | -------------------------------------------------------------------------------- /application/views/errors/html/error_db.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | Database Error 8 | 57 | 58 | 59 |
60 |

61 | 62 |
63 | 64 | -------------------------------------------------------------------------------- /application/views/errors/html/error_exception.php: -------------------------------------------------------------------------------- 1 | 4 | 5 |
6 | 7 |

An uncaught Exception was encountered

8 | 9 |

Type:

10 |

Message:

11 |

Filename: getFile(); ?>

12 |

Line Number: getLine(); ?>

13 | 14 | 15 | 16 |

Backtrace:

17 | getTrace() as $error): ?> 18 | 19 | 20 | 21 |

22 | File:
23 | Line:
24 | Function: 25 |

26 | 27 | 28 | 29 | 30 | 31 | 32 |
-------------------------------------------------------------------------------- /application/views/errors/html/error_general.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | Error 8 | 57 | 58 | 59 |
60 |

61 | 62 |
63 | 64 | -------------------------------------------------------------------------------- /application/views/errors/html/error_php.php: -------------------------------------------------------------------------------- 1 | 4 | 5 |
6 | 7 |

A PHP Error was encountered

8 | 9 |

Severity:

10 |

Message:

11 |

Filename:

12 |

Line Number:

13 | 14 | 15 | 16 |

Backtrace:

17 | 18 | 19 | 20 | 21 |

22 | File:
23 | Line:
24 | Function: 25 |

26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 |
-------------------------------------------------------------------------------- /application/views/errors/html/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/views/errors/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/views/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/views/sample/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Widget Samlpe 5 | 6 | 7 | 8 |
9 | Here is `views/sample/index.php`. 10 |
11 | 12 |
13 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /application/views/welcome_message.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | Welcome to CodeIgniter 8 | 9 | 67 | 68 | 69 | 70 |
71 |

Welcome to CodeIgniter!

72 | 73 |
74 |

The page you are looking at is being generated dynamically by CodeIgniter.

75 | 76 |

If you would like to edit this page you'll find it located at:

77 | application/views/welcome_message.php 78 | 79 |

The corresponding controller for this page is found at:

80 | application/controllers/Welcome.php 81 | 82 |

If you are exploring CodeIgniter for the very first time, you should start by reading the User Guide.

83 |
84 | 85 | 86 |
87 | 88 | 89 | -------------------------------------------------------------------------------- /bin/.placeholder: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kenjis/codeigniter-widgets/c5c9b2d5be5d0cc0459a5280af931d72b32f0594/bin/.placeholder -------------------------------------------------------------------------------- /bin/check-diff.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ## Part of CodeIgniter Composer Installer 4 | ## 5 | ## @author Kenji Suzuki 6 | ## @license MIT License 7 | ## @copyright 2015 Kenji Suzuki 8 | ## @link https://github.com/kenjis/codeigniter-composer-installer 9 | 10 | cd `dirname $0` 11 | cd .. 12 | 13 | diff -urN vendor/codeigniter/framework/application application 14 | diff -u vendor/codeigniter/framework/index.php public/index.php 15 | -------------------------------------------------------------------------------- /bin/install.php: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | install($package, $version); 10 | } else { 11 | echo $installer->usage($argv[0]); 12 | } 13 | 14 | 15 | class Installer 16 | { 17 | protected $tmp_dir; 18 | protected $packages = array(); 19 | 20 | public function __construct() { 21 | $this->tmp_dir = __DIR__ . '/tmp'; 22 | @mkdir($this->tmp_dir); 23 | 24 | $this->packages = [ 25 | 'translations' => array( 26 | 'site' => 'github', 27 | 'user' => 'bcit-ci', 28 | 'repos' => 'codeigniter3-translations', 29 | 'name' => 'Translations for CodeIgniter System Messages', 30 | 'dir' => 'language', 31 | ), 32 | 'matches-cli' => array( 33 | 'site' => 'github', 34 | 'user' => 'avenirer', 35 | 'repos' => 'codeigniter-matches-cli', 36 | 'name' => 'Codeigniter Matches CLI', 37 | 'dir' => array('config', 'controllers', 'views'), 38 | 'msg' => 'See http://avenirer.github.io/codeigniter-matches-cli/', 39 | ), 40 | 'hmvc-modules' => array( 41 | 'site' => 'github', 42 | 'user' => 'jenssegers', 43 | 'repos' => 'codeigniter-hmvc-modules', 44 | 'name' => 'CodeIgniter HMVC Modules (jenssegers)', 45 | 'dir' => array('core', 'third_party'), 46 | 'msg' => 'See https://github.com/jenssegers/codeigniter-hmvc-modules#installation', 47 | ), 48 | 'modular-extensions-hmvc' => array( 49 | 'site' => 'bitbucket', 50 | 'user' => 'wiredesignz', 51 | 'repos' => 'codeigniter-modular-extensions-hmvc', 52 | 'name' => 'Modular Extensions - HMVC (wiredesignz)', 53 | 'dir' => array('core', 'third_party'), 54 | 'msg' => 'See https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc', 55 | ), 56 | 'ion-auth' => array( 57 | 'site' => 'github', 58 | 'user' => 'benedmunds', 59 | 'repos' => 'CodeIgniter-Ion-Auth', 60 | 'name' => 'Codeigniter Ion Auth', 61 | 'dir' => array( 62 | 'config', 'controllers', 'language', 'libraries', 63 | 'migrations', 'models', 'sql', 'views' 64 | ), 65 | 'msg' => 'See http://benedmunds.com/ion_auth/', 66 | ), 67 | 'filename-checker' => array( 68 | 'site' => 'github', 69 | 'user' => 'kenjis', 70 | 'repos' => 'codeigniter3-filename-checker', 71 | 'name' => 'CodeIgniter3 Filename Checker', 72 | 'dir' => 'controllers', 73 | 'msg' => 'See https://github.com/kenjis/codeigniter3-filename-checker', 74 | ), 75 | ]; 76 | } 77 | 78 | public function usage($self) 79 | { 80 | $msg = 'You can install:' . PHP_EOL; 81 | 82 | foreach ($this->packages as $key => $value) { 83 | $msg .= ' ' . $value['name'] . ' (' . $key . ')' . PHP_EOL; 84 | } 85 | 86 | $msg .= PHP_EOL; 87 | $msg .= 'Usage:' . PHP_EOL; 88 | $msg .= ' php install.php ' . PHP_EOL; 89 | $msg .= PHP_EOL; 90 | $msg .= 'Examples:' . PHP_EOL; 91 | $msg .= " php $self translations 3.0.0" . PHP_EOL; 92 | $msg .= " php $self translations develop" . PHP_EOL; 93 | $msg .= " php $self matches-cli master" . PHP_EOL; 94 | $msg .= " php $self hmvc-modules master" . PHP_EOL; 95 | $msg .= " php $self modular-extensions-hmvc codeigniter-3.x" . PHP_EOL; 96 | $msg .= " php $self ion-auth 2" . PHP_EOL; 97 | $msg .= " php $self filename-checker master" . PHP_EOL; 98 | 99 | return $msg; 100 | } 101 | 102 | public function install($package, $version) 103 | { 104 | if (! isset($this->packages[$package])) 105 | { 106 | return 'Error! no such package: ' . $package . PHP_EOL; 107 | } 108 | 109 | // github 110 | if ($this->packages[$package]['site'] === 'github') { 111 | $method = 'downloadFromGithub'; 112 | } elseif ($this->packages[$package]['site'] === 'bitbucket') { 113 | $method = 'downloadFromBitbucket'; 114 | } else { 115 | throw new LogicException( 116 | 'Error! no such repos type: ' . $this->packages[$package]['site'] 117 | ); 118 | } 119 | 120 | list($src, $dst) = $this->$method($package, $version); 121 | 122 | $this->recursiveCopy($src, $dst); 123 | $this->recursiveUnlink($this->tmp_dir); 124 | 125 | $msg = 'Installed: ' . $package .PHP_EOL; 126 | if (isset($this->packages[$package]['msg'])) { 127 | $msg .= $this->packages[$package]['msg'] . PHP_EOL; 128 | } 129 | return $msg; 130 | } 131 | 132 | private function downloadFromGithub($package, $version) 133 | { 134 | $user = $this->packages[$package]['user']; 135 | $repos = $this->packages[$package]['repos']; 136 | $url = "https://github.com/$user/$repos/archive/$version.zip"; 137 | $filepath = $this->download($url); 138 | $this->unzip($filepath); 139 | 140 | $dir = $this->packages[$package]['dir']; 141 | 142 | if (is_string($dir)) { 143 | $src = realpath(dirname($filepath) . "/$repos-$version/$dir"); 144 | $dst = realpath(__DIR__ . "/../application/$dir"); 145 | return [$src, $dst]; 146 | } 147 | 148 | foreach ($dir as $directory) { 149 | $src[] = realpath(dirname($filepath) . "/$repos-$version/$directory"); 150 | @mkdir(__DIR__ . "/../application/$directory"); 151 | $dst[] = realpath(__DIR__ . "/../application/$directory"); 152 | } 153 | return [$src, $dst]; 154 | } 155 | 156 | private function downloadFromBitbucket($package, $version) 157 | { 158 | $user = $this->packages[$package]['user']; 159 | $repos = $this->packages[$package]['repos']; 160 | // https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc/get/codeigniter-3.x.zip 161 | $url = "https://bitbucket.org/$user/$repos/get/$version.zip"; 162 | $filepath = $this->download($url); 163 | $dirname = $this->unzip($filepath); 164 | 165 | $dir = $this->packages[$package]['dir']; 166 | 167 | if (is_string($dir)) { 168 | $src = realpath(dirname($filepath) . "/$dirname/$dir"); 169 | $dst = realpath(__DIR__ . "/../application/$dir"); 170 | return [$src, $dst]; 171 | } 172 | 173 | foreach ($dir as $directory) { 174 | $src[] = realpath(dirname($filepath) . "/$dirname/$directory"); 175 | @mkdir(__DIR__ . "/../application/$directory"); 176 | $dst[] = realpath(__DIR__ . "/../application/$directory"); 177 | } 178 | return [$src, $dst]; 179 | } 180 | 181 | private function download($url) 182 | { 183 | $file = file_get_contents($url); 184 | if ($file === false) { 185 | throw new RuntimeException("Can't download: $url"); 186 | } 187 | echo 'Downloaded: ' . $url . PHP_EOL; 188 | 189 | $urls = parse_url($url); 190 | $filepath = $this->tmp_dir . '/' . basename($urls['path']); 191 | file_put_contents($filepath, $file); 192 | 193 | return $filepath; 194 | } 195 | 196 | private function unzip($filepath) 197 | { 198 | $zip = new ZipArchive(); 199 | if ($zip->open($filepath) === TRUE) { 200 | $tmp = explode('/', $zip->getNameIndex(0)); 201 | $dirname = $tmp[0]; 202 | $zip->extractTo($this->tmp_dir . '/'); 203 | $zip->close(); 204 | } else { 205 | throw new RuntimeException('Failed to unzip: ' . $filepath); 206 | } 207 | 208 | return $dirname; 209 | } 210 | 211 | /** 212 | * Recursive Copy 213 | * 214 | * @param string $src 215 | * @param string $dst 216 | */ 217 | private function recursiveCopy($src, $dst) 218 | { 219 | if (is_array($src)) { 220 | foreach ($src as $key => $source) { 221 | $this->recursiveCopy($source, $dst[$key]); 222 | } 223 | 224 | return; 225 | } 226 | 227 | @mkdir($dst, 0755); 228 | 229 | $iterator = new \RecursiveIteratorIterator( 230 | new \RecursiveDirectoryIterator($src, \RecursiveDirectoryIterator::SKIP_DOTS), 231 | \RecursiveIteratorIterator::SELF_FIRST 232 | ); 233 | 234 | foreach ($iterator as $file) { 235 | if ($file->isDir()) { 236 | @mkdir($dst . '/' . $iterator->getSubPathName()); 237 | } else { 238 | $success = copy($file, $dst . '/' . $iterator->getSubPathName()); 239 | if ($success) { 240 | echo 'copied: ' . $dst . '/' . $iterator->getSubPathName() . PHP_EOL; 241 | } 242 | } 243 | } 244 | } 245 | 246 | /** 247 | * Recursive Unlink 248 | * 249 | * @param string $dir 250 | */ 251 | private function recursiveUnlink($dir) 252 | { 253 | $iterator = new \RecursiveIteratorIterator( 254 | new \RecursiveDirectoryIterator($dir, \RecursiveDirectoryIterator::SKIP_DOTS), 255 | \RecursiveIteratorIterator::CHILD_FIRST 256 | ); 257 | 258 | foreach ($iterator as $file) { 259 | if ($file->isDir()) { 260 | rmdir($file); 261 | } else { 262 | unlink($file); 263 | } 264 | } 265 | 266 | rmdir($dir); 267 | } 268 | } 269 | -------------------------------------------------------------------------------- /bin/my-codeigniter.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd `dirname $0` 4 | cd .. 5 | 6 | # Install translations 7 | php bin/install.php translations develop 8 | 9 | # Install Roave Security Advisories 10 | composer require roave/security-advisories:dev-master 11 | 12 | # Install CodeIgniter Simple and Secure Twig 13 | composer require kenjis/codeigniter-ss-twig:1.0.x@dev 14 | php vendor/kenjis/codeigniter-ss-twig/install.php 15 | 16 | # Install Codeigniter Matches CLI 17 | php bin/install.php matches-cli master 18 | 19 | # Install Cli for CodeIgniter 20 | composer require kenjis/codeigniter-cli --dev 21 | php vendor/kenjis/codeigniter-cli/install.php 22 | 23 | # Install CI PHPUnit Test 24 | composer require kenjis/ci-phpunit-test --dev 25 | php vendor/kenjis/ci-phpunit-test/install.php 26 | 27 | # Install CodeIgniter Deployer 28 | composer require kenjis/codeigniter-deployer:1.0.x@dev --dev 29 | php vendor/kenjis/codeigniter-deployer/install.php 30 | -------------------------------------------------------------------------------- /bin/router.php: -------------------------------------------------------------------------------- 1 | 6 | * @license MIT License 7 | * @copyright 2015 Kenji Suzuki 8 | * @link https://github.com/kenjis/codeigniter-composer-installer 9 | */ 10 | 11 | /** 12 | * Router script for PHP built-in server 13 | */ 14 | $_SERVER = array_merge($_SERVER, $_ENV); 15 | 16 | $file = $_SERVER['DOCUMENT_ROOT'] . $_SERVER['SCRIPT_NAME']; 17 | //echo $file, PHP_EOL; 18 | 19 | if (is_file($file)) { 20 | return false; 21 | } 22 | 23 | $_SERVER['SCRIPT_NAME'] = '/index.php'; 24 | $_SERVER['SCRIPT_FILENAME'] = $_SERVER['DOCUMENT_ROOT'] . '/index.php'; 25 | //echo $_SERVER['SCRIPT_FILENAME'], PHP_EOL; 26 | 27 | chdir($_SERVER['DOCUMENT_ROOT']); 28 | require $_SERVER['SCRIPT_FILENAME']; 29 | -------------------------------------------------------------------------------- /bin/server.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ## Part of CodeIgniter Composer Installer 4 | ## 5 | ## @author Kenji Suzuki 6 | ## @license MIT License 7 | ## @copyright 2015 Kenji Suzuki 8 | ## @link https://github.com/kenjis/codeigniter-composer-installer 9 | 10 | cd `dirname $0` 11 | cd .. 12 | 13 | php -S 127.0.0.1:8000 -t public/ bin/router.php 14 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "description" : "The CodeIgniter Application with Composer", 3 | "require": { 4 | "php": ">=5.4", 5 | "codeigniter/framework": "3.0.*", 6 | "myth/bay": "dev-develop" 7 | }, 8 | "require-dev": { 9 | "mikey179/vfsStream": "1.1.*" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /composer.lock: -------------------------------------------------------------------------------- 1 | { 2 | "_readme": [ 3 | "This file locks the dependencies of your project to a known state", 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", 5 | "This file is @generated automatically" 6 | ], 7 | "hash": "c78d049fd85a59a6d1a0920c06e09ddc", 8 | "content-hash": "829a54ac2b9c5e17b1d1d2de67e99813", 9 | "packages": [ 10 | { 11 | "name": "codeigniter/framework", 12 | "version": "3.0.4", 13 | "source": { 14 | "type": "git", 15 | "url": "https://github.com/bcit-ci/CodeIgniter.git", 16 | "reference": "ac067858c21250dd8c60cdc1f9bc12ba2ff82755" 17 | }, 18 | "dist": { 19 | "type": "zip", 20 | "url": "https://api.github.com/repos/bcit-ci/CodeIgniter/zipball/ac067858c21250dd8c60cdc1f9bc12ba2ff82755", 21 | "reference": "ac067858c21250dd8c60cdc1f9bc12ba2ff82755", 22 | "shasum": "" 23 | }, 24 | "require": { 25 | "php": ">=5.2.4" 26 | }, 27 | "require-dev": { 28 | "mikey179/vfsstream": "1.1.*" 29 | }, 30 | "type": "project", 31 | "notification-url": "https://packagist.org/downloads/", 32 | "license": [ 33 | "MIT" 34 | ], 35 | "description": "The CodeIgniter framework", 36 | "homepage": "https://codeigniter.com", 37 | "time": "2016-01-13 00:09:27" 38 | }, 39 | { 40 | "name": "myth/bay", 41 | "version": "dev-develop", 42 | "source": { 43 | "type": "git", 44 | "url": "https://github.com/newmythmedia/bay.git", 45 | "reference": "e2ccd66a4ed0589fc038cfda0cf3dac994861727" 46 | }, 47 | "dist": { 48 | "type": "zip", 49 | "url": "https://api.github.com/repos/newmythmedia/bay/zipball/e2ccd66a4ed0589fc038cfda0cf3dac994861727", 50 | "reference": "e2ccd66a4ed0589fc038cfda0cf3dac994861727", 51 | "shasum": "" 52 | }, 53 | "type": "library", 54 | "autoload": { 55 | "psr-4": { 56 | "Myth\\Bay\\": "src" 57 | } 58 | }, 59 | "notification-url": "https://packagist.org/downloads/", 60 | "license": [ 61 | "MIT" 62 | ], 63 | "authors": [ 64 | { 65 | "name": "Lonnie Ezell", 66 | "homepage": "http://newmythmedia.com" 67 | } 68 | ], 69 | "description": "Provides a simple mechanism for inserting view partials rendered in other classes. Can be used to provide a 'widgets' implementation or similar.", 70 | "homepage": "https://github.com/newmythmedia/bay", 71 | "keywords": [ 72 | "Cell", 73 | "component", 74 | "view" 75 | ], 76 | "time": "2016-01-16 04:53:29" 77 | } 78 | ], 79 | "packages-dev": [ 80 | { 81 | "name": "mikey179/vfsStream", 82 | "version": "v1.1.0", 83 | "source": { 84 | "type": "git", 85 | "url": "https://github.com/mikey179/vfsStream.git", 86 | "reference": "fc0fe8f4d0b527254a2dc45f0c265567c881d07e" 87 | }, 88 | "dist": { 89 | "type": "zip", 90 | "url": "https://api.github.com/repos/mikey179/vfsStream/zipball/fc0fe8f4d0b527254a2dc45f0c265567c881d07e", 91 | "reference": "fc0fe8f4d0b527254a2dc45f0c265567c881d07e", 92 | "shasum": "" 93 | }, 94 | "require": { 95 | "php": ">=5.3.0" 96 | }, 97 | "type": "library", 98 | "autoload": { 99 | "psr-0": { 100 | "org\\bovigo\\vfs": "src/main/php" 101 | } 102 | }, 103 | "notification-url": "https://packagist.org/downloads/", 104 | "license": [ 105 | "BSD" 106 | ], 107 | "homepage": "http://vfs.bovigo.org/", 108 | "time": "2012-08-25 12:49:29" 109 | } 110 | ], 111 | "aliases": [], 112 | "minimum-stability": "stable", 113 | "stability-flags": { 114 | "myth/bay": 20 115 | }, 116 | "prefer-stable": false, 117 | "prefer-lowest": false, 118 | "platform": { 119 | "php": ">=5.4" 120 | }, 121 | "platform-dev": [] 122 | } 123 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | RewriteEngine On 2 | RewriteCond %{REQUEST_FILENAME} !-f 3 | RewriteCond %{REQUEST_FILENAME} !-d 4 | RewriteRule ^(.*)$ index.php/$1 [L] 5 | -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | =')) 77 | { 78 | error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED); 79 | } 80 | else 81 | { 82 | error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_USER_NOTICE); 83 | } 84 | break; 85 | 86 | default: 87 | header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); 88 | echo 'The application environment is not set correctly.'; 89 | exit(1); // EXIT_ERROR 90 | } 91 | 92 | /* 93 | *--------------------------------------------------------------- 94 | * SYSTEM FOLDER NAME 95 | *--------------------------------------------------------------- 96 | * 97 | * This variable must contain the name of your "system" folder. 98 | * Include the path if the folder is not in the same directory 99 | * as this file. 100 | */ 101 | $system_path = '../vendor/codeigniter/framework/system'; 102 | 103 | /* 104 | *--------------------------------------------------------------- 105 | * APPLICATION FOLDER NAME 106 | *--------------------------------------------------------------- 107 | * 108 | * If you want this front controller to use a different "application" 109 | * folder than the default one you can set its name here. The folder 110 | * can also be renamed or relocated anywhere on your server. If 111 | * you do, use a full server path. For more info please see the user guide: 112 | * https://codeigniter.com/user_guide/general/managing_apps.html 113 | * 114 | * NO TRAILING SLASH! 115 | */ 116 | $application_folder = '../application'; 117 | 118 | /* 119 | *--------------------------------------------------------------- 120 | * VIEW FOLDER NAME 121 | *--------------------------------------------------------------- 122 | * 123 | * If you want to move the view folder out of the application 124 | * folder set the path to the folder here. The folder can be renamed 125 | * and relocated anywhere on your server. If blank, it will default 126 | * to the standard location inside your application folder. If you 127 | * do move this, use the full server path to this folder. 128 | * 129 | * NO TRAILING SLASH! 130 | */ 131 | $view_folder = ''; 132 | 133 | 134 | /* 135 | * -------------------------------------------------------------------- 136 | * DEFAULT CONTROLLER 137 | * -------------------------------------------------------------------- 138 | * 139 | * Normally you will set your default controller in the routes.php file. 140 | * You can, however, force a custom routing by hard-coding a 141 | * specific controller class/function here. For most applications, you 142 | * WILL NOT set your routing here, but it's an option for those 143 | * special instances where you might want to override the standard 144 | * routing in a specific front controller that shares a common CI installation. 145 | * 146 | * IMPORTANT: If you set the routing here, NO OTHER controller will be 147 | * callable. In essence, this preference limits your application to ONE 148 | * specific controller. Leave the function name blank if you need 149 | * to call functions dynamically via the URI. 150 | * 151 | * Un-comment the $routing array below to use this feature 152 | */ 153 | // The directory name, relative to the "controllers" folder. Leave blank 154 | // if your controller is not in a sub-folder within the "controllers" folder 155 | // $routing['directory'] = ''; 156 | 157 | // The controller class file name. Example: mycontroller 158 | // $routing['controller'] = ''; 159 | 160 | // The controller function you wish to be called. 161 | // $routing['function'] = ''; 162 | 163 | 164 | /* 165 | * ------------------------------------------------------------------- 166 | * CUSTOM CONFIG VALUES 167 | * ------------------------------------------------------------------- 168 | * 169 | * The $assign_to_config array below will be passed dynamically to the 170 | * config class when initialized. This allows you to set custom config 171 | * items or override any default config values found in the config.php file. 172 | * This can be handy as it permits you to share one application between 173 | * multiple front controller files, with each file containing different 174 | * config values. 175 | * 176 | * Un-comment the $assign_to_config array below to use this feature 177 | */ 178 | // $assign_to_config['name_of_config_item'] = 'value of config item'; 179 | 180 | 181 | 182 | // -------------------------------------------------------------------- 183 | // END OF USER CONFIGURABLE SETTINGS. DO NOT EDIT BELOW THIS LINE 184 | // -------------------------------------------------------------------- 185 | 186 | /* 187 | * --------------------------------------------------------------- 188 | * Resolve the system path for increased reliability 189 | * --------------------------------------------------------------- 190 | */ 191 | 192 | // Set the current directory correctly for CLI requests 193 | if (defined('STDIN')) 194 | { 195 | chdir(dirname(__FILE__)); 196 | } 197 | 198 | if (($_temp = realpath($system_path)) !== FALSE) 199 | { 200 | $system_path = $_temp.'/'; 201 | } 202 | else 203 | { 204 | // Ensure there's a trailing slash 205 | $system_path = rtrim($system_path, '/').'/'; 206 | } 207 | 208 | // Is the system path correct? 209 | if ( ! is_dir($system_path)) 210 | { 211 | header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); 212 | echo 'Your system folder path does not appear to be set correctly. Please open the following file and correct this: '.pathinfo(__FILE__, PATHINFO_BASENAME); 213 | exit(3); // EXIT_CONFIG 214 | } 215 | 216 | /* 217 | * ------------------------------------------------------------------- 218 | * Now that we know the path, set the main path constants 219 | * ------------------------------------------------------------------- 220 | */ 221 | // The name of THIS file 222 | define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME)); 223 | 224 | // Path to the system folder 225 | define('BASEPATH', str_replace('\\', '/', $system_path)); 226 | 227 | // Path to the front controller (this file) 228 | define('FCPATH', dirname(__FILE__).'/'); 229 | 230 | // Name of the "system folder" 231 | define('SYSDIR', trim(strrchr(trim(BASEPATH, '/'), '/'), '/')); 232 | 233 | // The path to the "application" folder 234 | if (is_dir($application_folder)) 235 | { 236 | if (($_temp = realpath($application_folder)) !== FALSE) 237 | { 238 | $application_folder = $_temp; 239 | } 240 | 241 | define('APPPATH', $application_folder.DIRECTORY_SEPARATOR); 242 | } 243 | else 244 | { 245 | if ( ! is_dir(BASEPATH.$application_folder.DIRECTORY_SEPARATOR)) 246 | { 247 | header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); 248 | echo 'Your application folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF; 249 | exit(3); // EXIT_CONFIG 250 | } 251 | 252 | define('APPPATH', BASEPATH.$application_folder.DIRECTORY_SEPARATOR); 253 | } 254 | 255 | // The path to the "views" folder 256 | if ( ! is_dir($view_folder)) 257 | { 258 | if ( ! empty($view_folder) && is_dir(APPPATH.$view_folder.DIRECTORY_SEPARATOR)) 259 | { 260 | $view_folder = APPPATH.$view_folder; 261 | } 262 | elseif ( ! is_dir(APPPATH.'views'.DIRECTORY_SEPARATOR)) 263 | { 264 | header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); 265 | echo 'Your view folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF; 266 | exit(3); // EXIT_CONFIG 267 | } 268 | else 269 | { 270 | $view_folder = APPPATH.'views'; 271 | } 272 | } 273 | 274 | if (($_temp = realpath($view_folder)) !== FALSE) 275 | { 276 | $view_folder = $_temp.DIRECTORY_SEPARATOR; 277 | } 278 | else 279 | { 280 | $view_folder = rtrim($view_folder, '/\\').DIRECTORY_SEPARATOR; 281 | } 282 | 283 | define('VIEWPATH', $view_folder); 284 | 285 | /* 286 | * -------------------------------------------------------------------- 287 | * LOAD THE BOOTSTRAP FILE 288 | * -------------------------------------------------------------------- 289 | * 290 | * And away we go... 291 | */ 292 | require_once BASEPATH.'core/CodeIgniter.php'; 293 | --------------------------------------------------------------------------------