├── .editorconfig
├── .gitignore
├── .htaccess
├── application
├── .htaccess
├── cache
│ ├── .htaccess
│ └── index.html
├── config
│ ├── autoload.php
│ ├── config.php
│ ├── constants.php
│ ├── database.php
│ ├── doctypes.php
│ ├── foreign_chars.php
│ ├── hooks.php
│ ├── index.html
│ ├── jwt.php
│ ├── memcached.php
│ ├── migration.php
│ ├── mimes.php
│ ├── profiler.php
│ ├── rest.php
│ ├── routes.php
│ ├── smileys.php
│ └── user_agents.php
├── controllers
│ ├── Welcome.php
│ ├── api
│ │ ├── Articles.php
│ │ └── Users.php
│ └── index.html
├── core
│ └── index.html
├── helpers
│ └── index.html
├── hooks
│ └── index.html
├── index.html
├── language
│ ├── bulgarian
│ │ ├── index.html
│ │ └── rest_controller_lang.php
│ ├── dutch
│ │ ├── index.html
│ │ └── rest_controller_lang.php
│ ├── english
│ │ ├── index.html
│ │ └── rest_controller_lang.php
│ ├── french
│ │ ├── index.html
│ │ └── rest_controller_lang.php
│ ├── german
│ │ ├── index.html
│ │ └── rest_controller_lang.php
│ ├── greek
│ │ └── rest_controller_lang.php
│ ├── index.html
│ ├── indonesia
│ │ ├── index.html
│ │ └── rest_controller_lang.php
│ ├── italian
│ │ ├── index.html
│ │ └── rest_controller_lang.php
│ ├── portuguese-brazilian
│ │ ├── index.html
│ │ └── rest_controller_lang.php
│ ├── romanian
│ │ ├── index.html
│ │ └── rest_controller_lang.php
│ ├── serbian_cyr
│ │ ├── index.html
│ │ └── rest_controller_lang.php
│ ├── serbian_lat
│ │ ├── index.html
│ │ └── rest_controller_lang.php
│ ├── simplified-chinese
│ │ ├── index.html
│ │ └── rest_controller_lang.php
│ ├── spanish
│ │ ├── index.html
│ │ └── rest_controller_lang.php
│ ├── traditional-chinese
│ │ ├── index.html
│ │ └── rest_controller_lang.php
│ └── turkish
│ │ ├── index.html
│ │ └── rest_controller_lang.php
├── libraries
│ ├── Authorization_Token.php
│ ├── Format.php
│ ├── REST_Controller.php
│ └── index.html
├── logs
│ └── index.html
├── models
│ ├── Article_model.php
│ ├── User_model.php
│ └── index.html
├── third_party
│ ├── index.html
│ └── php-jwt
│ │ ├── BeforeValidException.php
│ │ ├── ExpiredException.php
│ │ ├── JWT.php
│ │ └── SignatureInvalidException.php
└── views
│ ├── 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
│ └── welcome_message.php
├── composer.json
├── contributing.md
├── index.php
├── license.txt
└── readme.md
/.editorconfig:
--------------------------------------------------------------------------------
1 | # top-most EditorConfig file
2 | root = true
3 |
4 | # Unix-style newlines with a newline ending every file
5 | [*]
6 | end_of_line = lf
7 | insert_final_newline = true
8 |
9 | # Matches multiple files with brace expansion notation
10 | # Set default charset
11 | [*]
12 | charset = utf-8
13 |
14 | # Tab indentation (no size specified)
15 | indent_style = tab
16 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 |
3 | system
4 | application/cache/*
5 | !application/cache/index.html
6 | !application/cache/.htaccess
7 |
8 | application/logs/*
9 | !application/logs/index.html
10 | !application/logs/.htaccess
11 |
12 | composer.lock
13 |
14 | user_guide_src/build/*
15 | user_guide_src/cilexer/build/*
16 | user_guide_src/cilexer/dist/*
17 | user_guide_src/cilexer/pycilexer.egg-info/*
18 | /vendor/
19 |
20 | # IDE Files
21 | #-------------------------
22 | /nbproject/
23 | .idea/*
24 |
25 | ## Sublime Text cache files
26 | *.tmlanguage.cache
27 | *.tmPreferences.cache
28 | *.stTheme.cache
29 | *.sublime-workspace
30 | *.sublime-project
31 |
--------------------------------------------------------------------------------
/.htaccess:
--------------------------------------------------------------------------------
1 | RewriteEngine On
2 | RewriteCond %{REQUEST_FILENAME} !-f
3 | RewriteCond %{REQUEST_FILENAME} !-d
4 | RewriteRule ^(.*)$ index.php/$1 [L]
--------------------------------------------------------------------------------
/application/.htaccess:
--------------------------------------------------------------------------------
1 |
Directory access is forbidden.
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/config/autoload.php: -------------------------------------------------------------------------------- 1 | 'ua'); 60 | */ 61 | $autoload['libraries'] = array('database', 'form_validation'); 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 | | You can also supply an alternative property name to be assigned in 77 | | the controller: 78 | | 79 | | $autoload['drivers'] = array('cache' => 'cch'); 80 | | 81 | */ 82 | $autoload['drivers'] = array(); 83 | 84 | /* 85 | | ------------------------------------------------------------------- 86 | | Auto-load Helper Files 87 | | ------------------------------------------------------------------- 88 | | Prototype: 89 | | 90 | | $autoload['helper'] = array('url', 'file'); 91 | */ 92 | $autoload['helper'] = array(); 93 | 94 | /* 95 | | ------------------------------------------------------------------- 96 | | Auto-load Config files 97 | | ------------------------------------------------------------------- 98 | | Prototype: 99 | | 100 | | $autoload['config'] = array('config1', 'config2'); 101 | | 102 | | NOTE: This item is intended for use ONLY if you have created custom 103 | | config files. Otherwise, leave it blank. 104 | | 105 | */ 106 | $autoload['config'] = array(); 107 | 108 | /* 109 | | ------------------------------------------------------------------- 110 | | Auto-load Language files 111 | | ------------------------------------------------------------------- 112 | | Prototype: 113 | | 114 | | $autoload['language'] = array('lang1', 'lang2'); 115 | | 116 | | NOTE: Do not include the "_lang" part of your file. For example 117 | | "codeigniter_lang.php" would be referenced as array('codeigniter'); 118 | | 119 | */ 120 | $autoload['language'] = array(); 121 | 122 | /* 123 | | ------------------------------------------------------------------- 124 | | Auto-load Models 125 | | ------------------------------------------------------------------- 126 | | Prototype: 127 | | 128 | | $autoload['model'] = array('first_model', 'second_model'); 129 | | 130 | | You can also supply an alternative model name to be assigned 131 | | in the controller: 132 | | 133 | | $autoload['model'] = array('first_model' => 'first'); 134 | */ 135 | $autoload['model'] = array(); 136 | -------------------------------------------------------------------------------- /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 | | You can optionally enable standard query string based URLs: 172 | | example.com?who=me&what=something&where=here 173 | | 174 | | Options are: TRUE or FALSE (boolean) 175 | | 176 | | The other items let you set the query string 'words' that will 177 | | invoke your controllers and its functions: 178 | | example.com/index.php?c=controller&m=function 179 | | 180 | | Please note that some of the helpers won't work as expected when 181 | | this feature is enabled, since CodeIgniter is designed primarily to 182 | | use segment based URLs. 183 | | 184 | */ 185 | $config['enable_query_strings'] = FALSE; 186 | $config['controller_trigger'] = 'c'; 187 | $config['function_trigger'] = 'm'; 188 | $config['directory_trigger'] = 'd'; 189 | 190 | /* 191 | |-------------------------------------------------------------------------- 192 | | Allow $_GET array 193 | |-------------------------------------------------------------------------- 194 | | 195 | | By default CodeIgniter enables access to the $_GET array. If for some 196 | | reason you would like to disable it, set 'allow_get_array' to FALSE. 197 | | 198 | | WARNING: This feature is DEPRECATED and currently available only 199 | | for backwards compatibility purposes! 200 | | 201 | */ 202 | $config['allow_get_array'] = TRUE; 203 | 204 | /* 205 | |-------------------------------------------------------------------------- 206 | | Error Logging Threshold 207 | |-------------------------------------------------------------------------- 208 | | 209 | | You can enable error logging by setting a threshold over zero. The 210 | | threshold determines what gets logged. Threshold options are: 211 | | 212 | | 0 = Disables logging, Error logging TURNED OFF 213 | | 1 = Error Messages (including PHP errors) 214 | | 2 = Debug Messages 215 | | 3 = Informational Messages 216 | | 4 = All Messages 217 | | 218 | | You can also pass an array with threshold levels to show individual error types 219 | | 220 | | array(2) = Debug Messages, without Error Messages 221 | | 222 | | For a live site you'll usually only enable Errors (1) to be logged otherwise 223 | | your log files will fill up very fast. 224 | | 225 | */ 226 | $config['log_threshold'] = 0; 227 | 228 | /* 229 | |-------------------------------------------------------------------------- 230 | | Error Logging Directory Path 231 | |-------------------------------------------------------------------------- 232 | | 233 | | Leave this BLANK unless you would like to set something other than the default 234 | | application/logs/ directory. Use a full server path with trailing slash. 235 | | 236 | */ 237 | $config['log_path'] = ''; 238 | 239 | /* 240 | |-------------------------------------------------------------------------- 241 | | Log File Extension 242 | |-------------------------------------------------------------------------- 243 | | 244 | | The default filename extension for log files. The default 'php' allows for 245 | | protecting the log files via basic scripting, when they are to be stored 246 | | under a publicly accessible directory. 247 | | 248 | | Note: Leaving it blank will default to 'php'. 249 | | 250 | */ 251 | $config['log_file_extension'] = ''; 252 | 253 | /* 254 | |-------------------------------------------------------------------------- 255 | | Log File Permissions 256 | |-------------------------------------------------------------------------- 257 | | 258 | | The file system permissions to be applied on newly created log files. 259 | | 260 | | IMPORTANT: This MUST be an integer (no quotes) and you MUST use octal 261 | | integer notation (i.e. 0700, 0644, etc.) 262 | */ 263 | $config['log_file_permissions'] = 0644; 264 | 265 | /* 266 | |-------------------------------------------------------------------------- 267 | | Date Format for Logs 268 | |-------------------------------------------------------------------------- 269 | | 270 | | Each item that is logged has an associated date. You can use PHP date 271 | | codes to set your own date formatting 272 | | 273 | */ 274 | $config['log_date_format'] = 'Y-m-d H:i:s'; 275 | 276 | /* 277 | |-------------------------------------------------------------------------- 278 | | Error Views Directory Path 279 | |-------------------------------------------------------------------------- 280 | | 281 | | Leave this BLANK unless you would like to set something other than the default 282 | | application/views/errors/ directory. Use a full server path with trailing slash. 283 | | 284 | */ 285 | $config['error_views_path'] = ''; 286 | 287 | /* 288 | |-------------------------------------------------------------------------- 289 | | Cache Directory Path 290 | |-------------------------------------------------------------------------- 291 | | 292 | | Leave this BLANK unless you would like to set something other than the default 293 | | application/cache/ directory. Use a full server path with trailing slash. 294 | | 295 | */ 296 | $config['cache_path'] = ''; 297 | 298 | /* 299 | |-------------------------------------------------------------------------- 300 | | Cache Include Query String 301 | |-------------------------------------------------------------------------- 302 | | 303 | | Whether to take the URL query string into consideration when generating 304 | | output cache files. Valid options are: 305 | | 306 | | FALSE = Disabled 307 | | TRUE = Enabled, take all query parameters into account. 308 | | Please be aware that this may result in numerous cache 309 | | files generated for the same page over and over again. 310 | | array('q') = Enabled, but only take into account the specified list 311 | | of query parameters. 312 | | 313 | */ 314 | $config['cache_query_string'] = FALSE; 315 | 316 | /* 317 | |-------------------------------------------------------------------------- 318 | | Encryption Key 319 | |-------------------------------------------------------------------------- 320 | | 321 | | If you use the Encryption class, you must set an encryption key. 322 | | See the user guide for more info. 323 | | 324 | | https://codeigniter.com/user_guide/libraries/encryption.html 325 | | 326 | */ 327 | $config['encryption_key'] = ''; 328 | 329 | /* 330 | |-------------------------------------------------------------------------- 331 | | Session Variables 332 | |-------------------------------------------------------------------------- 333 | | 334 | | 'sess_driver' 335 | | 336 | | The storage driver to use: files, database, redis, memcached 337 | | 338 | | 'sess_cookie_name' 339 | | 340 | | The session cookie name, must contain only [0-9a-z_-] characters 341 | | 342 | | 'sess_expiration' 343 | | 344 | | The number of SECONDS you want the session to last. 345 | | Setting to 0 (zero) means expire when the browser is closed. 346 | | 347 | | 'sess_save_path' 348 | | 349 | | The location to save sessions to, driver dependent. 350 | | 351 | | For the 'files' driver, it's a path to a writable directory. 352 | | WARNING: Only absolute paths are supported! 353 | | 354 | | For the 'database' driver, it's a table name. 355 | | Please read up the manual for the format with other session drivers. 356 | | 357 | | IMPORTANT: You are REQUIRED to set a valid save path! 358 | | 359 | | 'sess_match_ip' 360 | | 361 | | Whether to match the user's IP address when reading the session data. 362 | | 363 | | WARNING: If you're using the database driver, don't forget to update 364 | | your session table's PRIMARY KEY when changing this setting. 365 | | 366 | | 'sess_time_to_update' 367 | | 368 | | How many seconds between CI regenerating the session ID. 369 | | 370 | | 'sess_regenerate_destroy' 371 | | 372 | | Whether to destroy session data associated with the old session ID 373 | | when auto-regenerating the session ID. When set to FALSE, the data 374 | | will be later deleted by the garbage collector. 375 | | 376 | | Other session cookie settings are shared with the rest of the application, 377 | | except for 'cookie_prefix' and 'cookie_httponly', which are ignored here. 378 | | 379 | */ 380 | $config['sess_driver'] = 'files'; 381 | $config['sess_cookie_name'] = 'ci_session'; 382 | $config['sess_expiration'] = 7200; 383 | $config['sess_save_path'] = NULL; 384 | $config['sess_match_ip'] = FALSE; 385 | $config['sess_time_to_update'] = 300; 386 | $config['sess_regenerate_destroy'] = FALSE; 387 | 388 | /* 389 | |-------------------------------------------------------------------------- 390 | | Cookie Related Variables 391 | |-------------------------------------------------------------------------- 392 | | 393 | | 'cookie_prefix' = Set a cookie name prefix if you need to avoid collisions 394 | | 'cookie_domain' = Set to .your-domain.com for site-wide cookies 395 | | 'cookie_path' = Typically will be a forward slash 396 | | 'cookie_secure' = Cookie will only be set if a secure HTTPS connection exists. 397 | | 'cookie_httponly' = Cookie will only be accessible via HTTP(S) (no javascript) 398 | | 399 | | Note: These settings (with the exception of 'cookie_prefix' and 400 | | 'cookie_httponly') will also affect sessions. 401 | | 402 | */ 403 | $config['cookie_prefix'] = ''; 404 | $config['cookie_domain'] = ''; 405 | $config['cookie_path'] = '/'; 406 | $config['cookie_secure'] = FALSE; 407 | $config['cookie_httponly'] = FALSE; 408 | 409 | /* 410 | |-------------------------------------------------------------------------- 411 | | Standardize newlines 412 | |-------------------------------------------------------------------------- 413 | | 414 | | Determines whether to standardize newline characters in input data, 415 | | meaning to replace \r\n, \r, \n occurrences with the PHP_EOL value. 416 | | 417 | | WARNING: This feature is DEPRECATED and currently available only 418 | | for backwards compatibility purposes! 419 | | 420 | */ 421 | $config['standardize_newlines'] = FALSE; 422 | 423 | /* 424 | |-------------------------------------------------------------------------- 425 | | Global XSS Filtering 426 | |-------------------------------------------------------------------------- 427 | | 428 | | Determines whether the XSS filter is always active when GET, POST or 429 | | COOKIE data is encountered 430 | | 431 | | WARNING: This feature is DEPRECATED and currently available only 432 | | for backwards compatibility purposes! 433 | | 434 | */ 435 | $config['global_xss_filtering'] = FALSE; 436 | 437 | /* 438 | |-------------------------------------------------------------------------- 439 | | Cross Site Request Forgery 440 | |-------------------------------------------------------------------------- 441 | | Enables a CSRF cookie token to be set. When set to TRUE, token will be 442 | | checked on a submitted form. If you are accepting user data, it is strongly 443 | | recommended CSRF protection be enabled. 444 | | 445 | | 'csrf_token_name' = The token name 446 | | 'csrf_cookie_name' = The cookie name 447 | | 'csrf_expire' = The number in seconds the token should expire. 448 | | 'csrf_regenerate' = Regenerate token on every submission 449 | | 'csrf_exclude_uris' = Array of URIs which ignore CSRF checks 450 | */ 451 | $config['csrf_protection'] = FALSE; 452 | $config['csrf_token_name'] = 'csrf_test_name'; 453 | $config['csrf_cookie_name'] = 'csrf_cookie_name'; 454 | $config['csrf_expire'] = 7200; 455 | $config['csrf_regenerate'] = TRUE; 456 | $config['csrf_exclude_uris'] = array(); 457 | 458 | /* 459 | |-------------------------------------------------------------------------- 460 | | Output Compression 461 | |-------------------------------------------------------------------------- 462 | | 463 | | Enables Gzip output compression for faster page loads. When enabled, 464 | | the output class will test whether your server supports Gzip. 465 | | Even if it does, however, not all browsers support compression 466 | | so enable only if you are reasonably sure your visitors can handle it. 467 | | 468 | | Only used if zlib.output_compression is turned off in your php.ini. 469 | | Please do not use it together with httpd-level output compression. 470 | | 471 | | VERY IMPORTANT: If you are getting a blank page when compression is enabled it 472 | | means you are prematurely outputting something to your browser. It could 473 | | even be a line of whitespace at the end of one of your scripts. For 474 | | compression to work, nothing can be sent before the output buffer is called 475 | | by the output class. Do not 'echo' any values with compression enabled. 476 | | 477 | */ 478 | $config['compress_output'] = FALSE; 479 | 480 | /* 481 | |-------------------------------------------------------------------------- 482 | | Master Time Reference 483 | |-------------------------------------------------------------------------- 484 | | 485 | | Options are 'local' or any PHP supported timezone. This preference tells 486 | | the system whether to use your server's local time as the master 'now' 487 | | reference, or convert it to the configured one timezone. See the 'date 488 | | helper' page of the user guide for information regarding date handling. 489 | | 490 | */ 491 | $config['time_reference'] = 'local'; 492 | 493 | /* 494 | |-------------------------------------------------------------------------- 495 | | Rewrite PHP Short Tags 496 | |-------------------------------------------------------------------------- 497 | | 498 | | If your PHP installation does not have short tag support enabled CI 499 | | can rewrite the tags on-the-fly, enabling you to utilize that syntax 500 | | in your view files. Options are TRUE or FALSE (boolean) 501 | | 502 | | Note: You need to have eval() enabled for this to work. 503 | | 504 | */ 505 | $config['rewrite_short_tags'] = FALSE; 506 | 507 | /* 508 | |-------------------------------------------------------------------------- 509 | | Reverse Proxy IPs 510 | |-------------------------------------------------------------------------- 511 | | 512 | | If your server is behind a reverse proxy, you must whitelist the proxy 513 | | IP addresses from which CodeIgniter should trust headers such as 514 | | HTTP_X_FORWARDED_FOR and HTTP_CLIENT_IP in order to properly identify 515 | | the visitor's IP address. 516 | | 517 | | You can use both an array or a comma-separated list of proxy addresses, 518 | | as well as specifying whole subnets. Here are a few examples: 519 | | 520 | | Comma-separated: '10.0.1.200,192.168.5.0/24' 521 | | Array: array('10.0.1.200', '192.168.5.0/24') 522 | */ 523 | $config['proxy_ips'] = ''; 524 | -------------------------------------------------------------------------------- /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' => 'root', 80 | 'password' => '', 81 | 'database' => 'restserver', 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 |Directory access is forbidden.
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/config/jwt.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 | 'odc' => 'application/vnd.oasis.opendocument.chart', 168 | 'otc' => 'application/vnd.oasis.opendocument.chart-template', 169 | 'odf' => 'application/vnd.oasis.opendocument.formula', 170 | 'otf' => 'application/vnd.oasis.opendocument.formula-template', 171 | 'odg' => 'application/vnd.oasis.opendocument.graphics', 172 | 'otg' => 'application/vnd.oasis.opendocument.graphics-template', 173 | 'odi' => 'application/vnd.oasis.opendocument.image', 174 | 'oti' => 'application/vnd.oasis.opendocument.image-template', 175 | 'odp' => 'application/vnd.oasis.opendocument.presentation', 176 | 'otp' => 'application/vnd.oasis.opendocument.presentation-template', 177 | 'ods' => 'application/vnd.oasis.opendocument.spreadsheet', 178 | 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template', 179 | 'odt' => 'application/vnd.oasis.opendocument.text', 180 | 'odm' => 'application/vnd.oasis.opendocument.text-master', 181 | 'ott' => 'application/vnd.oasis.opendocument.text-template', 182 | 'oth' => 'application/vnd.oasis.opendocument.text-web' 183 | ); 184 | -------------------------------------------------------------------------------- /application/config/profiler.php: -------------------------------------------------------------------------------- 1 | function($username, $password) 150 | | In other cases override the function _perform_library_auth in your controller 151 | | 152 | | For digest authentication the library function should return already a stored 153 | | md5(username:restrealm:password) for that username 154 | | 155 | | e.g: md5('admin:REST API:1234') = '1e957ebc35631ab22d5bd6526bd14ea2' 156 | | 157 | */ 158 | $config['auth_library_class'] = ''; 159 | $config['auth_library_function'] = ''; 160 | 161 | /* 162 | |-------------------------------------------------------------------------- 163 | | Override auth types for specific class/method 164 | |-------------------------------------------------------------------------- 165 | | 166 | | Set specific authentication types for methods within a class (controller) 167 | | 168 | | Set as many config entries as needed. Any methods not set will use the default 'rest_auth' config value. 169 | | 170 | | e.g: 171 | | 172 | | $config['auth_override_class_method']['deals']['view'] = 'none'; 173 | | $config['auth_override_class_method']['deals']['insert'] = 'digest'; 174 | | $config['auth_override_class_method']['accounts']['user'] = 'basic'; 175 | | $config['auth_override_class_method']['dashboard']['*'] = 'none|digest|basic'; 176 | | 177 | | Here 'deals', 'accounts' and 'dashboard' are controller names, 'view', 'insert' and 'user' are methods within. An asterisk may also be used to specify an authentication method for an entire classes methods. Ex: $config['auth_override_class_method']['dashboard']['*'] = 'basic'; (NOTE: leave off the '_get' or '_post' from the end of the method name) 178 | | Acceptable values are; 'none', 'digest' and 'basic'. 179 | | 180 | */ 181 | // $config['auth_override_class_method']['deals']['view'] = 'none'; 182 | // $config['auth_override_class_method']['deals']['insert'] = 'digest'; 183 | // $config['auth_override_class_method']['accounts']['user'] = 'basic'; 184 | // $config['auth_override_class_method']['dashboard']['*'] = 'basic'; 185 | 186 | 187 | // ---Uncomment list line for the wildard unit test 188 | // $config['auth_override_class_method']['wildcard_test_cases']['*'] = 'basic'; 189 | 190 | /* 191 | |-------------------------------------------------------------------------- 192 | | Override auth types for specific 'class/method/HTTP method' 193 | |-------------------------------------------------------------------------- 194 | | 195 | | example: 196 | | 197 | | $config['auth_override_class_method_http']['deals']['view']['get'] = 'none'; 198 | | $config['auth_override_class_method_http']['deals']['insert']['post'] = 'none'; 199 | | $config['auth_override_class_method_http']['deals']['*']['options'] = 'none'; 200 | */ 201 | 202 | // ---Uncomment list line for the wildard unit test 203 | // $config['auth_override_class_method_http']['wildcard_test_cases']['*']['options'] = 'basic'; 204 | 205 | /* 206 | |-------------------------------------------------------------------------- 207 | | REST Login Usernames 208 | |-------------------------------------------------------------------------- 209 | | 210 | | Array of usernames and passwords for login, if ldap is configured this is ignored 211 | | 212 | */ 213 | $config['rest_valid_logins'] = ['admin' => '1234']; 214 | 215 | /* 216 | |-------------------------------------------------------------------------- 217 | | Global IP White-listing 218 | |-------------------------------------------------------------------------- 219 | | 220 | | Limit connections to your REST server to White-listed IP addresses 221 | | 222 | | Usage: 223 | | 1. Set to TRUE and select an auth option for extreme security (client's IP 224 | | address must be in white-list and they must also log in) 225 | | 2. Set to TRUE with auth set to FALSE to allow White-listed IPs access with no login 226 | | 3. Set to FALSE but set 'auth_override_class_method' to 'white-list' to 227 | | restrict certain methods to IPs in your white-list 228 | | 229 | */ 230 | $config['rest_ip_whitelist_enabled'] = FALSE; 231 | 232 | /* 233 | |-------------------------------------------------------------------------- 234 | | REST Handle Exceptions 235 | |-------------------------------------------------------------------------- 236 | | 237 | | Handle exceptions caused by the controller 238 | | 239 | */ 240 | $config['rest_handle_exceptions'] = TRUE; 241 | 242 | /* 243 | |-------------------------------------------------------------------------- 244 | | REST IP White-list 245 | |-------------------------------------------------------------------------- 246 | | 247 | | Limit connections to your REST server with a comma separated 248 | | list of IP addresses 249 | | 250 | | e.g: '123.456.789.0, 987.654.32.1' 251 | | 252 | | 127.0.0.1 and 0.0.0.0 are allowed by default 253 | | 254 | */ 255 | $config['rest_ip_whitelist'] = ''; 256 | 257 | /* 258 | |-------------------------------------------------------------------------- 259 | | Global IP Blacklisting 260 | |-------------------------------------------------------------------------- 261 | | 262 | | Prevent connections to the REST server from blacklisted IP addresses 263 | | 264 | | Usage: 265 | | 1. Set to TRUE and add any IP address to 'rest_ip_blacklist' 266 | | 267 | */ 268 | $config['rest_ip_blacklist_enabled'] = FALSE; 269 | 270 | /* 271 | |-------------------------------------------------------------------------- 272 | | REST IP Blacklist 273 | |-------------------------------------------------------------------------- 274 | | 275 | | Prevent connections from the following IP addresses 276 | | 277 | | e.g: '123.456.789.0, 987.654.32.1' 278 | | 279 | */ 280 | $config['rest_ip_blacklist'] = ''; 281 | 282 | /* 283 | |-------------------------------------------------------------------------- 284 | | REST Database Group 285 | |-------------------------------------------------------------------------- 286 | | 287 | | Connect to a database group for keys, logging, etc. It will only connect 288 | | if you have any of these features enabled 289 | | 290 | */ 291 | $config['rest_database_group'] = 'default'; 292 | 293 | /* 294 | |-------------------------------------------------------------------------- 295 | | REST API Keys Table Name 296 | |-------------------------------------------------------------------------- 297 | | 298 | | The table name in your database that stores API keys 299 | | 300 | */ 301 | $config['rest_keys_table'] = 'keys'; 302 | 303 | /* 304 | |-------------------------------------------------------------------------- 305 | | REST Enable Keys 306 | |-------------------------------------------------------------------------- 307 | | 308 | | When set to TRUE, the REST API will look for a column name called 'key'. 309 | | If no key is provided, the request will result in an error. To override the 310 | | column name see 'rest_key_column' 311 | | 312 | | Default table schema: 313 | | CREATE TABLE `keys` ( 314 | | `id` INT(11) NOT NULL AUTO_INCREMENT, 315 | | `user_id` INT(11) NOT NULL, 316 | | `key` VARCHAR(40) NOT NULL, 317 | | `level` INT(2) NOT NULL, 318 | | `ignore_limits` TINYINT(1) NOT NULL DEFAULT '0', 319 | | `is_private_key` TINYINT(1) NOT NULL DEFAULT '0', 320 | | `ip_addresses` TEXT NULL DEFAULT NULL, 321 | | `date_created` INT(11) NOT NULL, 322 | | PRIMARY KEY (`id`) 323 | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 324 | | 325 | */ 326 | $config['rest_enable_keys'] = FALSE; 327 | 328 | /* 329 | |-------------------------------------------------------------------------- 330 | | REST Table Key Column Name 331 | |-------------------------------------------------------------------------- 332 | | 333 | | If not using the default table schema in 'rest_enable_keys', specify the 334 | | column name to match e.g. my_key 335 | | 336 | */ 337 | $config['rest_key_column'] = 'key'; 338 | 339 | /* 340 | |-------------------------------------------------------------------------- 341 | | REST API Limits method 342 | |-------------------------------------------------------------------------- 343 | | 344 | | Specify the method used to limit the API calls 345 | | 346 | | Available methods are : 347 | | $config['rest_limits_method'] = 'IP_ADDRESS'; // Put a limit per ip address 348 | | $config['rest_limits_method'] = 'API_KEY'; // Put a limit per api key 349 | | $config['rest_limits_method'] = 'METHOD_NAME'; // Put a limit on method calls 350 | | $config['rest_limits_method'] = 'ROUTED_URL'; // Put a limit on the routed URL 351 | | 352 | */ 353 | $config['rest_limits_method'] = 'ROUTED_URL'; 354 | 355 | /* 356 | |-------------------------------------------------------------------------- 357 | | REST Key Length 358 | |-------------------------------------------------------------------------- 359 | | 360 | | Length of the created keys. Check your default database schema on the 361 | | maximum length allowed 362 | | 363 | | Note: The maximum length is 40 364 | | 365 | */ 366 | $config['rest_key_length'] = 40; 367 | 368 | /* 369 | |-------------------------------------------------------------------------- 370 | | REST API Key Variable 371 | |-------------------------------------------------------------------------- 372 | | 373 | | Custom header to specify the API key 374 | 375 | | Note: Custom headers with the X- prefix are deprecated as of 376 | | 2012/06/12. See RFC 6648 specification for more details 377 | | 378 | */ 379 | $config['rest_key_name'] = 'X-API-KEY'; 380 | 381 | /* 382 | |-------------------------------------------------------------------------- 383 | | REST Enable Logging 384 | |-------------------------------------------------------------------------- 385 | | 386 | | When set to TRUE, the REST API will log actions based on the column names 'key', 'date', 387 | | 'time' and 'ip_address'. This is a general rule that can be overridden in the 388 | | $this->method array for each controller 389 | | 390 | | Default table schema: 391 | | CREATE TABLE `logs` ( 392 | | `id` INT(11) NOT NULL AUTO_INCREMENT, 393 | | `uri` VARCHAR(255) NOT NULL, 394 | | `method` VARCHAR(6) NOT NULL, 395 | | `params` TEXT DEFAULT NULL, 396 | | `api_key` VARCHAR(40) NOT NULL, 397 | | `ip_address` VARCHAR(45) NOT NULL, 398 | | `time` INT(11) NOT NULL, 399 | | `rtime` FLOAT DEFAULT NULL, 400 | | `authorized` VARCHAR(1) NOT NULL, 401 | | `response_code` smallint(3) DEFAULT '0', 402 | | PRIMARY KEY (`id`) 403 | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 404 | | 405 | */ 406 | $config['rest_enable_logging'] = FALSE; 407 | 408 | /* 409 | |-------------------------------------------------------------------------- 410 | | REST API Logs Table Name 411 | |-------------------------------------------------------------------------- 412 | | 413 | | If not using the default table schema in 'rest_enable_logging', specify the 414 | | table name to match e.g. my_logs 415 | | 416 | */ 417 | $config['rest_logs_table'] = 'logs'; 418 | 419 | /* 420 | |-------------------------------------------------------------------------- 421 | | REST Method Access Control 422 | |-------------------------------------------------------------------------- 423 | | When set to TRUE, the REST API will check the access table to see if 424 | | the API key can access that controller. 'rest_enable_keys' must be enabled 425 | | to use this 426 | | 427 | | Default table schema: 428 | | CREATE TABLE `access` ( 429 | | `id` INT(11) unsigned NOT NULL AUTO_INCREMENT, 430 | | `key` VARCHAR(40) NOT NULL DEFAULT '', 431 | | `all_access` TINYINT(1) NOT NULL DEFAULT '0', 432 | | `controller` VARCHAR(50) NOT NULL DEFAULT '', 433 | | `date_created` DATETIME DEFAULT NULL, 434 | | `date_modified` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, 435 | | PRIMARY KEY (`id`) 436 | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 437 | | 438 | */ 439 | $config['rest_enable_access'] = FALSE; 440 | 441 | /* 442 | |-------------------------------------------------------------------------- 443 | | REST API Access Table Name 444 | |-------------------------------------------------------------------------- 445 | | 446 | | If not using the default table schema in 'rest_enable_access', specify the 447 | | table name to match e.g. my_access 448 | | 449 | */ 450 | $config['rest_access_table'] = 'access'; 451 | 452 | /* 453 | |-------------------------------------------------------------------------- 454 | | REST API Param Log Format 455 | |-------------------------------------------------------------------------- 456 | | 457 | | When set to TRUE, the REST API log parameters will be stored in the database as JSON 458 | | Set to FALSE to log as serialized PHP 459 | | 460 | */ 461 | $config['rest_logs_json_params'] = FALSE; 462 | 463 | /* 464 | |-------------------------------------------------------------------------- 465 | | REST Enable Limits 466 | |-------------------------------------------------------------------------- 467 | | 468 | | When set to TRUE, the REST API will count the number of uses of each method 469 | | by an API key each hour. This is a general rule that can be overridden in the 470 | | $this->method array in each controller 471 | | 472 | | Default table schema: 473 | | CREATE TABLE `limits` ( 474 | | `id` INT(11) NOT NULL AUTO_INCREMENT, 475 | | `uri` VARCHAR(255) NOT NULL, 476 | | `count` INT(10) NOT NULL, 477 | | `hour_started` INT(11) NOT NULL, 478 | | `api_key` VARCHAR(40) NOT NULL, 479 | | PRIMARY KEY (`id`) 480 | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 481 | | 482 | | To specify the limits within the controller's __construct() method, add per-method 483 | | limits with: 484 | | 485 | | $this->method['METHOD_NAME']['limit'] = [NUM_REQUESTS_PER_HOUR]; 486 | | 487 | | See application/controllers/api/example.php for examples 488 | */ 489 | $config['rest_enable_limits'] = FALSE; 490 | 491 | /* 492 | |-------------------------------------------------------------------------- 493 | | REST API Limits Table Name 494 | |-------------------------------------------------------------------------- 495 | | 496 | | If not using the default table schema in 'rest_enable_limits', specify the 497 | | table name to match e.g. my_limits 498 | | 499 | */ 500 | $config['rest_limits_table'] = 'limits'; 501 | 502 | /* 503 | |-------------------------------------------------------------------------- 504 | | REST Ignore HTTP Accept 505 | |-------------------------------------------------------------------------- 506 | | 507 | | Set to TRUE to ignore the HTTP Accept and speed up each request a little. 508 | | Only do this if you are using the $this->rest_format or /format/xml in URLs 509 | | 510 | */ 511 | $config['rest_ignore_http_accept'] = FALSE; 512 | 513 | /* 514 | |-------------------------------------------------------------------------- 515 | | REST AJAX Only 516 | |-------------------------------------------------------------------------- 517 | | 518 | | Set to TRUE to allow AJAX requests only. Set to FALSE to accept HTTP requests 519 | | 520 | | Note: If set to TRUE and the request is not AJAX, a 505 response with the 521 | | error message 'Only AJAX requests are accepted.' will be returned. 522 | | 523 | | Hint: This is good for production environments 524 | | 525 | */ 526 | $config['rest_ajax_only'] = FALSE; 527 | 528 | /* 529 | |-------------------------------------------------------------------------- 530 | | REST Language File 531 | |-------------------------------------------------------------------------- 532 | | 533 | | Language file to load from the language directory 534 | | 535 | */ 536 | $config['rest_language'] = 'english'; 537 | 538 | /* 539 | |-------------------------------------------------------------------------- 540 | | CORS Check 541 | |-------------------------------------------------------------------------- 542 | | 543 | | Set to TRUE to enable Cross-Origin Resource Sharing (CORS). Useful if you 544 | | are hosting your API on a different domain from the application that 545 | | will access it through a browser 546 | | 547 | */ 548 | $config['check_cors'] = FALSE; 549 | 550 | /* 551 | |-------------------------------------------------------------------------- 552 | | CORS Allowable Headers 553 | |-------------------------------------------------------------------------- 554 | | 555 | | If using CORS checks, set the allowable headers here 556 | | 557 | */ 558 | $config['allowed_cors_headers'] = [ 559 | 'Origin', 560 | 'X-Requested-With', 561 | 'Content-Type', 562 | 'Accept', 563 | 'Access-Control-Request-Method' 564 | ]; 565 | 566 | /* 567 | |-------------------------------------------------------------------------- 568 | | CORS Allowable Methods 569 | |-------------------------------------------------------------------------- 570 | | 571 | | If using CORS checks, you can set the methods you want to be allowed 572 | | 573 | */ 574 | $config['allowed_cors_methods'] = [ 575 | 'GET', 576 | 'POST', 577 | 'OPTIONS', 578 | 'PUT', 579 | 'PATCH', 580 | 'DELETE' 581 | ]; 582 | 583 | /* 584 | |-------------------------------------------------------------------------- 585 | | CORS Allow Any Domain 586 | |-------------------------------------------------------------------------- 587 | | 588 | | Set to TRUE to enable Cross-Origin Resource Sharing (CORS) from any 589 | | source domain 590 | | 591 | */ 592 | $config['allow_any_cors_domain'] = FALSE; 593 | 594 | /* 595 | |-------------------------------------------------------------------------- 596 | | CORS Allowable Domains 597 | |-------------------------------------------------------------------------- 598 | | 599 | | Used if $config['check_cors'] is set to TRUE and $config['allow_any_cors_domain'] 600 | | is set to FALSE. Set all the allowable domains within the array 601 | | 602 | | e.g. $config['allowed_origins'] = ['http://www.example.com', 'https://spa.example.com'] 603 | | 604 | */ 605 | $config['allowed_cors_origins'] = []; 606 | -------------------------------------------------------------------------------- /application/config/routes.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 | 56 | // User API Routes 57 | $route['api/user/register'] = 'api/users/register'; 58 | $route['api/user/login'] = 'api/users/login'; 59 | 60 | // Users Article Routes 61 | $route['api/article/create'] = 'api/articles/createArticle'; 62 | 63 | // Deleta an Article Routes 64 | # https://codeigniter.com/user_guide/general/routing.html#using-http-verbs-in-routes 65 | $route['api/article/(:num)/delete']["DELETE"] = 'api/articles/deleteArticle/$1'; 66 | 67 | // Update and Article Route :: PUT API Request 68 | $route['api/article/update']["put"] = 'api/articles/updateArticle'; -------------------------------------------------------------------------------- /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/Directory access is forbidden.
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/core/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |Directory access is forbidden.
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/helpers/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |Directory access is forbidden.
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/hooks/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |Directory access is forbidden.
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |Directory access is forbidden.
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/language/bulgarian/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |Directory access is forbidden.
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/language/bulgarian/rest_controller_lang.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |Directory access is forbidden.
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/language/dutch/rest_controller_lang.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |Directory access is forbidden.
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/language/english/rest_controller_lang.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |Directory access is forbidden.
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/language/french/rest_controller_lang.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |Directory access is forbidden.
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/language/german/rest_controller_lang.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |Directory access is forbidden.
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/language/indonesia/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |Directory access is forbidden.
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/language/indonesia/rest_controller_lang.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |Directory access is forbidden.
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/language/italian/rest_controller_lang.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |Directory access is forbidden.
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/language/portuguese-brazilian/rest_controller_lang.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |Directory access is forbidden.
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/language/romanian/rest_controller_lang.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |Directory access is forbidden.
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/language/serbian_cyr/rest_controller_lang.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |Directory access is forbidden.
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/language/serbian_lat/rest_controller_lang.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |Directory access is forbidden.
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/language/simplified-chinese/rest_controller_lang.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |Directory access is forbidden.
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/language/spanish/rest_controller_lang.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |Directory access is forbidden.
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/language/traditional-chinese/rest_controller_lang.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |Directory access is forbidden.
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/language/turkish/rest_controller_lang.php: -------------------------------------------------------------------------------- 1 | CI =& get_instance(); 48 | 49 | /** 50 | * jwt config file load 51 | */ 52 | $this->CI->load->config('jwt'); 53 | 54 | /** 55 | * Load Config Items Values 56 | */ 57 | $this->token_key = $this->CI->config->item('jwt_key'); 58 | $this->token_algorithm = $this->CI->config->item('jwt_algorithm'); 59 | } 60 | 61 | /** 62 | * Generate Token 63 | * @param: user data 64 | */ 65 | public function generateToken($data) 66 | { 67 | try { 68 | return JWT::encode($data, $this->token_key, $this->token_algorithm); 69 | } 70 | catch(Exception $e) { 71 | return 'Message: ' .$e->getMessage(); 72 | } 73 | } 74 | 75 | /** 76 | * Validate Token with Header 77 | * @return : user informations 78 | */ 79 | public function validateToken() 80 | { 81 | /** 82 | * Request All Headers 83 | */ 84 | $headers = $this->CI->input->request_headers(); 85 | 86 | /** 87 | * Authorization Header Exists 88 | */ 89 | $token_data = $this->tokenIsExist($headers); 90 | if($token_data['status'] === TRUE) 91 | { 92 | try 93 | { 94 | /** 95 | * Token Decode 96 | */ 97 | try { 98 | $token_decode = JWT::decode($headers[$token_data['key']], $this->token_key, array($this->token_algorithm)); 99 | } 100 | catch(Exception $e) { 101 | return ['status' => FALSE, 'message' => $e->getMessage()]; 102 | } 103 | 104 | if(!empty($token_decode) AND is_object($token_decode)) 105 | { 106 | // Check User ID (exists and numeric) 107 | if(empty($token_decode->id) OR !is_numeric($token_decode->id)) 108 | { 109 | return ['status' => FALSE, 'message' => 'User ID Not Define!']; 110 | 111 | // Check Token Time 112 | }else if(empty($token_decode->time OR !is_numeric($token_decode->time))) { 113 | 114 | return ['status' => FALSE, 'message' => 'Token Time Not Define!']; 115 | } 116 | else 117 | { 118 | /** 119 | * Check Token Time Valid 120 | */ 121 | $time_difference = strtotime('now') - $token_decode->time; 122 | if( $time_difference >= $this->token_expire_time ) 123 | { 124 | return ['status' => FALSE, 'message' => 'Token Time Expire.']; 125 | 126 | }else 127 | { 128 | /** 129 | * All Validation False Return Data 130 | */ 131 | return ['status' => TRUE, 'data' => $token_decode]; 132 | } 133 | } 134 | 135 | }else{ 136 | return ['status' => FALSE, 'message' => 'Forbidden']; 137 | } 138 | } 139 | catch(Exception $e) { 140 | return ['status' => FALSE, 'message' => $e->getMessage()]; 141 | } 142 | }else 143 | { 144 | // Authorization Header Not Found! 145 | return ['status' => FALSE, 'message' => $token_data['message'] ]; 146 | } 147 | } 148 | 149 | /** 150 | * Validate Token with POST Request 151 | */ 152 | public function validateTokenPost() 153 | { 154 | if(isset($_POST['token'])) 155 | { 156 | $token = $this->CI->input->post('token', TRUE); 157 | if(!empty($token) AND is_string($token) AND !is_array($token)) 158 | { 159 | try 160 | { 161 | /** 162 | * Token Decode 163 | */ 164 | try { 165 | $token_decode = JWT::decode($token, $this->token_key, array($this->token_algorithm)); 166 | } 167 | catch(Exception $e) { 168 | return ['status' => FALSE, 'message' => $e->getMessage()]; 169 | } 170 | 171 | if(!empty($token_decode) AND is_object($token_decode)) 172 | { 173 | // Check User ID (exists and numeric) 174 | if(empty($token_decode->id) OR !is_numeric($token_decode->id)) 175 | { 176 | return ['status' => FALSE, 'message' => 'User ID Not Define!']; 177 | 178 | // Check Token Time 179 | }else if(empty($token_decode->time OR !is_numeric($token_decode->time))) { 180 | 181 | return ['status' => FALSE, 'message' => 'Token Time Not Define!']; 182 | } 183 | else 184 | { 185 | /** 186 | * Check Token Time Valid 187 | */ 188 | $time_difference = strtotime('now') - $token_decode->time; 189 | if( $time_difference >= $this->token_expire_time ) 190 | { 191 | return ['status' => FALSE, 'message' => 'Token Time Expire.']; 192 | 193 | }else 194 | { 195 | /** 196 | * All Validation False Return Data 197 | */ 198 | return ['status' => TRUE, 'data' => $token_decode]; 199 | } 200 | } 201 | 202 | }else{ 203 | return ['status' => FALSE, 'message' => 'Forbidden']; 204 | } 205 | } 206 | catch(Exception $e) { 207 | return ['status' => FALSE, 'message' => $e->getMessage()]; 208 | } 209 | }else 210 | { 211 | return ['status' => FALSE, 'message' => 'Token is not defined.' ]; 212 | } 213 | } else { 214 | return ['status' => FALSE, 'message' => 'Token is not defined.']; 215 | } 216 | } 217 | 218 | /** 219 | * Token Header Check 220 | * @param: request headers 221 | */ 222 | public function tokenIsExist($headers) 223 | { 224 | if(!empty($headers) AND is_array($headers)) { 225 | foreach ($this->token_header as $key) { 226 | if (array_key_exists($key, $headers) AND !empty($key)) 227 | return ['status' => TRUE, 'key' => $key]; 228 | } 229 | } 230 | return ['status' => FALSE, 'message' => 'Token is not defined.']; 231 | } 232 | 233 | /** 234 | * Fetch User Data 235 | * ----------------- 236 | * @param: token 237 | * @return: user_data 238 | */ 239 | public function userData() 240 | { 241 | /** 242 | * Request All Headers 243 | */ 244 | $headers = $this->CI->input->request_headers(); 245 | 246 | /** 247 | * Authorization Header Exists 248 | */ 249 | $token_data = $this->tokenIsExist($headers); 250 | if($token_data['status'] === TRUE) 251 | { 252 | try 253 | { 254 | /** 255 | * Token Decode 256 | */ 257 | try { 258 | $token_decode = JWT::decode($headers[$token_data['key']], $this->token_key, array($this->token_algorithm)); 259 | } 260 | catch(Exception $e) { 261 | return ['status' => FALSE, 'message' => $e->getMessage()]; 262 | } 263 | 264 | if(!empty($token_decode) AND is_object($token_decode)) 265 | { 266 | return $token_decode; 267 | }else{ 268 | return ['status' => FALSE, 'message' => 'Forbidden']; 269 | } 270 | } 271 | catch(Exception $e) { 272 | return ['status' => FALSE, 'message' => $e->getMessage()]; 273 | } 274 | }else 275 | { 276 | // Authorization Header Not Found! 277 | return ['status' => FALSE, 'message' => $token_data['message'] ]; 278 | } 279 | } 280 | } -------------------------------------------------------------------------------- /application/libraries/Format.php: -------------------------------------------------------------------------------- 1 | _CI = &get_instance(); 89 | 90 | // Load the inflector helper 91 | $this->_CI->load->helper('inflector'); 92 | 93 | // If the provided data is already formatted we should probably convert it to an array 94 | if ($from_type !== NULL) 95 | { 96 | if (method_exists($this, '_from_'.$from_type)) 97 | { 98 | $data = call_user_func([$this, '_from_'.$from_type], $data); 99 | } 100 | else 101 | { 102 | throw new Exception('Format class does not support conversion from "'.$from_type.'".'); 103 | } 104 | } 105 | 106 | // Set the member variable to the data passed 107 | $this->_data = $data; 108 | } 109 | 110 | /** 111 | * Create an instance of the format class 112 | * e.g: echo $this->format->factory(['foo' => 'bar'])->to_csv(); 113 | * 114 | * @param mixed $data Data to convert/parse 115 | * @param string $from_type Type to convert from e.g. json, csv, html 116 | * 117 | * @return object Instance of the format class 118 | */ 119 | public function factory($data, $from_type = NULL) 120 | { 121 | // $class = __CLASS__; 122 | // return new $class(); 123 | 124 | return new static($data, $from_type); 125 | } 126 | 127 | // FORMATTING OUTPUT --------------------------------------------------------- 128 | 129 | /** 130 | * Format data as an array 131 | * 132 | * @param mixed|NULL $data Optional data to pass, so as to override the data passed 133 | * to the constructor 134 | * @return array Data parsed as an array; otherwise, an empty array 135 | */ 136 | public function to_array($data = NULL) 137 | { 138 | // If no data is passed as a parameter, then use the data passed 139 | // via the constructor 140 | if ($data === NULL && func_num_args() === 0) 141 | { 142 | $data = $this->_data; 143 | } 144 | 145 | // Cast as an array if not already 146 | if (is_array($data) === FALSE) 147 | { 148 | $data = (array) $data; 149 | } 150 | 151 | $array = []; 152 | foreach ((array) $data as $key => $value) 153 | { 154 | if (is_object($value) === TRUE || is_array($value) === TRUE) 155 | { 156 | $array[$key] = $this->to_array($value); 157 | } 158 | else 159 | { 160 | $array[$key] = $value; 161 | } 162 | } 163 | 164 | return $array; 165 | } 166 | 167 | /** 168 | * Format data as XML 169 | * 170 | * @param mixed|NULL $data Optional data to pass, so as to override the data passed 171 | * to the constructor 172 | * @param NULL $structure 173 | * @param string $basenode 174 | * @return mixed 175 | */ 176 | public function to_xml($data = NULL, $structure = NULL, $basenode = 'xml') 177 | { 178 | if ($data === NULL && func_num_args() === 0) 179 | { 180 | $data = $this->_data; 181 | } 182 | 183 | if ($structure === NULL) 184 | { 185 | $structure = simplexml_load_string("<$basenode />"); 186 | } 187 | 188 | // Force it to be something useful 189 | if (is_array($data) === FALSE && is_object($data) === FALSE) 190 | { 191 | $data = (array) $data; 192 | } 193 | 194 | foreach ($data as $key => $value) 195 | { 196 | 197 | //change false/true to 0/1 198 | if (is_bool($value)) 199 | { 200 | $value = (int) $value; 201 | } 202 | 203 | // no numeric keys in our xml please! 204 | if (is_numeric($key)) 205 | { 206 | // make string key... 207 | $key = (singular($basenode) != $basenode) ? singular($basenode) : 'item'; 208 | } 209 | 210 | // replace anything not alpha numeric 211 | $key = preg_replace('/[^a-z_\-0-9]/i', '', $key); 212 | 213 | if ($key === '_attributes' && (is_array($value) || is_object($value))) 214 | { 215 | $attributes = $value; 216 | if (is_object($attributes)) 217 | { 218 | $attributes = get_object_vars($attributes); 219 | } 220 | 221 | foreach ($attributes as $attribute_name => $attribute_value) 222 | { 223 | $structure->addAttribute($attribute_name, $attribute_value); 224 | } 225 | } 226 | // if there is another array found recursively call this function 227 | elseif (is_array($value) || is_object($value)) 228 | { 229 | $node = $structure->addChild($key); 230 | 231 | // recursive call. 232 | $this->to_xml($value, $node, $key); 233 | } 234 | else 235 | { 236 | // add single node. 237 | $value = htmlspecialchars(html_entity_decode($value, ENT_QUOTES, 'UTF-8'), ENT_QUOTES, 'UTF-8'); 238 | 239 | $structure->addChild($key, $value); 240 | } 241 | } 242 | 243 | return $structure->asXML(); 244 | } 245 | 246 | /** 247 | * Format data as HTML 248 | * 249 | * @param mixed|NULL $data Optional data to pass, so as to override the data passed 250 | * to the constructor 251 | * @return mixed 252 | */ 253 | public function to_html($data = NULL) 254 | { 255 | // If no data is passed as a parameter, then use the data passed 256 | // via the constructor 257 | if ($data === NULL && func_num_args() === 0) 258 | { 259 | $data = $this->_data; 260 | } 261 | 262 | // Cast as an array if not already 263 | if (is_array($data) === FALSE) 264 | { 265 | $data = (array) $data; 266 | } 267 | 268 | // Check if it's a multi-dimensional array 269 | if (isset($data[0]) && count($data) !== count($data, COUNT_RECURSIVE)) 270 | { 271 | // Multi-dimensional array 272 | $headings = array_keys($data[0]); 273 | } 274 | else 275 | { 276 | // Single array 277 | $headings = array_keys($data); 278 | $data = [$data]; 279 | } 280 | 281 | // Load the table library 282 | $this->_CI->load->library('table'); 283 | 284 | $this->_CI->table->set_heading($headings); 285 | 286 | foreach ($data as $row) 287 | { 288 | // Suppressing the "array to string conversion" notice 289 | // Keep the "evil" @ here 290 | $row = @array_map('strval', $row); 291 | 292 | $this->_CI->table->add_row($row); 293 | } 294 | 295 | return $this->_CI->table->generate(); 296 | } 297 | 298 | /** 299 | * @link http://www.metashock.de/2014/02/create-csv-file-in-memory-php/ 300 | * @param mixed|NULL $data Optional data to pass, so as to override the data passed 301 | * to the constructor 302 | * @param string $delimiter The optional delimiter parameter sets the field 303 | * delimiter (one character only). NULL will use the default value (,) 304 | * @param string $enclosure The optional enclosure parameter sets the field 305 | * enclosure (one character only). NULL will use the default value (") 306 | * @return string A csv string 307 | */ 308 | public function to_csv($data = NULL, $delimiter = ',', $enclosure = '"') 309 | { 310 | // Use a threshold of 1 MB (1024 * 1024) 311 | $handle = fopen('php://temp/maxmemory:1048576', 'w'); 312 | if ($handle === FALSE) 313 | { 314 | return NULL; 315 | } 316 | 317 | // If no data is passed as a parameter, then use the data passed 318 | // via the constructor 319 | if ($data === NULL && func_num_args() === 0) 320 | { 321 | $data = $this->_data; 322 | } 323 | 324 | // If NULL, then set as the default delimiter 325 | if ($delimiter === NULL) 326 | { 327 | $delimiter = ','; 328 | } 329 | 330 | // If NULL, then set as the default enclosure 331 | if ($enclosure === NULL) 332 | { 333 | $enclosure = '"'; 334 | } 335 | 336 | // Cast as an array if not already 337 | if (is_array($data) === FALSE) 338 | { 339 | $data = (array) $data; 340 | } 341 | 342 | // Check if it's a multi-dimensional array 343 | if (isset($data[0]) && count($data) !== count($data, COUNT_RECURSIVE)) 344 | { 345 | // Multi-dimensional array 346 | $headings = array_keys($data[0]); 347 | } 348 | else 349 | { 350 | // Single array 351 | $headings = array_keys($data); 352 | $data = [$data]; 353 | } 354 | 355 | // Apply the headings 356 | fputcsv($handle, $headings, $delimiter, $enclosure); 357 | 358 | foreach ($data as $record) 359 | { 360 | // If the record is not an array, then break. This is because the 2nd param of 361 | // fputcsv() should be an array 362 | if (is_array($record) === FALSE) 363 | { 364 | break; 365 | } 366 | 367 | // Suppressing the "array to string conversion" notice. 368 | // Keep the "evil" @ here. 369 | $record = @ array_map('strval', $record); 370 | 371 | // Returns the length of the string written or FALSE 372 | fputcsv($handle, $record, $delimiter, $enclosure); 373 | } 374 | 375 | // Reset the file pointer 376 | rewind($handle); 377 | 378 | // Retrieve the csv contents 379 | $csv = stream_get_contents($handle); 380 | 381 | // Close the handle 382 | fclose($handle); 383 | 384 | return $csv; 385 | } 386 | 387 | /** 388 | * Encode data as json 389 | * 390 | * @param mixed|NULL $data Optional data to pass, so as to override the data passed 391 | * to the constructor 392 | * @return string Json representation of a value 393 | */ 394 | public function to_json($data = NULL) 395 | { 396 | // If no data is passed as a parameter, then use the data passed 397 | // via the constructor 398 | if ($data === NULL && func_num_args() === 0) 399 | { 400 | $data = $this->_data; 401 | } 402 | 403 | // Get the callback parameter (if set) 404 | $callback = $this->_CI->input->get('callback'); 405 | 406 | if (empty($callback) === TRUE) 407 | { 408 | return json_encode($data); 409 | } 410 | 411 | // We only honour a jsonp callback which are valid javascript identifiers 412 | elseif (preg_match('/^[a-z_\$][a-z0-9\$_]*(\.[a-z_\$][a-z0-9\$_]*)*$/i', $callback)) 413 | { 414 | // Return the data as encoded json with a callback 415 | return $callback.'('.json_encode($data).');'; 416 | } 417 | 418 | // An invalid jsonp callback function provided. 419 | // Though I don't believe this should be hardcoded here 420 | $data['warning'] = 'INVALID JSONP CALLBACK: '.$callback; 421 | 422 | return json_encode($data); 423 | } 424 | 425 | /** 426 | * Encode data as a serialized array 427 | * 428 | * @param mixed|NULL $data Optional data to pass, so as to override the data passed 429 | * to the constructor 430 | * @return string Serialized data 431 | */ 432 | public function to_serialized($data = NULL) 433 | { 434 | // If no data is passed as a parameter, then use the data passed 435 | // via the constructor 436 | if ($data === NULL && func_num_args() === 0) 437 | { 438 | $data = $this->_data; 439 | } 440 | 441 | return serialize($data); 442 | } 443 | 444 | /** 445 | * Format data using a PHP structure 446 | * 447 | * @param mixed|NULL $data Optional data to pass, so as to override the data passed 448 | * to the constructor 449 | * @return mixed String representation of a variable 450 | */ 451 | public function to_php($data = NULL) 452 | { 453 | // If no data is passed as a parameter, then use the data passed 454 | // via the constructor 455 | if ($data === NULL && func_num_args() === 0) 456 | { 457 | $data = $this->_data; 458 | } 459 | 460 | return var_export($data, TRUE); 461 | } 462 | 463 | // INTERNAL FUNCTIONS 464 | 465 | /** 466 | * @param string $data XML string 467 | * @return array XML element object; otherwise, empty array 468 | */ 469 | protected function _from_xml($data) 470 | { 471 | return $data ? (array) simplexml_load_string($data, 'SimpleXMLElement', LIBXML_NOCDATA) : []; 472 | } 473 | 474 | /** 475 | * @param string $data CSV string 476 | * @param string $delimiter The optional delimiter parameter sets the field 477 | * delimiter (one character only). NULL will use the default value (,) 478 | * @param string $enclosure The optional enclosure parameter sets the field 479 | * enclosure (one character only). NULL will use the default value (") 480 | * @return array A multi-dimensional array with the outer array being the number of rows 481 | * and the inner arrays the individual fields 482 | */ 483 | protected function _from_csv($data, $delimiter = ',', $enclosure = '"') 484 | { 485 | // If NULL, then set as the default delimiter 486 | if ($delimiter === NULL) 487 | { 488 | $delimiter = ','; 489 | } 490 | 491 | // If NULL, then set as the default enclosure 492 | if ($enclosure === NULL) 493 | { 494 | $enclosure = '"'; 495 | } 496 | 497 | return str_getcsv($data, $delimiter, $enclosure); 498 | } 499 | 500 | /** 501 | * @param string $data Encoded json string 502 | * @return mixed Decoded json string with leading and trailing whitespace removed 503 | */ 504 | protected function _from_json($data) 505 | { 506 | return json_decode(trim($data)); 507 | } 508 | 509 | /** 510 | * @param string $data Data to unserialize 511 | * @return mixed Unserialized data 512 | */ 513 | protected function _from_serialize($data) 514 | { 515 | return unserialize(trim($data)); 516 | } 517 | 518 | /** 519 | * @param string $data Data to trim leading and trailing whitespace 520 | * @return string Data with leading and trailing whitespace removed 521 | */ 522 | protected function _from_php($data) 523 | { 524 | return trim($data); 525 | } 526 | } 527 | -------------------------------------------------------------------------------- /application/libraries/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |Directory access is forbidden.
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/logs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |Directory access is forbidden.
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/models/Article_model.php: -------------------------------------------------------------------------------- 1 | db->insert($this->article_table, $data); 13 | return $this->db->insert_id(); 14 | } 15 | 16 | /** 17 | * Delete an Article 18 | * @param: {array} Article Data 19 | */ 20 | public function delete_article(array $data) 21 | { 22 | /** 23 | * Check Article exist with article_id and user_id 24 | */ 25 | $query = $this->db->get_where($this->article_table, $data); 26 | if ($this->db->affected_rows() > 0) { 27 | 28 | // Delete Article 29 | $this->db->delete($this->article_table, $data); 30 | if ($this->db->affected_rows() > 0) { 31 | return true; 32 | } 33 | return false; 34 | } 35 | return false; 36 | } 37 | 38 | /** 39 | * Update an Article 40 | * @param: {array} Article Data 41 | */ 42 | public function update_article(array $data) 43 | { 44 | /** 45 | * Check Article exist with article_id and user_id 46 | */ 47 | $query = $this->db->get_where($this->article_table, [ 48 | 'user_id' => $data['user_id'], 49 | 'id' => $data['id'], 50 | ]); 51 | 52 | if ($this->db->affected_rows() > 0) { 53 | 54 | // Update an Article 55 | $update_data = [ 56 | 'title' => $data['title'], 57 | 'description' => $data['description'], 58 | 'updated_at' => time(), 59 | ]; 60 | 61 | return $this->db->update($this->article_table, $update_data, ['id' => $query->row('id')]); 62 | } 63 | return false; 64 | } 65 | } -------------------------------------------------------------------------------- /application/models/User_model.php: -------------------------------------------------------------------------------- 1 | db->insert($this->user_table, $data); 13 | return $this->db->insert_id(); 14 | } 15 | 16 | /** 17 | * User Login 18 | * ---------------------------------- 19 | * @param: username or email address 20 | * @param: password 21 | */ 22 | public function user_login($username, $password) 23 | { 24 | $this->db->where('email', $username); 25 | $this->db->or_where('username', $username); 26 | $q = $this->db->get($this->user_table); 27 | 28 | if( $q->num_rows() ) 29 | { 30 | $user_pass = $q->row('password'); 31 | if(md5($password) === $user_pass) { 32 | return $q->row(); 33 | } 34 | return FALSE; 35 | }else{ 36 | return FALSE; 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /application/models/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |Directory access is forbidden.
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/third_party/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |Directory access is forbidden.
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/third_party/php-jwt/BeforeValidException.php: -------------------------------------------------------------------------------- 1 | 18 | * @author Anant NarayananDirectory access is forbidden.
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/views/errors/html/error_404.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 |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 |
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 |
Directory access is forbidden.
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/views/errors/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |Directory access is forbidden.
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/views/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |Directory access is forbidden.
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/views/welcome_message.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 |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 |