Directory access is forbidden.
- - - + + + +Directory access is forbidden.
+ + + diff --git a/api/config/alipay.php b/api/config/alipay.php index bc1d1604..dbea1eea 100644 --- a/api/config/alipay.php +++ b/api/config/alipay.php @@ -1,14 +1,14 @@ - [ - 'app_id' => '2021000118631895', - 'private_key' => 'MIIEpAIBAAKCAQEAk/KCpSBSJT8Ym6E2q8RhWXj6RHxP0orUOey/5pihXRj0UzQQiiB8pIb5TcB7G8bFSszhgao7DiObYnWUUvUpAGG8tL7aC+Td7JL11PR5Bv1e1HnymCrNWr/LrUAFBpmQ5480/BAX04SZh/RXRrYiM+L5JSRFwiiXaQ2lc9Q1oa+paKe6d19ZiHZ50JN9I9HLPmqchOLK+yIRRPyPoc0TOI7bz1kEW+U76/S+nE8RmSKq+LvDgWzgi4lIt1NXxfSU6z+MAtQHAF6TFeglquGnvFOHU/MkCPQ/+57n31L7DTEGsaLcUZfkipE70nlrYrJgE/jrqQLW4TsRPhJT2bUx4wIDAQABAoIBAHqCCeSqSttE0B+u8xJw3xuzrakgNwjkpLACdzV/lb79dvOe3UNDe3LRwYa8qDRr99rkpKc2Swh+O6DgNB4tm/IQ/K2+i9flgE7xslbQyZccH3ZaNKQEbV+ECihAJuk8KF1WnE1NFi20U13c2phXISNOA3jZ/Fm2Owpmnma3hmGHRbiXImsLhIDFl035Ekt605plriy6yvm6wyvdGGATQsXxDQ0CcOlWdgug7U+vyIc/afRC2kj/afVFqLFyUT2Xo1nTeedwTTSQ/rXRIurdLUVm75SDP1mdoAC+wMd/6LgY7byKPxlSslyaBm73o95feu7sV2dXhDipwThI+p1dQiECgYEA8wwk+l9Cxw5qZPtOXmLMUoqOtkESnZLIaFusm5Z0E1zdZhessVHQmWQ5RsVvYGYvcCG0ujTWNi6sq1fiPeZKnZj+r9Cy8UCQDssS3pV0jvy6ozKZvRMGzugQx3cPrmjwHO3Z6ycrtvz+la/H4VsWwdid8Tx1/KifHJq7XXQ3R/cCgYEAm9TuQOebvBA325rBJZnX6Ats6E9un9j5FRh7/j9CRHFFZmec79NX+306GH1j7WWO0g9nusQKysu9W54S37gIwta9h+46Hxq1bIqctDlL2SpgsZT8ZV8ejQePZwsaEaMh68u1yplPHuUWP4T+LEcH3X1E8l5KQ8Gg/B6aQXKRonUCgYEAqinKifDAFBWnr+OyzqplWzTfDgMpQWFPJqFoi9Yelp/h8mSI5+zcG0jsQPxiKh/g/qTan7P2diDfi2cQYz4k54oCZp27auVE9tZ+84+395RCJ5h5wsLbdWlMthpJxFZ8JgTxGY5nMMqYg7x6OPFJUZaTnh4yjR6Rp7k9jQSc36kCgYA5LQFWEyTS9ehozPk9QJs1aqvE+RAP2l5Z3Sfxe2hnEGB0WGP+or7PaX0dazR08CRc8oYOwstq6SJLMU6fgzjDtGLKMyBkNTqH3rvsbHFl9uSPg6iv0Ry2hiWZmzsvaXmSuKW09ldPcKKfH77apB1AqSvY+bup7KuSle/nP5Ar2QKBgQCbufjQ4I7Iej+KLz8/WVDIWa2to0tkQGxCUoVqxIxRQW8lHhRu5v9Y/gQ6d8dvx7rXb6V0VDf1joPFxnu3FwwMteMpQ8VrbH9vyqktSwCvU5t2dolcpv0MeePz9NPYdmz/MA/YIOmiUt0CVmca4q8WDNtJqjxShoIdbTH9oFXkeQ==', - 'public_key' => 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAk0FzytqTSTh3o8/Lbryi76MxKpOjJM4tho8HlzpOHFfPZ9JEnEQ+ddNcoSQaNfWJU3T73BDfNoaOZllWB13pvU3D/ZWGYkAJRLX4jT97Xvf9SYwyoEt5R2FTRQWBJT3N7sPX8NoM+dvEeqA9LgwY5Z6sIu9SxouPsfzCJSKjCmlcDoZJ1xjxusrqQF6gLkPW1loPFwx2xUQUFrGW4q1Yd8XwiqgljCqrLwi2tnZ3r5YOI1bIL589olUHf2KdNtH6KN7pC2+I5ovKEvuAZk7X6tPxYbxy5GSU1rWNhhNLpRL/RBTt+3dlqW/yadf/c3dHGVygSMo90KrG9uuOp/q5BQIDAQAB', - ] -]; + [ + 'app_id' => '2021000118631895', + 'private_key' => 'MIIEpAIBAAKCAQEAk/KCpSBSJT8Ym6E2q8RhWXj6RHxP0orUOey/5pihXRj0UzQQiiB8pIb5TcB7G8bFSszhgao7DiObYnWUUvUpAGG8tL7aC+Td7JL11PR5Bv1e1HnymCrNWr/LrUAFBpmQ5480/BAX04SZh/RXRrYiM+L5JSRFwiiXaQ2lc9Q1oa+paKe6d19ZiHZ50JN9I9HLPmqchOLK+yIRRPyPoc0TOI7bz1kEW+U76/S+nE8RmSKq+LvDgWzgi4lIt1NXxfSU6z+MAtQHAF6TFeglquGnvFOHU/MkCPQ/+57n31L7DTEGsaLcUZfkipE70nlrYrJgE/jrqQLW4TsRPhJT2bUx4wIDAQABAoIBAHqCCeSqSttE0B+u8xJw3xuzrakgNwjkpLACdzV/lb79dvOe3UNDe3LRwYa8qDRr99rkpKc2Swh+O6DgNB4tm/IQ/K2+i9flgE7xslbQyZccH3ZaNKQEbV+ECihAJuk8KF1WnE1NFi20U13c2phXISNOA3jZ/Fm2Owpmnma3hmGHRbiXImsLhIDFl035Ekt605plriy6yvm6wyvdGGATQsXxDQ0CcOlWdgug7U+vyIc/afRC2kj/afVFqLFyUT2Xo1nTeedwTTSQ/rXRIurdLUVm75SDP1mdoAC+wMd/6LgY7byKPxlSslyaBm73o95feu7sV2dXhDipwThI+p1dQiECgYEA8wwk+l9Cxw5qZPtOXmLMUoqOtkESnZLIaFusm5Z0E1zdZhessVHQmWQ5RsVvYGYvcCG0ujTWNi6sq1fiPeZKnZj+r9Cy8UCQDssS3pV0jvy6ozKZvRMGzugQx3cPrmjwHO3Z6ycrtvz+la/H4VsWwdid8Tx1/KifHJq7XXQ3R/cCgYEAm9TuQOebvBA325rBJZnX6Ats6E9un9j5FRh7/j9CRHFFZmec79NX+306GH1j7WWO0g9nusQKysu9W54S37gIwta9h+46Hxq1bIqctDlL2SpgsZT8ZV8ejQePZwsaEaMh68u1yplPHuUWP4T+LEcH3X1E8l5KQ8Gg/B6aQXKRonUCgYEAqinKifDAFBWnr+OyzqplWzTfDgMpQWFPJqFoi9Yelp/h8mSI5+zcG0jsQPxiKh/g/qTan7P2diDfi2cQYz4k54oCZp27auVE9tZ+84+395RCJ5h5wsLbdWlMthpJxFZ8JgTxGY5nMMqYg7x6OPFJUZaTnh4yjR6Rp7k9jQSc36kCgYA5LQFWEyTS9ehozPk9QJs1aqvE+RAP2l5Z3Sfxe2hnEGB0WGP+or7PaX0dazR08CRc8oYOwstq6SJLMU6fgzjDtGLKMyBkNTqH3rvsbHFl9uSPg6iv0Ry2hiWZmzsvaXmSuKW09ldPcKKfH77apB1AqSvY+bup7KuSle/nP5Ar2QKBgQCbufjQ4I7Iej+KLz8/WVDIWa2to0tkQGxCUoVqxIxRQW8lHhRu5v9Y/gQ6d8dvx7rXb6V0VDf1joPFxnu3FwwMteMpQ8VrbH9vyqktSwCvU5t2dolcpv0MeePz9NPYdmz/MA/YIOmiUt0CVmca4q8WDNtJqjxShoIdbTH9oFXkeQ==', + 'public_key' => 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAk0FzytqTSTh3o8/Lbryi76MxKpOjJM4tho8HlzpOHFfPZ9JEnEQ+ddNcoSQaNfWJU3T73BDfNoaOZllWB13pvU3D/ZWGYkAJRLX4jT97Xvf9SYwyoEt5R2FTRQWBJT3N7sPX8NoM+dvEeqA9LgwY5Z6sIu9SxouPsfzCJSKjCmlcDoZJ1xjxusrqQF6gLkPW1loPFwx2xUQUFrGW4q1Yd8XwiqgljCqrLwi2tnZ3r5YOI1bIL589olUHf2KdNtH6KN7pC2+I5ovKEvuAZk7X6tPxYbxy5GSU1rWNhhNLpRL/RBTt+3dlqW/yadf/c3dHGVygSMo90KrG9uuOp/q5BQIDAQAB', + ] +]; diff --git a/api/config/app.php b/api/config/app.php index b9648207..ac3c5359 100644 --- a/api/config/app.php +++ b/api/config/app.php @@ -1,16 +1,23 @@ - array( - 'id' => 2, - 'app_id' => 2, - 'name' => '狸车宝', - 'sign_key' => '71fd71173b776766a2ae1209d9a2c2ed', - 'wx' => array( - 'appid' => 'wx4733380c110313ec', - 'secret' => 'cfa1bb15b671f919e959100c0b4070a2', - ), - 'model' => array('user_model' => 'app/licheb/app_licheb_users_model') - ), -); + array( + 'id' => 2, + 'app_id' => 2, + 'name' => '狸车宝', + 'sign_key' => '71fd71173b776766a2ae1209d9a2c2ed', + 'wx' => array( + 'appid' => 'wx4733380c110313ec', + 'secret' => 'cfa1bb15b671f919e959100c0b4070a2', + ), + 'model' => array('user_model' => 'app/licheb/app_licheb_users_model') + ) +); diff --git a/api/config/autoload.php b/api/config/autoload.php index 80cccc18..fd7e2734 100644 --- a/api/config/autoload.php +++ b/api/config/autoload.php @@ -1,135 +1,135 @@ - 'ua'); -*/ -$autoload['libraries'] = array('database'); - -/* -| ------------------------------------------------------------------- -| Auto-load Drivers -| ------------------------------------------------------------------- -| These classes are located in system/libraries/ or in your -| application/libraries/ directory, but are also placed inside their -| own subdirectory and they extend the CI_Driver_Library class. They -| offer multiple interchangeable driver options. -| -| Prototype: -| -| $autoload['drivers'] = array('cache'); -| -| You can also supply an alternative property name to be assigned in -| the controller: -| -| $autoload['drivers'] = array('cache' => 'cch'); -| -*/ -$autoload['drivers'] = array(); - -/* -| ------------------------------------------------------------------- -| Auto-load Helper Files -| ------------------------------------------------------------------- -| Prototype: -| -| $autoload['helper'] = array('url', 'file'); -*/ -$autoload['helper'] = array('comm', 'url', 'array','order'); - -/* -| ------------------------------------------------------------------- -| Auto-load Config files -| ------------------------------------------------------------------- -| Prototype: -| -| $autoload['config'] = array('config1', 'config2'); -| -| NOTE: This item is intended for use ONLY if you have created custom -| config files. Otherwise, leave it blank. -| -*/ -$autoload['config'] = array(); - -/* -| ------------------------------------------------------------------- -| Auto-load Language files -| ------------------------------------------------------------------- -| Prototype: -| -| $autoload['language'] = array('lang1', 'lang2'); -| -| NOTE: Do not include the "_lang" part of your file. For example -| "codeigniter_lang.php" would be referenced as array('codeigniter'); -| -*/ -$autoload['language'] = array(); - -/* -| ------------------------------------------------------------------- -| Auto-load Models -| ------------------------------------------------------------------- -| Prototype: -| -| $autoload['model'] = array('first_model', 'second_model'); -| -| You can also supply an alternative model name to be assigned -| in the controller: -| -| $autoload['model'] = array('first_model' => 'first'); -*/ -$autoload['model'] = array(); + 'ua'); +*/ +$autoload['libraries'] = array('database'); + +/* +| ------------------------------------------------------------------- +| Auto-load Drivers +| ------------------------------------------------------------------- +| These classes are located in system/libraries/ or in your +| application/libraries/ directory, but are also placed inside their +| own subdirectory and they extend the CI_Driver_Library class. They +| offer multiple interchangeable driver options. +| +| Prototype: +| +| $autoload['drivers'] = array('cache'); +| +| You can also supply an alternative property name to be assigned in +| the controller: +| +| $autoload['drivers'] = array('cache' => 'cch'); +| +*/ +$autoload['drivers'] = array(); + +/* +| ------------------------------------------------------------------- +| Auto-load Helper Files +| ------------------------------------------------------------------- +| Prototype: +| +| $autoload['helper'] = array('url', 'file'); +*/ +$autoload['helper'] = array('comm', 'url', 'array','order'); + +/* +| ------------------------------------------------------------------- +| Auto-load Config files +| ------------------------------------------------------------------- +| Prototype: +| +| $autoload['config'] = array('config1', 'config2'); +| +| NOTE: This item is intended for use ONLY if you have created custom +| config files. Otherwise, leave it blank. +| +*/ +$autoload['config'] = array(); + +/* +| ------------------------------------------------------------------- +| Auto-load Language files +| ------------------------------------------------------------------- +| Prototype: +| +| $autoload['language'] = array('lang1', 'lang2'); +| +| NOTE: Do not include the "_lang" part of your file. For example +| "codeigniter_lang.php" would be referenced as array('codeigniter'); +| +*/ +$autoload['language'] = array(); + +/* +| ------------------------------------------------------------------- +| Auto-load Models +| ------------------------------------------------------------------- +| Prototype: +| +| $autoload['model'] = array('first_model', 'second_model'); +| +| You can also supply an alternative model name to be assigned +| in the controller: +| +| $autoload['model'] = array('first_model' => 'first'); +*/ +$autoload['model'] = array(); diff --git a/api/config/config.php b/api/config/config.php index 74faa632..add5e679 100644 --- a/api/config/config.php +++ b/api/config/config.php @@ -1,523 +1,523 @@ -]+$/i -| -| DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!! -| -*/ -$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-'; - -/* -|-------------------------------------------------------------------------- -| Enable Query Strings -|-------------------------------------------------------------------------- -| -| By default CodeIgniter uses search-engine friendly segment based URLs: -| example.com/who/what/where/ -| -| You can optionally enable standard query string based URLs: -| example.com?who=me&what=something&where=here -| -| Options are: TRUE or FALSE (boolean) -| -| The other items let you set the query string 'words' that will -| invoke your controllers and its functions: -| example.com/index.php?c=controller&m=function -| -| Please note that some of the helpers won't work as expected when -| this feature is enabled, since CodeIgniter is designed primarily to -| use segment based URLs. -| -*/ -$config['enable_query_strings'] = FALSE; -$config['controller_trigger'] = 'c'; -$config['function_trigger'] = 'm'; -$config['directory_trigger'] = 'd'; - -/* -|-------------------------------------------------------------------------- -| Allow $_GET array -|-------------------------------------------------------------------------- -| -| By default CodeIgniter enables access to the $_GET array. If for some -| reason you would like to disable it, set 'allow_get_array' to FALSE. -| -| WARNING: This feature is DEPRECATED and currently available only -| for backwards compatibility purposes! -| -*/ -$config['allow_get_array'] = TRUE; - -/* -|-------------------------------------------------------------------------- -| Error Logging Threshold -|-------------------------------------------------------------------------- -| -| You can enable error logging by setting a threshold over zero. The -| threshold determines what gets logged. Threshold options are: -| -| 0 = Disables logging, Error logging TURNED OFF -| 1 = Error Messages (including PHP errors) -| 2 = Debug Messages -| 3 = Informational Messages -| 4 = All Messages -| -| You can also pass an array with threshold levels to show individual error types -| -| array(2) = Debug Messages, without Error Messages -| -| For a live site you'll usually only enable Errors (1) to be logged otherwise -| your log files will fill up very fast. -| -*/ -$config['log_threshold'] = 1; - -/* -|-------------------------------------------------------------------------- -| Error Logging Directory Path -|-------------------------------------------------------------------------- -| -| Leave this BLANK unless you would like to set something other than the default -| application/logs/ directory. Use a full server path with trailing slash. -| -*/ -$config['log_path'] = ''; - -/* -|-------------------------------------------------------------------------- -| Log File Extension -|-------------------------------------------------------------------------- -| -| The default filename extension for log files. The default 'php' allows for -| protecting the log files via basic scripting, when they are to be stored -| under a publicly accessible directory. -| -| Note: Leaving it blank will default to 'php'. -| -*/ -$config['log_file_extension'] = ''; - -/* -|-------------------------------------------------------------------------- -| Log File Permissions -|-------------------------------------------------------------------------- -| -| The file system permissions to be applied on newly created log files. -| -| IMPORTANT: This MUST be an integer (no quotes) and you MUST use octal -| integer notation (i.e. 0700, 0644, etc.) -*/ -$config['log_file_permissions'] = 0644; - -/* -|-------------------------------------------------------------------------- -| Date Format for Logs -|-------------------------------------------------------------------------- -| -| Each item that is logged has an associated date. You can use PHP date -| codes to set your own date formatting -| -*/ -$config['log_date_format'] = 'Y-m-d H:i:s'; - -/* -|-------------------------------------------------------------------------- -| Error Views Directory Path -|-------------------------------------------------------------------------- -| -| Leave this BLANK unless you would like to set something other than the default -| application/views/errors/ directory. Use a full server path with trailing slash. -| -*/ -$config['error_views_path'] = ''; - -/* -|-------------------------------------------------------------------------- -| Cache Directory Path -|-------------------------------------------------------------------------- -| -| Leave this BLANK unless you would like to set something other than the default -| application/cache/ directory. Use a full server path with trailing slash. -| -*/ -$config['cache_path'] = ''; - -/* -|-------------------------------------------------------------------------- -| Cache Include Query String -|-------------------------------------------------------------------------- -| -| Whether to take the URL query string into consideration when generating -| output cache files. Valid options are: -| -| FALSE = Disabled -| TRUE = Enabled, take all query parameters into account. -| Please be aware that this may result in numerous cache -| files generated for the same page over and over again. -| array('q') = Enabled, but only take into account the specified list -| of query parameters. -| -*/ -$config['cache_query_string'] = FALSE; - -/* -|-------------------------------------------------------------------------- -| Encryption Key -|-------------------------------------------------------------------------- -| -| If you use the Encryption class, you must set an encryption key. -| See the user guide for more info. -| -| https://codeigniter.com/user_guide/libraries/encryption.html -| -*/ -$config['encryption_key'] = 'haodian.ai'; - -/* -|-------------------------------------------------------------------------- -| Session Variables -|-------------------------------------------------------------------------- -| -| 'sess_driver' -| -| The storage driver to use: files, database, redis, memcached -| -| 'sess_cookie_name' -| -| The session cookie name, must contain only [0-9a-z_-] characters -| -| 'sess_expiration' -| -| The number of SECONDS you want the session to last. -| Setting to 0 (zero) means expire when the browser is closed. -| -| 'sess_save_path' -| -| The location to save sessions to, driver dependent. -| -| For the 'files' driver, it's a path to a writable directory. -| WARNING: Only absolute paths are supported! -| -| For the 'database' driver, it's a table name. -| Please read up the manual for the format with other session drivers. -| -| IMPORTANT: You are REQUIRED to set a valid save path! -| -| 'sess_match_ip' -| -| Whether to match the user's IP address when reading the session data. -| -| WARNING: If you're using the database driver, don't forget to update -| your session table's PRIMARY KEY when changing this setting. -| -| 'sess_time_to_update' -| -| How many seconds between CI regenerating the session ID. -| -| 'sess_regenerate_destroy' -| -| Whether to destroy session data associated with the old session ID -| when auto-regenerating the session ID. When set to FALSE, the data -| will be later deleted by the garbage collector. -| -| Other session cookie settings are shared with the rest of the application, -| except for 'cookie_prefix' and 'cookie_httponly', which are ignored here. -| -*/ -$config['sess_driver'] = 'files'; -$config['sess_cookie_name'] = 'ci_session'; -$config['sess_expiration'] = 7200; -$config['sess_save_path'] = NULL; -$config['sess_match_ip'] = FALSE; -$config['sess_time_to_update'] = 300; -$config['sess_regenerate_destroy'] = FALSE; - -/* -|-------------------------------------------------------------------------- -| Cookie Related Variables -|-------------------------------------------------------------------------- -| -| 'cookie_prefix' = Set a cookie name prefix if you need to avoid collisions -| 'cookie_domain' = Set to .your-domain.com for site-wide cookies -| 'cookie_path' = Typically will be a forward slash -| 'cookie_secure' = Cookie will only be set if a secure HTTPS connection exists. -| 'cookie_httponly' = Cookie will only be accessible via HTTP(S) (no javascript) -| -| Note: These settings (with the exception of 'cookie_prefix' and -| 'cookie_httponly') will also affect sessions. -| -*/ -$config['cookie_prefix'] = ''; -$config['cookie_domain'] = ''; -$config['cookie_path'] = '/'; -$config['cookie_secure'] = FALSE; -$config['cookie_httponly'] = FALSE; - -/* -|-------------------------------------------------------------------------- -| Standardize newlines -|-------------------------------------------------------------------------- -| -| Determines whether to standardize newline characters in input data, -| meaning to replace \r\n, \r, \n occurrences with the PHP_EOL value. -| -| WARNING: This feature is DEPRECATED and currently available only -| for backwards compatibility purposes! -| -*/ -$config['standardize_newlines'] = FALSE; - -/* -|-------------------------------------------------------------------------- -| Global XSS Filtering -|-------------------------------------------------------------------------- -| -| Determines whether the XSS filter is always active when GET, POST or -| COOKIE data is encountered -| -| WARNING: This feature is DEPRECATED and currently available only -| for backwards compatibility purposes! -| -*/ -$config['global_xss_filtering'] = FALSE; - -/* -|-------------------------------------------------------------------------- -| Cross Site Request Forgery -|-------------------------------------------------------------------------- -| Enables a CSRF cookie token to be set. When set to TRUE, token will be -| checked on a submitted form. If you are accepting user data, it is strongly -| recommended CSRF protection be enabled. -| -| 'csrf_token_name' = The token name -| 'csrf_cookie_name' = The cookie name -| 'csrf_expire' = The number in seconds the token should expire. -| 'csrf_regenerate' = Regenerate token on every submission -| 'csrf_exclude_uris' = Array of URIs which ignore CSRF checks -*/ -$config['csrf_protection'] = FALSE; -$config['csrf_token_name'] = 'csrf_test_name'; -$config['csrf_cookie_name'] = 'csrf_cookie_name'; -$config['csrf_expire'] = 7200; -$config['csrf_regenerate'] = TRUE; -$config['csrf_exclude_uris'] = array(); - -/* -|-------------------------------------------------------------------------- -| Output Compression -|-------------------------------------------------------------------------- -| -| Enables Gzip output compression for faster page loads. When enabled, -| the output class will test whether your server supports Gzip. -| Even if it does, however, not all browsers support compression -| so enable only if you are reasonably sure your visitors can handle it. -| -| Only used if zlib.output_compression is turned off in your php.ini. -| Please do not use it together with httpd-level output compression. -| -| VERY IMPORTANT: If you are getting a blank page when compression is enabled it -| means you are prematurely outputting something to your browser. It could -| even be a line of whitespace at the end of one of your scripts. For -| compression to work, nothing can be sent before the output buffer is called -| by the output class. Do not 'echo' any values with compression enabled. -| -*/ -$config['compress_output'] = FALSE; - -/* -|-------------------------------------------------------------------------- -| Master Time Reference -|-------------------------------------------------------------------------- -| -| Options are 'local' or any PHP supported timezone. This preference tells -| the system whether to use your server's local time as the master 'now' -| reference, or convert it to the configured one timezone. See the 'date -| helper' page of the user guide for information regarding date handling. -| -*/ -$config['time_reference'] = 'local'; - -/* -|-------------------------------------------------------------------------- -| Rewrite PHP Short Tags -|-------------------------------------------------------------------------- -| -| If your PHP installation does not have short tag support enabled CI -| can rewrite the tags on-the-fly, enabling you to utilize that syntax -| in your view files. Options are TRUE or FALSE (boolean) -| -| Note: You need to have eval() enabled for this to work. -| -*/ -$config['rewrite_short_tags'] = FALSE; - -/* -|-------------------------------------------------------------------------- -| Reverse Proxy IPs -|-------------------------------------------------------------------------- -| -| If your server is behind a reverse proxy, you must whitelist the proxy -| IP addresses from which CodeIgniter should trust headers such as -| HTTP_X_FORWARDED_FOR and HTTP_CLIENT_IP in order to properly identify -| the visitor's IP address. -| -| You can use both an array or a comma-separated list of proxy addresses, -| as well as specifying whole subnets. Here are a few examples: -| -| Comma-separated: '10.0.1.200,192.168.5.0/24' -| Array: array('10.0.1.200', '192.168.5.0/24') -*/ -$config['proxy_ips'] = ''; +]+$/i +| +| DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!! +| +*/ +$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-'; + +/* +|-------------------------------------------------------------------------- +| Enable Query Strings +|-------------------------------------------------------------------------- +| +| By default CodeIgniter uses search-engine friendly segment based URLs: +| example.com/who/what/where/ +| +| You can optionally enable standard query string based URLs: +| example.com?who=me&what=something&where=here +| +| Options are: TRUE or FALSE (boolean) +| +| The other items let you set the query string 'words' that will +| invoke your controllers and its functions: +| example.com/index.php?c=controller&m=function +| +| Please note that some of the helpers won't work as expected when +| this feature is enabled, since CodeIgniter is designed primarily to +| use segment based URLs. +| +*/ +$config['enable_query_strings'] = FALSE; +$config['controller_trigger'] = 'c'; +$config['function_trigger'] = 'm'; +$config['directory_trigger'] = 'd'; + +/* +|-------------------------------------------------------------------------- +| Allow $_GET array +|-------------------------------------------------------------------------- +| +| By default CodeIgniter enables access to the $_GET array. If for some +| reason you would like to disable it, set 'allow_get_array' to FALSE. +| +| WARNING: This feature is DEPRECATED and currently available only +| for backwards compatibility purposes! +| +*/ +$config['allow_get_array'] = TRUE; + +/* +|-------------------------------------------------------------------------- +| Error Logging Threshold +|-------------------------------------------------------------------------- +| +| You can enable error logging by setting a threshold over zero. The +| threshold determines what gets logged. Threshold options are: +| +| 0 = Disables logging, Error logging TURNED OFF +| 1 = Error Messages (including PHP errors) +| 2 = Debug Messages +| 3 = Informational Messages +| 4 = All Messages +| +| You can also pass an array with threshold levels to show individual error types +| +| array(2) = Debug Messages, without Error Messages +| +| For a live site you'll usually only enable Errors (1) to be logged otherwise +| your log files will fill up very fast. +| +*/ +$config['log_threshold'] = 1; + +/* +|-------------------------------------------------------------------------- +| Error Logging Directory Path +|-------------------------------------------------------------------------- +| +| Leave this BLANK unless you would like to set something other than the default +| application/logs/ directory. Use a full server path with trailing slash. +| +*/ +$config['log_path'] = ''; + +/* +|-------------------------------------------------------------------------- +| Log File Extension +|-------------------------------------------------------------------------- +| +| The default filename extension for log files. The default 'php' allows for +| protecting the log files via basic scripting, when they are to be stored +| under a publicly accessible directory. +| +| Note: Leaving it blank will default to 'php'. +| +*/ +$config['log_file_extension'] = ''; + +/* +|-------------------------------------------------------------------------- +| Log File Permissions +|-------------------------------------------------------------------------- +| +| The file system permissions to be applied on newly created log files. +| +| IMPORTANT: This MUST be an integer (no quotes) and you MUST use octal +| integer notation (i.e. 0700, 0644, etc.) +*/ +$config['log_file_permissions'] = 0644; + +/* +|-------------------------------------------------------------------------- +| Date Format for Logs +|-------------------------------------------------------------------------- +| +| Each item that is logged has an associated date. You can use PHP date +| codes to set your own date formatting +| +*/ +$config['log_date_format'] = 'Y-m-d H:i:s'; + +/* +|-------------------------------------------------------------------------- +| Error Views Directory Path +|-------------------------------------------------------------------------- +| +| Leave this BLANK unless you would like to set something other than the default +| application/views/errors/ directory. Use a full server path with trailing slash. +| +*/ +$config['error_views_path'] = ''; + +/* +|-------------------------------------------------------------------------- +| Cache Directory Path +|-------------------------------------------------------------------------- +| +| Leave this BLANK unless you would like to set something other than the default +| application/cache/ directory. Use a full server path with trailing slash. +| +*/ +$config['cache_path'] = ''; + +/* +|-------------------------------------------------------------------------- +| Cache Include Query String +|-------------------------------------------------------------------------- +| +| Whether to take the URL query string into consideration when generating +| output cache files. Valid options are: +| +| FALSE = Disabled +| TRUE = Enabled, take all query parameters into account. +| Please be aware that this may result in numerous cache +| files generated for the same page over and over again. +| array('q') = Enabled, but only take into account the specified list +| of query parameters. +| +*/ +$config['cache_query_string'] = FALSE; + +/* +|-------------------------------------------------------------------------- +| Encryption Key +|-------------------------------------------------------------------------- +| +| If you use the Encryption class, you must set an encryption key. +| See the user guide for more info. +| +| https://codeigniter.com/user_guide/libraries/encryption.html +| +*/ +$config['encryption_key'] = 'haodian.ai'; + +/* +|-------------------------------------------------------------------------- +| Session Variables +|-------------------------------------------------------------------------- +| +| 'sess_driver' +| +| The storage driver to use: files, database, redis, memcached +| +| 'sess_cookie_name' +| +| The session cookie name, must contain only [0-9a-z_-] characters +| +| 'sess_expiration' +| +| The number of SECONDS you want the session to last. +| Setting to 0 (zero) means expire when the browser is closed. +| +| 'sess_save_path' +| +| The location to save sessions to, driver dependent. +| +| For the 'files' driver, it's a path to a writable directory. +| WARNING: Only absolute paths are supported! +| +| For the 'database' driver, it's a table name. +| Please read up the manual for the format with other session drivers. +| +| IMPORTANT: You are REQUIRED to set a valid save path! +| +| 'sess_match_ip' +| +| Whether to match the user's IP address when reading the session data. +| +| WARNING: If you're using the database driver, don't forget to update +| your session table's PRIMARY KEY when changing this setting. +| +| 'sess_time_to_update' +| +| How many seconds between CI regenerating the session ID. +| +| 'sess_regenerate_destroy' +| +| Whether to destroy session data associated with the old session ID +| when auto-regenerating the session ID. When set to FALSE, the data +| will be later deleted by the garbage collector. +| +| Other session cookie settings are shared with the rest of the application, +| except for 'cookie_prefix' and 'cookie_httponly', which are ignored here. +| +*/ +$config['sess_driver'] = 'files'; +$config['sess_cookie_name'] = 'ci_session'; +$config['sess_expiration'] = 7200; +$config['sess_save_path'] = NULL; +$config['sess_match_ip'] = FALSE; +$config['sess_time_to_update'] = 300; +$config['sess_regenerate_destroy'] = FALSE; + +/* +|-------------------------------------------------------------------------- +| Cookie Related Variables +|-------------------------------------------------------------------------- +| +| 'cookie_prefix' = Set a cookie name prefix if you need to avoid collisions +| 'cookie_domain' = Set to .your-domain.com for site-wide cookies +| 'cookie_path' = Typically will be a forward slash +| 'cookie_secure' = Cookie will only be set if a secure HTTPS connection exists. +| 'cookie_httponly' = Cookie will only be accessible via HTTP(S) (no javascript) +| +| Note: These settings (with the exception of 'cookie_prefix' and +| 'cookie_httponly') will also affect sessions. +| +*/ +$config['cookie_prefix'] = ''; +$config['cookie_domain'] = ''; +$config['cookie_path'] = '/'; +$config['cookie_secure'] = FALSE; +$config['cookie_httponly'] = FALSE; + +/* +|-------------------------------------------------------------------------- +| Standardize newlines +|-------------------------------------------------------------------------- +| +| Determines whether to standardize newline characters in input data, +| meaning to replace \r\n, \r, \n occurrences with the PHP_EOL value. +| +| WARNING: This feature is DEPRECATED and currently available only +| for backwards compatibility purposes! +| +*/ +$config['standardize_newlines'] = FALSE; + +/* +|-------------------------------------------------------------------------- +| Global XSS Filtering +|-------------------------------------------------------------------------- +| +| Determines whether the XSS filter is always active when GET, POST or +| COOKIE data is encountered +| +| WARNING: This feature is DEPRECATED and currently available only +| for backwards compatibility purposes! +| +*/ +$config['global_xss_filtering'] = FALSE; + +/* +|-------------------------------------------------------------------------- +| Cross Site Request Forgery +|-------------------------------------------------------------------------- +| Enables a CSRF cookie token to be set. When set to TRUE, token will be +| checked on a submitted form. If you are accepting user data, it is strongly +| recommended CSRF protection be enabled. +| +| 'csrf_token_name' = The token name +| 'csrf_cookie_name' = The cookie name +| 'csrf_expire' = The number in seconds the token should expire. +| 'csrf_regenerate' = Regenerate token on every submission +| 'csrf_exclude_uris' = Array of URIs which ignore CSRF checks +*/ +$config['csrf_protection'] = FALSE; +$config['csrf_token_name'] = 'csrf_test_name'; +$config['csrf_cookie_name'] = 'csrf_cookie_name'; +$config['csrf_expire'] = 7200; +$config['csrf_regenerate'] = TRUE; +$config['csrf_exclude_uris'] = array(); + +/* +|-------------------------------------------------------------------------- +| Output Compression +|-------------------------------------------------------------------------- +| +| Enables Gzip output compression for faster page loads. When enabled, +| the output class will test whether your server supports Gzip. +| Even if it does, however, not all browsers support compression +| so enable only if you are reasonably sure your visitors can handle it. +| +| Only used if zlib.output_compression is turned off in your php.ini. +| Please do not use it together with httpd-level output compression. +| +| VERY IMPORTANT: If you are getting a blank page when compression is enabled it +| means you are prematurely outputting something to your browser. It could +| even be a line of whitespace at the end of one of your scripts. For +| compression to work, nothing can be sent before the output buffer is called +| by the output class. Do not 'echo' any values with compression enabled. +| +*/ +$config['compress_output'] = FALSE; + +/* +|-------------------------------------------------------------------------- +| Master Time Reference +|-------------------------------------------------------------------------- +| +| Options are 'local' or any PHP supported timezone. This preference tells +| the system whether to use your server's local time as the master 'now' +| reference, or convert it to the configured one timezone. See the 'date +| helper' page of the user guide for information regarding date handling. +| +*/ +$config['time_reference'] = 'local'; + +/* +|-------------------------------------------------------------------------- +| Rewrite PHP Short Tags +|-------------------------------------------------------------------------- +| +| If your PHP installation does not have short tag support enabled CI +| can rewrite the tags on-the-fly, enabling you to utilize that syntax +| in your view files. Options are TRUE or FALSE (boolean) +| +| Note: You need to have eval() enabled for this to work. +| +*/ +$config['rewrite_short_tags'] = FALSE; + +/* +|-------------------------------------------------------------------------- +| Reverse Proxy IPs +|-------------------------------------------------------------------------- +| +| If your server is behind a reverse proxy, you must whitelist the proxy +| IP addresses from which CodeIgniter should trust headers such as +| HTTP_X_FORWARDED_FOR and HTTP_CLIENT_IP in order to properly identify +| the visitor's IP address. +| +| You can use both an array or a comma-separated list of proxy addresses, +| as well as specifying whole subnets. Here are a few examples: +| +| Comma-separated: '10.0.1.200,192.168.5.0/24' +| Array: array('10.0.1.200', '192.168.5.0/24') +*/ +$config['proxy_ips'] = ''; diff --git a/api/config/constants.php b/api/config/constants.php index fbb93ac6..25483a15 100644 --- a/api/config/constants.php +++ b/api/config/constants.php @@ -1,109 +1,109 @@ -db->last_query() and profiling of DB queries. -| When you run a query, with this setting set to TRUE (default), -| CodeIgniter will store the SQL statement for debugging purposes. -| However, this may cause high memory usage, especially if you run -| a lot of SQL queries ... disable this to avoid that problem. -| -| The $active_group variable lets you choose which connection group to -| make active. By default there is only one group (the 'default' group). -| -| The $query_builder variables lets you determine whether or not to load -| the query builder class. -*/ -$active_group = 'default'; -$query_builder = TRUE; - -$db['default'] = array( - 'dsn' => '', - 'hostname' => 'mysql:host=127.0.0.1;port=3306;dbname=ssdb', - 'username' => 'devuser', - 'password' => 'DEV@hdy1234561', - 'database' => 'ssdb', - 'dbdriver' => 'pdo', - 'dbprefix' => 'lc_', - 'pconnect' => FALSE, - 'db_debug' => (ENVIRONMENT !== 'production'), - 'cache_on' => FALSE, - 'cachedir' => '', - 'char_set' => 'utf8mb4', - 'dbcollat' => 'utf8_general_ci', - 'swap_pre' => '', - 'encrypt' => FALSE, - 'compress' => FALSE, - 'stricton' => FALSE, - 'failover' => array(), - 'save_queries' => TRUE -); +db->last_query() and profiling of DB queries. +| When you run a query, with this setting set to TRUE (default), +| CodeIgniter will store the SQL statement for debugging purposes. +| However, this may cause high memory usage, especially if you run +| a lot of SQL queries ... disable this to avoid that problem. +| +| The $active_group variable lets you choose which connection group to +| make active. By default there is only one group (the 'default' group). +| +| The $query_builder variables lets you determine whether or not to load +| the query builder class. +*/ +$active_group = 'default'; +$query_builder = TRUE; + +$db['default'] = array( + 'dsn' => '', + 'hostname' => 'mysql:host=127.0.0.1;port=3306;dbname=ssdb', + 'username' => 'devuser', + 'password' => 'DEV@hdy123456', + 'database' => 'ssdb', + 'dbdriver' => 'pdo', + 'dbprefix' => 'lc_', + 'pconnect' => FALSE, + 'db_debug' => (ENVIRONMENT !== 'production'), + 'cache_on' => FALSE, + 'cachedir' => '', + 'char_set' => 'utf8mb4', + 'dbcollat' => 'utf8_general_ci', + 'swap_pre' => '', + 'encrypt' => FALSE, + 'compress' => FALSE, + 'stricton' => FALSE, + 'failover' => array(), + 'save_queries' => TRUE +); diff --git a/api/config/doctypes.php b/api/config/doctypes.php index f95451b2..59a7991e 100644 --- a/api/config/doctypes.php +++ b/api/config/doctypes.php @@ -1,24 +1,24 @@ - '', - 'xhtml1-strict' => '', - 'xhtml1-trans' => '', - 'xhtml1-frame' => '', - 'xhtml-basic11' => '', - 'html5' => '', - 'html4-strict' => '', - 'html4-trans' => '', - 'html4-frame' => '', - 'mathml1' => '', - 'mathml2' => '', - 'svg10' => '', - 'svg11' => '', - 'svg11-basic' => '', - 'svg11-tiny' => '', - 'xhtml-math-svg-xh' => '', - 'xhtml-math-svg-sh' => '', - 'xhtml-rdfa-1' => '', - 'xhtml-rdfa-2' => '' -); + '', + 'xhtml1-strict' => '', + 'xhtml1-trans' => '', + 'xhtml1-frame' => '', + 'xhtml-basic11' => '', + 'html5' => '', + 'html4-strict' => '', + 'html4-trans' => '', + 'html4-frame' => '', + 'mathml1' => '', + 'mathml2' => '', + 'svg10' => '', + 'svg11' => '', + 'svg11-basic' => '', + 'svg11-tiny' => '', + 'xhtml-math-svg-xh' => '', + 'xhtml-math-svg-sh' => '', + 'xhtml-rdfa-1' => '', + 'xhtml-rdfa-2' => '' +); diff --git a/api/config/foreign_chars.php b/api/config/foreign_chars.php index 3cd03b42..995f4830 100644 --- a/api/config/foreign_chars.php +++ b/api/config/foreign_chars.php @@ -1,103 +1,103 @@ - 'ae', - '/ö|œ/' => 'oe', - '/ü/' => 'ue', - '/Ä/' => 'Ae', - '/Ü/' => 'Ue', - '/Ö/' => 'Oe', - '/À|Á|Â|Ã|Ä|Å|Ǻ|Ā|Ă|Ą|Ǎ|Α|Ά|Ả|Ạ|Ầ|Ẫ|Ẩ|Ậ|Ằ|Ắ|Ẵ|Ẳ|Ặ|А/' => 'A', - '/à|á|â|ã|å|ǻ|ā|ă|ą|ǎ|ª|α|ά|ả|ạ|ầ|ấ|ẫ|ẩ|ậ|ằ|ắ|ẵ|ẳ|ặ|а/' => 'a', - '/Б/' => 'B', - '/б/' => 'b', - '/Ç|Ć|Ĉ|Ċ|Č/' => 'C', - '/ç|ć|ĉ|ċ|č/' => 'c', - '/Д/' => 'D', - '/д/' => 'd', - '/Ð|Ď|Đ|Δ/' => 'Dj', - '/ð|ď|đ|δ/' => 'dj', - '/È|É|Ê|Ë|Ē|Ĕ|Ė|Ę|Ě|Ε|Έ|Ẽ|Ẻ|Ẹ|Ề|Ế|Ễ|Ể|Ệ|Е|Э/' => 'E', - '/è|é|ê|ë|ē|ĕ|ė|ę|ě|έ|ε|ẽ|ẻ|ẹ|ề|ế|ễ|ể|ệ|е|э/' => 'e', - '/Ф/' => 'F', - '/ф/' => 'f', - '/Ĝ|Ğ|Ġ|Ģ|Γ|Г|Ґ/' => 'G', - '/ĝ|ğ|ġ|ģ|γ|г|ґ/' => 'g', - '/Ĥ|Ħ/' => 'H', - '/ĥ|ħ/' => 'h', - '/Ì|Í|Î|Ï|Ĩ|Ī|Ĭ|Ǐ|Į|İ|Η|Ή|Ί|Ι|Ϊ|Ỉ|Ị|И|Ы/' => 'I', - '/ì|í|î|ï|ĩ|ī|ĭ|ǐ|į|ı|η|ή|ί|ι|ϊ|ỉ|ị|и|ы|ї/' => 'i', - '/Ĵ/' => 'J', - '/ĵ/' => 'j', - '/Ķ|Κ|К/' => 'K', - '/ķ|κ|к/' => 'k', - '/Ĺ|Ļ|Ľ|Ŀ|Ł|Λ|Л/' => 'L', - '/ĺ|ļ|ľ|ŀ|ł|λ|л/' => 'l', - '/М/' => 'M', - '/м/' => 'm', - '/Ñ|Ń|Ņ|Ň|Ν|Н/' => 'N', - '/ñ|ń|ņ|ň|ʼn|ν|н/' => 'n', - '/Ò|Ó|Ô|Õ|Ō|Ŏ|Ǒ|Ő|Ơ|Ø|Ǿ|Ο|Ό|Ω|Ώ|Ỏ|Ọ|Ồ|Ố|Ỗ|Ổ|Ộ|Ờ|Ớ|Ỡ|Ở|Ợ|О/' => 'O', - '/ò|ó|ô|õ|ō|ŏ|ǒ|ő|ơ|ø|ǿ|º|ο|ό|ω|ώ|ỏ|ọ|ồ|ố|ỗ|ổ|ộ|ờ|ớ|ỡ|ở|ợ|о/' => 'o', - '/П/' => 'P', - '/п/' => 'p', - '/Ŕ|Ŗ|Ř|Ρ|Р/' => 'R', - '/ŕ|ŗ|ř|ρ|р/' => 'r', - '/Ś|Ŝ|Ş|Ș|Š|Σ|С/' => 'S', - '/ś|ŝ|ş|ș|š|ſ|σ|ς|с/' => 's', - '/Ț|Ţ|Ť|Ŧ|τ|Т/' => 'T', - '/ț|ţ|ť|ŧ|т/' => 't', - '/Þ|þ/' => 'th', - '/Ù|Ú|Û|Ũ|Ū|Ŭ|Ů|Ű|Ų|Ư|Ǔ|Ǖ|Ǘ|Ǚ|Ǜ|Ũ|Ủ|Ụ|Ừ|Ứ|Ữ|Ử|Ự|У/' => 'U', - '/ù|ú|û|ũ|ū|ŭ|ů|ű|ų|ư|ǔ|ǖ|ǘ|ǚ|ǜ|υ|ύ|ϋ|ủ|ụ|ừ|ứ|ữ|ử|ự|у/' => 'u', - '/Ƴ|Ɏ|Ỵ|Ẏ|Ӳ|Ӯ|Ў|Ý|Ÿ|Ŷ|Υ|Ύ|Ϋ|Ỳ|Ỹ|Ỷ|Ỵ|Й/' => 'Y', - '/ẙ|ʏ|ƴ|ɏ|ỵ|ẏ|ӳ|ӯ|ў|ý|ÿ|ŷ|ỳ|ỹ|ỷ|ỵ|й/' => 'y', - '/В/' => 'V', - '/в/' => 'v', - '/Ŵ/' => 'W', - '/ŵ/' => 'w', - '/Ź|Ż|Ž|Ζ|З/' => 'Z', - '/ź|ż|ž|ζ|з/' => 'z', - '/Æ|Ǽ/' => 'AE', - '/ß/' => 'ss', - '/IJ/' => 'IJ', - '/ij/' => 'ij', - '/Œ/' => 'OE', - '/ƒ/' => 'f', - '/ξ/' => 'ks', - '/π/' => 'p', - '/β/' => 'v', - '/μ/' => 'm', - '/ψ/' => 'ps', - '/Ё/' => 'Yo', - '/ё/' => 'yo', - '/Є/' => 'Ye', - '/є/' => 'ye', - '/Ї/' => 'Yi', - '/Ж/' => 'Zh', - '/ж/' => 'zh', - '/Х/' => 'Kh', - '/х/' => 'kh', - '/Ц/' => 'Ts', - '/ц/' => 'ts', - '/Ч/' => 'Ch', - '/ч/' => 'ch', - '/Ш/' => 'Sh', - '/ш/' => 'sh', - '/Щ/' => 'Shch', - '/щ/' => 'shch', - '/Ъ|ъ|Ь|ь/' => '', - '/Ю/' => 'Yu', - '/ю/' => 'yu', - '/Я/' => 'Ya', - '/я/' => 'ya' -); + 'ae', + '/ö|œ/' => 'oe', + '/ü/' => 'ue', + '/Ä/' => 'Ae', + '/Ü/' => 'Ue', + '/Ö/' => 'Oe', + '/À|Á|Â|Ã|Ä|Å|Ǻ|Ā|Ă|Ą|Ǎ|Α|Ά|Ả|Ạ|Ầ|Ẫ|Ẩ|Ậ|Ằ|Ắ|Ẵ|Ẳ|Ặ|А/' => 'A', + '/à|á|â|ã|å|ǻ|ā|ă|ą|ǎ|ª|α|ά|ả|ạ|ầ|ấ|ẫ|ẩ|ậ|ằ|ắ|ẵ|ẳ|ặ|а/' => 'a', + '/Б/' => 'B', + '/б/' => 'b', + '/Ç|Ć|Ĉ|Ċ|Č/' => 'C', + '/ç|ć|ĉ|ċ|č/' => 'c', + '/Д/' => 'D', + '/д/' => 'd', + '/Ð|Ď|Đ|Δ/' => 'Dj', + '/ð|ď|đ|δ/' => 'dj', + '/È|É|Ê|Ë|Ē|Ĕ|Ė|Ę|Ě|Ε|Έ|Ẽ|Ẻ|Ẹ|Ề|Ế|Ễ|Ể|Ệ|Е|Э/' => 'E', + '/è|é|ê|ë|ē|ĕ|ė|ę|ě|έ|ε|ẽ|ẻ|ẹ|ề|ế|ễ|ể|ệ|е|э/' => 'e', + '/Ф/' => 'F', + '/ф/' => 'f', + '/Ĝ|Ğ|Ġ|Ģ|Γ|Г|Ґ/' => 'G', + '/ĝ|ğ|ġ|ģ|γ|г|ґ/' => 'g', + '/Ĥ|Ħ/' => 'H', + '/ĥ|ħ/' => 'h', + '/Ì|Í|Î|Ï|Ĩ|Ī|Ĭ|Ǐ|Į|İ|Η|Ή|Ί|Ι|Ϊ|Ỉ|Ị|И|Ы/' => 'I', + '/ì|í|î|ï|ĩ|ī|ĭ|ǐ|į|ı|η|ή|ί|ι|ϊ|ỉ|ị|и|ы|ї/' => 'i', + '/Ĵ/' => 'J', + '/ĵ/' => 'j', + '/Ķ|Κ|К/' => 'K', + '/ķ|κ|к/' => 'k', + '/Ĺ|Ļ|Ľ|Ŀ|Ł|Λ|Л/' => 'L', + '/ĺ|ļ|ľ|ŀ|ł|λ|л/' => 'l', + '/М/' => 'M', + '/м/' => 'm', + '/Ñ|Ń|Ņ|Ň|Ν|Н/' => 'N', + '/ñ|ń|ņ|ň|ʼn|ν|н/' => 'n', + '/Ò|Ó|Ô|Õ|Ō|Ŏ|Ǒ|Ő|Ơ|Ø|Ǿ|Ο|Ό|Ω|Ώ|Ỏ|Ọ|Ồ|Ố|Ỗ|Ổ|Ộ|Ờ|Ớ|Ỡ|Ở|Ợ|О/' => 'O', + '/ò|ó|ô|õ|ō|ŏ|ǒ|ő|ơ|ø|ǿ|º|ο|ό|ω|ώ|ỏ|ọ|ồ|ố|ỗ|ổ|ộ|ờ|ớ|ỡ|ở|ợ|о/' => 'o', + '/П/' => 'P', + '/п/' => 'p', + '/Ŕ|Ŗ|Ř|Ρ|Р/' => 'R', + '/ŕ|ŗ|ř|ρ|р/' => 'r', + '/Ś|Ŝ|Ş|Ș|Š|Σ|С/' => 'S', + '/ś|ŝ|ş|ș|š|ſ|σ|ς|с/' => 's', + '/Ț|Ţ|Ť|Ŧ|τ|Т/' => 'T', + '/ț|ţ|ť|ŧ|т/' => 't', + '/Þ|þ/' => 'th', + '/Ù|Ú|Û|Ũ|Ū|Ŭ|Ů|Ű|Ų|Ư|Ǔ|Ǖ|Ǘ|Ǚ|Ǜ|Ũ|Ủ|Ụ|Ừ|Ứ|Ữ|Ử|Ự|У/' => 'U', + '/ù|ú|û|ũ|ū|ŭ|ů|ű|ų|ư|ǔ|ǖ|ǘ|ǚ|ǜ|υ|ύ|ϋ|ủ|ụ|ừ|ứ|ữ|ử|ự|у/' => 'u', + '/Ƴ|Ɏ|Ỵ|Ẏ|Ӳ|Ӯ|Ў|Ý|Ÿ|Ŷ|Υ|Ύ|Ϋ|Ỳ|Ỹ|Ỷ|Ỵ|Й/' => 'Y', + '/ẙ|ʏ|ƴ|ɏ|ỵ|ẏ|ӳ|ӯ|ў|ý|ÿ|ŷ|ỳ|ỹ|ỷ|ỵ|й/' => 'y', + '/В/' => 'V', + '/в/' => 'v', + '/Ŵ/' => 'W', + '/ŵ/' => 'w', + '/Ź|Ż|Ž|Ζ|З/' => 'Z', + '/ź|ż|ž|ζ|з/' => 'z', + '/Æ|Ǽ/' => 'AE', + '/ß/' => 'ss', + '/IJ/' => 'IJ', + '/ij/' => 'ij', + '/Œ/' => 'OE', + '/ƒ/' => 'f', + '/ξ/' => 'ks', + '/π/' => 'p', + '/β/' => 'v', + '/μ/' => 'm', + '/ψ/' => 'ps', + '/Ё/' => 'Yo', + '/ё/' => 'yo', + '/Є/' => 'Ye', + '/є/' => 'ye', + '/Ї/' => 'Yi', + '/Ж/' => 'Zh', + '/ж/' => 'zh', + '/Х/' => 'Kh', + '/х/' => 'kh', + '/Ц/' => 'Ts', + '/ц/' => 'ts', + '/Ч/' => 'Ch', + '/ч/' => 'ch', + '/Ш/' => 'Sh', + '/ш/' => 'sh', + '/Щ/' => 'Shch', + '/щ/' => 'shch', + '/Ъ|ъ|Ь|ь/' => '', + '/Ю/' => 'Yu', + '/ю/' => 'yu', + '/Я/' => 'Ya', + '/я/' => 'ya' +); diff --git a/api/config/hooks.php b/api/config/hooks.php index 038a2a73..a8f38a5d 100644 --- a/api/config/hooks.php +++ b/api/config/hooks.php @@ -1,13 +1,13 @@ - - - -Directory access is forbidden.
- - - + + + +Directory access is forbidden.
+ + + diff --git a/api/config/memcached.php b/api/config/memcached.php index ad0ac6cf..40365917 100644 --- a/api/config/memcached.php +++ b/api/config/memcached.php @@ -1,19 +1,19 @@ - array( - 'hostname' => '192.168.0.16', - 'port' => '12001', - 'weight' => '1', - ), -); + array( + 'hostname' => '192.168.0.16', + 'port' => '12001', + 'weight' => '1', + ), +); diff --git a/api/config/migration.php b/api/config/migration.php index e26f3612..4b585a65 100644 --- a/api/config/migration.php +++ b/api/config/migration.php @@ -1,84 +1,84 @@ -migration->current() this is the version that schema will -| be upgraded / downgraded to. -| -*/ -$config['migration_version'] = 0; - -/* -|-------------------------------------------------------------------------- -| Migrations Path -|-------------------------------------------------------------------------- -| -| Path to your migrations folder. -| Typically, it will be within your application path. -| Also, writing permission is required within the migrations path. -| -*/ -$config['migration_path'] = APPPATH.'migrations/'; +migration->current() this is the version that schema will +| be upgraded / downgraded to. +| +*/ +$config['migration_version'] = 0; + +/* +|-------------------------------------------------------------------------- +| Migrations Path +|-------------------------------------------------------------------------- +| +| Path to your migrations folder. +| Typically, it will be within your application path. +| Also, writing permission is required within the migrations path. +| +*/ +$config['migration_path'] = APPPATH.'migrations/'; diff --git a/api/config/mimes.php b/api/config/mimes.php index 27f470a4..0ec9db0a 100644 --- a/api/config/mimes.php +++ b/api/config/mimes.php @@ -1,184 +1,184 @@ - array('application/mac-binhex40', 'application/mac-binhex', 'application/x-binhex40', 'application/x-mac-binhex40'), - 'cpt' => 'application/mac-compactpro', - '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'), - 'bin' => array('application/macbinary', 'application/mac-binary', 'application/octet-stream', 'application/x-binary', 'application/x-macbinary'), - 'dms' => 'application/octet-stream', - 'lha' => 'application/octet-stream', - 'lzh' => 'application/octet-stream', - 'exe' => array('application/octet-stream', 'application/x-msdownload'), - 'class' => 'application/octet-stream', - 'psd' => array('application/x-photoshop', 'image/vnd.adobe.photoshop'), - 'so' => 'application/octet-stream', - 'sea' => 'application/octet-stream', - 'dll' => 'application/octet-stream', - 'oda' => 'application/oda', - 'pdf' => array('application/pdf', 'application/force-download', 'application/x-download', 'binary/octet-stream'), - 'ai' => array('application/pdf', 'application/postscript'), - 'eps' => 'application/postscript', - 'ps' => 'application/postscript', - 'smi' => 'application/smil', - 'smil' => 'application/smil', - 'mif' => 'application/vnd.mif', - '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'), - 'ppt' => array('application/powerpoint', 'application/vnd.ms-powerpoint', 'application/vnd.ms-office', 'application/msword'), - 'pptx' => array('application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/x-zip', 'application/zip'), - 'wbxml' => 'application/wbxml', - 'wmlc' => 'application/wmlc', - 'dcr' => 'application/x-director', - 'dir' => 'application/x-director', - 'dxr' => 'application/x-director', - 'dvi' => 'application/x-dvi', - 'gtar' => 'application/x-gtar', - 'gz' => 'application/x-gzip', - 'gzip' => 'application/x-gzip', - 'php' => array('application/x-httpd-php', 'application/php', 'application/x-php', 'text/php', 'text/x-php', 'application/x-httpd-php-source'), - 'php4' => 'application/x-httpd-php', - 'php3' => 'application/x-httpd-php', - 'phtml' => 'application/x-httpd-php', - 'phps' => 'application/x-httpd-php-source', - 'js' => array('application/x-javascript', 'text/plain'), - 'swf' => 'application/x-shockwave-flash', - 'sit' => 'application/x-stuffit', - 'tar' => 'application/x-tar', - 'tgz' => array('application/x-tar', 'application/x-gzip-compressed'), - 'z' => 'application/x-compress', - 'xhtml' => 'application/xhtml+xml', - 'xht' => 'application/xhtml+xml', - 'zip' => array('application/x-zip', 'application/zip', 'application/x-zip-compressed', 'application/s-compressed', 'multipart/x-zip'), - 'rar' => array('application/x-rar', 'application/rar', 'application/x-rar-compressed'), - 'mid' => 'audio/midi', - 'midi' => 'audio/midi', - 'mpga' => 'audio/mpeg', - 'mp2' => 'audio/mpeg', - 'mp3' => array('audio/mpeg', 'audio/mpg', 'audio/mpeg3', 'audio/mp3'), - 'aif' => array('audio/x-aiff', 'audio/aiff'), - 'aiff' => array('audio/x-aiff', 'audio/aiff'), - 'aifc' => 'audio/x-aiff', - 'ram' => 'audio/x-pn-realaudio', - 'rm' => 'audio/x-pn-realaudio', - 'rpm' => 'audio/x-pn-realaudio-plugin', - 'ra' => 'audio/x-realaudio', - 'rv' => 'video/vnd.rn-realvideo', - 'wav' => array('audio/x-wav', 'audio/wave', 'audio/wav'), - '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'), - 'gif' => 'image/gif', - 'jpeg' => array('image/jpeg', 'image/pjpeg'), - 'jpg' => array('image/jpeg', 'image/pjpeg'), - 'jpe' => array('image/jpeg', 'image/pjpeg'), - 'jp2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), - 'j2k' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), - 'jpf' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), - 'jpg2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), - 'jpx' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), - 'jpm' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), - 'mj2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), - 'mjp2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), - 'png' => array('image/png', 'image/x-png'), - 'tiff' => 'image/tiff', - 'tif' => 'image/tiff', - 'css' => array('text/css', 'text/plain'), - 'html' => array('text/html', 'text/plain'), - 'htm' => array('text/html', 'text/plain'), - 'shtml' => array('text/html', 'text/plain'), - 'txt' => 'text/plain', - 'text' => 'text/plain', - 'log' => array('text/plain', 'text/x-log'), - 'rtx' => 'text/richtext', - 'rtf' => 'text/rtf', - 'xml' => array('application/xml', 'text/xml', 'text/plain'), - 'xsl' => array('application/xml', 'text/xsl', 'text/xml'), - 'mpeg' => 'video/mpeg', - 'mpg' => 'video/mpeg', - 'mpe' => 'video/mpeg', - 'qt' => 'video/quicktime', - 'mov' => 'video/quicktime', - 'avi' => array('video/x-msvideo', 'video/msvideo', 'video/avi', 'application/x-troff-msvideo'), - 'movie' => 'video/x-sgi-movie', - 'doc' => array('application/msword', 'application/vnd.ms-office'), - 'docx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip', 'application/msword', 'application/x-zip'), - 'dot' => array('application/msword', 'application/vnd.ms-office'), - 'dotx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip', 'application/msword'), - 'xlsx' => array('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/zip', 'application/vnd.ms-excel', 'application/msword', 'application/x-zip'), - 'word' => array('application/msword', 'application/octet-stream'), - 'xl' => 'application/excel', - 'eml' => 'message/rfc822', - 'json' => array('application/json', 'text/json'), - 'pem' => array('application/x-x509-user-cert', 'application/x-pem-file', 'application/octet-stream'), - 'p10' => array('application/x-pkcs10', 'application/pkcs10'), - 'p12' => 'application/x-pkcs12', - 'p7a' => 'application/x-pkcs7-signature', - 'p7c' => array('application/pkcs7-mime', 'application/x-pkcs7-mime'), - 'p7m' => array('application/pkcs7-mime', 'application/x-pkcs7-mime'), - 'p7r' => 'application/x-pkcs7-certreqresp', - 'p7s' => 'application/pkcs7-signature', - 'crt' => array('application/x-x509-ca-cert', 'application/x-x509-user-cert', 'application/pkix-cert'), - 'crl' => array('application/pkix-crl', 'application/pkcs-crl'), - 'der' => 'application/x-x509-ca-cert', - 'kdb' => 'application/octet-stream', - 'pgp' => 'application/pgp', - 'gpg' => 'application/gpg-keys', - 'sst' => 'application/octet-stream', - 'csr' => 'application/octet-stream', - 'rsa' => 'application/x-pkcs7', - 'cer' => array('application/pkix-cert', 'application/x-x509-ca-cert'), - '3g2' => 'video/3gpp2', - '3gp' => array('video/3gp', 'video/3gpp'), - 'mp4' => 'video/mp4', - 'm4a' => 'audio/x-m4a', - 'f4v' => array('video/mp4', 'video/x-f4v'), - 'flv' => 'video/x-flv', - 'webm' => 'video/webm', - 'aac' => 'audio/x-acc', - 'm4u' => 'application/vnd.mpegurl', - 'm3u' => 'text/plain', - 'xspf' => 'application/xspf+xml', - 'vlc' => 'application/videolan', - 'wmv' => array('video/x-ms-wmv', 'video/x-ms-asf'), - 'au' => 'audio/x-au', - 'ac3' => 'audio/ac3', - 'flac' => 'audio/x-flac', - 'ogg' => array('audio/ogg', 'video/ogg', 'application/ogg'), - 'kmz' => array('application/vnd.google-earth.kmz', 'application/zip', 'application/x-zip'), - 'kml' => array('application/vnd.google-earth.kml+xml', 'application/xml', 'text/xml'), - 'ics' => 'text/calendar', - 'ical' => 'text/calendar', - 'zsh' => 'text/x-scriptzsh', - '7z' => array('application/x-7z-compressed', 'application/x-compressed', 'application/x-zip-compressed', 'application/zip', 'multipart/x-zip'), - '7zip' => array('application/x-7z-compressed', 'application/x-compressed', 'application/x-zip-compressed', 'application/zip', 'multipart/x-zip'), - 'cdr' => array('application/cdr', 'application/coreldraw', 'application/x-cdr', 'application/x-coreldraw', 'image/cdr', 'image/x-cdr', 'zz-application/zz-winassoc-cdr'), - 'wma' => array('audio/x-ms-wma', 'video/x-ms-asf'), - 'jar' => array('application/java-archive', 'application/x-java-application', 'application/x-jar', 'application/x-compressed'), - 'svg' => array('image/svg+xml', 'application/xml', 'text/xml'), - 'vcf' => 'text/x-vcard', - 'srt' => array('text/srt', 'text/plain'), - 'vtt' => array('text/vtt', 'text/plain'), - 'ico' => array('image/x-icon', 'image/x-ico', 'image/vnd.microsoft.icon'), - 'odc' => 'application/vnd.oasis.opendocument.chart', - 'otc' => 'application/vnd.oasis.opendocument.chart-template', - 'odf' => 'application/vnd.oasis.opendocument.formula', - 'otf' => 'application/vnd.oasis.opendocument.formula-template', - 'odg' => 'application/vnd.oasis.opendocument.graphics', - 'otg' => 'application/vnd.oasis.opendocument.graphics-template', - 'odi' => 'application/vnd.oasis.opendocument.image', - 'oti' => 'application/vnd.oasis.opendocument.image-template', - 'odp' => 'application/vnd.oasis.opendocument.presentation', - 'otp' => 'application/vnd.oasis.opendocument.presentation-template', - 'ods' => 'application/vnd.oasis.opendocument.spreadsheet', - 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template', - 'odt' => 'application/vnd.oasis.opendocument.text', - 'odm' => 'application/vnd.oasis.opendocument.text-master', - 'ott' => 'application/vnd.oasis.opendocument.text-template', - 'oth' => 'application/vnd.oasis.opendocument.text-web' -); + array('application/mac-binhex40', 'application/mac-binhex', 'application/x-binhex40', 'application/x-mac-binhex40'), + 'cpt' => 'application/mac-compactpro', + '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'), + 'bin' => array('application/macbinary', 'application/mac-binary', 'application/octet-stream', 'application/x-binary', 'application/x-macbinary'), + 'dms' => 'application/octet-stream', + 'lha' => 'application/octet-stream', + 'lzh' => 'application/octet-stream', + 'exe' => array('application/octet-stream', 'application/x-msdownload'), + 'class' => 'application/octet-stream', + 'psd' => array('application/x-photoshop', 'image/vnd.adobe.photoshop'), + 'so' => 'application/octet-stream', + 'sea' => 'application/octet-stream', + 'dll' => 'application/octet-stream', + 'oda' => 'application/oda', + 'pdf' => array('application/pdf', 'application/force-download', 'application/x-download', 'binary/octet-stream'), + 'ai' => array('application/pdf', 'application/postscript'), + 'eps' => 'application/postscript', + 'ps' => 'application/postscript', + 'smi' => 'application/smil', + 'smil' => 'application/smil', + 'mif' => 'application/vnd.mif', + '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'), + 'ppt' => array('application/powerpoint', 'application/vnd.ms-powerpoint', 'application/vnd.ms-office', 'application/msword'), + 'pptx' => array('application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/x-zip', 'application/zip'), + 'wbxml' => 'application/wbxml', + 'wmlc' => 'application/wmlc', + 'dcr' => 'application/x-director', + 'dir' => 'application/x-director', + 'dxr' => 'application/x-director', + 'dvi' => 'application/x-dvi', + 'gtar' => 'application/x-gtar', + 'gz' => 'application/x-gzip', + 'gzip' => 'application/x-gzip', + 'php' => array('application/x-httpd-php', 'application/php', 'application/x-php', 'text/php', 'text/x-php', 'application/x-httpd-php-source'), + 'php4' => 'application/x-httpd-php', + 'php3' => 'application/x-httpd-php', + 'phtml' => 'application/x-httpd-php', + 'phps' => 'application/x-httpd-php-source', + 'js' => array('application/x-javascript', 'text/plain'), + 'swf' => 'application/x-shockwave-flash', + 'sit' => 'application/x-stuffit', + 'tar' => 'application/x-tar', + 'tgz' => array('application/x-tar', 'application/x-gzip-compressed'), + 'z' => 'application/x-compress', + 'xhtml' => 'application/xhtml+xml', + 'xht' => 'application/xhtml+xml', + 'zip' => array('application/x-zip', 'application/zip', 'application/x-zip-compressed', 'application/s-compressed', 'multipart/x-zip'), + 'rar' => array('application/x-rar', 'application/rar', 'application/x-rar-compressed'), + 'mid' => 'audio/midi', + 'midi' => 'audio/midi', + 'mpga' => 'audio/mpeg', + 'mp2' => 'audio/mpeg', + 'mp3' => array('audio/mpeg', 'audio/mpg', 'audio/mpeg3', 'audio/mp3'), + 'aif' => array('audio/x-aiff', 'audio/aiff'), + 'aiff' => array('audio/x-aiff', 'audio/aiff'), + 'aifc' => 'audio/x-aiff', + 'ram' => 'audio/x-pn-realaudio', + 'rm' => 'audio/x-pn-realaudio', + 'rpm' => 'audio/x-pn-realaudio-plugin', + 'ra' => 'audio/x-realaudio', + 'rv' => 'video/vnd.rn-realvideo', + 'wav' => array('audio/x-wav', 'audio/wave', 'audio/wav'), + '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'), + 'gif' => 'image/gif', + 'jpeg' => array('image/jpeg', 'image/pjpeg'), + 'jpg' => array('image/jpeg', 'image/pjpeg'), + 'jpe' => array('image/jpeg', 'image/pjpeg'), + 'jp2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), + 'j2k' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), + 'jpf' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), + 'jpg2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), + 'jpx' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), + 'jpm' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), + 'mj2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), + 'mjp2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), + 'png' => array('image/png', 'image/x-png'), + 'tiff' => 'image/tiff', + 'tif' => 'image/tiff', + 'css' => array('text/css', 'text/plain'), + 'html' => array('text/html', 'text/plain'), + 'htm' => array('text/html', 'text/plain'), + 'shtml' => array('text/html', 'text/plain'), + 'txt' => 'text/plain', + 'text' => 'text/plain', + 'log' => array('text/plain', 'text/x-log'), + 'rtx' => 'text/richtext', + 'rtf' => 'text/rtf', + 'xml' => array('application/xml', 'text/xml', 'text/plain'), + 'xsl' => array('application/xml', 'text/xsl', 'text/xml'), + 'mpeg' => 'video/mpeg', + 'mpg' => 'video/mpeg', + 'mpe' => 'video/mpeg', + 'qt' => 'video/quicktime', + 'mov' => 'video/quicktime', + 'avi' => array('video/x-msvideo', 'video/msvideo', 'video/avi', 'application/x-troff-msvideo'), + 'movie' => 'video/x-sgi-movie', + 'doc' => array('application/msword', 'application/vnd.ms-office'), + 'docx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip', 'application/msword', 'application/x-zip'), + 'dot' => array('application/msword', 'application/vnd.ms-office'), + 'dotx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip', 'application/msword'), + 'xlsx' => array('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/zip', 'application/vnd.ms-excel', 'application/msword', 'application/x-zip'), + 'word' => array('application/msword', 'application/octet-stream'), + 'xl' => 'application/excel', + 'eml' => 'message/rfc822', + 'json' => array('application/json', 'text/json'), + 'pem' => array('application/x-x509-user-cert', 'application/x-pem-file', 'application/octet-stream'), + 'p10' => array('application/x-pkcs10', 'application/pkcs10'), + 'p12' => 'application/x-pkcs12', + 'p7a' => 'application/x-pkcs7-signature', + 'p7c' => array('application/pkcs7-mime', 'application/x-pkcs7-mime'), + 'p7m' => array('application/pkcs7-mime', 'application/x-pkcs7-mime'), + 'p7r' => 'application/x-pkcs7-certreqresp', + 'p7s' => 'application/pkcs7-signature', + 'crt' => array('application/x-x509-ca-cert', 'application/x-x509-user-cert', 'application/pkix-cert'), + 'crl' => array('application/pkix-crl', 'application/pkcs-crl'), + 'der' => 'application/x-x509-ca-cert', + 'kdb' => 'application/octet-stream', + 'pgp' => 'application/pgp', + 'gpg' => 'application/gpg-keys', + 'sst' => 'application/octet-stream', + 'csr' => 'application/octet-stream', + 'rsa' => 'application/x-pkcs7', + 'cer' => array('application/pkix-cert', 'application/x-x509-ca-cert'), + '3g2' => 'video/3gpp2', + '3gp' => array('video/3gp', 'video/3gpp'), + 'mp4' => 'video/mp4', + 'm4a' => 'audio/x-m4a', + 'f4v' => array('video/mp4', 'video/x-f4v'), + 'flv' => 'video/x-flv', + 'webm' => 'video/webm', + 'aac' => 'audio/x-acc', + 'm4u' => 'application/vnd.mpegurl', + 'm3u' => 'text/plain', + 'xspf' => 'application/xspf+xml', + 'vlc' => 'application/videolan', + 'wmv' => array('video/x-ms-wmv', 'video/x-ms-asf'), + 'au' => 'audio/x-au', + 'ac3' => 'audio/ac3', + 'flac' => 'audio/x-flac', + 'ogg' => array('audio/ogg', 'video/ogg', 'application/ogg'), + 'kmz' => array('application/vnd.google-earth.kmz', 'application/zip', 'application/x-zip'), + 'kml' => array('application/vnd.google-earth.kml+xml', 'application/xml', 'text/xml'), + 'ics' => 'text/calendar', + 'ical' => 'text/calendar', + 'zsh' => 'text/x-scriptzsh', + '7z' => array('application/x-7z-compressed', 'application/x-compressed', 'application/x-zip-compressed', 'application/zip', 'multipart/x-zip'), + '7zip' => array('application/x-7z-compressed', 'application/x-compressed', 'application/x-zip-compressed', 'application/zip', 'multipart/x-zip'), + 'cdr' => array('application/cdr', 'application/coreldraw', 'application/x-cdr', 'application/x-coreldraw', 'image/cdr', 'image/x-cdr', 'zz-application/zz-winassoc-cdr'), + 'wma' => array('audio/x-ms-wma', 'video/x-ms-asf'), + 'jar' => array('application/java-archive', 'application/x-java-application', 'application/x-jar', 'application/x-compressed'), + 'svg' => array('image/svg+xml', 'application/xml', 'text/xml'), + 'vcf' => 'text/x-vcard', + 'srt' => array('text/srt', 'text/plain'), + 'vtt' => array('text/vtt', 'text/plain'), + 'ico' => array('image/x-icon', 'image/x-ico', 'image/vnd.microsoft.icon'), + 'odc' => 'application/vnd.oasis.opendocument.chart', + 'otc' => 'application/vnd.oasis.opendocument.chart-template', + 'odf' => 'application/vnd.oasis.opendocument.formula', + 'otf' => 'application/vnd.oasis.opendocument.formula-template', + 'odg' => 'application/vnd.oasis.opendocument.graphics', + 'otg' => 'application/vnd.oasis.opendocument.graphics-template', + 'odi' => 'application/vnd.oasis.opendocument.image', + 'oti' => 'application/vnd.oasis.opendocument.image-template', + 'odp' => 'application/vnd.oasis.opendocument.presentation', + 'otp' => 'application/vnd.oasis.opendocument.presentation-template', + 'ods' => 'application/vnd.oasis.opendocument.spreadsheet', + 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template', + 'odt' => 'application/vnd.oasis.opendocument.text', + 'odm' => 'application/vnd.oasis.opendocument.text-master', + 'ott' => 'application/vnd.oasis.opendocument.text-template', + 'oth' => 'application/vnd.oasis.opendocument.text-web' +); diff --git a/api/config/mongo.php b/api/config/mongo.php index 24445c2d..20df9c11 100644 --- a/api/config/mongo.php +++ b/api/config/mongo.php @@ -1,11 +1,11 @@ - my_controller/index -| my-controller/my-method -> my_controller/my_method -*/ -$route['default_controller'] = 'welcome'; -$route['404_override'] = ''; -$route['translate_uri_dashes'] = FALSE; + my_controller/index +| my-controller/my-method -> my_controller/my_method +*/ +$route['default_controller'] = 'welcome'; +$route['404_override'] = ''; +$route['translate_uri_dashes'] = FALSE; diff --git a/api/config/smileys.php b/api/config/smileys.php index 52ca4f30..abf9a898 100644 --- a/api/config/smileys.php +++ b/api/config/smileys.php @@ -1,64 +1,64 @@ - array('grin.gif', '19', '19', 'grin'), - ':lol:' => array('lol.gif', '19', '19', 'LOL'), - ':cheese:' => array('cheese.gif', '19', '19', 'cheese'), - ':)' => array('smile.gif', '19', '19', 'smile'), - ';-)' => array('wink.gif', '19', '19', 'wink'), - ';)' => array('wink.gif', '19', '19', 'wink'), - ':smirk:' => array('smirk.gif', '19', '19', 'smirk'), - ':roll:' => array('rolleyes.gif', '19', '19', 'rolleyes'), - ':-S' => array('confused.gif', '19', '19', 'confused'), - ':wow:' => array('surprise.gif', '19', '19', 'surprised'), - ':bug:' => array('bigsurprise.gif', '19', '19', 'big surprise'), - ':-P' => array('tongue_laugh.gif', '19', '19', 'tongue laugh'), - '%-P' => array('tongue_rolleye.gif', '19', '19', 'tongue rolleye'), - ';-P' => array('tongue_wink.gif', '19', '19', 'tongue wink'), - ':P' => array('raspberry.gif', '19', '19', 'raspberry'), - ':blank:' => array('blank.gif', '19', '19', 'blank stare'), - ':long:' => array('longface.gif', '19', '19', 'long face'), - ':ohh:' => array('ohh.gif', '19', '19', 'ohh'), - ':grrr:' => array('grrr.gif', '19', '19', 'grrr'), - ':gulp:' => array('gulp.gif', '19', '19', 'gulp'), - '8-/' => array('ohoh.gif', '19', '19', 'oh oh'), - ':down:' => array('downer.gif', '19', '19', 'downer'), - ':red:' => array('embarrassed.gif', '19', '19', 'red face'), - ':sick:' => array('sick.gif', '19', '19', 'sick'), - ':shut:' => array('shuteye.gif', '19', '19', 'shut eye'), - ':-/' => array('hmm.gif', '19', '19', 'hmmm'), - '>:(' => array('mad.gif', '19', '19', 'mad'), - ':mad:' => array('mad.gif', '19', '19', 'mad'), - '>:-(' => array('angry.gif', '19', '19', 'angry'), - ':angry:' => array('angry.gif', '19', '19', 'angry'), - ':zip:' => array('zip.gif', '19', '19', 'zipper'), - ':kiss:' => array('kiss.gif', '19', '19', 'kiss'), - ':ahhh:' => array('shock.gif', '19', '19', 'shock'), - ':coolsmile:' => array('shade_smile.gif', '19', '19', 'cool smile'), - ':coolsmirk:' => array('shade_smirk.gif', '19', '19', 'cool smirk'), - ':coolgrin:' => array('shade_grin.gif', '19', '19', 'cool grin'), - ':coolhmm:' => array('shade_hmm.gif', '19', '19', 'cool hmm'), - ':coolmad:' => array('shade_mad.gif', '19', '19', 'cool mad'), - ':coolcheese:' => array('shade_cheese.gif', '19', '19', 'cool cheese'), - ':vampire:' => array('vampire.gif', '19', '19', 'vampire'), - ':snake:' => array('snake.gif', '19', '19', 'snake'), - ':exclaim:' => array('exclaim.gif', '19', '19', 'exclaim'), - ':question:' => array('question.gif', '19', '19', 'question') - -); + array('grin.gif', '19', '19', 'grin'), + ':lol:' => array('lol.gif', '19', '19', 'LOL'), + ':cheese:' => array('cheese.gif', '19', '19', 'cheese'), + ':)' => array('smile.gif', '19', '19', 'smile'), + ';-)' => array('wink.gif', '19', '19', 'wink'), + ';)' => array('wink.gif', '19', '19', 'wink'), + ':smirk:' => array('smirk.gif', '19', '19', 'smirk'), + ':roll:' => array('rolleyes.gif', '19', '19', 'rolleyes'), + ':-S' => array('confused.gif', '19', '19', 'confused'), + ':wow:' => array('surprise.gif', '19', '19', 'surprised'), + ':bug:' => array('bigsurprise.gif', '19', '19', 'big surprise'), + ':-P' => array('tongue_laugh.gif', '19', '19', 'tongue laugh'), + '%-P' => array('tongue_rolleye.gif', '19', '19', 'tongue rolleye'), + ';-P' => array('tongue_wink.gif', '19', '19', 'tongue wink'), + ':P' => array('raspberry.gif', '19', '19', 'raspberry'), + ':blank:' => array('blank.gif', '19', '19', 'blank stare'), + ':long:' => array('longface.gif', '19', '19', 'long face'), + ':ohh:' => array('ohh.gif', '19', '19', 'ohh'), + ':grrr:' => array('grrr.gif', '19', '19', 'grrr'), + ':gulp:' => array('gulp.gif', '19', '19', 'gulp'), + '8-/' => array('ohoh.gif', '19', '19', 'oh oh'), + ':down:' => array('downer.gif', '19', '19', 'downer'), + ':red:' => array('embarrassed.gif', '19', '19', 'red face'), + ':sick:' => array('sick.gif', '19', '19', 'sick'), + ':shut:' => array('shuteye.gif', '19', '19', 'shut eye'), + ':-/' => array('hmm.gif', '19', '19', 'hmmm'), + '>:(' => array('mad.gif', '19', '19', 'mad'), + ':mad:' => array('mad.gif', '19', '19', 'mad'), + '>:-(' => array('angry.gif', '19', '19', 'angry'), + ':angry:' => array('angry.gif', '19', '19', 'angry'), + ':zip:' => array('zip.gif', '19', '19', 'zipper'), + ':kiss:' => array('kiss.gif', '19', '19', 'kiss'), + ':ahhh:' => array('shock.gif', '19', '19', 'shock'), + ':coolsmile:' => array('shade_smile.gif', '19', '19', 'cool smile'), + ':coolsmirk:' => array('shade_smirk.gif', '19', '19', 'cool smirk'), + ':coolgrin:' => array('shade_grin.gif', '19', '19', 'cool grin'), + ':coolhmm:' => array('shade_hmm.gif', '19', '19', 'cool hmm'), + ':coolmad:' => array('shade_mad.gif', '19', '19', 'cool mad'), + ':coolcheese:' => array('shade_cheese.gif', '19', '19', 'cool cheese'), + ':vampire:' => array('vampire.gif', '19', '19', 'vampire'), + ':snake:' => array('snake.gif', '19', '19', 'snake'), + ':exclaim:' => array('exclaim.gif', '19', '19', 'exclaim'), + ':question:' => array('question.gif', '19', '19', 'question') + +); diff --git a/api/config/sphinx.php b/api/config/sphinx.php index b6f509b7..f40308bf 100644 --- a/api/config/sphinx.php +++ b/api/config/sphinx.php @@ -1,6 +1,6 @@ - 'Windows 10', - 'windows nt 6.3' => 'Windows 8.1', - 'windows nt 6.2' => 'Windows 8', - 'windows nt 6.1' => 'Windows 7', - 'windows nt 6.0' => 'Windows Vista', - 'windows nt 5.2' => 'Windows 2003', - 'windows nt 5.1' => 'Windows XP', - 'windows nt 5.0' => 'Windows 2000', - 'windows nt 4.0' => 'Windows NT 4.0', - 'winnt4.0' => 'Windows NT 4.0', - 'winnt 4.0' => 'Windows NT', - 'winnt' => 'Windows NT', - 'windows 98' => 'Windows 98', - 'win98' => 'Windows 98', - 'windows 95' => 'Windows 95', - 'win95' => 'Windows 95', - 'windows phone' => 'Windows Phone', - 'windows' => 'Unknown Windows OS', - 'android' => 'Android', - 'blackberry' => 'BlackBerry', - 'iphone' => 'iOS', - 'ipad' => 'iOS', - 'ipod' => 'iOS', - 'os x' => 'Mac OS X', - 'ppc mac' => 'Power PC Mac', - 'freebsd' => 'FreeBSD', - 'ppc' => 'Macintosh', - 'linux' => 'Linux', - 'debian' => 'Debian', - 'sunos' => 'Sun Solaris', - 'beos' => 'BeOS', - 'apachebench' => 'ApacheBench', - 'aix' => 'AIX', - 'irix' => 'Irix', - 'osf' => 'DEC OSF', - 'hp-ux' => 'HP-UX', - 'netbsd' => 'NetBSD', - 'bsdi' => 'BSDi', - 'openbsd' => 'OpenBSD', - 'gnu' => 'GNU/Linux', - 'unix' => 'Unknown Unix OS', - 'symbian' => 'Symbian OS' -); - - -// The order of this array should NOT be changed. Many browsers return -// multiple browser types so we want to identify the sub-type first. -$browsers = array( - 'OPR' => 'Opera', - 'Flock' => 'Flock', - 'Edge' => 'Edge', - 'Chrome' => 'Chrome', - // Opera 10+ always reports Opera/9.80 and appends Version/Directory access is forbidden.
- - - + + + +Directory access is forbidden.
+ + + diff --git a/api/helpers/format_helper.php b/api/helpers/format_helper.php index c95b3d2a..4cb894a4 100644 --- a/api/helpers/format_helper.php +++ b/api/helpers/format_helper.php @@ -1,101 +1,101 @@ - $data); - is_numeric($data) && $data = array('count' => $data); - is_string($data) && $data = array('result' => $data); - - if(is_array($data) && array_search(current($data), $data) === 0) - { - $data = array('list' => $data); - } - - if(empty($data)) - { - $data = array('result' => array()); - } - - return array('errCode' => '0', 'data' => $data); - } -} - -/** - * 过滤空字符 - * @param $array - * @return array - */ -if(!function_exists('_clean')) -{ - function _clean($array) - { - if(!is_array($array)) - { - return $array; - } - - foreach($array as $k => $v) - { - if($v === '' || $v === null || $v === array()) - { - unset($array[$k]); - } - elseif(is_array($v)) - { - $array[$k] = _clean($v); - } - } - - return $array; - } -} - -/** - * API 输出 - * @param $result - * @param bool $ifgzip - */ - -if(!function_exists('print_result')) -{ - function print_result($result, $ifgzip = false) - { - if(!isset($result['errCode'])) - { - $data = info_format($result); - } - else - { - $data = $result; - } - - if($ifgzip) - { - header('Content-Type: application/json'); - header('Content-Encoding: gzip'); - echo gzencode(json_encode($data, JSON_UNESCAPED_UNICODE), 6); - exit; - } - else - { - $result = json_encode($data, JSON_UNESCAPED_UNICODE); - echo $result; - exit; - } - } -} - - - - + $data); + is_numeric($data) && $data = array('count' => $data); + is_string($data) && $data = array('result' => $data); + + if(is_array($data) && array_search(current($data), $data) === 0) + { + $data = array('list' => $data); + } + + if(empty($data)) + { + $data = array('result' => array()); + } + + return array('errCode' => '0', 'data' => $data); + } +} + +/** + * 过滤空字符 + * @param $array + * @return array + */ +if(!function_exists('_clean')) +{ + function _clean($array) + { + if(!is_array($array)) + { + return $array; + } + + foreach($array as $k => $v) + { + if($v === '' || $v === null || $v === array()) + { + unset($array[$k]); + } + elseif(is_array($v)) + { + $array[$k] = _clean($v); + } + } + + return $array; + } +} + +/** + * API 输出 + * @param $result + * @param bool $ifgzip + */ + +if(!function_exists('print_result')) +{ + function print_result($result, $ifgzip = false) + { + if(!isset($result['errCode'])) + { + $data = info_format($result); + } + else + { + $data = $result; + } + + if($ifgzip) + { + header('Content-Type: application/json'); + header('Content-Encoding: gzip'); + echo gzencode(json_encode($data, JSON_UNESCAPED_UNICODE), 6); + exit; + } + else + { + $result = json_encode($data, JSON_UNESCAPED_UNICODE); + echo $result; + exit; + } + } +} + + + + diff --git a/api/helpers/image_helper.php b/api/helpers/image_helper.php index ee887e0e..7c49f41f 100644 --- a/api/helpers/image_helper.php +++ b/api/helpers/image_helper.php @@ -1,46 +1,46 @@ -load->library('qiniu'); - foreach ($srcs as $key => $val) - { - $filename = $ci->qiniu->getFileName($val); - $filename = $path . date('Y/m').'/'.$filename; - $file = $ci->qiniu->fetch($val, $filename); - - if (!$file) - { - $urls[$key] = ''; - continue; - } - else - { - $urls[$key] = $file['file']; - } - } - } - - return $urls; - } +load->library('qiniu'); + foreach ($srcs as $key => $val) + { + $filename = $ci->qiniu->getFileName($val); + $filename = $path . date('Y/m').'/'.$filename; + $file = $ci->qiniu->fetch($val, $filename); + + if (!$file) + { + $urls[$key] = ''; + continue; + } + else + { + $urls[$key] = $file['file']; + } + } + } + + return $urls; + } } \ No newline at end of file diff --git a/api/helpers/index.html b/api/helpers/index.html index b48b4908..b702fbc3 100644 --- a/api/helpers/index.html +++ b/api/helpers/index.html @@ -1,11 +1,11 @@ - - - -Directory access is forbidden.
- - - + + + +Directory access is forbidden.
+ + + diff --git a/api/hooks/index.html b/api/hooks/index.html index b48b4908..b702fbc3 100644 --- a/api/hooks/index.html +++ b/api/hooks/index.html @@ -1,11 +1,11 @@ - - - -Directory access is forbidden.
- - - + + + +Directory access is forbidden.
+ + + diff --git a/api/index.html b/api/index.html index b48b4908..b702fbc3 100644 --- a/api/index.html +++ b/api/index.html @@ -1,11 +1,11 @@ - - - -Directory access is forbidden.
- - - + + + +Directory access is forbidden.
+ + + diff --git a/api/language/english/index.html b/api/language/english/index.html index b48b4908..b702fbc3 100644 --- a/api/language/english/index.html +++ b/api/language/english/index.html @@ -1,11 +1,11 @@ - - - -Directory access is forbidden.
- - - + + + +Directory access is forbidden.
+ + + diff --git a/api/language/index.html b/api/language/index.html index b48b4908..b702fbc3 100644 --- a/api/language/index.html +++ b/api/language/index.html @@ -1,11 +1,11 @@ - - - -Directory access is forbidden.
- - - + + + +Directory access is forbidden.
+ + + diff --git a/api/language/zh/error_lang.php b/api/language/zh/error_lang.php index c97c5320..c69f7263 100644 --- a/api/language/zh/error_lang.php +++ b/api/language/zh/error_lang.php @@ -1,23 +1,23 @@ - 'smtp.163.com', + 'port' => '25', + 'username' => '18350451617@163.com', + 'pwd' => 'lin2821808', + 'fromname' => '小鱼网', + ); + + public function __construct($params = array()) + { + $params && $this->init($params); + } + + /** + * 初始化 + * @param array $params 未设置默认server配置mail数组第一项 + * @param boolean $debug + */ + public function init($params = array(), $debug = false){ + + if($params){ + $this->host = $params['host']; + $this->port = $params['port']; + $this->username = $params['username']; + $this->pwd = $params['pwd']; + $this->fromname = $params['fromname']; + $this->debug = $debug; + } else { + $params = $this->config; + $this->host = $params['host']; + $this->port = $params['port']; + $this->username = $params['username']; + $this->pwd = $params['pwd']; + $this->fromname = $params['fromname']; + } + + $mailer = new PHPMailer(); + /* Server Settings */ + $mailer->IsSMTP(); // 使用 SMTP 方式发送邮件 + $mailer->SMTPAuth = true; //启用SMTP认证 + $mailer->Host = $this->host; //SMTP服务器 以163邮箱为例子 + $mailer->Port = $this->port; //邮件发送端口,163的是25,设置ssl连接smtp服务器的远程服务器端口号465 +// $mailer->SMTPSecure = 'ssl'; + $mailer->SMTPDebug = $this->debug;// 是否启用smtp的debug进行调试 开发环境建议开启 生产环境注释掉即可 默认关闭debug调试模式 + /* Account Settings */ + $mailer->Username = $this->username; + $mailer->Password = $this->pwd; + $mailer->From = $this->username; + /* Content Setting */ + $mailer->IsHTML(true); //支持html格式内容 + $mailer->CharSet = 'UTF-8'; + + $this->mailer = $mailer; + } + + /** + * 添加附件 + * @param $path (文件路径 + * @param string $name (指定名称 + */ + public function add_attachment($path, $name=''){ + $this->mailer->AddAttachment($path, $name); + } + + /** + * 发送邮件 + * @param $email (接收邮件地址 + * @param $title (邮件标题 + * @param $content (邮件内容 + * @return bool + */ + public function send($email, $title, $content){ + $this->mailer->FromName = $this->fromname; + $this->mailer->addAddress($email); + $this->mailer->Subject = $title; + $this->mailer->Body = $content; + + return (bool)$this->mailer->send(); // 发送邮件 + } + + public function error(){ + var_dump($this->mailer->ErrorInfo); + } +} \ No newline at end of file diff --git a/api/libraries/index.html b/api/libraries/index.html index b48b4908..b702fbc3 100644 --- a/api/libraries/index.html +++ b/api/libraries/index.html @@ -1,11 +1,11 @@ - - - -Directory access is forbidden.
- - - + + + +Directory access is forbidden.
+ + + diff --git a/api/models/index.html b/api/models/index.html index b48b4908..b702fbc3 100644 --- a/api/models/index.html +++ b/api/models/index.html @@ -1,11 +1,11 @@ - - - -Directory access is forbidden.
- - - + + + +Directory access is forbidden.
+ + + diff --git a/api/third_party/PHPMailer.php b/api/third_party/PHPMailer.php new file mode 100644 index 00000000..77d7e595 --- /dev/null +++ b/api/third_party/PHPMailer.php @@ -0,0 +1,1721 @@ +exceptions=($exceptions==true); + } + public function IsHTML($ishtml=true){ + if($ishtml){ + $this->ContentType='text/html'; + }else{ + $this->ContentType='text/plain'; + } + } + public function IsSMTP(){ + $this->Mailer='SMTP'; + } + public function IsMail(){ + $this->Mailer='mail'; + } + public function IsSendmail(){ + if(!stristr(ini_get('sendmail_path'),'sendmail')){ + $this->Sendmail='/var/qmail/bin/sendmail'; + } + $this->Mailer='sendmail'; + } + public function IsQmail(){ + if(stristr(ini_get('sendmail_path'),'qmail')){ + $this->Sendmail='/var/qmail/bin/sendmail'; + } + $this->Mailer='sendmail'; + } + public function AddAddress($address,$name=''){ + return $this->AddAnAddress('to',$address,$name); + } + public function AddCC($address,$name=''){ + return $this->AddAnAddress('cc',$address,$name); + } + public function AddBCC($address,$name=''){ + return $this->AddAnAddress('bcc',$address,$name); + } + public function AddReplyTo($address,$name=''){ + return $this->AddAnAddress('ReplyTo',$address,$name); + } + private function AddAnAddress($kind,$address,$name=''){ + if(!preg_match('/^(to|cc|bcc|ReplyTo)$/',$kind)){ + if($this->exceptions){ + throw new phpmailerException('Invalid recipient array: '.$kind); + } + return false; + } + $address=trim($address); + $name=trim(preg_replace('/[\r\n]+/','',$name)); + if(!self::ValidateAddress($address)){ + $this->SetError($this->Lang('invalid_address').': '.$address); + if($this->exceptions){ + throw new phpmailerException($this->Lang('invalid_address').': '.$address); + } + return false; + } + if($kind!='ReplyTo'){ + if(!isset($this->all_recipients[strtolower($address)])){ + array_push($this->$kind,array($address,$name)); + $this->all_recipients[strtolower($address)]=true; + return true; + } + }else{ + if(!array_key_exists(strtolower($address),$this->ReplyTo)){ + $this->ReplyTo[strtolower($address)]=array($address,$name); + return true; + } + } + return false; + } + public function SetFrom($address,$name='',$auto=1){ + $address=trim($address); + $name=trim(preg_replace('/[\r\n]+/','',$name)); + if(!self::ValidateAddress($address)){ + $this->SetError($this->Lang('invalid_address').': '.$address); + if($this->exceptions){ + throw new phpmailerException($this->Lang('invalid_address').': '.$address); + } + return false; + } + + $this->From=$address; + $this->FromName=$name; + if($auto){ + if(empty($this->ReplyTo)){ + $this->AddAnAddress('ReplyTo',$address,$name); + } + if(empty($this->Sender)){ + $this->Sender=$address; + } + } + return true; + } + public static function ValidateAddress($address){ + if(function_exists('filter_var')){ + if(filter_var($address,FILTER_VALIDATE_EMAIL)===FALSE){ + return false; + }else{ + return true; + } + }else{ + return preg_match('/^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9_](?:[a-zA-Z0-9_\-](?!\.)){0,61}[a-zA-Z0-9_-]?\.)+[a-zA-Z0-9_](?:[a-zA-Z0-9_\-](?!$)){0,61}[a-zA-Z0-9_]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/',$address); + } + } + + public function Send(){ + try{ + if((count($this->to)+count($this->cc)+count($this->bcc))<1){ + throw new phpmailerException($this->Lang('provide_address'),self::STOP_CRITICAL); + } + if(!empty($this->AltBody)){ + $this->ContentType='multipart/alternative'; + } + $this->error_count=0; + $this->SetMessageType(); + $header=$this->CreateHeader(); + $body=$this->CreateBody(); + if(empty($this->Body)){ + throw new phpmailerException($this->Lang('empty_message'),self::STOP_CRITICAL); + } + if($this->DKIM_domain&&$this->DKIM_private){ + $header_dkim=$this->DKIM_Add($header,$this->Subject,$body);$header=str_replace("\r\n","\n",$header_dkim).$header; + } + switch($this->Mailer){ + case 'sendmail': + return $this->SendmailSend($header,$body); + case 'SMTP': + return $this->SmtpSend($header,$body); + default: + return $this->MailSend($header,$body); + } + }catch(phpmailerException $e){ + $this->SetError($e->getMessage()); + if($this->exceptions){ + throw $e; + } + return false; + } + } + + protected function SendmailSend($header,$body){ + if($this->Sender!=''){ + $sendmail=sprintf("%s -oi -f %s -t",escapeshellcmd($this->Sendmail),escapeshellarg($this->Sender)); + }else{ + $sendmail=sprintf("%s -oi -t",escapeshellcmd($this->Sendmail)); + }if($this->SingleTo===true){ + foreach($this->SingleToArray as $key=>$val){ + if(!@$mail=popen($sendmail,'w')){ + throw new phpmailerException($this->Lang('execute').$this->Sendmail,self::STOP_CRITICAL); + } + fputs($mail,"To: ".$val."\n"); + fputs($mail,$header); + fputs($mail,$body); + $result=pclose($mail); + $isSent=($result==0)?1:0; + $this->doCallback($isSent,$val,$this->cc,$this->bcc,$this->Subject,$body); + if($result!=0){ + throw new phpmailerException($this->Lang('execute').$this->Sendmail,self::STOP_CRITICAL); + } + } + }else{ + if(!@$mail=popen($sendmail,'w')){ + throw new phpmailerException($this->Lang('execute').$this->Sendmail,self::STOP_CRITICAL); + } + fputs($mail,$header); + fputs($mail,$body); + $result=pclose($mail); + $isSent=($result==0)?1:0; + $this->doCallback($isSent,$this->to,$this->cc,$this->bcc,$this->Subject,$body); + if($result!=0){ + throw new phpmailerException($this->Lang('execute').$this->Sendmail,self::STOP_CRITICAL); + } + } + return true; + } + protected function MailSend($header,$body){ + $toArr=array(); + foreach($this->to as $t){ + $toArr[]=$this->AddrFormat($t); + } + $to=implode(', ',$toArr); + $params=sprintf("-oi -f %s",$this->Sender); + if($this->Sender!=''&&strlen(ini_get('safe_mode'))<1){ + $old_from=ini_get('sendmail_from'); + ini_set('sendmail_from',$this->Sender); + if($this->SingleTo===true&&count($toArr)>1){ + foreach($toArr as $key=>$val){ + $rt=@mail($val,$this->EncodeHeader($this->SecureHeader($this->Subject)),$body,$header,$params); + $isSent=($rt==1)?1:0; + $this->doCallback($isSent,$val,$this->cc,$this->bcc,$this->Subject,$body); + } + }else{ + $rt=@mail($to,$this->EncodeHeader($this->SecureHeader($this->Subject)),$body,$header,$params); + $isSent=($rt==1)?1:0; + $this->doCallback($isSent,$to,$this->cc,$this->bcc,$this->Subject,$body); + } + }else{ + if($this->SingleTo===true&&count($toArr)>1){ + foreach($toArr as $key=>$val){ + $rt=@mail($val,$this->EncodeHeader($this->SecureHeader($this->Subject)),$body,$header,$params); + $isSent=($rt==1)?1:0; + $this->doCallback($isSent,$val,$this->cc,$this->bcc,$this->Subject,$body); + } + }else{ + $rt=@mail($to,$this->EncodeHeader($this->SecureHeader($this->Subject)),$body,$header); + $isSent=($rt==1)?1:0; + $this->doCallback($isSent,$to,$this->cc,$this->bcc,$this->Subject,$body); + } + } + if(isset($old_from)){ + ini_set('sendmail_from',$old_from); + } + if(!$rt){ + throw new phpmailerException($this->Lang('instantiate'),self::STOP_CRITICAL); + } + return true; + } + + protected function SmtpSend($header,$body){ + $bad_rcpt=array(); + if(!$this->SmtpConnect()){ + throw new phpmailerException($this->Lang('smtp_connect_failed'),self::STOP_CRITICAL); + } + $smtp_from=($this->Sender=='')?$this->From:$this->Sender; + if(!$this->smtp->Mail($smtp_from)){ + throw new phpmailerException($this->Lang('from_failed').$smtp_from,self::STOP_CRITICAL); + } + foreach($this->to as $to){ + if(!$this->smtp->Recipient($to[0])){ + $bad_rcpt[]=$to[0]; + $isSent=0; + $this->doCallback($isSent,$to[0],'','',$this->Subject,$body); + }else{ + $isSent=1; + $this->doCallback($isSent,$to[0],'','',$this->Subject,$body); + } + } + foreach($this->cc as $cc){ + if(!$this->smtp->Recipient($cc[0])){ + $bad_rcpt[]=$cc[0]; + $isSent=0; + $this->doCallback($isSent,'',$cc[0],'',$this->Subject,$body); + }else{ + $isSent=1; + $this->doCallback($isSent,'',$cc[0],'',$this->Subject,$body); + } + } + foreach($this->bcc as $bcc){ + if(!$this->smtp->Recipient($bcc[0])){ + $bad_rcpt[]=$bcc[0]; + $isSent=0; + $this->doCallback($isSent,'','',$bcc[0],$this->Subject,$body); + }else{ + $isSent=1; + $this->doCallback($isSent,'','',$bcc[0],$this->Subject,$body); + } + } + if(count($bad_rcpt)>0){ + $badaddresses=implode(', ',$bad_rcpt); + throw new phpmailerException($this->Lang('recipients_failed').$badaddresses); + } + if(!$this->smtp->Data($header.$body)){ + throw new phpmailerException($this->Lang('data_not_accepted'),self::STOP_CRITICAL); + } + if($this->SMTPKeepAlive==true){ + $this->smtp->Reset(); + } + return true; + } + + public function SmtpConnect(){ + if(is_null($this->smtp)){ + $this->smtp=new SMTP(); + } + $this->smtp->do_debug=$this->SMTPDebug; + $hosts=explode(';',$this->Host); + $index=0; + $connection=$this->smtp->Connected(); + try{ + while($index'.$this->Lang('smtp_error').$lasterror['smtp_msg']."
\n"; + } + } + $this->ErrorInfo=$msg; + } + public static function RFCDate(){ + $tz=date('Z'); + $tzs=($tz<0)?'-':'+'; + $tz=abs($tz); + $tz=(int)($tz/3600)*100+($tz%3600)/60; + $result=sprintf("%s %s%04d",date('D, j M Y H:i:s'),$tzs,$tz); + return $result; + } + private function ServerHostname(){ + if(!empty($this->Hostname)){ + $result=$this->Hostname; + }elseif(isset($_SERVER['SERVER_NAME'])){ + $result=$_SERVER['SERVER_NAME']; + }else{ + $result='localhost.localdomain'; + } + return $result; + } + private function Lang($key){ + if(count($this->language)<1){ + $this->SetLanguage('en'); + } + if(isset($this->language[$key])){ + return $this->language[$key]; + }else{ + return 'Language string failed to load: '.$key; + } + } + + public function IsError(){ + return ($this->error_count>0); + } + private function FixEOL($str){ + $str=str_replace("\r\n","\n",$str); + $str=str_replace("\r","\n",$str); + $str=str_replace("\n",$this->LE,$str); + return $str; + } + public function AddCustomHeader($custom_header){ + $this->CustomHeader[]=explode(':',$custom_header,2); + } + public function MsgHTML($message,$basedir=''){ + preg_match_all("/(src|background)=\"(.*)\"/Ui",$message,$images); + if(isset($images[2])){ + foreach($images[2] as $i=>$url){ + if(!preg_match('#^[A-z]+://#',$url)){ + $filename=basename($url); + $directory=dirname($url); + ($directory=='.')?$directory='':''; + $cid='cid:'.md5($filename); + $ext=pathinfo($filename,PATHINFO_EXTENSION); + $mimeType=self::_mime_types($ext); + if(strlen($basedir)>1&&substr($basedir,-1)!='/'){ + $basedir.='/'; + } + if(strlen($directory)>1&&substr($directory,-1)!='/'){ + $directory.='/'; + } + if($this->AddEmbeddedImage($basedir.$directory.$filename,md5($filename),$filename,'base64',$mimeType)){ + $message=preg_replace("/".$images[1][$i]."=\"".preg_quote($url,'/')."\"/Ui",$images[1][$i]."=\"".$cid."\"",$message); + } + } + } + } + $this->IsHTML(true); + $this->Body=$message; + $textMsg=trim(strip_tags(preg_replace('/<(head|title|style|script)[^>]*>.*?<\/\\1>/s','',$message))); + if(!empty($textMsg)&&empty($this->AltBody)){ + $this->AltBody=html_entity_decode($textMsg); + } + if(empty($this->AltBody)){ + $this->AltBody='To view this email message, open it in a program that understands HTML!'."\n\n"; + } + } + public static function _mime_types($ext=''){ + $mimes=array( + 'hqx'=>'application/mac-binhex40', + 'cpt'=>'application/mac-compactpro', + 'doc'=>'application/msword', + 'bin'=>'application/macbinary', + 'dms'=>'application/octet-stream', + 'lha'=>'application/octet-stream', + 'lzh'=>'application/octet-stream', + 'exe'=>'application/octet-stream', + 'class'=>'application/octet-stream', + 'psd'=>'application/octet-stream', + 'so'=>'application/octet-stream', + 'sea'=>'application/octet-stream', + 'dll'=>'application/octet-stream', + 'oda'=>'application/oda', + 'pdf'=>'application/pdf', + 'ai'=>'application/postscript', + 'eps'=>'application/postscript', + 'ps'=>'application/postscript', + 'smi'=>'application/smil', + 'smil'=>'application/smil', + 'mif'=>'application/vnd.mif', + 'xls'=>'application/vnd.ms-excel', + 'ppt'=>'application/vnd.ms-powerpoint', + 'wbxml'=>'application/vnd.wap.wbxml', + 'wmlc'=>'application/vnd.wap.wmlc', + 'dcr'=>'application/x-director', + 'dir'=>'application/x-director', + 'dxr'=>'application/x-director', + 'dvi'=>'application/x-dvi', + 'gtar'=>'application/x-gtar', + 'php'=>'application/x-httpd-php', + 'php4'=>'application/x-httpd-php', + 'php3'=>'application/x-httpd-php', + 'phtml'=>'application/x-httpd-php', + 'phps'=>'application/x-httpd-php-source', + 'js'=>'application/x-javascript', + 'swf'=>'application/x-shockwave-flash', + 'sit'=>'application/x-stuffit', + 'tar'=>'application/x-tar', + 'tgz'=>'application/x-tar', + 'xhtml'=>'application/xhtml+xml', + 'xht'=>'application/xhtml+xml', + 'zip'=>'application/zip', + 'mid'=>'audio/midi', + 'midi'=>'audio/midi', + 'mpga'=>'audio/mpeg', + 'mp2'=>'audio/mpeg', + 'mp3'=>'audio/mpeg', + 'aif'=>'audio/x-aiff', + 'aiff'=>'audio/x-aiff', + 'aifc'=>'audio/x-aiff', + 'ram'=>'audio/x-pn-realaudio', + 'rm'=>'audio/x-pn-realaudio', + 'rpm'=>'audio/x-pn-realaudio-plugin', + 'ra'=>'audio/x-realaudio', + 'rv'=>'video/vnd.rn-realvideo', + 'wav'=>'audio/x-wav', + 'bmp'=>'image/bmp', + 'gif'=>'image/gif', + 'jpeg'=>'image/jpeg', + 'jpg'=>'image/jpeg', + 'jpe'=>'image/jpeg', + 'png'=>'image/png', + 'tiff'=>'image/tiff', + 'tif'=>'image/tiff', + 'css'=>'text/css', + 'html'=>'text/html', + 'htm'=>'text/html', + 'shtml'=>'text/html', + 'txt'=>'text/plain', + 'text'=>'text/plain', + 'log'=>'text/plain', + 'rtx'=>'text/richtext', + 'rtf'=>'text/rtf', + 'xml'=>'text/xml', + 'xsl'=>'text/xml', + 'mpeg'=>'video/mpeg', + 'mpg'=>'video/mpeg', + 'mpe'=>'video/mpeg', + 'qt'=>'video/quicktime', + 'mov'=>'video/quicktime', + 'avi'=>'video/x-msvideo', + 'movie'=>'video/x-sgi-movie', + 'doc'=>'application/msword', + 'word'=>'application/msword', + 'xl'=>'application/excel', + 'eml'=>'message/rfc822' + ); + return (!isset($mimes[strtolower($ext)]))?'application/octet-stream':$mimes[strtolower($ext)]; + } + public function set($name,$value=''){ + try{ + if(isset($this->$name)){ + $this->$name=$value; + }else{ + throw new phpmailerException($this->Lang('variable_set').$name,self::STOP_CRITICAL); + } + }catch(Exception$e){ + $this->SetError($e->getMessage()); + if($e->getCode()==self::STOP_CRITICAL){ + return false; + } + } + return true; + } + public function SecureHeader($str){ + $str=str_replace("\r",'',$str); + $str=str_replace("\n",'',$str); + return trim($str); + } + public function Sign($cert_filename,$key_filename,$key_pass){ + $this->sign_cert_file=$cert_filename; + $this->sign_key_file=$key_filename; + $this->sign_key_pass=$key_pass; + } + public function DKIM_QP($txt){ + $tmp=""; + $line=""; + for($i=0;$iDirectory access is forbidden.
+ + + diff --git a/api/views/errors/cli/error_404.php b/api/views/errors/cli/error_404.php index af8fecd0..6984b61e 100644 --- a/api/views/errors/cli/error_404.php +++ b/api/views/errors/cli/error_404.php @@ -1,8 +1,8 @@ - - -An uncaught Exception was encountered - -Type: -Message: -Filename: getFile(), "\n"; ?> -Line Number: getLine(); ?> - - - -Backtrace: -getTrace() as $error): ?> - - File: - Line: - Function: - - - - + + +An uncaught Exception was encountered + +Type: +Message: +Filename: getFile(), "\n"; ?> +Line Number: getLine(); ?> + + + +Backtrace: +getTrace() as $error): ?> + + File: + Line: + Function: + + + + diff --git a/api/views/errors/cli/error_general.php b/api/views/errors/cli/error_general.php index af8fecd0..6984b61e 100644 --- a/api/views/errors/cli/error_general.php +++ b/api/views/errors/cli/error_general.php @@ -1,8 +1,8 @@ - - -A PHP Error was encountered - -Severity: -Message: -Filename: -Line Number: - - - -Backtrace: - - - File: - Line: - Function: - - - - + + +A PHP Error was encountered + +Severity: +Message: +Filename: +Line Number: + + + +Backtrace: + + + File: + Line: + Function: + + + + diff --git a/api/views/errors/cli/index.html b/api/views/errors/cli/index.html index b48b4908..b702fbc3 100644 --- a/api/views/errors/cli/index.html +++ b/api/views/errors/cli/index.html @@ -1,11 +1,11 @@ - - - -Directory access is forbidden.
- - - + + + +Directory access is forbidden.
+ + + diff --git a/api/views/errors/html/error_404.php b/api/views/errors/html/error_404.php index 38689d75..756ea9d6 100644 --- a/api/views/errors/html/error_404.php +++ b/api/views/errors/html/error_404.php @@ -1,64 +1,64 @@ - - - - -Type:
-Message:
-Filename: getFile(); ?>
-Line Number: getLine(); ?>
- - - -Backtrace:
- getTrace() as $error): ?> - - - -
- File:
- Line:
- Function:
-
Type:
+Message:
+Filename: getFile(); ?>
+Line Number: getLine(); ?>
+ + + +Backtrace:
+ getTrace() as $error): ?> + + + +
+ File:
+ Line:
+ Function:
+
Severity:
-Message:
-Filename:
-Line Number:
- - - -Backtrace:
- - - - -
- File:
- Line:
- Function:
-
Severity:
+Message:
+Filename:
+Line Number:
+ + + +Backtrace:
+ + + + +
+ File:
+ Line:
+ Function:
+
Directory access is forbidden.
- - - + + + +Directory access is forbidden.
+ + + diff --git a/api/views/errors/index.html b/api/views/errors/index.html index b48b4908..b702fbc3 100644 --- a/api/views/errors/index.html +++ b/api/views/errors/index.html @@ -1,11 +1,11 @@ - - - -Directory access is forbidden.
- - - + + + +Directory access is forbidden.
+ + + diff --git a/api/views/welcome_message.php b/api/views/welcome_message.php index ec5e39b5..d96a2668 100644 --- a/api/views/welcome_message.php +++ b/api/views/welcome_message.php @@ -1,45 +1,45 @@ - - - - - -