diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..26414cd --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +.gitignore +CONTRIBUTING.md +Dockerfile +license.txt +README.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..78e06bd --- /dev/null +++ b/.gitignore @@ -0,0 +1,17 @@ +# Configuration stuff +/application/config/development +/application/sessions +/ipconfig.php + +# Dependencies +/node_modules +/vendor + +# Other files +/.htaccess +.idea +.sass-cache +adminer.php +/nbproject +/.php_cs.cache +/doc diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..f716ecb --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,62 @@ +# Contribution Guide + +## Contribution to InvoicePlane + +Every help is welcome, you don't have to be a professional PHP developer or SQL database engineer. +If you are not familiar with PHP or coding in general you could also help us in other ways. +You may also join our [Slack Chat](https://invoiceplane-slack.herokuapp.com/) to discuss certain +topics with other developers or get some help. + +## Contents + +* Get familiar with our Development Guidelines +* Tools for development +* Contributing Code + +--- + +## Get familiar with our Development Guidelines + +We are following some strict development guidelines while developing. + +### PHP +Coding Standard: PSR-2 + +### JavaScript +Use JShint / JSlint to check your JavaScript code and try to resolve all code issues + +### CSS +We use SASS only. + +--- + +## Contributing Code + +:warning: **Read this carefully to prevent your pull request to be closed!** + +1. Before you submit any code to the repository please take a look at the [development tracker](https://development.invoiceplane.com) and search for your issue! + * If an issue exists and someone is working on it, please contact this person. + * If an issue exists and no one is working on it, assign it to yourself or write a comment. +2. Always reference the issue ID (e.g. IP-317) in all commits you make for this issue. +3. Before you create a pull request, rebase from the development branch. + * Add the development branch as a remote: `git remote add ip git@github.com:InvoicePlane/InvoicePlane.git` + * Do a rebase with the following command: `git pull --rebase ip development` + Where `ip` is the name of the remote and `development` the branch. + * Solve all conflicts and check if your code is still working. +4. Submit the pull request, reference the issue ID in the title and add a meaningful description. + + +Please ask questions related to this process if you are unclear. Asking before doing anything may save you and us time. + +--- + +## Tools for development +We received some licenses for commercial development tools you can use if you want. Please contact use at mail@invoiceplane.com to get the license / access as we can't publish them here. + +* JetBrains PhpStorm (PHP IDE) +* Mailtrap.io eMail Testing Solution + +--- + +> _The name 'InvoicePlane' and the InvoicePlane logo are both copyright by Kovah.de and InvoicePlane.com +and their usage is restricted! For more information visit invoiceplane.com/license-copyright_ diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md new file mode 100644 index 0000000..3867e0f --- /dev/null +++ b/DEVELOPMENT.md @@ -0,0 +1,66 @@ +# InvoicePlane v1 Development Guide + +If you want to help developing InvoicePlane you need to prepare InvoicePlane for working with it as huge parts of the application are missing in the source code and need to be downloaded and compiled. +If you have any questions, feel free to join the `#development` channel in our [Slack Chat](https://invoiceplane-slack.herokuapp.com/). + +Please read the [Contribution Guide](CONTRIBUTING.md) before starting to work on the app. + +[![Issue Tracker](https://img.shields.io/badge/Development%3A-Issue%20Tracker-429ae1.svg)](https://development.invoiceplane.com/) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/InvoicePlane/InvoicePlane/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/InvoicePlane/InvoicePlane/?branch=master) + +--- + +## Contents + +* Prepare your machine for InvoicePlane +* Setup InvoicePlane +* Developing with Vagrant + + +## Prepare your machine for InvoicePlane + +The following tasks need to be accomplished before starting to work on and with InvoicePlane: + +* Composer is installed +* Node.js and NPM are installed (Stable version is recommended) +* The `grunt-cli` package is installed globally via NPM + + +## Setup InvoicePlane + +The following steps are required to make InvoicePlane runnable: + +* Make a copy of the `ipconfig.php.example` file and rename the copy to `ipconfig.php`. +* Run `composer install`. +* Run `npm install`. +* Run `grunt build`. + +Then point your webserver to the InvoicePlane directory. That's it. + + +## Developing with Vagrant + +### Prerequisites + +Download the following to setup the InvoicePlane VM. Please note: the VM is for development purposes only. + +* http://www.ansible.com/home +* https://www.vagrantup.com/ +* https://github.com/cogitatio/vagrant-hostsupdater +* https://www.virtualbox.org/wiki/Downloads +* On the virtualbox.org page you will also need to download the appropriate VirtualBox Extension Pack +* Clone the repo to your local machine with `git clone` +* Run `vagrant up` from the cloned directory +* If provisioning fails just run `vagrant provision` from the terminal + +You should be able to navigate to your local though by doing www.invoiceplane.local + +On the setup screen specify localhost, root, *blank password*, invoiceplane as the database configuration. + +*Note:* When the VM is booted you can change the `php.ini` file to setup xdebug or other preferences. + +__Ask questions!__ Please ask questions related to this process if you are unclear. + +--- + +> _The name 'InvoicePlane' and the InvoicePlane logo are both copyright by Kovah.de and InvoicePlane.com +and their usage is restricted! For more information visit invoiceplane.com/license-copyright_ diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..97ec0b8 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,22 @@ +FROM php:5.6-apache + +# Install and enable PHP extensions +# https://wiki.invoiceplane.com/en/1.0/getting-started/requirements +RUN \ + apt-get update && apt-get install -y \ + libfreetype6-dev \ + libjpeg62-turbo-dev \ + libmcrypt-dev \ + libpng12-dev \ + librecode-dev \ + libxml2-dev \ + && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \ + && docker-php-ext-install -j$(nproc) gd mcrypt mysqli recode xmlrpc + +# Copy InvoicePlane into public directory +COPY . /var/www/html + +# Enable .htaccess, set permissions, and enable Apache mod_rewrite +RUN mv /var/www/html/htaccess /var/www/html/.htaccess \ + && chown -R www-data:www-data /var/www/html \ + && a2enmod rewrite diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 0000000..e2a7b9b --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,194 @@ +'use strict'; +module.exports = function (grunt) { + + // Load grunt tasks automatically + require('load-grunt-tasks')(grunt); + + // MODULES + + grunt.config('clean', { + basic: [ + 'assets/**/*.css', 'assets/**/*.css.map', '!assets/core/css/custom.css', '!assets/core/css/custom-pdf.css', // CSS + 'assets/core/js/*.js', '!assets/core/js/scripts.js', '!assets/core/js/jquery-ui.js', // JS + 'assets/core/fonts/*', '!assets/core/fonts/.gitignore' // Fonts + ], + build: ['assets/default/js/dependencies.js', 'assets/default/js/legacy.js'] + }); + + grunt.config('sass', { + dev: { + options: { + outputStyle: 'extended', + sourceMap: true + }, + files: grunt.file.expandMapping(['assets/**/sass/*.scss'], 'css', { + rename: function (dest, matched) { + return matched.replace(/\/sass\//, '/' + dest + '/').replace(/\.scss$/, '.css'); + } + }) + }, + build: { + options: { + outputStyle: 'compressed' + }, + files: grunt.file.expandMapping(['assets/**/sass/*.scss'], 'css', { + rename: function (dest, matched) { + return matched.replace(/\/sass\//, '/' + dest + '/').replace(/\.scss$/, '.css'); + } + }) + } + }); + + grunt.config('postcss', { + dev: { + options: { + map: true, + processors: [ + require('autoprefixer')({ + browsers: 'last 3 version' + }) + ] + }, + src: [ + 'assets/**/css/*.css', + '!assets/core/css/custom.css', + '!assets/core/css/custom-pdf.css' + ] + }, + build: { + options: { + map: false, + processors: [ + require('autoprefixer')({ + browsers: 'last 3 version' + }) + ] + }, + src: [ + 'assets/**/css/*.css', + '!assets/core/css/custom.css', + '!assets/core/css/custom-pdf.css' + ] + } + }); + + grunt.config('concat', { + legacy: { + src: [ + 'node_modules/html5shiv/dist/html5shiv.js' + ], + dest: 'assets/core/js/legacy.js' + }, + dependencies: { + src: [ + 'node_modules/jquery/dist/jquery.js', + 'node_modules/js-cookie/src/js.cookie.js', + 'assets/core/js/jquery-ui.js', + 'node_modules/bootstrap-sass/assets/javascripts/bootstrap.js', + 'node_modules/bootstrap-datepicker/js/bootstrap-datepicker.js', + 'node_modules/select2/dist/js/select2.full.js', + 'node_modules/dropzone/dist/dropzone.js', + 'node_modules/clipboard/dist/clipboard.js' + ], + dest: 'assets/core/js/dependencies.js' + }, + zxcvbn: { + src: [ + 'node_modules/zxcvbn/dist/zxcvbn.js' + ], + dest: 'assets/core/js/zxcvbn.js' + } + }); + + grunt.config('uglify', { + build: { + files: { + 'assets/core/js/legacy.min.js': ['assets/core/js/legacy.js'], + 'assets/core/js/dependencies.min.js': ['assets/core/js/dependencies.js'], + 'assets/core/js/scripts.min.js': ['assets/core/js/scripts.js'] + } + } + }); + + grunt.config('copy', { + datepickerlocale: { + expand: true, + flatten: true, + src: ['node_modules/bootstrap-datepicker/js/locales/**'], + dest: 'assets/core/js/locales/', + filter: 'isFile' + }, + fontawesome: { + expand: true, + flatten: true, + src: ['node_modules/font-awesome/fonts/*'], + dest: 'assets/core/fonts' + }, + devjs: { + files: [{ + cwd: 'assets/core/js/', + src: [ + '*.js', '!jquery-ui.js' + ], + dest: 'assets/core/js/', + expand: true, + rename: function(dest, src) { + return (dest + src).replace('.js', '.min.js'); + } + }] + } + }); + + grunt.config('watch', { + sass: { + files: "assets/**/*.scss", + tasks: ['sass:dev', 'postcss:dev'] + }, + js: { + files: "assets/core/js/scripts.js", + tasks: ['uglify'] + } + }); + + // TASKS + + grunt.registerTask('default', 'build'); + + grunt.registerTask('dev-build', [ + 'clean:basic', + 'sass:dev', + 'postcss:dev', + 'concat:legacy', + 'concat:dependencies', + 'concat:zxcvbn', + 'copy:datepickerlocale', + 'copy:fontawesome', + 'copy:devjs' + ]); + + grunt.registerTask('dev', [ + 'clean:basic', + 'sass:dev', + 'postcss:dev', + 'concat:legacy', + 'concat:dependencies', + 'concat:zxcvbn', + 'copy:datepickerlocale', + 'copy:fontawesome', + 'copy:devjs', + 'watch' + ]); + + grunt.registerTask('build', [ + 'clean:basic', + 'sass:build', + 'postcss:build', + 'concat:legacy', + 'concat:dependencies', + 'concat:zxcvbn', + 'uglify:build', + 'clean:build', + 'copy:datepickerlocale', + 'copy:fontawesome' + ]); +}; diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..c9b9d7c --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,100 @@ +================================================================================ +Copyright Notice for the InvoicePlane trademark +================================================================================ +The name 'InvoicePlane' and the InvoicePlane logo are original copyright +of InvoicePlane.com / Kovah.de and the following restrictions apply to +both of them: + +You are allowed to: +- use the name 'InvoicePlane' or the InvoicePlane logo in any context directly + related to the application or the project. This includes the application + itself, local communities and news or blog posts about InvoicePlane or +- use the name 'InvoicePlane' or the InvoicePlane logo to provide professional + support or hosting for the InvoicePlane application. + +You are NOT allowed to: +- use the name 'InvoicePlane' or the InvoicePlane logo in any context that is + NOT related to the project, +- alter the name 'InvoicePlane' or the InvoicePlane logo in any way or +- sell or redistribute the application under the name 'InvoicePlane' and the + InvoicePlane logo. + +Please contact us for more information or permission for exceptional cases. + +================================================================================ +License for InvoicePlane +================================================================================ +Copyright (c) 2012-2014 InvoicePlane.com + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +================================================================================ +License for CodeIgniter +================================================================================ +Copyright (c) 2008 - 2011, EllisLab, Inc. +All rights reserved. + +This license is a legal agreement between you and EllisLab Inc. for the use +of CodeIgniter Software (the "Software"). By obtaining the Software you +agree to comply with the terms and conditions of this license. + +PERMITTED USE +You are permitted to use, copy, modify, and distribute the Software and its +documentation, with or without modification, for any purpose, provided that +the following conditions are met: + +1. A copy of this license agreement must be included with the distribution. + +2. Redistributions of source code must retain the above copyright notice in + all source code files. + +3. Redistributions in binary form must reproduce the above copyright notice + in the documentation and/or other materials provided with the distribution. + +4. Any files that have been modified must carry notices stating the nature + of the change and the names of those who changed them. + +5. Products derived from the Software must include an acknowledgment that + they are derived from CodeIgniter in their documentation and/or other + materials provided with the distribution. + +6. Products derived from the Software may not be called "CodeIgniter", + nor may "CodeIgniter" appear in their name, without prior written + permission from EllisLab, Inc. + +INDEMNITY +You agree to indemnify and hold harmless the authors of the Software and +any contributors for any direct, indirect, incidental, or consequential +third-party claims, actions or suits, as well as any related expenses, +liabilities, damages, settlements or fees arising from your use or misuse +of the Software, or a violation of any terms of this license. + +DISCLAIMER OF WARRANTY +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESSED OR +IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF QUALITY, PERFORMANCE, +NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. + +LIMITATIONS OF LIABILITY +YOU ASSUME ALL RISK ASSOCIATED WITH THE INSTALLATION AND USE OF THE SOFTWARE. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS OF THE SOFTWARE BE LIABLE +FOR CLAIMS, DAMAGES OR OTHER LIABILITY ARISING FROM, OUT OF, OR IN CONNECTION +WITH THE SOFTWARE. LICENSE HOLDERS ARE SOLELY RESPONSIBLE FOR DETERMINING THE +APPROPRIATENESS OF USE AND ASSUME ALL RISKS ASSOCIATED WITH ITS USE, INCLUDING +BUT NOT LIMITED TO THE RISKS OF PROGRAM ERRORS, DAMAGE TO EQUIPMENT, LOSS OF +DATA OR SOFTWARE PROGRAMS, OR UNAVAILABILITY OR INTERRUPTION OF OPERATIONS. diff --git a/README.md b/README.md index 1ee53f4..9648ec5 100644 --- a/README.md +++ b/README.md @@ -51,4 +51,3 @@ All security vulnerabilities will be promptly addressed. > _The name 'InvoicePlane' and the InvoicePlane logo are both copyright by Kovah.de and InvoicePlane.com and their usage is restricted! For more information visit invoiceplane.com/license-copyright_ -"# My project's README" diff --git a/application/.htaccess b/application/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/cache/.htaccess b/application/cache/.htaccess new file mode 100644 index 0000000..3418e55 --- /dev/null +++ b/application/cache/.htaccess @@ -0,0 +1 @@ +deny from all \ No newline at end of file diff --git a/application/cache/index.html b/application/cache/index.html new file mode 100644 index 0000000..43a0179 --- /dev/null +++ b/application/cache/index.html @@ -0,0 +1,10 @@ + + + 403 Forbidden + + + +

Directory access is forbidden.

+ + + \ No newline at end of file diff --git a/application/config/.gitattributes b/application/config/.gitattributes new file mode 100644 index 0000000..db5daf8 --- /dev/null +++ b/application/config/.gitattributes @@ -0,0 +1 @@ +config.php merge=ours diff --git a/application/config/autoload.php b/application/config/autoload.php new file mode 100644 index 0000000..7cdc901 --- /dev/null +++ b/application/config/autoload.php @@ -0,0 +1,135 @@ + 'ua'); +*/ +$autoload['libraries'] = array(); + +/* +| ------------------------------------------------------------------- +| 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(); + +/* +| ------------------------------------------------------------------- +| 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/application/config/cacert.pem b/application/config/cacert.pem new file mode 100644 index 0000000..1fccb3d --- /dev/null +++ b/application/config/cacert.pem @@ -0,0 +1,3331 @@ +## +## ca-bundle.crt -- Bundle of CA Root Certificates +## +## Certificate data from Mozilla as of: Wed Apr 25 15:02:13 2012 +## +## This is a bundle of X.509 certificates of public Certificate Authorities +## (CA). These were automatically extracted from Mozilla's root certificates +## file (certdata.txt). This file can be found in the mozilla source tree: +## http://mxr.mozilla.org/mozilla/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1 +## +## It contains the certificates in PEM format and therefore +## can be directly used with curl / libcurl / php_curl, or with +## an Apache+mod_ssl webserver for SSL client authentication. +## Just configure this file as the SSLCACertificateFile. +## + +# @(#) $RCSfile: certdata.txt,v $ $Revision: 1.83 $ $Date: 2012/04/25 14:49:29 $ + +GTE CyberTrust Global Root +========================== +-----BEGIN CERTIFICATE----- +MIICWjCCAcMCAgGlMA0GCSqGSIb3DQEBBAUAMHUxCzAJBgNVBAYTAlVTMRgwFgYDVQQKEw9HVEUg +Q29ycG9yYXRpb24xJzAlBgNVBAsTHkdURSBDeWJlclRydXN0IFNvbHV0aW9ucywgSW5jLjEjMCEG +A1UEAxMaR1RFIEN5YmVyVHJ1c3QgR2xvYmFsIFJvb3QwHhcNOTgwODEzMDAyOTAwWhcNMTgwODEz +MjM1OTAwWjB1MQswCQYDVQQGEwJVUzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMScwJQYDVQQL +Ex5HVEUgQ3liZXJUcnVzdCBTb2x1dGlvbnMsIEluYy4xIzAhBgNVBAMTGkdURSBDeWJlclRydXN0 +IEdsb2JhbCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCVD6C28FCc6HrHiM3dFw4u +sJTQGz0O9pTAipTHBsiQl8i4ZBp6fmw8U+E3KHNgf7KXUwefU/ltWJTSr41tiGeA5u2ylc9yMcql +HHK6XALnZELn+aks1joNrI1CqiQBOeacPwGFVw1Yh0X404Wqk2kmhXBIgD8SFcd5tB8FLztimQID +AQABMA0GCSqGSIb3DQEBBAUAA4GBAG3rGwnpXtlR22ciYaQqPEh346B8pt5zohQDhT37qw4wxYMW +M4ETCJ57NE7fQMh017l93PR2VX2bY1QY6fDq81yx2YtCHrnAlU66+tXifPVoYb+O7AWXX1uw16OF +NMQkpw0PlZPvy5TYnh+dXIVtx6quTx8itc2VrbqnzPmrC3p/ +-----END CERTIFICATE----- + +Thawte Server CA +================ +-----BEGIN CERTIFICATE----- +MIIDEzCCAnygAwIBAgIBATANBgkqhkiG9w0BAQQFADCBxDELMAkGA1UEBhMCWkExFTATBgNVBAgT +DFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYDVQQKExRUaGF3dGUgQ29uc3Vs +dGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjEZMBcGA1UE +AxMQVGhhd3RlIFNlcnZlciBDQTEmMCQGCSqGSIb3DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0ZS5j +b20wHhcNOTYwODAxMDAwMDAwWhcNMjAxMjMxMjM1OTU5WjCBxDELMAkGA1UEBhMCWkExFTATBgNV +BAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYDVQQKExRUaGF3dGUgQ29u +c3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjEZMBcG +A1UEAxMQVGhhd3RlIFNlcnZlciBDQTEmMCQGCSqGSIb3DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0 +ZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANOkUG7I/1Zr5s9dtuoMaHVHoqrC2oQl +/Kj0R1HahbUgdJSGHg91yekIYfUGbTBuFRkC6VLAYttNmZ7iagxEOM3+vuNkCXDF/rFrKbYvScg7 +1CcEJRCXL+eQbcAoQpnXTEPew/UhbVSfXcNY4cDk2VuwuNy0e982OsK1ZiIS1ocNAgMBAAGjEzAR +MA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEEBQADgYEAB/pMaVz7lcxG7oWDTSEwjsrZqG9J +GubaUeNgcGyEYRGhGshIPllDfU+VPaGLtwtimHp1it2ITk6eQNuozDJ0uW8NxuOzRAvZim+aKZuZ +GCg70eNAKJpaPNW15yAbi8qkq43pUdniTCxZqdq5snUb9kLy78fyGPmJvKP/iiMucEc= +-----END CERTIFICATE----- + +Thawte Premium Server CA +======================== +-----BEGIN CERTIFICATE----- +MIIDJzCCApCgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBzjELMAkGA1UEBhMCWkExFTATBgNVBAgT +DFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYDVQQKExRUaGF3dGUgQ29uc3Vs +dGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjEhMB8GA1UE +AxMYVGhhd3RlIFByZW1pdW0gU2VydmVyIENBMSgwJgYJKoZIhvcNAQkBFhlwcmVtaXVtLXNlcnZl +ckB0aGF3dGUuY29tMB4XDTk2MDgwMTAwMDAwMFoXDTIwMTIzMTIzNTk1OVowgc4xCzAJBgNVBAYT +AlpBMRUwEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEdMBsGA1UEChMU +VGhhd3RlIENv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C4AfBONOziipUEZKzxa1NfBbPLZ4C/QgKO/t0BCezhABRP/PvwDN1Dulsr4R+AcJkVV5MW +8Q+XarfCaCMczE1ZMKxRHjuvK9buY0V7xdlfUNLjUA86iOe/FP3gx7kCAwEAAaOCAQkwggEFMHAG +A1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEQMA4GA1UEChMHRXF1aWZheDEtMCsGA1UE +CxMkRXF1aWZheCBTZWN1cmUgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMBoG +A1UdEAQTMBGBDzIwMTgwODIyMTY0MTUxWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUSOZo+SvS +spXXR9gjIBBPM5iQn9QwHQYDVR0OBBYEFEjmaPkr0rKV10fYIyAQTzOYkJ/UMAwGA1UdEwQFMAMB +Af8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUAA4GBAFjOKer89961 +zgK5F7WF0bnj4JXMJTENAKaSbn+2kmOeUJXRmm/kEd5jhW6Y7qj/WsjTVbJmcVfewCHrPSqnI0kB +BIZCe/zuf6IWUrVnZ9NA2zsmWLIodz2uFHdh1voqZiegDfqnc1zqcPGUIWVEX/r87yloqaKHee95 +70+sB3c4 +-----END CERTIFICATE----- + +Digital Signature Trust Co. Global CA 1 +======================================= +-----BEGIN CERTIFICATE----- +MIIDKTCCApKgAwIBAgIENnAVljANBgkqhkiG9w0BAQUFADBGMQswCQYDVQQGEwJVUzEkMCIGA1UE +ChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMREwDwYDVQQLEwhEU1RDQSBFMTAeFw05ODEy +MTAxODEwMjNaFw0xODEyMTAxODQwMjNaMEYxCzAJBgNVBAYTAlVTMSQwIgYDVQQKExtEaWdpdGFs +IFNpZ25hdHVyZSBUcnVzdCBDby4xETAPBgNVBAsTCERTVENBIEUxMIGdMA0GCSqGSIb3DQEBAQUA +A4GLADCBhwKBgQCgbIGpzzQeJN3+hijM3oMv+V7UQtLodGBmE5gGHKlREmlvMVW5SXIACH7TpWJE +NySZj9mDSI+ZbZUTu0M7LklOiDfBu1h//uG9+LthzfNHwJmm8fOR6Hh8AMthyUQncWlVSn5JTe2i +o74CTADKAqjuAQIxZA9SLRN0dja1erQtcQIBA6OCASQwggEgMBEGCWCGSAGG+EIBAQQEAwIABzBo +BgNVHR8EYTBfMF2gW6BZpFcwVTELMAkGA1UEBhMCVVMxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0 +dXJlIFRydXN0IENvLjERMA8GA1UECxMIRFNUQ0EgRTExDTALBgNVBAMTBENSTDEwKwYDVR0QBCQw +IoAPMTk5ODEyMTAxODEwMjNagQ8yMDE4MTIxMDE4MTAyM1owCwYDVR0PBAQDAgEGMB8GA1UdIwQY +MBaAFGp5fpFpRhgTCgJ3pVlbYJglDqL4MB0GA1UdDgQWBBRqeX6RaUYYEwoCd6VZW2CYJQ6i+DAM +BgNVHRMEBTADAQH/MBkGCSqGSIb2fQdBAAQMMAobBFY0LjADAgSQMA0GCSqGSIb3DQEBBQUAA4GB +ACIS2Hod3IEGtgllsofIH160L+nEHvI8wbsEkBFKg05+k7lNQseSJqBcNJo4cvj9axY+IO6CizEq +kzaFI4iKPANo08kJD038bKTaKHKTDomAsH3+gG9lbRgzl4vCa4nuYD3Im+9/KzJic5PLPON74nZ4 +RbyhkwS7hp86W0N6w4pl +-----END CERTIFICATE----- + +Digital Signature Trust Co. Global CA 3 +======================================= +-----BEGIN CERTIFICATE----- +MIIDKTCCApKgAwIBAgIENm7TzjANBgkqhkiG9w0BAQUFADBGMQswCQYDVQQGEwJVUzEkMCIGA1UE +ChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMREwDwYDVQQLEwhEU1RDQSBFMjAeFw05ODEy +MDkxOTE3MjZaFw0xODEyMDkxOTQ3MjZaMEYxCzAJBgNVBAYTAlVTMSQwIgYDVQQKExtEaWdpdGFs +IFNpZ25hdHVyZSBUcnVzdCBDby4xETAPBgNVBAsTCERTVENBIEUyMIGdMA0GCSqGSIb3DQEBAQUA +A4GLADCBhwKBgQC/k48Xku8zExjrEH9OFr//Bo8qhbxe+SSmJIi2A7fBw18DW9Fvrn5C6mYjuGOD +VvsoLeE4i7TuqAHhzhy2iCoiRoX7n6dwqUcUP87eZfCocfdPJmyMvMa1795JJ/9IKn3oTQPMx7JS +xhcxEzu1TdvIxPbDDyQq2gyd55FbgM2UnQIBA6OCASQwggEgMBEGCWCGSAGG+EIBAQQEAwIABzBo +BgNVHR8EYTBfMF2gW6BZpFcwVTELMAkGA1UEBhMCVVMxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0 +dXJlIFRydXN0IENvLjERMA8GA1UECxMIRFNUQ0EgRTIxDTALBgNVBAMTBENSTDEwKwYDVR0QBCQw +IoAPMTk5ODEyMDkxOTE3MjZagQ8yMDE4MTIwOTE5MTcyNlowCwYDVR0PBAQDAgEGMB8GA1UdIwQY +MBaAFB6CTShlgDzJQW6sNS5ay97u+DlbMB0GA1UdDgQWBBQegk0oZYA8yUFurDUuWsve7vg5WzAM +BgNVHRMEBTADAQH/MBkGCSqGSIb2fQdBAAQMMAobBFY0LjADAgSQMA0GCSqGSIb3DQEBBQUAA4GB +AEeNg61i8tuwnkUiBbmi1gMOOHLnnvx75pO2mqWilMg0HZHRxdf0CiUPPXiBng+xZ8SQTGPdXqfi +up/1902lMXucKS1M/mQ+7LZT/uqb7YLbdHVLB3luHtgZg3Pe9T7Qtd7nS2h9Qy4qIOF+oHhEngj1 +mPnHfxsb1gYgAlihw6ID +-----END CERTIFICATE----- + +Verisign Class 3 Public Primary Certification Authority +======================================================= +-----BEGIN CERTIFICATE----- +MIICPDCCAaUCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQECBQAwXzELMAkGA1UEBhMCVVMx +FzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmltYXJ5 +IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVow +XzELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAz +IFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUA +A4GNADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhEBarsAx94 +f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/isI19wKTakyYbnsZogy1Ol +hec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0GCSqGSIb3DQEBAgUAA4GBALtMEivPLCYA +TxQT3ab7/AoRhIzzKBxnki98tsX63/Dolbwdj2wsqFHMc9ikwFPwTtYmwHYBV4GSXiHx0bH/59Ah +WM1pF+NEHJwZRDmJXNycAA9WjQKZ7aKQRUzkuxCkPfAyAw7xzvjoyVGM5mKf5p/AfbdynMk2Omuf +Tqj/ZA1k +-----END CERTIFICATE----- + +Verisign Class 3 Public Primary Certification Authority - G2 +============================================================ +-----BEGIN CERTIFICATE----- +MIIDAjCCAmsCEH3Z/gfPqB63EHln+6eJNMYwDQYJKoZIhvcNAQEFBQAwgcExCzAJBgNVBAYTAlVT +MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMgUHJpbWFy +eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2ln +biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVz +dCBOZXR3b3JrMB4XDTk4MDUxODAwMDAwM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ENBMRswGQYD +VQQDExJHbG9iYWxTaWduIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDa +DuaZjc6j40+Kfvvxi4Mla+pIH/EqsLmVEQS98GPR4mdmzxzdzxtIK+6NiY6arymAZavpxy0Sy6sc +THAHoT0KMM0VjU/43dSMUBUc71DuxC73/OlS8pF94G3VNTCOXkNz8kHp1Wrjsok6Vjk4bwY8iGlb +Kk3Fp1S4bInMm/k8yuX9ifUSPJJ4ltbcdG6TRGHRjcdGsnUOhugZitVtbNV4FpWi6cgKOOvyJBNP +c1STE4U6G7weNLWLBYy5d4ux2x8gkasJU26Qzns3dLlwR5EiUWMWea6xrkEmCMgZK9FGqkjWZCrX +gzT/LCrBbBlDSgeF59N89iFo7+ryUp9/k5DPAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNV +HRMBAf8EBTADAQH/MB0GA1UdDgQWBBRge2YaRQ2XyolQL30EzTSo//z9SzANBgkqhkiG9w0BAQUF +AAOCAQEA1nPnfE920I2/7LqivjTFKDK1fPxsnCwrvQmeU79rXqoRSLblCKOzyj1hTdNGCbM+w6Dj +Y1Ub8rrvrTnhQ7k4o+YviiY776BQVvnGCv04zcQLcFGUl5gE38NflNUVyRRBnMRddWQVDf9VMOyG +j/8N7yy5Y0b2qvzfvGn9LhJIZJrglfCm7ymPAbEVtQwdpf5pLGkkeB6zpxxxYu7KyJesF12KwvhH +hm4qxFYxldBniYUr+WymXUadDKqC5JlR3XC321Y9YeRq4VzW9v493kHMB65jUr9TU/Qr6cf9tveC +X4XSQRjbgbMEHMUfpIBvFSDJ3gyICh3WZlXi/EjJKSZp4A== +-----END CERTIFICATE----- + +GlobalSign Root CA - R2 +======================= +-----BEGIN CERTIFICATE----- +MIIDujCCAqKgAwIBAgILBAAAAAABD4Ym5g0wDQYJKoZIhvcNAQEFBQAwTDEgMB4GA1UECxMXR2xv +YmFsU2lnbiBSb290IENBIC0gUjIxEzARBgNVB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C1u+mNr0HZDzTuIYEZoDJJKPTEjlbV +UjP9UNV+mWwD5MlM/Mtsq2azSiGM5bUMMj4QssxsodyamEwCW/POuZ6lcg5Ktz885hZo+L7tdEy8 +W9ViH0Pd +-----END CERTIFICATE----- + +RSA Root Certificate 1 +====================== +-----BEGIN CERTIFICATE----- +MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRp +b24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs +YXNzIDMgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZh +bGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNjAw +MjIzM1oXDTE5MDYyNjAwMjIzM1owgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0 +d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENsYXNzIDMg +UG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0 +LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMIGfMA0GCSqGSIb3DQEBAQUA +A4GNADCBiQKBgQDjmFGWHOjVsQaBalfDcnWTq8+epvzzFlLWLU2fNUSoLgRNB0mKOCn1dzfnt6td +3zZxFJmP3MKS8edgkpfs2Ejcv8ECIMYkpChMMFp2bbFc893enhBxoYjHW5tBbcqwuI4V7q0zK89H +BFx1cQqYJJgpp0lZpd34t0NiYfPT4tBVPwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFa7AliEZwgs +3x/be0kz9dNnnfS0ChCzycUs4pJqcXgn8nCDQtM+z6lU9PHYkhaM0QTLS6vJn0WuPIqpsHEzXcjF +V9+vqDWzf4mH6eglkrh/hXqu1rweN1gqZ8mRzyqBPu3GOd/APhmcGcwTTYJBtYze4D1gCCAPRX5r +on+jjBXu +-----END CERTIFICATE----- + +Verisign Class 3 Public Primary Certification Authority - G3 +============================================================ +-----BEGIN CERTIFICATE----- +MIIEGjCCAwICEQCbfgZJoz5iudXukEhxKe9XMA0GCSqGSIb3DQEBBQUAMIHKMQswCQYDVQQGEwJV +UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv +cmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl +IG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNh +dGlvbiBBdXRob3JpdHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQsw +CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRy +dXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhv +cml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDMgUHVibGljIFByaW1hcnkg +Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC +ggEBAMu6nFL8eB8aHm8bN3O9+MlrlBIwT/A2R/XQkQr1F8ilYcEWQE37imGQ5XYgwREGfassbqb1 +EUGO+i2tKmFZpGcmTNDovFJbcCAEWNF6yaRpvIMXZK0Fi7zQWM6NjPXr8EJJC52XJ2cybuGukxUc +cLwgTS8Y3pKI6GyFVxEa6X7jJhFUokWWVYPKMIno3Nij7SqAP395ZVc+FSBmCC+Vk7+qRy+oRpfw +EuL+wgorUeZ25rdGt+INpsyow0xZVYnm6FNcHOqd8GIWC6fJXwzw3sJ2zq/3avL6QaaiMxTJ5Xpj +055iN9WFZZ4O5lMkdBteHRJTW8cs54NJOxWuimi5V5cCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEA +ERSWwauSCPc/L8my/uRan2Te2yFPhpk0djZX3dAVL8WtfxUfN2JzPtTnX84XA9s1+ivbrmAJXx5f +j267Cz3qWhMeDGBvtcC1IyIuBwvLqXTLR7sdwdela8wv0kL9Sd2nic9TutoAWii/gt/4uhMdUIaC +/Y4wjylGsB49Ndo4YhYYSq3mtlFs3q9i6wHQHiT+eo8SGhJouPtmmRQURVyu565pF4ErWjfJXir0 +xuKhXFSbplQAz/DxwceYMBo7Nhbbo27q/a2ywtrvAkcTisDxszGtTxzhT5yvDwyd93gN2PQ1VoDa +t20Xj50egWTh/sVFuq1ruQp6Tk9LhO5L8X3dEQ== +-----END CERTIFICATE----- + +Verisign Class 4 Public Primary Certification Authority - G3 +============================================================ +-----BEGIN CERTIFICATE----- +MIIEGjCCAwICEQDsoKeLbnVqAc/EfMwvlF7XMA0GCSqGSIb3DQEBBQUAMIHKMQswCQYDVQQGEwJV +UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv +cmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl +IG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDQgUHVibGljIFByaW1hcnkgQ2VydGlmaWNh +dGlvbiBBdXRob3JpdHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQsw +CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRy +dXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhv +cml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDQgUHVibGljIFByaW1hcnkg +Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC +ggEBAK3LpRFpxlmr8Y+1GQ9Wzsy1HyDkniYlS+BzZYlZ3tCD5PUPtbut8XzoIfzk6AzufEUiGXaS +tBO3IFsJ+mGuqPKljYXCKtbeZjbSmwL0qJJgfJxptI8kHtCGUvYynEFYHiK9zUVilQhu0GbdU6LM +8BDcVHOLBKFGMzNcF0C5nk3T875Vg+ixiY5afJqWIpA7iCXy0lOIAgwLePLmNxdLMEYH5IBtptiW +Lugs+BGzOA1mppvqySNb247i8xOOGlktqgLw7KSHZtzBP/XYufTsgsbSPZUd5cBPhMnZo0QoBmrX +Razwa2rvTl/4EYIeOGM0ZlDUPpNz+jDDZq3/ky2X7wMCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEA +j/ola09b5KROJ1WrIhVZPMq1CtRK26vdoV9TxaBXOcLORyu+OshWv8LZJxA6sQU8wHcxuzrTBXtt +mhwwjIDLk5Mqg6sFUYICABFna/OIYUdfA5PVWw3g8dShMjWFsjrbsIKr0csKvE+MW8VLADsfKoKm +fjaF3H48ZwC15DtS4KjrXRX5xm3wrR0OhbepmnMUWluPQSjA1egtTaRezarZ7c7c2NU8Qh0XwRJd +RTjDOPP8hS6DRkiy1yBfkjaP53kPmF6Z6PDQpLv1U70qzlmwr25/bLvSHgCwIe34QWKCudiyxLtG +UPMxxY8BqHTr9Xgn2uf3ZkPznoM+IKrDNWCRzg== +-----END CERTIFICATE----- + +Entrust.net Secure Server CA +============================ +-----BEGIN CERTIFICATE----- +MIIE2DCCBEGgAwIBAgIEN0rSQzANBgkqhkiG9w0BAQUFADCBwzELM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FbnRydXN0Lm5ldCBTZWN1cmUgU2VydmVyIENl +cnRpZmljYXRpb24gQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMCmgJ6AlhiNodHRwOi8vd3d3LmVu +dHJ1c3QubmV0L0NSTC9uZXQxLmNybDArBgNVHRAEJDAigA8xOTk5MDUyNTE2MDk0MFqBDzIwMTkw +NTI1MTYwOTQwWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAU8BdiE1U9s/8KAGv7UISX8+1i0Bow +HQYDVR0OBBYEFPAXYhNVPbP/CgBr+1CEl/PtYtAaMAwGA1UdEwQFMAMBAf8wGQYJKoZIhvZ9B0EA +BAwwChsEVjQuMAMCBJAwDQYJKoZIhvcNAQEFBQADgYEAkNwwAvpkdMKnCqV8IY00F6j7Rw7/JXyN +Ewr75Ji174z4xRAN95K+8cPV1ZVqBLssziY2ZcgxxufuP+NXdYR6Ee9GTxj005i7qIcyunL2POI9 +n9cd2cNgQ4xYDiKWL2KjLB+6rQXvqzJ4h6BUcxm1XAX5Uj5tLUUL9wqT6u0G+bI= +-----END CERTIFICATE----- + +Entrust.net Premium 2048 Secure Server CA +========================================= +-----BEGIN CERTIFICATE----- +MIIEXDCCA0SgAwIBAgIEOGO5ZjANBgkqhkiG9w0BAQUFADCBtDEUMBIGA1UEChMLRW50cnVzdC5u +ZXQxQDA+BgNVBAsUN3d3dy5lbnRydXN0Lm5ldC9DUFNfMjA0OCBpbmNvcnAuIGJ5IHJlZi4gKGxp +bWl0cyBsaWFiLikxJTAjBgNVBAsTHChjKSAxOTk5IEVudHJ1c3QubmV0IExpbWl0ZWQxMzAxBgNV +BAMTKkVudHJ1c3QubmV0IENlcnRpZmljYXRpb24gQXV0aG9yaXR5ICgyMDQ4KTAeFw05OTEyMjQx +NzUwNTFaFw0xOTEyMjQxODIwNTFaMIG0MRQwEgYDVQQKEwtFbnRydXN0Lm5ldDFAMD4GA1UECxQ3 +d3d3LmVudHJ1c3QubmV0L0NQU18yMDQ4IG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vUxFnmG6v4SBkgPR0ml8xQ== +-----END CERTIFICATE----- + +Baltimore CyberTrust Root +========================= +-----BEGIN CERTIFICATE----- +MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJRTESMBAGA1UE +ChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYDVQQDExlCYWx0aW1vcmUgQ3li +ZXJUcnVzdCBSb290MB4XDTAwMDUxMjE4NDYwMFoXDTI1MDUxMjIzNTkwMFowWjELMAkGA1UEBhMC +SUUxEjAQBgNVBAoTCUJhbHRpbW9yZTETMBEGA1UECxMKQ3liZXJUcnVzdDEiMCAGA1UEAxMZQmFs +dGltb3JlIEN5YmVyVHJ1c3QgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKME +uyKrmD1X6CZymrV51Cni4eiVgLGw41uOKymaZN+hXe2wCQVt2yguzmKiYv60iNoS6zjrIZ3AQSsB +UnuId9Mcj8e6uYi1agnnc+gRQKfRzMpijS3ljwumUNKoUMMo6vWrJYeKmpYcqWe4PwzV9/lSEy/C +G9VwcPCPwBLKBsua4dnKM3p31vjsufFoREJIE9LAwqSuXmD+tqYF/LTdB1kC1FkYmGP1pWPgkAx9 +XbIGevOF6uvUA65ehD5f/xXtabz5OTZydc93Uk3zyZAsuT3lySNTPx8kmCFcB5kpvcY67Oduhjpr +l3RjM71oGDHweI12v/yejl0qhqdNkNwnGjkCAwEAAaNFMEMwHQYDVR0OBBYEFOWdWTCCR1jMrPoI +VDaGezq1BE3wMBIGA1UdEwEB/wQIMAYBAf8CAQMwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEB +BQUAA4IBAQCFDF2O5G9RaEIFoN27TyclhAO992T9Ldcw46QQF+vaKSm2eT929hkTI7gQCvlYpNRh +cL0EYWoSihfVCr3FvDB81ukMJY2GQE/szKN+OMY3EU/t3WgxjkzSswF07r51XgdIGn9w/xZchMB5 +hbgF/X++ZRGjD8ACtPhSNzkE1akxehi/oCr0Epn3o0WC4zxe9Z2etciefC7IpJ5OCBRLbf1wbWsa +Y71k5h+3zvDyny67G7fyUIhzksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9H +RCwBXbsdtTLSR9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp +-----END CERTIFICATE----- + +Equifax Secure Global eBusiness CA +================================== +-----BEGIN CERTIFICATE----- +MIICkDCCAfmgAwIBAgIBATANBgkqhkiG9w0BAQQFADBaMQswCQYDVQQGEwJVUzEcMBoGA1UEChMT +RXF1aWZheCBTZWN1cmUgSW5jLjEtMCsGA1UEAxMkRXF1aWZheCBTZWN1cmUgR2xvYmFsIGVCdXNp +bmVzcyBDQS0xMB4XDTk5MDYyMTA0MDAwMFoXDTIwMDYyMTA0MDAwMFowWjELMAkGA1UEBhMCVVMx +HDAaBgNVBAoTE0VxdWlmYXggU2VjdXJlIEluYy4xLTArBgNVBAMTJEVxdWlmYXggU2VjdXJlIEds +b2JhbCBlQnVzaW5lc3MgQ0EtMTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAuucXkAJlsTRV +PEnCUdXfp9E3j9HngXNBUmCbnaEXJnitx7HoJpQytd4zjTov2/KaelpzmKNc6fuKcxtc58O/gGzN +qfTWK8D3+ZmqY6KxRwIP1ORROhI8bIpaVIRw28HFkM9yRcuoWcDNM50/o5brhTMhHD4ePmBudpxn +hcXIw2ECAwEAAaNmMGQwEQYJYIZIAYb4QgEBBAQDAgAHMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0j +BBgwFoAUvqigdHJQa0S3ySPY+6j/s1draGwwHQYDVR0OBBYEFL6ooHRyUGtEt8kj2Puo/7NXa2hs +MA0GCSqGSIb3DQEBBAUAA4GBADDiAVGqx+pf2rnQZQ8w1j7aDRRJbpGTJxQx78T3LUX47Me/okEN +I7SS+RkAZ70Br83gcfxaz2TE4JaY0KNA4gGK7ycH8WUBikQtBmV1UsCGECAhX2xrD2yuCRyv8qIY +NMR1pHMc8Y3c7635s3a0kr/clRAevsvIO1qEYBlWlKlV +-----END CERTIFICATE----- + +Equifax Secure eBusiness CA 1 +============================= +-----BEGIN CERTIFICATE----- +MIICgjCCAeugAwIBAgIBBDANBgkqhkiG9w0BAQQFADBTMQswCQYDVQQGEwJVUzEcMBoGA1UEChMT +RXF1aWZheCBTZWN1cmUgSW5jLjEmMCQGA1UEAxMdRXF1aWZheCBTZWN1cmUgZUJ1c2luZXNzIENB +LTEwHhcNOTkwNjIxMDQwMDAwWhcNMjAwNjIxMDQwMDAwWjBTMQswCQYDVQQGEwJVUzEcMBoGA1UE +ChMTRXF1aWZheCBTZWN1cmUgSW5jLjEmMCQGA1UEAxMdRXF1aWZheCBTZWN1cmUgZUJ1c2luZXNz +IENBLTEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM4vGbwXt3fek6lfWg0XTzQaDJj0ItlZ +1MRoRvC0NcWFAyDGr0WlIVFFQesWWDYyb+JQYmT5/VGcqiTZ9J2DKocKIdMSODRsjQBuWqDZQu4a +IZX5UkxVWsUPOE9G+m34LjXWHXzr4vCwdYDIqROsvojvOm6rXyo4YgKwEnv+j6YDAgMBAAGjZjBk +MBEGCWCGSAGG+EIBAQQEAwIABzAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFEp4MlIR21kW +Nl7fwRQ2QGpHfEyhMB0GA1UdDgQWBBRKeDJSEdtZFjZe38EUNkBqR3xMoTANBgkqhkiG9w0BAQQF +AAOBgQB1W6ibAxHm6VZMzfmpTMANmvPMZWnmJXbMWbfWVMMdzZmsGd20hdXgPfxiIKeES1hl8eL5 +lSE/9dR+WB5Hh1Q+WKG1tfgq73HnvMP2sUlG4tega+VWeponmHxGYhTnyfxuAxJ5gDgdSIKN/Bf+ +KpYrtWKmpj29f5JZzVoqgrI3eQ== +-----END CERTIFICATE----- + +Equifax Secure eBusiness CA 2 +============================= +-----BE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3D1E4qUoSek1nDFbZS1yX2doNLGCEnZZpum0/QL3MUm +V+GRMOrN +-----END CERTIFICATE----- + +AddTrust Low-Value Services Root +================================ +-----BEGIN CERTIFICATE----- +MIIEGDCCAwCgAwIBAgIBATANBgkqhkiG9w0BAQUFADBlMQswCQYDVQQGEwJTRTEUMBIGA1UEChML +QWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3b3JrMSEwHwYDVQQDExhBZGRU +cnVzdCBDbGFzcyAxIENBIFJvb3QwHhcNMDAwNTMwMTAzODMxWhcNMjAwNTMwMTAzODMxWjBlMQsw +CQYDVQQGEwJTRTEUMBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBO +ZXR3b3JrMSEwHwYDVQQDExhBZGRUcnVzdCBDbGFzcyAxIENBIFJvb3QwggEiMA0GCSqGSIb3DQEB +AQUAA4IBDwAwggEKAoIBAQCWltQhSWDia+hBBwzexODcEyPNwTXH+9ZOEQpnXvUGW2ulCDtbKRY6 +54eyNAbFvAWlA3yCyykQruGIgb3WntP+LVbBFc7jJp0VLhD7Bo8wBN6ntGO0/7Gcrjyvd7ZWxbWr +oulpOj0OM3kyP3CCkplhbY0wCI9xP6ZIVxn4JdxLZlyldI+Yrsj5wAYi56xz36Uu+1LcsRVlIPo1 +Zmne3yzxbrww2ywkEtvrNTVokMsAsJchPXQhI2U0K7t4WaPW4XY5mqRJjox0r26kmqPZm9I4XJui +GMx1I4S+6+JNM3GOGvDC+Mcdoq0Dlyz4zyXG9rgkMbFjXZJ/Y/AlyVMuH79NAgMBAAGjgdIwgc8w +HQYDVR0OBBYEFJWxtPCUtr3H2tERCSG+wa9J/RB7MAsGA1UdDwQEAwIBBjAPBgNVHRMBAf8EBTAD +AQH/MIGPBgNVHSMEgYcwgYSAFJWxtPCUtr3H2tERCSG+wa9J/RB7oWmkZzBlMQswCQYDVQQGEwJT +RTEUMBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3b3JrMSEw +HwYDVQQDExhBZGRUcnVzdCBDbGFzcyAxIENBIFJvb3SCAQEwDQYJKoZIhvcNAQEFBQADggEBACxt +ZBsfzQ3duQH6lmM0MkhHma6X7f1yFqZzR1r0693p9db7RcwpiURdv0Y5PejuvE1Uhh4dbOMXJ0Ph +iVYrqW9yTkkz43J8KiOavD7/KCrto/8cI7pDVwlnTUtiBi34/2ydYB7YHEt9tTEv2dB8Xfjea4MY +eDdXL+gzB2ffHsdrKpV2ro9Xo/D0UrSpUwjP4E/TelOL/bscVjby/rK25Xa71SJlpz/+0WatC7xr +mYbvP33zGDLKe8bjq2RGlfgmadlVg3sslgf/WSxEo8bl6ancoWOAWiFeIc9TVPC6b4nbqKqVz4vj +ccweGyBECMB6tkD9xOQ14R0WHNC8K47Wcdk= +-----END CERTIFICATE----- + +AddTrust External Root +====================== +-----BEGIN CERTIFICATE----- +MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEUMBIGA1UEChML +QWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFkZFRydXN0IEV4dGVybmFsIFRUUCBOZXR3b3JrMSIwIAYD +VQQDExlBZGRUcnVzdCBFeHRlcm5hbCBDQSBSb290MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEw +NDgzOFowbzELMAkGA1UEBhMCU0UxFDASBgNVBAoTC0FkZFRydXN0IEFCMSYwJAYDVQQLEx1BZGRU +cnVzdCBFeHRlcm5hbCBUVFAgTmV0d29yazEiMCAGA1UEAxMZQWRkVHJ1c3QgRXh0ZXJuYWwgQ0Eg +Um9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALf3GjPm8gAELTngTlvtH7xsD821 ++iO2zt6bETOXpClMfZOfvUq8k+0DGuOPz+VtUFrWlymUWoCwSXrbLpX9uMq/NzgtHj6RQa1wVsfw +Tz/oMp50ysiQVOnGXw94nZpAPA6sYapeFI+eh6FqUNzXmk6vBbOmcZSccbNQYArHE504B4YCqOmo +aSYYkKtMsE8jqzpPhNjfzp/haW+710LXa0Tkx63ubUFfclpxCDezeWWkWaCUN/cALw3CknLa0Dhy +2xSoRcRdKn23tNbE7qzNE0S3ySvdQwAl+mG5aWpYIxG3pzOPVnVZ9c0p10a3CitlttNCbxWyuHv7 +7+ldU9U0WicCAwEAAaOB3DCB2TAdBgNVHQ4EFgQUrb2YejS0Jvf6xCZU7wO94CTLVBowCwYDVR0P +BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wgZkGA1UdIwSBkTCBjoAUrb2YejS0Jvf6xCZU7wO94CTL +VBqhc6RxMG8xCzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRUcnVzdCBBQjEmMCQGA1UECxMdQWRk +VHJ1c3QgRXh0ZXJuYWwgVFRQIE5ldHdvcmsxIjAgBgNVBAMTGUFkZFRydXN0IEV4dGVybmFsIENB +IFJvb3SCAQEwDQYJKoZIhvcNAQEFBQADggEBALCb4IUlwtYj4g+WBpKdQZic2YR5gdkeWxQHIzZl +j7DYd7usQWxHYINRsPkyPef89iYTx4AWpb9a/IfPeHmJIZriTAcKhjW88t5RxNKWt9x+Tu5w/Rw5 +6wwCURQtjr0W4MHfRnXnJK3s9EK0hZNwEGe6nQY1ShjTK3rMUUKhemPR5ruhxSvCNr4TDea9Y355 +e6cJDUCrat2PisP29owaQgVR1EX1n6diIWgVIEM8med8vSTYqZEXc4g/VhsxOBi0cQ+azcgOno4u +G+GMmIPLHzHxREzGBHNJdmAPx/i9F4BrLunMTA5amnkPIAou1Z5jJh5VkpTYghdae9C8x49OhgQ= +-----END CERTIFICATE----- + +AddTrust Public Services Root +============================= +-----BEGIN CERTIFICATE----- +MIIEFTCCAv2gAwIBAgIBATANBgkqhkiG9w0BAQUFADBkMQswCQYDVQQGEwJTRTEUMBIGA1UEChML +QWRkVHJ1c3QgQUIxHTAbBgNVBAsTF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/iHVv/xD8SlTQX/D67zZzfRs2RcYhbbQVuE7PnFylPVoAjgbjPGsye/Kf8Lb93/Ao +GEjwxrzQvzSAlsJKsW2Ox5BF3i9nrEUEo3rcVZLJR2bYGozH7ZxOmuASu7VqTITh4SINhwBk/ox9 +Yjllpu9CtoAlEmEBqCQTcAARJl/6NVDFSMwGR+gn2HCNX2TmoUQmXiLsks3/QppEIW1cxeMiHV9H +EufOX1362KqxMy3ZdvJOOjMMK7MtkAY= +-----END CERTIFICATE----- + +AddTrust Qualified Certificates Root +==================================== +-----BEGIN CERTIFICATE----- +MIIEHjCCAwagAwIBAgIBATANBgkqhkiG9w0BAQUFADBnMQswCQYDVQQGEwJTRTEUMBIGA1UEChML +QWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3b3JrMSMwIQYDVQQDExpBZGRU +cnVzdCBRdWFsaWZpZWQgQ0EgUm9vdDAeFw0wMDA1MzAxMDQ0NTBaFw0yMDA1MzAxMDQ0NTBaMGcx +CzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRUcnVzdCBBQjEdMBsGA1UECxMUQWRkVHJ1c3QgVFRQ +IE5ldHdvcmsxIzAhBgNVBAMTGkFkZFRydXN0IFF1YWxpZmllZCBDQSBSb290MIIBIjANBgkqhkiG +9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5B6a/twJWoekn0e+EV+vhDTbYjx5eLfpMLXsDBwqxBb/4Oxx +64r1EW7tTw2R0hIYLUkVAcKkIhPHEWT/IhKauY5cLwjPcWqzZwFZ8V1G87B4pfYOQnrjfxvM0PC3 +KP0q6p6zsLkEqv32x7SxuCqg+1jxGaBvcCV+PmlKfw8i2O+tCBGaKZnhqkRFmhJePp1tUvznoD1o +L/BLcHwTOK28FSXx1s6rosAx1i+f4P8UWfyEk9mHfExUE+uf0S0R+Bg6Ot4l2ffTQO2kBhLEO+GR +wVY18BTcZTYJbqukB8c10cIDMzZbdSZtQvESa0NvS3GU+jQd7RNuyoB/mC9suWXY6QIDAQABo4HU +MIHRMB0GA1UdDgQWBBQ5lYtii1zJ1IC6WA+XPxUIQ8yYpzALBgNVHQ8EBAMCAQYwDwYDVR0TAQH/ +BAUwAwEB/zCBkQYDVR0jBIGJMIGGgBQ5lYtii1zJ1IC6WA+XPxUIQ8yYp6FrpGkwZzELMAkGA1UE +BhMCU0UxFDASBgNVBAoTC0FkZFRydXN0IEFCMR0wGwYDVQQLExRBZGRUcnVzdCBUVFAgTmV0d29y +azEjMCEGA1UEAxMaQWRkVHJ1c3QgUXVhbGlmaWVkIENBIFJvb3SCAQEwDQYJKoZIhvcNAQEFBQAD +ggEBABmrder4i2VhlRO6aQTvhsoToMeqT2QbPxj2qC0sVY8FtzDqQmodwCVRLae/DLPt7wh/bDxG +GuoYQ992zPlmhpwsaPXpF/gxsxjE1kh9I0xowX67ARRvxdlu3rsEQmr49lx95dr6h+sNNVJn0J6X +dgWTP5XHAeZpVTh/EGGZyeNfpso+gmNIquIISD6q8rKFYqa0p9m9N5xotS1WfbC3P6CxB9bpT9ze +RXEwMn8bLgn5v1Kh7sKAPgZcLlVAwRv1cEWw3F369nJad9Jjzc9YiQBCYz95OdBEsIJuQRno3eDB +iFrRHnGTHyQwdOUeqN48Jzd/g66ed8/wMLH/S5noxqE= +-----END CERTIFICATE----- + +Entrust Root Certification Authority +==================================== +-----BEGIN CERTIFICATE----- +MIIEkTCCA3mgAwIBAgIERWtQVDANBgkqhkiG9w0BAQUFADCBsDELMAkGA1UEBhMCVVMxFjAUBgNV +BAoTDUVudHJ1c3QsIEluYy4xOTA3BgNVBAsTMHd3dy5lbnRydXN0Lm5ldC9DUFMgaXMgaW5jb3Jw +b3JhdGVkIGJ5IHJlZmVyZW5jZTEfMB0GA1UECxMWKGMpIDIwMDYgRW50cnVzdCwgSW5jLjEtMCsG +A1UEAxMkRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA2MTEyNzIwMjM0 +MloXDTI2MT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+vTLrGAMoUgRx5aszPeE4uwc2hGKceeoWMPRfwCvocWvk+QIDAQABo1MwUTAPBgNVHRMBAf8EBTAD +AQH/MB0GA1UdDgQWBBTAephojYn7qwVkDBF9qn1luMrMTjAfBgNVHSMEGDAWgBTAephojYn7qwVk +DBF9qn1luMrMTjANBgkqhkiG9w0BAQUFAAOCAQEANeMpauUvXVSOKVCUn5kaFOSPeCpilKInZ57Q +zxpeR+nBsqTP3UEaBU6bS+5Kb1VSsyShNwrrZHYqLizz/Tt1kL/6cdjHPTfStQWVYrmm3ok9Nns4 +d0iXrKYgjy6myQzCsplFAMfOEVEiIuCl6rYVSAlk6l5PdPcFPseKUgzbFbS9bZvlxrFUaKnjaZC2 +mqUPuLk/IH2uSrW4nOQdtqvmlKXBx4Ot2/Unhw4EbNX/3aBd7YdStysVAq45pmp06drE57xNNB6p +XE0zX5IJL4hmXXeXxx12E6nV5fEWCRE11azbJHFwLJhWC9kXtNHjUStedejV0NxPNO3CBWaAocvm +Mw== +-----END CERTIFICATE----- + +GeoTrust Global CA 2 +==================== +-----BEGIN CERTIFICATE----- +MIIDZjCCAk6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBEMQswCQYDVQQGEwJVUzEWMBQGA1UEChMN +R2VvVHJ1c3QgSW5jLjEdMBsGA1UEAxMUR2VvVHJ1c3QgR2xvYmFsIENBIDIwHhcNMDQwMzA0MDUw +MDAwWhcNMTkwMzA0MDUwMDAwWjBEMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5j +LjEdMBsGA1UEAxMUR2VvVHJ1c3QgR2xvYmFsIENBIDIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw +ggEKAoIBAQDvPE1APRDfO1MA4Wf+lGAVPoWI8YkNkMgoI5kF6CsgncbzYEbYwbLVjDHZ3CB5JIG/ +NTL8Y2nbsSpr7iFY8gjpeMtvy/wWUsiRxP89c96xPqfCfWbB9X5SJBri1WeR0IIQ13hLTytCOb1k +LUCgsBDTOEhGiKEMuzozKmKY+wCdE1l/bztyqu6mD4b5BWHqZ38MN5aL5mkWRxHCJ1kDs6ZgwiFA +Vvqgx306E+PsV8ez1q6diYD3Aecs9pYrEw15LNnA5IZ7S4wMcoKK+xfNAGw6EzywhIdLFnopsk/b +HdQL82Y3vdj2V7teJHq4PIu5+pIaGoSe2HSPqht/XvT+RSIhAgMBAAGjYzBhMA8GA1UdEwEB/wQF +MAMBAf8wHQYDVR0OBBYEFHE4NvICMVNHK266ZUapEBVYIAUJMB8GA1UdIwQYMBaAFHE4NvICMVNH +K266ZUapEBVYIAUJMA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQUFAAOCAQEAA/e1K6tdEPx7 +srJerJsOflN4WT5CBP51o62sgU7XAotexC3IUnbHLB/8gTKY0UvGkpMzNTEv/NgdRN3ggX+d6Yvh +ZJFiCzkIjKx0nVnZellSlxG5FntvRdOW2TF9AjYPnDtuzywNA0ZF66D0f0hExghAzN4bcLUprbqL +OzRldRtxIR0sFAqwlpW41uryZfspuk/qkZN0abby/+Ea0AzRdoXLiiW9l14sbxWZJue2Kf8i7MkC +x1YAzUm5s2x7UwQa4qjJqhIFI8LO57sEAszAR6LkxCkvW0VXiVHuPOtSCP8HNR6fNWpHSlaY0VqF +H4z1Ir+rzoPz4iIprn2DQKi6bA== +-----END CERTIFICATE----- + +GeoTrust Universal CA +===================== +-----BEGIN CERTIFICATE----- +MIIFaDCCA1CgAwIBAgIBATANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQGEwJVUzEWMBQGA1UEChMN +R2VvVHJ1c3QgSW5jLjEeMBwGA1UEAxMVR2VvVHJ1c3QgVW5pdmVyc2FsIENBMB4XDTA0MDMwNDA1 +MDAwMFoXDTI5MDMwNDA1MDAwMFowRTELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IElu +Yy4xHjAcBgNVBAMTFUdlb1RydXN0IFVuaXZlcnNhbCBDQTCCAiIwDQYJKoZIhvcNAQ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gCJwpQzgXQQpAvvL +oJHRfNbDflDVnVi+QTjruXU8FdmbyUqDWcDaU/0zuzYYm4UPFd3uLax2k7nZAY1IEKj79TiG8dsK +xr2EoyNB3tZ3b4XUhRxQ4K5RirqNPnbiucon8l+f725ZDQbYKxek0nxru18UGkiPGkzns0ccjkxF +KyDuSN/n3QmOGKjaQI2SJhFTYXNd673nxE0pN2HrrDktZy4W1vUAg4WhzH92xH3kt0tm7wNFYGm2 +DFKWkoRepqO1pD4r2czYG0eq8kTaT/kD6PAUyz/zg97QwVTjt+gKN02LIFkDMBmhLMi9ER/frslK +xfMnZmaGrGiR/9nmUxwPi1xpZQomyB40w11Re9epnAahNt3ViZS82eQtDF4JbAiXfKM9fJP/P6EU +p8+1Xevb2xzEdt+Iub1FBZUbrvxGakyvSOPOrg/SfuvmbJxPgWp6ZKy7PtXny3YuxadIwVyQD8vI +P/rmMuGNG2+k5o7Y+SlIis5z/iw= +-----END CERTIFICATE----- + +GeoTrust Universal CA 2 +======================= +-----BEGIN CERTIFICATE----- +MIIFbDCCA1SgAwIBAgIBATANBgkqhkiG9w0BAQUFADBHMQswCQYDVQQGEwJVUzEWMBQGA1UEChMN +R2VvVHJ1c3QgSW5jLjEgMB4GA1UEAxMXR2VvVHJ1c3QgVW5pdmVyc2FsIENBIDIwHhcNMDQwMzA0 +MDUwMDAwWhcNMjkwMzA0MDUwMDAwWjBHMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3Qg +SW5jLjEgMB4GA1UEAxMXR2VvVHJ1c3QgVW5pdmVyc2FsIENBIDIwggIiMA0GCSqGSIb3DQEBAQUA +A4ICDwAwggIKAoICAQCzVFLByT7y2dyxUxpZKeexw0Uo5dfR7cXFS6GqdHtXr0om/Nj1XqduGdt0 +DE81WzILAePb63p3NeqqWuDW6KFXlPCQo3RWlEQwAx5cTiuFJnSCegx2oG9NzkEtoBUGFF+3Qs17 +j1hhNNwqCPkuwwGmIkQcTAeC5lvO0Ep8BNMZcyf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DVyz4crL2MjhF2EjD9XoIj8mZEoJmmZ1I+XRL6O1UixpCgp8RW04eWe3fiP +pm8m1wk8OhwRDqZsN/etRIcsKMfYdIKz0G9KV7s1KSegi+ghp4dkNl3M2Basx7InQJJVOCiNUW7d +FGdTbHFcJoRNdVq2fmBWqU2t+5sel/MN2dKXVHfaPRK34B7vCAas+YWH6aLcr34YEoP9VhdBLtUp +gn2Z9DH2canPLAEnpQW5qrJITirvn5NSUZU8UnOOVkwXQMAJKOSLakhT2+zNVVXxxvjpoixMptEm +X36vWkzaH6byHCx+rgIW0lbQL1dTR+iS +-----END CERTIFICATE----- + +America Online Root Certification Authority 1 +============================================= +-----BEGIN CERTIFICATE----- +MIIDpDCCAoygAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEcMBoGA1UEChMT +QW1lcmljYSBPbmxpbmUgSW5jLjE2MDQGA1UEAxMtQW1lcmljYSBPbmxpbmUgUm9vdCBDZXJ0aWZp +Y2F0aW9uIEF1dGhvcml0eSAxMB4XDTAyMDUyODA2MDAwMFoXDTM3MTExOTIwNDMwMFowYzELMAkG +A1UEBhMCVVMxHDAaBgNVBAoTE0FtZXJpY2EgT25saW5lIEluYy4xNjA0BgNVBAMTLUFtZXJpY2Eg +T25saW5lIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgMTCCASIwDQYJKoZIhvcNAQEBBQAD +ggEPADCCAQoCggEBAKgv6KRpBgNHw+kqmP8ZonCaxlCyfqXfaE0bfA+2l2h9LaaLl+lkhsmj76CG +v2BlnEtUiMJIxUo5vxTjWVXlGbR0yLQFOVwWpeKVBeASrlmLojNoWBym1BW32J/X3HGrfpq/m44z +DyL9Hy7nBzbvYjnF3cu6JRQj3gzGPTzOggjmZj7aUTsWOqMFf6Dch9Wc/HKpoH145LcxVR5lu9Rh +sCFg7RAycsWSJR74kEoYeEfffjA3PlAb2xzTa5qGUwew76wGePiEmf4hjUyAtgyC9mZweRrTT6PP +8c9GsEsPPt2IYriMqQkoO3rHl+Ee5fSfwMCuJKDIodkP1nsmgmkyPacCAwEAAaNjMGEwDwYDVR0T +AQH/BAUwAwEB/zAdBgNVHQ4EFgQUAK3Zo/Z59m50qX8zPYEX10zPM94wHwYDVR0jBBgwFoAUAK3Z +o/Z59m50qX8zPYEX10zPM94wDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBBQUAA4IBAQB8itEf +GDeC4Liwo+1WlchiYZwFos3CYiZhzRAW18y0ZTTQEYqtqKkFZu90821fnZmv9ov761KyBZiibyrF +VL0lvV+uyIbqRizBs73B6UlwGBaXCBOMIOAbLjpHyx7kADCVW/RFo8AasAFOq73AI25jP4BKxQft +3OJvx8Fi8eNy1gTIdGcL+oiroQHIb/AUr9KZzVGTfu0uOMe9zkZQPXLjeSWdm4grECDdpbgyn43g +Kd8hdIaC2y+CMMbHNYaz+ZZfRtsMRf3zUMNvxsNIrUam4SdHCh0Om7bCd39j8uB9Gr784N/Xx6ds +sPmuujz9dLQR6FgNgLzTqIA6me11zEZ7 +-----END CERTIFICATE----- + +America Online Root Certification Authority 2 +============================================= +-----BEGIN CERTIFICATE----- +MIIFpDCCA4ygAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEcMBoGA1UEChMT +QW1lcmljYSBPbmxpbmUgSW5jLjE2MDQGA1UEAxMtQW1lcmljYSBPbmxpbmUgUm9vdCBDZXJ0aWZp +Y2F0aW9uIEF1dGhvcml0eSAyMB4XDTAyMDUyODA2MDAwMFoXDTM3MDkyOTE0MDgwMFowYzELMAkG +A1UEBhMCVVMxHDAaBgNVBAoTE0FtZXJpY2EgT25saW5lIEluYy4xNjA0BgNVBAMTLUFtZXJpY2Eg +T25saW5lIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgMjCCAiIwDQYJKoZIhvcNAQEBBQAD +ggIPADCCAgoCggIBAMxBRR3pPU0Q9oyxQcngXssNt79Hc9PwVU3dxgz6sWYF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4YPk/EjG+AanPIW1H4m9LcuwBcsaD8dQPugfCI7iNS6eYVM42sLQnFdvkrOYCJ5JdL +kKWoePhzQ3ukYbDYWMzhbGZ+nPMJXlVjhNWo7/OxLjBos8Q82KxujZlakE403Daaj4GIULdtlkIJ +89eVgw1BS7Bqa/j8D35in2fE7SZfECYPCE/wpFcozo+47UX2bu4lXapuOb7kky/ZR6By6/qmW6/K +Uz/iDsaWVhFu9+lmqSbYf5VT7QqFiLpPKaVCjF62/IUgAKpoC6EahQGcxEZjgoi2IrHu/qpGWX7P +NSzVttpd90gzFFS269lvzs2I1qsb2pY7HVkCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkq +hkiG9w0BAQUFAAOCAQEAuI3O7+cUus/usESSbLQ5PqKEbq24IXfS1HeCh+YgQYHu4vgRt2PRFze+ +GXYkHAQaTOs9qmdvLdTN/mUxcMUbpgIKumB7bVjCmkn+YzILa+M6wKyrO7Do0wlRjBCDxjTgxSvg +GrZgFCdsMneMvLJymM/NzD+5yCRCFNZX/OYmQ6kd5YCQzgNUKD73P9P4Te1qCjqTE5s7FCMTY5w/ +0YcneeVMUeMBrYVdGjux1XMQpNPyvG5k9VpWkKjHDkx0Dy5xO/fIR/RpbxXyEV6DHpx8Uq79AtoS +qFlnGNu8cN2bsWntgM6JQEhqDjXKKWYVIZQs6GAqm4VKQPNriiTsBhYscw== +-----END CERTIFICATE----- + +Comodo AAA Services root +======================== +-----BEGIN CERTIFICATE----- +MIIEMjCCAxqgAwIBAgIBATANBgkqhkiG9w0BAQUFADB7MQswCQYDVQQGEwJHQjEbMBkGA1UECAwS +R3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRowGAYDVQQKDBFDb21vZG8gQ0Eg +TGltaXRlZDEhMB8GA1UEAwwYQUFBIENlcnRpZmljYXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAwMDAw +MFoXDTI4MTIzMTIzNTk1OVowezELMAkGA1UEBhMCR0I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6SFz7JsDoeA3raAVGI/6ugLOpyypEBMs1OUIJqsil2D4kF501KKaU73yqWjgom7C +12yxow+ev+to51byrvLjKzg6CYG1a4XXvi3tPxq3smPi9WIsgtRqAEFQ8TmDn5XpNpaYbg== +-----END CERTIFICATE----- + +Comodo Secure Services root +=========================== +-----BEGIN CERTIFICATE----- +MIIEPzCCAyegAwIBAgIBATANBgkqhkiG9w0BAQUFADB+MQswCQYDVQQGEwJHQjEbMBkGA1UECAwS +R3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRowGAYDVQQKDBFDb21vZG8gQ0Eg +TGltaXRlZDEkMCIGA1UEAwwbU2VjdXJlIENlcnRpZmljYXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAw +MDAwMFoXDTI4MTIzMTIzNTk1OVowfjELMAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFu +Y2hlc3RlcjEQMA4GA1UEBwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl0ZWQxJDAi +BgNVBAMMG1NlY3VyZSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczCCASIwDQYJKoZIhvcNAQEBBQADggEP +ADCCAQoCggEBAMBxM4KK0HDrc4eCQNUd5MvJDkKQ+d40uaG6EfQlhfPMcm3ye5drswfxdySRXyWP +9nQ95IDC+DwN879A6vfIUtFyb+/Iq0G4bi4XKpVpDM3SHpR7LZQdqnXXs5jLrLxkU0C8j6ysNstc +rbvd4JQX7NFc0L/vpZXJkMWwrPsbQ996CF23uPJAGysnnlDOXmWCiIxe004MeuoIkbY2qitC++rC +oznl2yY4rYsK7hljxxwk3wN42ubqwUcaCwtGCd0C/N7Lh1/XMGNooa7cMqG6vv5Eq2i2pRcV/b3V +p6ea5EQz6YiO/O1R65NxTq0B50SOqy3LqP4BSUjwwN3HaNiS/j0CAwEAAaOBxzCBxDAdBgNVHQ4E +FgQUPNiTiMLAggnMAZkGkyDpnnAJY08wDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8w +gYEGA1UdHwR6MHgwO6A5oDeGNWh0dHA6Ly9jcmwuY29tb2RvY2EuY29tL1NlY3VyZUNlcnRpZmlj +YXRlU2VydmljZXMuY3JsMDmgN6A1hjNodHRwOi8vY3JsLmNvbW9kby5uZXQvU2VjdXJlQ2VydGlm +aWNhdGVTZXJ2aWNlcy5jcmwwDQYJKoZIhvcNAQEFBQADggEBAIcBbSMdflsXfcFhMs+P5/OKlFlm +4J4oqF7Tt/Q05qo5spcWxYJvMqTpjOev/e/C6LlLqqP05tqNZSH7uoDrJiiFGv45jN5bBAS0VPmj +Z55B+glSzAVIqMk/IQQezkhr/IXownuvf7fM+F86/TXGDe+X3EyrEeFryzHRbPtIgKvcnDe4IRRL +DXE97IMzbtFuMhbsmMcWi1mmNKsFVy2T96oTy9IT4rcuO81rUBcJaD61JlfutuC23bkpgHl9j6Pw +pCikFcSF9CfUa7/lXORlAnZUtOM3ZiTTGWHIUhDlizeauan5Hb/qmZJhlv8BzaFfDbxxvA6sCx1H +RR3B7Hzs/Sk= +-----END CERTIFICATE----- + +Comodo Trusted Services root +============================ +-----BEGIN CERTIFICATE----- +MIIEQzCCAyugAwIBAgIBATANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJHQjEbMBkGA1UECAwS +R3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRowGAYDVQQKDBFDb21vZG8gQ0Eg +TGltaXRlZDElMCMGA1UEAwwcVHJ1c3RlZCBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczAeFw0wNDAxMDEw +MDAwMDBaFw0yODEyMzEyMzU5NTlaMH8xCzAJBgNVBAYTAkdCMRswGQYDVQQIDBJHcmVhdGVyIE1h +bmNoZXN0ZXIxEDAOBgNVBAcMB1NhbGZvcmQxGjAYBgNVBAoMEUNvbW9kbyBDQSBMaW1pdGVkMSUw +IwYDVQQDDBxUcnVzdGVkIENlc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Bi +-----END CERTIFICATE----- + +QuoVadis Root CA +================ +-----BEGIN CERTIFICATE----- +MIIF0DCCBLigAwIBAgIEOrZQizANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJCTTEZMBcGA1UE +ChMQUXVvVmFkaXMgTGltaXRlZDElMCMGA1UECxMcUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0 +eTEuMCwGA1UEAxMlUXVvVmFkaXMgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wMTAz +MTkxODMzMzNaFw0yMTAzMTcxODMzMzNaMH8xCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRp +cyBMaW1pdGVkMSUwIwYDVQQLExxSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MS4wLAYDVQQD +EyVRdW9WYWRpcyBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEF +AAOCAQ8AMIIBCgKCAQEAv2G1lVO6V/z68mcLOhrfEYBklbTRvM16z/Ypli4kVEAkOPcahdxYTMuk +J0KX0J+DisPkBgNbAKVRHnAEdOLB1Dqr1607BxgFjv2DrOpm2RgbaIr1VxqYuvXtdj182d6UajtL +F8HVj71lODqV0D1VNk7feVcxKh7YWWVJWCCYfqtffp/p1k3sg3Spx2zY7ilKhSoGFPlU5tPaZQeL +YzcS19Dsw3sgQUSj7cugF+FxZc4dZjH3dgEZyH0DWLaVSR2mEiboxgx24ONmy+pdpibu5cxfvWen +AScOospUxbF6lR1xHkopigPcakXBpBlebzbNw6Kwt/5cOOJSvPhEQ+aQuwIDAQABo4ICUjCCAk4w +PQYIKwYBBQUHAQEEMTAvMC0GCCsGAQUFBzABhiFodHRwczovL29jc3AucXVvdmFkaXNvZmZzaG9y +ZS5jb20wDwYDVR0TAQH/BAUwAwEB/zCCARoGA1UdIASCAREwggENMIIBCQYJKwYBBAG+WAABMIH7 +MIHUBggrBgEFBQcCAjCBxxqBxFJlbG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+Ju1zdXtg2pEto= +-----END CERTIFICATE----- + +Security Communication Root CA +============================== +-----BEGIN CERTIFICATE----- +MIIDWjCCAkKgAwIBAgIBADANBgkqhkiG9w0BAQUFADBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMP +U0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEw +HhcNMDMwOTMwMDQyMDQ5WhcNMjMwOTMwMDQyMDQ5WjBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMP +U0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEw +ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCzs/5/022x7xZ8V6UMbXaKL0u/ZPtM7orw +8yl89f/uKuDp6bpbZCKamm8sOiZpUQWZJtzVHGpxxpp9Hp3dfGzGjGdnSj74cbAZJ6kJDKaVv0uM +DPpVmDvY6CKhS3E4eayXkmmziX7qIWgGmBSWh9JhNrxtJ1aeV+7AwFb9Ms+k2Y7CI9eNqPPYJayX +5HA49LY6tJ07lyZDo6G8SVlyTCMwhwFY9k6+HGhWZq/NQV3Is00qVUarH9oe4kA92819uZKAnDfd +DJZkndwi92SL32HeFZRSFaB9UslLqCHJxrHty8OVYNEP8Ktw+N/LTX7s1vqr2b1/VPKl6Xn62dZ2 +JChzAgMBAAGjPzA9MB0GA1UdDgQWBBSgc0mZaNyFW2XjmygvV5+9M7wHSDALBgNVHQ8EBAMCAQYw +DwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAaECpqLvkT115swW1F7NgE+vGkl3g +0dNq/vu+m22/xwVtWSDEHPC32oRYAmP6SBbvT6UL90qY8j+eG61Ha2POCEfrUj94nK9NrvjVT8+a +mCoQQTlSxN3Zmw7vkwGusi7KaEIkQmywszo+zenaSMQVy+n5Bw+SUEmK3TGXX8npN6o7WWWXlDLJ +s58+OmJYxUmtYg5xpTKqL8aJdkNAExNnPaJUJRDL8Try2frbSVa7pv6nQTXD4IhhyYjH3zYQIphZ +6rBK+1YWc26sTfcioU+tHXotRSflMMFe8toTyyVCUZVHA4xsIcx0Qu1T/zOLjw9XARYvz6buyXAi +FL39vmwLAw== +-----END CERTIFICATE----- + +Sonera Class 2 Root CA +====================== +-----BEGIN CERTIFICATE----- +MIIDIDCCAgigAwIBAgIBHTANBgkqhkiG9w0BAQUFADA5MQswCQYDVQQGEwJGSTEPMA0GA1UEChMG +U29uZXJhMRkwFwYDVQQDExBTb25lcmEgQ2xhc3MyIENBMB4XDTAxMDQwNjA3Mjk0MFoXDTIxMDQw +NjA3Mjk0MFowOTELMAkGA1UEBhMCRkkxDzANBgNVBAoTBlNvbmVyYTEZMBcGA1UEAxMQU29uZXJh +IENsYXNzMiBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJAXSjWdyvANlsdE+hY3 +/Ei9vX+ALTU74W+oZ6m/AxxNjG8yR9VBaKQTBME1DJqEQ/xcHf+Js+gXGM2RX/uJ4+q/Tl18GybT +dXnt5oTjV+WtKcT0OijnpXuENmmz/V52vaMtmdOQTiMofRhj8VQ7Jp12W5dCsv+u8E7s3TmVToMG +f+dJQMjFAbJUWmYdPfz56TwKnoG4cPABi+QjVHzIrviQHgCWctRUz2EjvOr7nQKV0ba5cTppCD8P +tOFCx4j1P5iop7oc4HFx71hXgVB6XGt0Rg6DA5jDjqhu8nYybieDwnPz3BjotJPqdURrBGAgcVeH +nfO+oJAjPYok4doh28MCAwEAAaMzMDEwDwYDVR0TAQH/BAUwAwEB/zARBgNVHQ4ECgQISqCqWITT +XjwwCwYDVR0PBAQDAgEGMA0GCSqGSIb3DQEBBQUAA4IBAQBazof5FnIVV0sd2ZvnoiYw7JNn39Yt +0jSv9zilzqsWuasvfDXLrNAPtEwr/IDva4yRXzZ299uzGxnq9LIR/WFxRL8oszodv7ND6J+/3DEI +cbCdjdY0RzKQxmUk96BKfARzjzlvF4xytb1LyHr4e4PDKE6cCepnP7JnBBvDFNr450kkkdAdavph +Oe9r5yF1BgfYErQhIHBCcYHaPJo2vqZbDWpsmh+Re/n570K6Tk6ezAyNlNzZRZxe7EJQY670XcSx +EtzKO6gunRRaBXW37Ndj4ro1tgQIkejanZz2ZrUYrAqmVCY0M9IbwdR/GjqOC6oybtv8TyWf2TLH +llpwrN9M +-----END CERTIFICATE----- + +Staat der Nederlanden Root CA +============================= +-----BEGIN CERTIFICATE----- +MIIDujCCAqKgAwIBAgIEAJiWijANBgkqhkiG9w0BAQUFADBVMQswCQYDVQQGEwJOTDEeMBwGA1UE +ChMVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSYwJAYDVQQDEx1TdGFhdCBkZXIgTmVkZXJsYW5kZW4g +Um9vdCBDQTAeFw0wMjEyMTcwOTIzNDlaFw0xNTEyMTYwOTE1MzhaMFUxCzAJBgNVBAYTAk5MMR4w +HAYDVQQKExVTdGFhdCBkZXIgTmVkZXJsYW5kZW4xJjAkBgNVBAMTHVN0YWF0IGRlciBOZWRlcmxh +bmRlbiBSb290IENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmNK1URF6gaYUmHFt +vsznExvWJw56s2oYHLZhWtVhCb/ekBPHZ+7d89rFDBKeNVU+LCeIQGv33N0iYfXCxw719tV2U02P +jLwYdjeFnejKScfST5gTCaI+Ioicf9byEGW07l8Y1Rfj+MX94p2i71MOhXeiD+EwR+4A5zN9RGca +C1Hoi6CeUJhoNFIfLm0B8mBF8jHrqTFoKbt6QZ7GGX+UtFE5A3+y3qcym7RHjm+0Sq7lr7HcsBth +vJly3uSJt3omXdozSVtSnA71iq3DuD3oBmrC1SoLbHuEvVYFy4ZlkuxEK7COudxwC0barbxjiDn6 +22r+I/q85Ej0ZytqERAhSQIDAQABo4GRMIGOMAwGA1UdEwQFMAMBAf8wTwYDVR0gBEgwRjBEBgRV +HSAAMDwwOgYIKwYBBQUHAgEWLmh0dHA6Ly93d3cucGtpb3ZlcmhlaWQubmwvcG9saWNpZXMvcm9v +dC1wb2xpY3kwDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBSofeu8Y6R0E3QA7Jbg0zTBLL9s+DAN +BgkqhkiG9w0BAQUFAAOCAQEABYSHVXQ2YcG70dTGFagTtJ+k/rvuFbQvBgwp8qiSpGEN/KtcCFtR +EytNwiphyPgJWPwtArI5fZlmgb9uXJVFIGzmeafR2Bwp/MIgJ1HI8XxdNGdphREwxgDS1/PTfLbw +MVcoEoJz6TMvplW0C5GUR5z6u3pCMuiufi3IvKwUv9kP2Vv8wfl6leF9fpb8cbDCTMjfRTTJzg3y +nGQI0DvDKcWy7ZAEwbEpkcUwb8GpcjPM/l0WFywRaed+/sWDCN+83CI6LiBpIzlWYGeQiy52OfsR +iJf2fL1LuCAWZwWN4jvBcj+UlTfHXbme2JOhF4//DGYVwSR8MnwDHTuhWEUykw== +-----END CERTIFICATE----- + +TDC Internet Root CA +==================== +-----BEGIN CERTIFICATE----- +MIIEKzCCAxOgAwIBAgIEOsylTDANBgkqhkiG9w0BAQUFADBDMQswCQYDVQQGEwJESzEVMBMGA1UE +ChMMVERDIEludGVybmV0MR0wGwYDVQQLExRUREMgSW50ZXJuZXQgUm9vdCBDQTAeFw0wMTA0MDUx +NjMzMTdaFw0yMTA0MDUxNzAzMTdaMEMxCzAJBgNVBAYTAkRLMRUwEwYDVQQKEwxUREMgSW50ZXJu +ZXQxHTAbBgNVBAsTFFREQyBJbnRlcm5ldCBSb290IENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A +MIIBCgKCAQEAxLhAvJHVYx/XmaCLDEAedLdInUaMArLgJF/wGROnN4NrXceO+YQwzho7+vvOi20j +xsNuZp+Jpd/gQlBn+h9sHvTQBda/ytZO5GhgbEaqHF1j4QeGDmUApy6mcca8uYGoOn0a0vnRrEvL +znWv3Hv6gXPU/Lq9QYjUdLP5Xjg6PEOo0pVOd20TDJ2P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MCN7ZF6TACPcn9d2t0bi0Vr591pl6jFVkwP +DPafepE39peC4N1xaf92P2BNPM/3mfnGV/TJVTl4uix5yaaIK/QI +-----END CERTIFICATE----- + +UTN USERFirst Hardware Root CA +============================== +-----BEGIN CERTIFICATE----- +MIIEdDCCA1ygAwIBAgIQRL4Mi1AAJLQR0zYq/mUK/TANBgkqhkiG9w0BAQUFADCBlzELMAkGA1UE +BhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0eTEeMBwGA1UEChMVVGhl +IFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExhodHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xHzAd +BgNVBAMTFlVUTi1VU0VSRmlyc3QtSGFyZHdhcmUwHhcNOTkwNzA5MTgxMDQyWhcNMTkwNzA5MTgx +OTIyWjCBlzELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0 +eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExhodHRwOi8vd3d3LnVz +ZXJ0cnVzdC5jb20xHzAdBgNVBAMTFlVUTi1VU0VSRmlyc3QtSGFyZHdhcmUwggEiMA0GCSqGSIb3 +DQEBAQUAA4IBDwAwggEKAoIBAQCx98M4P7Sof885glFn0G2f0v9Y8+efK+wNiVSZuTiZFvfgIXlI +wrthdBKWHTxqctU8EGc6Oe0rE81m65UJM6Rsl7HoxuzBdXmcRl6Nq9Bq/bkqVRcQVLMZ8Jr28bFd +tqdt++BxF2uiiPsA3/4aMXcMmgF6sTLjKwEHOG7DpV4jvEWbe1DByTCP2+UretNb+zNAHqDVmBe8 +i4fDidNdoI6yqqr2jmmIBsX6iSHzCJ1pLgkzmykNRg+MzEk0sGlRvfkGzWitZky8PqxhvQqIDsjf +Pe58BEydCl5rkdbux+0ojatNh4lz0G6k0B4WixThdkQDf2Os5M1JnMWS9KsyoUhbAgMBAAGjgbkw +gbYwCwYDVR0PBAQDAgHGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFKFyXyYbKJhDlV0HN9WF +lp1L0sNFMEQGA1UdHwQ9MDswOaA3oDWGM2h0dHA6Ly9jcmwudXNlcnRydXN0LmNvbS9VVE4tVVNF +UkZpcnN0LUhhcmR3YXJlLmNybDAxBgNVHSUEKjAoBggrBgEFBQcDAQYIKwYBBQUHAwUGCCsGAQUF +BwMGBggrBgEFBQcDBzANBgkqhkiG9w0BAQUFAAOCAQEARxkP3nTGmZev/K0oXnWO6y1n7k57K9cM +//bey1WiCuFMVGWTYGufEpytXoMs61quwOQt9ABjHbjAbPLPSbtNk28GpgoiskliCE7/yMgUsogW +XecB5BKV5UU0s4tpvc+0hY91UZ59Ojg6FEgSxvunOxqNDYJAB+gECJChicsZUN/KHAG8HQQZexB2 +lzvukJDKxA4fFm517zP4029bHpbj4HR3dHuKom4t3XbWOTCC8KucUvIqx69JXn7HaOWCgchqJ/kn +iCrVWFCVH/A7HFe7fRQ5YiuayZSSKqMiDP+JJn1fIytH1xUdqWqeUQ0qUZ6B+dQ7XnASfxAynB67 +nfhmqA== +-----END CERTIFICATE----- + +Camerfirma Chambers of Commerce Root +==================================== +-----BEGIN CERTIFICATE----- +MIIEvTCCA6WgAwIBAgIBADANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJFVTEnMCUGA1UEChMe +QUMgQ2FtZXJmaXJtYSBTQSBDSUYgQTgyNzQzMjg3MSMwIQYDVQQLExpodHRwOi8vd3d3LmNoYW1i +ZXJzaWduLm9yZzEiMCAGA1UEAxMZQ2hhbWJlcnMgb2YgQ29tbWVyY2UgUm9vdDAeFw0wMzA5MzAx +NjEzNDNaFw0zNzA5MzAxNjEzNDRaMH8xCzAJBgNVBAYTAkVVMScwJQYDVQQKEx5BQyBDYW1lcmZp +cm1hIFNBIENJRiBBODI3NDMyODcxIzAhBgNVBAsTGmh0dHA6Ly93d3cuY2hhbWJl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Hnjs8NMiAT9QUu/wN +UPf6s+xCX6ndbcj0dc97wXImsQEcXCz9ek60AcUFV7nnPKoF2YjpB0ZBzu9Bga5Y34OirsrXdx/n +ADydb47kMgkdTXg0eDQ8lJsm7U9xxhl6vSAiSFr+S30Dt+dYvsYyTnQeaN2oaFuzPu5ifdmA6Ap1 +erfutGWaIZDgqtCYvDi1czyL+Nw= +-----END CERTIFICATE----- + +Camerfirma Global Chambersign Root +================================== +-----BEGIN CERTIFICATE----- +MIIExTCCA62gAwIBAgIBADANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJFVTEnMCUGA1UEChMe +QUMgQ2FtZXJmaXJtYSBTQSBDSUYgQTgyNzQzMjg3MSMwIQYDVQQLExpodHRwOi8vd3d3LmNoYW1i +ZXJzaWduLm9yZzEgMB4GA1UEAxMXR2xvYmFsIENoYW1iZXJzaWduIFJvb3QwHhcNMDMwOTMwMTYx +NDE4WhcNMzcwOTMwMTYxNDE4WjB9MQswCQYDVQQGEwJFVTEnMCUGA1UEChMeQUMgQ2FtZXJmaXJt +YSBTQSBDSUYgQTgyNzQzMjg3MSMwIQYDVQQLExpodHRwOi8vd3d3LmNoYW1iZXJzaWduLm9yZzEg +MB4GA1UEAxMXR2xvYmFsIENoYW1iZXJzaWduIFJvb3QwggEgMA0GCSqGSIb3DQEBAQUAA4IBDQAw +ggEIAoIBAQCicKLQn0KuWxfH2H3PFIP8T8mhtxOviteePgQKkotgVvq0Mi+ITaFgCPS3CU6gSS9J +1tPfnZdan5QEcOw/Wdm3zGaLmFIoCQLfxS+EjXqXd7/sQJ0lcqu1PzKY+7e3/HKE5TWH+VX6ox8O +by4o3Wmg2UIQxvi1RMLQQ3/bvOSiPGpVeAp3qdjqGTK3L/5cPxvusZjsyq16aUXjlg9V9ubtdepl +6DJWk0aJqCWKZQbua795B9Dxt6/tLE2Su8CoX6dnfQTyFQhwrJLWfQTSM/tMtgsL+xrJxI0DqX5c +8lCrEqWhz0hQpe/SyBoT+rB/sYIcd2oPX9wLlY/vQ37mRQklAgEDo4IBUDCCAUwwEgYDVR0TAQH/ +BAgwBgEB/wIBDDA/BgNVHR8EODA2MDSgMqAwhi5odHRwOi8vY3JsLmNoYW1iZXJzaWduLm9yZy9j +aGFtYmVyc2lnbnJvb3QuY3JsMB0GA1UdDgQWBBRDnDafsJ4wTcbOX60Qq+UDpfqpFDAOBgNVHQ8B +Af8EBAMCAQYwEQYJYIZIAYb4QgEBBAQDAgAHMCoGA1UdEQQjMCGBH2NoYW1iZXJzaWducm9vdEBj +aGFtYmVyc2lnbi5vcmcwKgYDVR0SBCMwIYEfY2hhbWJlcnNpZ25yb290QGNoYW1iZXJzaWduLm9y +ZzBbBgNVHSAEVDBSMFAGCysGAQQBgYcuCgEBMEEwPwYIKwYBBQUHAgEWM2h0dHA6Ly9jcHMuY2hh +bWJlcnNpZ24ub3JnL2Nwcy9jaGFtYmVyc2lnbnJvb3QuaHRtbDANBgkqhkiG9w0BAQUFAAOCAQEA +PDtwkfkEVCeR4e3t/mh/YV3lQWVPMvEYBZRqHN4fcNs+ezICNLUMbKGKfKX0j//U2K0X1S0E0T9Y +gOKBWYi+wONGkyT+kL0mojAt6JcmVzWJdJYY9hXiryQZVgICsroPFOrGimbBhkVVi76SvpykBMdJ +PJ7oKXqJ1/6v/2j1pReQvayZzKWGVwlnRtvWFsJG8eSpUPWP0ZIV018+xgBJOm5YstHRJw0lyDL4 +IBHNfTIzSJRUTN3cecQwn+uOuFW114hcxWokPbLTBQNRxgfvzBRydD1ucs4YKIxKoHflCStFREes +t2d/AYoFWpO+ocH/+OcOZ6RHSXZddZAa9SaP8A== +-----END CERTIFICATE----- + +NetLock Notary (Class A) Root +============================= +-----BEGIN CERTIFICATE----- +MIIGfTCCBWWgAwIBAgICAQMwDQYJKoZIhvcNAQEEBQAwga8xCzAJBgNVBAYTAkhVMRAwDgYDVQQI +EwdIdW5nYXJ5MREwDwYDVQQHEwhCdWRhcGVzdDEnMCUGA1UEChMeTmV0TG9jayBI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IFICATE----- + +NetLock Business (Class B) Root +=============================== +-----BEGIN CERTIFICATE----- +MIIFSzCCBLSgAwIBAgIBaTANBgkqhkiG9w0BAQQFADCBmTELMAkGA1UEBhMCSFUxETAPBgNVBAcT +CEJ1ZGFwZXN0MScwJQYDVQQKEx5OZXRMb2NrIEhhbG96YXRiaXp0b25zYWdpIEtmdC4xGjAYBgNV +BAsTEVRhbnVzaXR2YW55a2lhZG9rMTIwMAYDVQQDEylOZXRMb2NrIFV6bGV0aSAoQ2xhc3MgQikg +VGFudXNpdHZhbnlraWFkbzAeFw05OTAyMjUxNDEwMjJaFw0xOTAyMjAxNDEwMjJaMIGZMQswCQYD +VQQGEwJIVTERMA8GA1UEBxMIQnVkYXBlc3QxJzAlBgNVBAoTHk5ldExvY2sgSGFsb3phdGJpenRv +bnNhZ2kgS2Z0LjEaMBgGA1UECxMRVGFudXNpdHZhbnlraWFkb2sxMjAwBgNVBAMTKU5ldExvY2sg +VXpsZXRpIChDbGFzcyBCKSBUYW51c2l0dmFueWtpYWRvMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCB +iQKBgQCx6gTsIKAjwo84YM/HRrPVG/77uZmeBNwcf4xKgZjupNTKihe5In+DCnVMm8Bp2GQ5o+2S +o/1bXHQawEfKOml2mrriRBf8TKPV/riXiK+IA4kfpPIEPsgHC+b5sy96YhQJRhTKZPWLgLViqNhr +1nGTLbO/CVRY7QbrqHvcQ7GhaQIDAQABo4ICnzCCApswEgYDVR0TAQH/BAgwBgEB/wIBBDAOBgNV +HQ8BAf8EBAMCAAYwEQYJYIZIAYb4QgEBBAQDAgAHMIICYAYJYIZIAYb4QgENBIICURaCAk1GSUdZ +RUxFTSEgRXplbiB0YW51c2l0dmFueSBhIE5ldExvY2sgS2Z0LiBBbHRhbGFub3MgU3pvbGdhbHRh +dGFzaSBGZWx0ZXRlbGVpYmVuIGxlaXJ0IGVsamFyYXNvayBhbGFwamFuIGtlc3p1bHQuIEEgaGl0 +ZWxlc2l0ZXMgZm9seWFtYXRhdCBhIE5ldExvY2sgS2Z0LiB0ZXJtZWtmZWxlbG9zc2VnLWJpenRv +c2l0YXNhIHZlZGkuIEEgZGlnaXRhbGlzIGFsYWlyYXMgZWxmb2dhZGFzYW5hayBmZWx0ZXRlbGUg +YXogZWxvaXJ0IGVsbGVub3J6ZXNpIGVsamFyYXMgbWVndGV0ZWxlLiBBeiBlbGphcmFzIGxlaXJh +c2EgbWVndGFsYWxoYXRvIGEgTmV0TG9jayBLZnQuIEludGVybmV0IGhvbmxhcGphbiBhIGh0dHBz +Oi8vd3d3Lm5ldGxvY2submV0L2RvY3MgY2ltZW4gdmFneSBrZXJoZXRvIGF6IGVsbGVub3J6ZXNA +bmV0bG9jay5uZXQgZS1tYWlsIGNpbWVuLiBJTVBPUlRBTlQhIFRoZSBpc3N1YW5jZSBhbmQgdGhl +IHVzZSBvZiB0aGlzIGNlcnRpZmljYXRlIGlzIHN1YmplY3QgdG8gdGhlIE5ldExvY2sgQ1BTIGF2 +YWlsYWJsZSBhdCBodHRwczovL3d3dy5uZXRsb2NrLm5ldC9kb2NzIG9yIGJ5IGUtbWFpbCBhdCBj +cHNAbmV0bG9jay5uZXQuMA0GCSqGSIb3DQEBBAUAA4GBAATbrowXr/gOkDFOzT4JwG06sPgzTEdM +43WIEJessDgVkcYplswhwG08pXTP2IKlOcNl40JwuyKQ433bNXbhoLXan3BukxowOR0w2y7jfLKR +stE3Kfq51hdcR0/jHTjrn9V7lagonhVK0dHQKwCXoOKSNitjrFgBazMpUIaD8QFI +-----END CERTIFICATE----- + +NetLock Express (Class C) Root +============================== +-----BEGIN CERTIFICATE----- +MIIFTzCCBLigAwIBAgIBaDANBgkqhkiG9w0BAQQFADCBmzELMAkGA1UEBhMCSFUxETAPBgNVBAcT +CEJ1ZGFwZXN0MScwJQYDVQQKEx5OZXRMb2NrIEhhbG96YXRiaXp0b25zYWdpIEtmdC4xGjAYBgNV +BAsTEVRhbnVzaXR2YW55a2lhZG9rMTQwMgYDVQQ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3RhbGFsaGF0byBhIE5ldExvY2sgS2Z0LiBJbnRlcm5ldCBob25sYXBqYW4gYSBo +dHRwczovL3d3dy5uZXRsb2NrLm5ldC9kb2NzIGNpbWVuIHZhZ3kga2VyaGV0byBheiBlbGxlbm9y +emVzQG5ldGxvY2submV0IGUtbWFpbCBjaW1lbi4gSU1QT1JUQU5UISBUaGUgaXNzdWFuY2UgYW5k +IHRoZSB1c2Ugb2YgdGhpcyBjZXJ0aWZpY2F0ZSBpcyBzdWJqZWN0IHRvIHRoZSBOZXRMb2NrIENQ +UyBhdmFpbGFibGUgYXQgaHR0cHM6Ly93d3cubmV0bG9jay5uZXQvZG9jcyBvciBieSBlLW1haWwg +YXQgY3BzQG5ldGxvY2submV0LjANBgkqhkiG9w0BAQQFAAOBgQAQrX/XDDKACtiG8XmYta3UzbM2 +xJZIwVzNmtkFLp++UOv0JhQQLdRmF/iewSf98e3ke0ugbLWrmldwpu2gpO0u9f38vf5NNwgMvOOW +gyL1SRt/Syu0VMGAfJlOHdCM7tCs5ZL6dVb+ZKATj7i4Fp1hBWeAyNDYpQcCNJgEjTME1A== +-----END CERTIFICATE----- + +XRamp Global CA Root +==================== +-----BEGIN CERTIFICATE----- +MIIEMDCCAxigAwIBAgIQUJRs7Bjq1ZxN1ZfvdY+grTANBgkqhkiG9w0BAQUFADCBgjELMAkGA1UE +BhMCVVMxHjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJhbXAgU2Vj +dXJpdHkgU2VydmljZXMgSW5jMS0wKwYDVQQDEyRYUmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBB +dXRob3JpdHkwHhcNMDQxMTAxMTcxNDA0WhcNMzUwMTAxMDUzNzE5WjCBgjELMAkGA1UEBhMCVVMx +HjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJhbXAgU2VjdXJpdHkg +U2VydmljZXMgSW5jMS0wKwYDVQQD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AQEFBQADggEBADJL87LKPpH8EsahB4yOd6AzBhRckB4Y9wim +PQoZ+YeAEW5p5JYXMP80kWNyOO7MHAGjHZQopDH2esRU1/blMVgDoszOYtuURXO1v0XJJLXVggKt +I3lpjbi2Tc7PTMozI+gciKqdi0FuFskg5YmezTvacPd+mSYgFFQlq25zheabIZ0KbIIOqPjCDPoQ +HmyW74cNxA9hi63ugyuV+I6ShHI56yDqg+2DzZduCLzrTia2cyvk0/ZM/iZx4mERdEr/VxqHD3VI +Ls9RaRegAhJhldXRQLIQTO7ErBBDpqWeCtWVYpoNz4iCxTIM5CufReYNnyicsbkqWletNw+vHX/b +vZ8= +-----END CERTIFICATE----- + +Starfield Class 2 CA +==================== +-----BEGIN CERTIFICATE----- +MIIEDzCCAvegAwIBAgIBADANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJVUzElMCMGA1UEChMc +U3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMpU3RhcmZpZWxkIENsYXNzIDIg +Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQwNjI5MTczOTE2WhcNMzQwNjI5MTczOTE2WjBo +MQswCQYDVQQGEwJVUzElMCMGA1UEChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAG +A1UECxMpU3RhcmZpZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEgMA0GCSqG +SIb3DQEBAQUAA4IBDQAwggEIAoIBAQC3Msj+6XGmBIWtDBFk385N78gDGIc/oav7PKaf8MOh2tTY +bitTkPskpD6E8J7oX+zlJ0T1KKY/e97gKvDIr1MvnsoFAZMej2YcOadN+lq2cwQlZut3f+dZxkqZ +JRRU6ybH838Z1TBwj6+wRir/resp7defqgSHo9T5iaU0X9tDkYI22WY8sbi5gv2cOj4QyDvvBmVm +epsZGD3/cVE8MC5fvj13c7JdBmzDI1aaK4UmkhynArPkPw2vCHmCuDY96pzTNbO8acr1zJ3o/WSN +F4Azbl5KXZnJHoe0nRrA1W4TNSNe35tfPe/W93bC6j67eA0cQmdrBNj41tpvi/JEoAGrAgEDo4HF +MIHCMB0GA1UdDgQWBBS/X7fRzt0fhvRbVazc1xDCDqmI5zCBkgYDVR0jBIGKMIGHgBS/X7fRzt0f +hvRbVazc1xDCDqmI56FspGowaDELMAkGA1UEBhMCVVMxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNo +bm9sb2dpZXMsIEluYy4xMjAwBgNVBAsTKVN0YXJmaWVsZCBDbGFzcyAyIENlcnRpZmljYXRpb24g +QXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAAWdP4id0ckaVaGs +afPzWdqbAYcaT1epoXkJKtv3L7IezMdeatiDh6GX70k1PncGQVhiv45YuApnP+yz3SFmH8lU+nLM +PUxA2IGvd56Deruix/U0F47ZEUD0/CwqTRV/p2JdLiXTAAsgGh1o+Re49L2L7ShZ3U0WixeDyLJl +xy16paq8U4Zt3VekyvggQQto8PT7dL5WXXp59fkdheMtlb71cZBDzI0fmgAKhynpVSJYACPq4xJD +KVtHCN2MQWplBqjlIapBtJUhlbl90TSrE9atvNziPTnNvT51cKEYWQPJIrSPnNVeKtelttQKbfi3 +QBFGmh95DmK/D5fs4C8fF5Q= +-----END CERTIFICATE----- + +StartCom Certification Authority +================================ +-----BEGIN CERTIFICATE----- +MIIHyTCCBbGgAwIBAgIBATANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJJTDEWMBQGA1UEChMN +U3RhcnRDb20gTHRkLjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmlu +ZzEpMCcGA1UEAxMgU3RhcnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDYwOTE3MTk0 +NjM2WhcNMzYwOTE3MTk0NjM2WjB9MQswCQYDVQQGEwJJTDEWMBQGA1UEChMNU3RhcnRDb20gTH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ZZwLKMS9R9Ie70cfmu3nZD0Ijuu+Pwq +yvqCUqDvr0tVk+vBtfAii6w0TiYiBKGHLHVKt+V9E9e4DGTANtLJL4YSjCMJwRuCO3NJo2pXh5Tl +1njFmUNj403gdy3hZZlyaQQaRwnmDwFWJPsfvw55qVguucQJAX6Vum0ABj6y6koQOdjQK/W/7HW/ +lwLFCRsI3FU34oH7N4RDYiDK51ZLZer+bMEkkyShNOsF/5oirpt9P/FlUQqmMGqz9IgcgA38coro +g14= +-----END CERTIFICATE----- + +Taiwan GRCA +=========== +-----BEGIN CERTIFICATE----- +MIIFcjCCA1qgAwIBAgIQH51ZWtcvwgZEpYAIaeNe9jANBgkqhkiG9w0BAQUFADA/MQswCQYDVQQG +EwJUVzEwMC4GA1UECgwnR292ZXJubWVudCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4X +DTAyMTIwNTEzMjMzM1oXDTMyMTIwNTEzMjMzM1owPzELMAkGA1UEBhMCVFcxMDAuBgNVBAoMJ0dv +dmVybm1lbnQgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCAiIwDQYJKoZIhvcNAQEBBQAD +ggIPADCCAgoCggIBAJoluOzMonWoe/fOW1mKydGGEghU7Jzy50b2iPN86aXfTEc2pBsBHH8eV4qN +w8XRIePaJD9IK/ufLqGU5ywck9G/GwGHU5nOp/UKIXZ3/6m3xnOUT0b3EEk3+qhZSV1qgQdW8or5 +BtD3cCJNtLdBuTK4sfCxw5w/cP1T3YGq2GN49thTbqGsaoQkclSGxtKyyhwOeYHWtXBiCAEuTk8O +1RGvqa/lmr/czIdtJuTJV6L7lvnM4T9TjGxMfptTCAtsF/tnyMKtsc2AtJfcdgEWFelq16TheEfO +htX7MfP6Mb40qij7cEwdScevLJ1tZqa2jWR+tSBqnTuBto9AAGdLiYa4zGX+FVPpBMHWXx1E1wov +J5pGfaENda1UhhXcSTvxls4Pm6Dso3pdvtUqdULle96ltqqvKKyskKw4t9VoNSZ63Pc78/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un+kbfYNucpllQdSNpc5Oy ++fwC00fmcc4QAu4njIT/rEUNE1yDMuAlpYYsfPQS +-----END CERTIFICATE----- + +Firmaprofesional Root CA +======================== +-----BEGIN CERTIFICATE----- +MIIEVzCCAz+gAwIBAgIBATANBgkqhkiG9w0BAQUFADCBnTELMAkGA1UEBhMCRVMxIjAgBgNVBAcT +GUMvIE11bnRhbmVyIDI0NCBCYXJjZWxvbmExQjBABgNVBAMTOUF1dG9yaWRhZCBkZSBDZXJ0aWZp +Y2FjaW9uIEZpcm1hcHJvZmVzaW9uYWwgQ0lGIEE2MjYzNDA2ODEmMCQGCSqGSIb3DQEJARYXY2FA +ZmlybWFwcm9mZXNpb25hbC5jb20wHhcNMDExMDI0MjIwMDAwWhcNMTMxMDI0MjIwMDAwWjCBnTEL +MAkGA1UEBhMCRVMxIjAgBgNVBAcTGUMvIE11bnRhbmVyIDI0NCBCYXJjZWxvbmExQjBABgNVBAMT +OUF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIEZpcm1hcHJvZmVzaW9uYWwgQ0lGIEE2MjYzNDA2 +ODEmMCQGCSqGSIb3DQEJARYXY2FAZmlybWFwcm9mZXNpb25hbC5jb20wggEiMA0GCSqGSIb3DQEB +AQUAA4IBDwAwggEKAoIBAQDnIwNvbyOlXnjOlSztlB5uCp4Bx+ow0Syd3Tfom5h5VtP8c9/Qit5V +j1H5WuretXDE7aTt/6MNbg9kUDGvASdYrv5sp0ovFy3Tc9UTHI9ZpTQsHVQERc1ouKDAA6XPhUJH +lShbz++AbOCQl4oBPB3zhxAwJkh91/zpnZFx/0GaqUC1N5wpIE8fUuOgfRNtVLcK3ulqTgesrBlf +3H5idPayBQC6haD9HThuy1q7hryUZzM1gywfI834yJFxzJeL764P3CkDG8A563DtwW4O2GcLiam8 +NeTvtjS0pbbELaW+0MOUJEjb35bTALVmGotmBQ/dPz/LP6pemkr4tErvlTcbAgMBAAGjgZ8wgZww +KgYDVR0RBCMwIYYfaHR0cDovL3d3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CAYYw +HQYDVR0hBBYwFDASBgdghXQBUwABBgdghXQBUwABMBIGA1UdEwEB/wQIMAYBAf8CAQcwHwYDVR0j +BBgwFoAUAyUv3m+CATpcLNwroWm1Z9SM0/0wHQYDVR0OBBYEFAMlL95vggE6XCzcK6FptWfUjNP9 +MA0GCSqGSIb3DQEBBQUAA4ICAQA1EMvspgQNDQ/NwNurqPKIlwzfky9NfEBWMXrrpA9gzXrzvsMn +jgM+pN0S734edAY8PzHyHHuRMSG08NBsl9Tpl7IkVh5WwzW9iAUPWxAaZOHHgjD5Mq2eUCzneAXQ +MbFamIp1TpBcahQq4FJHgmDmHtqBsfsUC1rxn9KVuj7QG9YVHaO+htXbD8BJZLsuUBlL0iT43R4H +VtA4oJVwIHaM190e3p9xxCPvgxNcoyQVTSlAPGrEqdi3pkSlDfTgnXceQHAm/NrZNuR55LU/vJtl +vrsRls/bxig5OgjOR1tTWsWZ/l2p3e9M1MalrQLmjAcSHm8D0W+go/MpvRLHUKKwf4ipmXeascCl +OS5cfGniLLDqN2qk4Vrh9VDlg++luyqI54zb/W1elxmofmZ1a3Hqv7HHb6D0jqTsNFFbjCYDcKF3 +1QESVwA12yPeDooomf2xEG9L/zgtYE4snOtnta1J7ksfrK/7DZBaZmBwXarNeNQk7shBoJMBkpxq +nvy5JMWzFYJ+vq6VK+uxwNrjAWALXmmshFZhvnEX/h0TD/7Gh0Xp/jKgGg0TpJRVcaUWi7rKibCy +x/yP2FS1k2Kdzs9Z+z0YzirLNRWCXf9UIltxUvu3yf5gmwBBZPCqKuy2QkPOiWaByIufOVQDJdMW +NY6E0F/6MBr1mmz0DlP5OlvRHA== +-----END CERTIFICATE----- + +DigiCert Assured ID Root CA +=========================== +-----BEGIN CERTIFICATE----- +MIIDtzCCAp+gAwIBAgIQDOfg5RfYRv6P5WD8G/AwOTANBgkqhkiG9w0BAQUFADBlMQswCQYDVQQG +EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3c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vOl77DZypoEd+A5wwzZr8TDRRu838fYxAe ++o0bJW1sj6W3YQGx0qMmoRBxna3iw/nDmVG3KwcIzi7mULKn+gpFL6Lw8g== +-----END CERTIFICATE----- + +DigiCert Global Root CA +======================= +-----BEGIN CERTIFICATE----- +MIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBhMQswCQYDVQQG +EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw +HgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0wNjExMTAwMDAwMDBaFw0zMTExMTAw +MDAwMDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3 +dy5kaWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IENBMIIBIjANBgkq +hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4jvhEXLeqKTTo1eqUKKPC3eQyaKl7hLOllsBCSDMAZOn +TjC3U/dDxGkAV53ijSLdhwZAAIEJzs4bg7/fzTtxRuLWZscFs3YnFo97nh6Vfe63SKMI2tavegw5 +BmV/Sl0fvBf4q77uKNd0f3p4mVmFaG5cIzJLv07A6Fpt43C/dxC//AH2hdmoRBBYMql1GNXRor5H +4idq9Joz+EkIYIvUX7Q6hL+hqkpMfT7PT19sdl6gSzeRntwi5m3OFBqOasv+zbMUZBfHWymeMr/y +7vrTC0LUq7dBMtoM1O/4gdW7jVg/tRvoSSiicNoxBN33shbyTApOB6jtSj1etX+jkMOvJwIDAQAB +o2MwYTAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA95QNVbRTLtm +8KPiGxvDl7I90VUwHwYDVR0jBBgwFoAUA95QNVbRTLtm8KPiGxvDl7I90VUwDQYJKoZIhvcNAQEF +BQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIoyQY/EsrhMAtudXH/vTBH1jLuG2cenTnmCmr +EbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIt +tep3Sp+dWOIrWcBAI+0tKIJFPnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886 +UAb3LujEV0lsYSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk +CAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4= +-----END CERTIFICATE----- + +DigiCert High Assurance EV Root CA +================================== +-----BEGIN CERTIFICATE----- +MIIDxTCCAq2gAwIBAgIQAqxcJmoLQJuPC3nyrkYldzANBgkqhkiG9w0BAQUFADBsMQswCQYDVQQG +EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSsw +KQYDVQQDEyJEaWdpQ2VydCBIaWdoIEFzc3VyYW5jZSBFViBSb290IENBMB4XDTA2MTExMDAwMDAw +MFoXDTMxMTExMDAwMDAwMFowbDELMAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZ +MBcGA1UECxMQd3d3LmRpZ2ljZXJ0LmNvbTErMCkGA1UEAxMiRGlnaUNlcnQgSGlnaCBBc3N1cmFu +Y2UgRVYgUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMbM5XPm+9S75S0t +Mqbf5YE/yc0lSbZxKsPVlDRnogocsF9ppkCxxLeyj9CYpKlBWTrT3JTWPNt0OKRKzE0lgvdKpVMS +OO7zSW1xkX5jtqumX8OkhPhPYlG++MXs2ziS4wblCJEMxChBVfvLWokVfnHoNb9Ncgk9vjo4UFt3 +MRuNs8ckRZqnrG0AFFoEt7oT61EKmEFBIk5lYYeBQVCmeVyJ3hlKV9Uu5l0cUyx+mM0aBhakaHPQ +NAQTXKFx01p8VdteZOE3hzBWBOURtCmAEvF5OYiiAhF8J2a3iLd48soKqDirCmTCv2ZdlYTBoSUe +h10aUAsgEsxBu24LUTi4S8sCAwEAAaNjMGEwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQFMAMB +Af8wHQYDVR0OBBYEFLE+w2kD+L9HAdSYJhoIAu9jZCvDMB8GA1UdIwQYMBaAFLE+w2kD+L9HAdSY +JhoIAu9jZCvDMA0GCSqGSIb3DQEBBQUAA4IBAQAcGgaX3NecnzyIZgYIVyHbIUf4KmeqvxgydkAQ +V8GK83rZEWWONfqe/EW1ntlMMUu4kehDLI6zeM7b41N5cdblIZQB2lWHmiRk9opmzN6cN82oNLFp +myPInngiK3BD41VHMWEZ71jFhS9OMPagMRYjyOfiZRYzy78aG6A9+MpeizGLYAiJLQwGXFK3xPkK +mNEVX58Svnw2Yzi9RKR/5CYrCsSXaQ3pjOLAEFe4yHYSkVXySGnYvCoCWw9E1CAx2/S6cCZdkGCe +vEsXCS+0yx5DaMkHJ8HSXPfqIbloEpw8nL+e/IBcm2PN7EeqJSdnoDfzAIJ9VNep+OkuE6N36B9K +-----END CERTIFICATE----- + +Certplus Class 2 Primary CA +=========================== +-----BEGIN CERTIFICATE----- +MIIDkjCCAnqgAwIBAgIRAIW9S/PY2uNp9pTXX8OlRCMwDQYJKoZIhvcNAQEFBQAwPTELMAkGA1UE +BhMCRlIxETAPBgNVBAoTCENlcnRwbHVzMRswGQYDVQQDExJDbGFzcyAyIFByaW1hcnkgQ0EwHhcN +OTkwNzA3MTcwNTAwWhcNMTkwNzA2MjM1OTU5WjA9MQswCQYDVQQGEwJGUjERMA8GA1UEChMIQ2Vy +dHBsdXMxGzAZBgNVBAMTEkNsYXNzIDIgUHJpbWFyeSBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEP +ADCCAQoCggEBANxQltAS+DXSCHh6tlJw/W/uz7kRy1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TDkRTVCBSb290IENBIFgzMB4X +DTAwMDkzMDIxMTIxOVoXDTIxMDkzMDE0MDExNVowPzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1 +cmUgVHJ1c3QgQ28uMRcwFQYDVQQDEw5EU1QgUm9vdCBDQSBYMzCCASIwDQYJKoZIhvcNAQEBBQAD +ggEPADCCAQoCggEBAN+v6ZdQCINXtMxiZfaQguzH0yxrMMpb7NnDfcdAwRgUi+DoM3ZJKuM/IUmT +rE4Orz5Iy2Xu/NMhD2XSKtkyj4zl93ewEnu1lcCJo6m67XMuegwGMoOifooUMM0RoOEqOLl5CjH9 +UL2AZd+3UWODyOKIYepLYYHsUmu5ouJLGiifSKOeDNoJjj4XLh7dIN9bxiqKqy69cK3FCxolkHRy +xXtqqzTWMIn/5WgTe1QLyNau7Fqckh49ZLOMxt+/yUFw7BZy1SbsOFU5Q9D8/RhcQPGX69Wam40d +utolucbY38EVAjqr2m7xPi71XAicPNaDaeQQmxkqtilX4+U9m5/wAl0CAwEAAaNCMEAwDwYDVR0T +AQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMSnsaR7LHH62+FLkHX/xBVghYkQ +MA0GCSqGSIb3DQEBBQUAA4IBAQCjGiybFwBcqR7uKGY3Or+Dxz9LwwmglSBd49lZRNI+DT69ikug +dB/OEIKcdBodfpga3csTS7MgROSR6cz8faXbauX+5v3gTt23ADq1cEmv8uXrAvHRAosZy5Q6XkjE +GB5YGV8eAlrwDPGxrancWYaLbumR9YbK+rlmM6pZW87ipxZzR8srzJmwN0jP41ZL9c8PDHIyh8bw +RLtTcm1D9SZImlJnt1ir/md2cXjbDaJWFBM5JDGFoqgCWjBH4d1QB7wCCZAA62RjYJsWvIjJEubS +fZGL+T0yjWW06XyxV3bqxbYoOb8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CNTUQ +-----END CERTIFICATE----- + +DST ACES CA X6 +============== +-----BEGIN CERTIFICATE----- +MIIECTCCA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 +5FYrnJmQ6AgwbN99Pe7lv7UkQIRJ4dEorsTCOlMwiPH1d25Ryvr/ma8kXxug/fKshMrfqfBfBC6t +Fr8hlxCBPeP/h40y3JTlR4peahPJlJU90u7INJXQgNStMgiAVDzgvVJT11J8smk/f3rPanTK+gQq +nExaBqXpIK1FZg9p8d2/6eMyi/rgwYZNcjwu2JN4Cir42NInPRmJX1p7ijvMDNpRrscL9yuwNwXs +vFcj4jjSm2jzVhKIT0J8uDHEtdvkyCE06UgRNe76x5JXxZ805Mf29w4LTJxoeHtxMcfrHuBnQfO3 +oKfN5XozNmr6mis= +-----END CERTIFICATE----- + +TURKTRUST Certificate Services Provider Root 1 +============================================== +-----BEGIN CERTIFICATE----- +MIID+zCCAuOgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBtzE/MD0GA1UEAww2VMOcUktUUlVTVCBF +bGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxMQswCQYDVQQGDAJUUjEP +MA0GA1UEBwwGQU5LQVJBMVYwVAYDVQQKDE0oYykgMjAwNSBUw5xSS1RSVVNUIEJpbGdpIMSwbGV0 +acWfaW0gdmUgQmlsacWfaW0gR8O8dmVubGnEn2kgSGl6bWV0bGVyaSBBLsWeLjAeFw0wNTA1MTMx +MDI3MTdaFw0xNTAzMjIxMDI3MTdaMIG3MT8wPQYDVQQDDDZUw5xSS1RSVVNUIEVsZWt0cm9uaWsg +U2VydGlmaWthIEhpem1ldCBTYcSfbGF5xLFjxLFzxLExCzAJBgNVBAYMAlRSMQ8wDQYDVQQHDAZB +TktBUkExVjBUBgNVBAoMTShjKSAyMDA1IFTDnFJLVFJVU1QgQmlsZ2kgxLBsZXRpxZ9pbSB2ZSBC +aWxpxZ9pbSBHw7x2ZW5sacSfaSBIaXptZXRsZXJpIEEuxZ4uMIIBIjANBgkqhkiG9w0BAQEFAAOC +AQ8AMIIBCgKCAQEAylIF1mMD2Bxf3dJ7XfIMYGFbazt0K3gNfUW9InTojAPBxhEqPZW8qZSwu5GX +yGl8hMW0kWxsE2qkVa2kheiVfrMArwDCBRj1cJ02i67L5BuBf5OI+2pVu32Fks66WJ/bMsW9Xe8i +Si9BB35JYbOG7E6mQW6EvAPs9TscyB/C7qju6hJKjRTP8wrgUDn5CDX4EVmt5yLqS8oUBt5CurKZ +8y1UiBAG6uEaPj1nH/vO+3yC6BFdSsG5FOpU2WabfIl9BJpiyelSPJ6c79L1JuTm5Rh8i27fbMx4 +W09ysstcP4wFjdFMjK2Sx+F4f2VsSQZQLJ4ywtdKxnWKWU51b0dewQIDAQABoxAwDjAMBgNVHRME +BTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQAV9VX/N5aAWSGk/KEVTCD21F/aAyT8z5Aa9CEKmu46 +sWrv7/hg0Uw2ZkUd82YCdAR7kjCo3gp2D++Vbr3JN+YaDayJSFvMgzbC9UZcWYJWtNX+I7TYVBxE +q8Sn5RTOPEFhfEPmzcSBCYsk+1Ql1haolgxnB2+zUEfjHCQo3SqYpGH+2+oSN7wBGjSFvW5P55Fy +B0SFHljKVETd96y5y4khctuPwGkplyqjrhgjlxxBKot8KsF8kOipKMDTkcatKIdAaLX/7KfS0zgY +nNN9aV3wxqUeJBujR/xpB2jn5Jq07Q+hh4cCzofSSE7hvP/L8XKSRGQDJereW26fyfJOrN3H +-----END CERTIFICATE----- + +TURKTRUST Certificate Services Provider Root 2 +============================================== +-----BEGIN CERTIFICATE----- +MIIEPDCCAySgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBvjE/MD0GA1UEAww2VMOcUktUUlVTVCBF +bGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxMQswCQYDVQQGEwJUUjEP +MA0GA1UEBwwGQW5rYXJhMV0wWwYDVQQKDFRUw5xSS1RSVVNUIEJpbGdpIMSwbGV0acWfaW0gdmUg +QmlsacWfaW0gR8O8dmVubGnEn2kgSGl6bWV0bGVyaSBBLsWeLiAoYykgS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SZj2GFotHuFEJjOp9zYhys2AzsfAKRO8P +9Qk3iCQOLGsgOqL6EfJANZxEaGM7rDNvY7wsu/LSy3Z9fYjYHcgFHW68lKlmjHdxx/qR+i9Rnuk5 +UrbnBEI= +-----END CERTIFICATE----- + +SwissSign Gold CA - G2 +====================== +-----BEGIN CERTIFICATE----- +MIIFujCCA6KgAwIBAgIJALtAHEP1Xk+wMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNVBAYTAkNIMRUw +EwYDVQQKEwxTd2lzc1NpZ24gQUcxHzAdBgNVBAMTFlN3aXNzU2lnbiBHb2xkIENBIC0gRzIwHhcN +MDYxMDI1MDgzMDM1WhcNMzYxMDI1MDgzMDM1WjBFMQswCQYDVQQGEwJDSDEVMBMGA1UEChMMU3dp +c3NTaWduIEFHMR8wHQYDVQQDExZTd2lzc1NpZ24gR29sZCBDQSAtIEcyMIICIjANBgkqhkiG9w0B +AQEFAAOCAg8AMIICCgKCAgEAr+TufoskDhJuqVAtFkQ7kpJcyrhdhJJCEyq8ZVeCQD5XJM1QiyUq +t2/876LQwB8CJEoTlo8jE+YoWACjR8cGp4QjK7u9lit/VcyLwVcfDmJlD909Vopz2q5+bbqBHH5C +jCA12UNNhPqE21Is8w4ndwtrvxEvcnifLtg+5hg3Wipy+dpikJKVyh+c6bM8K8vzARO/Ws/BtQpg +vd21mWRTuKCWs2/iJneRjOBiEAKfNA+k1ZIzUd6+jbqEemA8atufK+ze3gE/bk3lUIbLtK/tREDF +ylqM2tIrfKjuvqblCqoOpd8FUrdVxyJdMmqXl2MT28nbeTZ7hTpKxVKJ+STnnXepgv9VHKVxaSvR +AiTysybUa9oEVeXBCsdtMDeQKuSeFDNeFhdVxVu1yzSJkvGdJo+hB9TGsnhQ2wwMC3wLjEHXuend +jIj3o02yMszYF9rNt85mndT9Xv+9lz4pded+p2JYryU0pUHHPbwNUMoDAw8IWh+Vc3hiv69yFGkO +peUDDniOJihC8AcLYiAQZzlG+qkDzAQ4embvIIO1jEpWj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W8mw0FfB+j564ZfJ +-----END CERTIFICATE----- + +SwissSign Silver CA - G2 +======================== +-----BEGIN CERTIFICATE----- +MIIFvTCCA6WgAwIBAgIITxvUL1S7L0swDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UEBhMCQ0gxFTAT +BgNVBAoTDFN3aXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWduIFNpbHZlciBDQSAtIEcyMB4X +DTA2MTAyNTA4MzI0NloXDTM2MTAyNTA4MzI0NlowRzELMAkGA1UEBhMCQ0gxFTATBgNVBAoTDFN3 +aXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWduIFNpbHZlciBDQSAtIEcyMIICIjANBgkqhkiG +9w0BAQEFAAOCAg8AMIICCgKCAgEAxPGHf9N4Mfc4yfjDmUO8x/e8N+dOcbpLj6VzHVxumK4DV644 +N0MvFz0fyM5oEMF4rhkDKxD6LHmD9ui5aLlV8gREpzn5/ASLHvGiTSf5YXu6t+WiE7brYT7QbNHm ++/pe7R20nqA1W6GSy/BJkv6FCgU+5tkL4k+73JU3/JHpMjUi0R86TieFnbAVlDLaYQ1HTWBCrpJH +6INaUFjpiou5XaHc3ZlKHzZnu0jkg7Y360g6rw9njxcH6ATK72oxh9TAtvmUcXtnZLi2kUpCe2Uu +MGoM9ZDulebyzYLs2aFK7PayS+VFheZteJMELpyCbTapxDFkH4aDCyr0NQp4yVXPQbBH6TCfmb5h +qAaEuSh6XzjZG6k4sIN/c8HDO0gqgg8hm7jMqDXDhBuDsz6+pJVpATqJAHgE2cn0mRmrVn5bi4Y5 +FZGkECwJMoBgs5PAKrYYC51+jUnyEEp/+dVGLxmSo5mnJqy7jDzmDrxHB9xzUfFwZC8I+bRHHTBs +ROopN4WSaGa8gzj+ezku01DwH/teYLappvonQfGbGHLy9YR0SslnxFSuSGTfjNFusB3hB48IHpmc +celM2KX3RxIfdNFRnobzwqIjQAtz20um53MGjMGg6cFZrEb65i/4z3GcRm25xBWNOHkDRUjvxF3X +CO6HOSKGsg0PWEP3calILv3q1h8CAwEAAaOBrDCBqTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/ +BAUwAwEB/zAdBgNVHQ4EFgQUF6DNweRBtjpbO8tFnb0cwpj6hlgwHwYDVR0jBBgwFoAUF6DNweRB +tjpbO8tFnb0cwpj6hlgwRgYDVR0gBD8wPTA7BglghXQBWQEDAQEwLjAsBggrBgEFBQcCARYgaHR0 +cDovL3JlcG9zaXRvcnkuc3dpc3NzaWduLmNvbS8wDQYJKoZIhvcNAQEFBQADggIBAHPGgeAn0i0P +4JUw4ppBf1AsX19iYamGamkYDHRJ1l2E6kFSGG9YrVBWIGrGvShpWJHckRE1qTodvBqlYJ7YH39F +kWnZfrt4csEGDyrOj4VwYaygzQu4OSlWhDJOhrs9xCrZ1x9y7v5RoSJBsXECYxqCsGKrXlcSH9/L +3XWgwF15kIwb4FDm3jH+mHtwX6WQ2K34ArZv02DdQEsixT2tOnqfGhpHkXkzuoLcMmkDlm4fS/Bx +/uNncqCxv1yL5PqZIseEuRuNI5c/7SXgz2W79WEE790eslpBIlqhn10s6FvJbakMDHiqYMZWjwFa +DGi8aRl5xB9+lwW/xekkUV7U1UtT7dkjWjYDZaPBA61BMPNGG4WQr2W11bHkFlt4dR2Xem1ZqSqP +e97Dh4kQmUlzeMg9vVE1dCrV8X5pGyq7O70luJpaPXJhkGaH7gzWTdQRdAtq/gsD/KNVV4n+Ssuu +WxcFyPKNIzFTONItaj+CuY0IavdeQXRuwxF+B6wpYJE/OMpXEA29MC/HpeZBoNquBYeaoKRlbEwJ +DIm6uNO5wJOKMPqN5ZprFQFOZ6raYlY+hAhm0sQ2fac+EPyI4NSA5QC9qvNOBqN6avlicuMJT+ub +DgEj8Z+7fNzcbBGXJbLytGMU0gYqZ4yD9c7qB9iaah7s5Aq7KkzrCWA5zspi2C5u +-----END CERTIFICATE----- + +GeoTrust Primary Certification Authority +======================================== +-----BEGIN CERTIFICATE----- +MIIDfDCCAmSgAwI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Bn6zL9yZJclNqFwJu/U30rCfSMnZEfl2pSy94JNqR32HuHUETVPm4p +afs5SSYeCaWAe0At6+gnhcn+Yf1+5nyXHdWdAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYD +VR0PAQH/BAQDAgEGMB0GA1UdDgQWBBR7W0XPr87Lev0xkhpqtvNG61dIUDANBgkqhkiG9w0BAQUF +AAOCAQEAeRHAS7ORtvzw6WfUDW5FvlXok9LOAz/t2iWwHVfLHjp2oEzsUHboZHIMpKnxuIvW1oeE +uzLlQRHAd9mzYJ3rG9XRbkREqaYB7FViHXe4XI5ISXycO1cRrK1zN44veFyQaEfZYGDm/Ac9IiAX +xPcW6cTYcvnIc3zfFi8VqT79aie2oetaupgf1eNNZAqdE8hhuvU5HIe6uL17In/2/qxAeeWsEG89 +jxt5dovEN7MhGITlNgDrYyCZuen+MwS7QcjBAvlEYyCegc5C09Y/LHbTY5xZ3Y+m4Q6gLkH3LpVH +z7z9M/P2C2F+fpErgUfCJzDupxBdN49cOSvkBPB7jVaMaA== +-----END CERTIFICATE----- + +VeriSign Class 3 Public Primary Certification Authority - G5 +============================================================ +-----BEGIN CERTIFICATE----- +MIIE0zCCA7ugAwIBAgIQGNrRniZ96LtKIVjNzGs7SjANBgkqhkiG9w0BAQUFADCByjELMAkGA1UE +BhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBO +ZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVk +IHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRp +ZmljYXRpb24gQXV0aG9yaXR5IC0gRzUwHhcNMDYxMTA4MDAwMDAwWhcNMzYwNzE2MjM1OTU5WjCB +yjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJ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Xr9qXBkqPFwqcIYA1gBBCWeZ4WNOaptvolRTnIHmX5k/Wq8VLcmZg9pYYaDDUz+kulBAYV +HDGA76oYa8J719rO+TMg1fW9ajMtgQT7sFzUnKPiXB3jqUJ1XnvUd+85VLrJChgbEplJL4hL/VBi +0XPnj3pDAgMBAAGjgZ0wgZowEwYJKwYBBAGCNxQCBAYeBABDAEEwCwYDVR0PBAQDAgGGMA8GA1Ud +EwEB/wQFMAMBAf8wHQYDVR0OBBYEFK9EBMJBfkiD2045AuzshHrmzsmkMDQGA1UdHwQtMCswKaAn +oCWGI2h0dHA6Ly9jcmwuc2VjdXJldHJ1c3QuY29tL1NHQ0EuY3JsMBAGCSsGAQQBgjcVAQQDAgEA +MA0GCSqGSIb3DQEBBQUAA4IBAQBjGghAfaReUw132HquHw0LURYD7xh8yOOvaliTFGCRsoTciE6+ +OYo68+aCiV0BN7OrJKQVDpI1WkpEXk5X+nXOH0jOZvQ8QCaSmGwb7iRGDBezUqXbpZGRzzfTb+cn +CDpOGR86p1hcF895P4vkp9MmI50mD1hp/Ed+stCNi5O/KU9DaXR2Z0vPB4zmAve14bRDtUstFJ/5 +3CYNv6ZHdAbYiNE6KTCEztI5gGIbqMdXSbxqVVFnFUq+NQfk1XWYN3kwFNspnWzFacxHVaIw98xc +f8LDmBxrThaA63p4ZUWiABqvDA1VZDRIuJK58bRQKfJPIx/abKwfROHdI3hRW8cW +-----END CERTIFICATE----- + +COMODO Certification Authority +============================== +-----BEGIN CERTIFICATE----- +MIIEHTCCAwWgAwIBAgIQToEtioJl4AsC7j41AkblPTANBgkqhkiG9w0BAQUFADCBgTELMAkGA1UE +BhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgG +A1UEChMRQ09NT0RPIENBIExpbWl0ZWQxJzAlBgNVBAMTHkNPTU9ETyBDZXJ0aWZpY2F0aW9uIEF1 +dGhvcml0eTAeFw0wNjEyMDEwMDAwM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9P4SNVbfo5azV8fUZVqZa+5Acr5Pr5RzUZ5ddBA6+C4OmF4O5MBKgxTMVBbkN ++8cFduPYSo38NBejxiEovjBFMR7HeL5YYTisO+IBZQ== +-----END CERTIFICATE----- + +Network Solutions Certificate Authority +======================================= +-----BEGIN CERTIFICATE----- +MIID5jCCAs6gAwIBAgIQV8szb8JcFuZHFhfjkDFo4DANBgkqhkiG9w0BAQUFADBiMQswCQYDVQQG +EwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMuMTAwLgYDVQQDEydOZXR3b3Jr +IFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNMDYxMjAxMDAwMDAwWhcNMjkxMjMx +MjM1OTU5WjBiMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMu +MTAwLgYDVQQDEydOZXR3b3JrIFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggEiMA0G +CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDkvH6SMG3G2I4rC7xGzuAnlt7e+foS0zwzc7MEL7xx +jOWftiJgPl9dzgn/ggwbmlFQGiaJ3dVhXRncEg8tCqJDXRfQNJIg6nPPOCwGJgl6cvf6UDL4wpPT +aaIjzkGxzOTVHzbRijr4jGPiFFlp7Q3Tf2vouAPlT2rlmGNpSAW+Lv8ztumXWWn4Zxmuk2GWRBXT +crA/vGp97Eh/jcOrqnErU2lBUzS1sLnFBgrEsEX1QV1uiUV7PTsmjHTC5dLRfbIR1PtYMiKagMnc +/Qzpf14Dl847ABSHJ3A4qY5usyd2mFHgBeMhqxrVhSI8KbWaFsWAqPS7azCPL0YCorEMIuDTAgMB +AAGjgZcwgZQwHQYDVR0OBBYEFCEwyfsA106Y2oeqKtCnLrFAMadMMA4GA1UdDwEB/wQEAwIBBjAP +BgNVHRMBAf8EBTADAQH/MFIGA1UdHwRLMEkwR6BFoEOGQWh0dHA6Ly9jcmwubmV0c29sc3NsLmNv +bS9OZXR3b3JrU29sdXRpb25zQ2VydGlmaWNhdGVBdXRob3JpdHkuY3JsMA0GCSqGSIb3DQEBBQUA +A4IBAQC7rkvnt1frf6ott3NHhWrB5KUd5Oc86fRZZXe1eltajSU24HqXLjjAV2CDmAaDn7l2em5Q +4LqILPxFzBiwmZVRDuwduIj/h1AcgsLj4DKAv6ALR8jDMe+ZZzKATxcheQxpXN5eNK4CtSbqUN9/ +GGUsyfJj4akH/nxxH2szJGoeBfcFaMBqEssuXmHLrijTfsK0ZpEmXzwuJF/LWA/rKOyvEZbz3Htv +wKeI8lN3s2Berq4o2jUsbzRF0ybh3uxbTydrFny9RAQYgrOJeRcQcT16ohZO9QHNpGxlaKFJdlxD +ydi8NmdspZS11My5vWo1ViHe2MPr+8ukYEywVaCge1ey +-----END CERTIFICATE----- + +WellsSecure Public Root Certificate Authority +============================================= +-----BEGIN CERTIFICATE----- +MIIEvTCCA6WgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBhTELMAkGA1UEBhMCVVMxIDAeBgNVBAoM +F1dlbGxzIEZhcmdvIFdlbGxzU2VjdXJlMRwwGgYDVQQLDBNXZWxscyBGYXJnbyBCYW5rIE5BMTYw +NAYDVQQDDC1XZWxsc1NlY3VyZSBQdWJsaWMgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcN +MDcxMjEzMTcwNzU0WhcNMjIxMjE0MDAwNzU0WjCBhTELMAkGA1UEBhMCVVMxIDAeBgNVBAoMF1dl +bGxzIEZhcmdvIFdlbGxzU2VjdXJlMRwwGgYDVQQLDBNXZWxscyBGYXJnbyBCYW5rIE5BMTYwNAYD +VQQDDC1XZWxsc1NlY3VyZSBQdWJsaWMgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggEiMA0G +CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDub7S9eeKPCCGeOARBJe+rWxxTkqxtnt3CxC5FlAM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ULB6ouFJJJ +tylv2G0xffX8oRAHh84vWdw+WNs= +-----END CERTIFICATE----- + +COMODO ECC Certification Authority +================================== +-----BEGIN CERTIFICATE----- +MIICiTCCAg+gAwIBAgIQH0evqmIAcFBUTAGem2OZKjAKBggqhkjOPQQDAzCBhTELMAkGA1UEBhMC +R0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UE +ChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBB +dXRob3JpdHkwHhcNMDgwMzA2MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMCR0Ix +GzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMR +Q09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBBdXRo +b3JpdHkwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQDR3svdcmCFYX7deSRFtSrYpn1PlILBs5BAH+X +4QokPB0BBO490o0JlwzgdeT6+3eKKvUDYEs2ixYjFq0JcfRK9ChQtP6IHG4/bC8vCVlbpVsLM5ni +wz2J+Wos77LTBumjQjBAMB0GA1UdDgQWBBR1cacZSBm8nZ3qQUfflMRId5nTeTAOBgNVHQ8BAf8E +BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNoADBlAjEA7wNbeqy3eApyt4jf/7VG +FAkK+qDmfQjGGoe9GKhzvSbKYAydzpmfz1wPMOG+FDHqAjAU9JM8SaczepBGR7NjfRObTrdvGDeA +U/7dIOA1mjbRxwG55tzd8/8dLDoWV9mSOdY= +-----END CERTIFICATE----- + +IGC/A +===== +-----BEGIN CERTIFICATE----- +MIIEAjCCAuqgAwIBAgIFORFFEJQwDQYJKoZ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HE4RK +q89toB9RlPhJy3Q2FLwV3duJL92PoF189RLrn544pEfMs5bZvpwlqwN+Mw+VgQ39FuCIvjfwbF3Q +MZsyK10XZZOYYLxuj7GoPB7ZHPOpJkL5ZB3C55L29B5aqhlSXa/oovdgoPaN8In1buAKBQGVyYsg +Crpa/JosPL3Dt8ldeCUFP1YUmwza+zpI/pdpXsoQhvdOlgQITeywvl3cO45Pwf2aNjSaTFR+FwNI +lQgRHAdvhQh+XU3Endv7rs6y0bO4g2wdsrN58dhwmX7wEwLOXt1R0982gaEbeC9xs/FZTEYYKKuF +0mBWWg== +-----END CERTIFICATE----- + +Security Communication EV RootCA1 +================================= +-----BEGIN CERTIFICATE----- +MIIDfTCCAmWgAwIBAgIBADANBgkqhkiG9w0BAQUFADBgMQswCQYDVQQGEwJKUDElMCMGA1UEChMc +U0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEqMCgGA1UECxMhU2VjdXJpdHkgQ29tbXVuaWNh +dGlvbiBFViBSb290Q0ExMB4XDTA3MDYwNjAyMTIzMloXDTM3MDYwNjAyMTIzMlowYDELMAkGA1UE +BhMCSlAxJTAjBgNVBAoTHFNFQ09NIFRydXN0IFN5c3RlbXMgQ08uLExURC4xKjAoBgNVBAsTIVNl +Y3VyaXR5IENvbW11bmljYXRpb24gRVYgUm9vdENBMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC +AQoCggEBALx/7FebJOD+nLpCeamIivqA4PUHKUPqjgo0No0c+qe1OXj/l3X3L+SqawSERMqm4miO +/VVQYg+kcQ7OBzgtQoVQrTyWb4vVog7P3kmJPdZkLjjlHmy1V4qe70gOzXppFodEtZDkBp2uoQSX +WHnvIEqCa4wiv+wfD+mEce3xDuS4GBPMVjZd0ZoeUWs5bmB2iDQL87PRsJ3KYeJkHcFGB7hj3R4z +ZbOOCVVSPbW9/wfrrWFVGCypaZhKqkDFMxRldAD5kd6vA0jFQFTcD4SQaCDFkpbcLuUCRarAX1T4 +bepJz11sS6/vmsJWXMY1VkJqMF/Cq/biPT+zyRGPMUzXn0kCAwEAAaNCMEAwHQYDVR0OBBYEFDVK +9U2vP9eCOKyrcWUXdYydVZPmMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqG +SIb3DQEBBQUAA4IBAQCoh+ns+EBnXcPBZsdAS5f8hxOQWsTvoMpfi7ent/HWtWS3irO4G8za+6xm +iEHO6Pzk2x6Ipu0nUBsCMCRGef4Eh3CXQHPRwMFXGZpppSeZq51ihPZRwSzJIxXYKLerJRO1RuGG +Av8mjMSIkh1W/hln8lXkgKNrnKt34VFxDSDbEJrbvXZ5B3eZKK2aXtqxT0QsNY6llsf9g/BYxnnW +mHyojf6GPgcWkuF75x3sM3Z+Qi5KhfmRiWiEA4Glm5q+4zfFVKtWOxgtQaQM+ELbmaDgcm+7XeEW +T1MKZPlO9L9OVL14bIjqv5wTJMJwaaJ/D8g8rQjJsJhAoyrniIPtd490 +-----END CERTIFICATE----- + +OISTE WISeKey Global Root GA CA +=============================== +-----BEGIN CERTIFICATE----- +MIID8TCCAtmgAwIBAgIQQT1yx/RrH4FDffHSKFTfmjANBgkqhkiG9w0BAQUFADCBijELMAkGA1UE +BhMCQ0gxEDAOBgNVBAoTB1dJU2VLZXkxGzAZBgNVBAsTEkNvcHlyaWdodCAoYykgMjAwNTEiMCAG +A1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNlZDEoMCYGA1UEAxMfT0lTVEUgV0lTZUtleSBH +bG9iYWwgUm9vdCBHQSBDQTAeFw0wNTEyMTExNjAzNDRaFw0zNzEyMTExNjA5NTFaMIGKMQswCQYD +VQQGEwJDSDEQMA4GA1UEChMHV0lTZUtleTEbMBkGA1UECxMSQ29weXJpZ2h0IChjKSAyMDA1MSIw +IAYDVQQLExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5 +IEdsb2JhbCBSb290IEdBIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAy0+zAJs9 +Nt350UlqaxBJH+zYK7LG+DKBKUOVTJoZIyEVRd7jyBxRVVuuk+g3/ytr6dTqvirdqFEr12bDYVxg +Asj1znJ7O7jyTmUIms2kahnBAbtzptf2w93NvKSLtZlhuAGio9RN1AU9ka34tAhxZK9w8RxrfvbD +d50kc3vkDIzh2TbhmYsFmQvtRTEJysIA2/dyoJaqlYfQjse2YXMNdmaM3Bu0Y6Kff5MTMPGhJ9vZ +/yxViJGg4E8HsChWjBgbl0SOid3gF27nKu+POQoxhILYQBRJLnpB5Kf+42TMwVlxSywhp1t94B3R +LoGbw9ho972WG6xwsRYUC9tguSYBBQIDAQABo1EwTzALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUw +AwEB/zAdBgNVHQ4EFgQUswN+rja8sHnR3JQmthG+IbJphpQwEAYJKwYBBAGCNxUBBAMCAQAwDQYJ +KoZIhvcNAQEFBQADggEBAEuh/wuHbrP5wUOxSPMowB0uyQlB+pQAHKSkq0lPjz0e701vvbyk9vIm +MMkQyh2I+3QZH4VFvbBsUfk2ftv1TDI6QU9bR8/oCy22xBmddMVHxjtqD6wU2zz0c5ypBd8A3HR4 ++vg1YFkCExh8vPtNsCBtQ7tgMHpnM1zFmdH4LTlSc/uMqpclXHLZCB6rTjzjgTGfA6b7wP4piFXa +hNVQA7bihKOmNqoROgHhGEvWRGizPflTdISzRpFGlgC3gCy24eMQ4tui5yiPAZZiFj4A4xylNoEY +okxSdsARo27mHbrjWr42U8U+dY+GaSlYU7Wcu2+fXMUY7N0v4ZjJ/L7fCg0= +-----END CERTIFICATE----- + +Microsec e-Szigno Root CA +========================= +-----BEGIN CERTIFICATE----- +MIIHqDCCBpCgAwIBAgIRAMy4579OKRr9otxmpRwsDxEwDQYJKoZIhvcNAQEFBQAwcjELMAkGA1UE +BhMCSFUxETAPBgNVBAcTCEJ1ZGFwZXN0MRYwFAYDVQQKEw1NaWNyb3NlYyB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uZXMgZGUgZ2FyYW507WFzIGRlIGVzdGUgY2VydGlmaWNhZG8gc2Ug +cHVlZGVuIGVuY29udHJhciBlbiBsYSBEUEMuMA0GCSqGSIb3DQEBBQUAA4ICAQBclLW4RZFNjmEf +AygPU3zmpFmps4p6xbD/CHwso3EcIRNnoZUSQDWDg4902zNc8El2CoFS3UnUmjIz75uny3XlesuX +EpBcunvFm9+7OSPI/5jOCk0iAUgHforA1SBClETvv3eiiWdIG0ADBaGJ7M9i4z0ldma/Jre7Ir5v +/zlXdLp6yQGVwZVR6Kss+LGGIOk/yzVb0hfpKv6DExdA7ohiZVvVO2Dpezy4ydV/NgIlqmjCMRW3 +MGXrfx1IebHPOeJCgBbT9ZMj/EyXyVo3bHwi2ErN0o42gzmRkBDI8ck1fj+404HGIGQatlDCIaR4 +3NAvO2STdPCWkPHv+wlaNECW8DYSwaN0jJN+Qd53i+yG2dIPPy3RzECiiWZIHiCznCNZc6lEc7wk +eZBWN7PGKX6jD/EpOe9+XCgycDWs2rjIdWb8m0w5R44bb5tNAlQiM+9hup4phO9OSzNHdpdqy35f +/RWmnkJDW2ZaiogN9xa5P1FlK2Zqi9E4UqLWRhH6/JocdJ6PlwsCT2TG9WjTSy3/pDceiz+/RL5h +RqGEPQgnTIEgd4kI6mdAXmwIUV80WoyWaM3X94nCHNMyAK9Sy9NgWyo6R35rMDOhYil/SrnhLecU +Iw4OGEfhefwVVdCx/CVxY3UzHCMrr1zZ7Ud3YA47Dx7SwNxkBYn8eNZcLCZDqQ== +-----END CERTIFICATE----- + +TC TrustCenter Class 2 CA II +============================ +-----BEGIN CERTIFICATE----- +MIIEqjCCA5KgAwIBAgIOLmoAAQACH9dSISwRXDswDQYJKoZIhvcNAQEFBQAwdjELMAkGA1UEBhMC +REUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxIjAgBgNVBAsTGVRDIFRydXN0Q2VudGVy +IENsYXNzIDIgQ0ExJTAjBgNVBAMTHFRDIFRydXN0Q2V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CAQEAjNfffu4bgBCzg/XbEeprS6iSGNn3Bzn1LL4G +dXpoUxUc6krtXvwjshOg0wn/9vYua0Fxec3ibf2uWWuFHbhOIprtZjluS5TmVfwLG4t3wVMTZonZ +KNaL80VKY7f9ewthXbhtvsPcW3nS7Yblok2+XnR8au0WOB9/WIFaGusyiC2y8zl3gK9etmF1Kdsj +TYjKUCjLhdLTEKJZbtOTVAB6okaVhgWcqRmY5TFyDADiZ9lA4CQze28suVyrZZ0srHbqNZn1l7kP +JOzHdiEoZa5X6AeIdUpWoNIFOqTmjZKILPPy4cHGYdtBxceb9w4aUUXCYWvcZCcXjFq32nQozZfk +vQ== +-----END CERTIFICATE----- + +TC TrustCenter Class 3 CA II +============================ +-----BEGIN CERTIFICATE----- +MIIEqjCCA5KgAwIBAgIOSkcAAQAC5aBd1j8AUb8wDQYJKoZIhvcNAQEFBQAwdjELMAkGA1UEBhMC +REUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxIjAgBgNVBAsTGVRDIFRydXN0Q2VudGVy +IENsYXNzIDMgQ0ExJTAjBgNVBAMTHFRDIFRydXN0Q2VudGVyIENsYXNzIDMgQ0EgSUkwHhcNMDYw +MTEyMTQ0MTU3WhcNMjUxMjMxMjI1OTU5WjB2MQswCQYDVQQGEwJERTEcMBoGA1UEChMTVEMgVHJ1 +c3RDZW50ZXIgR21iSDEiMCAGA1UECxMZVEMgVHJ1c3RDZW50ZXIgQ2xhc3MgMyBDQTElMCMGA1UE +AxMcVEMgVHJ1c3RDZW50ZXIgQ2xhc3MgMyBDQSBJSTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC +AQoCggEBALTgu1G7OVyLBMVMeRwjhjEQY0NVJz/GRcekPewJDRoeIMJWHt4bNwcwIi9v8Qbxq63W +yKthoy9DxLCyLfzDlml7forkzMA5EpBCYMnMNWju2l+QVl/NHE1bWEnrDgFPZPosPIlY2C8u4rBo +6SI7dYnWRBpl8huXJh0obazovVkdKyT21oQDZogkAHhg8fir/gKya/si+zXmFtGt9i4S5Po1auUZ +uV3bOx4a+9P/FRQI2AlqukWdFHlgfa9Aigdzs5OW03Q0jTo3Kd5c7PXuLjHCINy+8U9/I1LZW+Jk +2ZyqBwi1Rb3R0DHBq1SfqdLDYmAD8bs5SpJKPQq5ncWg/jcCAwEAAaOCATQwggEwMA8GA1UdEwEB +/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBTUovyfs8PYA9NXXAek0CSnwPIA1DCB +7QYDVR0fBIHlMIHiMIHfoIHcoIHZhjVodHRwOi8vd3d3LnRydXN0Y2VudGVyLmRlL2NybC92Mi90 +Y19jbGFzc18zX2NhX0lJLmNybIaBn2xkYXA6Ly93d3cudHJ1c3RjZW50ZXIuZGUvQ049VEMlMjBU +cnVzdENlbnRlciUyMENsYXNzJTIwMyUyMENBJTIwSUksTz1UQyUyMFRydXN0Q2VudGVyJTIwR21i +SCxPVT1yb290Y2VydHMsREM9dHJ1c3RjZW50ZXIsREM9ZGU/Y2VydGlmaWNhdGVSZXZvY2F0aW9u +TGlzdD9iYXNlPzANBgkqhkiG9w0BAQUFAAOCAQEANmDkcPcGIEPZIxpC8vijsrlNirTzwppVMXzE +O2eatN9NDoqTSheLG43KieHPOh6sHfGcMrSOWXaiQYUlN6AT0PV8TtXqluJucsG7Kv5sbviRmEb8 +yRtXW+rIGjs/sFGYPAfaLFkB2otE6OF0/ado3VS6g0bsyEa1+K+XwDsJHI/OcpY9M1ZwvJbL2NV9 +IJqDnxrcOfHFcqMRA/07QlIp2+gB95tejNaNhk4Z+rwcvsUhpYeeeC422wlxo3I0+GzjBgnyXlal +092Y+tTmBvTwtiBjS+opvaqCZh77gaqnN60TGOaSw4HBM7uIHqHn4rS9MWwOUT1v+5ZWgOI2F9Hc +5A== +-----END CERTIFICATE----- + +TC TrustCenter Universal CA I +============================= +-----BEGIN CERTIFICATE----- +MIID3TCCAsWgAwIBAgIOHaIAAQAC7LdggHiNtgYwDQYJKoZI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n8aEt2hojnczd7Dwtnic0XQ/CNnm8yUpiLe1r2X1BQ3y2qsrtYbE3 +ghUJGooWMNjsydZHcnhLEEYUjl8Or+zHL6sQ17bxbuyGssLoDZJz3KL0Dzq/YSMQiZxIQG5wALPT +ujdEWBF6AmqI8Dc08BnprNRlc/ZpjGSUOnmFKbAWKwyCPwacx/0QK54PLLae4xW/2TYcuiUaUj0a +7CIMHOCkoj3w6DnPgcB77V0fb8XQC9eY +-----END CERTIFICATE----- + +Deutsche Telekom Root CA 2 +========================== +-----BEGIN CERTIFICATE----- +MIIDnzCCAoegAwIBAgIBJjANBgkqhkiG9w0BAQUFADBxMQswCQYDVQQGEwJERTEcMBoGA1UEChMT +RGV1dHNjaGUgVGVsZWtvbSBBRzEfMB0GA1UECxMWVC1UZWxlU2VjIFRydXN0IENlbnRlcjEjMCEG +A1UEAxMaRGV1dHNjaGUgVGVsZWtvbSBSb290IENBIDIwHhcNOTkwNzA5MTIxMTAwWhcNMTkwNzA5 +MjM1OTAwWjBxMQswCQYDVQQGEwJERTEcMBoGA1UEChMTRGV1dHNjaGUgVGVsZWtvbSBBRzEfMB0G +A1UECxMWVC1UZWxlU2VjIFRydXN0IENlbnRlcjEjMCEGA1UEAxMaRGV1dHNjaGUgVGVsZWtvbSBS +b290IENBIDIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCrC6M14IspFLEUha88EOQ5 +bzVdSq7d6mGNlUn0b2SjGmBmpKlAIoTZ1KXleJMOaAGtuU1cOs7TuKhCQN/Po7qCWWqSG6wcmtoI +KyUn+WkjR/Hg6yx6m/UTAtB+NHzCnjwAWav12gz1MjwrrFDa1sPeg5TKqAyZMg4ISFZbavva4VhY +AUlfckE8FQYBjl2tqriTtM2e66foai1SNNs671x1Udrb8zH57nGYMsRUFUQM+ZtV7a3fGAigo4aK +Se5TBY8ZTNXeWHmb0mocQqvF1afPaA+W5OFhmHZhyJF81j4A4pFQh+GdCuatl9Idxjp9y7zaAzTV +jlsB9WoHtxa2bkp/AgMBAAGjQjBAMB0GA1UdDgQWBBQxw3kbuvVT1xfgiXotF2wKsyudMzAPBgNV +HRMECDAGAQH/AgEFMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOCAQEAlGRZrTlk5ynr +E/5aw4sTV8gEJPB0d8Bg42f76Ymmg7+Wgnxu1MM9756AbrsptJh6sTtU6zkXR34ajgv8HzFZMQSy +zhfzLMdiNlXiItiJVbSYSKpk+tYcNthEeFpaIzpXl/V6ME+un2pMSyuOoAPjPuCp1NJ70rOo4nI8 +rZ7/gFnkm0W09juwzTkZmDLl6iFhkOQxIY40sfcvNUqFENrnijchvllj4PKFiDFT1FQUhXB59C4G +dyd1Lx+4ivn+xbrYNuSD7Odlt79jWvNGr4GUN9RBjNYj1h7P9WgbRGOiWrqnNVmh5XAFmw4jV5mU +Cm26OWMohpLzGITY+9HPBVZkVw== +-----END CERTIFICATE----- + +ComSign Secured CA +================== +-----BEGIN CERTIFICATE----- +MIIDqzCCApOgAwIBAgIRAMcoRwmzuGxFjB36JPU2TukwDQYJKoZIhvcNAQEFBQAwPDEbMBkGA1UE +AxMSQ29tU2lnbiBTZWN1cmVkIENBMRAwDgYDVQQKEwdDb21TaWduMQswCQYDVQQGEwJJTDAeFw0w +NDAzMjQxMTM3MjBaFw0yOTAzMTYxNTA0NTZaMDwxGzAZBgNVBAMTEkNvbVNpZ24gU2VjdXJlZCBD +QTEQMA4GA1UEChMHQ29tU2lnbjELMAkGA1UEBhMCSUwwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw +ggEKAoIBAQDGtWhfHZQVw6QIVS3joFd67+l0Kru5fFdJGhFeTymHDEjWaueP1H5XJLkGieQcPOqs +49ohgHMhCu95mGwfCP+hUH3ymBvJVG8+pSjsIQQPRbsHPaHA+iqYHU4Gk/v1iDurX8sWv+bznkqH +7Rnqwp9D5PGBpX8QTz7RSmKtUxvLg/8HZaWSLWapW7ha9B20IZFKF3ueMv5WJDmyVI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2JhbCBSb290MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA ++Mi8vRRQZhP/8NN57CPytxrHjoXxEnOmGaoQ25yiZXRadz5RfVb23CO21O1fWLE3TdVJDm71aofW +0ozSJ8bi/zafmGWgE07GKmSb1ZASzxQG9Dvj1Ci+6A74q05IlG2OlTEQXO2iLb3VOm2yHLtgwEZL +AfVJrn5GitB0jaEMAs7u/OePuGtm839EAL9mJRQr3RAwHQeWP032a7iPt3sMpTjr3kfb1V05/Iin +89cqdPHoWqI7n1C6poxFNcJQZZXcY4Lv3b93TZxiyWNzFtApD0mpSPCzqrdsxacwOUBdrsTiXSZT +8M4cIwhhqJQZugRiQOwfOHB3EgZxpzAYXSUnpQIDAQABo4GlMIGiMA4GA1UdDwEB/wQEAwIBBjAP +BgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBS2CHsNesysIEyGVjJez6tuhS1wVzA/BgNVHR8EODA2 +MDSgMqAwhi5odHRwOi8vd3d3Mi5wdWJsaWMtdHJ1c3QuY29tL2NybC9jdC9jdHJvb3QuY3JsMB8G +A1UdIwQYMBaAFLYIew16zKwgTIZWMl7Pq26FLXBXMA0GCSqGSIb3DQEBBQUAA4IBAQBW7wojoFRO +lZfJ+InaRcHUowAl9B8Tq7ejhVhpwjCt2BWKLePJzYFa+HMjWqd8BfP9IjsO0QbE2zZMcwSO5bAi +5MXzLqXZI+O4Tkogp24CJJ8iYGd7ix1yCcUxXOl5n4BHPa2hCwcUPUf/A2kaDAtE52Mlp3+yybh2 +hO0j9n0Hq0V+09+zv+mKts2oomcrUtW3ZfA5TGOgkXmTUg9U3YO7n9GPp1Nzw8v/MOx8BLjYRB+T +X3EJIrduPuocA06dGiBh+4E37F78CkWr1+cXVdCg6mCbpvbjjFspwgZgFJ0tl0ypkxWdYcQBX0jW +WL1WMRJOEcgh4LMRkWXbtKaIOM5V +-----END CERTIFICATE----- + +ePKI Root Certification Authority +================================= +-----BEGIN CERTIFICATE----- +M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SSnUmjDhDXi +Zo1jDiVN1Rmy5nk3pyKdVDECAwEAAaNqMGgwHQYDVR0OBBYEFB4M97Zn8uGSJglFwFU5Lnc/Qkqi +MAwGA1UdEwQFMAMBAf8wOQYEZyoHAAQxMC8wLQIBADAJBgUrDgMCGgUAMAcGBWcqAwAABBRFsMLH +ClZ87lt4DJX5GFPBphzYEDANBgkqhkiG9w0BAQUFAAOCAgEACbODU1kBPpVJufGBuvl2ICO1J2B0 +1GqZNF5sAFPZn/KmsSQHRGoqxqWOeBLoR9lYGxMqXnmbnwoqZ6YlPwZpVnPDimZI+ymBV3QGypzq +KOg4ZyYr8dW1P2WT+DZdjo2NQCCHGervJ8A9tDkPJXtoUHRVnAxZfVo9QZQlUgjgRywVMRnVvwdV +xrsStZf0X4OFunHB2WyBEXYKCrC/gpf36j36+uwtqSiUO1bd0lEursC9CBWMd1I0ltabrNMdjmEP +NXubrjlpC2JgQCA2j6/7Nu4tCEoduL+bXPjqpRugc6bY+G7gMwRfaKonh+3ZwZCc7b3jajWvY9+r +GNm65ulK6lCKD2GTHuItGeIwlDWSXQ62B68ZgI9HkFFLLk3dheLSClIKF5r8GrBQAuUBo2M3IUxE +xJtRmREOc5wGj1QupyheRDmHVi03vYVElOEMSyycw5KFNGHLD7ibSkNS/jQ6fbjpKdx2qcgw+BRx +gMYeNkh0IkFch4LoGHGLQYlE535YW6i4jRPpp2zDR+2zGp1iro2C6pSe3VkQw63d4k3jMdXH7Ojy +sP6SHhYKGvzZ8/gntsm+HbRsZJB/9OTEW9c3rkIO3aQab3yIVMUWbuF6aC74Or8NpDyJO3inTmOD +BCEIZ43ygknQW/2xzQ+DhNQ+IIX3Sj0rnP0qCglN6oH4EZw= +-----END CERTIFICATE----- + +T\xc3\x9c\x42\xC4\xB0TAK UEKAE K\xC3\xB6k Sertifika Hizmet Sa\xC4\x9Flay\xc4\xb1\x63\xc4\xb1s\xc4\xb1 - S\xC3\xBCr\xC3\xBCm 3 +============================================================================================================================= +-----BEGIN C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rm6sxA/OOqbLLLAdsyv9Lrhc+hDVXDWzhXcLh1 +xnnRFDDtG1hba+818qEhTsXOfJlfbLm4IpNQp81McGq+agV/E5wrHur+R84EpW+sky58K5+eeROR +6Oqeyjh1jmKwlZMq5d/pXpduIF9fhHpEORlAHLpVK/swsoHvhOPc7Jg4OQOFCKlUAwUp8MmPi+oL +hmUZEdPpCSPeaJMDyTYcIW7OjGbxmTDY17PDHfiBLqi9ggtm/oLL4eAagsNAgQIDAQABo0IwQDAd +BgNVHQ4EFgQUvYiHyY/2pAoLquvF/pEjnatKijIwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQF +MAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAB18+kmPNOm3JpIWmgV050vQbTlswyb2zrgxvMTfvCr4 +N5EY3ATIZJkrGG2AA1nJrvhY0D7twyOfaTyGOBye79oneNGEN3GKPEs5z35FBtYt2IpNeBLWrcLT +y9LQQfMmNkqblWwM7uXRQydmwYj3erMgbOqwaSvHIOgMA8RBBZniP+Rr+KCGgceExh/VS4ESshYh +LBOhgLJeDEoTniDYYkCrkOpkSi+sDQESeUWoL4cZaMjihccwsnX5OD+ywJO0a+IDRM5noN+J1q2M +dqMTw5RhK2vZbMEHCiIHhWyFJEapvj+LeISCfiQMnf2BN+MlqO02TpUsyZyQ2uypQjyttgI= +-----END CERTIFICATE----- + +Buypass Class 2 CA 1 +==================== +-----BEGIN CERTIFICATE----- +MIIDUzCCAjugAwIBAgIBATANBgkqhkiG9w0BAQUFADBLMQswCQYDVQQGEwJOTzEdMBsGA1UECgwU +QnV5cGFzcyBBUy05ODMxNjMzMjcxHTAbBgNVBAMMFEJ1eXBhc3MgQ2xhc3MgMiBDQSAxMB4XDTA2 +MTAxMzEwMjUwOVoXDTE2MTAxMzEwMjUwOVowSzELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1eXBh +c3MgQVMtOTgzMTYzMzI3MR0wGwYDVQQDDBRCdXlwYXNzIENsYXNzIDIgQ0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x63\xc4\xb1s\xc4\xb1 +========================================================================== +-----BEGIN CERTIFICATE----- +MIIF5zCCA8+gAwIBAgIITK9zQhyOdAIwDQYJKoZIhvcNAQEFBQAwgYAxODA2BgNVBAMML0VCRyBF +bGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxMTcwNQYDVQQKDC5FQkcg +QmlsacWfaW0gVGVrbm9sb2ppbGVyaSB2ZSBIaXptZXRsZXJpIEEuxZ4uMQswCQYDVQQGEwJUUjAe +Fw0wNjA4MTcwMDIxMDlaFw0xNjA4MTQwMDMxMDlaMIGAMTgwNgYDVQQDDC9FQkcgRWxla3Ryb25p +ayBTZXJ0aWZpa2EgSGl6bWV0IFNhxJ9sYXnEsWPEsXPEsTE3MDUGA1UECgwuRUJHIEJpbGnFn2lt +IFRla25vbG9qaWxlcmkgdmUgSGl6bWV0bGVyaSBBLsWeLjELMAkGA1UEBhMCVFIwggIiMA0GCSqG +SIb3DQEBAQUAA4ICDwAwggIKAoICAQDuoIRh0DpqZhAy2DE4f6en5f2h4fuXd7hxlugTlkaDT7by +X3JWbhNgpQGR4lvFzVcfd2NR/y8927k/qqk153nQ9dAktiHq6yOU/im/+4mRDGSaBUorzAzu8T2b +gmmkTPiab+ci2hC6X5L8GCcKqKpE+i4stPtGmggDg3KriORqcsnlZR9uKg+ds+g75AxuetpX/dfr +eYteIAbTdgtsApWjluTLdlHRKJ2hGvxEok3MenaoDT2/F08iiFD9rrbskFBKW5+VQarKD7JK/oCZ +TqNGFav4c0JqwmZ2sQomFd2TkuzbqV9UIlKRcF0T6kjsbgNs2d1s/OsNA/+mgxKb8amTD8UmTDGy +Y5lhcucqZJnSuOl14nypqZoaqsNW2xCaPINStnuWt6yHd6i58mcLlEOzrz5z+kI2sSXFCjEmN1Zn +uqMLfdb3ic1nobc6HmZP9qBVFCVMLDMNpkGMvQQxahByCp0OLna9XvNRiYuoP1Vzv9s6xiQFlpJI +qkuNKgPlV5EQ9GooFW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1T0VoDy7HgviyJA/qIYM/PmLXoXLT1tLYhFHxUV8 +BS9BsZ4QaRuZluBVeftOhpm4lNqGOGqTo+fLbuXf6iFViZx9fX+Y9QCJ7uOEwFyWtcVG6kbghVW2 +G8kS1sHNzYDzAgE8yGnLRUhj2JTQ7IUOO04RZfSCjKY9ri4ilAnIXOo8gV0WKgOXFlUJ24pBgp5m +mxE= +-----END CERTIFICATE----- + +ApplicationCA - Japanese Government +=================================== +-----BEGIN CERTIFICATE----- +MIIDoDCCAoigAwIBAgIBMTANBgkqhkiG9w0BAQUFADBDMQswCQYDVQQGEwJKUDEcMBoGA1UEChMT +SmFwYW5lc2UgR292ZXJubWVudDEWMBQGA1UECxMNQXBwbGljYXRpb25DQTAeFw0wNzEyMTIxNTAw +MDBaFw0xNzEyMTIxNTAwMDBaMEMxCzAJBgNVBAYTAkpQMRwwGgYDVQQKExNKYXBhbmVzZSBHb3Zl +cm5tZW50MRYwFAYDVQQLEw1BcHBsaWNhdGlvbkNBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB +CgKCAQEAp23gdE6Hj6UG3mii24aZS2QNcfAKBZuOquHMLtJqO8F6tJdhjYq+xpqcBrSGUeQ3DnR4 +fl+Kf5Sk10cI/VBaVuRorChzoHvpfxiSQE8tnfWuREhzNgaeZCw7NCPbXCbkcXmP1G55IrmTwcrN +wVbtiGrXoDkhBFcsovW8R0FPXjQilbUfKW1eSvNNcr5BViCH/OlQR9cwFO5cjFW6WY2H/CPek9AE +jP3vbb3QesmlOmpyM8ZKDQUXKi17safY1vC+9D/qDihtQWEjdnjDuGWk81quzMKq2edY3rZ+nYVu +nyoKb58DKTCXKB28t89UKU5RMfkntigm/qJj5kEW8DOYRwIDAQABo4GeMIGbMB0GA1UdDgQWBBRU +WssmP3HMlEYNllPqa0jQk/5CdTAOBgNVHQ8BAf8EBAMCAQYwWQYDVR0RBFIwUKROMEwxCzAJBgNV +BAYTAkpQMRgwFgYDVQQKDA/ml6XmnKzlm73mlL/lupwxIzAhBgNVBAsMGuOCouODl+ODquOCseOD +vOOCt+ODp+ODs0NBMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBADlqRHZ3ODrs +o2dGD/mLBqj7apAxzn7s2tGJfHrrLgy9mTLnsCTWw//1sogJhyzjVOGjprIIC8CFqMjSnHH2HZ9g +/DgzE+Ge3Atf2hZQKXsvcJEPmbo0NI2VdMV+eKlmXb3KIXdCEKxmJj3ekav9FfBv7WxfEPjzFvYD +io+nEhEMy/0/ecGc/WLuo89UDNErXxc+4z6/wCs+CZv+iKZ+tJIX/COUgb1up8WMwusRRdv4QcmW +dupwX3kSa+SjB1oF7ydJzyGfikwJcGapJsErEU4z0g781mzSDjJkaP+tBXhfAx2o45CsJOAPQKdL +rosot4LKGAfmt1t06SAZf7IbiVQ= +-----END CERTIFICATE----- + +GeoTrust Primary Certification Authority - G3 +============================================= +-----BEGIN CERTIFICATE----- +MIID/jCCAuagAwIBAgIQFaxulBmyeUtB9iepwxgPHzANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UE +BhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsTMChjKSAyMDA4IEdlb1RydXN0 +IEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTE2MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbWFy +eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEczMB4XDTA4MDQwMjAwMDAwMFoXDTM3MTIwMTIz +NTk1OVowgZgxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTkwNwYDVQQLEzAo +YykgMjAwOCBHZW9UcnVzdCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxNjA0BgNVBAMT +LUdlb1RydXN0IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZI +hvcNAQEBBQADggEPADCCAQoCggEBANziXmJYHTNXOTIz+uvLh4yn1ErdBojqZI4xmKU4kB6Yzy5j +K/BGvESyiaHAKAxJcCGVn2TAppMSAmUmhsalifD614SgcK9PGpc/BkTVyetyEH3kMSj7HGHmKAdE +c5IiaacDiGydY8hS2pgn5whMcD60yRLBxWeDXTPzAxHsatBT4tG6NmCUgLthY2xbF37fQJQeqw3C +IShwiP/WJmxsYAQlTlV+fe+/lEjetx3dcI0FX4ilm/LC7urRQEFtYjgdVgbFA0dRIBn8exALDmKu +dlW/X3e+PkkBUz2YJQN2JFodtNuJ6nnltrM7P7pMKEF/BqxqjsHQ9gUdfeZChuOl1UcCAwEAAaNC +MEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMR5yo6hTgMdHNxr +2zFblD4/MH8tMA0GCSqGSIb3DQEBCwUAA4IBAQAtxRPPVoB7eni9n64smefv2t+UXglpp+duaIy9 +cr5HqQ6XErhK8WTTOd8lNNTBzU6B8A8ExCSzNJbGpqow32hhc9f5joWJ7w5elShKKiePEI4ufIbE +Ap7aDHdlDkQNkv39sxY2+hENHYwOB4lqKVb3cvTdFZx3NWZXqxNT2I7BQMXXExZacse3aQHEerGD +AWh9jUGhlBjBJVz88P6DAod8DQ3PLghcSkANPuyBYeYk28rgDi0Hsj5W3I31QYUHSJsMC8tJP33s +t/3LjWeJGqvtux6jAAgIFyqCXDFdRootD4abdNlF+9RAsXqqaC2Gspki4cErx5z481+oghLrGREt +-----END CERTIFICATE----- + +thawte Primary Root CA - G2 +=========================== +-----BEGIN CERTIFICATE----- +MIICiDCCAg2gAwIBAgIQNfwmXNmET8k9Jj1Xm67XVjAKBggqhkjOPQQDAzCBhDELMAkGA1UEBhMC +VVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjE4MDYGA1UECxMvKGMpIDIwMDcgdGhhd3RlLCBJbmMu +IC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxJDAiBgNVBAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3Qg +Q0EgLSBHMjAeFw0wNzExMDUwMDAwMDBaFw0zODAxMTgyMzU5NTlaMIGEMQswCQYDVQQGEwJVUzEV +MBMGA1UEChMMdGhhd3RlLCBJbmMuMTgwNgYDVQQLEy8oYykgMjAwNyB0aGF3dGUsIEluYy4gLSBG +b3IgYXV0aG9yaXplZCB1c2Ugb25seTEkMCIGA1UEAxMbdGhhd3RlIFByaW1hcnkgUm9vdCBDQSAt +IEcyMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEotWcgnuVnfFSeIf+iha/BebfowJPDQfGAFG6DAJS +LSKkQjnE/o/qycG+1E3/n3qe4rF8mq2nhglzh9HnmuN6papu+7qzcMBniKI11KOasf2twu8x+qi5 +8/sIxpHR+ymVo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQU +mtgAMADna3+FGO6Lts6KDPgR4bswCgYIKoZIzj0EAwMDaQAwZgIxAN344FdHW6fmCsO99YCKlzUN +G4k8VIZ3KMqh9HneteY4sPBlcIx/AlTCv//YoT7ZzwIxAMSNlPzcU9LcnXgWHxUzI1NS41oxXZ3K +rr0TKUQNJ1uo52icEvdYPy5yAlejj6EULg== +-----END CERTIFICATE----- + +thawte Primary Root CA - G3 +=========================== +-----BEGIN CERTIFICATE----- +MIIEKjCCAxKgAwIBAgIQYAGXt0an6rS0mtZLL/eQ+zANBgkqhkiG9w0BAQsFADCBrjELMAkGA1UE +BhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2 +aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMvKGMpIDIwMDggdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhv +cml6ZWQgdXNlIG9ubHkxJDAiBgNVBAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EgLSBHMzAeFw0w +ODA0MDIwM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BXcm +er/YB1IsYvdwY9k5vG8cwnncdimvzsUsZAReiDZuMdRAGmI0Nj81Aa6sY6A= +-----END CERTIFICATE----- + +GeoTrust Primary Certification Authority - G2 +============================================= +-----BEGIN CERTIFICATE----- +MIICrjCCAjWgAwIBAgIQPLL0SAoA4v7rJDteYD7DazAKBggqhkjOPQQDAzCBmDELMAkGA1UEBhMC +VVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsTMChjKSAyMDA3IEdlb1RydXN0IElu +Yy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTE2MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbWFyeSBD +ZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMB4XDTA3MTEwNTAwMDAwMFoXDTM4MDExODIzNTk1 +OVowgZgxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTkwNwYDVQQLEzAoYykg +MjAwNyBHZW9UcnVzdCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxNjA0BgNVBAMTLUdl +b1RydXN0IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMjB2MBAGByqGSM49AgEG +BSuBBAAiA2IABBWx6P0DFUPlrOuHNxFi79KDNlJ9RVcLSo17VDs6bl8VAsBQps8lL33KSLjHUGMc +KiEIfJo22Av+0SbFWDEwKCXzXV2juLaltJLtbCyf691DiaI8S0iRHVDsJt/WYC69IaNCMEAwDwYD +VR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFBVfNVdRVfslsq0DafwBo/q+ +EVXVMAoGCCqGSM49BAMDA2cAMGQCMGSWWaboCd6LuvpaiIjwH5HTRqjySkwCY/tsXzjbLkGTqQ7m +ndwxHLKgpxgceeHHNgIwOlavmnRs9vuD4DPTCF+hnMJbn0bWtsuRBmOiBuczrD6ogRLQy7rQkgu2 +npaqBA+K +-----END CERTIFICATE----- + +VeriSign Universal Root Certification Authority +=============================================== +-----BEGIN CERTIFICATE----- +MIIEuTCCA6GgAwIBAgIQQBrEZCGzEyEDDrvkEhrFHTANBgkqhkiG9w0BAQsFADCBvTELMAkGA1UE +BhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBO +ZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwOCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVk +IHVzZSBvbmx5MTgwNgYDVQQDEy9WZXJpU2lnbiBVbml2ZXJzYWwgUm9vdCBDZXJ0aWZpY2F0aW9u +IEF1dGhvcml0eTAeFw0wODA0MDIwMDAwMDBaFw0zNzEyMDEyMzU5NTlaMIG9MQswCQYDVQQGEwJV +UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv +cmsxOjA4BgNVBAsTMShjKSAyMDA4IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl +IG9ubHkxODA2BgNVBAMTL1ZlcmlTaWduIFVuaXZlcnNhbCBSb290IENlcnRpZmljYXRpb24gQXV0 +aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx2E3XrEBNNti1xWb/1hajCMj +1mCOkdeQmIN65lgZOIzF9uVkhbSicfvtvbnazU0AtMgtc6XHaXGVHzk8skQHnOgO+k1KxCHfKWGP +MiJhgsWHH26MfF8WIFFE0XBPV+rjHOPMee5Y2A7Cs0WTwCznmhcrewA3ekEzeOEz4vMQGn+HLL72 +9fdC4uW/h2KJXwBL38Xd5HVEMkE6HnFuacsLdUYI0crSK5XQz/u5QGtkjFdN/BMReYTtXlT2NJ8I +AfMQJQYXStrxHXpma5hgZqTZ79IugvHw7wnqRMkVauIDbjPTrJ9VAMf2CGqUuV/c4DPxhGD5WycR +tPwW8rtWaoAljQIDAQABo4GyMIGvMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMG0G +CCsGAQUFBwEMBGEwX6FdoFswWTBXMFUWCWltYWdlL2dpZjAhMB8wBwYFKw4DAhoEFI/l0xqGrI2O +a8PPgGrUSBgsexkuMCUWI2h0dHA6Ly9sb2dvLnZlcmlzaWduLmNvbS92c2xvZ28uZ2lmMB0GA1Ud +DgQWBBS2d/ppSEefUxLVwuoHMnYH0ZcHGTANBgkqhkiG9w0BAQsFAAOCAQEASvj4sAPmLGd75JR3 +Y8xuTPl9Dg3cyLk1uXBPY/ok+myDjEedO2Pzmvl2MpWRsXe8rJq+seQxIcaBlVZaDrHC1LGmWazx +Y8u4TB1ZkErvkBYoH1quEPuBUDgMbMzxPcP1Y+Oz4yHJJDnp/RVmRvQbEdBNc6N9Rvk97ahfYtTx +P/jgdFcrGJ2BtMQo2pSXpXDrrB2+BxHw1dvd5Yzw1TKwg+ZX4o+/vqGqvz0dtdQ46tewXDpPaj+P +wGZsY6rp2aQW9IHRlRQOfc2VNNnSj3BzgXucfr2YYdhFh5iQxeuGMMY1v/D/w1WIg0vvBZIGcfK4 +mJO37M2CYfE45k+XmCpajQ== +-----END CERTIFICATE----- + +VeriSign Class 3 Public Primary Certification Authority - G4 +============================================================ +-----BEGIN CERTIFICATE----- +MIIDhDCCAwqgAwIBAgIQL4D+I4wOIg9IZxIokYesszAKBggqhkjOPQQDAzCByjELMAkGA1UEBhMC +VVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3 +b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVz +ZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmlj +YXRpb24gQXV0aG9yaXR5IC0gRzQwHhcNMDcxMTA1MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCByjEL +MAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBU +cnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRo +b3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5 +IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzQwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAASnVnp8 +Utpkmw4tXNherJI9/gHmGUo9FANL+mAnINmDiWn6VMaaGF5VKmTeBvaNSjutEDxlPZCIBIngMGGz +rl0Bp3vefLK+ymVhAIau2o970ImtTR1ZmkGxvEeA3J5iw/mjgbIwga8wDwYDVR0TAQH/BAUwAwEB +/zAOBgNVHQ8BAf8EBAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2UvZ2lmMCEw +HzAHBgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVyaXNpZ24u +Y29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFLMWkf3upm7ktS5Jj4d4gYDs5bG1MAoGCCqGSM49BAMD +A2gAMGUCMGYhDBgmYFo4e1ZC4Kf8NoRRkSAsdk1DPcQdhCPQrNZ8NQbOzWm9kA3bbEhCHQ6qQgIx +AJw9SDkjOVgaFRJZap7v1VmyHVIsmXHNxynfGyphe3HR3vPA5Q06Sqotp9iGKt0uEA== +-----END CERTIFICATE----- + +NetLock Arany (Class Gold) Főtanúsítvány +============================================ +-----BEGIN CERTIFICATE----- +MIIEFTCCAv2gAwIBAgIGSUEs5AAQMA0GCSqGSIb3DQEBCwUAMIGnMQswCQYDVQQGEwJIVTERMA8G +A1UEBwwIQnVkYXBlc3QxFTATBgN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YtOUZcTh5m2C+C8lcLIhJsFyUR+MLMOEkMNaj7rP9KdlpeuY0fsFskZ1FSNqb4VjMIDw1Z4fKRzC +bLBQWV2QWzuoDTDPv31/zvGdg73JRm4gpvlhUbohL3u+pRVjodSVh/GeufOJ8z2FuLjbvrW5Kfna +NwUASZQDhETnv0Mxz3WLJdH0pmT1kvarBes96aULNmLazAZfNou2XjG4Kvte9nHfRCaexOYNkbQu +dZWAUWpLMKawYqGT8ZvYzsRjdT9ZR7E= +-----END CERTIFICATE----- + +Staat der Nederlanden Root CA - G2 +================================== +-----BEGIN CERTIFICATE----- +MIIFyjCCA7KgAwIBAgIEAJiWjDANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQGEwJOTDEeMBwGA1UE +CgwVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSswKQYDVQQDDCJTdGFhdCBkZXIgTmVkZXJsYW5kZW4g +Um9vdCBDQSAtIEcyMB4XDTA4MDMyNjExMTgxN1oXDTIwMDMyNTExMDMxMFowWjELMAkGA1UEBhMC +TkwxHjAcBgNVBAoMFVN0YWF0IGRlciBOZWRlcmxhbmRlbjErMCkGA1UEAwwiU3RhYXQgZGVyIE5l +ZGVybGFuZGVuIFJvb3QgQ0EgLSBHMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMVZ +5291qj5LnLW4rJ4L5PnZyqtdj7U5EILXr1HgO+EASGrP2uEGQxGZqhQlEq0i6ABtQ8SpuOUfiUtn +vWFI7/3S4GCI5bkYYCjDdyutsDeqN95kWSpGV+RLufg3fNU254DBtvPUZ5uW6M7XxgpT0GtJlvOj +CwV3SPcl5XCsMBQgJeN/dVrlSPhOewMHBPqCYYdu8DvEpMfQ9XQ+pV0aCPKbJdL2rAQmPlU6Yiil +e7Iwr/g3wtG61jj99O9JMDeZJiFIhQGp5Rbn3JBV3w/oOM2ZNyFPXfUib2rFEhZgF1XyZWampzCR +OME4HYYEhLoaJXhena/MUGDWE4dS7WMfbWV9whUYdMrhf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LpfKG6/2SSmuz+Ne6ML678 +IIbsSt4beDI3poHSna9aEhbKmVv8b20OxaAehsmR0FyYgl9jDIpaq9iVpszLita/ZEuOyoqysOkh +Mp6qqIWYNIE5ITuoOlIyPfZrN4YGWhWY3PARZv40ILcD9EEQfTmEeZZyY7aWAuVrua0ZTbvGRNs2 +yyqcjg== +-----END CERTIFICATE----- + +Hongkong Post Root CA 1 +======================= +-----BEGIN CERTIFICATE----- +MIIDMDCCAhigAwIBAgICA+gwDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UEBhMCSEsxFjAUBgNVBAoT +DUhvbmdrb25nIFBvc3QxIDAeBgNVBAMTF0hvbmdrb25nIFBvc3QgUm9vdCBDQSAxMB4XDTAzMDUx +NTA1MTMxNFoXDTIzMDUxNTA0NTIyOVowRzELMAkGA1UEBhMCSEsxFjAUBgNVBAoTDUhvbmdrb25n +IFBvc3QxIDAeBgNVBAMTF0hvbmdrb25nIFBvc3QgUm9vdCBDQSAxMIIBIjANBgkqhkiG9w0BAQEF +AAOCAQ8AMIIBCgKCAQEArP84tulmAknjorThkPlAj3n54r15/gK97iSSHSL22oVyaf7XPwnU3ZG1 +ApzQjVrhVcNQhrkpJsLj2aDxaQMoIIBFIi1WpztUlVYiWR8o3x8gPW2iNr4joLFutbEnPzlTCeqr +auh0ssJlXI6/fMN4hM2eFvz1Lk8gKgifd/PFHsSaUmYeSF7jEAaPIpjhZY4bXSNmO7ilMlHIhqqh +qZ5/dpTCpmy3QfDVyAY45tQM4vM7TG1QjMSDJ8EThFk9nnV0ttgCXjqQesBCNnLsak3c78QA3xMY +V18meMjWCnl3v/evt3a5pQuEF10Q6m/hq5URX208o1xNg1vysxmKgIsLhwIDAQABoyYwJDASBgNV +HRMBAf8ECDAGAQH/AgEDMA4GA1UdDwEB/wQEAwIBxjANBgkqhkiG9w0BAQUFAAOCAQEADkbVPK7i +h9legYsCmEEIjEy82tvuJxuC52pF7BaLT4Wg87JwvVqWuspube5Gi27nKi6Wsxkz67SfqLI37pio +l7Yutmcn1KZJ/RyTZXaeQi/cImyaT/JaFTmxcdcrUehtHJjA2Sr0oYJ71clBoiMBdDhViw+5Lmei +IAQ32pwL0xch4I+XeTRvhEgCIDMb5jREn5Fw9IBehEPCKdJsEhTkYY2sEJCehFC78JZvRZ+K88ps +T/oROhUVRsPNH4NbLUES7VBnQRM9IauUiqpOfMGx+6fWtScvl6tu4B3i0RwsH0Ti/L6RoZz71ilT +c4afU9hDDl3WY4JxHYB0yvbiAmvZWg== +-----END CERTIFICATE----- + +SecureSign RootCA11 +=================== +-----BEGIN CERTIFICATE----- +MIIDbTCCAlWgAwIBAgIBATANBgkqhkiG9w0BAQUFADBYMQswCQYDVQQGEwJKUDErMCkGA1UEChMi +SmFwYW4gQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcywgSW5jLjEcMBoGA1UEAxMTU2VjdXJlU2lnbiBS +b290Q0ExMTAeFw0wOTA0MDgwNDU2NDdaFw0yOTA0MDgwNDU2NDdaMFgxCzAJBgNVBAYTAkpQMSsw +KQYDVQQKEyJKYXBhbiBDZXJ0aWZpY2F0aW9uIFNlcnZpY2VzLCBJbmMuMRwwGgYDVQQDExNTZWN1 +cmVTaWduIFJvb3RDQTExMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA/XeqpRyQBTvL +TJszi1oURaTnkBbR31fSIRCkF/3frNYfp+TbfPfs37gD2pRY/V1yfIw/XwFndBWW4wI8h9uuywGO +wvNmxoVF9ALGOrVisq/6nL+k5tSAMJjzDbaTj6nU2DbysPyKyiyhFTOVMdrAG/LuYpmGYz+/3ZMq +g6h2uRMft85OQoWPIucuGvKVCbIFtUROd6EgvanyTgp9UK31BQ1FT0Zx/Sg+U/sE2C3XZR1KG/rP +O7AxmjVuyIsG0wCR8pQIZUyxNAYAeoni8McDWc/V1uinMrPmmECGxc0nEovMe863ETxiYAcjPitA +bpSACW22s293bzUIUPsCh8U+iQIDAQABo0IwQDAdBgNVHQ4EFgQUW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KC5tNSixthT8Jcjxn4tncB7rrZXtaAWPWkFtPF2Y9fwsZo5NjEFIq +nxQWWOLcpfShFosOkYuByptZ+thrkQdlVV9SH686+5DdaaVbnG0OLLb6zqylfDJKZ0DcMDQj3dcE +I2bw/FWAp/tmGYI1Z2JwOV5vx+qQQEQIHriy1tvuWacNGHk0vFQYXlPKNFHtRQrmjseCNj6nOGOp +MCwXEGCSn1WHElkQwg9naRHMTh5+Spqtr0CodaxWkHS4oJyleW/c6RrIaQXpuvoDs3zk4E7Czp3o +tkYNbn5XOmeUwssfnHdKZ05phkOTOPu220+DkdRgfks+KzgHVZhepA== +-----END CERTIFICATE----- + +Verisign Class 3 Public Primary Certification Authority +======================================================= +-----BEGIN CERTIFICATE----- +MIICPDCCAaUCEDyRMcsf9tAbDpq40ES/Er4wDQYJKoZIhvcNAQEFBQAwXzELMAkGA1UEBhMCVVMx +FzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmltYXJ5 +IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2MDEyOTAwMDAwMFoXDTI4MDgwMjIzNTk1OVow +XzELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAz +IFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUA +A4GNADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhEBarsAx94 +f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/isI19wKTakyYbnsZogy1Ol +hec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBABByUqkFFBky +CEHwxWsKzH4PIRnN5GfcX6kb5sroc50i2JhucwNhkcV8sEVAbkSdjbCxln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YDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBTLD8bf +QkPMPcu1SCOhGnqmKrs0aDAfBgNVHSMEGDAWgBTLD8bfQkPMPcu1SCOhGnqmKrs0aDAbBgNVHREE +FDASgRBpbmZvQGUtc3ppZ25vLmh1MA0GCSqGSIb3DQEBCwUAA4IBAQDJ0Q5eLtXMs3w+y/w9/w0o +lZMEyL/azXm4Q5DwpL7v8u8hmLzU1F0G9u5C7DBsoKqpyvGvivo/C3NqPuouQH4frlRheesuCDfX +I/OMn74dseGkddug4lQUsbocKaQY9hK6ohQU4zE1yED/t+AFdlfBHFny+L/k7SViXITwfn4fs775 +tyERzAMBVnCnEJIeGzSBHq2cGsMEPO0CYdYeBvNfOofyK/FFh+U9rNHHV4S9a67c2Pm2G2JwCz02 +yULyMtd6YebS2z3PyKnJm9zbWETXbzivf3jTo60adbocwTZ8jx5tHMN1Rq41Bab2XD0h7lbwyYIi +LXpUq3DDfSJlgnCW +-----END CERTIFICATE----- + +E-Guven Kok Elektronik Sertifika Hizmet Saglayicisi +=================================================== +-----BEGIN CERTIFICATE----- +MIIDtjCCAp6gAwIBAgIQRJmNPMADJ72cdpW56tustTANBgkqhkiG9w0BAQUFADB1MQswCQYDVQQG +EwJUUjEoMCYGA1UEChMfRWxla3Ryb25payBCaWxnaSBHdXZlbmxpZ2kgQS5TLjE8MDoGA1UEAxMz +ZS1HdXZlbiBLb2sgRWxla3Ryb25payBTZXJ0aWZpa2EgSGl6bWV0IFNhZ2xheWljaXNpMB4XDTA3 +MDEwNDExMzI0OFoXDTE3MDEwNDExMzI0OFowdTELMAkGA1UEBhMCVFIxKDAmBgNVBAoTH0VsZWt0 +cm9uaWsgQmlsZ2kgR3V2ZW5saWdpIEEuUy4xPDA6BgNVBAMTM2UtR3V2ZW4gS29rIEVsZWt0cm9u +aWsgU2VydGlmaWthIEhpem1ldCBTYWdsYXlpY2lzaTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC +AQoCggEBAMMSIJ6wX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NMjkwMzE4MTAwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxT +aWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2ln +bjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMwldpB5BngiFvXAg7aEyiie/QV2EcWt +iHL8RgJDx7KKnQRfJMsuS+FggkbhUqsMgUdwbN1k0ev1LKMPgj0MK66X17YUhhB5uzsTgHeMCOFJ +0mpiLx9e+pZo34knlTifBtc+ycsmWQ1z3rDI6SYOgxXG71uL0gRgykmmKPZpO/bLyCiR5Z2KYVc3 +rHQU3HTgOu5yLy6c+9C7v/U9AOEGM+iCK65TpjoWc4zdQQ4gOsC0p6Hpsk+QLjJg6VfLuQSSaGjl +OCZgdbKfd/+RFO+uIEn8rUAVSNECMWEZXriX7613t2Saer9fwRPvm2L7DWzgVGkWqQPabumDk3F2 +xmmFghcCAwEAAaNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE +FI/wS3+oLkUkrk1Q+mOai97i3Ru8MA0GCSqGSIb3DQEBCwUAA4IBAQBLQNvAUKr+yAzv95ZURUm7 +lgAJQayzE4aGKAczymvmdLm6AC2upArT9fHxD4q/c2dKg8dEe3jgr25sbwMpjjM5RcOO5LlXbKr8 +EpbsU8Yt5CRsuZRj+9xTaGdWPoO4zzUhw8lo/s7awlOqzJCK6fBdRoyV3XpYKBovHd7NADdBj+1E +bddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQXmcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18 +YIvDQVETI53O9zJrlAGomecsMx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7r +kpeDMdmztcpHWD9f +-----END CERTIFICATE----- + +TC TrustCenter Universal CA III +=============================== +-----BEGIN CERTIFICATE----- +MIID4TCCAsmgAwIBAgIOYyUAAQACFI0z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GhnYIg5IFHYaAERzqf2EQf27OysGh+yZm5WZ2B6dF7AbZc2rrUNXWZzwCUyRdhK +BgePxLcHsU0GDeGl6/R1yrqc0L2z0zIkTO5+4nYES0lT2PLpVDP85XEfPRRclkvxOvIAu2y0+pZV +CIgJwcyRGSmwIC3/yzikQOEXvnlhgP8HA4ZMTnsGnxGGjYnuJ8Tb4rwZjgvDwxPHLQNjO9Po5KIq +woIIlBZU8O8fJ5AluA0OKBtHd0e9HKgl8ZS0Zg== +-----END CERTIFICATE----- + +Autoridad de Certificacion Firmaprofesional CIF A62634068 +========================================================= +-----BEGIN CERTIFICATE----- +MIIGFDCCA/ygAwIBAgIIU+w77vuySF8wDQYJKoZIhvcNAQEFBQAwUTELMAkGA1UEBhMCRVMxQjBA +BgNVBAMMOUF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIEZpcm1hcHJvZmVzaW9uYWwgQ0lGIEE2 +MjYzNDA2ODAeFw0wOTA1MjAwODM4MTVaFw0zMDEyMzEwODM4MTVaMFExCzAJBgNVBAYTAkVTMUIw +QAYDVQQDDDlBdXRvcmlkYWQgZGUgQ2VydGlmaWNhY2lvbiBGaXJtYXByb2Zlc2lvbmFsIENJRiBB +NjI2MzQwNjgwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDKlmuO6vj78aI14H9M2uDD +Utd9thDIAl6zQyrET2qyyhxdKJp4ERppWVevtSBC5IsP5t9bpgOSL/UR5GLXMnE42QQMcas9UX4P +B99jBVzpv5RvwSmCwLTaUbDBPLutN0pcyvFLNg4kq7/DhHf9qFD0sefGL9ItWY16Ck6WaVICqjaY +7Pz6FIMMNx/Jkjd/14Et5cS54D40/mf0PmbR0/RAz15iNA9wBj4gGFrO93IbJWyTdBSTo3OxDqqH +ECNZXyAFGUftaI6SEspd/NYrspI8IM/hX68gvqB2f3bl7BqGYTM+53u0P6APjqK5am+5hyZvQWyI +plD9amML9ZMWGxmPsu2bm8mQ9QEM3xk9Dz44I8k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irhpuF3dvd6qJ2gHN99ZwExEWN57kci57q13XR +crHedUTnQn3iV2t93Jm8PYMo6oCTjcVMZcFwgbg4/EMxsvYDNEeyrPsiBsse3RdHHF9mudMaotoR +saS8I8nkvof/uZS2+F0gStRf571oe2XyFR7SOqkt6dhrJKyXWERHrVkY8SFlcN7ONGCoQPHzPKTD +KCOM/iczQ0CgFzzr6juwcqajuUpLXhZI9LK8yIySxZ2frHI2vDSANGupi5LAuBft7HZT9SQBjLMi +6Et8Vcad+qMUu2WFbm5PEn4KPJ2V +-----END CERTIFICATE----- + +Izenpe.com +========== +-----BEGIN CERTIFICATE----- +MIIF8TCCA9mgAwIBAgIQALC3WhZIX7/hy/WL1xnmfTANBgkqhkiG9w0BAQsFADA4MQswCQYDVQQG +EwJFUzEUMBIGA1UECgwLSVpFTlBFIFMuQS4xEzARBgNVBAMMCkl6ZW5wZS5jb20wHhcNMDcxMjEz +MTMwODI4WhcNMzcxMjEzMDgyNzI1WjA4MQswCQYDVQQGEwJFUzEUMBIGA1UECgwLSVpFTlBFIFMu +QS4xEzARBgNVBAMMCkl6ZW5wZS5jb20wggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDJ +03rKDx6sp4boFmVqscIbRTJxldn+EFvMr+eleQGPicPK8lVx93e+d5TzcqQsRNiekpsUOqHnJJAK +ClaOxdgmlOHZSOEtPtoKct2jmRXagaKH9HtuJneJWK3W6wyyQXpzbm3benhB6QiIEn6HLmYRY2xU ++zydcsC8Lv/Ct90NduM61/e0aL6i9eOBbsFGb12N4E3GVFWJGjMxCrFXuaOKmMPsOzTFlUFpfnXC +PCDFYbpRR6AgkJOhkEvzTnyFRVSa0QUmQbC1TR0zvsQDyCV8wXDbO/QJLVQnSKwv4cSsPsjLkkxT +OTcj7NMB+eAJRE1NZMDhDVqHIrytG6P+JrUV86f8hBnp7KGItERphIPzidF0BqnMC9bC3ieFUCbK +F7jJeodWLBoBHmy+E60QrLUk9TiRodZL2vG70t5HtfG8gfZ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ALqfP2C2sJbUjWumDqtujWTI6cfSN01RpiyEGjkpTHC +ClguGYEQyVB1/OpaFs4R1+7vUIgtYf8/QnMFlEPVjjxOAToZpR9GTnfQXeWBIiGH/pR9hNiTrdZo +Q0iy2+tzJOeRf1SktoA+naM8THLCV8Sg1Mw4J87VBp6iSNnpn86CcDaTmjvfliHjWbcM2pE38P1Z +WrOZyGlsQyYBNWNgVYkDOnXYukrZVP/u3oDYLdE41V4tC5h9Pmzb/CaIxw== +-----END CERTIFICATE----- + +Chambers of Commerce Root - 2008 +================================ +-----BEGIN CERTIFICATE----- +MIIHTzCCBTegAwIBAgIJAKPaQn6ksa7aMA0GCSqGSIb3DQEBBQUAMIGuMQswCQYDVQQGEwJFVTFD +MEEGA1UEBxM6TWFkcmlkIChzZWUgY3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNv +bS9hZGRyZXNzKTESMBAGA1UEBRMJQTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMu +QS4xKTAnBgNVBAMTIENoYW1iZXJzIG9mIENvbW1lcmNlIFJvb3QgLSAyMDA4MB4XDTA4MDgwMTEy +Mjk1MFoXDTM4MDczMTEyMjk1MFowga4xCzAJBgNVBAYTAkVVMUMwQQYDVQQHEzpNYWRyaWQgKHNl +ZSBjdXJyZW50IGFkZHJlc3MgYXQgd3d3LmNhbWVyZmlybWEuY29tL2FkZHJlc3MpMRIwEAYDVQQF +EwlBODI3NDMyODcxGzAZBgNVBAoTEkFDIENhbWVyZmlybWEgUy5BLjEpMCcGA1UEAxMgQ2hhbWJl +cnMgb2YgQ29tbWVyY2UgUm9vdCAtIDIwMDgwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoIC +AQCvAMtwNyuAWko6bHiUfaN/Gh/2NdW928sNRHI+JrKQUrpjOyhYb6WzbZSm891kDFX29ufyIiKA +XuFixrYp4YFs8r/lfTJqVKAyGVn+H4vXPWCGhSRv4xGzdz4gljUha7MI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JmaXJtYS5jb20wDQYJKoZIhvcNAQEFBQADggIBAJASryI1 +wqM58C7e6bXpeHxIvj99RZJe6dqxGfwWPJ+0W2aeaufDuV2I6A+tzyMP3iU6XsxPpcG1Lawk0lgH +3qLPaYRgM+gQDROpI9CF5Y57pp49chNyM/WqfcZjHwj0/gF/JM8rLFQJ3uIrbZLGOU8W6jx+ekbU +RWpGqOt1glanq6B8aBMz9p0w8G8nOSQjKpD9kCk18pPfNKXG9/jvjA9iSnyu0/VU+I22mlaHFoI6 +M6taIgj3grrqLuBHmrS1RaMFO9ncLkVAO+rcf+g769HsJtg1pDDFOqxXnrN2pSB7+R5KBWIBpih1 +YJeSDW4+TTdDDZIVnBgizVGZoCkaPF+KMjNbMMeJL0eYD6MDxvbxrN8y8NmBGuScvfaAFPDRLLmF +9dijscilIeUcE5fuDr3fKanvNFNb0+RqE4QGtjICxFKuItLcsiFCGtpA8CnJ7AoMXOLQusxI0zcK +zBIKinmwPQN/aUv0NCB9szTqjktk9T79syNnFQ0EuPAtwQlRPLJsFfClI9eDdOTlLsn+mCdCxqvG +nrDQWzilm1DefhiYtUU79nm06PcaewaD+9CL2rvHvRirCG88gGtAPxkZumWK5r7VXNM21+9AUiRg +OGcEMeyP84LG3rlV8zsxkVrctQgVrXYlCg17LofiDKYGvCYQbTed7N14jHyAxfDZd0jQ +-----END CERTIFICATE----- + +Global Chambersign Root - 2008 +============================== +-----BEGIN CERTIFICATE----- +MIIHSTCCBTGgAwIBAgIJAMnN0+nVfSPOMA0GCSqGSIb3DQEBBQUAMIGsMQswCQYDVQQGEwJFVTFD +MEEGA1UEBxM6TWFkcmlkIChzZWUgY3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNv +bS9hZGRyZXNzKTESMBAGA1UEBRMJQTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMu +QS4xJzAlBgNVBAMTHkdsb2JhbCBDaGFtYmVyc2lnbiBSb290IC0gMjAwODAeF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YWDpxvGjjqsGvHCgfotwjZT+B6q6Z +09gwzxMNTxXJhLynSC34MCN32EZLeW32jO06f2ARePTpm67VVMB0gNELQp/B +-----END CERTIFICATE----- + +Go Daddy Root Certificate Authority - G2 +======================================== +-----BEGIN CERTIFICATE----- +MIIDxTCCAq2gAwIBAgIBADANBgkqhkiG9w0BAQsFADCBgzELMAkGA1UEBhMCVVMxEDAOBgNVBAgT +B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxGjAYBgNVBAoTEUdvRGFkZHkuY29tLCBJbmMu +MTEwLwYDVQQDEyhHbyBEYWRkeSBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5 +MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgYMxCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdBcml6 +b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMRowGAYDVQQKExFHb0RhZGR5LmNvbSwgSW5jLjExMC8G +A1UEAxMoR28gRGFkZHkgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZI +hvcNAQEBBQADggEPADCCAQoCggEBAL9xYgjx+lk09xvJGKP3gElY6SKDE6bFIEMBO4Tx5oVJnyfq +9oQbTqC023CYxzIBsQU+B07u9PpPL1kwIuerGVZr4oAH/PMWdYA5UXvl+TW2dE6pjYIT5LY/qQOD ++qK+ihVqf94Lw7YZFAXK6sOoBJQ7RnwyDfMAZiLIjWltNowRGLfTshxgtDj6AozO091GB94KPutd +fMh8+7ArU6SSYmlRJQVhGkSBjCypQ5Yj36w6gZoOKcUcqeldHraenjAKOc7xiID7S13MMuyFYkMl +NAJWJwGRtDtwKj9useiciAF9n9T521NtYJ2/LOdYq7hfRvzOxBsDPAnrSTFcaUaz4EcCAwEAAaNC +MEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFDqahQcQZyi27/a9 +BUFuIMGU2g/eMA0GCSqGSIb3DQEBCwUAA4IBAQCZ21151fmXWWcDYfF+OwYxdS2hII5PZYe096ac +vNjpL9DbWu7PdIxztDhC2gV7+AJ1uP2lsdeu9tfeE8tTEH6KRtGX+rcuKxGrkLAngPnon1rpN5+r +5N9ss4UXnT3ZJE95kTXWXwTrgIOrmgIttRD02JDHBHNA7XIloKmf7J6raBKZV8aPEjoJpL1E/QYV +N8Gb5DKj7Tjo2GTzLH4U/ALqn83/B2gX2yKQOC16jdFU8WnjXzPKej17CuPKf1855eJ1usV2GDPO +LPAvTK33sefOT6jEm0pUBsV/fdUID+Ic/n4XuKxe9tQWskMJDE32p2u0mYRlynqI4uJEvlz36hz1 +-----END CERTIFICATE----- + +Starfield Root Certificate Authority - G2 +========================================= +-----BEGIN CERTIFICATE----- +MIID3TCCAsWgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBjzELMAkGA1UEBhMCVVMxEDAOBgNVBAgT +B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNobm9s +b2dpZXMsIEluYy4xMjAwBgNVBAMTKVN0YXJmaWVsZCBSb290IENlcnRpZmljYXRlIEF1dGhvcml0 +eSAtIEcyMB4XDTA5MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgY8xCzAJBgNVBAYTAlVTMRAw +DgYDVQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxTdGFyZmllbGQg +VGVjaG5vbG9naWVzLCBJbmMuMTIwMAYDVQQDEylTdGFyZmllbGQgUm9vdCBDZXJ0aWZpY2F0ZSBB +dXRob3JpdHkgLSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3twQP89o/8ArFv +W59I2Z154qK3A2FWGMNHttfKPTUuiUP3oWmb3ooa/RMgnLRJdzIpVv257IzdIvpy3Cdhl+72WoTs +bhm5iSzchFvVdPtrX8WJpRBSiUZV9Lh1HOZ/5FSuS/hVclcCGfgXcVnrHigHdMWdSL5stPSksPNk +N3mSwOxGXn/hbVNMYq/NHwtjuzqd+/x5AJhhdM8mgkBj87JyahkNmcrUDnXMN/uLicFZ8WJ/X7Nf +ZTD4p7dNdloedl40wOiWVpmKs/B/pM293DIxfJHP4F8R+GuqSVzRmZTRouNjWwl2tVZi4Ut0HZbU +JtQIBFnQmA4O5t78w+wfkPECAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC +AQYwHQYDVR0OBBYEFHwMMh+n2TB/xH1oo2Kooc6rB1snMA0GCSqGSIb3DQEBCwUAA4IBAQARWfol +TwNvlJk7mh+ChTnUdgWUXuEok21iXQnCoKjUsHU48TRqneSfioYmUeYs0cYtbpUgSpIB7LiKZ3sx +4mcujJUDJi5DnUox9g61DLu34jd/IroAow57UvtruzvE03lRTs2Q9GcHGcg8RnoNAX3FWOdt5oUw +F5okxBDgBPfg8n/Uqgr/Qh037ZTlZFkSIHc40zI+OIF1lnP6aI+xy84fxez6nH7PfrHxBy22/L/K +pL/QlwVKvOoYKAKQvVR4CSFx09F9HdkWsKlhPdAKACL8x3vLCWRFCztAgfd9fDL1mMpYjn0q7pBZ +c2T5NnReJaH1ZgUufzkVqSr7UIuOhWn0 +-----END CERTIFICATE----- + +Starfield Services Root Certificate Authority - G2 +================================================== +-----BEGIN CERTIFICATE----- +MIID7zCCAtegAwIBAgIBADANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UEBhMCVVMxEDAOBgNVBAgT +B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNobm9s +b2dpZXMsIEluYy4xOzA5BgNVBAMTMlN0YXJmaWVsZCBTZXJ2aWNlcyBSb290IENlcnRpZmljYXRl +IEF1dGhvcml0eSAtIEcyMB4XDTA5MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgZgxCzAJBgNV +BAYT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53Tym1+NH4Nn3J2ixufcv1SNUFFApYvHLKac0kh +sUlHRUe072o0EclNmsxZt9YCnlpOZbWUrhvfKbAW8b8Angc6F2S1BLUjIZkKlTuXfO8= +-----END CERTIFICATE----- + +AffirmTrust Networking +====================== +-----BEGIN CERTIFICATE----- +MIIDTDCCAjSgAwIBAgIIfE8EORzUmS0wDQYJKoZIhvcNAQEFBQAwRDELMAkGA1UEBhMCVVMxFDAS +BgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBOZXR3b3JraW5nMB4XDTEw +MDEyOTE0MDgyNFoXDTMwMTIzMTE0MDgyNFowRDELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmly +bVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBOZXR3b3JraW5nMIIBIjANBgkqhkiG9w0BAQEF +AAOCAQ8AMIIBCgKCAQEAtITMMxcua5Rsa2FSoOujz3mUTOWUgJnLVWREZY9nZOIG41w3SfYvm4SE +Hi3yYJ0wTsyEheIszx6e/jarM3c1RNg1lho9Nuh6DtjVR6FqaYvZ/Ls6rnla1fTWcbuakCNrmreI +dIcMHl+5ni36q1Mr3Lt2PpNMCAiMHqIjHNRqrSK6mQEubWXLviRmVSRLQESxG9fhwoXA3hA/Pe24 +/PHxI1Pcv2WXb9n5QHGNfb2V1M6+oF4nI979ptAmDgAp6zxG8D1gvz9Q0twmQVGeFDdCBKNwV6gb +h+0t+nvujArjqWaJGctB+d1ENmHP4ndGyH329JKBNv3bNPFyfvMMFr20FQIDAQABo0IwQDAdBgNV +HQ4EFgQUBx/S55zawm6iQLSwelAQUHTEyL0wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC +AQYwDQYJKoZIhvcNAQEFBQADggEBAIlXshZ6qML91tmbmzTCnLQyFE2npN/svqe++EPbkTfOtDIu +UFUaNU52Q3Eg75N3ThVwLofDwR1t3Mu1J9QsVtFSUzpE0nPIxBsFZVpikpzuQY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ICATE----- + +AffirmTrust Premium ECC +======================= +-----BEGIN CERTIFICATE----- +MIIB/jCCAYWgAwIBAgIIdJclisc/elQwCgYIKoZIzj0EAwMwRTELMAkGA1UEBhMCVVMxFDASBgNV +BAoMC0FmZmlybVRydXN0MSAwHgYDVQQDDBdBZmZpcm1UcnVzdCBQcmVtaXVtIEVDQzAeFw0xMDAx +MjkxNDIwMjRaFw00MDEyMzExNDIwMjRaMEUxCzAJBgNVBAYTAlVTMRQwEgYDVQQKDAtBZmZpcm1U +cnVzdDEgMB4GA1UEAwwXQWZmaXJtVHJ1c3QgUHJlbWl1bSBFQ0MwdjAQBgcqhkjOPQIBBgUrgQQA +IgNiAAQNMF4bFZ0D0KF5Nbc6PJJ6yhUczWLznCZcBz3lVPqj1swS6vQUX+iOGasvLkjmrBhDeKzQ +N8O9ss0s5kfiGuZjuD0uL3jET9v0D6RoTFVya5UdThhClXjMNzyR4ptlKymjQjBAMB0GA1UdDgQW +BBSaryl6wBE1NSZRMADDav5A1a7WPDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAK +BggqhkjOPQQDAwNnADBkAjAXCfOHiFBar8jAQr9HX/VsaobgxCd05DhT1wV/GzTjxi+zygk8N53X +57hG8f2h4nECMEJZh0PUUd+60wkyWs6Iflc9nF9Ca/UHLbXwgpP5WW+uZPpY5Yse42O+tYHNbwKM +eQ== +-----END CERTIFICATE----- + +Certum Trusted Network CA +========================= +-----BEGIN CERTIFICATE----- +MIIDuzCCAqOgAwIBAgIDBETAMA0GCSqGSIb3DQEBBQUAMH4xCzAJBgNVBAYTAlBMMSIwIAYDVQQK +ExlVbml6ZXRvIFRlY2hub2xvZ2llcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2VydGlmaWNhdGlv +biBBdXRob3JpdHkxIjAgBgNVBAMTGUNlcnR1bSBUcnVzdGVkIE5ldHdvcmsgQ0EwHhcNMDgxMDIy +MTIwNzM3WhcNMjkxMjMxMTIwNzM3WjB+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ZuWW/Bd22Ql095gBIgl4g9xGC3srYn+Y3RyYe63j3YcNBZFgCQfna +4NH4+ej9Uji29YnfAgMBAAGjWzBZMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0G +A1UdDgQWBBQNjLZh2kS40RR9w759XkjwzspqsDAXBgNVHSAEEDAOMAwGCiqBegFWAgIAAQEwDQYJ +KoZIhvcNAQEFBQADggIBACQ+YAZ+He86PtvqrxyaLAEL9MW12Ukx9F1BjYkMTv9sov3/4gbIOZ/x +WqndIlgVqIrTseYyCYIDbNc/CMf4uboAbbnW/FIyXaR/pDGUu7ZMOH8oMDX/nyNTt7buFHAAQCva +R6s0fl6nVjBhK4tDrP22iCj1a7Y+YEq6QpA0Z43q619FVDsXrIvkxmUP7tCMXWY5zjKn2BCXwH40 +nJ+U8/aGH88bc62UeYdocMMzpXDn2NU4lG9jeeu/Cg4I58UvD0KgKxRA/yHgBcUn4YQRE7rWhh1B +CxMjidPJC+iKunqjo3M3NYB9Ergzd0A4wPpeMNLytqOx1qKVl4GbUu1pTP+A5FPbVFsDbVRfsbjv +JL1vnxHDx2TCDyhihWZeGnuyt++uNckZM6i4J9szVb9o4XVIRFb7zdNIu0eJOqxp9YDG5ERQL1TE +qkPFMTFYvZbF6nVsmnWxTfj3l/+WFvKXTej28xH5On2KOG4Ey+HTRRWqpdEdnV1j6CTmNhTih60b +WfVEm/vXd3wfAXBioSAaosUaKPQhA+4u2cGA6rnZgtZbdsLLO7XSAPCjDuGtbkD326C00EauFddE +wk01+dIL8hf2rGbVJLJP0RyZwG71fet0BLj5TXcJ17TPBzAJ8bgAVtkXFhYKK4bfjwEZGuW7gmP/ +vgt2Fl43N+bYdJeimUV5 +-----END CERTIFICATE----- + +Root CA Generalitat Valenciana +============================== +-----BEGIN CERTIFICATE----- +MIIGizCCBXOgAwIBAgIEO0XlaDANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJFUzEfMB0GA1UE +ChMWR2VuZXJhbGl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AQEAVdRU0VlIXLOThaq/Yy/kgM40 +ozRiPvbY7meIMQQDbwvUB/tOdQ/TLtPAF8fGKOwGDREkDg6lXb+MshOWcdzUzg4NCmgybLlBMRmr +sQd7TZjTXLDR8KdCoLXEjq/+8T/0709GAHbrAvv5ndJAlseIOrifEXnzgGWovR/TeIGgUUw3tKZd +JXDRZslo+S4RFGjxVJgIrCaSD96JntT6s3kr0qN51OyLrIdTaEJMUVF0HhsnLuP1Hyl0Te2v9+GS +mYHovjrHF1D2t8b8m7CKa9aIA5GPBnc6hQLdmNVDeD/GMBWsm2vLV7eJUYs66MmEDNuxUCAKGkq6 +ahq97BvIxYSazQ== +-----END CERTIFICATE----- + +TWCA Root Certification Authority +================================= +-----BEGIN CERTIFICATE----- +MIIDezCCAmOgAwIBAgIBATANBgkqhkiG9w0BAQUFADBfMQswCQYDVQQGEwJUVzESMBAGA1UECgwJ +VEFJV0FOLUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFUV0NBIFJvb3QgQ2VydGlmaWNh +dGlvbiBBdXRob3JpdHkwHhcNMDgwODI4MDcyNDMzWhcNMzAxMjMxMTU1OTU5WjBfMQswCQYDVQQG +EwJUVzESMBAGA1UECgwJVEFJV0FOLUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFUV0NB +IFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK +AoIBAQCwfnK4pAOU5qfeCTiRShFAh6d8WWQUe7UREN3+v9XAu1bihSX0NXIP+FPQQeFEAcK0HMMx +QhZHhTMidrIKbw/lJVBPhYa+v5guEGcevhEFhgWQxFnQfHgQsIBct+HHK3XLfJ+utdGdIzdjp9xC +oi2SBBtQwXu4PhvJVgSLL1KbralW6cH/ralYhzC2gfeXRfwZVzsrb+RH9JlF/h3x+JejiB03HFyP +4HYlmlD4oFT/RJB2I9IyxsOrBr/8+7/zrX2SYgJbKdM1o5OaQ2RgXbL6Mv87BK9NQGr5x+PvI/1r +y+UPizgN7gr8/g+YnzAx3WxSZfmLgb4i4RxYA7qRG4kHAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIB +BjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRqOFsmjd6LWvJPelSDGRjjCDWmujANBgkqhkiG +9w0BAQUFAAOCAQEAPNV3PdrfibqHDAhUaiBQkr6wQT25JmSDCi/oQMCXKCeCMErJk/9q56YAf4lC +mtYR5VPOL8zy2gXE/uJQxDqGfczafhAJO5I1KlOy/usrBdlsXebQ79NqZp4VKIV66IIArB6nCWlW +QtNoURi+VJq/REG6Sb4gumlc7rh3zc5sH62Dlhh9DrUUOYTxKOkto557HnpyWoOzeW/vtPzQCqVY +T0bf+215WfKEIlKuD8z7fDvnaspHYcN6+NOSBB+4IIThNlQWx0DeO4pz3N/GCUzf7Nr/1FNCocny +Yh0igzyXxfkZYiesZSLX0zzG5Y6yU8xJzrww/nsOM5D77dIUkR8Hrw== +-----END CERTIFICATE----- + +Security Communication RootCA2 +============================== +-----BEGIN CERTIFICATE----- +MIIDdzCCAl+gAwIBAgIBADANBgkqhkiG9w0BAQsFADBdMQswCQYDVQQGEwJKUDElMCMGA1UEChMc +U0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEnMCUGA1UECxMeU2VjdXJpdHkgQ29tbXVuaWNh +dGlvbiBSb290Q0EyMB4XDTA5MDUyOTA1MDAzOVoXDTI5MDUyOTA1MDAzOVowXTELMAkGA1UEBhMC +SlAxJTAjBgNVBAoTHFNFQ09NIFRydXN0IFN5c3RlbXMgQ08uLExURC4xJzAlBgNVBAsTHlNlY3Vy +aXR5IENvbW11bmljYXRpb24gUm9vdENBMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB +ANAVOVKxUrO6xVmCxF1SrjpDZYBLx/KWvNs2l9amZIyoXvDjChz335c9S672XewhtUGrzbl+dp++ ++T42NKA7wfYxEUV0kz1XgMX5iZ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UFBwIBFiBodHRwczovL3d3dy5jYXRjZXJ0 +Lm5ldC92ZXJhcnJlbDA1BggrBgEFBQcCAjApGidWZWdldSBodHRwczovL3d3dy5jYXRjZXJ0Lm5l +dC92ZXJhcnJlbCAwDQYJKoZIhvcNAQEFBQADggEBAKBIW4IB9k1IuDlVNZyAelOZ1Vr/sXE7zDkJ +lF7W2u++AVtd0x7Y/X1PzaBB4DSTv8vihpw3kpBWHNzrKQXlxJ7HNd+KDM3FIUPpqojlNcAZQmNa +Al6kSBg6hW/cnbw/nZzBh7h6YQjpdwt/cKt63dmXLGQehb+8dJahw3oS7AwaboMMPOhyRp/7SNVe +l+axofjk70YllJyJ22k4vuxcDlbHZVHlUIiIv0LVKz3l+bqeLrPK9HOSAgu+TGbrIP65y7WZf+a2 +E/rKS03Z7lNGBjvGTq2TWoF+bCpLagVFjPIhpDGQh2xlnJ2lYJU6Un/10asIbvPuW/mIPX64b24D +5EI= +-----END CERTIFICATE----- diff --git a/application/config/config.php b/application/config/config.php new file mode 100644 index 0000000..79e0d16 --- /dev/null +++ b/application/config/config.php @@ -0,0 +1,569 @@ +]+$/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'] = IP_DEBUG ? 2 : 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 +| +| Example usage: +| +| $this->encryption->initialize( +| array( +| 'cipher' => 'aes-256', +| 'key' => $key, +| ) +| ); +| $plain_text = 'This is a plain-text message!'; +| $ciphertext = $this->encryption->encrypt($plain_text); +| $decrypted_text = $this->encryption->decrypt($ciphertext); +| +*/ +$config['encryption_cipher'] = env('ENCRYPTION_CIPHER'); +$config['encryption_key'] = env('ENCRYPTION_KEY'); + +/* +|-------------------------------------------------------------------------- +| 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'] = env('SESS_DRIVER', 'files'); +$config['sess_table_name'] = env('SESS_DRIVER', 'ip_sessions'); +$config['sess_cookie_name'] = env('SESS_DRIVER', 'ip_session'); +$config['sess_expiration'] = env('SESS_EXPIRATION', 864000); +$config['sess_save_path'] = sys_get_temp_dir(); +$config['sess_match_ip'] = env('SESS_MATCH_IP', true); +$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'] = env('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'] = env('CSRF_PROTECTION', true); +$config['csrf_token_name'] = '_ip_csrf'; +$config['csrf_cookie_name'] = 'ip_csrf_cookie'; +$config['csrf_expire'] = 3600; +$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/application/config/constants.php b/application/config/constants.php new file mode 100644 index 0000000..f29ccf2 --- /dev/null +++ b/application/config/constants.php @@ -0,0 +1,85 @@ +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' => getenv('DB_HOSTNAME'), + 'port' => getenv('DB_PORT'), + 'username' => getenv('DB_USERNAME'), + 'password' => getenv('DB_PASSWORD'), + 'database' => getenv('DB_DATABASE'), + 'dbdriver' => 'mysqli', + 'dbprefix' => '', + 'pconnect' => FALSE, + 'db_debug' => (ENVIRONMENT !== 'production'), + 'cache_on' => FALSE, + 'cachedir' => '', + 'char_set' => 'utf8', + 'dbcollat' => 'utf8_general_ci', + 'swap_pre' => '', + 'encrypt' => FALSE, + 'compress' => FALSE, + 'stricton' => FALSE, + 'failover' => array(), + 'save_queries' => TRUE +); diff --git a/application/config/doctypes.php b/application/config/doctypes.php new file mode 100644 index 0000000..0672993 --- /dev/null +++ b/application/config/doctypes.php @@ -0,0 +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' => '' +); diff --git a/application/config/foreign_chars.php b/application/config/foreign_chars.php new file mode 100644 index 0000000..7554d37 --- /dev/null +++ b/application/config/foreign_chars.php @@ -0,0 +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' +); diff --git a/application/config/hooks.php b/application/config/hooks.php new file mode 100644 index 0000000..7b468b6 --- /dev/null +++ b/application/config/hooks.php @@ -0,0 +1,20 @@ + 'SetTimezoneClass', + 'function' => 'setTimezone', + 'filename' => 'SetTimezoneClass.php', + 'filepath' => 'hooks' +); diff --git a/application/config/index.html b/application/config/index.html new file mode 100644 index 0000000..04e928c --- /dev/null +++ b/application/config/index.html @@ -0,0 +1,10 @@ + + + 403 Forbidden + + + +

Directory access is forbidden.

+ + + \ No newline at end of file diff --git a/application/config/invoice_plane.php b/application/config/invoice_plane.php new file mode 100644 index 0000000..6a78fd0 --- /dev/null +++ b/application/config/invoice_plane.php @@ -0,0 +1,25 @@ + array( + 'first_link' => '‹‹', + 'next_link' => '›', + 'prev_link' => '‹', + 'last_link' => '››', + 'full_tag_open' => '', + 'first_tag_open' => '
  • ', + 'first_tag_close' => '
  • ', + 'last_tag_open' => '
  • ', + 'last_tag_close' => '
  • ', + 'cur_tag_open' => '
  • ', + 'cur_tag_close' => '
  • ', + 'next_tag_open' => '
  • ', + 'next_tag_close' => '
  • ', + 'prev_tag_open' => '
  • ', + 'prev_tag_close' => '
  • ', + 'num_links' => '10' + ), + +); \ No newline at end of file diff --git a/application/config/memcached.php b/application/config/memcached.php new file mode 100644 index 0000000..a730882 --- /dev/null +++ b/application/config/memcached.php @@ -0,0 +1,19 @@ + array( + 'hostname' => '127.0.0.1', + 'port' => '11211', + 'weight' => '1', + ), +); diff --git a/application/config/migration.php b/application/config/migration.php new file mode 100644 index 0000000..022c1a7 --- /dev/null +++ b/application/config/migration.php @@ -0,0 +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/'; diff --git a/application/config/mimes.php b/application/config/mimes.php new file mode 100644 index 0000000..68e7a97 --- /dev/null +++ b/application/config/mimes.php @@ -0,0 +1,183 @@ + 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', + '7zip' => array('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/application/config/payment_gateways.php b/application/config/payment_gateways.php new file mode 100644 index 0000000..7b20664 --- /dev/null +++ b/application/config/payment_gateways.php @@ -0,0 +1,504 @@ + array( + 'apiLoginId' => array( + 'type' => 'text', + 'label' => 'Api Login Id', + ), + 'transactionKey' => array( + 'type' => 'text', + 'label' => 'Transaction Key', + ), + 'testMode' => array( + 'type' => 'checkbox', + 'label' => 'Test Mode', + ), + 'developerMode' => array( + 'type' => 'checkbox', + 'label' => 'Developer Mode', + ), + //'liveEndpoint' => array( + // 'type' => 'text', + // 'label' => 'Live Endpoint', + //), + //'developerEndpoint' => array( + // 'type' => 'text', + // 'label' => 'Developer Endpoint', + //), + ), + 'AuthorizeNet_SIM' => array( + 'apiLoginId' => array( + 'type' => 'text', + 'label' => 'Api Login Id', + ), + 'transactionKey' => array( + 'type' => 'text', + 'label' => 'Transaction Key', + ), + 'testMode' => array( + 'type' => 'checkbox', + 'label' => 'Test Mode', + ), + 'developerMode' => array( + 'type' => 'checkbox', + 'label' => 'Developer Mode', + ), + //'liveEndpoint' => array( + // 'type' => 'text', + // 'label' => 'Live Endpoint', + //), + //'developerEndpoint' => array( + // 'type' => 'text', + // 'label' => 'Developer Endpoint', + //), + //'hashSecret' => array( + // 'type' => 'text', + // 'label' => 'Hash Secret', + //), + ), + 'Buckaroo_Ideal' => array( + 'websiteKey' => array( + 'type' => 'text', + 'label' => 'Website Key', + ), + 'secretKey' => array( + 'type' => 'password', + 'label' => 'Secret Key', + ), + 'testMode' => array( + 'type' => 'checkbox', + 'label' => 'Test Mode', + ), + ), + 'Buckaroo_PayPal' => array( + 'websiteKey' => array( + 'type' => 'text', + 'label' => 'Website Key', + ), + 'secretKey' => array( + 'type' => 'password', + 'label' => 'Secret Key', + ), + 'testMode' => array( + 'type' => 'checkbox', + 'label' => 'Test Mode', + ), + ), + 'CardSave' => array( + 'merchantId' => array( + 'type' => 'text', + 'label' => 'Merchant Id', + ), + 'password' => array( + 'type' => 'password', + 'label' => 'Password', + ), + ), + 'Coinbase' => array( + 'apiKey' => array( + 'type' => 'text', + 'label' => 'Api Key', + ), + 'secret' => array( + 'type' => 'password', + 'label' => 'Secret', + ), + 'accountId' => array( + 'type' => 'text', + 'label' => 'Account Id', + ), + ), + 'Eway_Rapid' => array( + 'apiKey' => array( + 'type' => 'text', + 'label' => 'Api Key', + ), + 'password' => array( + 'type' => 'password', + 'label' => 'Password', + ), + 'testMode' => array( + 'type' => 'checkbox', + 'label' => 'Test Mode', + ), + ), + 'FirstData_Connect' => array( + 'storeId' => array( + 'type' => 'text', + 'label' => 'Store Id', + ), + 'sharedSecret' => array( + 'type' => 'password', + 'label' => 'Shared Secret', + ), + 'testMode' => array( + 'type' => 'checkbox', + 'label' => 'Test Mode', + ), + ), + 'GoCardless' => array( + 'appId' => array( + 'type' => 'text', + 'label' => 'App Id', + ), + 'appSecret' => array( + 'type' => 'password', + 'label' => 'App Secret', + ), + 'merchantId' => array( + 'type' => 'text', + 'label' => 'Merchant Id', + ), + 'accessToken' => array( + 'type' => 'text', + 'label' => 'Access Token', + ), + 'testMode' => array( + 'type' => 'checkbox', + 'label' => 'Test Mode', + ), + ), + 'Migs_ThreeParty' => array( + 'merchantId' => array( + 'type' => 'text', + 'label' => 'Merchant Id', + ), + 'merchantAccessCode' => array( + 'type' => 'text', + 'label' => 'Merchant Access Code', + ), + 'secureHash' => array( + 'type' => 'text', + 'label' => 'Secure Hash', + ), + ), + 'Migs_TwoParty' => array( + 'merchantId' => array( + 'type' => 'text', + 'label' => 'Merchant Id', + ), + 'merchantAccessCode' => array( + 'type' => 'text', + 'label' => 'Merchant Access Code', + ), + 'secureHash' => array( + 'type' => 'text', + 'label' => 'Secure Hash', + ), + ), + 'Mollie' => array( + 'apiKey' => array( + 'type' => 'text', + 'label' => 'Api Key', + ), + ), + 'MultiSafepay' => array( + 'accountId' => array( + 'type' => 'text', + 'label' => 'Account Id', + ), + 'siteId' => array( + 'type' => 'text', + 'label' => 'Site Id', + ), + 'siteCode' => array( + 'type' => 'text', + 'label' => 'Site Code', + ), + 'testMode' => array( + 'type' => 'checkbox', + 'label' => 'Test Mode', + ), + ), + 'Netaxept' => array( + 'merchantId' => array( + 'type' => 'text', + 'label' => 'Merchant Id', + ), + 'password' => array( + 'type' => 'password', + 'label' => 'Password', + ), + 'testMode' => array( + 'type' => 'checkbox', + 'label' => 'Test Mode', + ), + ), + 'NetBanx' => array( + 'accountNumber' => array( + 'type' => 'text', + 'label' => 'Account Number', + ), + 'storeId' => array( + 'type' => 'text', + 'label' => 'Store Id', + ), + 'storePassword' => array( + 'type' => 'password', + 'label' => 'Store Password', + ), + 'testMode' => array( + 'type' => 'checkbox', + 'label' => 'Test Mode', + ), + ), + 'PayFast' => array( + 'merchantId' => array( + 'type' => 'text', + 'label' => 'Merchant Id', + ), + 'merchantKey' => array( + 'type' => 'text', + 'label' => 'Merchant Key', + ), + 'pdtKey' => array( + 'type' => 'text', + 'label' => 'Pdt Key', + ), + 'testMode' => array( + 'type' => 'checkbox', + 'label' => 'Test Mode', + ), + ), + 'Payflow_Pro' => array( + 'username' => array( + 'type' => 'text', + 'label' => 'Username', + ), + 'password' => array( + 'type' => 'password', + 'label' => 'Password', + ), + 'vendor' => array( + 'type' => 'text', + 'label' => 'Vendor', + ), + 'partner' => array( + 'type' => 'text', + 'label' => 'Partner', + ), + 'testMode' => array( + 'type' => 'checkbox', + 'label' => 'Test Mode', + ), + ), + 'PaymentExpress_PxPay' => array( + 'username' => array( + 'type' => 'text', + 'label' => 'Username', + ), + 'password' => array( + 'type' => 'password', + 'label' => 'Password', + ), + 'pxPostUsername' => array( + 'type' => 'text', + 'label' => 'Px Post Username', + ), + 'pxPostPassword' => array( + 'type' => 'password', + 'label' => 'Px Post Password', + ), + 'testMode' => array( + 'type' => 'checkbox', + 'label' => 'Test Mode', + ), + ), + 'PaymentExpress_PxPost' => array( + 'username' => array( + 'type' => 'text', + 'label' => 'Username', + ), + 'password' => array( + 'type' => 'password', + 'label' => 'Password', + ), + 'testMode' => array( + 'type' => 'checkbox', + 'label' => 'Test Mode', + ), + ), + 'PayPal_Express' => array( + 'username' => array( + 'type' => 'text', + 'label' => 'Username', + ), + 'password' => array( + 'type' => 'password', + 'label' => 'Password', + ), + 'signature' => array( + 'type' => 'password', + 'label' => 'Signature', + ), + 'testMode' => array( + 'type' => 'checkbox', + 'label' => 'Test Mode', + ), + //'solutionType' => array( + // 'type' => 'text', + // 'label' => 'Solution Type', + //), + //'landingPage' => array( + // 'type' => 'text', + // 'label' => 'Landing Page', + //), + //'brandName' => array( + // 'type' => 'text', + // 'label' => 'Brand Name', + //), + //'headerImageUrl' => array( + // 'type' => 'text', + // 'label' => 'Header Image Url', + //), + //'logoImageUrl' => array( + // 'type' => 'text', + // 'label' => 'Logo Image Url', + //), + //'borderColor' => array( + // 'type' => 'text', + // 'label' => 'Border Color', + //), + ), + 'PayPal_Pro' => array( + 'username' => array( + 'type' => 'text', + 'label' => 'Username', + ), + 'password' => array( + 'type' => 'password', + 'label' => 'Password', + ), + 'signature' => array( + 'type' => 'text', + 'label' => 'Signature', + ), + 'testMode' => array( + 'type' => 'checkbox', + 'label' => 'Test Mode', + ), + ), + 'Pin' => array( + 'secretKey' => array( + 'type' => 'password', + 'label' => 'Secret Key', + ), + 'testMode' => array( + 'type' => 'checkbox', + 'label' => 'Test Mode', + ), + ), + 'SagePay_Direct' => array( + 'vendor' => array( + 'type' => 'text', + 'label' => 'Vendor', + ), + 'testMode' => array( + 'type' => 'checkbox', + 'label' => 'Test Mode', + ), + 'referrerId' => array( + 'type' => 'text', + 'label' => 'Referrer Id', + ), + ), + 'SagePay_Server' => array( + 'vendor' => array( + 'type' => 'text', + 'label' => 'Vendor', + ), + 'testMode' => array( + 'type' => 'checkbox', + 'label' => 'Test Mode', + ), + 'referrerId' => array( + 'type' => 'text', + 'label' => 'Referrer Id', + ), + ), + 'SecurePay_DirectPost' => array( + 'merchantId' => array( + 'type' => 'text', + 'label' => 'Merchant Id', + ), + 'transactionPassword' => array( + 'type' => 'password', + 'label' => 'Transaction Password', + ), + 'testMode' => array( + 'type' => 'checkbox', + 'label' => 'Test Mode', + ), + ), + 'Stripe' => array( + 'apiKey' => array( + 'type' => 'password', + 'label' => 'Api Key', + ), + ), + 'TargetPay_Directebanking' => array( + 'subAccountId' => array( + 'type' => 'text', + 'label' => 'Sub Account Id', + ), + ), + 'TargetPay_Ideal' => array( + 'subAccountId' => array( + 'type' => 'text', + 'label' => 'Sub Account Id', + ), + ), + 'TargetPay_Mrcash' => array( + 'subAccountId' => array( + 'type' => 'text', + 'label' => 'Sub Account Id', + ), + ), + 'TwoCheckout' => array( + 'accountNumber' => array( + 'type' => 'text', + 'label' => 'Account Number', + ), + 'secretWord' => array( + 'type' => 'password', + 'label' => 'Secret Word', + ), + 'testMode' => array( + 'type' => 'checkbox', + 'label' => 'Test Mode', + ), + ), + 'WorldPay' => array( + 'installationId' => array( + 'type' => 'text', + 'label' => 'Installation Id', + ), + 'accountId' => array( + 'type' => 'text', + 'label' => 'Account Id', + ), + 'secretWord' => array( + 'type' => 'password', + 'label' => 'Secret Word', + ), + 'callbackPassword' => array( + 'type' => 'password', + 'label' => 'Callback Password', + ), + 'testMode' => array( + 'type' => 'checkbox', + 'label' => 'Test Mode', + ), + ), +); \ No newline at end of file diff --git a/application/config/profiler.php b/application/config/profiler.php new file mode 100644 index 0000000..3db22e3 --- /dev/null +++ b/application/config/profiler.php @@ -0,0 +1,14 @@ + my_controller/index +| my-controller/my-method -> my_controller/my_method +*/ +$route['default_controller'] = 'dashboard'; +$route['404_override'] = ''; +$route['translate_uri_dashes'] = FALSE; diff --git a/application/config/smileys.php b/application/config/smileys.php new file mode 100644 index 0000000..ea3b505 --- /dev/null +++ b/application/config/smileys.php @@ -0,0 +1,63 @@ + 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/application/config/user_agents.php b/application/config/user_agents.php new file mode 100644 index 0000000..b12a261 --- /dev/null +++ b/application/config/user_agents.php @@ -0,0 +1,214 @@ + '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' => 'Spartan', + 'Chrome' => 'Chrome', + // Opera 10+ always reports Opera/9.80 and appends Version/ to the user agent string + 'Opera.*?Version' => 'Opera', + 'Opera' => 'Opera', + 'MSIE' => 'Internet Explorer', + 'Internet Explorer' => 'Internet Explorer', + 'Trident.* rv' => 'Internet Explorer', + 'Shiira' => 'Shiira', + 'Firefox' => 'Firefox', + 'Chimera' => 'Chimera', + 'Phoenix' => 'Phoenix', + 'Firebird' => 'Firebird', + 'Camino' => 'Camino', + 'Netscape' => 'Netscape', + 'OmniWeb' => 'OmniWeb', + 'Safari' => 'Safari', + 'Mozilla' => 'Mozilla', + 'Konqueror' => 'Konqueror', + 'icab' => 'iCab', + 'Lynx' => 'Lynx', + 'Links' => 'Links', + 'hotjava' => 'HotJava', + 'amaya' => 'Amaya', + 'IBrowse' => 'IBrowse', + 'Maxthon' => 'Maxthon', + 'Ubuntu' => 'Ubuntu Web Browser' +); + +$mobiles = array( + // legacy array, old values commented out + 'mobileexplorer' => 'Mobile Explorer', +// 'openwave' => 'Open Wave', +// 'opera mini' => 'Opera Mini', +// 'operamini' => 'Opera Mini', +// 'elaine' => 'Palm', + 'palmsource' => 'Palm', +// 'digital paths' => 'Palm', +// 'avantgo' => 'Avantgo', +// 'xiino' => 'Xiino', + 'palmscape' => 'Palmscape', +// 'nokia' => 'Nokia', +// 'ericsson' => 'Ericsson', +// 'blackberry' => 'BlackBerry', +// 'motorola' => 'Motorola' + + // Phones and Manufacturers + 'motorola' => 'Motorola', + 'nokia' => 'Nokia', + 'palm' => 'Palm', + 'iphone' => 'Apple iPhone', + 'ipad' => 'iPad', + 'ipod' => 'Apple iPod Touch', + 'sony' => 'Sony Ericsson', + 'ericsson' => 'Sony Ericsson', + 'blackberry' => 'BlackBerry', + 'cocoon' => 'O2 Cocoon', + 'blazer' => 'Treo', + 'lg' => 'LG', + 'amoi' => 'Amoi', + 'xda' => 'XDA', + 'mda' => 'MDA', + 'vario' => 'Vario', + 'htc' => 'HTC', + 'samsung' => 'Samsung', + 'sharp' => 'Sharp', + 'sie-' => 'Siemens', + 'alcatel' => 'Alcatel', + 'benq' => 'BenQ', + 'ipaq' => 'HP iPaq', + 'mot-' => 'Motorola', + 'playstation portable' => 'PlayStation Portable', + 'playstation 3' => 'PlayStation 3', + 'playstation vita' => 'PlayStation Vita', + 'hiptop' => 'Danger Hiptop', + 'nec-' => 'NEC', + 'panasonic' => 'Panasonic', + 'philips' => 'Philips', + 'sagem' => 'Sagem', + 'sanyo' => 'Sanyo', + 'spv' => 'SPV', + 'zte' => 'ZTE', + 'sendo' => 'Sendo', + 'nintendo dsi' => 'Nintendo DSi', + 'nintendo ds' => 'Nintendo DS', + 'nintendo 3ds' => 'Nintendo 3DS', + 'wii' => 'Nintendo Wii', + 'open web' => 'Open Web', + 'openweb' => 'OpenWeb', + + // Operating Systems + 'android' => 'Android', + 'symbian' => 'Symbian', + 'SymbianOS' => 'SymbianOS', + 'elaine' => 'Palm', + 'series60' => 'Symbian S60', + 'windows ce' => 'Windows CE', + + // Browsers + 'obigo' => 'Obigo', + 'netfront' => 'Netfront Browser', + 'openwave' => 'Openwave Browser', + 'mobilexplorer' => 'Mobile Explorer', + 'operamini' => 'Opera Mini', + 'opera mini' => 'Opera Mini', + 'opera mobi' => 'Opera Mobile', + 'fennec' => 'Firefox Mobile', + + // Other + 'digital paths' => 'Digital Paths', + 'avantgo' => 'AvantGo', + 'xiino' => 'Xiino', + 'novarra' => 'Novarra Transcoder', + 'vodafone' => 'Vodafone', + 'docomo' => 'NTT DoCoMo', + 'o2' => 'O2', + + // Fallback + 'mobile' => 'Generic Mobile', + 'wireless' => 'Generic Mobile', + 'j2me' => 'Generic Mobile', + 'midp' => 'Generic Mobile', + 'cldc' => 'Generic Mobile', + 'up.link' => 'Generic Mobile', + 'up.browser' => 'Generic Mobile', + 'smartphone' => 'Generic Mobile', + 'cellphone' => 'Generic Mobile' +); + +// There are hundreds of bots but these are the most common. +$robots = array( + 'googlebot' => 'Googlebot', + 'msnbot' => 'MSNBot', + 'baiduspider' => 'Baiduspider', + 'bingbot' => 'Bing', + 'slurp' => 'Inktomi Slurp', + 'yahoo' => 'Yahoo', + 'ask jeeves' => 'Ask Jeeves', + 'fastcrawler' => 'FastCrawler', + 'infoseek' => 'InfoSeek Robot 1.0', + 'lycos' => 'Lycos', + 'yandex' => 'YandexBot', + 'mediapartners-google' => 'MediaPartners Google', + 'CRAZYWEBCRAWLER' => 'Crazy Webcrawler', + 'adsbot-google' => 'AdsBot Google', + 'feedfetcher-google' => 'Feedfetcher Google', + 'curious george' => 'Curious George', + 'ia_archiver' => 'Alexa Crawler', + 'MJ12bot' => 'Majestic-12', + 'Uptimebot' => 'Uptimebot' +); diff --git a/application/controllers/Welcome.php b/application/controllers/Welcome.php new file mode 100644 index 0000000..f5c4419 --- /dev/null +++ b/application/controllers/Welcome.php @@ -0,0 +1,25 @@ + + * @see https://codeigniter.com/user_guide/general/urls.html + */ + public function index() + { + $this->load->view('welcome_message'); + } +} diff --git a/application/controllers/index.html b/application/controllers/index.html new file mode 100644 index 0000000..43a0179 --- /dev/null +++ b/application/controllers/index.html @@ -0,0 +1,10 @@ + + + 403 Forbidden + + + +

    Directory access is forbidden.

    + + + \ No newline at end of file diff --git a/application/core/Admin_Controller.php b/application/core/Admin_Controller.php new file mode 100644 index 0000000..6aa6940 --- /dev/null +++ b/application/core/Admin_Controller.php @@ -0,0 +1,22 @@ +config->load('invoice_plane'); + + // Don't allow non-ajax requests to ajax controllers + if ($this->ajax_controller && !$this->input->is_ajax_request()) { + exit; + } + + // Load basic stuff + $this->load->library('session'); + $this->load->helper('redirect'); + $this->load->helper('url'); + + // Check if database has been configured + if (!env_bool('SETUP_COMPLETED')) { + redirect('/welcome'); + } else { + + $this->load->library('encryption'); + $this->load->library('form_validation'); + $this->load->library('session'); + $this->load->database(); + + $this->load->helper('trans'); + $this->load->helper('number'); + $this->load->helper('pager'); + $this->load->helper('invoice'); + $this->load->helper('date'); + $this->load->helper('form'); + $this->load->helper('echo'); + $this->load->helper('client'); + + // Load setting model and load settings + $this->load->model('settings/mdl_settings'); + $this->mdl_settings->load_settings(); + $this->load->helper('settings'); + + // Load the language based on user config, fall back to system if needed + $user_lang = $this->session->userdata('user_language'); + + if (empty($user_lang) || $user_lang == 'system') { + set_language(get_setting('default_language')); + } else { + set_language($user_lang); + } + + $this->load->helper('language'); + + // Load the layout module to start building the app + $this->load->module('layout'); + + } + } +} diff --git a/application/core/Form_Validation_Model.php b/application/core/Form_Validation_Model.php new file mode 100644 index 0000000..853c01a --- /dev/null +++ b/application/core/Form_Validation_Model.php @@ -0,0 +1,25 @@ +load->library('form_validation'); + $this->form_validation->CI =& $this; + } +} diff --git a/application/core/Guest_Controller.php b/application/core/Guest_Controller.php new file mode 100644 index 0000000..320e001 --- /dev/null +++ b/application/core/Guest_Controller.php @@ -0,0 +1,44 @@ +load->model('user_clients/mdl_user_clients'); + + $user_clients = $this->mdl_user_clients->assigned_to($this->session->userdata('user_id'))->get()->result(); + + if (!$user_clients) { + ?> + + +

    + + + user_clients[$user_client->client_id] = $user_client->client_id; + } + } + +} diff --git a/application/core/MY_Loader.php b/application/core/MY_Loader.php new file mode 100644 index 0000000..a41c48a --- /dev/null +++ b/application/core/MY_Loader.php @@ -0,0 +1,9 @@ +filter[] = array(substr($name, 7), $arguments); + } else { + call_user_func_array(array($this->db, $name), $arguments); + } + return $this; + } + + /** + * Sets CI query object and automatically creates active record query + * based on methods in child model. + * $this->model_name->get() + */ + public function get($include_defaults = true) + { + if ($include_defaults) { + $this->set_defaults(); + } + + $this->run_filters(); + + $this->query = $this->db->get($this->table); + + $this->filter = array(); + + return $this; + } + + /** + * Query builder which listens to methods in child model + * + * @param array $exclude + */ + private function set_defaults($exclude = array()) + { + $native_methods = $this->native_methods; + + foreach ($exclude as $unset_method) { + unset($native_methods[array_search($unset_method, $native_methods)]); + } + + foreach ($native_methods as $native_method) { + $native_method = 'default_' . $native_method; + + if (method_exists($this, $native_method)) { + $this->$native_method(); + } + } + } + + private function run_filters() + { + foreach ($this->filter as $filter) { + call_user_func_array(array($this->db, $filter[0]), $filter[1]); + } + + /** + * Clear the filter array since this should only be run once per model + * execution + */ + $this->filter = array(); + } + + /** + * Call when paginating results + * $this->model_name->paginate() + * + * @param $base_url + * @param int $offset + * @param int $uri_segment + */ + public function paginate($base_url, $offset = 0, $uri_segment = 3) + { + $this->load->helper('url'); + $this->load->library('pagination'); + + $this->offset = $offset; + $default_list_limit = $this->mdl_settings->setting('default_list_limit'); + $per_page = (empty($default_list_limit) ? $this->default_limit : $default_list_limit); + + $this->set_defaults(); + $this->run_filters(); + + $this->db->limit($per_page, $this->offset); + $this->query = $this->db->get($this->table); + + $this->total_rows = $this->db->query('SELECT FOUND_ROWS() AS num_rows')->row()->num_rows; + $this->total_pages = ceil($this->total_rows / $per_page); + $this->previous_offset = $this->offset - $per_page; + $this->next_offset = $this->offset + $per_page; + + $config = array( + 'base_url' => $base_url, + 'total_rows' => $this->total_rows, + 'per_page' => $per_page + ); + + $this->last_offset = ($this->total_pages * $per_page) - $per_page; + + if ($this->config->item('pagination_style')) { + $config = array_merge($config, $this->config->item('pagination_style')); + } + + $this->pagination->initialize($config); + + $this->page_links = $this->pagination->create_links(); + } + + /** + * Function to save an entry to the database + * + * @param null $id + * @param null $db_array + * @return null + */ + public function save($id = null, $db_array = null) + { + + + if (!$db_array) { + $db_array = $this->db_array(); + } + $datetime = date('Y-m-d H:i:s'); + if (!$id) { + if ($this->date_created_field) { + if (is_array($db_array)) { + $db_array[$this->date_created_field] = $datetime; + + if ($this->date_modified_field) { + $db_array[$this->date_modified_field] = $datetime; + } + } else { + $db_array->{$this->date_created_field} = $datetime; + + if ($this->date_modified_field) { + $db_array->{$this->date_modified_field} = $datetime; + } + } + } elseif ($this->date_modified_field) { + if (is_array($db_array)) { + $db_array[$this->date_modified_field] = $datetime; + } else { + $db_array->{$this->date_modified_field} = $datetime; + } + } + + $this->db->insert($this->table, $db_array); + + return $this->db->insert_id(); + } else { + if ($this->date_modified_field) { + if (is_array($db_array)) { + $db_array[$this->date_modified_field] = $datetime; + } else { + $db_array->{$this->date_modified_field} = $datetime; + } + } + + $this->db->where($this->primary_key, $id); + $this->db->update($this->table, $db_array); + + return $id; + } + } + + /** + * Returns an array based on $_POST input matching the ruleset used to + * validate the form submission. + * + * @return array + */ + public function db_array() + { + $db_array = array(); + + $validation_rules = $this->{$this->validation_rules}(); + + foreach ($this->input->post() as $key => $value) { + if (array_key_exists($key, $validation_rules)) { + $db_array[$key] = $value; + } + } + + return $db_array; + } + + /** + * Deletes a record based on primary key value + * $this->model_name->delete(5); + * + * @param $id + */ + public function delete($id) + { + $this->db->where($this->primary_key, $id); + $this->db->delete($this->table); + } + + /** + * Returns the CI query result object + * $this->model_name->get()->result(); + * + * @return mixed + */ + public function result() + { + return $this->query->result(); + } + + /** + * Returns the CI query row object + * $this->model_name->get()->row(); + * + * @return mixed + */ + public function row() + { + return $this->query->row(); + } + + /** + * Returns CI query result array + * $this->model_name->get()->result_array(); + * + * @return mixed + */ + public function result_array() + { + return $this->query->result_array(); + } + + /** + * Returns CI query row array + * $this->model_name->get()->row_array(); + * + * @return mixed + */ + public function row_array() + { + return $this->query->row_array(); + } + + /** + * Returns CI query num_rows() + * $this->model_name->get()->num_rows(); + * + * @return mixed + */ + public function num_rows() + { + return $this->query->num_rows(); + } + + /** + * Used to retrieve record by ID and populate $this->form_values + * + * @param int $id + * @return boolean|null + */ + public function prep_form($id = null) + { + if (!$_POST and ($id)) { + $row = $this->get_by_id($id); + + if ($row) { + foreach ($row as $key => $value) { + $this->form_values[$key] = $value; + } + return true; + } + return false; + } elseif (!$id) { + return true; + } + } + + /** + * Retrieves a single record based on primary key value + * + * @param $id + * @return mixed + */ + public function get_by_id($id) + { + return $this->where($this->primary_key, $id)->get()->row(); + } + + /** + * Performs validation on submitted form. By default, looks for method in + * child model called validation_rules, but can be forced to run validation + * on any method in child model which returns array of validation rules. + * + * @param null|string $validation_rules + * @return mixed + */ + public function run_validation($validation_rules = null) + { + if (!$validation_rules) { + $validation_rules = $this->default_validation_rules; + } + + foreach (array_keys($_POST) as $key) { + $this->form_values[$key] = $this->input->post($key); + } + + if (method_exists($this, $validation_rules)) { + $this->validation_rules = $validation_rules; + + $this->load->library('form_validation'); + + $this->form_validation->set_rules($this->$validation_rules()); + + $run = $this->form_validation->run(); + + $this->validation_errors = validation_errors(); + + return $run; + } + } + + /** + * Returns the assigned form value to a form input element + * + * @param string $key + * @param bool $escape + * @return mixed|string + */ + public function form_value($key, $escape = false) + { + $value = isset($this->form_values[$key]) ? $this->form_values[$key] : ''; + return $escape ? htmlspecialchars($value) : $value; + } + + /** + * @param string $key + * @param $value + */ + public function set_form_value($key, $value) + { + $this->form_values[$key] = $value; + } + + /** + * @param $id + */ + public function set_id($id) + { + $this->id = $id; + } +} diff --git a/application/core/MY_Router.php b/application/core/MY_Router.php new file mode 100644 index 0000000..60b4ab4 --- /dev/null +++ b/application/core/MY_Router.php @@ -0,0 +1,8 @@ +session->set_flashdata('alert_success', trans('record_successfully_updated')); + parent::save($id, $db_array); + } else { + $this->session->set_flashdata('alert_success', trans('record_successfully_created')); + $id = parent::save(null, $db_array); + } + + return $id; + } + + /** + * @param int $id + */ + public function delete($id) + { + parent::delete($id); + + $this->session->set_flashdata('alert_success', trans('record_successfully_deleted')); + } +} diff --git a/application/core/User_Controller.php b/application/core/User_Controller.php new file mode 100644 index 0000000..aff2b02 --- /dev/null +++ b/application/core/User_Controller.php @@ -0,0 +1,31 @@ +session->userdata($required_key) <> $required_val) { + redirect('sessions/login'); + } + } +} diff --git a/application/core/Validator.php b/application/core/Validator.php new file mode 100644 index 0000000..0c77b3f --- /dev/null +++ b/application/core/Validator.php @@ -0,0 +1,252 @@ +form_validation->set_message('validate_date', 'Invalid date'); + return false; + } + + return true; + } + + /** + * @param $value + * @return bool|null + */ + public function validate_boolean($value) + { + if ($value == "0" || $value == "1") { + return true; + } + + if ($value == "") { + return null; + } + + return false; + } + + /** + * @param $value + * @param $key + * @return null + */ + public function validate_singlechoice($value, $key) + { + if ($value == "") { + return null; + } + + $this->load->model('custom_values/mdl_custom_values', 'custom_value'); + $result = $this->custom_value->column_has_value($key, $value); + + return $result; + } + + /** + * @param $value + * @param $key + * @return bool|null + */ + public function validate_multiplechoice($value, $id) + { + if ($value == "") { + return null; + } + + $this->load->model('custom_values/mdl_custom_values', 'custom_value'); + $this->custom_value->where('custom_field_id', $id); + $dbvals = $this->custom_value->where_in('custom_values_id', $value)->get(); + + if ($dbvals->num_rows() == sizeof($value)) { + return true; + } + + return false; + } + + /** + * @return array + */ + public function validation_rules() + { + return array( + 'custom_field_table' => array( + 'field' => 'custom_field_table', + 'label' => trans('table'), + 'rules' => 'required' + ), + 'custom_field_label' => array( + 'field' => 'custom_field_label', + 'label' => trans('label'), + 'rules' => 'required|max_length[50]' + ), + 'custom_field_type' => array( + 'field' => 'custom_field_type', + 'label' => trans('type'), + 'rules' => 'required' + ) + ); + } + + /** + * @param $column + * @return null + */ + public function get_field_type($column) + { + $this->load->model('custom_values/mdl_custom_fields', 'cf'); + $el = $this->cf->get_by_column($column)->row(); + + if ($el == null) { + return null; + } + + return $el->custom_field_type; + } + + /** + * @param $array + * @return bool|string + */ + public function validate($array) + { + $this->load->model('custom_fields/mdl_custom_fields'); + $this->load->model('custom_values/mdl_custom_values'); + + $db_array = $array; + $errors = []; + + if (empty($db_array)) { + // Return true if no fields need to be validated + return true; + } + + foreach ($db_array as $key => $value) { + $model = $this->mdl_custom_fields->where('custom_field_id', $key)->get(); + if ($model->num_rows()) { + $model = $model->row(); + if (@$model->custom_field_required == "1") { + if ($value == "") { + $errors[] = array( + "field" => $model->custom_field_id, + "label" => $model->custom_field_label, + "error_msg" => "missing field required" + ); + continue; + } + } + $result = $this->validate_type($model->custom_field_type, $value, $key); + + if ($result === false) { + $errors[] = array( + "field" => $model->custom_field_id, + "label" => $model->custom_field_label, + "error_msg" => "invalid input" + ); + } + } + } + + if (sizeof($errors) == 0) { + $this->_formdata = $db_array; + $this->fixinput(); + return true; + } + + return $this->create_error_text($errors); + } + + /** + * @param $type + * @param $value + * @param $key + * @return mixed + */ + public function validate_type($type, $value, $key) + { + $nicename = $this->mdl_custom_fields->get_nicename( + $type + ); + + $validation_rule = 'validate_' . $nicename; + return $this->{$validation_rule}($value, $key); + } + + public function fixinput() + { + foreach ($this->_formdata as $key => $value) { + $model = $this->mdl_custom_fields->where('custom_field_id', $key)->get(); + + if ($model->num_rows()) { + $model = $model->row(); + $ftype = $model->custom_field_type; + + switch ($ftype) { + case "DATE": + if ($value == "") { + $this->_formdata[$key] = null; + } else { + $this->_formdata[$key] = date_to_mysql($value); + } + + break; + + case "MULTIPLE-CHOICE": + $this->_formdata[$key] = implode(",", $value); + break; + + case "TEXT": + if ($value == "") { + $this->_formdata[$key] = null; + } + break; + } + } + } + } + + /** + * @param $errors + * @return string + */ + public function create_error_text($errors) + { + $string = []; + + foreach ($errors as $error) { + $string[] = sprintf(lang('validator_fail'), $error['label'], $error['error_msg']); + } + + return nl2br(implode("\n", $string)); + } +} diff --git a/application/core/index.html b/application/core/index.html new file mode 100644 index 0000000..04e928c --- /dev/null +++ b/application/core/index.html @@ -0,0 +1,10 @@ + + + 403 Forbidden + + + +

    Directory access is forbidden.

    + + + \ No newline at end of file diff --git a/application/errors/error_404.php b/application/errors/error_404.php new file mode 100644 index 0000000..b3ce4e8 --- /dev/null +++ b/application/errors/error_404.php @@ -0,0 +1,59 @@ + + + + + <?php echo $heading; ?> - InvoicePlane + + + + +

    + + + diff --git a/application/errors/error_db.php b/application/errors/error_db.php new file mode 100644 index 0000000..b5e5ed5 --- /dev/null +++ b/application/errors/error_db.php @@ -0,0 +1,59 @@ + + + + + <?php echo $heading; ?> - InvoicePlane + + + + +

    + + + \ No newline at end of file diff --git a/application/errors/error_general.php b/application/errors/error_general.php new file mode 100644 index 0000000..b5e5ed5 --- /dev/null +++ b/application/errors/error_general.php @@ -0,0 +1,59 @@ + + + + + <?php echo $heading; ?> - InvoicePlane + + + + +

    + + + \ No newline at end of file diff --git a/application/errors/error_php.php b/application/errors/error_php.php new file mode 100644 index 0000000..269279b --- /dev/null +++ b/application/errors/error_php.php @@ -0,0 +1,42 @@ + +
    +
    A PHP Error was encountered
    + +
    \ No newline at end of file diff --git a/application/errors/index.html b/application/errors/index.html new file mode 100644 index 0000000..04e928c --- /dev/null +++ b/application/errors/index.html @@ -0,0 +1,10 @@ + + + 403 Forbidden + + + +

    Directory access is forbidden.

    + + + \ No newline at end of file diff --git a/application/helpers/client_helper.php b/application/helpers/client_helper.php new file mode 100644 index 0000000..adff3ca --- /dev/null +++ b/application/helpers/client_helper.php @@ -0,0 +1,41 @@ +client_surname != "") { + return $client->client_name . " " . $client->client_surname; + } + + return $client->client_name; +} + +/** + * @param string $gender + * @return string + */ +function format_gender($gender) +{ + if ($gender == 0) { + return trans('gender_male'); + } + + if ($gender == 1) { + return trans('gender_female'); + } + + return trans('gender_other'); +} diff --git a/application/helpers/country-list/ar/country.php b/application/helpers/country-list/ar/country.php new file mode 100644 index 0000000..fdc1dfc --- /dev/null +++ b/application/helpers/country-list/ar/country.php @@ -0,0 +1,248 @@ + 'آروبا', + 'AZ' => 'أذربيجان', + 'AM' => 'أرمينيا', + 'ES' => 'أسبانيا', + 'AU' => 'أستراليا', + 'AF' => 'أفغانستان', + 'AL' => 'ألبانيا', + 'DE' => 'ألمانيا', + 'AG' => 'أنتيجوا وبربودا', + 'AO' => 'أنجولا', + 'AI' => 'أنجويلا', + 'AD' => 'أندورا', + 'UY' => 'أورجواي', + 'UZ' => 'أوزبكستان', + 'UG' => 'أوغندا', + 'UA' => 'أوكرانيا', + 'IE' => 'أيرلندا', + 'IS' => 'أيسلندا', + 'ET' => 'اثيوبيا', + 'ER' => 'اريتريا', + 'EE' => 'استونيا', + 'IL' => 'اسرائيل', + 'AR' => 'الأرجنتين', + 'JO' => 'الأردن', + 'EC' => 'الاكوادور', + 'AE' => 'الامارات العربية المتحدة', + 'BS' => 'الباهاما', + 'BH' => 'البحرين', + 'BR' => 'البرازيل', + 'PT' => 'البرتغال', + 'BA' => 'البوسنة والهرسك', + 'GA' => 'الجابون', + 'ME' => 'الجبل الأسود', + 'DZ' => 'الجزائر', + 'DK' => 'الدانمرك', + 'CV' => 'الرأس الأخضر', + 'SV' => 'السلفادور', + 'SN' => 'السنغال', + 'SD' => 'السودان', + 'SE' => 'السويد', + 'EH' => 'الصحراء الغربية', + 'SO' => 'الصومال', + 'CN' => 'الصين', + 'IQ' => 'العراق', + 'VA' => 'الفاتيكان', + 'PH' => 'الفيلبين', + 'AQ' => 'القطب الجنوبي', + 'CM' => 'الكاميرون', + 'CG' => 'الكونغو - برازافيل', + 'KW' => 'الكويت', + 'HU' => 'المجر', + 'IO' => 'المحيط الهندي البريطاني', + 'MA' => 'المغرب', + 'TF' => 'المقاطعات الجنوبية الفرنسية', + 'MX' => 'المكسيك', + 'SA' => 'المملكة العربية السعودية', + 'GB' => 'المملكة المتحدة', + 'NO' => 'النرويج', + 'AT' => 'النمسا', + 'NE' => 'النيجر', + 'IN' => 'الهند', + 'US' => 'الولايات المتحدة الأمريكية', + 'JP' => 'اليابان', + 'YE' => 'اليمن', + 'GR' => 'اليونان', + 'ID' => 'اندونيسيا', + 'IR' => 'ايران', + 'IT' => 'ايطاليا', + 'PG' => 'بابوا غينيا الجديدة', + 'PY' => 'باراجواي', + 'PK' => 'باكستان', + 'PW' => 'بالاو', + 'BW' => 'بتسوانا', + 'PN' => 'بتكايرن', + 'BB' => 'بربادوس', + 'BM' => 'برمودا', + 'BN' => 'بروناي', + 'BE' => 'بلجيكا', + 'BG' => 'بلغاريا', + 'BZ' => 'بليز', + 'BD' => 'بنجلاديش', + 'PA' => 'بنما', + 'BJ' => 'بنين', + 'BT' => 'بوتان', + 'PR' => 'بورتوريكو', + 'BF' => 'بوركينا فاسو', + 'BI' => 'بوروندي', + 'PL' => 'بولندا', + 'BO' => 'بوليفيا', + 'PF' => 'بولينيزيا الفرنسية', + 'PE' => 'بيرو', + 'TZ' => 'تانزانيا', + 'TH' => 'تايلند', + 'TW' => 'تايوان', + 'TM' => 'تركمانستان', + 'TR' => 'تركيا', + 'TT' => 'ترينيداد وتوباغو', + 'TD' => 'تشاد', + 'TG' => 'توجو', + 'TV' => 'توفالو', + 'TK' => 'توكيلو', + 'TO' => 'تونجا', + 'TN' => 'تونس', + 'TL' => 'تيمور الشرقية', + 'JM' => 'جامايكا', + 'GI' => 'جبل طارق', + 'GD' => 'جرينادا', + 'GL' => 'جرينلاند', + 'AX' => 'جزر أولان', + 'AN' => 'جزر الأنتيل الهولندية', + 'TC' => 'جزر الترك وجايكوس', + 'KM' => 'جزر القمر', + 'KY' => 'جزر الكايمن', + 'MH' => 'جزر المارشال', + 'MV' => 'جزر الملديف', + 'UM' => 'جزر الولايات المتحدة البعيدة الصغيرة', + 'SB' => 'جزر سليمان', + 'FO' => 'جزر فارو', + 'VI' => 'جزر فرجين الأمريكية', + 'VG' => 'جزر فرجين البريطانية', + 'FK' => 'جزر فوكلاند', + 'CK' => 'جزر كوك', + 'CC' => 'جزر كوكوس', + 'MP' => 'جزر ماريانا الشمالية', + 'WF' => 'جزر والس وفوتونا', + 'CX' => 'جزيرة الكريسماس', + 'BV' => 'جزيرة بوفيه', + 'IM' => 'جزيرة مان', + 'NF' => 'جزيرة نورفوك', + 'HM' => 'جزيرة هيرد وماكدونالد', + 'CF' => 'جمهورية افريقيا الوسطى', + 'CZ' => 'جمهورية التشيك', + 'DO' => 'جمهورية الدومينيك', + 'CD' => 'جمهورية الكونغو الديمقراطية', + 'ZA' => 'جمهورية جنوب افريقيا', + 'GT' => 'جواتيمالا', + 'GP' => 'جوادلوب', + 'GU' => 'جوام', + 'GE' => 'جورجيا', + 'GS' => 'جورجيا الجنوبية وجزر ساندويتش الجنوبية', + 'DJ' => 'جيبوتي', + 'JE' => 'جيرسي', + 'DM' => 'دومينيكا', + 'RW' => 'رواندا', + 'RU' => 'روسيا', + 'BY' => 'روسيا البيضاء', + 'RO' => 'رومانيا', + 'RE' => 'روينيون', + 'ZM' => 'زامبيا', + 'ZW' => 'زيمبابوي', + 'CI' => 'ساحل العاج', + 'WS' => 'ساموا', + 'AS' => 'ساموا الأمريكية', + 'SM' => 'سان مارينو', + 'PM' => 'سانت بيير وميكولون', + 'VC' => 'سانت فنسنت وغرنادين', + 'KN' => 'سانت كيتس ونيفيس', + 'LC' => 'سانت لوسيا', + 'MF' => 'سانت مارتين', + 'SH' => 'سانت هيلنا', + 'ST' => 'ساو تومي وبرينسيبي', + 'LK' => 'سريلانكا', + 'SJ' => 'سفالبارد وجان مايان', + 'SK' => 'سلوفاكيا', + 'SI' => 'سلوفينيا', + 'SG' => 'سنغافورة', + 'SZ' => 'سوازيلاند', + 'SY' => 'سوريا', + 'SR' => 'سورينام', + 'CH' => 'سويسرا', + 'SL' => 'سيراليون', + 'SC' => 'سيشل', + 'CL' => 'شيلي', + 'RS' => 'صربيا', + 'CS' => 'صربيا والجبل الأسود', + 'TJ' => 'طاجكستان', + 'OM' => 'عمان', + 'GM' => 'غامبيا', + 'GH' => 'غانا', + 'GF' => 'غويانا', + 'GY' => 'غيانا', + 'GN' => 'غينيا', + 'GQ' => 'غينيا الاستوائية', + 'GW' => 'غينيا بيساو', + 'VU' => 'فانواتو', + 'FR' => 'فرنسا', + 'PS' => 'فلسطين', + 'VE' => 'فنزويلا', + 'FI' => 'فنلندا', + 'VN' => 'فيتنام', + 'FJ' => 'فيجي', + 'CY' => 'قبرص', + 'KG' => 'قرغيزستان', + 'QA' => 'قطر', + 'KZ' => 'كازاخستان', + 'NC' => 'كاليدونيا الجديدة', + 'HR' => 'كرواتيا', + 'KH' => 'كمبوديا', + 'CA' => 'كندا', + 'CU' => 'كوبا', + 'KR' => 'كوريا الجنوبية', + 'KP' => 'كوريا الشمالية', + 'CR' => 'كوستاريكا', + 'CO' => 'كولومبيا', + 'KI' => 'كيريباتي', + 'KE' => 'كينيا', + 'LV' => 'لاتفيا', + 'LA' => 'لاوس', + 'LB' => 'لبنان', + 'LU' => 'لوكسمبورج', + 'LY' => 'ليبيا', + 'LR' => 'ليبيريا', + 'LT' => 'ليتوانيا', + 'LI' => 'ليختنشتاين', + 'LS' => 'ليسوتو', + 'MQ' => 'مارتينيك', + 'MO' => 'ماكاو الصينية', + 'MT' => 'مالطا', + 'ML' => 'مالي', + 'MY' => 'ماليزيا', + 'YT' => 'مايوت', + 'MG' => 'مدغشقر', + 'EG' => 'مصر', + 'MK' => 'مقدونيا', + 'MW' => 'ملاوي', + 'ZZ' => 'منطقة غير معرفة', + 'MN' => 'منغوليا', + 'MR' => 'موريتانيا', + 'MU' => 'موريشيوس', + 'MZ' => 'موزمبيق', + 'MD' => 'مولدافيا', + 'MC' => 'موناكو', + 'MS' => 'مونتسرات', + 'MM' => 'ميانمار', + 'FM' => 'ميكرونيزيا', + 'NA' => 'ناميبيا', + 'NR' => 'نورو', + 'NP' => 'نيبال', + 'NG' => 'نيجيريا', + 'NI' => 'نيكاراجوا', + 'NZ' => 'نيوزيلاندا', + 'NU' => 'نيوي', + 'HT' => 'هايتي', + 'HN' => 'هندوراس', + 'NL' => 'هولندا', + 'HK' => 'هونج كونج الصينية', +); diff --git a/application/helpers/country-list/bg/country.php b/application/helpers/country-list/bg/country.php new file mode 100644 index 0000000..f12e0d6 --- /dev/null +++ b/application/helpers/country-list/bg/country.php @@ -0,0 +1,250 @@ + 'Австралия', + 'AT' => 'Австрия', + 'AZ' => 'Азербайджан', + 'AX' => 'Аландски о-ви', + 'AL' => 'Албания', + 'DZ' => 'Алжир', + 'AS' => 'Американско Самоа', + 'AO' => 'Ангола', + 'AI' => 'Ангуила', + 'AD' => 'Андора', + 'AQ' => 'Антарктика', + 'AG' => 'Антигуа и Барбуда', + 'AR' => 'Аржентина', + 'AM' => 'Армения', + 'AW' => 'Аруба', + 'AF' => 'Афганистан', + 'BD' => 'Бангладеш', + 'BB' => 'Барбадос', + 'BS' => 'Бахами', + 'BH' => 'Бахрейн', + 'BY' => 'Беларус', + 'BE' => 'Белгия', + 'BZ' => 'Белиз', + 'BJ' => 'Бенин', + 'BM' => 'Бермуда', + 'BO' => 'Боливия', + 'BA' => 'Босна и Херцеговина', + 'BW' => 'Ботсуана', + 'BR' => 'Бразилия', + 'VG' => 'Британски Вирджински острони', + 'IO' => 'Британски територии в Индийския океан', + 'BN' => 'Бруней Дарусалам', + 'CI' => 'Бряг на слоновата кост', + 'BF' => 'Буркина Фасо', + 'BI' => 'Бурунди', + 'BT' => 'Бутан', + 'BG' => 'България', + 'VU' => 'Вануату', + 'VE' => 'Венецуела', + 'VN' => 'Виетнам', + 'GA' => 'Габон', + 'GM' => 'Гамбия', + 'GH' => 'Гана', + 'GP' => 'Гваделупа', + 'GT' => 'Гватемала', + 'GY' => 'Гвиана', + 'GN' => 'Гвинея', + 'GW' => 'Гвинея-Бисау', + 'DE' => 'Германия', + 'GI' => 'Гибралтар', + 'GD' => 'Гренада', + 'GL' => 'Гренландия', + 'GE' => 'Грузия', + 'GU' => 'Гуам', + 'GR' => 'Гърция', + 'DK' => 'Дания', + 'CD' => 'Демократична република Конго', + 'DJ' => 'Джибути', + 'DM' => 'Доминика', + 'DO' => 'Доминиканска република', + 'EG' => 'Египет', + 'EC' => 'Еквадор', + 'GQ' => 'Екваториална Гвинея', + 'SV' => 'Ел Салвадор', + 'ER' => 'Еритрея', + 'EE' => 'Естония', + 'ET' => 'Етиопия', + 'ZM' => 'Замбия', + 'EH' => 'Западна Сахара', + 'ZW' => 'Зимбабве', + 'IL' => 'Израел', + 'TL' => 'Източен Тимор', + 'IN' => 'Индия', + 'ID' => 'Индонезия', + 'IQ' => 'Ирак', + 'IR' => 'Иран, Ислямска република', + 'IE' => 'Ирландия', + 'IS' => 'Исландия', + 'ES' => 'Испания', + 'IT' => 'Италия', + 'YE' => 'Йемен', + 'JO' => 'Йордания', + 'CV' => 'Кабо Верде', + 'KZ' => 'Казахстан', + 'KY' => 'Кайманови острови', + 'KH' => 'Камбоджа', + 'CM' => 'Камерун', + 'CA' => 'Канада', + 'QA' => 'Катар', + 'KE' => 'Кения', + 'CY' => 'Кипър', + 'KG' => 'Киргизстан', + 'KI' => 'Кирибати', + 'CN' => 'Китай', + 'CC' => 'Кокосови (Кийлинг) острови', + 'CO' => 'Колумбия', + 'KM' => 'Комори', + 'CG' => 'Конго', + 'KP' => 'Корея, Северна', + 'KR' => 'Корея, Южна', + 'CR' => 'Коста Рика', + 'CU' => 'Куба', + 'KW' => 'Кувейт', + 'LV' => 'Латвия', + 'LS' => 'Лесото', + 'LR' => 'Либерия', + 'LY' => 'Либийска арабска джамахирия', + 'LB' => 'Ливан', + 'LT' => 'Литва', + 'LI' => 'Лихтенщайн', + 'LU' => 'Люксембург', + 'MR' => 'Мавритания', + 'MU' => 'Мавриций', + 'MG' => 'Мадагаскар', + 'MO' => 'Макао О.А.Р. на Китай', + 'MK' => 'Македония, Република', + 'MW' => 'Малави', + 'MY' => 'Малайзия', + 'MV' => 'Малдиви', + 'ML' => 'Мали', + 'MT' => 'Малта', + 'MA' => 'Мароко', + 'MQ' => 'Мартиника', + 'MH' => 'Маршалови острови', + 'YT' => 'Мейот', + 'MX' => 'Мексико', + 'MM' => 'Мианмар', + 'FM' => 'Микронезия, Обединени Щати', + 'MZ' => 'Мозамбик', + 'MD' => 'Молдова, Република', + 'MC' => 'Монако', + 'MN' => 'Монголия', + 'MS' => 'Монсерат', + 'NA' => 'Намибия', + 'LA' => 'Народна демократична република Лаос', + 'NR' => 'Науру', + 'NP' => 'Непал', + 'ZZ' => 'Непозната или несъществуваща област', + 'NE' => 'Нигер', + 'NG' => 'Нигерия', + 'NI' => 'Никарагуа', + 'NU' => 'Ниуе', + 'NZ' => 'Нова Зеландия', + 'NC' => 'Нова Каледония', + 'NO' => 'Норвегия', + 'AE' => 'Обединени арабски емирства', + 'GB' => 'Обединено кралство', + 'OM' => 'Оман', + 'BV' => 'Остров Буве', + 'CX' => 'Остров Кристмас', + 'NF' => 'Остров Норфолк', + 'HM' => 'Остров Хърд и Острови Макдоналд', + 'CK' => 'Острови Кук', + 'IM' => 'Острови Ман', + 'TC' => 'Острови Туркс и Кайкос', + 'PK' => 'Пакистан', + 'PW' => 'Палау', + 'PS' => 'Палестински територии', + 'PA' => 'Панама', + 'PG' => 'Папуа Нова Гвинея', + 'PY' => 'Парагвай', + 'PE' => 'Перу', + 'PN' => 'Питкайрн', + 'PL' => 'Полша', + 'PT' => 'Португалия', + 'PR' => 'Пуерто Рико', + 'RE' => 'Реюниън', + 'RW' => 'Руанда', + 'RO' => 'Румъния', + 'RU' => 'Руска федерация', + 'US' => 'САЩ', + 'UM' => 'САЩ - външни острови', + 'VI' => 'САЩ, Вирджински острови', + 'WS' => 'Самоа', + 'SM' => 'Сан Марино', + 'ST' => 'Сао Томе и Принципе', + 'SA' => 'Саудитска Арабия', + 'SJ' => 'Свалбард и Ян Майен', + 'SH' => 'Света Елена', + 'VA' => 'Свещено море (Ватиканска държава)', + 'MP' => 'Северни Мариански Острови', + 'BL' => 'Сейнт Бартоломей', + 'VC' => 'Сейнт Винсънт и Гренадини', + 'KN' => 'Сейнт Китс и Невис', + 'LC' => 'Сейнт Лусия', + 'MF' => 'Сейнт Мартин', + 'SC' => 'Сейшели', + 'PM' => 'Сен Пиер и Мигелон', + 'SN' => 'Сенегал', + 'SL' => 'Сиера Леоне', + 'SG' => 'Сингапур', + 'SY' => 'Сирийска арабска република', + 'SK' => 'Словакия', + 'SI' => 'Словения', + 'SB' => 'Соломонови острови', + 'SO' => 'Сомалия', + 'SZ' => 'Суазиленд', + 'SD' => 'Судан', + 'SR' => 'Суринам', + 'RS' => 'Сърбия', + 'CS' => 'Сърбия и Черна гора', + 'TJ' => 'Таджикистан', + 'TW' => 'Тайван', + 'TH' => 'Тайланд', + 'TZ' => 'Танзания', + 'TG' => 'Того', + 'TK' => 'Токелау', + 'TO' => 'Тонга', + 'TT' => 'Тринидад и Тобаго', + 'TV' => 'Тувалу', + 'TN' => 'Тунис', + 'TM' => 'Туркменистан', + 'TR' => 'Турция', + 'UG' => 'Уганда', + 'UZ' => 'Узбекистан', + 'UA' => 'Украйна', + 'HU' => 'Унгария', + 'WF' => 'Уолис и Футуна', + 'UY' => 'Уругвай', + 'FO' => 'Фарьорски острови', + 'FJ' => 'Фиджи', + 'PH' => 'Филипини', + 'FI' => 'Финландия', + 'FK' => 'Фолклендски острови', + 'FR' => 'Франция', + 'GF' => 'Френска Гвиана', + 'PF' => 'Френска Полинезия', + 'TF' => 'Френски южни територии', + 'HT' => 'Хаити', + 'NL' => 'Холандия', + 'AN' => 'Холандски Антили', + 'HK' => 'Хонг-Конг О.А.Р. на Китай', + 'HN' => 'Хондурас', + 'HR' => 'Хърватска', + 'CF' => 'Централноафриканска Република', + 'TD' => 'Чад', + 'ME' => 'Черна гора', + 'CZ' => 'Чешка република', + 'CL' => 'Чили', + 'CH' => 'Швейцария', + 'SE' => 'Швеция', + 'LK' => 'Шри Ланка', + 'ZA' => 'Южна Африка', + 'GS' => 'Южна Джорджия и Южни Сандвичеви Острови', + 'JM' => 'Ямайка', + 'JP' => 'Япония', + 'GG' => 'о. Гърнзи', + 'JE' => 'о. Джързи', +); diff --git a/application/helpers/country-list/ca/country.php b/application/helpers/country-list/ca/country.php new file mode 100644 index 0000000..be46b8e --- /dev/null +++ b/application/helpers/country-list/ca/country.php @@ -0,0 +1,250 @@ + 'Afganistan', + 'AL' => 'Albània', + 'DE' => 'Alemanya', + 'DZ' => 'Algèria', + 'AD' => 'Andorra', + 'AO' => 'Angola', + 'AI' => 'Anguilla', + 'AG' => 'Antigua i Barbuda', + 'AN' => 'Antilles Neerlandeses', + 'AQ' => 'Antàrtida', + 'AR' => 'Argentina', + 'AM' => 'Armènia', + 'AW' => 'Aruba', + 'SA' => 'Aràbia Saudita', + 'AU' => 'Austràlia', + 'AZ' => 'Azerbaidjan', + 'BS' => 'Bahames', + 'BH' => 'Bahrain', + 'BD' => 'Bangla Desh', + 'BB' => 'Barbados', + 'BZ' => 'Belize', + 'BJ' => 'Benín', + 'BM' => 'Bermudes', + 'BT' => 'Bhutan', + 'BY' => 'Bielorússia', + 'BO' => 'Bolívia', + 'BW' => 'Botswana', + 'BR' => 'Brasil', + 'BN' => 'Brunei', + 'BG' => 'Bulgària', + 'BF' => 'Burkina Faso', + 'BI' => 'Burundi', + 'BE' => 'Bèlgica', + 'BA' => 'Bòsnia i Hercegovina', + 'KH' => 'Cambodja', + 'CM' => 'Camerun', + 'CA' => 'Canadà', + 'CV' => 'Cap Verd', + 'CO' => 'Colòmbia', + 'KM' => 'Comores', + 'CG' => 'Congo', + 'KP' => 'Corea del Nord', + 'KR' => 'Corea del Sud', + 'CR' => 'Costa Rica', + 'CI' => 'Costa d’Ivori', + 'HR' => 'Croàcia', + 'CU' => 'Cuba', + 'DK' => 'Dinamarca', + 'DJ' => 'Djibouti', + 'DM' => 'Dominica', + 'EG' => 'Egipte', + 'SV' => 'El Salvador', + 'EC' => 'Equador', + 'ER' => 'Eritrea', + 'SK' => 'Eslovàquia', + 'SI' => 'Eslovènia', + 'ES' => 'Espanya', + 'US' => 'Estats Units', + 'EE' => 'Estònia', + 'ET' => 'Etiòpia', + 'FJ' => 'Fiji', + 'PH' => 'Filipines', + 'FI' => 'Finlàndia', + 'FR' => 'França', + 'GA' => 'Gabon', + 'GE' => 'Geòrgia', + 'GH' => 'Ghana', + 'GI' => 'Gibraltar', + 'GD' => 'Grenada', + 'GL' => 'Grenlàndia', + 'GR' => 'Grècia', + 'GP' => 'Guadeloupe', + 'GF' => 'Guaiana Francesa', + 'GU' => 'Guam', + 'GT' => 'Guatemala', + 'GG' => 'Guernsey', + 'GN' => 'Guinea', + 'GW' => 'Guinea Bissau', + 'GQ' => 'Guinea Equatorial', + 'GY' => 'Guyana', + 'GM' => 'Gàmbia', + 'HT' => 'Haití', + 'HN' => 'Hondures', + 'HU' => 'Hongria', + 'YE' => 'Iemen', + 'BV' => 'Illa Bouvet', + 'CX' => 'Illa Christmas', + 'HM' => 'Illa Heard i Illes McDonald', + 'NF' => 'Illa Norfolk', + 'IM' => 'Illa de Man', + 'RE' => 'Illa de la Reunió', + 'KY' => 'Illes Caiman', + 'CC' => 'Illes Cocos', + 'CK' => 'Illes Cook', + 'FO' => 'Illes Fèroe', + 'GS' => 'Illes Geòrgia del Sud i Sandwich del Sud', + 'FK' => 'Illes Malvines', + 'MP' => 'Illes Mariannes del Nord', + 'MH' => 'Illes Marshall', + 'UM' => 'Illes Perifèriques Menors dels EUA', + 'PN' => 'Illes Pitcairn', + 'SB' => 'Illes Salomó', + 'TC' => 'Illes Turks i Caicos', + 'VG' => 'Illes Verges Britàniques', + 'VI' => 'Illes Verges Nord-americanes', + 'AX' => 'Illes Åland', + 'ID' => 'Indonèsia', + 'IR' => 'Iran', + 'IQ' => 'Iraq', + 'IE' => 'Irlanda', + 'IS' => 'Islàndia', + 'IL' => 'Israel', + 'IT' => 'Itàlia', + 'JM' => 'Jamaica', + 'JP' => 'Japó', + 'JE' => 'Jersey', + 'JO' => 'Jordània', + 'KZ' => 'Kazakhstan', + 'KE' => 'Kenya', + 'KG' => 'Kirguizistan', + 'KI' => 'Kiribati', + 'KW' => 'Kuwait', + 'LA' => 'Laos', + 'LS' => 'Lesotho', + 'LV' => 'Letònia', + 'LR' => 'Libèria', + 'LI' => 'Liechtenstein', + 'LT' => 'Lituània', + 'LU' => 'Luxemburg', + 'LB' => 'Líban', + 'LY' => 'Líbia', + 'MK' => 'Macedònia', + 'MG' => 'Madagascar', + 'MW' => 'Malawi', + 'MV' => 'Maldives', + 'ML' => 'Mali', + 'MT' => 'Malta', + 'MY' => 'Malàisia', + 'MA' => 'Marroc', + 'MQ' => 'Martinica', + 'MU' => 'Maurici', + 'MR' => 'Mauritània', + 'YT' => 'Mayotte', + 'FM' => 'Micronèsia', + 'MD' => 'Moldàvia', + 'MN' => 'Mongòlia', + 'ME' => 'Montenegro', + 'MS' => 'Montserrat', + 'MZ' => 'Moçambic', + 'MM' => 'Myanmar', + 'MX' => 'Mèxic', + 'MC' => 'Mònaco', + 'NA' => 'Namíbia', + 'NR' => 'Nauru', + 'NP' => 'Nepal', + 'NI' => 'Nicaragua', + 'NG' => 'Nigèria', + 'NU' => 'Niue', + 'NO' => 'Noruega', + 'NC' => 'Nova Caledònia', + 'NZ' => 'Nova Zelanda', + 'NE' => 'Níger', + 'OM' => 'Oman', + 'PK' => 'Pakistan', + 'PW' => 'Palau', + 'PS' => 'Palestina', + 'PA' => 'Panamà', + 'PG' => 'Papua Nova Guinea', + 'PY' => 'Paraguai', + 'NL' => 'Països Baixos', + 'PE' => 'Perú', + 'PF' => 'Polinèsia Francesa', + 'PL' => 'Polònia', + 'PT' => 'Portugal', + 'PR' => 'Puerto Rico', + 'QA' => 'Qatar', + 'HK' => 'Regió administrativa especial xinesa de Hong Kong', + 'MO' => 'Regió administrativa especial xinesa de Macau', + 'ZZ' => 'Regió desconeguda o no vàlida', + 'GB' => 'Regne Unit', + 'CF' => 'República Centreafricana', + 'CD' => 'República Democràtica del Congo', + 'DO' => 'República Dominicana', + 'CZ' => 'República Txeca', + 'ZA' => 'República de Sud-àfrica', + 'RO' => 'Romania', + 'RW' => 'Rwanda', + 'RU' => 'Rússia', + 'BL' => 'Saint Barthélemy', + 'KN' => 'Saint Christopher i Nevis', + 'SH' => 'Saint Helena', + 'LC' => 'Saint Lucia', + 'MF' => 'Saint Martin', + 'PM' => 'Saint Pierre i Miquelon', + 'VC' => 'Saint Vincent i les Grenadines', + 'WS' => 'Samoa', + 'AS' => 'Samoa Americana', + 'SM' => 'San Marino', + 'SN' => 'Senegal', + 'SC' => 'Seychelles', + 'SL' => 'Sierra Leone', + 'SG' => 'Singapur', + 'SO' => 'Somàlia', + 'LK' => 'Sri Lanka', + 'SD' => 'Sudan', + 'SR' => 'Surinam', + 'SE' => 'Suècia', + 'CH' => 'Suïssa', + 'SJ' => 'Svalbard i Jan Mayen', + 'SZ' => 'Swazilàndia', + 'EH' => 'Sàhara Occidental', + 'ST' => 'São Tomé i Príncipe', + 'RS' => 'Sèrbia', + 'CS' => 'Sèrbia i Montenegro', + 'SY' => 'Síria', + 'TJ' => 'Tadjikistan', + 'TH' => 'Tailàndia', + 'TW' => 'Taiwan', + 'TZ' => 'Tanzània', + 'IO' => 'Territori Britànic de l\'Oceà Índic', + 'TF' => 'Territoris Francesos del Sud', + 'TL' => 'Timor Oriental', + 'TG' => 'Togo', + 'TK' => 'Tokelau', + 'TO' => 'Tonga', + 'TT' => 'Trinitat i Tobago', + 'TN' => 'Tunísia', + 'TM' => 'Turkmenistan', + 'TR' => 'Turquia', + 'TV' => 'Tuvalu', + 'TD' => 'Txad', + 'UA' => 'Ucraïna', + 'UG' => 'Uganda', + 'AE' => 'Unió dels Emirats Àrabs', + 'UY' => 'Uruguai', + 'UZ' => 'Uzbekistan', + 'VU' => 'Vanuatu', + 'VA' => 'Vaticà', + 'VE' => 'Veneçuela', + 'VN' => 'Vietnam', + 'WF' => 'Wallis i Futuna', + 'CL' => 'Xile', + 'CN' => 'Xina', + 'CY' => 'Xipre', + 'ZW' => 'Zimbabwe', + 'ZM' => 'Zàmbia', + 'AT' => 'Àustria', + 'IN' => 'Índia', +); diff --git a/application/helpers/country-list/cs/country.php b/application/helpers/country-list/cs/country.php new file mode 100644 index 0000000..4623a83 --- /dev/null +++ b/application/helpers/country-list/cs/country.php @@ -0,0 +1,250 @@ + 'Afghánistán', + 'AX' => 'Alandy', + 'AL' => 'Albánie', + 'DZ' => 'Alžírsko', + 'AS' => 'Americká Samoa', + 'VI' => 'Americké Panenské ostrovy', + 'AD' => 'Andorra', + 'AO' => 'Angola', + 'AI' => 'Anguila', + 'AQ' => 'Antarktida', + 'AG' => 'Antigua a Barbuda', + 'AR' => 'Argentina', + 'AM' => 'Arménie', + 'AW' => 'Aruba', + 'AU' => 'Austrálie', + 'BS' => 'Bahamy', + 'BH' => 'Bahrajn', + 'BD' => 'Bangladéš', + 'BB' => 'Barbados', + 'BE' => 'Belgie', + 'BZ' => 'Belize', + 'BJ' => 'Benin', + 'BM' => 'Bermudy', + 'BT' => 'Bhútán', + 'BO' => 'Bolívie', + 'BA' => 'Bosna a Hercegovina', + 'BW' => 'Botswana', + 'BR' => 'Brazílie', + 'VG' => 'Britské Panenské ostrovy', + 'IO' => 'Britské území v Indickém oceánu', + 'BN' => 'Brunej Darussalam', + 'BG' => 'Bulharsko', + 'BF' => 'Burkina Faso', + 'BI' => 'Burundi', + 'BY' => 'Bělorusko', + 'CL' => 'Chile', + 'HR' => 'Chorvatsko', + 'CK' => 'Cookovy ostrovy', + 'CD' => 'Demokratická republika Kongo', + 'DM' => 'Dominika', + 'DO' => 'Dominikánská republika', + 'DK' => 'Dánsko', + 'DJ' => 'Džibuti', + 'EG' => 'Egypt', + 'EC' => 'Ekvádor', + 'SV' => 'El Salvador', + 'ER' => 'Eritrea', + 'EE' => 'Estonsko', + 'ET' => 'Etiopie', + 'FO' => 'Faerské ostrovy', + 'FK' => 'Falklandské ostrovy', + 'FJ' => 'Fidži', + 'PH' => 'Filipíny', + 'FI' => 'Finsko', + 'FR' => 'Francie', + 'GF' => 'Francouzská Guyana', + 'PF' => 'Francouzská Polynésie', + 'TF' => 'Francouzská jižní teritoria', + 'GA' => 'Gabon', + 'GM' => 'Gambie', + 'GH' => 'Ghana', + 'GI' => 'Gibraltar', + 'GD' => 'Grenada', + 'GE' => 'Gruzie', + 'GL' => 'Grónsko', + 'GP' => 'Guadeloupe', + 'GU' => 'Guam', + 'GT' => 'Guatemala', + 'GG' => 'Guernsey', + 'GN' => 'Guinea', + 'GW' => 'Guinea-Bissau', + 'GY' => 'Guyana', + 'HT' => 'Haiti', + 'HN' => 'Honduras', + 'HK' => 'Hongkong, zvláštní administrativní oblast Číny', + 'IN' => 'Indie', + 'ID' => 'Indonésie', + 'IE' => 'Irsko', + 'IQ' => 'Irák', + 'IS' => 'Island', + 'IT' => 'Itálie', + 'IL' => 'Izrael', + 'JM' => 'Jamajka', + 'JP' => 'Japonsko', + 'YE' => 'Jemen', + 'JE' => 'Jersey', + 'ZA' => 'Jihoafrická republika', + 'GS' => 'Jižní Georgie a Jižní Sandwichovy ostrovy', + 'KR' => 'Jižní Korea', + 'JO' => 'Jordánsko', + 'KY' => 'Kajmanské ostrovy', + 'KH' => 'Kambodža', + 'CM' => 'Kamerun', + 'CA' => 'Kanada', + 'CV' => 'Kapverdy', + 'QA' => 'Katar', + 'KZ' => 'Kazachstán', + 'KE' => 'Keňa', + 'KI' => 'Kiribati', + 'CC' => 'Kokosové ostrovy', + 'CO' => 'Kolumbie', + 'KM' => 'Komory', + 'CG' => 'Kongo', + 'CR' => 'Kostarika', + 'CU' => 'Kuba', + 'KW' => 'Kuvajt', + 'CY' => 'Kypr', + 'KG' => 'Kyrgyzstán', + 'LS' => 'Lesotho', + 'LB' => 'Libanon', + 'LY' => 'Libye', + 'LR' => 'Libérie', + 'LI' => 'Lichtenštejnsko', + 'LA' => 'Lidově demokratická republika Laos', + 'LT' => 'Litva', + 'LV' => 'Lotyšsko', + 'LU' => 'Lucembursko', + 'MK' => 'Macedonia', + 'MG' => 'Madagaskar', + 'MV' => 'Maladivy', + 'MY' => 'Malajsie', + 'MW' => 'Malawi', + 'ML' => 'Mali', + 'MT' => 'Malta', + 'MA' => 'Maroko', + 'MH' => 'Marshallovy ostrovy', + 'MQ' => 'Martinik', + 'MU' => 'Mauricius', + 'MR' => 'Mauritánie', + 'YT' => 'Mayotte', + 'HU' => 'Maďarsko', + 'UM' => 'Menší odlehlé ostrovy USA', + 'MX' => 'Mexiko', + 'FM' => 'Mikronézie', + 'MD' => 'Moldavsko, republika', + 'MC' => 'Monako', + 'MN' => 'Mongolsko', + 'MS' => 'Montserrat', + 'MZ' => 'Mosambik', + 'MM' => 'Myanmar', + 'NA' => 'Namibie', + 'NR' => 'Nauru', + 'NP' => 'Nepál', + 'ZZ' => 'Neznámá nebo neplatná oblast', + 'NE' => 'Niger', + 'NG' => 'Nigérie', + 'NI' => 'Nikaragua', + 'NU' => 'Niue', + 'NL' => 'Nizozemsko', + 'AN' => 'Nizozemské Antily', + 'NF' => 'Norfolk', + 'NO' => 'Norsko', + 'NC' => 'Nová Kaledonie', + 'NZ' => 'Nový Zéland', + 'DE' => 'Německo', + 'OM' => 'Omán', + 'BV' => 'Ostrov Bouvet', + 'IM' => 'Ostrov Man', + 'TC' => 'Ostrovy Caicos a Turks', + 'HM' => 'Ostrovy Heard a McDonald', + 'PW' => 'Palau', + 'PS' => 'Palestinian Territory', + 'PA' => 'Panama', + 'PG' => 'Papua-Nová Guinea', + 'PY' => 'Paraguay', + 'PE' => 'Peru', + 'PN' => 'Pitcairn', + 'CI' => 'Pobřeží slonoviny', + 'PL' => 'Polsko', + 'PR' => 'Portoriko', + 'PT' => 'Portugalsko', + 'PK' => 'Pákistán', + 'AT' => 'Rakousko', + 'GQ' => 'Rovníková Guinea', + 'RO' => 'Rumunsko', + 'RU' => 'Rusko', + 'RW' => 'Rwanda', + 'RE' => 'Réunion', + 'WS' => 'Samoa', + 'SM' => 'San Marino', + 'SA' => 'Saúdská Arábie', + 'SN' => 'Senegal', + 'KP' => 'Severní Korea', + 'MP' => 'Severní Mariany', + 'SC' => 'Seychely', + 'SL' => 'Sierra Leone', + 'SG' => 'Singapur', + 'SK' => 'Slovensko', + 'SI' => 'Slovinsko', + 'SO' => 'Somálsko', + 'AE' => 'Spojené arabské emiráty', + 'US' => 'Spojené státy', + 'RS' => 'Srbsko', + 'CS' => 'Srbsko a Černá Hora', + 'LK' => 'Srí Lanka', + 'CF' => 'Středoafrická republika', + 'SR' => 'Surinam', + 'SJ' => 'Svalbard a Jan Mayen', + 'SH' => 'Svatá Helena', + 'LC' => 'Svatá Lucie', + 'BL' => 'Svatý Bartoloměj', + 'KN' => 'Svatý Kitts a Nevis', + 'MF' => 'Svatý Martin', + 'PM' => 'Svatý Pierre a Miquelon', + 'ST' => 'Svatý Tomáš', + 'VC' => 'Svatý Vincent a Grenadiny', + 'VA' => 'Svatý stolec', + 'SZ' => 'Svazijsko', + 'SD' => 'Súdán', + 'SY' => 'Sýrie', + 'TZ' => 'Tanzanie', + 'TW' => 'Tchaj-wan', + 'TH' => 'Thajsko', + 'TG' => 'Togo', + 'TK' => 'Tokelau', + 'TO' => 'Tonga', + 'TT' => 'Trinidad a Tobago', + 'TN' => 'Tunisko', + 'TR' => 'Turecko', + 'TM' => 'Turkmenistán', + 'TV' => 'Tuvalu', + 'TJ' => 'Tádžikistán', + 'UG' => 'Uganda', + 'UA' => 'Ukrajina', + 'UY' => 'Uruguay', + 'UZ' => 'Uzbekistán', + 'VU' => 'Vanuatu', + 'GB' => 'Velká Británie', + 'VE' => 'Venezuela', + 'VN' => 'Vietnam', + 'CX' => 'Vánoční ostrovy', + 'TL' => 'Východní Timor', + 'WF' => 'Wallis a Futuna', + 'ZM' => 'Zambie', + 'ZW' => 'Zimbabwe', + 'MO' => 'Zvláštní administrativní oblast Číny Macao', + 'EH' => 'Západní Sahara', + 'AZ' => 'Ázerbájdžán', + 'IR' => 'Írán', + 'TD' => 'Čad', + 'ME' => 'Černá Hora', + 'CZ' => 'Česká republika', + 'CN' => 'Čína', + 'GR' => 'Řecko', + 'SB' => 'Šalamounovy ostrovy', + 'ES' => 'Španělsko', + 'SE' => 'Švédsko', + 'CH' => 'Švýcarsko', +); diff --git a/application/helpers/country-list/da/country.php b/application/helpers/country-list/da/country.php new file mode 100644 index 0000000..659cec7 --- /dev/null +++ b/application/helpers/country-list/da/country.php @@ -0,0 +1,250 @@ + 'Afghanistan', + 'AL' => 'Albanien', + 'DZ' => 'Algeriet', + 'AS' => 'Amerikansk Samoa', + 'AD' => 'Andorra', + 'AO' => 'Angola', + 'AI' => 'Anguilla', + 'AQ' => 'Antarktis', + 'AG' => 'Antigua og Barbuda', + 'AR' => 'Argentina', + 'AM' => 'Armenien', + 'AW' => 'Aruba', + 'AZ' => 'Aserbajdsjan', + 'AU' => 'Australien', + 'BS' => 'Bahamas', + 'BH' => 'Bahrain', + 'BD' => 'Bangladesh', + 'BB' => 'Barbados', + 'BE' => 'Belgien', + 'BZ' => 'Belize', + 'BJ' => 'Benin', + 'BM' => 'Bermuda', + 'BT' => 'Bhutan', + 'BO' => 'Bolivia', + 'BA' => 'Bosnien-Hercegovina', + 'BW' => 'Botswana', + 'BV' => 'Bouvetø', + 'BR' => 'Brasilien', + 'BN' => 'Brunei Darussalam', + 'BG' => 'Bulgarien', + 'BF' => 'Burkina Faso', + 'BI' => 'Burundi', + 'KH' => 'Cambodja', + 'CM' => 'Cameroun', + 'CA' => 'Canada', + 'KY' => 'Caymanøerne', + 'CF' => 'Centralafrikanske Republik', + 'CL' => 'Chile', + 'CC' => 'Cocosøerne', + 'CO' => 'Colombia', + 'KM' => 'Comorerne', + 'CG' => 'Congo', + 'CD' => 'Congo-Kinshasa', + 'CK' => 'Cook-øerne', + 'CR' => 'Costa Rica', + 'CU' => 'Cuba', + 'CY' => 'Cypern', + 'DK' => 'Danmark', + 'UM' => 'De Mindre Amerikanske Oversøiske Øer', + 'VI' => 'De amerikanske jomfruøer', + 'VG' => 'De britiske jomfruøer', + 'PS' => 'De palæstinensiske områder', + 'DO' => 'Den Dominikanske Republik', + 'IO' => 'Det Britiske Territorium i Det Indiske Ocean', + 'DJ' => 'Djibouti', + 'DM' => 'Dominica', + 'EC' => 'Ecuador', + 'EG' => 'Egypten', + 'SV' => 'El Salvador', + 'CI' => 'Elfenbenskysten', + 'ER' => 'Eritrea', + 'EE' => 'Estland', + 'ET' => 'Etiopien', + 'FK' => 'Falklandsøerne', + 'FJ' => 'Fiji-øerne', + 'PH' => 'Filippinerne', + 'FI' => 'Finland', + 'AE' => 'Forenede Arabiske Emirater', + 'FR' => 'Frankrig', + 'GF' => 'Fransk Guyana', + 'PF' => 'Fransk Polynesien', + 'TF' => 'Franske Besiddelser i Det Sydlige Indiske Ocean', + 'FO' => 'Færøerne', + 'GA' => 'Gabon', + 'GM' => 'Gambia', + 'GE' => 'Georgien', + 'GH' => 'Ghana', + 'GI' => 'Gibraltar', + 'GD' => 'Grenada', + 'GR' => 'Grækenland', + 'GL' => 'Grønland', + 'GP' => 'Guadeloupe', + 'GU' => 'Guam', + 'GT' => 'Guatemala', + 'GG' => 'Guernsey', + 'GN' => 'Guinea', + 'GW' => 'Guinea-Bissau', + 'GY' => 'Guyana', + 'HT' => 'Haiti', + 'HM' => 'Heard- og McDonald-øerne', + 'NL' => 'Holland', + 'AN' => 'Hollandske Antiller', + 'HN' => 'Honduras', + 'BY' => 'Hviderusland', + 'IN' => 'Indien', + 'ID' => 'Indonesien', + 'IQ' => 'Irak', + 'IR' => 'Iran', + 'IE' => 'Irland', + 'IS' => 'Island', + 'IM' => 'Isle of Man', + 'IL' => 'Israel', + 'IT' => 'Italien', + 'JM' => 'Jamaica', + 'JP' => 'Japan', + 'JE' => 'Jersey', + 'JO' => 'Jordan', + 'CX' => 'Juleøen', + 'CV' => 'Kap Verde', + 'KZ' => 'Kasakhstan', + 'KE' => 'Kenya', + 'CN' => 'Kina', + 'KG' => 'Kirgisistan', + 'KI' => 'Kiribati', + 'HR' => 'Kroatien', + 'KW' => 'Kuwait', + 'LA' => 'Laos', + 'LS' => 'Lesotho', + 'LV' => 'Letland', + 'LB' => 'Libanon', + 'LR' => 'Liberia', + 'LY' => 'Libyen', + 'LI' => 'Liechtenstein', + 'LT' => 'Litauen', + 'LU' => 'Luxembourg', + 'MG' => 'Madagaskar', + 'MW' => 'Malawi', + 'MY' => 'Malaysia', + 'MV' => 'Maldiverne', + 'ML' => 'Mali', + 'MT' => 'Malta', + 'MA' => 'Marokko', + 'MH' => 'Marshalløerne', + 'MQ' => 'Martinique', + 'MR' => 'Mauretanien', + 'MU' => 'Mauritius', + 'YT' => 'Mayotte', + 'MX' => 'Mexico', + 'FM' => 'Mikronesiens Forenede Stater', + 'MC' => 'Monaco', + 'MN' => 'Mongoliet', + 'ME' => 'Montenegro', + 'MS' => 'Montserrat', + 'MZ' => 'Mozambique', + 'MM' => 'Myanmar', + 'NA' => 'Namibia', + 'NR' => 'Nauru', + 'NP' => 'Nepal', + 'NZ' => 'New Zealand', + 'NI' => 'Nicaragua', + 'NE' => 'Niger', + 'NG' => 'Nigeria', + 'NU' => 'Niue', + 'KP' => 'Nordkorea', + 'MP' => 'Nordmarianerne', + 'NF' => 'Norfolk Island', + 'NO' => 'Norge', + 'NC' => 'Ny Caledonien', + 'OM' => 'Oman', + 'PK' => 'Pakistan', + 'PW' => 'Palau', + 'PA' => 'Panama', + 'PG' => 'Papua Ny Guinea', + 'PY' => 'Paraguay', + 'PE' => 'Peru', + 'PN' => 'Pitcairn', + 'PL' => 'Polen', + 'PT' => 'Portugal', + 'PR' => 'Puerto Rico', + 'QA' => 'Qatar', + 'MK' => 'Republikken Makedonien', + 'MD' => 'Republikken Moldova', + 'RE' => 'Reunion', + 'RO' => 'Rumænien', + 'RU' => 'Rusland', + 'RW' => 'Rwanda', + 'HK' => 'SAR Hongkong', + 'MO' => 'SAR Macao', + 'BL' => 'Saint Barthélemy', + 'KN' => 'Saint Kitts og Nevis', + 'LC' => 'Saint Lucia', + 'MF' => 'Saint Martin', + 'PM' => 'Saint Pierre og Miquelon', + 'SB' => 'Salomonøerne', + 'WS' => 'Samoa', + 'SM' => 'San Marino', + 'ST' => 'Sao Tome og Principe', + 'SA' => 'Saudi-Arabien', + 'CH' => 'Schweiz', + 'SN' => 'Senegal', + 'RS' => 'Serbien', + 'CS' => 'Serbien og Montenegro', + 'SC' => 'Seychellerne', + 'SL' => 'Sierra Leone', + 'SG' => 'Singapore', + 'SK' => 'Slovakiet', + 'SI' => 'Slovenien', + 'SO' => 'Somalia', + 'GS' => 'South Georgia og De Sydlige Sandwichøer', + 'ES' => 'Spanien', + 'LK' => 'Sri Lanka', + 'SH' => 'St. Helena', + 'VC' => 'St. Vincent og Grenadinerne', + 'GB' => 'Storbritannien', + 'SD' => 'Sudan', + 'SR' => 'Surinam', + 'SJ' => 'Svalbard og Jan Mayen', + 'SE' => 'Sverige', + 'SZ' => 'Swaziland', + 'ZA' => 'Sydafrika', + 'KR' => 'Sydkorea', + 'SY' => 'Syrien', + 'TJ' => 'Tadsjikistan', + 'TW' => 'Taiwan', + 'TZ' => 'Tanzania', + 'TD' => 'Tchad', + 'TH' => 'Thailand', + 'TL' => 'Timor-Leste', + 'CZ' => 'Tjekkiet', + 'TG' => 'Togo', + 'TK' => 'Tokelau', + 'TO' => 'Tonga', + 'TT' => 'Trinidad og Tobago', + 'TN' => 'Tunesien', + 'TM' => 'Turkmenistan', + 'TC' => 'Turks- og Caicosøerne', + 'TV' => 'Tuvalu', + 'TR' => 'Tyrkiet', + 'DE' => 'Tyskland', + 'US' => 'USA', + 'UG' => 'Uganda', + 'ZZ' => 'Ukendt eller ugyldigt område', + 'UA' => 'Ukraine', + 'HU' => 'Ungarn', + 'UY' => 'Uruguay', + 'UZ' => 'Usbekistan', + 'VU' => 'Vanuatu', + 'VA' => 'Vatikanstaten', + 'VE' => 'Venezuela', + 'EH' => 'Vestsahara', + 'VN' => 'Vietnam', + 'WF' => 'Wallis og Futunaøerne', + 'YE' => 'Yemen', + 'ZM' => 'Zambia', + 'ZW' => 'Zimbabwe', + 'AX' => 'Åland', + 'GQ' => 'Ækvatorialguinea', + 'AT' => 'Østrig', +); diff --git a/application/helpers/country-list/de/country.php b/application/helpers/country-list/de/country.php new file mode 100644 index 0000000..2633df6 --- /dev/null +++ b/application/helpers/country-list/de/country.php @@ -0,0 +1,250 @@ + 'Afghanistan', + 'AX' => 'Alandinseln', + 'AL' => 'Albanien', + 'DZ' => 'Algerien', + 'UM' => 'Amerikanisch-Ozeanien', + 'AS' => 'Amerikanisch-Samoa', + 'VI' => 'Amerikanische Jungferninseln', + 'AD' => 'Andorra', + 'AO' => 'Angola', + 'AI' => 'Anguilla', + 'AQ' => 'Antarktis', + 'AG' => 'Antigua und Barbuda', + 'AR' => 'Argentinien', + 'AM' => 'Armenien', + 'AW' => 'Aruba', + 'AZ' => 'Aserbaidschan', + 'AU' => 'Australien', + 'BS' => 'Bahamas', + 'BH' => 'Bahrain', + 'BD' => 'Bangladesch', + 'BB' => 'Barbados', + 'BY' => 'Belarus', + 'BE' => 'Belgien', + 'BZ' => 'Belize', + 'BJ' => 'Benin', + 'BM' => 'Bermuda', + 'BT' => 'Bhutan', + 'BO' => 'Bolivien', + 'BA' => 'Bosnien und Herzegowina', + 'BW' => 'Botsuana', + 'BV' => 'Bouvetinsel', + 'BR' => 'Brasilien', + 'VG' => 'Britische Jungferninseln', + 'IO' => 'Britisches Territorium im Indischen Ozean', + 'BN' => 'Brunei Darussalam', + 'BG' => 'Bulgarien', + 'BF' => 'Burkina Faso', + 'BI' => 'Burundi', + 'CL' => 'Chile', + 'CN' => 'China', + 'CK' => 'Cookinseln', + 'CR' => 'Costa Rica', + 'CI' => 'Côte d’Ivoire', + 'CD' => 'Demokratische Republik Kongo', + 'KP' => 'Demokratische Volksrepublik Korea', + 'DE' => 'Deutschland', + 'DM' => 'Dominica', + 'DO' => 'Dominikanische Republik', + 'DJ' => 'Dschibuti', + 'DK' => 'Dänemark', + 'EC' => 'Ecuador', + 'SV' => 'El Salvador', + 'ER' => 'Eritrea', + 'EE' => 'Estland', + 'FK' => 'Falklandinseln', + 'FJ' => 'Fidschi', + 'FI' => 'Finnland', + 'FR' => 'Frankreich', + 'GF' => 'Französisch-Guayana', + 'PF' => 'Französisch-Polynesien', + 'TF' => 'Französische Süd- und Antarktisgebiete', + 'FO' => 'Färöer', + 'GA' => 'Gabun', + 'GM' => 'Gambia', + 'GE' => 'Georgien', + 'GH' => 'Ghana', + 'GI' => 'Gibraltar', + 'GD' => 'Grenada', + 'GR' => 'Griechenland', + 'GL' => 'Grönland', + 'GP' => 'Guadeloupe', + 'GU' => 'Guam', + 'GT' => 'Guatemala', + 'GG' => 'Guernsey', + 'GN' => 'Guinea', + 'GW' => 'Guinea-Bissau', + 'GY' => 'Guyana', + 'HT' => 'Haiti', + 'HM' => 'Heard- und McDonald-Inseln', + 'HN' => 'Honduras', + 'IN' => 'Indien', + 'ID' => 'Indonesien', + 'IQ' => 'Irak', + 'IR' => 'Iran', + 'IE' => 'Irland', + 'IS' => 'Island', + 'IM' => 'Isle of Man', + 'IL' => 'Israel', + 'IT' => 'Italien', + 'JM' => 'Jamaika', + 'JP' => 'Japan', + 'YE' => 'Jemen', + 'JE' => 'Jersey', + 'JO' => 'Jordanien', + 'KY' => 'Kaimaninseln', + 'KH' => 'Kambodscha', + 'CM' => 'Kamerun', + 'CA' => 'Kanada', + 'CV' => 'Kap Verde', + 'KZ' => 'Kasachstan', + 'QA' => 'Katar', + 'KE' => 'Kenia', + 'KG' => 'Kirgisistan', + 'KI' => 'Kiribati', + 'CC' => 'Kokosinseln', + 'CO' => 'Kolumbien', + 'KM' => 'Komoren', + 'CG' => 'Kongo', + 'HR' => 'Kroatien', + 'CU' => 'Kuba', + 'KW' => 'Kuwait', + 'LA' => 'Laos', + 'LS' => 'Lesotho', + 'LV' => 'Lettland', + 'LB' => 'Libanon', + 'LR' => 'Liberia', + 'LY' => 'Libyen', + 'LI' => 'Liechtenstein', + 'LT' => 'Litauen', + 'LU' => 'Luxemburg', + 'MG' => 'Madagaskar', + 'MW' => 'Malawi', + 'MY' => 'Malaysia', + 'MV' => 'Malediven', + 'ML' => 'Mali', + 'MT' => 'Malta', + 'MA' => 'Marokko', + 'MH' => 'Marshallinseln', + 'MQ' => 'Martinique', + 'MR' => 'Mauretanien', + 'MU' => 'Mauritius', + 'YT' => 'Mayotte', + 'MK' => 'Mazedonien', + 'MX' => 'Mexiko', + 'FM' => 'Mikronesien', + 'MC' => 'Monaco', + 'MN' => 'Mongolei', + 'ME' => 'Montenegro', + 'MS' => 'Montserrat', + 'MZ' => 'Mosambik', + 'MM' => 'Myanmar', + 'NA' => 'Namibia', + 'NR' => 'Nauru', + 'NP' => 'Nepal', + 'NC' => 'Neukaledonien', + 'NZ' => 'Neuseeland', + 'NI' => 'Nicaragua', + 'NL' => 'Niederlande', + 'AN' => 'Niederländische Antillen', + 'NE' => 'Niger', + 'NG' => 'Nigeria', + 'NU' => 'Niue', + 'NF' => 'Norfolkinsel', + 'NO' => 'Norwegen', + 'MP' => 'Nördliche Marianen', + 'OM' => 'Oman', + 'TL' => 'Osttimor', + 'PK' => 'Pakistan', + 'PW' => 'Palau', + 'PS' => 'Palästinensische Gebiete', + 'PA' => 'Panama', + 'PG' => 'Papua-Neuguinea', + 'PY' => 'Paraguay', + 'PE' => 'Peru', + 'PH' => 'Philippinen', + 'PN' => 'Pitcairn', + 'PL' => 'Polen', + 'PT' => 'Portugal', + 'PR' => 'Puerto Rico', + 'KR' => 'Republik Korea', + 'MD' => 'Republik Moldau', + 'RW' => 'Ruanda', + 'RO' => 'Rumänien', + 'RU' => 'Russische Föderation', + 'RE' => 'Réunion', + 'SB' => 'Salomonen', + 'ZM' => 'Sambia', + 'WS' => 'Samoa', + 'SM' => 'San Marino', + 'SA' => 'Saudi-Arabien', + 'SE' => 'Schweden', + 'CH' => 'Schweiz', + 'SN' => 'Senegal', + 'RS' => 'Serbien', + 'CS' => 'Serbien und Montenegro', + 'SC' => 'Seychellen', + 'SL' => 'Sierra Leone', + 'ZW' => 'Simbabwe', + 'SG' => 'Singapur', + 'SK' => 'Slowakei', + 'SI' => 'Slowenien', + 'SO' => 'Somalia', + 'HK' => 'Sonderverwaltungszone Hongkong', + 'MO' => 'Sonderverwaltungszone Macao', + 'ES' => 'Spanien', + 'LK' => 'Sri Lanka', + 'BL' => 'St. Barthélemy', + 'SH' => 'St. Helena', + 'KN' => 'St. Kitts und Nevis', + 'LC' => 'St. Lucia', + 'MF' => 'St. Martin', + 'PM' => 'St. Pierre und Miquelon', + 'VC' => 'St. Vincent und die Grenadinen', + 'SD' => 'Sudan', + 'SR' => 'Suriname', + 'SJ' => 'Svalbard und Jan Mayen', + 'SZ' => 'Swasiland', + 'SY' => 'Syrien', + 'ST' => 'São Tomé und Príncipe', + 'ZA' => 'Südafrika', + 'GS' => 'Südgeorgien und die Südlichen Sandwichinseln', + 'TJ' => 'Tadschikistan', + 'TW' => 'Taiwan', + 'TZ' => 'Tansania', + 'TH' => 'Thailand', + 'TG' => 'Togo', + 'TK' => 'Tokelau', + 'TO' => 'Tonga', + 'TT' => 'Trinidad und Tobago', + 'TD' => 'Tschad', + 'CZ' => 'Tschechische Republik', + 'TN' => 'Tunesien', + 'TM' => 'Turkmenistan', + 'TC' => 'Turks- und Caicosinseln', + 'TV' => 'Tuvalu', + 'TR' => 'Türkei', + 'UG' => 'Uganda', + 'UA' => 'Ukraine', + 'ZZ' => 'Unbekannte oder ungültige Region', + 'HU' => 'Ungarn', + 'UY' => 'Uruguay', + 'UZ' => 'Usbekistan', + 'VU' => 'Vanuatu', + 'VA' => 'Vatikanstadt', + 'VE' => 'Venezuela', + 'AE' => 'Vereinigte Arabische Emirate', + 'US' => 'Vereinigte Staaten', + 'GB' => 'Vereinigtes Königreich', + 'VN' => 'Vietnam', + 'WF' => 'Wallis und Futuna', + 'CX' => 'Weihnachtsinsel', + 'EH' => 'Westsahara', + 'CF' => 'Zentralafrikanische Republik', + 'CY' => 'Zypern', + 'EG' => 'Ägypten', + 'GQ' => 'Äquatorialguinea', + 'ET' => 'Äthiopien', + 'AT' => 'Österreich', +); diff --git a/application/helpers/country-list/de_CH/country.php b/application/helpers/country-list/de_CH/country.php new file mode 100644 index 0000000..a547a9c --- /dev/null +++ b/application/helpers/country-list/de_CH/country.php @@ -0,0 +1,250 @@ + 'Afghanistan', + 'AX' => 'Alandinseln', + 'AL' => 'Albanien', + 'DZ' => 'Algerien', + 'UM' => 'Amerikanisch-Ozeanien', + 'AS' => 'Amerikanisch-Samoa', + 'VI' => 'Amerikanische Jungferninseln', + 'AD' => 'Andorra', + 'AO' => 'Angola', + 'AI' => 'Anguilla', + 'AQ' => 'Antarktis', + 'AG' => 'Antigua und Barbuda', + 'AR' => 'Argentinien', + 'AM' => 'Armenien', + 'AW' => 'Aruba', + 'AZ' => 'Aserbaidschan', + 'AU' => 'Australien', + 'BS' => 'Bahamas', + 'BH' => 'Bahrain', + 'BD' => 'Bangladesh', + 'BB' => 'Barbados', + 'BE' => 'Belgien', + 'BZ' => 'Belize', + 'BJ' => 'Benin', + 'BM' => 'Bermuda', + 'BT' => 'Bhutan', + 'BO' => 'Bolivien', + 'BA' => 'Bosnien und Herzegowina', + 'BW' => 'Botswana', + 'BV' => 'Bouvetinsel', + 'BR' => 'Brasilien', + 'VG' => 'Britische Jungferninseln', + 'IO' => 'Britisches Territorium im Indischen Ozean', + 'BN' => 'Brunei', + 'BG' => 'Bulgarien', + 'BF' => 'Burkina Faso', + 'BI' => 'Burundi', + 'CL' => 'Chile', + 'CN' => 'China', + 'CK' => 'Cookinseln', + 'CR' => 'Costa Rica', + 'CI' => 'Côte d’Ivoire', + 'CD' => 'Demokratische Republik Kongo', + 'KP' => 'Demokratische Volksrepublik Korea', + 'DE' => 'Deutschland', + 'DJ' => 'Djibouti', + 'DM' => 'Dominica', + 'DO' => 'Dominikanische Republik', + 'DK' => 'Dänemark', + 'EC' => 'Ecuador', + 'SV' => 'El Salvador', + 'ER' => 'Eritrea', + 'EE' => 'Estland', + 'FK' => 'Falklandinseln', + 'FJ' => 'Fidschi', + 'FI' => 'Finnland', + 'FR' => 'Frankreich', + 'GF' => 'Französisch-Guayana', + 'PF' => 'Französisch-Polynesien', + 'TF' => 'Französische Süd- und Antarktisgebiete', + 'FO' => 'Färöer', + 'GA' => 'Gabun', + 'GM' => 'Gambia', + 'GE' => 'Georgien', + 'GH' => 'Ghana', + 'GI' => 'Gibraltar', + 'GD' => 'Grenada', + 'GR' => 'Griechenland', + 'GB' => 'Grossbritannien', + 'GL' => 'Grönland', + 'GP' => 'Guadeloupe', + 'GU' => 'Guam', + 'GT' => 'Guatemala', + 'GG' => 'Guernsey', + 'GN' => 'Guinea', + 'GW' => 'Guinea-Bissau', + 'GY' => 'Guyana', + 'HT' => 'Haiti', + 'HM' => 'Heard- und McDonald-Inseln', + 'HN' => 'Honduras', + 'IN' => 'Indien', + 'ID' => 'Indonesien', + 'IQ' => 'Irak', + 'IR' => 'Iran', + 'IE' => 'Irland', + 'IS' => 'Island', + 'IM' => 'Isle of Man', + 'IL' => 'Israel', + 'IT' => 'Italien', + 'JM' => 'Jamaika', + 'JP' => 'Japan', + 'YE' => 'Jemen', + 'JE' => 'Jersey', + 'JO' => 'Jordanien', + 'KY' => 'Kaimaninseln', + 'KH' => 'Kambodscha', + 'CM' => 'Kamerun', + 'CA' => 'Kanada', + 'CV' => 'Kapverden', + 'KZ' => 'Kasachstan', + 'QA' => 'Katar', + 'KE' => 'Kenia', + 'KG' => 'Kirgisistan', + 'KI' => 'Kiribati', + 'CC' => 'Kokosinseln', + 'CO' => 'Kolumbien', + 'KM' => 'Komoren', + 'CG' => 'Kongo', + 'HR' => 'Kroatien', + 'CU' => 'Kuba', + 'KW' => 'Kuwait', + 'LA' => 'Laos', + 'LS' => 'Lesotho', + 'LV' => 'Lettland', + 'LB' => 'Libanon', + 'LR' => 'Liberia', + 'LY' => 'Libyen', + 'LI' => 'Liechtenstein', + 'LT' => 'Litauen', + 'LU' => 'Luxemburg', + 'MG' => 'Madagaskar', + 'MW' => 'Malawi', + 'MY' => 'Malaysia', + 'MV' => 'Malediven', + 'ML' => 'Mali', + 'MT' => 'Malta', + 'MA' => 'Marokko', + 'MH' => 'Marshall-Inseln', + 'MQ' => 'Martinique', + 'MR' => 'Mauretanien', + 'MU' => 'Mauritius', + 'YT' => 'Mayotte', + 'MK' => 'Mazedonien', + 'MX' => 'Mexiko', + 'FM' => 'Mikronesien', + 'MC' => 'Monaco', + 'MN' => 'Mongolei', + 'ME' => 'Montenegro', + 'MS' => 'Montserrat', + 'MZ' => 'Mosambik', + 'MM' => 'Myanmar', + 'NA' => 'Namibia', + 'NR' => 'Nauru', + 'NP' => 'Nepal', + 'NC' => 'Neukaledonien', + 'NZ' => 'Neuseeland', + 'NI' => 'Nicaragua', + 'NL' => 'Niederlande', + 'AN' => 'Niederländische Antillen', + 'NE' => 'Niger', + 'NG' => 'Nigeria', + 'NU' => 'Niue', + 'NF' => 'Norfolkinsel', + 'NO' => 'Norwegen', + 'MP' => 'Nördliche Marianen', + 'OM' => 'Oman', + 'TL' => 'Osttimor', + 'PK' => 'Pakistan', + 'PW' => 'Palau', + 'PS' => 'Palästinensische Gebiete', + 'PA' => 'Panama', + 'PG' => 'Papua-Neuguinea', + 'PY' => 'Paraguay', + 'PE' => 'Peru', + 'PH' => 'Philippinen', + 'PN' => 'Pitcairn', + 'PL' => 'Polen', + 'PT' => 'Portugal', + 'PR' => 'Puerto Rico', + 'KR' => 'Republik Korea', + 'MD' => 'Republik Moldau', + 'RO' => 'Rumänien', + 'RU' => 'Russische Föderation', + 'RW' => 'Rwanda', + 'RE' => 'Réunion', + 'SB' => 'Salomon-Inseln', + 'ZM' => 'Sambia', + 'WS' => 'Samoa', + 'SM' => 'San Marino', + 'ST' => 'Sao Tomé und Principe', + 'SA' => 'Saudi-Arabien', + 'SE' => 'Schweden', + 'CH' => 'Schweiz', + 'SN' => 'Senegal', + 'RS' => 'Serbien', + 'CS' => 'Serbien und Montenegro', + 'SC' => 'Seychellen', + 'SL' => 'Sierra Leone', + 'SG' => 'Singapur', + 'SK' => 'Slowakei', + 'SI' => 'Slowenien', + 'SO' => 'Somalia', + 'HK' => 'Sonderverwaltungszone Hongkong', + 'MO' => 'Sonderverwaltungszone Macao', + 'ES' => 'Spanien', + 'LK' => 'Sri Lanka', + 'BL' => 'St. Barthélemy', + 'SH' => 'St. Helena', + 'KN' => 'St. Kitts und Nevis', + 'LC' => 'St. Lucia', + 'MF' => 'St. Martin', + 'PM' => 'St. Pierre und Miquelon', + 'VC' => 'St. Vincent und die Grenadinen', + 'SD' => 'Sudan', + 'SR' => 'Suriname', + 'SJ' => 'Svalbard und Jan Mayen', + 'SZ' => 'Swasiland', + 'SY' => 'Syrien', + 'ZA' => 'Südafrika', + 'GS' => 'Südgeorgien und die Südlichen Sandwichinseln', + 'TJ' => 'Tadschikistan', + 'TW' => 'Taiwan', + 'TZ' => 'Tansania', + 'TH' => 'Thailand', + 'TG' => 'Togo', + 'TK' => 'Tokelau', + 'TO' => 'Tonga', + 'TT' => 'Trinidad und Tobago', + 'TD' => 'Tschad', + 'CZ' => 'Tschechische Republik', + 'TN' => 'Tunesien', + 'TM' => 'Turkmenistan', + 'TC' => 'Turks- und Caicosinseln', + 'TV' => 'Tuvalu', + 'TR' => 'Türkei', + 'UG' => 'Uganda', + 'UA' => 'Ukraine', + 'ZZ' => 'Unbekannte oder ungültige Region', + 'HU' => 'Ungarn', + 'UY' => 'Uruguay', + 'UZ' => 'Usbekistan', + 'VU' => 'Vanuatu', + 'VA' => 'Vatikanstadt', + 'VE' => 'Venezuela', + 'AE' => 'Vereinigte Arabische Emirate', + 'US' => 'Vereinigte Staaten', + 'VN' => 'Vietnam', + 'WF' => 'Wallis und Futuna', + 'CX' => 'Weihnachtsinsel', + 'BY' => 'Weissrussland', + 'EH' => 'Westsahara', + 'CF' => 'Zentralafrikanische Republik', + 'ZW' => 'Zimbabwe', + 'CY' => 'Zypern', + 'EG' => 'Ägypten', + 'GQ' => 'Äquatorialguinea', + 'ET' => 'Äthiopien', + 'AT' => 'Österreich', +); diff --git a/application/helpers/country-list/el/country.php b/application/helpers/country-list/el/country.php new file mode 100644 index 0000000..1ed6b6e --- /dev/null +++ b/application/helpers/country-list/el/country.php @@ -0,0 +1,250 @@ + 'Άγιος Βαρθολομαίος', + 'VC' => 'Άγιος Βικέντιος και Γρεναδίνες', + 'SM' => 'Άγιος Μαρίνος', + 'MF' => 'Άγιος Μαρτίνος', + 'ZZ' => 'Άγνωστη ή μη έγκυρη περιοχή', + 'EG' => 'Αίγυπτος', + 'SH' => 'Αγία Ελένη', + 'LC' => 'Αγία Λουκία', + 'AZ' => 'Αζερμπαϊτζάν', + 'ET' => 'Αιθιοπία', + 'CI' => 'Ακτή Ελεφαντοστού', + 'AL' => 'Αλβανία', + 'DZ' => 'Αλγερία', + 'VI' => 'Αμερικανικές Παρθένοι Νήσοι', + 'AS' => 'Αμερικανική Σαμόα', + 'TL' => 'Ανατολικό Τιμόρ', + 'AI' => 'Ανγκουίλα', + 'AO' => 'Ανγκόλα', + 'AD' => 'Ανδόρα', + 'AG' => 'Αντίγκουα και Μπαρμπούντα', + 'AQ' => 'Ανταρκτική', + 'UM' => 'Απομακρυσμένες Νησίδες Η.Π.Α.', + 'AR' => 'Αργεντινή', + 'AM' => 'Αρμενία', + 'AW' => 'Αρούμπα', + 'AT' => 'Αυστρία', + 'AU' => 'Αυστραλία', + 'AF' => 'Αφγανιστάν', + 'HT' => 'Αϊτή', + 'BE' => 'Βέλγιο', + 'VU' => 'Βανουάτου', + 'VA' => 'Βατικανό', + 'VE' => 'Βενεζουέλα', + 'BM' => 'Βερμούδες', + 'VN' => 'Βιετνάμ', + 'BO' => 'Βολιβία', + 'BA' => 'Βοσνία - Ερζεγοβίνη', + 'BG' => 'Βουλγαρία', + 'BR' => 'Βραζιλία', + 'IO' => 'Βρετανικά Εδάφη Ινδικού Ωκεανού', + 'VG' => 'Βρετανικές Παρθένοι Νήσοι', + 'KP' => 'Βόρεια Κορέα', + 'MP' => 'Βόρειες Μαριάνες Νήσοι', + 'FR' => 'Γαλλία', + 'TF' => 'Γαλλικά Νότια Εδάφη', + 'GF' => 'Γαλλική Γουιάνα', + 'PF' => 'Γαλλική Πολυνησία', + 'DE' => 'Γερμανία', + 'GE' => 'Γεωργία', + 'GI' => 'Γιβραλτάρ', + 'GM' => 'Γκάμπια', + 'GH' => 'Γκάνα', + 'GA' => 'Γκαμπόν', + 'GG' => 'Γκερνσέι', + 'GU' => 'Γκουάμ', + 'GP' => 'Γουαδελούπη', + 'GT' => 'Γουατεμάλα', + 'GY' => 'Γουιάνα', + 'GN' => 'Γουινέα', + 'GW' => 'Γουινέα-Μπισάου', + 'GD' => 'Γρενάδα', + 'GL' => 'Γροιλανδία', + 'DK' => 'Δανία', + 'DO' => 'Δομινικανή Δημοκρατία', + 'EH' => 'Δυτική Σαχάρα', + 'SV' => 'Ελ Σαλβαδόρ', + 'CH' => 'Ελβετία', + 'GR' => 'Ελλάδα', + 'ER' => 'Ερυθραία', + 'EE' => 'Εσθονία', + 'ZM' => 'Ζάμπια', + 'ZW' => 'Ζιμπάμπουε', + 'SZ' => 'Ζουαζηλάνδη', + 'AE' => 'Ηνωμένα Αραβικά Εμιράτα', + 'US' => 'Ηνωμένες Πολιτείες της Αμερικής', + 'GB' => 'Ηνωμένο Βασίλειο', + 'JP' => 'Ιαπωνία', + 'IN' => 'Ινδία', + 'ID' => 'Ινδονησία', + 'JO' => 'Ιορδανία', + 'IQ' => 'Ιράκ', + 'IR' => 'Ιράν', + 'IE' => 'Ιρλανδία', + 'GQ' => 'Ισημερινή Γουινέα', + 'EC' => 'Ισημερινός', + 'IS' => 'Ισλανδία', + 'ES' => 'Ισπανία', + 'IL' => 'Ισραήλ', + 'IT' => 'Ιταλία', + 'KE' => 'Κένυα', + 'CN' => 'Κίνα', + 'KZ' => 'Καζακστάν', + 'CM' => 'Καμερούν', + 'KH' => 'Καμπότζη', + 'CA' => 'Καναδάς', + 'QA' => 'Κατάρ', + 'CF' => 'Κεντροαφρικανική Δημοκρατία', + 'KG' => 'Κιργιζία', + 'KI' => 'Κιριμπάτι', + 'CO' => 'Κολομβία', + 'KM' => 'Κομόρος', + 'CD' => 'Κονγκό - Κινσάσα', + 'CG' => 'Κονγκό - Μπραζαβίλ', + 'KW' => 'Κουβέιτ', + 'CU' => 'Κούβα', + 'HR' => 'Κροατία', + 'CR' => 'Κόστα Ρίκα', + 'CY' => 'Κύπρος', + 'LA' => 'Λάος', + 'LB' => 'Λίβανος', + 'LS' => 'Λεσότο', + 'LV' => 'Λετονία', + 'BY' => 'Λευκορωσία', + 'LR' => 'Λιβερία', + 'LY' => 'Λιβύη', + 'LT' => 'Λιθουανία', + 'LI' => 'Λιχτενστάιν', + 'LU' => 'Λουξεμβούργο', + 'ML' => 'Μάλι', + 'MT' => 'Μάλτα', + 'YT' => 'Μαγιότ', + 'MG' => 'Μαδαγασκάρη', + 'MO' => 'Μακάο ΕΔΠ Κίνας', + 'MW' => 'Μαλάουι', + 'MY' => 'Μαλαισία', + 'MV' => 'Μαλδίβες', + 'MQ' => 'Μαρτινίκα', + 'MA' => 'Μαρόκο', + 'MU' => 'Μαυρίκιος', + 'MR' => 'Μαυριτανία', + 'ME' => 'Μαυροβούνιο', + 'MX' => 'Μεξικό', + 'MM' => 'Μιανμάρ', + 'FM' => 'Μικρονησία', + 'MN' => 'Μογγολία', + 'MZ' => 'Μοζαμβίκη', + 'MD' => 'Μολδαβία', + 'MC' => 'Μονακό', + 'MS' => 'Μονσεράτ', + 'BD' => 'Μπανγκλαντές', + 'BB' => 'Μπαρμπάντος', + 'BS' => 'Μπαχάμες', + 'BH' => 'Μπαχρέιν', + 'BZ' => 'Μπελίσε', + 'BJ' => 'Μπενίν', + 'BW' => 'Μποτσουάνα', + 'BF' => 'Μπουρκίνα Φάσο', + 'BI' => 'Μπουρούντι', + 'BT' => 'Μπουτάν', + 'BN' => 'Μπρουνέι', + 'NZ' => 'Νέα Ζηλανδία', + 'NC' => 'Νέα Καληδονία', + 'AX' => 'Νήσοι Άλαντ', + 'KY' => 'Νήσοι Κέιμαν', + 'CK' => 'Νήσοι Κουκ', + 'CC' => 'Νήσοι Κόκος', + 'MH' => 'Νήσοι Μάρσαλ', + 'WF' => 'Νήσοι Ουαλλίς και Φουτουνά', + 'SB' => 'Νήσοι Σολομώντος', + 'TC' => 'Νήσοι Τερκς και Κάικος', + 'FO' => 'Νήσοι Φερόε', + 'FK' => 'Νήσοι Φώκλαντ', + 'HM' => 'Νήσοι Χερντ και Μακντόναλντ', + 'IM' => 'Νήσος Μαν', + 'BV' => 'Νήσος Μπουβέ', + 'NF' => 'Νήσος Νόρφολκ', + 'CX' => 'Νήσος Χριστουγέννων', + 'NE' => 'Νίγηρας', + 'NA' => 'Ναμίμπια', + 'NR' => 'Ναούρου', + 'NP' => 'Νεπάλ', + 'NG' => 'Νιγηρία', + 'NI' => 'Νικαράγουα', + 'NU' => 'Νιούε', + 'NO' => 'Νορβηγία', + 'DM' => 'Ντομίνικα', + 'ZA' => 'Νότια Αφρική', + 'GS' => 'Νότια Γεωργία και Νότιες Νήσοι Σάντουιτς', + 'KR' => 'Νότια Κορέα', + 'NL' => 'Ολλανδία', + 'AN' => 'Ολλανδικές Αντίλλες', + 'OM' => 'Ομάν', + 'HN' => 'Ονδούρα', + 'HU' => 'Ουγγαρία', + 'UG' => 'Ουγκάντα', + 'UZ' => 'Ουζμπεκιστάν', + 'UA' => 'Ουκρανία', + 'UY' => 'Ουρουγουάη', + 'MK' => 'ΠΓΔ Μακεδονίας', + 'PN' => 'Πίτκερν', + 'PK' => 'Πακιστάν', + 'PW' => 'Παλάου', + 'PS' => 'Παλαιστινιακά Εδάφη', + 'PA' => 'Παναμάς', + 'PG' => 'Παπούα Νέα Γουινέα', + 'PY' => 'Παραγουάη', + 'PE' => 'Περού', + 'PL' => 'Πολωνία', + 'PT' => 'Πορτογαλία', + 'PR' => 'Πουέρτο Ρίκο', + 'CV' => 'Πράσινο Ακρωτήριο', + 'RE' => 'Ρεϋνιόν', + 'RW' => 'Ρουάντα', + 'RO' => 'Ρουμανία', + 'RU' => 'Ρωσία', + 'ST' => 'Σάο Τομέ και Πρίνσιπε', + 'KN' => 'Σαιντ Κιτς και Νέβις', + 'PM' => 'Σαιντ Πιέρ και Μικελόν', + 'WS' => 'Σαμόα', + 'SA' => 'Σαουδική Αραβία', + 'SJ' => 'Σβαλμπάρντ και Γιαν Μαγιέν', + 'SN' => 'Σενεγάλη', + 'RS' => 'Σερβία', + 'CS' => 'Σερβία και Μαυροβούνιο', + 'SC' => 'Σεϋχέλλες', + 'SL' => 'Σιέρα Λεόνε', + 'SG' => 'Σιγκαπούρη', + 'SK' => 'Σλοβακία', + 'SI' => 'Σλοβενία', + 'SO' => 'Σομαλία', + 'SD' => 'Σουδάν', + 'SE' => 'Σουηδία', + 'SR' => 'Σουρινάμ', + 'LK' => 'Σρι Λάνκα', + 'SY' => 'Συρία', + 'TZ' => 'Τανζανία', + 'TJ' => 'Τατζικιστάν', + 'TW' => 'Ταϊβάν', + 'TH' => 'Ταϊλάνδη', + 'JM' => 'Τζαμάικα', + 'DJ' => 'Τζιμπουτί', + 'TK' => 'Τοκελάου', + 'TV' => 'Τουβαλού', + 'TR' => 'Τουρκία', + 'TM' => 'Τουρκμενιστάν', + 'TT' => 'Τρινιντάντ και Τομπάγκο', + 'TD' => 'Τσαντ', + 'CZ' => 'Τσεχία', + 'TN' => 'Τυνησία', + 'TG' => 'Τόγκο', + 'TO' => 'Τόνγκα', + 'YE' => 'Υεμένη', + 'JE' => 'Υερσέη', + 'FJ' => 'Φίτζι', + 'PH' => 'Φιλιππίνες', + 'FI' => 'Φινλανδία', + 'CL' => 'Χιλή', + 'HK' => 'Χονγκ Κονγκ ΕΔΠ Κίνας', +); diff --git a/application/helpers/country-list/en/country.php b/application/helpers/country-list/en/country.php new file mode 100644 index 0000000..9477e41 --- /dev/null +++ b/application/helpers/country-list/en/country.php @@ -0,0 +1,265 @@ + 'Afghanistan', + 'AL' => 'Albania', + 'DZ' => 'Algeria', + 'AS' => 'American Samoa', + 'AD' => 'Andorra', + 'AO' => 'Angola', + 'AI' => 'Anguilla', + 'AQ' => 'Antarctica', + 'AG' => 'Antigua and Barbuda', + 'AR' => 'Argentina', + 'AM' => 'Armenia', + 'AW' => 'Aruba', + 'AU' => 'Australia', + 'AT' => 'Austria', + 'AZ' => 'Azerbaijan', + 'BS' => 'Bahamas', + 'BH' => 'Bahrain', + 'BD' => 'Bangladesh', + 'BB' => 'Barbados', + 'BY' => 'Belarus', + 'BE' => 'Belgium', + 'BZ' => 'Belize', + 'BJ' => 'Benin', + 'BM' => 'Bermuda', + 'BT' => 'Bhutan', + 'BO' => 'Bolivia', + 'BA' => 'Bosnia and Herzegovina', + 'BW' => 'Botswana', + 'BV' => 'Bouvet Island', + 'BR' => 'Brazil', + 'BQ' => 'British Antarctic Territory', + 'IO' => 'British Indian Ocean Territory', + 'VG' => 'British Virgin Islands', + 'BN' => 'Brunei', + 'BG' => 'Bulgaria', + 'BF' => 'Burkina Faso', + 'BI' => 'Burundi', + 'KH' => 'Cambodia', + 'CM' => 'Cameroon', + 'CA' => 'Canada', + 'CT' => 'Canton and Enderbury Islands', + 'CV' => 'Cape Verde', + 'KY' => 'Cayman Islands', + 'CF' => 'Central African Republic', + 'TD' => 'Chad', + 'CL' => 'Chile', + 'CN' => 'China', + 'CX' => 'Christmas Island', + 'CC' => 'Cocos [Keeling] Islands', + 'CO' => 'Colombia', + 'KM' => 'Comoros', + 'CG' => 'Congo - Brazzaville', + 'CD' => 'Congo - Kinshasa', + 'CK' => 'Cook Islands', + 'CR' => 'Costa Rica', + 'HR' => 'Croatia', + 'CU' => 'Cuba', + 'CY' => 'Cyprus', + 'CZ' => 'Czech Republic', + 'CI' => 'Côte d’Ivoire', + 'DK' => 'Denmark', + 'DJ' => 'Djibouti', + 'DM' => 'Dominica', + 'DO' => 'Dominican Republic', + 'NQ' => 'Dronning Maud Land', + 'EC' => 'Ecuador', + 'EG' => 'Egypt', + 'SV' => 'El Salvador', + 'GQ' => 'Equatorial Guinea', + 'ER' => 'Eritrea', + 'EE' => 'Estonia', + 'ET' => 'Ethiopia', + 'FK' => 'Falkland Islands', + 'FO' => 'Faroe Islands', + 'FJ' => 'Fiji', + 'FI' => 'Finland', + 'FR' => 'France', + 'GF' => 'French Guiana', + 'PF' => 'French Polynesia', + 'TF' => 'French Southern Territories', + 'FQ' => 'French Southern and Antarctic Territories', + 'GA' => 'Gabon', + 'GM' => 'Gambia', + 'GE' => 'Georgia', + 'DE' => 'Germany', + 'GH' => 'Ghana', + 'GI' => 'Gibraltar', + 'GR' => 'Greece', + 'GL' => 'Greenland', + 'GD' => 'Grenada', + 'GP' => 'Guadeloupe', + 'GU' => 'Guam', + 'GT' => 'Guatemala', + 'GG' => 'Guernsey', + 'GN' => 'Guinea', + 'GW' => 'Guinea-Bissau', + 'GY' => 'Guyana', + 'HT' => 'Haiti', + 'HM' => 'Heard Island and McDonald Islands', + 'HN' => 'Honduras', + 'HK' => 'Hong Kong SAR China', + 'HU' => 'Hungary', + 'IS' => 'Iceland', + 'IN' => 'India', + 'ID' => 'Indonesia', + 'IR' => 'Iran', + 'IQ' => 'Iraq', + 'IE' => 'Ireland', + 'IM' => 'Isle of Man', + 'IL' => 'Israel', + 'IT' => 'Italy', + 'JM' => 'Jamaica', + 'JP' => 'Japan', + 'JE' => 'Jersey', + 'JT' => 'Johnston Island', + 'JO' => 'Jordan', + 'KZ' => 'Kazakhstan', + 'KE' => 'Kenya', + 'KI' => 'Kiribati', + 'KW' => 'Kuwait', + 'KG' => 'Kyrgyzstan', + 'LA' => 'Laos', + 'LV' => 'Latvia', + 'LB' => 'Lebanon', + 'LS' => 'Lesotho', + 'LR' => 'Liberia', + 'LY' => 'Libya', + 'LI' => 'Liechtenstein', + 'LT' => 'Lithuania', + 'LU' => 'Luxembourg', + 'MO' => 'Macau SAR China', + 'MK' => 'Macedonia', + 'MG' => 'Madagascar', + 'MW' => 'Malawi', + 'MY' => 'Malaysia', + 'MV' => 'Maldives', + 'ML' => 'Mali', + 'MT' => 'Malta', + 'MH' => 'Marshall Islands', + 'MQ' => 'Martinique', + 'MR' => 'Mauritania', + 'MU' => 'Mauritius', + 'YT' => 'Mayotte', + 'FX' => 'Metropolitan France', + 'MX' => 'Mexico', + 'FM' => 'Micronesia', + 'MI' => 'Midway Islands', + 'MD' => 'Moldova', + 'MC' => 'Monaco', + 'MN' => 'Mongolia', + 'ME' => 'Montenegro', + 'MS' => 'Montserrat', + 'MA' => 'Morocco', + 'MZ' => 'Mozambique', + 'MM' => 'Myanmar [Burma]', + 'NA' => 'Namibia', + 'NR' => 'Nauru', + 'NP' => 'Nepal', + 'NL' => 'The Netherlands', + 'AN' => 'Netherlands Antilles', + 'NT' => 'Neutral Zone', + 'NC' => 'New Caledonia', + 'NZ' => 'New Zealand', + 'NI' => 'Nicaragua', + 'NE' => 'Niger', + 'NG' => 'Nigeria', + 'NU' => 'Niue', + 'NF' => 'Norfolk Island', + 'KP' => 'North Korea', + 'VD' => 'North Vietnam', + 'MP' => 'Northern Mariana Islands', + 'NO' => 'Norway', + 'OM' => 'Oman', + 'PC' => 'Pacific Islands Trust Territory', + 'PK' => 'Pakistan', + 'PW' => 'Palau', + 'PS' => 'Palestinian Territories', + 'PA' => 'Panama', + 'PZ' => 'Panama Canal Zone', + 'PG' => 'Papua New Guinea', + 'PY' => 'Paraguay', + 'YD' => 'People\'s Democratic Republic of Yemen', + 'PE' => 'Peru', + 'PH' => 'Philippines', + 'PN' => 'Pitcairn Islands', + 'PL' => 'Poland', + 'PT' => 'Portugal', + 'PR' => 'Puerto Rico', + 'QA' => 'Qatar', + 'RO' => 'Romania', + 'RU' => 'Russia', + 'RW' => 'Rwanda', + 'RE' => 'Réunion', + 'BL' => 'Saint Barthélemy', + 'SH' => 'Saint Helena', + 'KN' => 'Saint Kitts and Nevis', + 'LC' => 'Saint Lucia', + 'MF' => 'Saint Martin', + 'PM' => 'Saint Pierre and Miquelon', + 'VC' => 'Saint Vincent and the Grenadines', + 'WS' => 'Samoa', + 'SM' => 'San Marino', + 'SA' => 'Saudi Arabia', + 'SN' => 'Senegal', + 'RS' => 'Serbia', + 'CS' => 'Serbia and Montenegro', + 'SC' => 'Seychelles', + 'SL' => 'Sierra Leone', + 'SG' => 'Singapore', + 'SK' => 'Slovakia', + 'SI' => 'Slovenia', + 'SB' => 'Solomon Islands', + 'SO' => 'Somalia', + 'ZA' => 'South Africa', + 'GS' => 'South Georgia and the South Sandwich Islands', + 'KR' => 'South Korea', + 'ES' => 'Spain', + 'LK' => 'Sri Lanka', + 'SD' => 'Sudan', + 'SR' => 'Suriname', + 'SJ' => 'Svalbard and Jan Mayen', + 'SZ' => 'Swaziland', + 'SE' => 'Sweden', + 'CH' => 'Switzerland', + 'SY' => 'Syria', + 'ST' => 'São Tomé and Príncipe', + 'TW' => 'Taiwan', + 'TJ' => 'Tajikistan', + 'TZ' => 'Tanzania', + 'TH' => 'Thailand', + 'TL' => 'Timor-Leste', + 'TG' => 'Togo', + 'TK' => 'Tokelau', + 'TO' => 'Tonga', + 'TT' => 'Trinidad and Tobago', + 'TN' => 'Tunisia', + 'TR' => 'Turkey', + 'TM' => 'Turkmenistan', + 'TC' => 'Turks and Caicos Islands', + 'TV' => 'Tuvalu', + 'UM' => 'U.S. Minor Outlying Islands', + 'PU' => 'U.S. Miscellaneous Pacific Islands', + 'VI' => 'U.S. Virgin Islands', + 'UG' => 'Uganda', + 'UA' => 'Ukraine', + 'SU' => 'Union of Soviet Socialist Republics', + 'AE' => 'United Arab Emirates', + 'GB' => 'United Kingdom', + 'US' => 'United States', + 'ZZ' => 'Unknown or Invalid Region', + 'UY' => 'Uruguay', + 'UZ' => 'Uzbekistan', + 'VU' => 'Vanuatu', + 'VA' => 'Vatican City', + 'VE' => 'Venezuela', + 'VN' => 'Vietnam', + 'WK' => 'Wake Island', + 'WF' => 'Wallis and Futuna', + 'EH' => 'Western Sahara', + 'YE' => 'Yemen', + 'ZM' => 'Zambia', + 'ZW' => 'Zimbabwe', + 'AX' => 'Åland Islands', +); diff --git a/application/helpers/country-list/es/country.php b/application/helpers/country-list/es/country.php new file mode 100644 index 0000000..9f94e99 --- /dev/null +++ b/application/helpers/country-list/es/country.php @@ -0,0 +1,250 @@ + 'Afganistán', + 'AL' => 'Albania', + 'DE' => 'Alemania', + 'AD' => 'Andorra', + 'AO' => 'Angola', + 'AI' => 'Anguila', + 'AG' => 'Antigua y Barbuda', + 'AN' => 'Antillas Neerlandesas', + 'AQ' => 'Antártida', + 'SA' => 'Arabia Saudí', + 'DZ' => 'Argelia', + 'AR' => 'Argentina', + 'AM' => 'Armenia', + 'AW' => 'Aruba', + 'AU' => 'Australia', + 'AT' => 'Austria', + 'AZ' => 'Azerbaiyán', + 'BS' => 'Bahamas', + 'BH' => 'Bahréin', + 'BD' => 'Bangladesh', + 'BB' => 'Barbados', + 'BZ' => 'Belice', + 'BJ' => 'Benín', + 'BM' => 'Bermudas', + 'BY' => 'Bielorrusia', + 'BO' => 'Bolivia', + 'BA' => 'Bosnia-Herzegovina', + 'BW' => 'Botsuana', + 'BR' => 'Brasil', + 'BN' => 'Brunéi', + 'BG' => 'Bulgaria', + 'BF' => 'Burkina Faso', + 'BI' => 'Burundi', + 'BT' => 'Bután', + 'BE' => 'Bélgica', + 'CV' => 'Cabo Verde', + 'KH' => 'Camboya', + 'CM' => 'Camerún', + 'CA' => 'Canadá', + 'TD' => 'Chad', + 'CL' => 'Chile', + 'CN' => 'China', + 'CY' => 'Chipre', + 'VA' => 'Ciudad del Vaticano', + 'CO' => 'Colombia', + 'KM' => 'Comoras', + 'CG' => 'Congo', + 'KP' => 'Corea del Norte', + 'KR' => 'Corea del Sur', + 'CR' => 'Costa Rica', + 'CI' => 'Costa de Marfil', + 'HR' => 'Croacia', + 'CU' => 'Cuba', + 'DK' => 'Dinamarca', + 'DM' => 'Dominica', + 'EC' => 'Ecuador', + 'EG' => 'Egipto', + 'SV' => 'El Salvador', + 'AE' => 'Emiratos Árabes Unidos', + 'ER' => 'Eritrea', + 'SK' => 'Eslovaquia', + 'SI' => 'Eslovenia', + 'ES' => 'España', + 'US' => 'Estados Unidos', + 'EE' => 'Estonia', + 'ET' => 'Etiopía', + 'PH' => 'Filipinas', + 'FI' => 'Finlandia', + 'FJ' => 'Fiyi', + 'FR' => 'Francia', + 'GA' => 'Gabón', + 'GM' => 'Gambia', + 'GE' => 'Georgia', + 'GH' => 'Ghana', + 'GI' => 'Gibraltar', + 'GD' => 'Granada', + 'GR' => 'Grecia', + 'GL' => 'Groenlandia', + 'GP' => 'Guadalupe', + 'GU' => 'Guam', + 'GT' => 'Guatemala', + 'GF' => 'Guayana Francesa', + 'GG' => 'Guernsey', + 'GN' => 'Guinea', + 'GQ' => 'Guinea Ecuatorial', + 'GW' => 'Guinea-Bissau', + 'GY' => 'Guyana', + 'HT' => 'Haití', + 'HN' => 'Honduras', + 'HU' => 'Hungría', + 'IN' => 'India', + 'ID' => 'Indonesia', + 'IQ' => 'Iraq', + 'IE' => 'Irlanda', + 'IR' => 'Irán', + 'BV' => 'Isla Bouvet', + 'CX' => 'Isla Christmas', + 'NU' => 'Isla Niue', + 'NF' => 'Isla Norfolk', + 'IM' => 'Isla de Man', + 'IS' => 'Islandia', + 'KY' => 'Islas Caimán', + 'CC' => 'Islas Cocos', + 'CK' => 'Islas Cook', + 'FO' => 'Islas Feroe', + 'GS' => 'Islas Georgia del Sur y Sandwich del Sur', + 'HM' => 'Islas Heard y McDonald', + 'FK' => 'Islas Malvinas', + 'MP' => 'Islas Marianas del Norte', + 'MH' => 'Islas Marshall', + 'SB' => 'Islas Salomón', + 'TC' => 'Islas Turcas y Caicos', + 'VG' => 'Islas Vírgenes Británicas', + 'VI' => 'Islas Vírgenes de los Estados Unidos', + 'UM' => 'Islas menores alejadas de los Estados Unidos', + 'AX' => 'Islas Åland', + 'IL' => 'Israel', + 'IT' => 'Italia', + 'JM' => 'Jamaica', + 'JP' => 'Japón', + 'JE' => 'Jersey', + 'JO' => 'Jordania', + 'KZ' => 'Kazajistán', + 'KE' => 'Kenia', + 'KG' => 'Kirguistán', + 'KI' => 'Kiribati', + 'KW' => 'Kuwait', + 'LA' => 'Laos', + 'LS' => 'Lesoto', + 'LV' => 'Letonia', + 'LR' => 'Liberia', + 'LY' => 'Libia', + 'LI' => 'Liechtenstein', + 'LT' => 'Lituania', + 'LU' => 'Luxemburgo', + 'LB' => 'Líbano', + 'MK' => 'Macedonia', + 'MG' => 'Madagascar', + 'MY' => 'Malasia', + 'MW' => 'Malaui', + 'MV' => 'Maldivas', + 'ML' => 'Mali', + 'MT' => 'Malta', + 'MA' => 'Marruecos', + 'MQ' => 'Martinica', + 'MU' => 'Mauricio', + 'MR' => 'Mauritania', + 'YT' => 'Mayotte', + 'FM' => 'Micronesia', + 'MD' => 'Moldavia', + 'MN' => 'Mongolia', + 'ME' => 'Montenegro', + 'MS' => 'Montserrat', + 'MZ' => 'Mozambique', + 'MM' => 'Myanmar', + 'MX' => 'México', + 'MC' => 'Mónaco', + 'NA' => 'Namibia', + 'NR' => 'Nauru', + 'NP' => 'Nepal', + 'NI' => 'Nicaragua', + 'NG' => 'Nigeria', + 'NO' => 'Noruega', + 'NC' => 'Nueva Caledonia', + 'NZ' => 'Nueva Zelanda', + 'NE' => 'Níger', + 'OM' => 'Omán', + 'PK' => 'Pakistán', + 'PW' => 'Palau', + 'PS' => 'Palestina', + 'PA' => 'Panamá', + 'PG' => 'Papúa Nueva Guinea', + 'PY' => 'Paraguay', + 'NL' => 'Países Bajos', + 'PE' => 'Perú', + 'PN' => 'Pitcairn', + 'PF' => 'Polinesia Francesa', + 'PL' => 'Polonia', + 'PT' => 'Portugal', + 'PR' => 'Puerto Rico', + 'QA' => 'Qatar', + 'HK' => 'Región Administrativa Especial de Hong Kong de la República Popular China', + 'MO' => 'Región Administrativa Especial de Macao de la República Popular China', + 'ZZ' => 'Región desconocida o no válida', + 'GB' => 'Reino Unido', + 'CF' => 'República Centroafricana', + 'CZ' => 'República Checa', + 'CD' => 'República Democrática del Congo', + 'DO' => 'República Dominicana', + 'RE' => 'Reunión', + 'RW' => 'Ruanda', + 'RO' => 'Rumanía', + 'RU' => 'Rusia', + 'WS' => 'Samoa', + 'AS' => 'Samoa Americana', + 'BL' => 'San Bartolomé', + 'KN' => 'San Cristóbal y Nieves', + 'SM' => 'San Marino', + 'MF' => 'San Martín', + 'PM' => 'San Pedro y Miquelón', + 'VC' => 'San Vicente y las Granadinas', + 'SH' => 'Santa Elena', + 'LC' => 'Santa Lucía', + 'ST' => 'Santo Tomé y Príncipe', + 'SN' => 'Senegal', + 'RS' => 'Serbia', + 'CS' => 'Serbia y Montenegro', + 'SC' => 'Seychelles', + 'SL' => 'Sierra Leona', + 'SG' => 'Singapur', + 'SY' => 'Siria', + 'SO' => 'Somalia', + 'LK' => 'Sri Lanka', + 'SZ' => 'Suazilandia', + 'ZA' => 'Sudáfrica', + 'SD' => 'Sudán', + 'SE' => 'Suecia', + 'CH' => 'Suiza', + 'SR' => 'Surinam', + 'SJ' => 'Svalbard y Jan Mayen', + 'EH' => 'Sáhara Occidental', + 'TH' => 'Tailandia', + 'TW' => 'Taiwán', + 'TZ' => 'Tanzania', + 'TJ' => 'Tayikistán', + 'IO' => 'Territorio Británico del Océano Índico', + 'TF' => 'Territorios Australes Franceses', + 'TL' => 'Timor Oriental', + 'TG' => 'Togo', + 'TK' => 'Tokelau', + 'TO' => 'Tonga', + 'TT' => 'Trinidad y Tobago', + 'TM' => 'Turkmenistán', + 'TR' => 'Turquía', + 'TV' => 'Tuvalu', + 'TN' => 'Túnez', + 'UA' => 'Ucrania', + 'UG' => 'Uganda', + 'UY' => 'Uruguay', + 'UZ' => 'Uzbekistán', + 'VU' => 'Vanuatu', + 'VE' => 'Venezuela', + 'VN' => 'Vietnam', + 'WF' => 'Wallis y Futuna', + 'YE' => 'Yemen', + 'DJ' => 'Yibuti', + 'ZM' => 'Zambia', + 'ZW' => 'Zimbabue', +); diff --git a/application/helpers/country-list/fa/country.php b/application/helpers/country-list/fa/country.php new file mode 100644 index 0000000..5d0b5a7 --- /dev/null +++ b/application/helpers/country-list/fa/country.php @@ -0,0 +1,250 @@ + 'آروبا', + 'AR' => 'آرژانتین', + 'AL' => 'آلبانی', + 'DE' => 'آلمان', + 'AN' => 'آنتیل هلند', + 'AG' => 'آنتیگوا و باربودا', + 'AD' => 'آندورا', + 'AO' => 'آنگولا', + 'AI' => 'آنگیل', + 'AT' => 'اتریش', + 'ET' => 'اتیوپی', + 'JO' => 'اردن', + 'AM' => 'ارمنستان', + 'ER' => 'اریتره', + 'UZ' => 'ازبکستان', + 'AU' => 'استرالیا', + 'EE' => 'استونی', + 'IL' => 'اسرائیل', + 'SK' => 'اسلواکی', + 'SI' => 'اسلوونی', + 'SJ' => 'اسوالبارد و جان ماین', + 'ES' => 'اسپانیا', + 'ZA' => 'افریقای جنوبی', + 'AF' => 'افغانستان', + 'DZ' => 'الجزایر', + 'SV' => 'السالوادور', + 'AE' => 'امارات متحدهٔ عربی', + 'ID' => 'اندونزی', + 'UY' => 'اوروگوئه', + 'UA' => 'اوکراین', + 'UG' => 'اوگاندا', + 'EC' => 'اکوادر', + 'US' => 'ایالات متحدهٔ امریکا', + 'IT' => 'ایتالیا', + 'IR' => 'ایران', + 'IE' => 'ایرلند', + 'IS' => 'ایسلند', + 'BB' => 'باربادوس', + 'BS' => 'باهاما', + 'BH' => 'بحرین', + 'BR' => 'برزیل', + 'BM' => 'برمودا', + 'BN' => 'برونئی', + 'GB' => 'بریتانیا', + 'BG' => 'بلغارستان', + 'BE' => 'بلژیک', + 'BZ' => 'بلیز', + 'BD' => 'بنگلادش', + 'BJ' => 'بنین', + 'BT' => 'بوتان', + 'BW' => 'بوتسوانا', + 'BI' => 'بوروندی', + 'BF' => 'بورکینافاسو', + 'BA' => 'بوسنی و هرزگوین', + 'BO' => 'بولیوی', + 'BY' => 'بیلوروسی', + 'TJ' => 'تاجیکستان', + 'TZ' => 'تانزانیا', + 'TH' => 'تایلند', + 'TW' => 'تایوان', + 'TM' => 'ترکمنستان', + 'TR' => 'ترکیه', + 'TT' => 'ترینیداد و توباگو', + 'TN' => 'تونس', + 'TO' => 'تونگا', + 'TV' => 'تووالو', + 'TK' => 'توکلائو', + 'TG' => 'توگو', + 'TL' => 'تیمور شرقی', + 'JM' => 'جامائیکا', + 'GI' => 'جبل‌الطارق', + 'JE' => 'جرسی', + 'AX' => 'جزایر آلاند', + 'TC' => 'جزایر ترک و کایکوس', + 'SB' => 'جزایر سلیمان', + 'FO' => 'جزایر فارو', + 'FK' => 'جزایر فالکلند', + 'MH' => 'جزایر مارشال', + 'MP' => 'جزایر ماریانای شمالی', + 'VI' => 'جزایر ویرجین ایالات متحده', + 'VG' => 'جزایر ویرجین بریتانیا', + 'UM' => 'جزایر کوچک دورافتادهٔ ایالات متحده', + 'CK' => 'جزایر کوک', + 'CC' => 'جزایر کوکوس', + 'KY' => 'جزایر کِیمن', + 'BV' => 'جزیرهٔ بووت', + 'IM' => 'جزیرهٔ مان', + 'NF' => 'جزیرهٔ نورفولک', + 'HM' => 'جزیرهٔ هرد و جزایر مک‌دونالد', + 'CX' => 'جزیرهٔ کریسمس', + 'AZ' => 'جمهوری آذربایجان', + 'CF' => 'جمهوری افریقای مرکزی', + 'DO' => 'جمهوری دومینیکن', + 'CZ' => 'جمهوری چک', + 'AQ' => 'جنوبگان', + 'GS' => 'جورجیای جنوبی و جزایر ساندویچ جنوبی', + 'DJ' => 'جیبوتی', + 'DK' => 'دانمارک', + 'DM' => 'دومینیک', + 'RW' => 'رواندا', + 'RU' => 'روسیه', + 'RO' => 'رومانی', + 'RE' => 'ریونیون', + 'ZM' => 'زامبیا', + 'NZ' => 'زلاند نو', + 'ZW' => 'زیمبابوه', + 'ST' => 'سائو تومه و پرینسیپه', + 'CI' => 'ساحل عاج', + 'WS' => 'ساموا', + 'AS' => 'ساموای امریکا', + 'SM' => 'سان مارینو', + 'LK' => 'سری‌لانکا', + 'BL' => 'سنت بارتلیمی', + 'LC' => 'سنت لوسیا', + 'MF' => 'سنت مارتین', + 'SH' => 'سنت هلن', + 'VC' => 'سنت وینسنت و گرنادین', + 'PM' => 'سنت پیر و میکلون', + 'KN' => 'سنت کیتس و نویس', + 'SN' => 'سنگال', + 'SG' => 'سنگاپور', + 'SE' => 'سوئد', + 'CH' => 'سوئیس', + 'SZ' => 'سوازیلند', + 'SD' => 'سودان', + 'SR' => 'سورینام', + 'SY' => 'سوریه', + 'SO' => 'سومالی', + 'SL' => 'سیرالئون', + 'SC' => 'سیشل', + 'CL' => 'شیلی', + 'EH' => 'صحرای غربی', + 'RS' => 'صربستان', + 'CS' => 'صربستان و مونته‌نگرو', + 'IQ' => 'عراق', + 'SA' => 'عربستان سعودی', + 'OM' => 'عمان', + 'GH' => 'غنا', + 'FR' => 'فرانسه', + 'PS' => 'فلسطین', + 'FI' => 'فنلاند', + 'FJ' => 'فیجی', + 'PH' => 'فیلیپین', + 'CY' => 'قبرس', + 'KG' => 'قرقیزستان', + 'KZ' => 'قزاقستان', + 'QA' => 'قطر', + 'LA' => 'لائوس', + 'LB' => 'لبنان', + 'LV' => 'لتونی', + 'LS' => 'لسوتو', + 'PL' => 'لهستان', + 'LU' => 'لوکزامبورگ', + 'LR' => 'لیبریا', + 'LY' => 'لیبی', + 'LT' => 'لیتوانی', + 'LI' => 'لیختن‌اشتاین', + 'MG' => 'ماداگاسکار', + 'MQ' => 'مارتینیک', + 'MW' => 'مالاوی', + 'MT' => 'مالت', + 'MV' => 'مالدیو', + 'MY' => 'مالزی', + 'ML' => 'مالی', + 'MO' => 'ماکائو، ناحیهٔ ویژهٔ حکومتی چین', + 'YT' => 'مایوت', + 'HU' => 'مجارستان', + 'MA' => 'مراکش', + 'IO' => 'مستعمره‌های بریتانیا در اقیانوس هند', + 'TF' => 'مستعمره‌های جنوبی فرانسه', + 'EG' => 'مصر', + 'MN' => 'مغولستان', + 'MK' => 'مقدونیه', + 'MR' => 'موریتانی', + 'MU' => 'موریس', + 'MZ' => 'موزامبیک', + 'MD' => 'مولداوی', + 'MC' => 'موناکو', + 'ME' => 'مونته‌نگرو', + 'MS' => 'مونت‌سرات', + 'MX' => 'مکزیک', + 'MM' => 'میانمار', + 'FM' => 'میکرونزی', + 'NR' => 'نائورو', + 'ZZ' => 'ناحیهٔ نامشخص یا نامعتبر', + 'NA' => 'نامیبیا', + 'NO' => 'نروژ', + 'NP' => 'نپال', + 'NE' => 'نیجر', + 'NG' => 'نیجریه', + 'NU' => 'نیوئه', + 'NI' => 'نیکاراگوئه', + 'HT' => 'هاییتی', + 'NL' => 'هلند', + 'IN' => 'هند', + 'HN' => 'هندوراس', + 'HK' => 'هنگ‌کنگ، ناحیهٔ ویژهٔ حکومتی چین', + 'VA' => 'واتیکان', + 'WF' => 'والیس و فیوتونا', + 'VU' => 'وانواتو', + 'VE' => 'ونزوئلا', + 'VN' => 'ویتنام', + 'PY' => 'پاراگوئه', + 'PW' => 'پالائو', + 'PA' => 'پاناما', + 'PG' => 'پاپوا گینهٔ نو', + 'PK' => 'پاکستان', + 'PT' => 'پرتغال', + 'PE' => 'پرو', + 'PF' => 'پلی‌نزی فرانسه', + 'PR' => 'پورتو ریکو', + 'PN' => 'پیتکایرن', + 'TD' => 'چاد', + 'CN' => 'چین', + 'JP' => 'ژاپن', + 'CR' => 'کاستاریکا', + 'NC' => 'کالدونیای جدید', + 'KH' => 'کامبوج', + 'CM' => 'کامرون', + 'CA' => 'کانادا', + 'KR' => 'کرهٔ جنوبی', + 'KP' => 'کرهٔ شمالی', + 'HR' => 'کرواسی', + 'CO' => 'کلمبیا', + 'CG' => 'کنگو برازویل', + 'CD' => 'کنگو کینشاسا', + 'KE' => 'کنیا', + 'CU' => 'کوبا', + 'KM' => 'کومورو', + 'KW' => 'کویت', + 'KI' => 'کیریباتی', + 'CV' => 'کیپ ورد', + 'GA' => 'گابون', + 'GM' => 'گامبیا', + 'GD' => 'گرانادا', + 'GE' => 'گرجستان', + 'GG' => 'گرنزی', + 'GL' => 'گروئنلند', + 'GT' => 'گواتمالا', + 'GP' => 'گوادلوپ', + 'GU' => 'گوام', + 'GY' => 'گویان', + 'GF' => 'گویان فرانسه', + 'GN' => 'گینه', + 'GQ' => 'گینهٔ استوایی', + 'GW' => 'گینهٔ بیسائو', + 'YE' => 'یمن', + 'GR' => 'یونان', +); diff --git a/application/helpers/country-list/fi/country.php b/application/helpers/country-list/fi/country.php new file mode 100644 index 0000000..573cc2d --- /dev/null +++ b/application/helpers/country-list/fi/country.php @@ -0,0 +1,250 @@ + 'Afganistan', + 'AX' => 'Ahvenanmaa', + 'NL' => 'Alankomaat', + 'AN' => 'Alankomaiden Antillit', + 'AL' => 'Albania', + 'DZ' => 'Algeria', + 'AS' => 'Amerikan Samoa', + 'AD' => 'Andorra', + 'AO' => 'Angola', + 'AI' => 'Anguilla', + 'AQ' => 'Antarktis', + 'AG' => 'Antigua ja Barbuda', + 'AE' => 'Arabiemiirikunnat', + 'AR' => 'Argentiina', + 'AM' => 'Armenia', + 'AW' => 'Aruba', + 'AU' => 'Australia', + 'AZ' => 'Azerbaidžan', + 'BS' => 'Bahama', + 'BH' => 'Bahrain', + 'BD' => 'Bangladesh', + 'BB' => 'Barbados', + 'BE' => 'Belgia', + 'BZ' => 'Belize', + 'BJ' => 'Benin', + 'BM' => 'Bermuda', + 'BT' => 'Bhutan', + 'BO' => 'Bolivia', + 'BA' => 'Bosnia ja Hertsegovina', + 'BW' => 'Botswana', + 'BV' => 'Bouvet’nsaari', + 'BR' => 'Brasilia', + 'GB' => 'Britannia', + 'IO' => 'Brittiläinen Intian valtameren alue', + 'VG' => 'Brittiläiset Neitsytsaaret', + 'BN' => 'Brunei', + 'BG' => 'Bulgaria', + 'BF' => 'Burkina Faso', + 'BI' => 'Burundi', + 'KY' => 'Caymansaaret', + 'CL' => 'Chile', + 'CK' => 'Cookinsaaret', + 'CR' => 'Costa Rica', + 'DJ' => 'Djibouti', + 'DM' => 'Dominica', + 'DO' => 'Dominikaaninen tasavalta', + 'EC' => 'Ecuador', + 'EG' => 'Egypti', + 'SV' => 'El Salvador', + 'ER' => 'Eritrea', + 'ES' => 'Espanja', + 'ZA' => 'Etelä-Afrikka', + 'GS' => 'Etelä-Georgia ja Eteläiset Sandwichsaaret', + 'KR' => 'Etelä-Korea', + 'ET' => 'Etiopia', + 'FK' => 'Falklandinsaaret', + 'FJ' => 'Fidži', + 'PH' => 'Filippiinit', + 'FO' => 'Färsaaret', + 'GA' => 'Gabon', + 'GM' => 'Gambia', + 'GE' => 'Georgia', + 'GH' => 'Ghana', + 'GI' => 'Gibraltar', + 'GD' => 'Grenada', + 'GL' => 'Grönlanti', + 'GP' => 'Guadeloupe', + 'GU' => 'Guam', + 'GT' => 'Guatemala', + 'GG' => 'Guernsey', + 'GN' => 'Guinea', + 'GW' => 'Guinea-Bissau', + 'GY' => 'Guyana', + 'HT' => 'Haiti', + 'HM' => 'Heard- ja McDonaldinsaaret', + 'HN' => 'Honduras', + 'HK' => 'Hongkong – Kiinan erityishallintoalue', + 'SJ' => 'Huippuvuoret ja Jan Mayen', + 'ID' => 'Indonesia', + 'IN' => 'Intia', + 'IQ' => 'Irak', + 'IR' => 'Iran', + 'IE' => 'Irlanti', + 'IS' => 'Islanti', + 'IL' => 'Israel', + 'IT' => 'Italia', + 'TL' => 'Itä-Timor', + 'AT' => 'Itävalta', + 'JM' => 'Jamaika', + 'JP' => 'Japani', + 'YE' => 'Jemen', + 'JE' => 'Jersey', + 'JO' => 'Jordania', + 'CX' => 'Joulusaari', + 'KH' => 'Kambodža', + 'CM' => 'Kamerun', + 'CA' => 'Kanada', + 'CV' => 'Kap Verde', + 'KZ' => 'Kazakstan', + 'KE' => 'Kenia', + 'CF' => 'Keski-Afrikan tasavalta', + 'CN' => 'Kiina', + 'KG' => 'Kirgisia', + 'KI' => 'Kiribati', + 'CO' => 'Kolumbia', + 'KM' => 'Komorit', + 'CG' => 'Kongo-Brazzaville', + 'CD' => 'Kongo-Kinshasa', + 'CC' => 'Kookossaaret', + 'GR' => 'Kreikka', + 'HR' => 'Kroatia', + 'CU' => 'Kuuba', + 'KW' => 'Kuwait', + 'CY' => 'Kypros', + 'LA' => 'Laos', + 'LV' => 'Latvia', + 'LS' => 'Lesotho', + 'LB' => 'Libanon', + 'LR' => 'Liberia', + 'LY' => 'Libya', + 'LI' => 'Liechtenstein', + 'LT' => 'Liettua', + 'LU' => 'Luxemburg', + 'EH' => 'Länsi-Sahara', + 'MO' => 'Macao – Kiinan erityishallintoalue', + 'MG' => 'Madagaskar', + 'MK' => 'Makedonia', + 'MW' => 'Malawi', + 'MV' => 'Malediivit', + 'MY' => 'Malesia', + 'ML' => 'Mali', + 'MT' => 'Malta', + 'IM' => 'Mansaari', + 'MA' => 'Marokko', + 'MH' => 'Marshallinsaaret', + 'MQ' => 'Martinique', + 'MR' => 'Mauritania', + 'MU' => 'Mauritius', + 'YT' => 'Mayotte', + 'MX' => 'Meksiko', + 'FM' => 'Mikronesian liittovaltio', + 'MD' => 'Moldova', + 'MC' => 'Monaco', + 'MN' => 'Mongolia', + 'ME' => 'Montenegro', + 'MS' => 'Montserrat', + 'MZ' => 'Mosambik', + 'MM' => 'Myanmar', + 'NA' => 'Namibia', + 'NR' => 'Nauru', + 'NP' => 'Nepal', + 'NI' => 'Nicaragua', + 'NE' => 'Niger', + 'NG' => 'Nigeria', + 'NU' => 'Niue', + 'NF' => 'Norfolkinsaari', + 'NO' => 'Norja', + 'CI' => 'Norsunluurannikko', + 'OM' => 'Oman', + 'PK' => 'Pakistan', + 'PW' => 'Palau', + 'PS' => 'Palestiina', + 'PA' => 'Panama', + 'PG' => 'Papua-Uusi-Guinea', + 'PY' => 'Paraguay', + 'PE' => 'Peru', + 'PN' => 'Pitcairn', + 'KP' => 'Pohjois-Korea', + 'MP' => 'Pohjois-Mariaanit', + 'PT' => 'Portugali', + 'PR' => 'Puerto Rico', + 'PL' => 'Puola', + 'GQ' => 'Päiväntasaajan Guinea', + 'QA' => 'Qatar', + 'FR' => 'Ranska', + 'GF' => 'Ranskan Guayana', + 'PF' => 'Ranskan Polynesia', + 'TF' => 'Ranskan ulkopuoliset eteläiset alueet', + 'RO' => 'Romania', + 'RW' => 'Ruanda', + 'SE' => 'Ruotsi', + 'RE' => 'Réunion', + 'SH' => 'Saint Helena', + 'KN' => 'Saint Kitts ja Nevis', + 'LC' => 'Saint Lucia', + 'VC' => 'Saint Vincent ja Grenadiinit', + 'BL' => 'Saint-Barthélemy', + 'MF' => 'Saint-Martin', + 'PM' => 'Saint-Pierre ja Miquelon', + 'DE' => 'Saksa', + 'SB' => 'Salomonsaaret', + 'ZM' => 'Sambia', + 'WS' => 'Samoa', + 'SM' => 'San Marino', + 'SA' => 'Saudi-Arabia', + 'SN' => 'Senegal', + 'RS' => 'Serbia', + 'CS' => 'Serbia ja Montenegro', + 'SC' => 'Seychellit', + 'SL' => 'Sierra Leone', + 'SG' => 'Singapore', + 'SK' => 'Slovakia', + 'SI' => 'Slovenia', + 'SO' => 'Somalia', + 'LK' => 'Sri Lanka', + 'SD' => 'Sudan', + 'FI' => 'Suomi', + 'SR' => 'Surinam', + 'CH' => 'Sveitsi', + 'SZ' => 'Swazimaa', + 'SY' => 'Syyria', + 'ST' => 'São Tomé ja Príncipe', + 'TJ' => 'Tadžikistan', + 'TW' => 'Taiwan', + 'TZ' => 'Tansania', + 'DK' => 'Tanska', + 'TH' => 'Thaimaa', + 'TG' => 'Togo', + 'TK' => 'Tokelau', + 'TO' => 'Tonga', + 'TT' => 'Trinidad ja Tobago', + 'TN' => 'Tunisia', + 'TR' => 'Turkki', + 'TM' => 'Turkmenistan', + 'TC' => 'Turks- ja Caicossaaret', + 'TV' => 'Tuvalu', + 'TD' => 'Tšad', + 'CZ' => 'Tšekki', + 'UG' => 'Uganda', + 'UA' => 'Ukraina', + 'HU' => 'Unkari', + 'UY' => 'Uruguay', + 'NC' => 'Uusi-Kaledonia', + 'NZ' => 'Uusi-Seelanti', + 'UZ' => 'Uzbekistan', + 'BY' => 'Valko-Venäjä', + 'VU' => 'Vanuatu', + 'VA' => 'Vatikaani', + 'VE' => 'Venezuela', + 'RU' => 'Venäjä', + 'VN' => 'Vietnam', + 'EE' => 'Viro', + 'WF' => 'Wallis ja Futuna', + 'US' => 'Yhdysvallat', + 'VI' => 'Yhdysvaltain Neitsytsaaret', + 'UM' => 'Yhdysvaltain pienet erillissaaret', + 'ZW' => 'Zimbabwe', + 'ZZ' => 'tuntematon tai virheellinen alue', +); diff --git a/application/helpers/country-list/fr/country.php b/application/helpers/country-list/fr/country.php new file mode 100644 index 0000000..39903ad --- /dev/null +++ b/application/helpers/country-list/fr/country.php @@ -0,0 +1,250 @@ + 'Afghanistan', + 'ZA' => 'Afrique du Sud', + 'AL' => 'Albanie', + 'DZ' => 'Algérie', + 'DE' => 'Allemagne', + 'AD' => 'Andorre', + 'AO' => 'Angola', + 'AI' => 'Anguilla', + 'AQ' => 'Antarctique', + 'AG' => 'Antigua-et-Barbuda', + 'AN' => 'Antilles néerlandaises', + 'SA' => 'Arabie saoudite', + 'AR' => 'Argentine', + 'AM' => 'Arménie', + 'AW' => 'Aruba', + 'AU' => 'Australie', + 'AT' => 'Autriche', + 'AZ' => 'Azerbaïdjan', + 'BS' => 'Bahamas', + 'BH' => 'Bahreïn', + 'BD' => 'Bangladesh', + 'BB' => 'Barbade', + 'BE' => 'Belgique', + 'BZ' => 'Belize', + 'BM' => 'Bermudes', + 'BT' => 'Bhoutan', + 'BO' => 'Bolivie', + 'BA' => 'Bosnie-Herzégovine', + 'BW' => 'Botswana', + 'BN' => 'Brunéi Darussalam', + 'BR' => 'Brésil', + 'BG' => 'Bulgarie', + 'BF' => 'Burkina Faso', + 'BI' => 'Burundi', + 'BY' => 'Bélarus', + 'BJ' => 'Bénin', + 'KH' => 'Cambodge', + 'CM' => 'Cameroun', + 'CA' => 'Canada', + 'CV' => 'Cap-Vert', + 'CL' => 'Chili', + 'CN' => 'Chine', + 'CY' => 'Chypre', + 'CO' => 'Colombie', + 'KM' => 'Comores', + 'CG' => 'Congo', + 'KP' => 'Corée du Nord', + 'KR' => 'Corée du Sud', + 'CR' => 'Costa Rica', + 'HR' => 'Croatie', + 'CU' => 'Cuba', + 'CI' => 'Côte d’Ivoire', + 'DK' => 'Danemark', + 'DJ' => 'Djibouti', + 'DM' => 'Dominique', + 'SV' => 'El Salvador', + 'ES' => 'Espagne', + 'EE' => 'Estonie', + 'FJ' => 'Fidji', + 'FI' => 'Finlande', + 'FR' => 'France', + 'GA' => 'Gabon', + 'GM' => 'Gambie', + 'GH' => 'Ghana', + 'GI' => 'Gibraltar', + 'GD' => 'Grenade', + 'GL' => 'Groenland', + 'GR' => 'Grèce', + 'GP' => 'Guadeloupe', + 'GU' => 'Guam', + 'GT' => 'Guatemala', + 'GG' => 'Guernesey', + 'GN' => 'Guinée', + 'GQ' => 'Guinée équatoriale', + 'GW' => 'Guinée-Bissau', + 'GY' => 'Guyana', + 'GF' => 'Guyane française', + 'GE' => 'Géorgie', + 'GS' => 'Géorgie du Sud et les îles Sandwich du Sud', + 'HT' => 'Haïti', + 'HN' => 'Honduras', + 'HU' => 'Hongrie', + 'IN' => 'Inde', + 'ID' => 'Indonésie', + 'IQ' => 'Irak', + 'IR' => 'Iran', + 'IE' => 'Irlande', + 'IS' => 'Islande', + 'IL' => 'Israël', + 'IT' => 'Italie', + 'JM' => 'Jamaïque', + 'JP' => 'Japon', + 'JE' => 'Jersey', + 'JO' => 'Jordanie', + 'KZ' => 'Kazakhstan', + 'KE' => 'Kenya', + 'KG' => 'Kirghizistan', + 'KI' => 'Kiribati', + 'KW' => 'Koweït', + 'LA' => 'Laos', + 'LS' => 'Lesotho', + 'LV' => 'Lettonie', + 'LB' => 'Liban', + 'LY' => 'Libye', + 'LR' => 'Libéria', + 'LI' => 'Liechtenstein', + 'LT' => 'Lituanie', + 'LU' => 'Luxembourg', + 'MK' => 'Macédoine', + 'MG' => 'Madagascar', + 'MY' => 'Malaisie', + 'MW' => 'Malawi', + 'MV' => 'Maldives', + 'ML' => 'Mali', + 'MT' => 'Malte', + 'MA' => 'Maroc', + 'MQ' => 'Martinique', + 'MU' => 'Maurice', + 'MR' => 'Mauritanie', + 'YT' => 'Mayotte', + 'MX' => 'Mexique', + 'MD' => 'Moldavie', + 'MC' => 'Monaco', + 'MN' => 'Mongolie', + 'MS' => 'Montserrat', + 'ME' => 'Monténégro', + 'MZ' => 'Mozambique', + 'MM' => 'Myanmar', + 'NA' => 'Namibie', + 'NR' => 'Nauru', + 'NI' => 'Nicaragua', + 'NE' => 'Niger', + 'NG' => 'Nigéria', + 'NU' => 'Niue', + 'NO' => 'Norvège', + 'NC' => 'Nouvelle-Calédonie', + 'NZ' => 'Nouvelle-Zélande', + 'NP' => 'Népal', + 'OM' => 'Oman', + 'UG' => 'Ouganda', + 'UZ' => 'Ouzbékistan', + 'PK' => 'Pakistan', + 'PW' => 'Palaos', + 'PA' => 'Panama', + 'PG' => 'Papouasie-Nouvelle-Guinée', + 'PY' => 'Paraguay', + 'NL' => 'Pays-Bas', + 'PH' => 'Philippines', + 'PN' => 'Pitcairn', + 'PL' => 'Pologne', + 'PF' => 'Polynésie française', + 'PR' => 'Porto Rico', + 'PT' => 'Portugal', + 'PE' => 'Pérou', + 'QA' => 'Qatar', + 'HK' => 'R.A.S. chinoise de Hong Kong', + 'MO' => 'R.A.S. chinoise de Macao', + 'RO' => 'Roumanie', + 'GB' => 'Royaume-Uni', + 'RU' => 'Russie', + 'RW' => 'Rwanda', + 'CF' => 'République centrafricaine', + 'DO' => 'République dominicaine', + 'CD' => 'République démocratique du Congo', + 'CZ' => 'République tchèque', + 'RE' => 'Réunion', + 'EH' => 'Sahara occidental', + 'BL' => 'Saint-Barthélémy', + 'KN' => 'Saint-Kitts-et-Nevis', + 'SM' => 'Saint-Marin', + 'MF' => 'Saint-Martin', + 'PM' => 'Saint-Pierre-et-Miquelon', + 'VC' => 'Saint-Vincent-et-les Grenadines', + 'SH' => 'Sainte-Hélène', + 'LC' => 'Sainte-Lucie', + 'WS' => 'Samoa', + 'AS' => 'Samoa américaines', + 'ST' => 'Sao Tomé-et-Principe', + 'RS' => 'Serbie', + 'CS' => 'Serbie-et-Monténégro', + 'SC' => 'Seychelles', + 'SL' => 'Sierra Leone', + 'SG' => 'Singapour', + 'SK' => 'Slovaquie', + 'SI' => 'Slovénie', + 'SO' => 'Somalie', + 'SD' => 'Soudan', + 'LK' => 'Sri Lanka', + 'CH' => 'Suisse', + 'SR' => 'Suriname', + 'SE' => 'Suède', + 'SJ' => 'Svalbard et Île Jan Mayen', + 'SZ' => 'Swaziland', + 'SY' => 'Syrie', + 'SN' => 'Sénégal', + 'TJ' => 'Tadjikistan', + 'TZ' => 'Tanzanie', + 'TW' => 'Taïwan', + 'TD' => 'Tchad', + 'TF' => 'Terres australes françaises', + 'IO' => 'Territoire britannique de l\'océan Indien', + 'PS' => 'Territoire palestinien', + 'TH' => 'Thaïlande', + 'TL' => 'Timor oriental', + 'TG' => 'Togo', + 'TK' => 'Tokelau', + 'TO' => 'Tonga', + 'TT' => 'Trinité-et-Tobago', + 'TN' => 'Tunisie', + 'TM' => 'Turkménistan', + 'TR' => 'Turquie', + 'TV' => 'Tuvalu', + 'UA' => 'Ukraine', + 'UY' => 'Uruguay', + 'VU' => 'Vanuatu', + 'VE' => 'Venezuela', + 'VN' => 'Viêt Nam', + 'WF' => 'Wallis-et-Futuna', + 'YE' => 'Yémen', + 'ZM' => 'Zambie', + 'ZW' => 'Zimbabwe', + 'ZZ' => 'région indéterminée', + 'EG' => 'Égypte', + 'AE' => 'Émirats arabes unis', + 'EC' => 'Équateur', + 'ER' => 'Érythrée', + 'VA' => 'État de la Cité du Vatican', + 'FM' => 'États fédérés de Micronésie', + 'US' => 'États-Unis', + 'ET' => 'Éthiopie', + 'BV' => 'Île Bouvet', + 'CX' => 'Île Christmas', + 'NF' => 'Île Norfolk', + 'IM' => 'Île de Man', + 'KY' => 'Îles Caïmans', + 'CC' => 'Îles Cocos - Keeling', + 'CK' => 'Îles Cook', + 'FO' => 'Îles Féroé', + 'HM' => 'Îles Heard et MacDonald', + 'FK' => 'Îles Malouines', + 'MP' => 'Îles Mariannes du Nord', + 'MH' => 'Îles Marshall', + 'UM' => 'Îles Mineures Éloignées des États-Unis', + 'SB' => 'Îles Salomon', + 'TC' => 'Îles Turks et Caïques', + 'VG' => 'Îles Vierges britanniques', + 'VI' => 'Îles Vierges des États-Unis', + 'AX' => 'Îles Åland', +); diff --git a/application/helpers/country-list/fr_CA/country.php b/application/helpers/country-list/fr_CA/country.php new file mode 100644 index 0000000..39903ad --- /dev/null +++ b/application/helpers/country-list/fr_CA/country.php @@ -0,0 +1,250 @@ + 'Afghanistan', + 'ZA' => 'Afrique du Sud', + 'AL' => 'Albanie', + 'DZ' => 'Algérie', + 'DE' => 'Allemagne', + 'AD' => 'Andorre', + 'AO' => 'Angola', + 'AI' => 'Anguilla', + 'AQ' => 'Antarctique', + 'AG' => 'Antigua-et-Barbuda', + 'AN' => 'Antilles néerlandaises', + 'SA' => 'Arabie saoudite', + 'AR' => 'Argentine', + 'AM' => 'Arménie', + 'AW' => 'Aruba', + 'AU' => 'Australie', + 'AT' => 'Autriche', + 'AZ' => 'Azerbaïdjan', + 'BS' => 'Bahamas', + 'BH' => 'Bahreïn', + 'BD' => 'Bangladesh', + 'BB' => 'Barbade', + 'BE' => 'Belgique', + 'BZ' => 'Belize', + 'BM' => 'Bermudes', + 'BT' => 'Bhoutan', + 'BO' => 'Bolivie', + 'BA' => 'Bosnie-Herzégovine', + 'BW' => 'Botswana', + 'BN' => 'Brunéi Darussalam', + 'BR' => 'Brésil', + 'BG' => 'Bulgarie', + 'BF' => 'Burkina Faso', + 'BI' => 'Burundi', + 'BY' => 'Bélarus', + 'BJ' => 'Bénin', + 'KH' => 'Cambodge', + 'CM' => 'Cameroun', + 'CA' => 'Canada', + 'CV' => 'Cap-Vert', + 'CL' => 'Chili', + 'CN' => 'Chine', + 'CY' => 'Chypre', + 'CO' => 'Colombie', + 'KM' => 'Comores', + 'CG' => 'Congo', + 'KP' => 'Corée du Nord', + 'KR' => 'Corée du Sud', + 'CR' => 'Costa Rica', + 'HR' => 'Croatie', + 'CU' => 'Cuba', + 'CI' => 'Côte d’Ivoire', + 'DK' => 'Danemark', + 'DJ' => 'Djibouti', + 'DM' => 'Dominique', + 'SV' => 'El Salvador', + 'ES' => 'Espagne', + 'EE' => 'Estonie', + 'FJ' => 'Fidji', + 'FI' => 'Finlande', + 'FR' => 'France', + 'GA' => 'Gabon', + 'GM' => 'Gambie', + 'GH' => 'Ghana', + 'GI' => 'Gibraltar', + 'GD' => 'Grenade', + 'GL' => 'Groenland', + 'GR' => 'Grèce', + 'GP' => 'Guadeloupe', + 'GU' => 'Guam', + 'GT' => 'Guatemala', + 'GG' => 'Guernesey', + 'GN' => 'Guinée', + 'GQ' => 'Guinée équatoriale', + 'GW' => 'Guinée-Bissau', + 'GY' => 'Guyana', + 'GF' => 'Guyane française', + 'GE' => 'Géorgie', + 'GS' => 'Géorgie du Sud et les îles Sandwich du Sud', + 'HT' => 'Haïti', + 'HN' => 'Honduras', + 'HU' => 'Hongrie', + 'IN' => 'Inde', + 'ID' => 'Indonésie', + 'IQ' => 'Irak', + 'IR' => 'Iran', + 'IE' => 'Irlande', + 'IS' => 'Islande', + 'IL' => 'Israël', + 'IT' => 'Italie', + 'JM' => 'Jamaïque', + 'JP' => 'Japon', + 'JE' => 'Jersey', + 'JO' => 'Jordanie', + 'KZ' => 'Kazakhstan', + 'KE' => 'Kenya', + 'KG' => 'Kirghizistan', + 'KI' => 'Kiribati', + 'KW' => 'Koweït', + 'LA' => 'Laos', + 'LS' => 'Lesotho', + 'LV' => 'Lettonie', + 'LB' => 'Liban', + 'LY' => 'Libye', + 'LR' => 'Libéria', + 'LI' => 'Liechtenstein', + 'LT' => 'Lituanie', + 'LU' => 'Luxembourg', + 'MK' => 'Macédoine', + 'MG' => 'Madagascar', + 'MY' => 'Malaisie', + 'MW' => 'Malawi', + 'MV' => 'Maldives', + 'ML' => 'Mali', + 'MT' => 'Malte', + 'MA' => 'Maroc', + 'MQ' => 'Martinique', + 'MU' => 'Maurice', + 'MR' => 'Mauritanie', + 'YT' => 'Mayotte', + 'MX' => 'Mexique', + 'MD' => 'Moldavie', + 'MC' => 'Monaco', + 'MN' => 'Mongolie', + 'MS' => 'Montserrat', + 'ME' => 'Monténégro', + 'MZ' => 'Mozambique', + 'MM' => 'Myanmar', + 'NA' => 'Namibie', + 'NR' => 'Nauru', + 'NI' => 'Nicaragua', + 'NE' => 'Niger', + 'NG' => 'Nigéria', + 'NU' => 'Niue', + 'NO' => 'Norvège', + 'NC' => 'Nouvelle-Calédonie', + 'NZ' => 'Nouvelle-Zélande', + 'NP' => 'Népal', + 'OM' => 'Oman', + 'UG' => 'Ouganda', + 'UZ' => 'Ouzbékistan', + 'PK' => 'Pakistan', + 'PW' => 'Palaos', + 'PA' => 'Panama', + 'PG' => 'Papouasie-Nouvelle-Guinée', + 'PY' => 'Paraguay', + 'NL' => 'Pays-Bas', + 'PH' => 'Philippines', + 'PN' => 'Pitcairn', + 'PL' => 'Pologne', + 'PF' => 'Polynésie française', + 'PR' => 'Porto Rico', + 'PT' => 'Portugal', + 'PE' => 'Pérou', + 'QA' => 'Qatar', + 'HK' => 'R.A.S. chinoise de Hong Kong', + 'MO' => 'R.A.S. chinoise de Macao', + 'RO' => 'Roumanie', + 'GB' => 'Royaume-Uni', + 'RU' => 'Russie', + 'RW' => 'Rwanda', + 'CF' => 'République centrafricaine', + 'DO' => 'République dominicaine', + 'CD' => 'République démocratique du Congo', + 'CZ' => 'République tchèque', + 'RE' => 'Réunion', + 'EH' => 'Sahara occidental', + 'BL' => 'Saint-Barthélémy', + 'KN' => 'Saint-Kitts-et-Nevis', + 'SM' => 'Saint-Marin', + 'MF' => 'Saint-Martin', + 'PM' => 'Saint-Pierre-et-Miquelon', + 'VC' => 'Saint-Vincent-et-les Grenadines', + 'SH' => 'Sainte-Hélène', + 'LC' => 'Sainte-Lucie', + 'WS' => 'Samoa', + 'AS' => 'Samoa américaines', + 'ST' => 'Sao Tomé-et-Principe', + 'RS' => 'Serbie', + 'CS' => 'Serbie-et-Monténégro', + 'SC' => 'Seychelles', + 'SL' => 'Sierra Leone', + 'SG' => 'Singapour', + 'SK' => 'Slovaquie', + 'SI' => 'Slovénie', + 'SO' => 'Somalie', + 'SD' => 'Soudan', + 'LK' => 'Sri Lanka', + 'CH' => 'Suisse', + 'SR' => 'Suriname', + 'SE' => 'Suède', + 'SJ' => 'Svalbard et Île Jan Mayen', + 'SZ' => 'Swaziland', + 'SY' => 'Syrie', + 'SN' => 'Sénégal', + 'TJ' => 'Tadjikistan', + 'TZ' => 'Tanzanie', + 'TW' => 'Taïwan', + 'TD' => 'Tchad', + 'TF' => 'Terres australes françaises', + 'IO' => 'Territoire britannique de l\'océan Indien', + 'PS' => 'Territoire palestinien', + 'TH' => 'Thaïlande', + 'TL' => 'Timor oriental', + 'TG' => 'Togo', + 'TK' => 'Tokelau', + 'TO' => 'Tonga', + 'TT' => 'Trinité-et-Tobago', + 'TN' => 'Tunisie', + 'TM' => 'Turkménistan', + 'TR' => 'Turquie', + 'TV' => 'Tuvalu', + 'UA' => 'Ukraine', + 'UY' => 'Uruguay', + 'VU' => 'Vanuatu', + 'VE' => 'Venezuela', + 'VN' => 'Viêt Nam', + 'WF' => 'Wallis-et-Futuna', + 'YE' => 'Yémen', + 'ZM' => 'Zambie', + 'ZW' => 'Zimbabwe', + 'ZZ' => 'région indéterminée', + 'EG' => 'Égypte', + 'AE' => 'Émirats arabes unis', + 'EC' => 'Équateur', + 'ER' => 'Érythrée', + 'VA' => 'État de la Cité du Vatican', + 'FM' => 'États fédérés de Micronésie', + 'US' => 'États-Unis', + 'ET' => 'Éthiopie', + 'BV' => 'Île Bouvet', + 'CX' => 'Île Christmas', + 'NF' => 'Île Norfolk', + 'IM' => 'Île de Man', + 'KY' => 'Îles Caïmans', + 'CC' => 'Îles Cocos - Keeling', + 'CK' => 'Îles Cook', + 'FO' => 'Îles Féroé', + 'HM' => 'Îles Heard et MacDonald', + 'FK' => 'Îles Malouines', + 'MP' => 'Îles Mariannes du Nord', + 'MH' => 'Îles Marshall', + 'UM' => 'Îles Mineures Éloignées des États-Unis', + 'SB' => 'Îles Salomon', + 'TC' => 'Îles Turks et Caïques', + 'VG' => 'Îles Vierges britanniques', + 'VI' => 'Îles Vierges des États-Unis', + 'AX' => 'Îles Åland', +); diff --git a/application/helpers/country-list/he/country.php b/application/helpers/country-list/he/country.php new file mode 100644 index 0000000..e82aec3 --- /dev/null +++ b/application/helpers/country-list/he/country.php @@ -0,0 +1,250 @@ + 'אוגנדה', + 'UZ' => 'אוזבקיסטן', + 'AT' => 'אוסטריה', + 'AU' => 'אוסטרליה', + 'UA' => 'אוקראינה', + 'UY' => 'אורוגוואי', + 'ZZ' => 'אזור לא ידוע או לא תקין', + 'AZ' => 'אזרביג\'ן', + 'AE' => 'איחוד האמירויות הערביות', + 'IT' => 'איטליה', + 'AX' => 'איי אלנד', + 'BS' => 'איי בהאמה', + 'BV' => 'איי בובה', + 'VI' => 'איי הבתולה האמריקניים', + 'VG' => 'איי הבתולה הבריטיים', + 'HM' => 'איי הרד ואיי מקדונלנד', + 'WF' => 'איי ווליס ופוטונה', + 'TC' => 'איי טורקס וקאיקוס', + 'CX' => 'איי כריסטמס', + 'MP' => 'איי מריאנה הצפוניים', + 'MH' => 'איי מרשל', + 'NF' => 'איי נורפוק', + 'SC' => 'איי סיישל', + 'FO' => 'איי פארו', + 'FK' => 'איי פוקלנד', + 'CK' => 'איי קוק', + 'CC' => 'איי קוקוס', + 'KY' => 'איי קיימן', + 'SB' => 'איי שלמה', + 'UM' => 'איים קטנים שלחוף ארצות הברית', + 'ID' => 'אינדונזיה', + 'IS' => 'איסלנד', + 'IR' => 'איראן', + 'IE' => 'אירלנד', + 'SV' => 'אל סלבדור', + 'AL' => 'אלבניה', + 'DZ' => 'אלג׳יריה', + 'AO' => 'אנגולה', + 'AI' => 'אנגילה', + 'AD' => 'אנדורה', + 'AQ' => 'אנטארקטיקה', + 'AG' => 'אנטיגואה וברבודה', + 'AN' => 'אנטילים הולנדיים', + 'EE' => 'אסטוניה', + 'AF' => 'אפגניסטן', + 'EC' => 'אקוודור', + 'AR' => 'ארגנטינה', + 'AW' => 'ארובה', + 'ER' => 'אריתראה', + 'AM' => 'ארמניה', + 'US' => 'ארצות הברית', + 'ET' => 'אתיופיה', + 'BT' => 'בהוטן', + 'BW' => 'בוטסוואנה', + 'BG' => 'בולגריה', + 'BO' => 'בוליביה', + 'BA' => 'בוסניה והרצגובינה', + 'BI' => 'בורונדי', + 'BF' => 'בורקינה פאסו', + 'BH' => 'בחריין', + 'BY' => 'בלארוס', + 'BE' => 'בלגיה', + 'BZ' => 'בליז', + 'BD' => 'בנגלדש', + 'BJ' => 'בנין', + 'BB' => 'ברבדוס', + 'BN' => 'ברוניי', + 'BR' => 'ברזיל', + 'GB' => 'בריטניה', + 'BM' => 'ברמודה', + 'JE' => 'ג\'רסי', + 'GA' => 'גאבון', + 'GE' => 'גאורגיה', + 'GH' => 'גאנה', + 'GT' => 'גואטמלה', + 'GU' => 'גואם', + 'GP' => 'גוואדלופ', + 'GY' => 'גיאנה', + 'GF' => 'גיאנה הצרפתית', + 'GI' => 'גיברלטר', + 'GN' => 'גיניאה', + 'GQ' => 'גיניאה המשוונית', + 'GW' => 'גיניאה-ביסאו', + 'GM' => 'גמביה', + 'GL' => 'גרינלנד', + 'DE' => 'גרמניה', + 'GD' => 'גרנדה', + 'GG' => 'גרנסי', + 'GS' => 'ג׳ורג׳יה הדרומית ואיי סנדוויץ׳ הדרומיים', + 'DJ' => 'ג׳יבוטי', + 'JM' => 'ג׳מייקה', + 'DM' => 'דומיניקה', + 'DK' => 'דנמרק', + 'ZA' => 'דרום אפריקה', + 'KR' => 'דרום קוריאה', + 'IM' => 'האי מאן', + 'HT' => 'האיטי', + 'IN' => 'הודו', + 'VA' => 'הוותיקן', + 'NL' => 'הולנד', + 'HK' => 'הונג קונג (מחוז מנהלי מיוחד של סין)', + 'HU' => 'הונגריה', + 'HN' => 'הונדורס', + 'DO' => 'הרפובליקה הדומיניקנית', + 'CF' => 'הרפובליקה של מרכז אפריקה', + 'PS' => 'הרשות הפלסטינית', + 'VN' => 'וייטנאם', + 'VU' => 'ונואטו', + 'VE' => 'ונצואלה', + 'ZW' => 'זימבאבווה', + 'ZM' => 'זמביה', + 'CI' => 'חוף השנהב', + 'TJ' => 'טג׳יקיסטן', + 'TV' => 'טובלו', + 'TG' => 'טוגו', + 'TO' => 'טונגה', + 'TK' => 'טוקלאו', + 'TR' => 'טורקיה', + 'TM' => 'טורקמניסטן', + 'TW' => 'טייוואן', + 'TZ' => 'טנזניה', + 'IO' => 'טריטוריה בריטית באוקיאנוס ההודי', + 'TF' => 'טריטוריות דרומיות של צרפת', + 'TT' => 'טרינידד וטובגו', + 'GR' => 'יוון', + 'JP' => 'יפן', + 'JO' => 'ירדן', + 'IL' => 'ישראל', + 'KW' => 'כווית', + 'CV' => 'כף ורדה', + 'LA' => 'לאוס', + 'LB' => 'לבנון', + 'LY' => 'לוב', + 'LU' => 'לוקסמבורג', + 'LV' => 'לטביה', + 'LR' => 'ליבריה', + 'LT' => 'ליטא', + 'LI' => 'ליכטנשטיין', + 'LS' => 'לסוטו', + 'MR' => 'מאוריטניה', + 'MU' => 'מאוריציוס', + 'YT' => 'מאיוט', + 'ML' => 'מאלי', + 'MG' => 'מדגסקר', + 'MZ' => 'מוזמביק', + 'MD' => 'מולדובה', + 'MN' => 'מונגוליה', + 'ME' => 'מונטנגרו', + 'MS' => 'מונסראט', + 'MC' => 'מונקו', + 'TL' => 'מזרח טימור', + 'MM' => 'מייאנמאר', + 'FM' => 'מיקרונזיה', + 'MW' => 'מלאווי', + 'MV' => 'מלדיבים', + 'MY' => 'מלזיה', + 'MT' => 'מלטה', + 'EG' => 'מצרים', + 'MO' => 'מקאו (מחוז מנהלי מיוחד של סין)', + 'MK' => 'מקדוניה', + 'MX' => 'מקסיקו', + 'MA' => 'מרוקו', + 'MQ' => 'מרטיניק', + 'NR' => 'נאורו', + 'NO' => 'נורווגיה', + 'NG' => 'ניגריה', + 'NZ' => 'ניו זילנד', + 'NU' => 'ניווה', + 'NE' => 'ניז׳ר', + 'NI' => 'ניקרגואה', + 'NA' => 'נמיביה', + 'NP' => 'נפאל', + 'ST' => 'סאו טומה ופרינסיפה', + 'EH' => 'סהרה המערבית', + 'SD' => 'סודן', + 'SZ' => 'סווזילנד', + 'SJ' => 'סוולבארד וז׳אן מאיין', + 'SO' => 'סומליה', + 'SY' => 'סוריה', + 'SR' => 'סורינם', + 'SL' => 'סיירה לאונה', + 'CN' => 'סין', + 'SG' => 'סינגפור', + 'SI' => 'סלובניה', + 'SK' => 'סלובקיה', + 'WS' => 'סמואה', + 'AS' => 'סמואה האמריקנית', + 'SM' => 'סן מרינו', + 'SN' => 'סנגל', + 'BL' => 'סנט ברתולומיאו', + 'SH' => 'סנט הלנה', + 'VC' => 'סנט וינסנט והגרנדינים', + 'LC' => 'סנט לוסיה', + 'MF' => 'סנט מרטין', + 'PM' => 'סנט פייר ומיקלון', + 'KN' => 'סנט קיטס ונוויס', + 'ES' => 'ספרד', + 'RS' => 'סרביה', + 'CS' => 'סרביה ומונטנגרו', + 'LK' => 'סרי לנקה', + 'OM' => 'עומאן', + 'IQ' => 'עיראק', + 'SA' => 'ערב הסעודית', + 'PW' => 'פאלאו', + 'PL' => 'פולין', + 'PF' => 'פולינזיה הצרפתית', + 'PR' => 'פורטו ריקו', + 'PT' => 'פורטוגל', + 'FJ' => 'פיג׳י', + 'PN' => 'פיטקרן', + 'PH' => 'פיליפינים', + 'FI' => 'פינלנד', + 'PA' => 'פנמה', + 'PG' => 'פפואה גיניאה החדשה', + 'PK' => 'פקיסטן', + 'PY' => 'פרגוואי', + 'PE' => 'פרו', + 'KP' => 'צפון קוריאה', + 'FR' => 'צרפת', + 'TD' => 'צ׳אד', + 'CL' => 'צ׳ילה', + 'CZ' => 'צ׳כיה', + 'CU' => 'קובה', + 'CO' => 'קולומביה', + 'KM' => 'קומורוס', + 'CG' => 'קונגו - ברזאויל', + 'CD' => 'קונגו - קינשאסה', + 'CR' => 'קוסטה ריקה', + 'KZ' => 'קזחסטן', + 'QA' => 'קטאר', + 'KG' => 'קירגיזסטן', + 'KI' => 'קיריבאטי', + 'NC' => 'קלדוניה החדשה', + 'KH' => 'קמבודיה', + 'CM' => 'קמרון', + 'CA' => 'קנדה', + 'KE' => 'קניה', + 'CY' => 'קפריסין', + 'HR' => 'קרואטיה', + 'RE' => 'ראוניון', + 'RW' => 'רואנדה', + 'RO' => 'רומניה', + 'RU' => 'רוסיה', + 'SE' => 'שוודיה', + 'CH' => 'שווייץ', + 'TH' => 'תאילנד', + 'TN' => 'תוניסיה', + 'YE' => 'תימן', +); diff --git a/application/helpers/country-list/hr/country.php b/application/helpers/country-list/hr/country.php new file mode 100644 index 0000000..1aff1ce --- /dev/null +++ b/application/helpers/country-list/hr/country.php @@ -0,0 +1,250 @@ + 'Afganistan', + 'AX' => 'Alandski otoci', + 'AL' => 'Albanija', + 'DZ' => 'Alžir', + 'AS' => 'Američka Samoa', + 'VI' => 'Američki Djevičanski Otoci', + 'AD' => 'Andora', + 'AO' => 'Angola', + 'AI' => 'Anguila', + 'AQ' => 'Antarktik', + 'AG' => 'Antigua i Barbuda', + 'AR' => 'Argentina', + 'AM' => 'Armenija', + 'AW' => 'Aruba', + 'AU' => 'Australija', + 'AT' => 'Austrija', + 'AZ' => 'Azerbajdžan', + 'BS' => 'Bahami', + 'BH' => 'Bahrein', + 'BD' => 'Bangladeš', + 'BB' => 'Barbados', + 'BE' => 'Belgija', + 'BZ' => 'Belize', + 'BJ' => 'Benin', + 'BM' => 'Bermuda', + 'MK' => 'Bivša Jugoslavenska Republika Makedonija', + 'BY' => 'Bjelorusija', + 'BW' => 'Bocvana', + 'BO' => 'Bolivija', + 'BA' => 'Bosna i Hercegovina', + 'CX' => 'Božićni Otok', + 'BR' => 'Brazil', + 'VG' => 'Britanski Djevičanski Otoci', + 'IO' => 'Britanski Teritorij Indijskog Oceana', + 'BN' => 'Brunej', + 'BG' => 'Bugarska', + 'BF' => 'Burkina Faso', + 'BI' => 'Burundi', + 'BT' => 'Butan', + 'CY' => 'Cipar', + 'ME' => 'Crna Gora', + 'DK' => 'Danska', + 'CD' => 'Demokratska Republika Kongo', + 'DM' => 'Dominika', + 'DO' => 'Dominikanska Republika', + 'DJ' => 'Džibuti', + 'EG' => 'Egipat', + 'EC' => 'Ekvador', + 'GQ' => 'Ekvatorska Gvineja', + 'SV' => 'El Salvador', + 'ER' => 'Eritreja', + 'EE' => 'Estonija', + 'ET' => 'Etiopija', + 'FK' => 'Falklandski Otoci', + 'FO' => 'Farski Otoci', + 'FJ' => 'Fidži', + 'PH' => 'Filipini', + 'FI' => 'Finska', + 'FR' => 'Francuska', + 'GF' => 'Francuska Gvajana', + 'PF' => 'Francuska Polinezija', + 'TF' => 'Francuski Južni Teritoriji', + 'GA' => 'Gabon', + 'GM' => 'Gambija', + 'GH' => 'Gana', + 'GI' => 'Gibraltar', + 'VA' => 'Grad Vatikan', + 'GD' => 'Grenada', + 'GL' => 'Grenland', + 'GE' => 'Gruzija', + 'GR' => 'Grčka', + 'GP' => 'Guadeloupe', + 'GU' => 'Guam', + 'GG' => 'Guernsey', + 'GY' => 'Gvajana', + 'GT' => 'Gvatemala', + 'GN' => 'Gvineja', + 'GW' => 'Gvineja Bisau', + 'HT' => 'Haiti', + 'HN' => 'Honduras', + 'HK' => 'Hong Kong S.A.R. Kine', + 'HR' => 'Hrvatska', + 'IN' => 'Indija', + 'ID' => 'Indonezija', + 'IQ' => 'Irak', + 'IR' => 'Iran', + 'IE' => 'Irska', + 'IS' => 'Island', + 'TL' => 'Istočni Timor', + 'IT' => 'Italija', + 'IL' => 'Izrael', + 'JM' => 'Jamajka', + 'JP' => 'Japan', + 'YE' => 'Jemen', + 'JE' => 'Jersey', + 'JO' => 'Jordan', + 'GS' => 'Južna Gruzija i Južni Sendvič Otoci', + 'KR' => 'Južna Koreja', + 'ZA' => 'Južnoafrička Republika', + 'KY' => 'Kajmanski Otoci', + 'KH' => 'Kambodža', + 'CM' => 'Kamerun', + 'CA' => 'Kanada', + 'QA' => 'Katar', + 'KZ' => 'Kazakstan', + 'KE' => 'Kenija', + 'CN' => 'Kina', + 'KG' => 'Kirgistan', + 'KI' => 'Kiribati', + 'CC' => 'Kokosovi Otoci', + 'CO' => 'Kolumbija', + 'KM' => 'Komori', + 'CG' => 'Kongo', + 'KP' => 'Koreja, Sjeverna', + 'CR' => 'Kostarika', + 'CU' => 'Kuba', + 'CK' => 'Kukovi Otoci', + 'KW' => 'Kuvajt', + 'LA' => 'Laos', + 'LV' => 'Latvija', + 'LS' => 'Lesoto', + 'LB' => 'Libanon', + 'LR' => 'Liberija', + 'LY' => 'Libijska Arapska Džamahirija', + 'LI' => 'Lihtenštajn', + 'LT' => 'Litva', + 'LU' => 'Luksemburg', + 'MG' => 'Madagaskar', + 'YT' => 'Majote', + 'MO' => 'Makao S.A.R. Kine', + 'MW' => 'Malavi', + 'MV' => 'Maldivi', + 'MY' => 'Malezija', + 'ML' => 'Mali', + 'MT' => 'Malta', + 'MA' => 'Maroko', + 'MQ' => 'Martinik', + 'MH' => 'Maršalovi Otoci', + 'MU' => 'Mauricijus', + 'MR' => 'Mauritanija', + 'HU' => 'Mađarska', + 'MX' => 'Meksiko', + 'MM' => 'Mijanma', + 'FM' => 'Mikronezija', + 'MD' => 'Moldavija', + 'MC' => 'Monako', + 'MN' => 'Mongolija', + 'MS' => 'Montserat', + 'MZ' => 'Mozambik', + 'NA' => 'Namibija', + 'NR' => 'Nauru', + 'NP' => 'Nepal', + 'NE' => 'Niger', + 'NG' => 'Nigerija', + 'NI' => 'Nikaragva', + 'NU' => 'Niue', + 'NL' => 'Nizozemska', + 'AN' => 'Nizozemski Antili', + 'DE' => 'Njemačka', + 'NO' => 'Norveška', + 'NC' => 'Nova Kaledonija', + 'NZ' => 'Novi Zeland', + 'CI' => 'Obala Bjelokosti', + 'OM' => 'Oman', + 'BV' => 'Otok Bouvet', + 'HM' => 'Otok Heard i Otoci McDonald', + 'IM' => 'Otok Man', + 'NF' => 'Otok Norfolk', + 'PK' => 'Pakistan', + 'PW' => 'Palau', + 'PS' => 'Palestinsko Područje', + 'PA' => 'Panama', + 'PG' => 'Papua Nova Gvineja', + 'PY' => 'Paragvaj', + 'PE' => 'Peru', + 'PN' => 'Pitcairn', + 'PL' => 'Poljska', + 'PR' => 'Portoriko', + 'PT' => 'Portugal', + 'RE' => 'Reunion', + 'RW' => 'Ruanda', + 'RO' => 'Rumunjska', + 'RU' => 'Rusija', + 'WS' => 'Samoa', + 'SM' => 'San Marino', + 'SA' => 'Saudijska Arabija', + 'SC' => 'Sejšeli', + 'SN' => 'Senegal', + 'SL' => 'Sijera Leone', + 'SG' => 'Singapur', + 'SY' => 'Sirija', + 'US' => 'Sjedinjene Države', + 'MP' => 'Sjeverni Marijanski Otoci', + 'SK' => 'Slovačka', + 'SI' => 'Slovenija', + 'SB' => 'Solomonski Otoci', + 'SO' => 'Somalija', + 'RS' => 'Srbija', + 'CS' => 'Srbija i Crna Gora', + 'CF' => 'Srednjoafrička Republika', + 'SD' => 'Sudan', + 'SR' => 'Surinam', + 'SJ' => 'Svalbard i Jan Mayen', + 'SZ' => 'Svazi', + 'SH' => 'Sveta Helena', + 'LC' => 'Sveta Lucija', + 'BL' => 'Sveti Bartolomej', + 'KN' => 'Sveti Kristofor i Nevis', + 'MF' => 'Sveti Martin', + 'PM' => 'Sveti Petar i Miguel', + 'ST' => 'Sveti Toma i Prinsipe', + 'VC' => 'Sveti Vincent i Grenadini', + 'TJ' => 'Tadžikistan', + 'TH' => 'Tajland', + 'TW' => 'Tajvan', + 'TZ' => 'Tanzanija', + 'TG' => 'Togo', + 'TK' => 'Tokelau', + 'TO' => 'Tonga', + 'TT' => 'Trinidad i Tobago', + 'TN' => 'Tunis', + 'TM' => 'Turkmenistan', + 'TC' => 'Turkski i Kaikos Otoci', + 'TR' => 'Turska', + 'TV' => 'Tuvalu', + 'UG' => 'Uganda', + 'UM' => 'Ujedinjene Države Manjih Pacifičkih Otoka', + 'AE' => 'Ujedinjeni Arapski Emirati', + 'UA' => 'Ukrajina', + 'UY' => 'Urugvaj', + 'UZ' => 'Uzbekistan', + 'VU' => 'Vanuatu', + 'GB' => 'Velika Britanija', + 'VE' => 'Venezuela', + 'VN' => 'Vijetnam', + 'WF' => 'Wallis i Futuna', + 'ZM' => 'Zambija', + 'EH' => 'Zapadna Sahara', + 'CV' => 'Zeleni Rt', + 'ZW' => 'Zimbabve', + 'ZZ' => 'nepoznata ili nevažeća oblast', + 'TD' => 'Čad', + 'CZ' => 'Češka Republika', + 'CL' => 'Čile', + 'ES' => 'Španjolska', + 'LK' => 'Šri Lanka', + 'SE' => 'Švedska', + 'CH' => 'Švicarska', +); diff --git a/application/helpers/country-list/id/country.php b/application/helpers/country-list/id/country.php new file mode 100644 index 0000000..766d715 --- /dev/null +++ b/application/helpers/country-list/id/country.php @@ -0,0 +1,247 @@ + 'Afghanistan', + 'ZA' => 'Afrika Selatan', + 'AL' => 'Albania', + 'DZ' => 'Algeria', + 'US' => 'Amerika Serikat', + 'AD' => 'Andora', + 'AO' => 'Angola', + 'AI' => 'Anguilla', + 'AQ' => 'Antarktika', + 'AG' => 'Antigua dan Barbuda', + 'AN' => 'Antilles Belanda', + 'SA' => 'Arab Saudi', + 'AR' => 'Argentina', + 'AM' => 'Armenia', + 'AW' => 'Aruba', + 'AU' => 'Australia', + 'AT' => 'Austria', + 'AZ' => 'Azerbaijan', + 'BS' => 'Bahamas', + 'BH' => 'Bahrain', + 'BD' => 'Bangladesh', + 'BB' => 'Barbados', + 'BY' => 'Belarusia', + 'BE' => 'Belgia', + 'BZ' => 'Belize', + 'BJ' => 'Benin', + 'BM' => 'Bermuda', + 'BT' => 'Bhutan', + 'BO' => 'Bolivia', + 'BA' => 'Bosnia dan Herzegovina', + 'BW' => 'Botswana', + 'BR' => 'Brazil', + 'IO' => 'British Indian Ocean Territory', + 'BN' => 'Brunei', + 'BG' => 'Bulgaria', + 'BF' => 'Burkina Faso', + 'BI' => 'Burundi', + 'TD' => 'Chad', + 'CL' => 'Chili', + 'CN' => 'Cina', + 'DK' => 'Denmark', + 'DM' => 'Dominika', + 'EC' => 'Ekuador', + 'SV' => 'El Salvador', + 'ER' => 'Eritrea', + 'EE' => 'Estonia', + 'ET' => 'Ethiopia', + 'FJ' => 'Fiji', + 'PH' => 'Filipina', + 'FI' => 'Finlandia', + 'GA' => 'Gabon', + 'GM' => 'Gambia', + 'GE' => 'Georgia', + 'GS' => 'Georgia Selatan dan Kepulauan Sandwich Selatan', + 'GH' => 'Ghana', + 'GI' => 'Gibraltar', + 'GL' => 'Greenland', + 'GD' => 'Grenada', + 'GP' => 'Guadeloupe', + 'GU' => 'Guam', + 'GT' => 'Guatemala', + 'GG' => 'Guernsey', + 'GN' => 'Guinea', + 'GQ' => 'Guinea Khatulistiwa', + 'GW' => 'Guinea-Bissau', + 'GY' => 'Guyana', + 'GF' => 'Guyana Perancis', + 'HT' => 'Haiti', + 'HN' => 'Honduras', + 'HK' => 'Hong Kong S.A.R., Cina', + 'HU' => 'Hungaria', + 'IN' => 'India', + 'ID' => 'Indonesia', + 'GB' => 'Inggris Raya', + 'IR' => 'Iran', + 'IQ' => 'Iraq', + 'IE' => 'Irlandia', + 'IS' => 'Islandia', + 'IM' => 'Isle of Man', + 'IL' => 'Israel', + 'IT' => 'Itali', + 'JM' => 'Jamaika', + 'JP' => 'Jepang', + 'DE' => 'Jerman', + 'JE' => 'Jersey', + 'DJ' => 'Jibouti', + 'NC' => 'Kaledonia Baru', + 'KH' => 'Kamboja', + 'CM' => 'Kamerun', + 'CA' => 'Kanada', + 'KZ' => 'Kazakhstan', + 'KE' => 'Kenya', + 'MP' => 'Kepualuan Mariana Utara', + 'BV' => 'Kepulauan Bouvet', + 'VG' => 'Kepulauan British Virgin', + 'CC' => 'Kepulauan Cocos', + 'CK' => 'Kepulauan Cook', + 'FK' => 'Kepulauan Falkland', + 'FO' => 'Kepulauan Faroe', + 'KY' => 'Kepulauan Kayman', + 'MH' => 'Kepulauan Marshall', + 'NF' => 'Kepulauan Norfolk', + 'SB' => 'Kepulauan Solomon', + 'TC' => 'Kepulauan Turks dan Caicos', + 'VI' => 'Kepulauan U.S. Virgin', + 'UM' => 'Kepulauan minor sekitar Amerika Serikat', + 'KI' => 'Kiribati', + 'CO' => 'Kolombia', + 'KM' => 'Komoros', + 'CG' => 'Kongo', + 'KR' => 'Korea Selatan', + 'KP' => 'Korea Utara', + 'CR' => 'Kosta Rika', + 'HR' => 'Kroasia', + 'CU' => 'Kuba', + 'KW' => 'Kuwait', + 'KG' => 'Kyrgyzstan', + 'LA' => 'Laos', + 'LV' => 'Latvia', + 'LB' => 'Lebanon', + 'LS' => 'Lesotho', + 'LR' => 'Liberia', + 'LY' => 'Libya', + 'LI' => 'Liechtenstein', + 'LT' => 'Lithuania', + 'LU' => 'Luxembourg', + 'MK' => 'Macedonia', + 'MG' => 'Madagaskar', + 'MO' => 'Makao S.A.R. Cina', + 'MW' => 'Malawi', + 'MY' => 'Malaysia', + 'MV' => 'Maldives', + 'ML' => 'Mali', + 'MT' => 'Malta', + 'MA' => 'Maroko', + 'MQ' => 'Martinique', + 'MR' => 'Mauritania', + 'MU' => 'Mauritius', + 'YT' => 'Mayotte', + 'EG' => 'Mesir', + 'MX' => 'Mexico', + 'FM' => 'Mikronesia', + 'MD' => 'Moldova', + 'MC' => 'Monaco', + 'MN' => 'Mongolia', + 'ME' => 'Montenegro', + 'MS' => 'Montserrat', + 'MZ' => 'Mozambique', + 'MM' => 'Myanmar', + 'NA' => 'Namibia', + 'NR' => 'Nauru', + 'NP' => 'Nepal', + 'NL' => 'The Netherlands', + 'NI' => 'Nicaragua', + 'NE' => 'Niger', + 'NG' => 'Nigeria', + 'NU' => 'Niue', + 'NO' => 'Norwegia', + 'OM' => 'Oman', + 'PS' => 'Otoritas Palestina', + 'PK' => 'Pakistan', + 'PW' => 'Palau', + 'PA' => 'Panama', + 'CI' => 'Pantai Gading', + 'PG' => 'Papua Nugini', + 'PY' => 'Paraguay', + 'FR' => 'Perancis', + 'PE' => 'Peru', + 'PN' => 'Pitcairn', + 'PL' => 'Polandia', + 'PF' => 'Polynesia Perancis', + 'PT' => 'Portugis', + 'PR' => 'Puerto Riko', + 'CX' => 'Pulau Christmas', + 'HM' => 'Pulau Heard dan Kepulauan McDonald', + 'QA' => 'Qatar', + 'CF' => 'Republik Afrika Tengah', + 'CZ' => 'Republik Ceko', + 'CD' => 'Republik Demokratik Kongo', + 'DO' => 'Republik Dominika', + 'RO' => 'Romania', + 'RU' => 'Rusia', + 'RW' => 'Rwanda', + 'RE' => 'Réunion', + 'EH' => 'Sahara Barat', + 'SH' => 'Saint Helena', + 'KN' => 'Saint Kitts dan Nevis', + 'PM' => 'Saint Pierre dan Miquelon', + 'VC' => 'Saint Vincent dan Grenadines', + 'WS' => 'Samoa', + 'AS' => 'Samoa Amerika', + 'SM' => 'San Marino', + 'LC' => 'Santa Lusia', + 'ST' => 'Sao Tome dan Principe', + 'NZ' => 'Selandia Baru', + 'SN' => 'Senegal', + 'RS' => 'Serbia', + 'CS' => 'Serbia dan Montenegro', + 'SC' => 'Seychelles', + 'SL' => 'Sierra Leone', + 'SG' => 'Singapura', + 'CY' => 'Siprus', + 'SK' => 'Slovakia', + 'SI' => 'Slovenia', + 'SO' => 'Somalia', + 'ES' => 'Spanyol', + 'LK' => 'Sri Lanka', + 'SD' => 'Sudan', + 'SR' => 'Suriname', + 'SJ' => 'Svalbard dan Jan Mayen', + 'SZ' => 'Swaziland', + 'SE' => 'Sweden', + 'CH' => 'Swiss', + 'SY' => 'Syria', + 'TW' => 'Taiwan', + 'TJ' => 'Tajikistan', + 'CV' => 'Tanjung Verde', + 'TZ' => 'Tanzania', + 'TH' => 'Thailand', + 'TL' => 'Timor Timur', + 'TG' => 'Togo', + 'TK' => 'Tokelau', + 'TO' => 'Tonga', + 'TT' => 'Trinidad dan Tobago', + 'TN' => 'Tunisia', + 'TR' => 'Turkey', + 'TM' => 'Turkmenistan', + 'TV' => 'Tuvalu', + 'UG' => 'Uganda', + 'UA' => 'Ukraina', + 'AE' => 'Uni Emirat Arab', + 'UY' => 'Uruguay', + 'UZ' => 'Uzbekistan', + 'VU' => 'Vanuatu', + 'VA' => 'Vatikan', + 'VE' => 'Venezuela', + 'VN' => 'Vietnam', + 'WF' => 'Wallis dan Futuna', + 'TF' => 'Wilayah Prancis Selatan', + 'YE' => 'Yaman', + 'JO' => 'Yordania', + 'GR' => 'Yunani', + 'ZM' => 'Zambia', + 'ZW' => 'Zimbabwe', + 'AX' => '�Land Islands', +); diff --git a/application/helpers/country-list/it/country.php b/application/helpers/country-list/it/country.php new file mode 100644 index 0000000..c88432f --- /dev/null +++ b/application/helpers/country-list/it/country.php @@ -0,0 +1,249 @@ + 'Afghanistan', + 'AL' => 'Albania', + 'DZ' => 'Algeria', + 'AD' => 'Andorra', + 'AO' => 'Angola', + 'AI' => 'Anguilla', + 'AQ' => 'Antartide', + 'AG' => 'Antigua e Barbuda', + 'AN' => 'Antille Olandesi', + 'SA' => 'Arabia Saudita', + 'AR' => 'Argentina', + 'AM' => 'Armenia', + 'AW' => 'Aruba', + 'AU' => 'Australia', + 'AT' => 'Austria', + 'AZ' => 'Azerbaigian', + 'BS' => 'Bahamas', + 'BH' => 'Bahrein', + 'BD' => 'Bangladesh', + 'BB' => 'Barbados', + 'BE' => 'Belgio', + 'BZ' => 'Belize', + 'BJ' => 'Benin', + 'BM' => 'Bermuda', + 'BT' => 'Bhutan', + 'BY' => 'Bielorussia', + 'BO' => 'Bolivia', + 'BA' => 'Bosnia Erzegovina', + 'BW' => 'Botswana', + 'BR' => 'Brasile', + 'BN' => 'Brunei', + 'BG' => 'Bulgaria', + 'BF' => 'Burkina Faso', + 'BI' => 'Burundi', + 'KH' => 'Cambogia', + 'CM' => 'Camerun', + 'CA' => 'Canada', + 'CV' => 'Capo Verde', + 'TD' => 'Ciad', + 'CL' => 'Cile', + 'CN' => 'Cina', + 'CY' => 'Cipro', + 'CO' => 'Colombia', + 'KM' => 'Comore', + 'CG' => 'Congo', + 'KP' => 'Corea del Nord', + 'KR' => 'Corea del Sud', + 'CR' => 'Costa Rica', + 'CI' => 'Costa d’Avorio', + 'HR' => 'Croazia', + 'CU' => 'Cuba', + 'DK' => 'Danimarca', + 'DM' => 'Dominica', + 'EC' => 'Ecuador', + 'EG' => 'Egitto', + 'SV' => 'El Salvador', + 'AE' => 'Emirati Arabi Uniti', + 'ER' => 'Eritrea', + 'EE' => 'Estonia', + 'ET' => 'Etiopia', + 'RU' => 'Federazione Russa', + 'FJ' => 'Figi', + 'PH' => 'Filippine', + 'FI' => 'Finlandia', + 'FR' => 'Francia', + 'GA' => 'Gabon', + 'GM' => 'Gambia', + 'GE' => 'Georgia', + 'GS' => 'Georgia del Sud e Isole Sandwich del Sud', + 'DE' => 'Germania', + 'GH' => 'Ghana', + 'JM' => 'Giamaica', + 'JP' => 'Giappone', + 'GI' => 'Gibilterra', + 'DJ' => 'Gibuti', + 'JO' => 'Giordania', + 'GR' => 'Grecia', + 'GD' => 'Grenada', + 'GL' => 'Groenlandia', + 'GP' => 'Guadalupa', + 'GU' => 'Guam', + 'GT' => 'Guatemala', + 'GG' => 'Guernsey', + 'GF' => 'Guiana Francese', + 'GN' => 'Guinea', + 'GQ' => 'Guinea Equatoriale', + 'GW' => 'Guinea-Bissau', + 'GY' => 'Guyana', + 'HT' => 'Haiti', + 'HN' => 'Honduras', + 'IN' => 'India', + 'ID' => 'Indonesia', + 'IR' => 'Iran', + 'IQ' => 'Iraq', + 'IE' => 'Irlanda', + 'IS' => 'Islanda', + 'BV' => 'Isola Bouvet', + 'NF' => 'Isola Norfolk', + 'CX' => 'Isola di Christmas', + 'IM' => 'Isola di Man', + 'AX' => 'Isole Aland', + 'KY' => 'Isole Cayman', + 'CC' => 'Isole Cocos', + 'CK' => 'Isole Cook', + 'FK' => 'Isole Falkland', + 'FO' => 'Isole Faroe', + 'HM' => 'Isole Heard ed Isole McDonald', + 'MP' => 'Isole Marianne Settentrionali', + 'MH' => 'Isole Marshall', + 'UM' => 'Isole Minori lontane dagli Stati Uniti', + 'SB' => 'Isole Solomon', + 'TC' => 'Isole Turks e Caicos', + 'VI' => 'Isole Vergini Americane', + 'VG' => 'Isole Vergini Britanniche', + 'IL' => 'Israele', + 'IT' => 'Italia', + 'JE' => 'Jersey', + 'KZ' => 'Kazakistan', + 'KE' => 'Kenya', + 'KG' => 'Kirghizistan', + 'KI' => 'Kiribati', + 'KW' => 'Kuwait', + 'LA' => 'Laos', + 'LS' => 'Lesotho', + 'LV' => 'Lettonia', + 'LB' => 'Libano', + 'LR' => 'Liberia', + 'LY' => 'Libia', + 'LI' => 'Liechtenstein', + 'LT' => 'Lituania', + 'LU' => 'Lussemburgo', + 'MG' => 'Madagascar', + 'MW' => 'Malawi', + 'MV' => 'Maldive', + 'MY' => 'Malesia', + 'ML' => 'Mali', + 'MT' => 'Malta', + 'MA' => 'Marocco', + 'MQ' => 'Martinica', + 'MR' => 'Mauritania', + 'MU' => 'Mauritius', + 'YT' => 'Mayotte', + 'MX' => 'Messico', + 'FM' => 'Micronesia', + 'MD' => 'Moldavia', + 'MC' => 'Monaco', + 'MN' => 'Mongolia', + 'ME' => 'Montenegro', + 'MS' => 'Montserrat', + 'MZ' => 'Mozambico', + 'MM' => 'Myanmar', + 'NA' => 'Namibia', + 'NR' => 'Nauru', + 'NP' => 'Nepal', + 'NI' => 'Nicaragua', + 'NE' => 'Niger', + 'NG' => 'Nigeria', + 'NU' => 'Niue', + 'NO' => 'Norvegia', + 'NC' => 'Nuova Caledonia', + 'NZ' => 'Nuova Zelanda', + 'OM' => 'Oman', + 'NL' => 'Paesi Bassi', + 'PK' => 'Pakistan', + 'PW' => 'Palau', + 'PS' => 'Palestina', + 'PA' => 'Panama', + 'PG' => 'Papua Nuova Guinea', + 'PY' => 'Paraguay', + 'PE' => 'Perù', + 'PN' => 'Pitcairn', + 'PF' => 'Polinesia Francese', + 'PL' => 'Polonia', + 'PT' => 'Portogallo', + 'PR' => 'Portorico', + 'QA' => 'Qatar', + 'HK' => 'Regione Amministrativa Speciale di Hong Kong della Repubblica Popolare Cinese', + 'MO' => 'Regione Amministrativa Speciale di Macao della Repubblica Popolare Cinese', + 'GB' => 'Regno Unito', + 'CZ' => 'Repubblica Ceca', + 'CF' => 'Repubblica Centrafricana', + 'CD' => 'Repubblica Democratica del Congo', + 'DO' => 'Repubblica Dominicana', + 'MK' => 'Repubblica di Macedonia', + 'RO' => 'Romania', + 'RW' => 'Ruanda', + 'RE' => 'Réunion', + 'EH' => 'Sahara Occidentale', + 'KN' => 'Saint Kitts e Nevis', + 'LC' => 'Saint Lucia', + 'PM' => 'Saint Pierre e Miquelon', + 'VC' => 'Saint Vincent e Grenadines', + 'WS' => 'Samoa', + 'AS' => 'Samoa Americane', + 'BL' => 'San Bartolomeo', + 'SM' => 'San Marino', + 'SH' => 'Sant’Elena', + 'ST' => 'Sao Tomé e Príncipe', + 'SN' => 'Senegal', + 'RS' => 'Serbia', + 'CS' => 'Serbia e Montenegro', + 'SC' => 'Seychelles', + 'SL' => 'Sierra Leone', + 'SG' => 'Singapore', + 'SY' => 'Siria', + 'SK' => 'Slovacchia', + 'SI' => 'Slovenia', + 'SO' => 'Somalia', + 'ES' => 'Spagna', + 'LK' => 'Sri Lanka', + 'US' => 'Stati Uniti', + 'ZA' => 'Sudafrica', + 'SD' => 'Sudan', + 'SR' => 'Suriname', + 'SJ' => 'Svalbard e Jan Mayen', + 'SE' => 'Svezia', + 'CH' => 'Svizzera', + 'SZ' => 'Swaziland', + 'TJ' => 'Tagikistan', + 'TH' => 'Tailandia', + 'TW' => 'Taiwan', + 'TZ' => 'Tanzania', + 'TF' => 'Territori australi francesi', + 'IO' => 'Territorio Britannico dell’Oceano Indiano', + 'TL' => 'Timor Est', + 'TG' => 'Togo', + 'TK' => 'Tokelau', + 'TO' => 'Tonga', + 'TT' => 'Trinidad e Tobago', + 'TN' => 'Tunisia', + 'TR' => 'Turchia', + 'TM' => 'Turkmenistan', + 'TV' => 'Tuvalu', + 'UA' => 'Ucraina', + 'UG' => 'Uganda', + 'HU' => 'Ungheria', + 'UY' => 'Uruguay', + 'UZ' => 'Uzbekistan', + 'VU' => 'Vanuatu', + 'VA' => 'Vaticano', + 'VE' => 'Venezuela', + 'VN' => 'Vietnam', + 'WF' => 'Wallis e Futuna', + 'YE' => 'Yemen', + 'ZM' => 'Zambia', + 'ZW' => 'Zimbabwe', + 'ZZ' => 'regione non valida o sconosciuta', +); diff --git a/application/helpers/country-list/ja/country.php b/application/helpers/country-list/ja/country.php new file mode 100644 index 0000000..f34323c --- /dev/null +++ b/application/helpers/country-list/ja/country.php @@ -0,0 +1,250 @@ + 'アイスランド', + 'IE' => 'アイルランド', + 'AZ' => 'アゼルバイジャン', + 'AF' => 'アフガニスタン', + 'US' => 'アメリカ合衆国', + 'VI' => 'アメリカ領ヴァージン諸島', + 'AE' => 'アラブ首長国連邦', + 'DZ' => 'アルジェリア', + 'AR' => 'アルゼンチン', + 'AL' => 'アルバニア', + 'AW' => 'アルバ島', + 'AM' => 'アルメニア', + 'AI' => 'アンギラ', + 'AO' => 'アンゴラ', + 'AG' => 'アンティグア・バーブーダ', + 'AD' => 'アンドラ', + 'YE' => 'イエメン', + 'GB' => 'イギリス', + 'VG' => 'イギリス領ヴァージン諸島', + 'IL' => 'イスラエル', + 'IT' => 'イタリア', + 'IQ' => 'イラク', + 'IR' => 'イラン', + 'IN' => 'インド', + 'ID' => 'インドネシア', + 'WF' => 'ウォリス・フツナ', + 'UG' => 'ウガンダ', + 'UA' => 'ウクライナ', + 'UZ' => 'ウズベキスタン', + 'UY' => 'ウルグアイ', + 'EC' => 'エクアドル', + 'EG' => 'エジプト', + 'EE' => 'エストニア', + 'ET' => 'エチオピア', + 'ER' => 'エリトリア', + 'SV' => 'エルサルバドル', + 'OM' => 'オマーン', + 'NL' => 'オランダ', + 'AN' => 'オランダ領アンティル諸島', + 'AU' => 'オーストラリア', + 'AT' => 'オーストリア', + 'AX' => 'オーランド諸島', + 'KZ' => 'カザフスタン', + 'QA' => 'カタール', + 'CA' => 'カナダ', + 'CM' => 'カメルーン', + 'KH' => 'カンボジア', + 'CV' => 'カーボベルデ', + 'GY' => 'ガイアナ', + 'GA' => 'ガボン', + 'GM' => 'ガンビア', + 'GH' => 'ガーナ', + 'GG' => 'ガーンジー', + 'CY' => 'キプロス', + 'CU' => 'キューバ', + 'KI' => 'キリバス', + 'KG' => 'キルギスタン', + 'GN' => 'ギニア', + 'GW' => 'ギニアビサウ', + 'GR' => 'ギリシャ', + 'KW' => 'クウェート', + 'CK' => 'クック諸島', + 'CX' => 'クリスマス島', + 'HR' => 'クロアチア', + 'GT' => 'グアテマラ', + 'GP' => 'グアドループ', + 'GU' => 'グアム', + 'GL' => 'グリーンランド', + 'GE' => 'グルジア', + 'GD' => 'グレナダ', + 'KY' => 'ケイマン諸島', + 'KE' => 'ケニア', + 'CC' => 'ココス (キーリング) 諸島', + 'CR' => 'コスタリカ', + 'KM' => 'コモロ', + 'CO' => 'コロンビア', + 'CG' => 'コンゴ共和国 (ブラザビル)', + 'CD' => 'コンゴ民主共和国 (キンシャサ)', + 'CI' => 'コートジボワール', + 'SA' => 'サウジアラビア', + 'WS' => 'サモア', + 'ST' => 'サントメ・プリンシペ', + 'PM' => 'サンピエール島・ミクロン島', + 'SM' => 'サンマリノ', + 'BL' => 'サン・バルテルミー', + 'ZM' => 'ザンビア', + 'SL' => 'シエラレオネ', + 'SY' => 'シリア', + 'SG' => 'シンガポール', + 'DJ' => 'ジブチ', + 'GI' => 'ジブラルタル', + 'JM' => 'ジャマイカ', + 'JE' => 'ジャージー', + 'ZW' => 'ジンバブエ', + 'CH' => 'スイス', + 'SE' => 'スウェーデン', + 'SJ' => 'スバールバル諸島・ヤンマイエン島', + 'ES' => 'スペイン', + 'SR' => 'スリナム', + 'LK' => 'スリランカ', + 'SK' => 'スロバキア', + 'SI' => 'スロベニア', + 'SZ' => 'スワジランド', + 'SD' => 'スーダン', + 'SN' => 'セネガル', + 'RS' => 'セルビア', + 'CS' => 'セルビア・モンテネグロ', + 'KN' => 'セントクリストファー・ネイビス', + 'VC' => 'セントビンセント・グレナディーン諸島', + 'SH' => 'セントヘレナ', + 'LC' => 'セントルシア', + 'MF' => 'セント・マーチン', + 'SC' => 'セーシェル', + 'SO' => 'ソマリア', + 'SB' => 'ソロモン諸島', + 'TH' => 'タイ', + 'TJ' => 'タジキスタン', + 'TZ' => 'タンザニア', + 'TC' => 'タークス諸島・カイコス諸島', + 'CZ' => 'チェコ共和国', + 'TD' => 'チャド', + 'TN' => 'チュニジア', + 'CL' => 'チリ', + 'TV' => 'ツバル', + 'DK' => 'デンマーク', + 'TK' => 'トケラウ諸島', + 'TT' => 'トリニダード・トバゴ', + 'TM' => 'トルクメニスタン', + 'TR' => 'トルコ', + 'TO' => 'トンガ', + 'TG' => 'トーゴ', + 'DE' => 'ドイツ', + 'DO' => 'ドミニカ共和国', + 'DM' => 'ドミニカ国', + 'NG' => 'ナイジェリア', + 'NR' => 'ナウル', + 'NA' => 'ナミビア', + 'NU' => 'ニウエ島', + 'NI' => 'ニカラグア', + 'NE' => 'ニジェール', + 'NC' => 'ニューカレドニア', + 'NZ' => 'ニュージーランド', + 'NP' => 'ネパール', + 'NO' => 'ノルウェー', + 'NF' => 'ノーフォーク島', + 'HT' => 'ハイチ', + 'HU' => 'ハンガリー', + 'HM' => 'ハード島・マクドナルド諸島', + 'VA' => 'バチカン市国', + 'VU' => 'バヌアツ', + 'BS' => 'バハマ', + 'BM' => 'バミューダ', + 'BB' => 'バルバドス', + 'BD' => 'バングラデシュ', + 'BH' => 'バーレーン', + 'PK' => 'パキスタン', + 'PA' => 'パナマ', + 'PG' => 'パプアニューギニア', + 'PW' => 'パラオ', + 'PY' => 'パラグアイ', + 'PS' => 'パレスチナ領土', + 'PN' => 'ピトケアン島', + 'FJ' => 'フィジー', + 'PH' => 'フィリピン', + 'FI' => 'フィンランド', + 'FO' => 'フェロー諸島', + 'FK' => 'フォークランド諸島', + 'FR' => 'フランス', + 'TF' => 'フランス領極南諸島', + 'BR' => 'ブラジル', + 'BG' => 'ブルガリア', + 'BF' => 'ブルキナファソ', + 'BN' => 'ブルネイ', + 'BI' => 'ブルンジ', + 'BT' => 'ブータン', + 'BV' => 'ブーベ島', + 'PR' => 'プエルトリコ', + 'VN' => 'ベトナム', + 'BJ' => 'ベニン', + 'VE' => 'ベネズエラ', + 'BY' => 'ベラルーシ', + 'BZ' => 'ベリーズ', + 'BE' => 'ベルギー', + 'PE' => 'ペルー', + 'HN' => 'ホンジュラス', + 'BA' => 'ボスニア・ヘルツェゴビナ', + 'BW' => 'ボツワナ', + 'BO' => 'ボリビア', + 'PT' => 'ポルトガル', + 'PL' => 'ポーランド', + 'MK' => 'マケドニア', + 'MG' => 'マダガスカル', + 'YT' => 'マヨット島', + 'MW' => 'マラウィ', + 'ML' => 'マリ', + 'MT' => 'マルタ', + 'MQ' => 'マルティニーク島', + 'MY' => 'マレーシア', + 'IM' => 'マン島', + 'MH' => 'マーシャル諸島共和国', + 'FM' => 'ミクロネシア', + 'MM' => 'ミャンマー', + 'MX' => 'メキシコ', + 'MZ' => 'モザンビーク', + 'MC' => 'モナコ', + 'MV' => 'モルジブ', + 'MD' => 'モルドバ', + 'MA' => 'モロッコ', + 'MN' => 'モンゴル', + 'ME' => 'モンテネグロ', + 'MS' => 'モントセラト島', + 'MU' => 'モーリシャス', + 'MR' => 'モーリタニア', + 'JO' => 'ヨルダン', + 'LA' => 'ラオス', + 'LV' => 'ラトビア', + 'LT' => 'リトアニア', + 'LI' => 'リヒテンシュタイン', + 'LY' => 'リビア', + 'LR' => 'リベリア', + 'LU' => 'ルクセンブルグ', + 'RW' => 'ルワンダ', + 'RO' => 'ルーマニア', + 'LS' => 'レソト', + 'LB' => 'レバノン', + 'RE' => 'レユニオン島', + 'RU' => 'ロシア', + 'ZZ' => '不明な地域', + 'CN' => '中国', + 'CF' => '中央アフリカ共和国', + 'MO' => '中華人民共和国マカオ特別行政区', + 'HK' => '中華人民共和国香港特別行政区', + 'GF' => '仏領ギアナ', + 'PF' => '仏領ポリネシア', + 'MP' => '北マリアナ諸島', + 'ZA' => '南アフリカ', + 'GS' => '南ジョージア島・南サンドイッチ諸島', + 'AQ' => '南極大陸', + 'TW' => '台湾', + 'KR' => '大韓民国', + 'JP' => '日本', + 'KP' => '朝鮮民主主義人民共和国', + 'TL' => '東ティモール', + 'AS' => '米領サモア', + 'UM' => '米領太平洋諸島', + 'IO' => '英領インド洋植民地', + 'EH' => '西サハラ', + 'GQ' => '赤道ギニア', +); diff --git a/application/helpers/country-list/lt/country.php b/application/helpers/country-list/lt/country.php new file mode 100644 index 0000000..787e86b --- /dev/null +++ b/application/helpers/country-list/lt/country.php @@ -0,0 +1,250 @@ + 'Afganistanas', + 'IE' => 'Airija', + 'AX' => 'Alandų salos', + 'AL' => 'Albanija', + 'DZ' => 'Alžyras', + 'AS' => 'Amerikos Samoa', + 'AD' => 'Andora', + 'AI' => 'Angilija', + 'AO' => 'Angola', + 'AQ' => 'Antarktis', + 'AG' => 'Antigva ir Barbuda', + 'AR' => 'Argentina', + 'AM' => 'Armėnija', + 'AW' => 'Aruba', + 'AU' => 'Australija', + 'AT' => 'Austrija', + 'AZ' => 'Azerbaidžanas', + 'BS' => 'Bahamos', + 'BH' => 'Bahreinas', + 'BY' => 'Baltarusija', + 'BD' => 'Bangladešas', + 'BB' => 'Barbadosas', + 'BE' => 'Belgija', + 'BZ' => 'Belizas', + 'BJ' => 'Beninas', + 'BM' => 'Bermuda', + 'GW' => 'Bisau Gvinėja', + 'BO' => 'Bolivija', + 'BA' => 'Bosnija ir Hercegovina', + 'BW' => 'Botsvana', + 'BV' => 'Bouvet sala', + 'BR' => 'Brazilija', + 'BN' => 'Brunėjus', + 'BG' => 'Bulgarija', + 'BF' => 'Burkina Fasas', + 'BI' => 'Burundis', + 'BT' => 'Butanas', + 'CF' => 'Centrinės Afrikos Respublika', + 'DK' => 'Danija', + 'GB' => 'Didžioji Britanija', + 'VG' => 'Didžiosios Britanijos Mergelių salos', + 'DM' => 'Dominika', + 'DO' => 'Dominikos Respublika', + 'CI' => 'Dramblio Kaulo Krantas', + 'JE' => 'Džersis', + 'DJ' => 'Džibutis', + 'EG' => 'Egiptas', + 'EC' => 'Ekvadoras', + 'ER' => 'Eritrėja', + 'EE' => 'Estija', + 'ET' => 'Etiopija', + 'FK' => 'Falklando salos', + 'FO' => 'Farerų salos', + 'FJ' => 'Fidžis', + 'PH' => 'Filipinai', + 'GA' => 'Gabonas', + 'GY' => 'Gajana', + 'GM' => 'Gambija', + 'GH' => 'Gana', + 'GI' => 'Gibraltaras', + 'GR' => 'Graikija', + 'GD' => 'Grenada', + 'GL' => 'Grenlandija', + 'GE' => 'Gruzija', + 'GU' => 'Guamas', + 'GG' => 'Guernsis', + 'GP' => 'Gvadelupė', + 'GT' => 'Gvatemala', + 'GN' => 'Gvinėja', + 'HT' => 'Haitis', + 'HM' => 'Heardo ir McDonaldo Salų Sritis', + 'HN' => 'Hondūras', + 'IN' => 'Indija', + 'IO' => 'Indijos vandenyno britų sritis', + 'ID' => 'Indonezija', + 'IQ' => 'Irakas', + 'IR' => 'Iranas', + 'IS' => 'Islandija', + 'ES' => 'Ispanija', + 'IT' => 'Italija', + 'IL' => 'Izraelis', + 'JM' => 'Jamaika', + 'JP' => 'Japonija', + 'YE' => 'Jemenas', + 'JO' => 'Jordanija', + 'AE' => 'Jungtiniai Arabų Emyratai', + 'UM' => 'Jungtinių Valstijų mažosios aplinkinės salos', + 'US' => 'Jungtinės Valstijos', + 'ME' => 'Juodkalnija', + 'KY' => 'Kaimanų salos', + 'CX' => 'Kalėdų sala', + 'KH' => 'Kambodža', + 'CM' => 'Kamerūnas', + 'CA' => 'Kanada', + 'QA' => 'Kataras', + 'KZ' => 'Kazachstanas', + 'KE' => 'Kenija', + 'CN' => 'Kinija', + 'HK' => 'Kinijos S.A.R.Honkongas', + 'CY' => 'Kipras', + 'KG' => 'Kirgiztanas', + 'KI' => 'Kiribatis', + 'CC' => 'Kokosų salos', + 'CO' => 'Kolumbija', + 'KM' => 'Komorai', + 'CG' => 'Kongas', + 'CD' => 'Kongo Demokratinė Respublika', + 'CR' => 'Kosta Rika', + 'HR' => 'Kroatija', + 'CU' => 'Kuba', + 'CK' => 'Kuko salos', + 'KW' => 'Kuveitas', + 'LA' => 'Laosas', + 'LV' => 'Latvija', + 'PL' => 'Lenkija', + 'LS' => 'Lesotas', + 'LB' => 'Libanas', + 'LR' => 'Liberija', + 'LY' => 'Libija', + 'LI' => 'Lichtenšteinas', + 'LT' => 'Lietuva', + 'LU' => 'Liuksemburgas', + 'MO' => 'Macao', + 'MG' => 'Madagaskaras', + 'MK' => 'Makedonija', + 'MY' => 'Malaizija', + 'MW' => 'Malavis', + 'MV' => 'Maldivai', + 'ML' => 'Malis', + 'MT' => 'Malta', + 'MP' => 'Marianos šiaurinės salos', + 'MA' => 'Marokas', + 'MQ' => 'Martinika', + 'MH' => 'Maršalo Salos', + 'MU' => 'Mauricijus', + 'MR' => 'Mauritanija', + 'YT' => 'Mayotte’as', + 'IM' => 'Meino sala', + 'MX' => 'Meksika', + 'VI' => 'Mergelių salos (JAV)', + 'MM' => 'Mianmaras', + 'FM' => 'Mikronezija', + 'MD' => 'Moldova', + 'MC' => 'Monakas', + 'MN' => 'Mongolija', + 'MS' => 'Montserratas', + 'MZ' => 'Mozambikas', + 'NA' => 'Namibija', + 'NC' => 'Naujoji Kaledonija', + 'NZ' => 'Naujoji Zelandija', + 'NR' => 'Nauru', + 'NP' => 'Nepalas', + 'ZZ' => 'Nežinoma ar neteisinga sritis', + 'NG' => 'Nigerija', + 'NE' => 'Nigeris', + 'NI' => 'Nikaragva', + 'NU' => 'Niue', + 'NF' => 'Norfolko sala', + 'NO' => 'Norvegija', + 'NL' => 'Nyderlandai', + 'AN' => 'Olandijos Antilai', + 'OM' => 'Omanas', + 'PK' => 'Pakistanas', + 'PW' => 'Palau', + 'PS' => 'Palestinos teritorija', + 'PA' => 'Panama', + 'PG' => 'Papua Naujoji Gvinėja', + 'PY' => 'Paragvajus', + 'PE' => 'Peru', + 'ZA' => 'Pietų Afrika', + 'GS' => 'Pietų Džordžija ir Pietų Sandvičo salos', + 'KR' => 'Pietų Korėja', + 'PN' => 'Pitkernas', + 'PT' => 'Portugalija', + 'FR' => 'Prancūzija', + 'GF' => 'Prancūzijos Gviana', + 'TF' => 'Prancūzijos Pietų sritys', + 'PF' => 'Prancūzų Polinezija', + 'PR' => 'Puerto Rikas', + 'GQ' => 'Pusiaujo Gvinėja', + 'RE' => 'Reunionas', + 'RW' => 'Ruanda', + 'RO' => 'Rumunija', + 'RU' => 'Rusijos Federacija', + 'TL' => 'Rytų Timoras', + 'MF' => 'Saint-Martin', + 'SB' => 'Saliamono salos', + 'SV' => 'Salvadoras', + 'WS' => 'Samoa', + 'SM' => 'San Marinas', + 'ST' => 'San Tomė ir Principė', + 'SA' => 'Saudo Arabija', + 'SC' => 'Seišeliai', + 'PM' => 'Sen Pjeras ir Mikelonas', + 'SN' => 'Senegalas', + 'KN' => 'Sent Kitsas ir Nevis', + 'RS' => 'Serbija', + 'CS' => 'Serbija ir Juodkalnija', + 'SL' => 'Siera Leonė', + 'SG' => 'Singapūras', + 'SY' => 'Sirija', + 'SK' => 'Slovakija', + 'SI' => 'Slovėnija', + 'SO' => 'Somalis', + 'SD' => 'Sudanas', + 'FI' => 'Suomija', + 'SR' => 'Surinamas', + 'SJ' => 'Svalbardo ir Jan Majen salos', + 'SZ' => 'Svazilendas', + 'TJ' => 'Tadžikistanas', + 'TH' => 'Tailandas', + 'TW' => 'Taivanas', + 'TZ' => 'Tanzanija', + 'TG' => 'Togas', + 'TK' => 'Tokelau', + 'TO' => 'Tonga', + 'TT' => 'Trinidadas ir Tobagas', + 'TN' => 'Tunisas', + 'TR' => 'Turkija', + 'TM' => 'Turkmėnistanas', + 'TC' => 'Turkso ir Caicoso salos', + 'TV' => 'Tuvalu', + 'UG' => 'Uganda', + 'UA' => 'Ukraina', + 'UY' => 'Urugvajus', + 'UZ' => 'Uzbekistanas', + 'EH' => 'Vakarų Sachara', + 'VU' => 'Vanuatu', + 'VA' => 'Vatikanas', + 'VE' => 'Venesuela', + 'HU' => 'Vengrija', + 'VN' => 'Vietnamas', + 'DE' => 'Vokietija', + 'WF' => 'Wallisas ir Futuna', + 'ZM' => 'Zambija', + 'ZW' => 'Zimbabvė', + 'TD' => 'Čadas', + 'CZ' => 'Čekija', + 'CL' => 'Čilė', + 'KP' => 'Šiaurės Korėja', + 'LK' => 'Šri Lanka', + 'SE' => 'Švedija', + 'CH' => 'Šveicarija', + 'VC' => 'Šventasis Vincentas ir Grenadinai', + 'BL' => 'Švento Baltramiejaus sala', + 'SH' => 'Šventoji Elena', + 'LC' => 'Šventoji Liucija', + 'CV' => 'Žaliasis Kyšulys', +); diff --git a/application/helpers/country-list/lv/country.php b/application/helpers/country-list/lv/country.php new file mode 100644 index 0000000..f96b690 --- /dev/null +++ b/application/helpers/country-list/lv/country.php @@ -0,0 +1,250 @@ + 'ASV mazās aizjūras teritorijas', + 'AF' => 'Afganistāna', + 'AL' => 'Albānija', + 'DZ' => 'Alžīrija', + 'US' => 'Amerikas Savienotās Valstis', + 'AS' => 'Amerikāņu Samoa', + 'VI' => 'Amerikāņu Virdžīnu salas', + 'AD' => 'Andora', + 'AI' => 'Angilja', + 'AO' => 'Angola', + 'AQ' => 'Antarktika', + 'AG' => 'Antigva un Barbuda', + 'AE' => 'Apvienotie Arābu Emirāti', + 'AR' => 'Argentīna', + 'AM' => 'Armēnija', + 'AW' => 'Aruba', + 'AT' => 'Austrija', + 'TL' => 'Austrumtimora', + 'AU' => 'Austrālija', + 'AZ' => 'Azerbaidžāna', + 'BS' => 'Bahamas', + 'BH' => 'Bahreina', + 'BY' => 'Baltkrievija', + 'BD' => 'Bangladeša', + 'BB' => 'Barbadosa', + 'BZ' => 'Beliza', + 'BJ' => 'Benina', + 'BM' => 'Bermudu salas', + 'BE' => 'Beļģija', + 'BO' => 'Bolīvija', + 'BA' => 'Bosnija un Hercegovina', + 'BW' => 'Botsvāna', + 'BR' => 'Brazīlija', + 'IO' => 'Britu Indijas okeāna teritorija', + 'VG' => 'Britu Virdžīnu salas', + 'BN' => 'Bruneja', + 'BG' => 'Bulgārija', + 'BF' => 'Burkinafaso', + 'BI' => 'Burundi', + 'BT' => 'Butāna', + 'BV' => 'Buvē sala', + 'CF' => 'Centrālāfrikas Republika', + 'GS' => 'Dienviddžordžija un Dienvidsendviču salas', + 'KR' => 'Dienvidkoreja', + 'ZA' => 'Dienvidāfrika', + 'DM' => 'Dominika', + 'DO' => 'Dominikānas Republika', + 'DK' => 'Dānija', + 'DJ' => 'Džibutija', + 'JE' => 'Džērsija', + 'EC' => 'Ekvadora', + 'GQ' => 'Ekvatoriālā Gvineja', + 'ER' => 'Eritreja', + 'ET' => 'Etiopija', + 'FO' => 'Farēru salas', + 'FJ' => 'Fidži', + 'PH' => 'Filipīnas', + 'FK' => 'Folklenda salas', + 'FR' => 'Francija', + 'GF' => 'Franču Gviāna', + 'PF' => 'Franču Polinēzija', + 'TF' => 'Franču dienvidu teritorijas', + 'GA' => 'Gabona', + 'GY' => 'Gajāna', + 'GM' => 'Gambija', + 'GH' => 'Gana', + 'GI' => 'Gibraltārs', + 'GL' => 'Grenlande', + 'GD' => 'Grenāda', + 'GR' => 'Grieķija', + 'GE' => 'Gruzija', + 'GU' => 'Guama', + 'GP' => 'Gvadelupa', + 'GT' => 'Gvatemala', + 'GN' => 'Gvineja', + 'GW' => 'Gvineja-Bisava', + 'GG' => 'Gērnsija', + 'HT' => 'Haiti', + 'HN' => 'Hondurasa', + 'HR' => 'Horvātija', + 'HM' => 'Hērda un Makdonalda salas', + 'EE' => 'Igaunija', + 'IN' => 'Indija', + 'ID' => 'Indonēzija', + 'IQ' => 'Irāka', + 'IR' => 'Irāna', + 'IT' => 'Itālija', + 'IL' => 'Izraēla', + 'JM' => 'Jamaika', + 'JP' => 'Japāna', + 'NC' => 'Jaunkaledonija', + 'NZ' => 'Jaunzēlande', + 'YE' => 'Jemena', + 'JO' => 'Jordānija', + 'CV' => 'Kaboverde', + 'KY' => 'Kaimanu salas', + 'KH' => 'Kambodža', + 'CM' => 'Kamerūna', + 'CA' => 'Kanāda', + 'QA' => 'Katara', + 'KZ' => 'Kazahstāna', + 'KE' => 'Kenija', + 'CY' => 'Kipra', + 'KG' => 'Kirgīzija', + 'KI' => 'Kiribati', + 'CC' => 'Kokosu jeb Kīlinga salas', + 'CO' => 'Kolumbija', + 'KM' => 'Komoru salas', + 'CG' => 'Kongo', + 'CD' => 'Kongo Demokrātiskā Republika', + 'CR' => 'Kostarika', + 'CI' => 'Kotdivuāra', + 'RU' => 'Krievija', + 'CU' => 'Kuba', + 'CK' => 'Kuka salas', + 'KW' => 'Kuveita', + 'LA' => 'Laosa', + 'LV' => 'Latvija', + 'LS' => 'Lesoto', + 'LB' => 'Libāna', + 'LR' => 'Libērija', + 'GB' => 'Lielbritānija', + 'LT' => 'Lietuva', + 'LI' => 'Lihtenšteina', + 'LU' => 'Luksemburga', + 'LY' => 'Lībija', + 'MG' => 'Madagaskara', + 'YT' => 'Majota', + 'MY' => 'Malaizija', + 'MV' => 'Maldīvija', + 'ML' => 'Mali', + 'MT' => 'Malta', + 'MW' => 'Malāvija', + 'MA' => 'Maroka', + 'MQ' => 'Martinika', + 'MR' => 'Mauritānija', + 'MU' => 'Maurīcija', + 'MK' => 'Maķedonija', + 'MX' => 'Meksika', + 'ME' => 'Melnkalne', + 'IM' => 'Mena', + 'FM' => 'Mikronēzijas Federatīvās Valstis', + 'MM' => 'Mjanma', + 'MD' => 'Moldova', + 'MC' => 'Monako', + 'MN' => 'Mongolija', + 'MS' => 'Montserrata', + 'MZ' => 'Mozambika', + 'MH' => 'Māršala salas', + 'NA' => 'Namībija', + 'NR' => 'Nauru', + 'NP' => 'Nepāla', + 'NE' => 'Nigēra', + 'NG' => 'Nigērija', + 'NI' => 'Nikaragva', + 'NU' => 'Niue', + 'NF' => 'Norfolkas sala', + 'NO' => 'Norvēģija', + 'NL' => 'Nīderlande', + 'AN' => 'Nīderlandes Antiļas', + 'AX' => 'Olandes salas', + 'OM' => 'Omāna', + 'PK' => 'Pakistāna', + 'PW' => 'Palau', + 'PS' => 'Palestīniešu pašpārvaldes teritorija', + 'PA' => 'Panama', + 'PG' => 'Papua-Jaungvineja', + 'PY' => 'Paragvaja', + 'PE' => 'Peru', + 'PN' => 'Pitkērna', + 'PL' => 'Polija', + 'PT' => 'Portugāle', + 'PR' => 'Puertoriko', + 'RE' => 'Reinjona', + 'EH' => 'Rietumsahāra', + 'RW' => 'Ruanda', + 'RO' => 'Rumānija', + 'SV' => 'Salvadora', + 'WS' => 'Samoa', + 'SM' => 'Sanmarīno', + 'ST' => 'Santome un Prinsipi', + 'SA' => 'Saūda Arābija', + 'SC' => 'Seišeļu salas', + 'BL' => 'Senbartelmī', + 'SN' => 'Senegāla', + 'MF' => 'Senmartēna', + 'PM' => 'Senpjēra un Mikelona', + 'KN' => 'Sentkitsa un Nevisa', + 'LC' => 'Sentlūsija', + 'VC' => 'Sentvinsenta un Grenadīnas', + 'RS' => 'Serbija', + 'CS' => 'Serbija un Melnkalne', + 'SG' => 'Singapūra', + 'SL' => 'Sjerraleone', + 'SK' => 'Slovākija', + 'SI' => 'Slovēnija', + 'FI' => 'Somija', + 'SO' => 'Somālija', + 'ES' => 'Spānija', + 'SD' => 'Sudāna', + 'SR' => 'Surinama', + 'SH' => 'Sv. Helēnas sala', + 'SJ' => 'Svalbāra un Jana Majena sala', + 'SZ' => 'Svazilenda', + 'SY' => 'Sīrija', + 'TJ' => 'Tadžikistāna', + 'TW' => 'Taivāna', + 'TH' => 'Taizeme', + 'TZ' => 'Tanzānija', + 'TG' => 'Togo', + 'TK' => 'Tokelau', + 'TO' => 'Tonga', + 'TT' => 'Trinidāda un Tobāgo', + 'TN' => 'Tunisija', + 'TR' => 'Turcija', + 'TM' => 'Turkmenistāna', + 'TV' => 'Tuvalu', + 'TC' => 'Tērksas un Kaikosas salas', + 'UG' => 'Uganda', + 'UA' => 'Ukraina', + 'HU' => 'Ungārija', + 'UY' => 'Urugvaja', + 'UZ' => 'Uzbekistāna', + 'VU' => 'Vanuatu', + 'VA' => 'Vatikāns', + 'VE' => 'Venecuēla', + 'VN' => 'Vjetnama', + 'WF' => 'Volisa un Futuna', + 'DE' => 'Vācija', + 'ZM' => 'Zambija', + 'KP' => 'Ziemeļkoreja', + 'MP' => 'Ziemeļu Marianas salas', + 'CX' => 'Ziemsvētku sala', + 'ZW' => 'Zimbabve', + 'SE' => 'Zviedrija', + 'SB' => 'Zālamana salas', + 'ZZ' => 'nezināms vai nederīgs reģions', + 'TD' => 'Čada', + 'CZ' => 'Čehija', + 'CL' => 'Čīle', + 'EG' => 'Ēģipte', + 'IE' => 'Īrija', + 'IS' => 'Īslande', + 'CN' => 'Ķīna', + 'HK' => 'Ķīnas īpašās pārvaldes apgabals Honkonga', + 'MO' => 'Ķīnas īpašās pārvaldes apgabals Makao', + 'LK' => 'Šrilanka', + 'CH' => 'Šveice', +); diff --git a/application/helpers/country-list/nl/country.php b/application/helpers/country-list/nl/country.php new file mode 100644 index 0000000..deb57e6 --- /dev/null +++ b/application/helpers/country-list/nl/country.php @@ -0,0 +1,250 @@ + 'Afghanistan', + 'AX' => 'Alandeilanden', + 'AL' => 'Albanië', + 'DZ' => 'Algerije', + 'AS' => 'Amerikaans Samoa', + 'VI' => 'Amerikaanse Maagdeneilanden', + 'UM' => 'Amerikaanse kleinere afgelegen eilanden', + 'AD' => 'Andorra', + 'AO' => 'Angola', + 'AI' => 'Anguilla', + 'AQ' => 'Antarctica', + 'AG' => 'Antigua en Barbuda', + 'AR' => 'Argentinië', + 'AM' => 'Armenië', + 'AW' => 'Aruba', + 'AU' => 'Australië', + 'AZ' => 'Azerbeidzjan', + 'BS' => 'Bahama’s', + 'BH' => 'Bahrein', + 'BD' => 'Bangladesh', + 'BB' => 'Barbados', + 'BE' => 'België', + 'BZ' => 'Belize', + 'BJ' => 'Benin', + 'BM' => 'Bermuda', + 'BT' => 'Bhutan', + 'BO' => 'Bolivia', + 'BA' => 'Bosnië en Herzegovina', + 'BW' => 'Botswana', + 'BV' => 'Bouveteiland', + 'BR' => 'Brazilië', + 'IO' => 'Britse Gebieden in de Indische Oceaan', + 'VG' => 'Britse Maagdeneilanden', + 'BN' => 'Brunei', + 'BG' => 'Bulgarije', + 'BF' => 'Burkina Faso', + 'BI' => 'Burundi', + 'KH' => 'Cambodja', + 'CA' => 'Canada', + 'KY' => 'Caymaneilanden', + 'CF' => 'Centraal-Afrikaanse Republiek', + 'CL' => 'Chili', + 'CN' => 'China', + 'CX' => 'Christmaseiland', + 'CC' => 'Cocoseilanden', + 'CO' => 'Colombia', + 'KM' => 'Comoren', + 'CG' => 'Congo', + 'CD' => 'Congo-Kinshasa', + 'CK' => 'Cookeilanden', + 'CR' => 'Costa Rica', + 'CU' => 'Cuba', + 'CY' => 'Cyprus', + 'DK' => 'Denemarken', + 'DJ' => 'Djibouti', + 'DM' => 'Dominica', + 'DO' => 'Dominicaanse Republiek', + 'DE' => 'Duitsland', + 'EC' => 'Ecuador', + 'EG' => 'Egypte', + 'SV' => 'El Salvador', + 'GQ' => 'Equatoriaal-Guinea', + 'ER' => 'Eritrea', + 'EE' => 'Estland', + 'ET' => 'Ethiopië', + 'FO' => 'Faeröer', + 'FK' => 'Falklandeilanden', + 'FJ' => 'Fiji', + 'PH' => 'Filipijnen', + 'FI' => 'Finland', + 'FR' => 'Frankrijk', + 'GF' => 'Frans-Guyana', + 'PF' => 'Frans-Polynesië', + 'TF' => 'Franse Gebieden in de zuidelijke Indische Oceaan', + 'GA' => 'Gabon', + 'GM' => 'Gambia', + 'GE' => 'Georgië', + 'GH' => 'Ghana', + 'GI' => 'Gibraltar', + 'GD' => 'Grenada', + 'GR' => 'Griekenland', + 'GL' => 'Groenland', + 'GP' => 'Guadeloupe', + 'GU' => 'Guam', + 'GT' => 'Guatemala', + 'GG' => 'Guernsey', + 'GN' => 'Guinee', + 'GW' => 'Guinee-Bissau', + 'GY' => 'Guyana', + 'HT' => 'Haïti', + 'HM' => 'Heard- en McDonaldeilanden', + 'HN' => 'Honduras', + 'HU' => 'Hongarije', + 'HK' => 'Hongkong SAR van China', + 'IS' => 'IJsland', + 'IE' => 'Ierland', + 'IN' => 'India', + 'ID' => 'Indonesië', + 'IQ' => 'Irak', + 'IR' => 'Iran', + 'IM' => 'Isle of Man', + 'IL' => 'Israël', + 'IT' => 'Italië', + 'CI' => 'Ivoorkust', + 'JM' => 'Jamaica', + 'JP' => 'Japan', + 'YE' => 'Jemen', + 'JE' => 'Jersey', + 'JO' => 'Jordanië', + 'CV' => 'Kaapverdië', + 'CM' => 'Kameroen', + 'KZ' => 'Kazachstan', + 'KE' => 'Kenia', + 'KG' => 'Kirgizië', + 'KI' => 'Kiribati', + 'KW' => 'Koeweit', + 'HR' => 'Kroatië', + 'LA' => 'Laos', + 'LS' => 'Lesotho', + 'LV' => 'Letland', + 'LB' => 'Libanon', + 'LR' => 'Liberia', + 'LY' => 'Libië', + 'LI' => 'Liechtenstein', + 'LT' => 'Litouwen', + 'LU' => 'Luxemburg', + 'MO' => 'Macao SAR van China', + 'MK' => 'Macedonië', + 'MG' => 'Madagaskar', + 'MW' => 'Malawi', + 'MV' => 'Maldiven', + 'MY' => 'Maleisië', + 'ML' => 'Mali', + 'MT' => 'Malta', + 'MA' => 'Marokko', + 'MH' => 'Marshalleilanden', + 'MQ' => 'Martinique', + 'MR' => 'Mauritanië', + 'MU' => 'Mauritius', + 'YT' => 'Mayotte', + 'MX' => 'Mexico', + 'FM' => 'Micronesië', + 'MD' => 'Moldavië', + 'MC' => 'Monaco', + 'MN' => 'Mongolië', + 'ME' => 'Montenegro', + 'MS' => 'Montserrat', + 'MZ' => 'Mozambique', + 'MM' => 'Myanmar', + 'NA' => 'Namibië', + 'NR' => 'Nauru', + 'NL' => 'Nederland', + 'AN' => 'Nederlandse Antillen', + 'NP' => 'Nepal', + 'NI' => 'Nicaragua', + 'NC' => 'Nieuw-Caledonië', + 'NZ' => 'Nieuw-Zeeland', + 'NE' => 'Niger', + 'NG' => 'Nigeria', + 'NU' => 'Niue', + 'KP' => 'Noord-Korea', + 'MP' => 'Noordelijke Marianeneilanden', + 'NO' => 'Noorwegen', + 'NF' => 'Norfolkeiland', + 'UG' => 'Oeganda', + 'UA' => 'Oekraïne', + 'UZ' => 'Oezbekistan', + 'OM' => 'Oman', + 'ZZ' => 'Onbekend of onjuist gebied', + 'TL' => 'Oost-Timor', + 'AT' => 'Oostenrijk', + 'PK' => 'Pakistan', + 'PW' => 'Palau', + 'PS' => 'Palestijns Gebied', + 'PA' => 'Panama', + 'PG' => 'Papoea-Nieuw-Guinea', + 'PY' => 'Paraguay', + 'PE' => 'Peru', + 'PN' => 'Pitcairn', + 'PL' => 'Polen', + 'PT' => 'Portugal', + 'PR' => 'Puerto Rico', + 'QA' => 'Qatar', + 'RO' => 'Roemenië', + 'RU' => 'Rusland', + 'RW' => 'Rwanda', + 'RE' => 'Réunion', + 'BL' => 'Saint Barthélemy', + 'KN' => 'Saint Kitts en Nevis', + 'LC' => 'Saint Lucia', + 'PM' => 'Saint Pierre en Miquelon', + 'VC' => 'Saint Vincent en de Grenadines', + 'SB' => 'Salomonseilanden', + 'WS' => 'Samoa', + 'SM' => 'San Marino', + 'ST' => 'Sao Tomé en Principe', + 'SA' => 'Saoedi-Arabië', + 'SN' => 'Senegal', + 'RS' => 'Servië', + 'CS' => 'Servië en Montenegro', + 'SC' => 'Seychellen', + 'SL' => 'Sierra Leone', + 'SG' => 'Singapore', + 'SH' => 'Sint-Helena', + 'MF' => 'Sint-Maarten', + 'SI' => 'Slovenië', + 'SK' => 'Slowakije', + 'SD' => 'Soedan', + 'SO' => 'Somalië', + 'ES' => 'Spanje', + 'LK' => 'Sri Lanka', + 'SR' => 'Suriname', + 'SJ' => 'Svalbard en Jan Mayen', + 'SZ' => 'Swaziland', + 'SY' => 'Syrië', + 'TJ' => 'Tadzjikistan', + 'TW' => 'Taiwan', + 'TZ' => 'Tanzania', + 'TH' => 'Thailand', + 'TG' => 'Togo', + 'TK' => 'Tokelau', + 'TO' => 'Tonga', + 'TT' => 'Trinidad en Tobago', + 'TD' => 'Tsjaad', + 'CZ' => 'Tsjechië', + 'TN' => 'Tunesië', + 'TR' => 'Turkije', + 'TM' => 'Turkmenistan', + 'TC' => 'Turks- en Caicoseilanden', + 'TV' => 'Tuvalu', + 'UY' => 'Uruguay', + 'VU' => 'Vanuatu', + 'VA' => 'Vaticaanstad', + 'VE' => 'Venezuela', + 'GB' => 'Verenigd Koninkrijk', + 'AE' => 'Verenigde Arabische Emiraten', + 'US' => 'Verenigde Staten', + 'VN' => 'Vietnam', + 'WF' => 'Wallis en Futuna', + 'EH' => 'Westelijke Sahara', + 'BY' => 'Wit-Rusland', + 'ZM' => 'Zambia', + 'ZW' => 'Zimbabwe', + 'ZA' => 'Zuid-Afrika', + 'GS' => 'Zuid-Georgië en Zuidelijke Sandwicheilanden', + 'KR' => 'Zuid-Korea', + 'SE' => 'Zweden', + 'CH' => 'Zwitserland', +); diff --git a/application/helpers/country-list/no/country.php b/application/helpers/country-list/no/country.php new file mode 100644 index 0000000..34b59a0 --- /dev/null +++ b/application/helpers/country-list/no/country.php @@ -0,0 +1,250 @@ + 'Afghanistan', + 'AL' => 'Albania', + 'DZ' => 'Algerie', + 'AS' => 'Amerikansk Samoa', + 'AD' => 'Andorra', + 'AO' => 'Angola', + 'AI' => 'Anguilla', + 'AQ' => 'Antarktis', + 'AG' => 'Antigua og Barbuda', + 'AR' => 'Argentina', + 'AM' => 'Armenia', + 'AW' => 'Aruba', + 'AZ' => 'Aserbajdsjan', + 'AU' => 'Australia', + 'BS' => 'Bahamas', + 'BH' => 'Bahrain', + 'BD' => 'Bangladesh', + 'BB' => 'Barbados', + 'BE' => 'Belgia', + 'BZ' => 'Belize', + 'BJ' => 'Benin', + 'BM' => 'Bermuda', + 'BT' => 'Bhutan', + 'BO' => 'Bolivia', + 'BA' => 'Bosnia-Hercegovina', + 'BW' => 'Botswana', + 'BV' => 'Bouvetøya', + 'BR' => 'Brasil', + 'IO' => 'Britiske territorier i Indiahavet', + 'BN' => 'Brunei Darussalam', + 'BG' => 'Bulgaria', + 'BF' => 'Burkina Faso', + 'BI' => 'Burundi', + 'CA' => 'Canada', + 'KY' => 'Caymanøyene', + 'CL' => 'Chile', + 'CX' => 'Christmasøya', + 'CO' => 'Colombia', + 'CK' => 'Cookøyene', + 'CR' => 'Costa Rica', + 'CU' => 'Cuba', + 'DK' => 'Danmark', + 'VI' => 'De amerikanske jomfruøyene', + 'VG' => 'De britiske jomfruøyene', + 'AE' => 'De forente arabiske emirater', + 'TF' => 'De franske sørterritorier', + 'AN' => 'De nederlandske antiller', + 'DO' => 'Den dominikanske republikk', + 'CF' => 'Den sentralafrikanske republikk', + 'DJ' => 'Djibouti', + 'DM' => 'Dominica', + 'EC' => 'Ecuador', + 'EG' => 'Egypt', + 'GQ' => 'Ekvatorial-Guinea', + 'SV' => 'El Salvador', + 'CI' => 'Elfenbenskysten', + 'ER' => 'Eritrea', + 'EE' => 'Estland', + 'ET' => 'Etiopia', + 'FK' => 'Falklandsøyene', + 'FJ' => 'Fiji', + 'PH' => 'Filippinene', + 'FI' => 'Finland', + 'FR' => 'Frankrike', + 'GF' => 'Fransk Guyana', + 'PF' => 'Fransk Polynesia', + 'FO' => 'Færøyene', + 'GA' => 'Gabon', + 'GM' => 'Gambia', + 'GE' => 'Georgia', + 'GH' => 'Ghana', + 'GI' => 'Gibraltar', + 'GD' => 'Grenada', + 'GL' => 'Grønland', + 'GP' => 'Guadeloupe', + 'GU' => 'Guam', + 'GT' => 'Guatemala', + 'GG' => 'Guernsey', + 'GN' => 'Guinea', + 'GW' => 'Guinea-Bissau', + 'GY' => 'Guyana', + 'HT' => 'Haiti', + 'HM' => 'Heardøya og McDonaldøyene', + 'GR' => 'Hellas', + 'HN' => 'Honduras', + 'HK' => 'Hongkong S.A.R. Kina', + 'BY' => 'Hviterussland', + 'IN' => 'India', + 'ID' => 'Indonesia', + 'IQ' => 'Irak', + 'IR' => 'Iran', + 'IE' => 'Irland', + 'IS' => 'Island', + 'IL' => 'Israel', + 'IT' => 'Italia', + 'JM' => 'Jamaica', + 'JP' => 'Japan', + 'YE' => 'Jemen', + 'JE' => 'Jersey', + 'JO' => 'Jordan', + 'KH' => 'Kambodsja', + 'CM' => 'Kamerun', + 'CV' => 'Kapp Verde', + 'KZ' => 'Kasakhstan', + 'KE' => 'Kenya', + 'CN' => 'Kina', + 'KG' => 'Kirgisistan', + 'KI' => 'Kiribati', + 'CC' => 'Kokosøyene', + 'KM' => 'Komorene', + 'CG' => 'Kongo-Brazzaville', + 'CD' => 'Kongo-Kinshasa', + 'HR' => 'Kroatia', + 'KW' => 'Kuwait', + 'CY' => 'Kypros', + 'LA' => 'Laos', + 'LV' => 'Latvia', + 'LS' => 'Lesotho', + 'LB' => 'Libanon', + 'LR' => 'Liberia', + 'LY' => 'Libya', + 'LI' => 'Liechtenstein', + 'LT' => 'Litauen', + 'LU' => 'Luxembourg', + 'MO' => 'Macao S.A.R. Kina', + 'MG' => 'Madagaskar', + 'MK' => 'Makedonia', + 'MW' => 'Malawi', + 'MY' => 'Malaysia', + 'MV' => 'Maldivene', + 'ML' => 'Mali', + 'MT' => 'Malta', + 'IM' => 'Man', + 'MA' => 'Marokko', + 'MH' => 'Marshalløyene', + 'MQ' => 'Martinique', + 'MR' => 'Mauritania', + 'MU' => 'Mauritius', + 'YT' => 'Mayotte', + 'MX' => 'Mexico', + 'FM' => 'Mikronesiaføderasjonen', + 'MD' => 'Moldova', + 'MC' => 'Monaco', + 'MN' => 'Mongolia', + 'ME' => 'Montenegro', + 'MS' => 'Montserrat', + 'MZ' => 'Mosambik', + 'MM' => 'Myanmar', + 'NA' => 'Namibia', + 'NR' => 'Nauru', + 'NL' => 'Nederland', + 'NP' => 'Nepal', + 'NZ' => 'New Zealand', + 'NI' => 'Nicaragua', + 'NE' => 'Niger', + 'NG' => 'Nigeria', + 'NU' => 'Niue', + 'KP' => 'Nord-Korea', + 'MP' => 'Nord-Marianene', + 'NF' => 'Norfolkøya', + 'NO' => 'Norge', + 'NC' => 'Ny-Caledonia', + 'OM' => 'Oman', + 'PK' => 'Pakistan', + 'PW' => 'Palau', + 'PS' => 'Palestinsk territorium', + 'PA' => 'Panama', + 'PG' => 'Papua Ny-Guinea', + 'PY' => 'Paraguay', + 'PE' => 'Peru', + 'PN' => 'Pitcairn', + 'PL' => 'Polen', + 'PT' => 'Portugal', + 'PR' => 'Puerto Rico', + 'QA' => 'Qatar', + 'RE' => 'Reunion', + 'RO' => 'Romania', + 'RU' => 'Russland', + 'RW' => 'Rwanda', + 'BL' => 'Saint Barthélemy', + 'MF' => 'Saint Martin', + 'SB' => 'Salomonøyene', + 'WS' => 'Samoa', + 'SM' => 'San Marino', + 'SA' => 'Saudi-Arabia', + 'SN' => 'Senegal', + 'RS' => 'Serbia', + 'CS' => 'Serbia og Montenegro', + 'SC' => 'Seychellene', + 'SL' => 'Sierra Leone', + 'SG' => 'Singapore', + 'SK' => 'Slovakia', + 'SI' => 'Slovenia', + 'SO' => 'Somalia', + 'ES' => 'Spania', + 'LK' => 'Sri Lanka', + 'SH' => 'St. Helena', + 'KN' => 'St. Kitts og Nevis', + 'LC' => 'St. Lucia', + 'PM' => 'St. Pierre og Miquelon', + 'VC' => 'St. Vincent og Grenadinene', + 'GB' => 'Storbritannia', + 'SD' => 'Sudan', + 'SR' => 'Surinam', + 'SJ' => 'Svalbard og Jan Mayen', + 'CH' => 'Sveits', + 'SE' => 'Sverige', + 'SZ' => 'Swaziland', + 'SY' => 'Syria', + 'ST' => 'São Tomé og Príncipe', + 'ZA' => 'Sør-Afrika', + 'GS' => 'Sør-Georgia og de sørlige Sandwich-øyene', + 'KR' => 'Sør-Korea', + 'TJ' => 'Tadsjikistan', + 'TW' => 'Taiwan', + 'TZ' => 'Tanzania', + 'TH' => 'Thailand', + 'TG' => 'Togo', + 'TK' => 'Tokelau', + 'TO' => 'Tonga', + 'TT' => 'Trinidad og Tobago', + 'TD' => 'Tsjad', + 'CZ' => 'Tsjekkia', + 'TN' => 'Tunisia', + 'TM' => 'Turkmenistan', + 'TC' => 'Turks- og Caicosøyene', + 'TV' => 'Tuvalu', + 'TR' => 'Tyrkia', + 'DE' => 'Tyskland', + 'US' => 'USA', + 'UM' => 'USAs ytre småøyer', + 'UG' => 'Uganda', + 'UA' => 'Ukraina', + 'HU' => 'Ungarn', + 'UY' => 'Uruguay', + 'UZ' => 'Usbekistan', + 'VU' => 'Vanuatu', + 'VA' => 'Vatikanstaten', + 'VE' => 'Venezuela', + 'EH' => 'Vest-Sahara', + 'VN' => 'Vietnam', + 'WF' => 'Wallis og Futuna', + 'ZM' => 'Zambia', + 'ZW' => 'Zimbabwe', + 'ZZ' => 'ukjent eller ugyldig område', + 'AX' => 'Åland', + 'TL' => 'Øst-Timor', + 'AT' => 'Østerrike', +); diff --git a/application/helpers/country-list/pl/country.php b/application/helpers/country-list/pl/country.php new file mode 100644 index 0000000..c308872 --- /dev/null +++ b/application/helpers/country-list/pl/country.php @@ -0,0 +1,250 @@ + 'Afganistan', + 'AL' => 'Albania', + 'DZ' => 'Algieria', + 'AD' => 'Andora', + 'AO' => 'Angola', + 'AI' => 'Anguilla', + 'AQ' => 'Antarktyka', + 'AG' => 'Antigua i Barbuda', + 'AN' => 'Antyle Holenderskie', + 'SA' => 'Arabia Saudyjska', + 'AR' => 'Argentyna', + 'AM' => 'Armenia', + 'AW' => 'Aruba', + 'AU' => 'Australia', + 'AT' => 'Austria', + 'AZ' => 'Azerbejdżan', + 'BS' => 'Bahamy', + 'BH' => 'Bahrajn', + 'BD' => 'Bangladesz', + 'BB' => 'Barbados', + 'BE' => 'Belgia', + 'BZ' => 'Belize', + 'BJ' => 'Benin', + 'BM' => 'Bermudy', + 'BT' => 'Bhutan', + 'BY' => 'Białoruś', + 'MM' => 'Birma', + 'BO' => 'Boliwia', + 'BW' => 'Botswana', + 'BA' => 'Bośnia i Hercegowina', + 'BR' => 'Brazylia', + 'BN' => 'Brunei Darussalam', + 'VG' => 'Brytyjskie Wyspy Dziewicze', + 'BF' => 'Burkina Faso', + 'BI' => 'Burundi', + 'BG' => 'Bułgaria', + 'CL' => 'Chile', + 'CN' => 'Chiny', + 'HR' => 'Chorwacja', + 'CY' => 'Cypr', + 'TD' => 'Czad', + 'ME' => 'Czarnogóra', + 'CZ' => 'Czechy', + 'UM' => 'Dalekie Wyspy Mniejsze Stanów Zjednoczonych', + 'DK' => 'Dania', + 'CD' => 'Demokratyczna Republika Konga', + 'DM' => 'Dominika', + 'DJ' => 'Dżibuti', + 'EG' => 'Egipt', + 'EC' => 'Ekwador', + 'ER' => 'Erytrea', + 'EE' => 'Estonia', + 'ET' => 'Etiopia', + 'FK' => 'Falklandy', + 'FM' => 'Federalne Stany Mikronezji', + 'FJ' => 'Fidżi', + 'PH' => 'Filipiny', + 'FI' => 'Finlandia', + 'FR' => 'Francja', + 'TF' => 'Francuskie Terytoria Południowe', + 'GA' => 'Gabon', + 'GM' => 'Gambia', + 'GS' => 'Georgia Południowa i Sandwich Południowy', + 'GH' => 'Ghana', + 'GI' => 'Gibraltar', + 'GR' => 'Grecja', + 'GD' => 'Grenada', + 'GL' => 'Grenlandia', + 'GE' => 'Gruzja', + 'GU' => 'Guam', + 'GY' => 'Gujana', + 'GF' => 'Gujana Francuska', + 'GP' => 'Gwadelupa', + 'GT' => 'Gwatemala', + 'GN' => 'Gwinea', + 'GW' => 'Gwinea Bissau', + 'GQ' => 'Gwinea Równikowa', + 'HT' => 'Haiti', + 'ES' => 'Hiszpania', + 'NL' => 'Holandia', + 'HN' => 'Honduras', + 'HK' => 'Hongkong, Specjalny Region Administracyjny Chin', + 'IN' => 'Indie', + 'ID' => 'Indonezja', + 'IQ' => 'Irak', + 'IR' => 'Iran', + 'IE' => 'Irlandia', + 'IS' => 'Islandia', + 'IL' => 'Izrael', + 'JM' => 'Jamajka', + 'JP' => 'Japonia', + 'YE' => 'Jemen', + 'JO' => 'Jordania', + 'KY' => 'Kajmany', + 'KH' => 'Kambodża', + 'CM' => 'Kamerun', + 'CA' => 'Kanada', + 'QA' => 'Katar', + 'KZ' => 'Kazachstan', + 'KE' => 'Kenia', + 'KG' => 'Kirgistan', + 'KI' => 'Kiribati', + 'CO' => 'Kolumbia', + 'KM' => 'Komory', + 'CG' => 'Kongo', + 'KR' => 'Korea Południowa', + 'KP' => 'Korea Północna', + 'CR' => 'Kostaryka', + 'CU' => 'Kuba', + 'KW' => 'Kuwejt', + 'LA' => 'Laos', + 'LS' => 'Lesotho', + 'LB' => 'Liban', + 'LR' => 'Liberia', + 'LY' => 'Libia', + 'LI' => 'Liechtenstein', + 'LT' => 'Litwa', + 'LU' => 'Luksemburg', + 'MK' => 'Macedonia', + 'MG' => 'Madagaskar', + 'YT' => 'Majotta', + 'MO' => 'Makau, Specjalny Region Administracyjny Chin', + 'MW' => 'Malawi', + 'MV' => 'Malediwy', + 'MY' => 'Malezja', + 'ML' => 'Mali', + 'MT' => 'Malta', + 'MP' => 'Mariany Północne', + 'MA' => 'Maroko', + 'MQ' => 'Martynika', + 'MR' => 'Mauretania', + 'MU' => 'Mauritius', + 'MX' => 'Meksyk', + 'MC' => 'Monako', + 'MN' => 'Mongolia', + 'MS' => 'Montserrat', + 'MZ' => 'Mozambik', + 'MD' => 'Mołdawia', + 'NA' => 'Namibia', + 'NR' => 'Nauru', + 'NP' => 'Nepal', + 'DE' => 'Niemcy', + 'ZZ' => 'Nieznany lub nieprawidłowy region', + 'NE' => 'Niger', + 'NG' => 'Nigeria', + 'NI' => 'Nikaragua', + 'NU' => 'Niue', + 'NF' => 'Norfolk', + 'NO' => 'Norwegia', + 'NC' => 'Nowa Kaledonia', + 'NZ' => 'Nowa Zelandia', + 'OM' => 'Oman', + 'PK' => 'Pakistan', + 'PW' => 'Palau', + 'PA' => 'Panama', + 'PG' => 'Papua Nowa Gwinea', + 'PY' => 'Paragwaj', + 'PE' => 'Peru', + 'PN' => 'Pitcairn', + 'PF' => 'Polinezja Francuska', + 'PL' => 'Polska', + 'PR' => 'Portoryko', + 'PT' => 'Portugalia', + 'DO' => 'Republika Dominikańska', + 'ZA' => 'Republika Południowej Afryki', + 'CV' => 'Republika Zielonego Przylądka', + 'CF' => 'Republika Środkowoafrykańska', + 'RE' => 'Reunion', + 'RU' => 'Rosja', + 'RO' => 'Rumunia', + 'RW' => 'Rwanda', + 'EH' => 'Sahara Zachodnia', + 'BL' => 'Saint Barthélemy', + 'KN' => 'Saint Kitts i Nevis', + 'LC' => 'Saint Lucia', + 'VC' => 'Saint Vincent i Grenadyny', + 'PM' => 'Saint-Pierre i Miquelon', + 'SV' => 'Salwador', + 'WS' => 'Samoa', + 'AS' => 'Samoa Amerykańskie', + 'SM' => 'San Marino', + 'SN' => 'Senegal', + 'RS' => 'Serbia', + 'CS' => 'Serbia i Czarnogóra', + 'SC' => 'Seszele', + 'SL' => 'Sierra Leone', + 'SG' => 'Singapur', + 'MF' => 'Sint Maarten', + 'SO' => 'Somalia', + 'LK' => 'Sri Lanka', + 'US' => 'Stany Zjednoczone', + 'SZ' => 'Suazi', + 'SD' => 'Sudan', + 'SR' => 'Surinam', + 'SJ' => 'Svalbard i Jan Mayen', + 'SY' => 'Syria', + 'CH' => 'Szwajcaria', + 'SE' => 'Szwecja', + 'SK' => 'Słowacja', + 'SI' => 'Słowenia', + 'TJ' => 'Tadżykistan', + 'TH' => 'Tajlandia', + 'TW' => 'Tajwan', + 'TZ' => 'Tanzania', + 'PS' => 'Terytoria Palestyńskie', + 'IO' => 'Terytorium Brytyjskie Oceanu Indyjskiego', + 'TL' => 'Timor Wschodni', + 'TG' => 'Togo', + 'TK' => 'Tokelau', + 'TO' => 'Tonga', + 'TT' => 'Trynidad i Tobago', + 'TN' => 'Tunezja', + 'TR' => 'Turcja', + 'TM' => 'Turkmenistan', + 'TC' => 'Turks i Caicos', + 'TV' => 'Tuvalu', + 'UG' => 'Uganda', + 'UA' => 'Ukraina', + 'UY' => 'Urugwaj', + 'UZ' => 'Uzbekistan', + 'VU' => 'Vanuatu', + 'WF' => 'Wallis i Futuna', + 'VA' => 'Watykan', + 'VE' => 'Wenezuela', + 'GB' => 'Wielka Brytania', + 'VN' => 'Wietnam', + 'CI' => 'Wybrzeże Kości Słoniowej', + 'BV' => 'Wyspa Bouveta', + 'CX' => 'Wyspa Bożego Narodzenia', + 'GG' => 'Wyspa Guernsey', + 'JE' => 'Wyspa Jersey', + 'IM' => 'Wyspa Man', + 'SH' => 'Wyspa Świętej Heleny', + 'AX' => 'Wyspy Alandzkie', + 'CK' => 'Wyspy Cooka', + 'VI' => 'Wyspy Dziewicze Stanów Zjednoczonych', + 'HM' => 'Wyspy Heard i McDonalda', + 'CC' => 'Wyspy Kokosowe', + 'MH' => 'Wyspy Marshalla', + 'FO' => 'Wyspy Owcze', + 'SB' => 'Wyspy Salomona', + 'ST' => 'Wyspy Świętego Tomasza i Książęca', + 'HU' => 'Węgry', + 'IT' => 'Włochy', + 'ZM' => 'Zambia', + 'ZW' => 'Zimbabwe', + 'AE' => 'Zjednoczone Emiraty Arabskie', + 'LV' => 'Łotwa', +); diff --git a/application/helpers/country-list/pt_BR/country.php b/application/helpers/country-list/pt_BR/country.php new file mode 100644 index 0000000..d96b86d --- /dev/null +++ b/application/helpers/country-list/pt_BR/country.php @@ -0,0 +1,250 @@ + 'Afeganistão', + 'AL' => 'Albânia', + 'DE' => 'Alemanha', + 'AD' => 'Andorra', + 'AO' => 'Angola', + 'AI' => 'Anguilla', + 'AN' => 'Antilhas Holandesas', + 'AQ' => 'Antártida', + 'AG' => 'Antígua e Barbuda', + 'AR' => 'Argentina', + 'DZ' => 'Argélia', + 'AM' => 'Armênia', + 'AW' => 'Aruba', + 'SA' => 'Arábia Saudita', + 'AU' => 'Austrália', + 'AZ' => 'Azerbaijão', + 'BS' => 'Bahamas', + 'BH' => 'Bahrain', + 'BD' => 'Bangladesh', + 'BB' => 'Barbados', + 'BY' => 'Belarus', + 'BZ' => 'Belize', + 'BJ' => 'Benin', + 'BM' => 'Bermudas', + 'BO' => 'Bolívia', + 'BW' => 'Botsuana', + 'BR' => 'Brasil', + 'BN' => 'Brunei', + 'BG' => 'Bulgária', + 'BF' => 'Burquina Faso', + 'BI' => 'Burundi', + 'BT' => 'Butão', + 'BE' => 'Bélgica', + 'BA' => 'Bósnia-Herzegovina', + 'CV' => 'Cabo Verde', + 'KH' => 'Camboja', + 'CA' => 'Canadá', + 'KZ' => 'Casaquistão', + 'QA' => 'Catar', + 'TD' => 'Chade', + 'CL' => 'Chile', + 'CN' => 'China', + 'CY' => 'Chipre', + 'SG' => 'Cingapura', + 'CO' => 'Colômbia', + 'KM' => 'Comores', + 'CG' => 'Congo', + 'CD' => 'Congo-Kinshasa', + 'KP' => 'Coreia do Norte', + 'KR' => 'Coreia do Sul', + 'CR' => 'Costa Rica', + 'CI' => 'Costa do Marfim', + 'HR' => 'Croácia', + 'CU' => 'Cuba', + 'DK' => 'Dinamarca', + 'DJ' => 'Djibuti', + 'DM' => 'Dominica', + 'EG' => 'Egito', + 'SV' => 'El Salvador', + 'AE' => 'Emirados Árabes Unidos', + 'EC' => 'Equador', + 'ER' => 'Eritreia', + 'SK' => 'Eslováquia', + 'SI' => 'Eslovênia', + 'ES' => 'Espanha', + 'US' => 'Estados Unidos', + 'EE' => 'Estônia', + 'ET' => 'Etiópia', + 'FJ' => 'Fiji', + 'PH' => 'Filipinas', + 'FI' => 'Finlândia', + 'FR' => 'França', + 'GA' => 'Gabão', + 'GH' => 'Gana', + 'GE' => 'Geórgia', + 'GS' => 'Geórgia do Sul e Ilhas Sandwich do Sul', + 'GI' => 'Gibraltar', + 'GD' => 'Granada', + 'GL' => 'Groênlandia', + 'GR' => 'Grécia', + 'GP' => 'Guadalupe', + 'GU' => 'Guam', + 'GT' => 'Guatemala', + 'GG' => 'Guernsey', + 'GY' => 'Guiana', + 'GF' => 'Guiana Francesa', + 'GN' => 'Guiné', + 'GW' => 'Guiné Bissau', + 'GQ' => 'Guiné Equatorial', + 'GM' => 'Gâmbia', + 'HT' => 'Haiti', + 'NL' => 'Holanda', + 'HN' => 'Honduras', + 'HK' => 'Hong Kong, Região Admin. Especial da China', + 'HU' => 'Hungria', + 'BV' => 'Ilha Bouvet', + 'HM' => 'Ilha Heard e Ilhas McDonald', + 'NF' => 'Ilha Norfolk', + 'IM' => 'Ilha de Man', + 'AX' => 'Ilhas Aland', + 'KY' => 'Ilhas Caiman', + 'CC' => 'Ilhas Coco', + 'CK' => 'Ilhas Cook', + 'FO' => 'Ilhas Faroe', + 'FK' => 'Ilhas Malvinas', + 'MP' => 'Ilhas Marianas do Norte', + 'MH' => 'Ilhas Marshall', + 'UM' => 'Ilhas Menores Distantes dos Estados Unidos', + 'CX' => 'Ilhas Natal', + 'SB' => 'Ilhas Salomão', + 'TC' => 'Ilhas Turks e Caicos', + 'VG' => 'Ilhas Virgens Britânicas', + 'VI' => 'Ilhas Virgens dos EUA', + 'ID' => 'Indonésia', + 'IQ' => 'Iraque', + 'IE' => 'Irlanda', + 'IR' => 'Irã', + 'IS' => 'Islândia', + 'IL' => 'Israel', + 'IT' => 'Itália', + 'YE' => 'Iêmen', + 'JM' => 'Jamaica', + 'JP' => 'Japão', + 'JE' => 'Jersey', + 'JO' => 'Jordânia', + 'KW' => 'Kuwait', + 'LS' => 'Lesoto', + 'LV' => 'Letônia', + 'LR' => 'Libéria', + 'LI' => 'Liechtenstein', + 'LT' => 'Lituânia', + 'LU' => 'Luxemburgo', + 'LB' => 'Líbano', + 'LY' => 'Líbia', + 'MO' => 'Macau, Região Admin. Especial da China', + 'MK' => 'Macedônia', + 'MG' => 'Madagascar', + 'MW' => 'Malawi', + 'MV' => 'Maldivas', + 'ML' => 'Mali', + 'MT' => 'Malta', + 'MY' => 'Malásia', + 'MA' => 'Marrocos', + 'MQ' => 'Martinica', + 'MR' => 'Mauritânia', + 'MU' => 'Maurício', + 'YT' => 'Mayotte', + 'MM' => 'Mianmar', + 'FM' => 'Micronésia', + 'MD' => 'Moldávia', + 'MN' => 'Mongólia', + 'ME' => 'Montenegro', + 'MS' => 'Montserrat', + 'MZ' => 'Moçambique', + 'MX' => 'México', + 'MC' => 'Mônaco', + 'NA' => 'Namíbia', + 'NR' => 'Nauru', + 'NP' => 'Nepal', + 'NI' => 'Nicarágua', + 'NG' => 'Nigéria', + 'NU' => 'Niue', + 'NO' => 'Noruega', + 'NC' => 'Nova Caledônia', + 'NZ' => 'Nova Zelândia', + 'NE' => 'Níger', + 'OM' => 'Omã', + 'PW' => 'Palau', + 'PA' => 'Panamá', + 'PG' => 'Papua-Nova Guiné', + 'PK' => 'Paquistão', + 'PY' => 'Paraguai', + 'PE' => 'Peru', + 'PN' => 'Pitcairn', + 'PF' => 'Polinésia Francesa', + 'PL' => 'Polônia', + 'PR' => 'Porto Rico', + 'PT' => 'Portugal', + 'KG' => 'Quirguistão', + 'KI' => 'Quiribati', + 'KE' => 'Quênia', + 'ZZ' => 'Região desconhecida ou inválida', + 'GB' => 'Reino Unido', + 'CF' => 'República Centro-Africana', + 'DO' => 'República Dominicana', + 'LA' => 'República Popular Democrática do Laos', + 'CZ' => 'República Tcheca', + 'CM' => 'República dos Camarões', + 'RE' => 'Reunião', + 'RO' => 'Romênia', + 'RW' => 'Ruanda', + 'RU' => 'Rússia', + 'EH' => 'Saara Ocidental', + 'PM' => 'Saint Pierre e Miquelon', + 'WS' => 'Samoa', + 'AS' => 'Samoa Americana', + 'SM' => 'San Marino', + 'SH' => 'Santa Helena', + 'LC' => 'Santa Lúcia', + 'SN' => 'Senegal', + 'SL' => 'Serra Leoa', + 'SC' => 'Seychelles', + 'SO' => 'Somália', + 'LK' => 'Sri Lanka', + 'SZ' => 'Suazilândia', + 'SD' => 'Sudão', + 'SR' => 'Suriname', + 'SE' => 'Suécia', + 'CH' => 'Suíça', + 'SJ' => 'Svalbard e Jan Mayen', + 'BL' => 'São Bartolomeu', + 'KN' => 'São Cristovão e Nevis', + 'MF' => 'São Martinho', + 'ST' => 'São Tomé e Príncipe', + 'VC' => 'São Vicente e Granadinas', + 'RS' => 'Sérvia', + 'CS' => 'Sérvia e Montenegro', + 'SY' => 'Síria', + 'TJ' => 'Tadjiquistão', + 'TH' => 'Tailândia', + 'TW' => 'Taiwan', + 'TZ' => 'Tanzânia', + 'IO' => 'Território Britânico do Oceano Índico', + 'PS' => 'Território da Palestina', + 'TF' => 'Territórios Franceses do Sul', + 'TL' => 'Timor Leste', + 'TG' => 'Togo', + 'TK' => 'Tokelau', + 'TO' => 'Tonga', + 'TT' => 'Trinidad e Tobago', + 'TN' => 'Tunísia', + 'TM' => 'Turcomenistão', + 'TR' => 'Turquia', + 'TV' => 'Tuvalu', + 'UA' => 'Ucrânia', + 'UG' => 'Uganda', + 'UY' => 'Uruguai', + 'UZ' => 'Uzbequistão', + 'VU' => 'Vanuatu', + 'VA' => 'Vaticano', + 'VE' => 'Venezuela', + 'VN' => 'Vietnã', + 'WF' => 'Wallis e Futuna', + 'ZW' => 'Zimbábue', + 'ZM' => 'Zâmbia', + 'ZA' => 'África do Sul', + 'AT' => 'Áustria', + 'IN' => 'Índia', +); diff --git a/application/helpers/country-list/pt_PT/country.php b/application/helpers/country-list/pt_PT/country.php new file mode 100644 index 0000000..68c2b39 --- /dev/null +++ b/application/helpers/country-list/pt_PT/country.php @@ -0,0 +1,250 @@ + 'Afeganistão', + 'AL' => 'Albânia', + 'DE' => 'Alemanha', + 'AD' => 'Andorra', + 'AO' => 'Angola', + 'AI' => 'Anguilha', + 'AN' => 'Antilhas Holandesas', + 'AQ' => 'Antárctica', + 'AG' => 'Antígua e Barbuda', + 'AR' => 'Argentina', + 'DZ' => 'Argélia', + 'AM' => 'Arménia', + 'AW' => 'Aruba', + 'SA' => 'Arábia Saudita', + 'AU' => 'Austrália', + 'AZ' => 'Azerbeijão', + 'BS' => 'Baamas', + 'BH' => 'Bahrein', + 'BD' => 'Bangladeche', + 'BB' => 'Barbados', + 'BZ' => 'Belize', + 'BJ' => 'Benim', + 'BM' => 'Bermudas', + 'BY' => 'Bielorrússia', + 'BO' => 'Bolívia', + 'BW' => 'Botswana', + 'BR' => 'Brasil', + 'BN' => 'Brunei', + 'BG' => 'Bulgária', + 'BF' => 'Burkina-Faso', + 'BI' => 'Burundi', + 'BT' => 'Butão', + 'BE' => 'Bélgica', + 'BA' => 'Bósnia-Herzegovina', + 'CV' => 'Cabo Verde', + 'KH' => 'Camboja', + 'CA' => 'Canadá', + 'KZ' => 'Cazaquistão', + 'TD' => 'Chade', + 'CL' => 'Chile', + 'CN' => 'China', + 'CY' => 'Chipre', + 'CO' => 'Colômbia', + 'KM' => 'Comores', + 'CG' => 'Congo-Brazzaville', + 'KP' => 'Coreia do Norte', + 'KR' => 'Coreia do Sul', + 'CR' => 'Costa Rica', + 'CI' => 'Costa do Marfim', + 'HR' => 'Croácia', + 'KW' => 'Cuaite', + 'CU' => 'Cuba', + 'DK' => 'Dinamarca', + 'DJ' => 'Djibuti', + 'DM' => 'Dominica', + 'EG' => 'Egipto', + 'SV' => 'El Salvador', + 'AE' => 'Emiratos Árabes Unidos', + 'EC' => 'Equador', + 'ER' => 'Eritreia', + 'SK' => 'Eslováquia', + 'SI' => 'Eslovénia', + 'ES' => 'Espanha', + 'FM' => 'Estados Federados da Micronésia', + 'US' => 'Estados Unidos', + 'EE' => 'Estónia', + 'SJ' => 'Esvalbarda e Jan Mayen', + 'ET' => 'Etiópia', + 'FJ' => 'Fiji', + 'PH' => 'Filipinas', + 'FI' => 'Finlândia', + 'FR' => 'França', + 'GA' => 'Gabão', + 'GH' => 'Gana', + 'GE' => 'Geórgia', + 'GS' => 'Geórgia do Sul e Ilhas Sandwich do Sul', + 'GI' => 'Gibraltar', + 'GD' => 'Granada', + 'GL' => 'Gronelândia', + 'GR' => 'Grécia', + 'GP' => 'Guadalupe', + 'GU' => 'Guam', + 'GT' => 'Guatemala', + 'GG' => 'Guernsey', + 'GY' => 'Guiana', + 'GF' => 'Guiana Francesa', + 'GN' => 'Guiné', + 'GQ' => 'Guiné Equatorial', + 'GW' => 'Guiné-Bissau', + 'GM' => 'Gâmbia', + 'HT' => 'Haiti', + 'HN' => 'Honduras', + 'HK' => 'Hong Kong - Região Administrativa Especial da China', + 'HU' => 'Hungria', + 'BV' => 'Ilha Bouvet', + 'HM' => 'Ilha Heard e Ilhas McDonald', + 'NF' => 'Ilha Norfolque', + 'IM' => 'Ilha de Man', + 'CX' => 'Ilha do Natal', + 'AX' => 'Ilhas Alanda', + 'KY' => 'Ilhas Caimão', + 'CC' => 'Ilhas Cocos', + 'CK' => 'Ilhas Cook', + 'FK' => 'Ilhas Falkland ou Malvinas', + 'FO' => 'Ilhas Faroé', + 'MP' => 'Ilhas Mariana do Norte', + 'MH' => 'Ilhas Marshall', + 'UM' => 'Ilhas Minor Outlying (E.U.A)', + 'SB' => 'Ilhas Salomão', + 'TC' => 'Ilhas Turcas e Caicos', + 'VG' => 'Ilhas Virgens Britânicas', + 'VI' => 'Ilhas Virgin E.U.A.', + 'ID' => 'Indonésia', + 'IQ' => 'Iraque', + 'IE' => 'Irlanda', + 'IR' => 'Irão', + 'IS' => 'Islândia', + 'IL' => 'Israel', + 'IT' => 'Itália', + 'YE' => 'Iémen', + 'JM' => 'Jamaica', + 'JP' => 'Japão', + 'JE' => 'Jersey', + 'JO' => 'Jordânia', + 'LA' => 'Laos, República Popular Democrática do', + 'LS' => 'Lesoto', + 'LV' => 'Letónia', + 'LR' => 'Libéria', + 'LI' => 'Liechtenstein', + 'LT' => 'Lituânia', + 'LU' => 'Luxemburgo', + 'LB' => 'Líbano', + 'LY' => 'Líbia', + 'MO' => 'Macau - Região Administrativa Especial da China', + 'MK' => 'Macedónia, República da', + 'MG' => 'Madagáscar', + 'MW' => 'Malaui', + 'MV' => 'Maldivas', + 'ML' => 'Mali', + 'MT' => 'Malta', + 'MY' => 'Malásia', + 'MA' => 'Marrocos', + 'MQ' => 'Martinica', + 'MR' => 'Mauritânia', + 'MU' => 'Maurícias', + 'YT' => 'Mayotte', + 'MM' => 'Mianmar', + 'MD' => 'Moldávia, República da', + 'MN' => 'Mongólia', + 'MS' => 'Monserrate', + 'ME' => 'Montenegro', + 'MZ' => 'Moçambique', + 'MX' => 'México', + 'MC' => 'Mónaco', + 'NA' => 'Namíbia', + 'NR' => 'Nauru', + 'NP' => 'Nepal', + 'NI' => 'Nicarágua', + 'NG' => 'Nigéria', + 'NU' => 'Niue', + 'NO' => 'Noruega', + 'NC' => 'Nova Caledónia', + 'NZ' => 'Nova Zelândia', + 'NE' => 'Níger', + 'OM' => 'Omã', + 'PW' => 'Palau', + 'PA' => 'Panamá', + 'PG' => 'Papua Nova Guiné', + 'PK' => 'Paquistão', + 'PY' => 'Paraguai', + 'NL' => 'Países Baixos', + 'PE' => 'Peru', + 'PN' => 'Pitcairn', + 'PF' => 'Polinésia Francesa', + 'PL' => 'Polónia', + 'PR' => 'Porto Rico', + 'PT' => 'Portugal', + 'QA' => 'Qatar', + 'KG' => 'Quirguizistão', + 'KI' => 'Quiribati', + 'KE' => 'Quénia', + 'ZZ' => 'Região desconhecida ou inválida', + 'GB' => 'Reino Unido', + 'CF' => 'República Centro-Africana', + 'CZ' => 'República Checa', + 'CD' => 'República Democrática do Congo', + 'DO' => 'República Dominicana', + 'CM' => 'República dos Camarões', + 'RE' => 'Reunião', + 'RO' => 'Roménia', + 'RW' => 'Ruanda', + 'RU' => 'Rússia', + 'KN' => 'Saint Kitts e Nevis', + 'PM' => 'Saint Pierre e Miquelon', + 'WS' => 'Samoa', + 'AS' => 'Samoa Americana', + 'SH' => 'Santa Helena', + 'LC' => 'Santa Lúcia', + 'EH' => 'Sara Ocidental', + 'SC' => 'Seicheles', + 'SN' => 'Senegal', + 'SL' => 'Serra Leoa', + 'SG' => 'Singapura', + 'SO' => 'Somália', + 'LK' => 'Sri Lanka', + 'SZ' => 'Suazilândia', + 'SD' => 'Sudão', + 'SR' => 'Suriname', + 'SE' => 'Suécia', + 'CH' => 'Suíça', + 'BL' => 'São Bartolomeu', + 'SM' => 'São Marino', + 'MF' => 'São Martinho', + 'ST' => 'São Tomé e Príncipe', + 'VC' => 'São Vicente e Granadinas', + 'RS' => 'Sérvia', + 'CS' => 'Sérvia e Montenegro', + 'SY' => 'Síria', + 'TH' => 'Tailândia', + 'TW' => 'Taiwan', + 'TJ' => 'Tajiquistão', + 'TZ' => 'Tanzânia', + 'IO' => 'Território Britânico do Oceano Índico', + 'PS' => 'Território Palestiniano', + 'TF' => 'Territórios Franceses do Sul', + 'TL' => 'Timor Leste', + 'TG' => 'Togo', + 'TO' => 'Tonga', + 'TK' => 'Toquelau', + 'TT' => 'Trindade e Tobago', + 'TN' => 'Tunísia', + 'TM' => 'Turquemenistão', + 'TR' => 'Turquia', + 'TV' => 'Tuvalu', + 'UA' => 'Ucrânia', + 'UG' => 'Uganda', + 'UY' => 'Uruguai', + 'UZ' => 'Usbequistão', + 'VU' => 'Vanuatu', + 'VA' => 'Vaticano', + 'VE' => 'Venezuela', + 'VN' => 'Vietname', + 'WF' => 'Wallis e Futuna', + 'ZW' => 'Zimbabwe', + 'ZM' => 'Zâmbia', + 'ZA' => 'África do Sul', + 'AT' => 'Áustria', + 'IN' => 'Índia', +); diff --git a/application/helpers/country-list/ro/country.php b/application/helpers/country-list/ro/country.php new file mode 100644 index 0000000..359825f --- /dev/null +++ b/application/helpers/country-list/ro/country.php @@ -0,0 +1,250 @@ + 'Afganistan', + 'ZA' => 'Africa de Sud', + 'AL' => 'Albania', + 'DZ' => 'Algeria', + 'AD' => 'Andorra', + 'AO' => 'Angola', + 'AI' => 'Anguilla', + 'AQ' => 'Antarctica', + 'AG' => 'Antigua și Barbuda', + 'AN' => 'Antilele Olandeze', + 'SA' => 'Arabia Saudită', + 'AR' => 'Argentina', + 'AM' => 'Armenia', + 'AW' => 'Aruba', + 'AU' => 'Australia', + 'AT' => 'Austria', + 'AZ' => 'Azerbaidjan', + 'BS' => 'Bahamas', + 'BH' => 'Bahrain', + 'BD' => 'Bangladesh', + 'BB' => 'Barbados', + 'BE' => 'Belgia', + 'BZ' => 'Belize', + 'BJ' => 'Benin', + 'BM' => 'Bermuda', + 'BT' => 'Bhutan', + 'BY' => 'Bielorusia', + 'BO' => 'Bolivia', + 'BA' => 'Bosnia și Herțegovina', + 'BW' => 'Botswana', + 'BR' => 'Brazilia', + 'BN' => 'Brunei', + 'BG' => 'Bulgaria', + 'BF' => 'Burkina Faso', + 'BI' => 'Burundi', + 'KH' => 'Cambodgia', + 'CM' => 'Camerun', + 'CA' => 'Canada', + 'CV' => 'Capul Verde', + 'CL' => 'Chile', + 'CN' => 'China', + 'TD' => 'Ciad', + 'CY' => 'Cipru', + 'CI' => 'Coasta de Fildeș', + 'CO' => 'Columbia', + 'KM' => 'Comore', + 'CG' => 'Congo', + 'KP' => 'Coreea de Nord', + 'KR' => 'Coreea de Sud', + 'CR' => 'Costa Rica', + 'HR' => 'Croația', + 'CU' => 'Cuba', + 'DK' => 'Danemarca', + 'DJ' => 'Djibouti', + 'DM' => 'Dominica', + 'EC' => 'Ecuador', + 'EG' => 'Egipt', + 'SV' => 'El Salvador', + 'CH' => 'Eleveția', + 'AE' => 'Emiratele Arabe Unite', + 'ER' => 'Eritreea', + 'EE' => 'Estonia', + 'ET' => 'Etiopia', + 'FJ' => 'Fiji', + 'PH' => 'Filipine', + 'FI' => 'Finlanda', + 'FR' => 'Franța', + 'GA' => 'Gabon', + 'GM' => 'Gambia', + 'GE' => 'Georgia', + 'DE' => 'Germania', + 'GH' => 'Ghana', + 'GI' => 'Gibraltar', + 'GR' => 'Grecia', + 'GD' => 'Grenada', + 'GL' => 'Groenlanda', + 'GP' => 'Guadelupa', + 'GU' => 'Guam', + 'GT' => 'Guatemala', + 'GG' => 'Guernsey', + 'GN' => 'Guineea', + 'GQ' => 'Guineea Ecuatorială', + 'GW' => 'Guineea-Bissau', + 'GY' => 'Guyana', + 'GF' => 'Guyana Franceză', + 'HT' => 'Haiti', + 'HN' => 'Honduras', + 'IN' => 'India', + 'ID' => 'Indonezia', + 'BV' => 'Insula Bouvet', + 'CX' => 'Insula Christmas', + 'HM' => 'Insula Heard și Insulele McDonald', + 'IM' => 'Insula Man', + 'AX' => 'Insulele Aland', + 'KY' => 'Insulele Cayman', + 'CC' => 'Insulele Cocos', + 'CK' => 'Insulele Cook', + 'FK' => 'Insulele Falkland', + 'FO' => 'Insulele Feroe', + 'GS' => 'Insulele Georgia de Sud și Sandwich de Sud', + 'MP' => 'Insulele Mariane de Nord', + 'MH' => 'Insulele Marshall', + 'NF' => 'Insulele Norfolk', + 'SB' => 'Insulele Solomon', + 'TC' => 'Insulele Turks și Caicos', + 'VG' => 'Insulele Virgine Britanice', + 'VI' => 'Insulele Virgine S.U.A.', + 'UM' => 'Insulele mici îndepărtate ale Statelor Unite ale Americii', + 'JO' => 'Iordania', + 'IQ' => 'Irak', + 'IR' => 'Iran', + 'IE' => 'Irlanda', + 'IS' => 'Islanda', + 'IL' => 'Israel', + 'IT' => 'Italia', + 'JM' => 'Jamaica', + 'JP' => 'Japonia', + 'JE' => 'Jersey', + 'KZ' => 'Kazahstan', + 'KE' => 'Kenya', + 'KI' => 'Kiribati', + 'KW' => 'Kuweit', + 'KG' => 'Kârgâzstan', + 'LA' => 'Laos', + 'LS' => 'Lesotho', + 'LV' => 'Letonia', + 'LB' => 'Liban', + 'LR' => 'Liberia', + 'LY' => 'Libia', + 'LI' => 'Liechtenstein', + 'LT' => 'Lituania', + 'LU' => 'Luxemburg', + 'MK' => 'Macedonia', + 'MG' => 'Madagascar', + 'MY' => 'Malaezia', + 'MW' => 'Malawi', + 'MV' => 'Maldive', + 'ML' => 'Mali', + 'MT' => 'Malta', + 'GB' => 'Marea Britanie', + 'MA' => 'Maroc', + 'MQ' => 'Martinica', + 'MR' => 'Mauritania', + 'MU' => 'Mauritius', + 'YT' => 'Mayotte', + 'MX' => 'Mexic', + 'FM' => 'Micronezia', + 'MC' => 'Monaco', + 'MN' => 'Mongolia', + 'MS' => 'Montserrat', + 'MZ' => 'Mozambic', + 'ME' => 'Muntenegru', + 'MM' => 'Myanmar', + 'NA' => 'Namibia', + 'NR' => 'Nauru', + 'NP' => 'Nepal', + 'NI' => 'Nicaragua', + 'NE' => 'Niger', + 'NG' => 'Nigeria', + 'NU' => 'Niue', + 'NO' => 'Norvegia', + 'NC' => 'Noua Caledonie', + 'NZ' => 'Noua Zeelandă', + 'NL' => 'Olanda', + 'OM' => 'Oman', + 'PK' => 'Pakistan', + 'PW' => 'Palau', + 'PA' => 'Panama', + 'PG' => 'Papua Noua Guinee', + 'PY' => 'Paraguay', + 'PE' => 'Peru', + 'PN' => 'Pitcairn', + 'PF' => 'Polinezia Franceză', + 'PL' => 'Polonia', + 'PR' => 'Porto Rico', + 'PT' => 'Portugalia', + 'QA' => 'Qatar', + 'HK' => 'R.A.S. Hong Kong a Chinei', + 'MO' => 'R.A.S. Macao a Chinei', + 'ZZ' => 'Regiune necunoscută sau nevalidă', + 'CZ' => 'Republica Cehă', + 'CF' => 'Republica Centrafricană', + 'CD' => 'Republica Democrată Congo', + 'DO' => 'Republica Dominicană', + 'MD' => 'Republica Moldova', + 'RE' => 'Reunion', + 'RO' => 'România', + 'RU' => 'Rusia', + 'RW' => 'Rwanda', + 'EH' => 'Sahara Occidentală', + 'WS' => 'Samoa', + 'AS' => 'Samoa Americană', + 'SM' => 'San Marino', + 'ST' => 'Sao Tome și Principe', + 'SN' => 'Senegal', + 'RS' => 'Serbia', + 'CS' => 'Serbia și Muntenegru', + 'SC' => 'Seychelles', + 'SH' => 'Sfânta Elena', + 'LC' => 'Sfânta Lucia', + 'BL' => 'Sfântul Bartolomeu', + 'KN' => 'Sfântul Kitts și Nevis', + 'MF' => 'Sfântul Martin', + 'PM' => 'Sfântul Pierre și Miquelon', + 'VC' => 'Sfântul Vincent și Grenadine', + 'SL' => 'Sierra Leone', + 'SG' => 'Singapore', + 'SY' => 'Siria', + 'SK' => 'Slovacia', + 'SI' => 'Slovenia', + 'SO' => 'Somalia', + 'ES' => 'Spania', + 'LK' => 'Sri Lanka', + 'US' => 'Statele Unite ale Americii', + 'SD' => 'Sudan', + 'SE' => 'Suedia', + 'SR' => 'Surinam', + 'SJ' => 'Svalbard și Jan Mayen', + 'SZ' => 'Swaziland', + 'TJ' => 'Tadjikistan', + 'TW' => 'Taiwan', + 'TZ' => 'Tanzania', + 'TF' => 'Teritoriile Australe și Antarctice Franceze', + 'IO' => 'Teritoriul Britanic din Oceanul Indian', + 'PS' => 'Teritoriul Palestinian', + 'TH' => 'Thailanda', + 'TL' => 'Timorul de Est', + 'TG' => 'Togo', + 'TK' => 'Tokelau', + 'TO' => 'Tonga', + 'TT' => 'Trinidad-Tobago', + 'TN' => 'Tunisia', + 'TR' => 'Turcia', + 'TM' => 'Turkmenistan', + 'TV' => 'Tuvalu', + 'UA' => 'Ucraina', + 'UG' => 'Uganda', + 'HU' => 'Ungaria', + 'UY' => 'Uruguay', + 'UZ' => 'Uzbekistan', + 'VU' => 'Vanuatu', + 'VA' => 'Vatican', + 'VE' => 'Venezuela', + 'VN' => 'Vietnam', + 'WF' => 'Wallis și Futuna', + 'YE' => 'Yemen', + 'ZM' => 'Zambia', + 'ZW' => 'Zimbabwe', +); diff --git a/application/helpers/country-list/ru/country.php b/application/helpers/country-list/ru/country.php new file mode 100644 index 0000000..7fa44e9 --- /dev/null +++ b/application/helpers/country-list/ru/country.php @@ -0,0 +1,250 @@ + 'Австралия', + 'AT' => 'Австрия', + 'AZ' => 'Азербайджан', + 'AX' => 'Аландские острова', + 'AL' => 'Албания', + 'DZ' => 'Алжир', + 'VI' => 'Американские Виргинские острова', + 'AS' => 'Американское Самоа', + 'AO' => 'Ангола', + 'AI' => 'Ангуилла', + 'AD' => 'Андорра', + 'AQ' => 'Антарктика', + 'AG' => 'Антигуа и Барбуда', + 'AR' => 'Аргентина', + 'AM' => 'Армения', + 'AW' => 'Аруба', + 'AF' => 'Афганистан', + 'BS' => 'Багамские острова', + 'BD' => 'Бангладеш', + 'BB' => 'Барбадос', + 'BH' => 'Бахрейн', + 'BY' => 'Беларусь', + 'BZ' => 'Белиз', + 'BE' => 'Бельгия', + 'BJ' => 'Бенин', + 'BM' => 'Бермудские Острова', + 'BG' => 'Болгария', + 'BO' => 'Боливия', + 'BA' => 'Босния и Герцеговина', + 'BW' => 'Ботсвана', + 'BR' => 'Бразилия', + 'IO' => 'Британская территория в Индийском океане', + 'VG' => 'Британские Виргинские Острова', + 'BN' => 'Бруней Даруссалам', + 'BF' => 'Буркина Фасо', + 'BI' => 'Бурунди', + 'BT' => 'Бутан', + 'VU' => 'Вануату', + 'VA' => 'Ватикан', + 'GB' => 'Великобритания', + 'HU' => 'Венгрия', + 'VE' => 'Венесуэла', + 'UM' => 'Внешние малые острова (США)', + 'TL' => 'Восточный Тимор', + 'VN' => 'Вьетнам', + 'GA' => 'Габон', + 'HT' => 'Гаити', + 'GY' => 'Гайана', + 'GM' => 'Гамбия', + 'GH' => 'Гана', + 'GP' => 'Гваделупа', + 'GT' => 'Гватемала', + 'GN' => 'Гвинея', + 'GW' => 'Гвинея-Биссау', + 'DE' => 'Германия', + 'GG' => 'Гернси', + 'GI' => 'Гибралтар', + 'HN' => 'Гондурас', + 'HK' => 'Гонконг, Особый Административный Район Китая', + 'GD' => 'Гренада', + 'GL' => 'Гренландия', + 'GR' => 'Греция', + 'GE' => 'Грузия', + 'GU' => 'Гуам', + 'DK' => 'Дания', + 'CD' => 'Демократическая Республика Конго', + 'JE' => 'Джерси', + 'DJ' => 'Джибути', + 'DO' => 'Доминиканская Республика', + 'EG' => 'Египет', + 'ZM' => 'Замбия', + 'EH' => 'Западная Сахара', + 'ZW' => 'Зимбабве', + 'IL' => 'Израиль', + 'IN' => 'Индия', + 'ID' => 'Индонезия', + 'JO' => 'Иордания', + 'IQ' => 'Ирак', + 'IR' => 'Иран', + 'IE' => 'Ирландия', + 'IS' => 'Исландия', + 'ES' => 'Испания', + 'IT' => 'Италия', + 'YE' => 'Йемен', + 'KZ' => 'Казахстан', + 'KY' => 'Каймановы острова', + 'KH' => 'Камбоджа', + 'CM' => 'Камерун', + 'CA' => 'Канада', + 'QA' => 'Катар', + 'KE' => 'Кения', + 'CY' => 'Кипр', + 'KI' => 'Кирибати', + 'CN' => 'Китай', + 'CC' => 'Кокосовые острова', + 'CO' => 'Колумбия', + 'KM' => 'Коморские Острова', + 'CG' => 'Конго', + 'KP' => 'Корейская Народно-Демократическая Республика', + 'CR' => 'Коста-Рика', + 'CI' => 'Кот д’Ивуар', + 'CU' => 'Куба', + 'KW' => 'Кувейт', + 'KG' => 'Кыргызстан', + 'LA' => 'Лаос', + 'LV' => 'Латвия', + 'LS' => 'Лесото', + 'LR' => 'Либерия', + 'LB' => 'Ливан', + 'LY' => 'Ливия', + 'LT' => 'Литва', + 'LI' => 'Лихтенштейн', + 'LU' => 'Люксембург', + 'MU' => 'Маврикий', + 'MR' => 'Мавритания', + 'MG' => 'Мадагаскар', + 'YT' => 'Майотта', + 'MO' => 'Макао (особый административный район КНР)', + 'MK' => 'Македония', + 'MW' => 'Малави', + 'MY' => 'Малайзия', + 'ML' => 'Мали', + 'MV' => 'Мальдивы', + 'MT' => 'Мальта', + 'MA' => 'Марокко', + 'MQ' => 'Мартиник', + 'MH' => 'Маршалловы Острова', + 'MX' => 'Мексика', + 'MZ' => 'Мозамбик', + 'MD' => 'Молдова', + 'MC' => 'Монако', + 'MN' => 'Монголия', + 'MS' => 'Монсеррат', + 'MM' => 'Мьянма', + 'NA' => 'Намибия', + 'NR' => 'Науру', + 'ZZ' => 'Неизвестный или недействительный регион', + 'NP' => 'Непал', + 'NE' => 'Нигер', + 'NG' => 'Нигерия', + 'AN' => 'Нидерландские Антильские острова', + 'NL' => 'Нидерланды', + 'NI' => 'Никарагуа', + 'NU' => 'Ниуе', + 'NZ' => 'Новая Зеландия', + 'NC' => 'Новая Каледония', + 'NO' => 'Норвегия', + 'AE' => 'Объединенные Арабские Эмираты', + 'OM' => 'Оман', + 'BV' => 'Остров Буве', + 'DM' => 'Остров Доминика', + 'IM' => 'Остров Мэн', + 'NF' => 'Остров Норфолк', + 'CX' => 'Остров Рождества', + 'BL' => 'Остров Святого Бартоломея', + 'MF' => 'Остров Святого Мартина', + 'SH' => 'Остров Святой Елены', + 'CV' => 'Острова Зеленого Мыса', + 'CK' => 'Острова Кука', + 'TC' => 'Острова Тёркс и Кайкос', + 'HM' => 'Острова Херд и Макдональд', + 'PK' => 'Пакистан', + 'PW' => 'Палау', + 'PS' => 'Палестинская автономия', + 'PA' => 'Панама', + 'PG' => 'Папуа-Новая Гвинея', + 'PY' => 'Парагвай', + 'PE' => 'Перу', + 'PN' => 'Питкерн', + 'PL' => 'Польша', + 'PT' => 'Португалия', + 'PR' => 'Пуэрто-Рико', + 'KR' => 'Республика Корея', + 'RE' => 'Реюньон', + 'RU' => 'Россия', + 'RW' => 'Руанда', + 'RO' => 'Румыния', + 'US' => 'США', + 'SV' => 'Сальвадор', + 'WS' => 'Самоа', + 'SM' => 'Сан-Марино', + 'ST' => 'Сан-Томе и Принсипи', + 'SA' => 'Саудовская Аравия', + 'SZ' => 'Свазиленд', + 'SJ' => 'Свальбард и Ян-Майен', + 'MP' => 'Северные Марианские Острова', + 'SC' => 'Сейшельские Острова', + 'PM' => 'Сен-Пьер и Микелон', + 'SN' => 'Сенегал', + 'VC' => 'Сент-Винсент и Гренадины', + 'KN' => 'Сент-Киттс и Невис', + 'LC' => 'Сент-Люсия', + 'RS' => 'Сербия', + 'CS' => 'Сербия и Черногория', + 'SG' => 'Сингапур', + 'SY' => 'Сирийская Арабская Республика', + 'SK' => 'Словакия', + 'SI' => 'Словения', + 'SB' => 'Соломоновы Острова', + 'SO' => 'Сомали', + 'SD' => 'Судан', + 'SR' => 'Суринам', + 'SL' => 'Сьерра-Леоне', + 'TJ' => 'Таджикистан', + 'TH' => 'Таиланд', + 'TW' => 'Тайвань', + 'TZ' => 'Танзания', + 'TG' => 'Того', + 'TK' => 'Токелау', + 'TO' => 'Тонга', + 'TT' => 'Тринидад и Тобаго', + 'TV' => 'Тувалу', + 'TN' => 'Тунис', + 'TM' => 'Туркменистан', + 'TR' => 'Турция', + 'UG' => 'Уганда', + 'UZ' => 'Узбекистан', + 'UA' => 'Украина', + 'WF' => 'Уоллис и Футуна', + 'UY' => 'Уругвай', + 'FO' => 'Фарерские острова', + 'FM' => 'Федеративные Штаты Микронезии', + 'FJ' => 'Фиджи', + 'PH' => 'Филиппины', + 'FI' => 'Финляндия', + 'FK' => 'Фолклендские острова', + 'FR' => 'Франция', + 'GF' => 'Французская Гвиана', + 'PF' => 'Французская Полинезия', + 'TF' => 'Французские Южные Территории', + 'HR' => 'Хорватия', + 'CF' => 'Центрально-Африканская Республика', + 'TD' => 'Чад', + 'ME' => 'Черногория', + 'CZ' => 'Чешская республика', + 'CL' => 'Чили', + 'CH' => 'Швейцария', + 'SE' => 'Швеция', + 'LK' => 'Шри-Ланка', + 'EC' => 'Эквадор', + 'GQ' => 'Экваториальная Гвинея', + 'ER' => 'Эритрея', + 'EE' => 'Эстония', + 'ET' => 'Эфиопия', + 'ZA' => 'Южная Африка', + 'GS' => 'Южная Джорджия и Южные Сандвичевы Острова', + 'JM' => 'Ямайка', + 'JP' => 'Япония', +); diff --git a/application/helpers/country-list/sk/country.php b/application/helpers/country-list/sk/country.php new file mode 100644 index 0000000..a20f5b3 --- /dev/null +++ b/application/helpers/country-list/sk/country.php @@ -0,0 +1,250 @@ + 'Afganistan', + 'AX' => 'Alandské ostrovy', + 'AL' => 'Albánsko', + 'DZ' => 'Alžírsko', + 'AS' => 'Americká Samoa', + 'AD' => 'Andorra', + 'AO' => 'Angola', + 'AI' => 'Anguilla', + 'AQ' => 'Antarctica', + 'AG' => 'Antigua a Barbados', + 'AR' => 'Argentína', + 'AM' => 'Arménsko', + 'AW' => 'Aruba', + 'AU' => 'Austrália', + 'AZ' => 'Azerbajdžan', + 'BS' => 'Bahamy', + 'BH' => 'Bahrajn', + 'BD' => 'Bangladéš', + 'BB' => 'Barbados', + 'BE' => 'Belgicko', + 'BZ' => 'Belize', + 'BJ' => 'Benin', + 'BM' => 'Bermudy', + 'BY' => 'Bielorusko', + 'BO' => 'Bolívia', + 'BA' => 'Bosna a Hercegovina', + 'BW' => 'Botswana', + 'BV' => 'Bouvetov ostrov', + 'BR' => 'Brazília', + 'VG' => 'Britské panenské ostrovy', + 'IO' => 'Britské územie v Indickom oceáne', + 'BN' => 'Brunej', + 'BG' => 'Bulharsko', + 'BF' => 'Burkina Faso', + 'BI' => 'Burundi', + 'BT' => 'Bután', + 'HR' => 'Chorvátsko', + 'CK' => 'Cookove ostrovy', + 'CY' => 'Cyprus', + 'DM' => 'Dominika', + 'DO' => 'Dominikánska republika', + 'DK' => 'Dánsko', + 'DJ' => 'Džibuti', + 'EG' => 'Egypt', + 'EC' => 'Ekvádor', + 'ER' => 'Eritrea', + 'EE' => 'Estónsko', + 'ET' => 'Etiópia', + 'FO' => 'Faerské ostrovy', + 'FK' => 'Falklandské ostrovy', + 'FJ' => 'Fidži', + 'PH' => 'Filipíny', + 'GF' => 'Francúzska Guayana', + 'PF' => 'Francúzska Polynézia', + 'TF' => 'Francúzske južné územia', + 'FR' => 'Francúzsko', + 'FI' => 'Fínsko', + 'GA' => 'Gabon', + 'GM' => 'Gambia', + 'GH' => 'Ghana', + 'GI' => 'Gibraltár', + 'GD' => 'Grenada', + 'GE' => 'Gruzínsko', + 'GR' => 'Grécko', + 'GL' => 'Grónsko', + 'GP' => 'Guadeloupe', + 'GU' => 'Guam', + 'GT' => 'Guatemala', + 'GY' => 'Guayana', + 'GG' => 'Guernsey', + 'GN' => 'Guinea', + 'GW' => 'Guinea-Bissau', + 'HT' => 'Haiti', + 'HM' => 'Heardove ostrovy a McDonaldove ostrovy', + 'NL' => 'Holandsko', + 'AN' => 'Holandské Antily', + 'HN' => 'Honduras', + 'HK' => 'Hong Kong S.A.R. Číny', + 'IN' => 'India', + 'ID' => 'Indonézia', + 'IQ' => 'Irak', + 'IR' => 'Irán', + 'IS' => 'Island', + 'IL' => 'Izrael', + 'JM' => 'Jamajka', + 'JP' => 'Japonsko', + 'YE' => 'Jemen', + 'JE' => 'Jersey', + 'JO' => 'Jordánsko', + 'ZA' => 'Južná Afrika', + 'GS' => 'Južná Georgia a Južné Sandwichove ostrovy', + 'KY' => 'Kajmanské ostrovy', + 'KH' => 'Kambodža', + 'CM' => 'Kamerun', + 'CA' => 'Kanada', + 'CV' => 'Kapverdy', + 'QA' => 'Katar', + 'KZ' => 'Kazachstan', + 'KE' => 'Keňa', + 'KG' => 'Kirgizsko', + 'KI' => 'Kiribati', + 'CC' => 'Kokosové ostrovy', + 'CO' => 'Kolumbia', + 'KM' => 'Komory', + 'CG' => 'Kongo', + 'CD' => 'Konžská demokratická republika', + 'CR' => 'Kostarika', + 'CU' => 'Kuba', + 'KW' => 'Kuvajt', + 'KR' => 'Kórejská republika', + 'KP' => 'Kórejská ľudovodemokratická republika', + 'LA' => 'Laoská ľudovodemokratická republika', + 'LS' => 'Lesotho', + 'LB' => 'Libanon', + 'LR' => 'Libéria', + 'LI' => 'Lichtenštajnsko', + 'LT' => 'Litva', + 'LV' => 'Lotyšsko', + 'LU' => 'Luxembursko', + 'LY' => 'Lýbijská arabská džamahírija', + 'MK' => 'Macedónsko', + 'MG' => 'Madagaskar', + 'MO' => 'Makao S.A.R. Číny', + 'MY' => 'Malajzia', + 'MW' => 'Malawi', + 'MV' => 'Maldivy', + 'ML' => 'Mali', + 'MT' => 'Malta', + 'MA' => 'Maroko', + 'MH' => 'Marshallove ostrovy', + 'MQ' => 'Martinik', + 'MR' => 'Mauritánia', + 'MU' => 'Maurícius', + 'YT' => 'Mayotte', + 'HU' => 'Maďarsko', + 'UM' => 'Menšie odľahlé ostrovy USA', + 'MX' => 'Mexiko', + 'FM' => 'Mikronézia', + 'MM' => 'Mjanmarsko', + 'MD' => 'Moldavsko', + 'MC' => 'Monako', + 'MN' => 'Mongolsko', + 'MS' => 'Montserrat', + 'MZ' => 'Mozambik', + 'NA' => 'Namíbia', + 'NR' => 'Nauru', + 'DE' => 'Nemecko', + 'NP' => 'Nepál', + 'ZZ' => 'Neznámy alebo neplatný región', + 'NE' => 'Niger', + 'NG' => 'Nigéria', + 'NI' => 'Nikaragua', + 'NU' => 'Niue', + 'NF' => 'Norfolkov ostrov', + 'NC' => 'Nová Kaledónia', + 'NZ' => 'Nový Zéland', + 'NO' => 'Nórsko', + 'OM' => 'Omán', + 'IM' => 'Ostrov Man', + 'PK' => 'Pakistan', + 'PW' => 'Palau', + 'PS' => 'Palestínske územie', + 'PA' => 'Panama', + 'VI' => 'Panenské ostrovy - USA', + 'PG' => 'Papua Nová Guinea', + 'PY' => 'Paraguaj', + 'PE' => 'Peru', + 'PN' => 'Pitcairnove ostrovy', + 'CI' => 'Pobrežie Slonoviny', + 'PR' => 'Portoriko', + 'PT' => 'Portugalsko', + 'PL' => 'Poľsko', + 'AT' => 'Rakúsko', + 'RE' => 'Reunion', + 'GQ' => 'Rovníková Guinea', + 'RO' => 'Rumunsko', + 'RU' => 'Ruská federácia', + 'RW' => 'Rwanda', + 'KN' => 'Saint Kitts a Nevis', + 'PM' => 'Saint Pierre a Miquelon', + 'SV' => 'Salvador', + 'WS' => 'Samoa', + 'SM' => 'San Maríno', + 'SA' => 'Saudská Arábia', + 'SN' => 'Senegal', + 'MP' => 'Severné Mariány', + 'SC' => 'Seychelské ostrovy', + 'SL' => 'Sierra Leone', + 'SG' => 'Singapur', + 'SK' => 'Slovenská republika', + 'SI' => 'Slovinsko', + 'SO' => 'Somálsko', + 'AE' => 'Spojené arabské emiráty', + 'GB' => 'Spojené kráľovstvo', + 'US' => 'Spojené štáty', + 'RS' => 'Srbsko', + 'CS' => 'Srbsko a Čierna Hora', + 'LK' => 'Srí Lanka', + 'CF' => 'Stredoafrická republika', + 'SD' => 'Sudán', + 'SR' => 'Surinam', + 'SZ' => 'Svazijsko', + 'SH' => 'Svätá Helena', + 'LC' => 'Svätá Lucia', + 'BL' => 'Svätý Bartolomej', + 'MF' => 'Svätý Martin', + 'ST' => 'Svätý Tomáš a Princove ostrovy', + 'VC' => 'Svätý Vincent a Grenadíny', + 'SY' => 'Sýrska arabská republika', + 'TJ' => 'Tadžikistan', + 'TW' => 'Tajwan', + 'IT' => 'Taliansko', + 'TZ' => 'Tanzánia', + 'TH' => 'Thajsko', + 'TG' => 'Togo', + 'TK' => 'Tokelau', + 'TO' => 'Tonga', + 'TT' => 'Trinidad a Tobago', + 'TN' => 'Tunisko', + 'TR' => 'Turecko', + 'TM' => 'Turkménsko', + 'TC' => 'Turks a Caicos', + 'TV' => 'Tuvalu', + 'UG' => 'Uganda', + 'UA' => 'Ukrajina', + 'UY' => 'Uruguaj', + 'UZ' => 'Uzbekistan', + 'VU' => 'Vanuatu', + 'VA' => 'Vatikán', + 'VE' => 'Venezuela', + 'CX' => 'Vianočný ostrov', + 'VN' => 'Vietnam', + 'TL' => 'Východný Timor', + 'WF' => 'Wallis a Futuna', + 'ZM' => 'Zambia', + 'ZW' => 'Zimbabwe', + 'EH' => 'Západná Sahara', + 'IE' => 'Írsko', + 'TD' => 'Čad', + 'CZ' => 'Česká republika', + 'ME' => 'Čierna Hora', + 'CL' => 'Čile', + 'CN' => 'Čína', + 'SB' => 'Šalamúnove ostrovy', + 'ES' => 'Španielsko', + 'SJ' => 'Špicbergy a Jan Mayen', + 'CH' => 'Švajčiarsko', + 'SE' => 'Švédsko', +); diff --git a/application/helpers/country-list/sl/country.php b/application/helpers/country-list/sl/country.php new file mode 100644 index 0000000..07137b7 --- /dev/null +++ b/application/helpers/country-list/sl/country.php @@ -0,0 +1,250 @@ + 'Afganistan', + 'AX' => 'Alandsko otočje', + 'AL' => 'Albanija', + 'DZ' => 'Alžirija', + 'AS' => 'Ameriška Samoa', + 'VI' => 'Ameriški Deviški otoki', + 'AD' => 'Andora', + 'AO' => 'Angola', + 'AI' => 'Angvila', + 'AQ' => 'Antarktika', + 'AG' => 'Antigva in Barbuda', + 'AR' => 'Argentina', + 'AM' => 'Armenija', + 'AW' => 'Aruba', + 'AU' => 'Avstralija', + 'AT' => 'Avstrija', + 'AZ' => 'Azerbajdžan', + 'BS' => 'Bahami', + 'BH' => 'Bahrajn', + 'BD' => 'Bangladeš', + 'BB' => 'Barbados', + 'BE' => 'Belgija', + 'BZ' => 'Belize', + 'BY' => 'Belorusija', + 'BJ' => 'Benin', + 'BM' => 'Bermudi', + 'BW' => 'Bocvana', + 'BG' => 'Bolgarija', + 'BO' => 'Bolivija', + 'BA' => 'Bosna in Hercegovina', + 'BV' => 'Bouvetov otok', + 'CX' => 'Božični otok', + 'BR' => 'Brazilija', + 'VG' => 'Britanski Deviški otoki', + 'IO' => 'Britansko ozemlje v Indijskem oceanu', + 'BN' => 'Brunej', + 'BF' => 'Burkina Faso', + 'BI' => 'Burundi', + 'BT' => 'Butan', + 'CF' => 'Centralnoafriška republika', + 'CY' => 'Ciper', + 'CK' => 'Cookovo otočje', + 'DK' => 'Danska', + 'CD' => 'Demokratična republika Kongo', + 'DM' => 'Dominika', + 'DO' => 'Dominikanska republika', + 'UM' => 'Druga ameriška ozemlja v Tihem oceanu', + 'DJ' => 'Džibuti', + 'EG' => 'Egipt', + 'EC' => 'Ekvador', + 'GQ' => 'Ekvatorialna Gvineja', + 'ER' => 'Eritreja', + 'EE' => 'Estonija', + 'ET' => 'Etiopija', + 'FK' => 'Falklandski otoki', + 'FO' => 'Ferski otoki', + 'FJ' => 'Fidži', + 'PH' => 'Filipini', + 'FI' => 'Finska', + 'FR' => 'Francija', + 'GF' => 'Francoska Gvajana', + 'PF' => 'Francoska Polinezija', + 'TF' => 'Francosko južno ozemlje', + 'GA' => 'Gabon', + 'GM' => 'Gambija', + 'GH' => 'Gana', + 'GI' => 'Gibraltar', + 'GD' => 'Grenada', + 'GL' => 'Grenlandija', + 'GE' => 'Gruzija', + 'GR' => 'Grčija', + 'GU' => 'Guam', + 'GG' => 'Guernsey', + 'GP' => 'Gvadalupe', + 'GY' => 'Gvajana', + 'GT' => 'Gvatemala', + 'GN' => 'Gvineja', + 'GW' => 'Gvineja Bissau', + 'HT' => 'Haiti', + 'HN' => 'Honduras', + 'HR' => 'Hrvaška', + 'IN' => 'Indija', + 'ID' => 'Indonezija', + 'IQ' => 'Irak', + 'IR' => 'Iran', + 'IE' => 'Irska', + 'IS' => 'Islandija', + 'IT' => 'Italija', + 'IL' => 'Izrael', + 'JM' => 'Jamajka', + 'JP' => 'Japonska', + 'YE' => 'Jemen', + 'JE' => 'Jersey', + 'JO' => 'Jordanija', + 'GS' => 'Južna Georgia in Južni Sandwichevi otoki', + 'KR' => 'Južna Koreja', + 'ZA' => 'Južnoafriška republika', + 'KY' => 'Kajmanski otoki', + 'KH' => 'Kambodža', + 'CM' => 'Kamerun', + 'CA' => 'Kanada', + 'QA' => 'Katar', + 'KZ' => 'Kazahstan', + 'KE' => 'Kenija', + 'KG' => 'Kirgizistan', + 'KI' => 'Kiribati', + 'CN' => 'Kitajska', + 'CC' => 'Kokosovi otoki', + 'CO' => 'Kolumbija', + 'KM' => 'Komori', + 'CG' => 'Kongo', + 'CR' => 'Kostarika', + 'CU' => 'Kuba', + 'KW' => 'Kuvajt', + 'LA' => 'Laos', + 'LV' => 'Latvija', + 'LS' => 'Lesoto', + 'LB' => 'Libanon', + 'LR' => 'Liberija', + 'LY' => 'Libija', + 'LI' => 'Lihtenštajn', + 'LT' => 'Litva', + 'LU' => 'Luksemburg', + 'MG' => 'Madagaskar', + 'HU' => 'Madžarska', + 'MK' => 'Makedonija', + 'MW' => 'Malavi', + 'MV' => 'Maldivi', + 'MY' => 'Malezija', + 'ML' => 'Mali', + 'MT' => 'Malta', + 'MA' => 'Maroko', + 'MH' => 'Marshallovi otoki', + 'MQ' => 'Martinik', + 'MU' => 'Mauritius', + 'MR' => 'Mavretanija', + 'YT' => 'Mayotte', + 'MX' => 'Mehika', + 'FM' => 'Mikronezija', + 'MM' => 'Mjanmar', + 'MD' => 'Moldavija', + 'MC' => 'Monako', + 'MN' => 'Mongolija', + 'MS' => 'Montserrat', + 'MZ' => 'Mozambik', + 'NA' => 'Namibija', + 'NR' => 'Nauru', + 'DE' => 'Nemčija', + 'NP' => 'Nepal', + 'ZZ' => 'Neznano ali neveljavno območje', + 'NE' => 'Niger', + 'NG' => 'Nigerija', + 'NI' => 'Nikaragva', + 'NU' => 'Niue', + 'NL' => 'Nizozemska', + 'AN' => 'Nizozemski Antili', + 'NF' => 'Norfolški otok', + 'NO' => 'Norveška', + 'NC' => 'Nova Kaledonija', + 'NZ' => 'Nova Zelandija', + 'OM' => 'Oman', + 'HM' => 'Otok Heard in otočje McDonald', + 'IM' => 'Otok Man', + 'TC' => 'Otočji Turks in Caicos', + 'PK' => 'Pakistan', + 'PW' => 'Palau', + 'PS' => 'Palestinsko ozemlje', + 'PA' => 'Panama', + 'PG' => 'Papua Nova Gvineja', + 'PY' => 'Paragvaj', + 'PE' => 'Peru', + 'PN' => 'Pitcairn', + 'PL' => 'Poljska', + 'PR' => 'Portoriko', + 'PT' => 'Portugalska', + 'HK' => 'Posebno administrativno območje LR Kitajske Hong Kong', + 'MO' => 'Posebno administrativno območje LR Kitajske Macao', + 'RE' => 'Reunion', + 'RO' => 'Romunija', + 'RW' => 'Ruanda', + 'RU' => 'Rusija', + 'BL' => 'Saint Barthelemy', + 'KN' => 'Saint Kitts in Nevis', + 'LC' => 'Saint Lucia', + 'MF' => 'Saint Martin', + 'PM' => 'Saint Pierre in Miquelon', + 'VC' => 'Saint Vincent in Grenadine', + 'SB' => 'Salomonovi otoki', + 'SV' => 'Salvador', + 'WS' => 'Samoa', + 'SM' => 'San Marino', + 'ST' => 'Sao Tome in Principe', + 'SA' => 'Saudova Arabija', + 'SC' => 'Sejšeli', + 'SN' => 'Senegal', + 'KP' => 'Severna Koreja', + 'MP' => 'Severni Marianski otoki', + 'SL' => 'Sierra Leone', + 'SG' => 'Singapur', + 'SY' => 'Sirija', + 'CI' => 'Slonokoščena obala', + 'SK' => 'Slovaška', + 'SI' => 'Slovenija', + 'SO' => 'Somalija', + 'RS' => 'Srbija', + 'CS' => 'Srbija in Črna gora', + 'SD' => 'Sudan', + 'SR' => 'Surinam', + 'SJ' => 'Svalbard in Jan Mayen', + 'SZ' => 'Svazi', + 'SH' => 'Sveta Helena', + 'TJ' => 'Tadžikistan', + 'TH' => 'Tajska', + 'TW' => 'Tajvan', + 'TZ' => 'Tanzanija', + 'TG' => 'Togo', + 'TK' => 'Tokelau', + 'TO' => 'Tonga', + 'TT' => 'Trinidad in Tobago', + 'TN' => 'Tunizija', + 'TM' => 'Turkmenistan', + 'TR' => 'Turčija', + 'TV' => 'Tuvalu', + 'UG' => 'Uganda', + 'UA' => 'Ukrajina', + 'UY' => 'Urugvaj', + 'UZ' => 'Uzbekistan', + 'VU' => 'Vanuatu', + 'VA' => 'Vatikan', + 'GB' => 'Velika Britanija', + 'VE' => 'Venezuela', + 'VN' => 'Vietnam', + 'TL' => 'Vzhodni Timor', + 'WF' => 'Wallis in Futuna', + 'EH' => 'Zahodna Sahara', + 'ZM' => 'Zambija', + 'US' => 'Združene države Amerike', + 'AE' => 'Združeni arabski emirati', + 'CV' => 'Zelenortski otoki', + 'ZW' => 'Zimbabve', + 'TD' => 'Čad', + 'CZ' => 'Češka', + 'CL' => 'Čile', + 'ME' => 'Črna gora', + 'ES' => 'Španija', + 'LK' => 'Šrilanka', + 'SE' => 'Švedska', + 'CH' => 'Švica', +); diff --git a/application/helpers/country-list/sq/country.php b/application/helpers/country-list/sq/country.php new file mode 100644 index 0000000..82338f5 --- /dev/null +++ b/application/helpers/country-list/sq/country.php @@ -0,0 +1,159 @@ + 'Afganistan', + 'ZA' => 'Afrika e Jugut', + 'DZ' => 'Algjeri', + 'AD' => 'Andorrë', + 'AO' => 'Angolë', + 'AG' => 'Antigua e Barbuda', + 'SA' => 'Arabia Saudite', + 'AR' => 'Argjentinë', + 'AM' => 'Armeni', + 'AU' => 'Australi', + 'AT' => 'Austri', + 'AZ' => 'Azerbajxhan', + 'BH' => 'Bahrein', + 'BE' => 'Belgjikë', + 'BY' => 'Bjellorusi', + 'BO' => 'Bolivi', + 'BA' => 'Bosnja dhe Hercegovina', + 'BW' => 'Botsvana', + 'BR' => 'Brazili', + 'CI' => 'Bregu i Fildishtë', + 'BN' => 'Brunej', + 'BG' => 'Bullgari', + 'BT' => 'Butan', + 'DK' => 'Danimarkë', + 'DM' => 'Dominikë', + 'EG' => 'Egjipt', + 'EC' => 'Ekuator', + 'AE' => 'Emiratet Arabe te Bashkuara', + 'ER' => 'Eritre', + 'EE' => 'Estoni', + 'ET' => 'Etiopi', + 'PH' => 'Filipine', + 'FI' => 'Finlandë', + 'FJ' => 'Fixhi', + 'FR' => 'Francë', + 'GM' => 'Gambi', + 'GH' => 'Ganë', + 'GA' => 'Gjabon', + 'GE' => 'Gjeorgji', + 'DE' => 'Gjermani', + 'GR' => 'Greqi', + 'GY' => 'Guajana', + 'GT' => 'Guatemalë', + 'GN' => 'Guine', + 'GW' => 'Guine Bisau', + 'GQ' => 'Guineja Ekuatoriale', + 'HU' => 'Hungari', + 'IN' => 'Indi', + 'ID' => 'Indonezi', + 'IQ' => 'Irak', + 'IE' => 'Irlandë', + 'AX' => 'Ishujt Aland', + 'MH' => 'Ishujt Marshall', + 'SB' => 'Ishujt Solomon', + 'IS' => 'Islandë', + 'IT' => 'Itali', + 'IL' => 'Izrael', + 'JP' => 'Japoni', + 'YE' => 'Jemen', + 'JO' => 'Jordani', + 'KH' => 'Kamboxhi', + 'CM' => 'Kamerun', + 'CA' => 'Kanada', + 'CV' => 'Kap Verde', + 'QA' => 'Katar', + 'KZ' => 'Kazakistan', + 'KE' => 'Kenia', + 'CL' => 'Kili', + 'CN' => 'Kinë', + 'KG' => 'Kirgistan', + 'CO' => 'Kolumbi', + 'KM' => 'Komore', + 'CG' => 'Kongo', + 'KR' => 'Koreja e Jugut', + 'KP' => 'Koreja e Veriut', + 'CR' => 'Kosta Rika', + 'HR' => 'Kroaci', + 'CU' => 'Kubë', + 'KW' => 'Kuvajt', + 'LS' => 'Lesoto', + 'LV' => 'Letoni', + 'LB' => 'Liban', + 'LR' => 'Liberi', + 'LY' => 'Libi', + 'LI' => 'Lihtënshtajn', + 'LT' => 'Lituani', + 'LU' => 'Luksemburg', + 'MG' => 'Madagaskar', + 'MY' => 'Malajzi', + 'MW' => 'Malavi', + 'MV' => 'Maldivit', + 'MT' => 'Maltë', + 'MK' => 'Maqedoni', + 'MA' => 'Maroko', + 'MR' => 'Mauritani', + 'GB' => 'Mbretëria e Bashkuar', + 'MX' => 'Meksikë', + 'FM' => 'Mikronezi', + 'MD' => 'Moldavi', + 'MC' => 'Monako', + 'MN' => 'Mongoli', + 'MZ' => 'Mozambik', + 'NA' => 'Namibi', + 'NG' => 'Nigeri', + 'NI' => 'Nikaragua', + 'NO' => 'Norvegji', + 'PG' => 'Papua Guineja e Re', + 'PY' => 'Paraguaj', + 'PL' => 'Poloni', + 'PT' => 'Portugali', + 'CY' => 'Qipro', + 'KI' => 'Qiribati', + 'ZZ' => 'Rajon i panjohur ose i pavlefshëm', + 'DO' => 'Republika Dominikanë', + 'CF' => 'Republika Qendrore e Afrikës', + 'CZ' => 'Republika e Çekisë', + 'RW' => 'Ruanda', + 'RO' => 'Rumani', + 'RU' => 'Rusi', + 'EH' => 'Saharaja Perëndimore', + 'KN' => 'Saint Kitts e Nevis', + 'VC' => 'Saint Vincent e Grenadinet', + 'ST' => 'Sao Tome e Prinsipe', + 'CS' => 'Serbië en Montenegro', + 'AL' => 'Shqipëria', + 'US' => 'Shtetet e Bashkuara të Amerikës', + 'SL' => 'Siera Leone', + 'SG' => 'Singapor', + 'SY' => 'Siri', + 'SC' => 'Sishel', + 'SK' => 'Sllovaki', + 'SI' => 'Slloveni', + 'SO' => 'Somali', + 'ES' => 'Spanjë', + 'SE' => 'Suedi', + 'SZ' => 'Svazilandë', + 'TH' => 'Tajlandë', + 'TW' => 'Tajvan', + 'TZ' => 'Tanzani', + 'TJ' => 'Taxhikistan', + 'TG' => 'Togo', + 'TO' => 'Tonga', + 'TT' => 'Trinidad e Tobago', + 'TN' => 'Tunisi', + 'TR' => 'Turqi', + 'UA' => 'Ukrainë', + 'UY' => 'Uruguaj', + 'VA' => 'Vatikan', + 'NL' => 'Vendet e Ulëta', + 'VE' => 'Venezuelë', + 'JM' => 'Xhamajkë', + 'DJ' => 'Xhibuti', + 'ZM' => 'Zambi', + 'NZ' => 'Zelanda e Re', + 'ZW' => 'Zimbabve', + 'CH' => 'Zvicër', + 'TD' => 'Çad', +); diff --git a/application/helpers/country-list/sr_CS/country.php b/application/helpers/country-list/sr_CS/country.php new file mode 100644 index 0000000..ca6f52a --- /dev/null +++ b/application/helpers/country-list/sr_CS/country.php @@ -0,0 +1,250 @@ + 'Јамајка', + 'JP' => 'Јапан', + 'YE' => 'Јемен', + 'JO' => 'Јордан', + 'GS' => 'Јужна Џорџија и Јужна Сендвич Острва', + 'KR' => 'Јужна Кореја', + 'ZA' => 'Јужноафричка Република', + 'JE' => 'Џерси', + 'DJ' => 'Џибути', + 'AF' => 'Авганистан', + 'AZ' => 'Азербејџан', + 'AX' => 'Аландска острва', + 'AL' => 'Албанија', + 'DZ' => 'Алжир', + 'AS' => 'Америчка Самоа', + 'AI' => 'Ангвила', + 'AO' => 'Ангола', + 'AD' => 'Андора', + 'AQ' => 'Антарктик', + 'AG' => 'Антигве и Барбуда', + 'AR' => 'Аргентина', + 'AM' => 'Арменија', + 'AW' => 'Аруба', + 'AU' => 'Аустралија', + 'AT' => 'Аустрија', + 'BD' => 'Бангладеш', + 'BB' => 'Барбадос', + 'BS' => 'Бахами', + 'BH' => 'Бахреин', + 'BE' => 'Белгија', + 'BZ' => 'Белизе', + 'BY' => 'Белорусија', + 'BJ' => 'Бенин', + 'BM' => 'Бермуда', + 'CX' => 'Божићна острва', + 'BO' => 'Боливија', + 'BA' => 'Босна и Херцеговина', + 'BW' => 'Боцвана', + 'BR' => 'Бразил', + 'VG' => 'Британска Девичанска Острва', + 'IO' => 'Британска територија у Индијском океану', + 'BN' => 'Брунеј', + 'BV' => 'Буве Острва', + 'BG' => 'Бугарска', + 'BF' => 'Буркина Фасо', + 'BI' => 'Бурунди', + 'BT' => 'Бутан', + 'WF' => 'Валис и Футуна Острва', + 'VU' => 'Вануату', + 'VA' => 'Ватикан', + 'GB' => 'Велика Британија', + 'VE' => 'Венецуела', + 'VN' => 'Вијетнам', + 'GA' => 'Габон', + 'GM' => 'Гамбија', + 'GH' => 'Гана', + 'GP' => 'Гваделупе', + 'GT' => 'Гватемала', + 'GY' => 'Гвајана', + 'GN' => 'Гвинеја', + 'GW' => 'Гвинеја-Бисао', + 'GI' => 'Гибралтар', + 'GD' => 'Гренада', + 'GL' => 'Гренланд', + 'GE' => 'Грузија', + 'GR' => 'Грчка', + 'GU' => 'Гуам', + 'GG' => 'Гурнси', + 'DK' => 'Данска', + 'CD' => 'Демократска република Конго', + 'DM' => 'Доминика', + 'DO' => 'Доминиканска Република', + 'EG' => 'Египат', + 'EC' => 'Еквадор', + 'GQ' => 'Екваторијална Гвинеја', + 'ER' => 'Еритреја', + 'EE' => 'Естонија', + 'ET' => 'Етиопија', + 'ZM' => 'Замбија', + 'EH' => 'Западна Сахара', + 'ZW' => 'Зимбабве', + 'IL' => 'Израел', + 'IN' => 'Индија', + 'ID' => 'Индонезија', + 'IQ' => 'Ирак', + 'IR' => 'Иран', + 'IE' => 'Ирска', + 'IS' => 'Исланд', + 'TL' => 'Источни Тимор', + 'IT' => 'Италија', + 'KZ' => 'Казахстан', + 'KH' => 'Камбоџа', + 'CM' => 'Камерун', + 'CA' => 'Канада', + 'CV' => 'Капе Верде', + 'QA' => 'Катар', + 'KY' => 'Кајманска Острва', + 'KE' => 'Кенија', + 'CN' => 'Кина', + 'CY' => 'Кипар', + 'KG' => 'Киргизстан', + 'KI' => 'Кирибати', + 'CC' => 'Кокос (Келинг) Острва', + 'CO' => 'Колумбија', + 'KM' => 'Коморска Острва', + 'CG' => 'Конго', + 'CR' => 'Костарика', + 'CU' => 'Куба', + 'KW' => 'Кувајт', + 'CK' => 'Кукова Острва', + 'LA' => 'Лаос', + 'LS' => 'Лесото', + 'LV' => 'Летонија', + 'LB' => 'Либан', + 'LR' => 'Либерија', + 'LY' => 'Либија', + 'LT' => 'Литванија', + 'LI' => 'Лихтенштајн', + 'LU' => 'Луксембург', + 'MG' => 'Мадагаскар', + 'MO' => 'Макао С. А. Р. Кина', + 'MK' => 'Македонија', + 'MW' => 'Малави', + 'MV' => 'Малдиви', + 'MY' => 'Малезија', + 'ML' => 'Мали', + 'MT' => 'Малта', + 'MA' => 'Мароко', + 'MQ' => 'Мартиник', + 'MH' => 'Маршалска Острва', + 'MR' => 'Мауританија', + 'MU' => 'Маурицијус', + 'HU' => 'Мађарска', + 'YT' => 'Мајоте', + 'UM' => 'Мања удаљена острва САД', + 'MX' => 'Мексико', + 'FM' => 'Микронезија', + 'MM' => 'Мијанмар', + 'MZ' => 'Мозамбик', + 'MD' => 'Молдавија', + 'MC' => 'Монако', + 'MN' => 'Монголија', + 'MS' => 'Монсерат', + 'NA' => 'Намибија', + 'NR' => 'Науру', + 'DE' => 'Немачка', + 'NP' => 'Непал', + 'ZZ' => 'Непозната или неважећа област', + 'NE' => 'Нигер', + 'NG' => 'Нигерија', + 'NI' => 'Никарагва', + 'NU' => 'Ниуе', + 'NC' => 'Нова Каледонија', + 'NZ' => 'Нови Зеланд', + 'NO' => 'Норвешка', + 'NF' => 'Норфолк Острво', + 'CI' => 'Обала Слоноваче', + 'OM' => 'Оман', + 'IM' => 'Острво Ман', + 'PK' => 'Пакистан', + 'PW' => 'Палау', + 'PS' => 'Палестинска територија', + 'PA' => 'Панама', + 'PG' => 'Папуа Нова Гвинеја', + 'PY' => 'Парагвај', + 'PE' => 'Перу', + 'PN' => 'Питкерн', + 'PR' => 'Порто Рико', + 'PT' => 'Португал', + 'PL' => 'Пољска', + 'RE' => 'Реинион', + 'RW' => 'Руанда', + 'RO' => 'Румунија', + 'RU' => 'Русија', + 'VI' => 'С.А.Д. Девичанска Острва', + 'SV' => 'Салвадор', + 'WS' => 'Самоа', + 'SM' => 'Сан Марино', + 'ST' => 'Сао Томе и Принципе', + 'SA' => 'Саудијска Арабија', + 'SZ' => 'Свазиленд', + 'SJ' => 'Свалбард и Јанмајен Острва', + 'SH' => 'Света Јелена', + 'BL' => 'Свети Бартоломеј', + 'KP' => 'Северна Кореја', + 'MP' => 'Северна Маријанска Острва', + 'PM' => 'Сен Пјер и Микелон', + 'SN' => 'Сенегал', + 'VC' => 'Сент Винсент и Гренадини', + 'KN' => 'Сент Китс и Невис', + 'LC' => 'Сент Луција', + 'MF' => 'Сент Мартин', + 'SC' => 'Сејшели', + 'SG' => 'Сингапур', + 'SY' => 'Сирија', + 'SL' => 'Сијера Леоне', + 'SK' => 'Словачка', + 'SI' => 'Словенија', + 'SB' => 'Соломонска Острва', + 'SO' => 'Сомалија', + 'RS' => 'Србија', + 'CS' => 'Србија и Црна Гора', + 'SD' => 'Судан', + 'SR' => 'Суринам', + 'US' => 'Сједињене Америчке Државе', + 'TZ' => 'Танзанија', + 'TW' => 'Тајван', + 'TH' => 'Тајланд', + 'TJ' => 'Таџикистан', + 'TG' => 'Того', + 'TK' => 'Токелау', + 'TO' => 'Тонга', + 'TT' => 'Тринидад и Тобаго', + 'TV' => 'Тувалу', + 'TN' => 'Тунис', + 'TM' => 'Туркменистан', + 'TC' => 'Туркс и Кајкос Острва', + 'TR' => 'Турска', + 'UG' => 'Уганда', + 'UZ' => 'Узбекистан', + 'UA' => 'Украјина', + 'UY' => 'Уругвај', + 'AE' => 'Уједињени Арапски Емирати', + 'FO' => 'Фарска Острва', + 'PH' => 'Филипини', + 'FI' => 'Финска', + 'FJ' => 'Фиџи', + 'FK' => 'Фолкландска Острва', + 'FR' => 'Француска', + 'GF' => 'Француска Гвајана', + 'PF' => 'Француска Полинезија', + 'TF' => 'Француске Јужне Територије', + 'HT' => 'Хаити', + 'HM' => 'Херд и Мекдоналд Острва', + 'NL' => 'Холандија', + 'AN' => 'Холандски Антили', + 'HK' => 'Хонг Конг С. А. Р. Кина', + 'HN' => 'Хондурас', + 'HR' => 'Хрватска', + 'CF' => 'Централно Афричка Република', + 'ME' => 'Црна Гора', + 'TD' => 'Чад', + 'CZ' => 'Чешка', + 'CL' => 'Чиле', + 'CH' => 'Швајцарска', + 'SE' => 'Шведска', + 'ES' => 'Шпанија', + 'LK' => 'Шри Ланка', +); diff --git a/application/helpers/country-list/sv_SE/country.php b/application/helpers/country-list/sv_SE/country.php new file mode 100644 index 0000000..0e5c1a9 --- /dev/null +++ b/application/helpers/country-list/sv_SE/country.php @@ -0,0 +1,250 @@ + 'Afghanistan', + 'AL' => 'Albanien', + 'DZ' => 'Algeriet', + 'VI' => 'Amerikanska Jungfruöarna', + 'AS' => 'Amerikanska Samoa', + 'AD' => 'Andorra', + 'AO' => 'Angola', + 'AI' => 'Anguilla', + 'AQ' => 'Antarktis', + 'AG' => 'Antigua och Barbuda', + 'AR' => 'Argentina', + 'AM' => 'Armenien', + 'AW' => 'Aruba', + 'AU' => 'Australien', + 'AZ' => 'Azerbajdzjan', + 'BS' => 'Bahamas', + 'BH' => 'Bahrain', + 'BD' => 'Bangladesh', + 'BB' => 'Barbados', + 'BE' => 'Belgien', + 'BZ' => 'Belize', + 'BJ' => 'Benin', + 'BM' => 'Bermuda', + 'BT' => 'Bhutan', + 'BO' => 'Bolivia', + 'BA' => 'Bosnien och Hercegovina', + 'BW' => 'Botswana', + 'BV' => 'Bouvetön', + 'BR' => 'Brasilien', + 'IO' => 'Brittiska Indiska oceanöarna', + 'VG' => 'Brittiska Jungfruöarna', + 'BN' => 'Brunei', + 'BG' => 'Bulgarien', + 'BF' => 'Burkina Faso', + 'BI' => 'Burundi', + 'KY' => 'Caymanöarna', + 'CF' => 'Centralafrikanska republiken', + 'CL' => 'Chile', + 'CO' => 'Colombia', + 'CK' => 'Cooköarna', + 'CR' => 'Costa Rica', + 'CY' => 'Cypern', + 'DK' => 'Danmark', + 'DJ' => 'Djibouti', + 'DM' => 'Dominica', + 'DO' => 'Dominikanska republiken', + 'EC' => 'Ecuador', + 'EG' => 'Egypten', + 'GQ' => 'Ekvatorialguinea', + 'SV' => 'El Salvador', + 'CI' => 'Elfenbenskusten', + 'ER' => 'Eritrea', + 'EE' => 'Estland', + 'ET' => 'Etiopien', + 'FK' => 'Falklandsöarna', + 'FJ' => 'Fiji', + 'PH' => 'Filippinerna', + 'FI' => 'Finland', + 'FR' => 'Frankrike', + 'GF' => 'Franska Guyana', + 'PF' => 'Franska Polynesien', + 'TF' => 'Franska Sydterritorierna', + 'FO' => 'Färöarna', + 'AE' => 'Förenade Arabemiraten', + 'GA' => 'Gabon', + 'GM' => 'Gambia', + 'GE' => 'Georgien', + 'GH' => 'Ghana', + 'GI' => 'Gibraltar', + 'GR' => 'Grekland', + 'GD' => 'Grenada', + 'GL' => 'Grönland', + 'GP' => 'Guadeloupe', + 'GU' => 'Guam', + 'GT' => 'Guatemala', + 'GG' => 'Guernsey', + 'GN' => 'Guinea', + 'GW' => 'Guinea-Bissau', + 'GY' => 'Guyana', + 'HT' => 'Haiti', + 'HM' => 'Heard- och McDonaldöarna', + 'HN' => 'Honduras', + 'HK' => 'Hongkong (S.A.R. Kina)', + 'IN' => 'Indien', + 'ID' => 'Indonesien', + 'IQ' => 'Irak', + 'IR' => 'Iran', + 'IE' => 'Irland', + 'IS' => 'Island', + 'IM' => 'Isle of Man', + 'IL' => 'Israel', + 'IT' => 'Italien', + 'JM' => 'Jamaica', + 'JP' => 'Japan', + 'YE' => 'Jemen', + 'JE' => 'Jersey', + 'JO' => 'Jordanien', + 'CX' => 'Julön', + 'KH' => 'Kambodja', + 'CM' => 'Kamerun', + 'CA' => 'Kanada', + 'CV' => 'Kap Verde', + 'KZ' => 'Kazakstan', + 'KE' => 'Kenya', + 'CN' => 'Kina', + 'KG' => 'Kirgizistan', + 'KI' => 'Kiribati', + 'CC' => 'Kokosöarna', + 'KM' => 'Komorerna', + 'CG' => 'Kongo-Brazzaville', + 'CD' => 'Kongo-Kinshasa', + 'HR' => 'Kroatien', + 'CU' => 'Kuba', + 'KW' => 'Kuwait', + 'LA' => 'Laos', + 'LS' => 'Lesotho', + 'LV' => 'Lettland', + 'LB' => 'Libanon', + 'LR' => 'Liberia', + 'LY' => 'Libyen', + 'LI' => 'Liechtenstein', + 'LT' => 'Litauen', + 'LU' => 'Luxemburg', + 'MO' => 'Macao (S.A.R. Kina)', + 'MG' => 'Madagaskar', + 'MK' => 'Makedonien', + 'MW' => 'Malawi', + 'MY' => 'Malaysia', + 'MV' => 'Maldiverna', + 'ML' => 'Mali', + 'MT' => 'Malta', + 'MA' => 'Marocko', + 'MH' => 'Marshallöarna', + 'MQ' => 'Martinique', + 'MR' => 'Mauretanien', + 'MU' => 'Mauritius', + 'YT' => 'Mayotte', + 'MX' => 'Mexiko', + 'FM' => 'Mikronesien', + 'MD' => 'Moldavien', + 'MC' => 'Monaco', + 'MN' => 'Mongoliet', + 'ME' => 'Montenegro', + 'MS' => 'Montserrat', + 'MZ' => 'Moçambique', + 'MM' => 'Myanmar', + 'NA' => 'Namibia', + 'NR' => 'Nauru', + 'NL' => 'Nederländerna', + 'AN' => 'Nederländska Antillerna', + 'NP' => 'Nepal', + 'NI' => 'Nicaragua', + 'NE' => 'Niger', + 'NG' => 'Nigeria', + 'NU' => 'Niue', + 'KP' => 'Nordkorea', + 'MP' => 'Nordmarianerna', + 'NF' => 'Norfolkön', + 'NO' => 'Norge', + 'NC' => 'Nya Kaledonien', + 'NZ' => 'Nya Zeeland', + 'OM' => 'Oman', + 'PK' => 'Pakistan', + 'PW' => 'Palau', + 'PS' => 'Palestinska territoriet', + 'PA' => 'Panama', + 'PG' => 'Papua Nya Guinea', + 'PY' => 'Paraguay', + 'PE' => 'Peru', + 'PN' => 'Pitcairn', + 'PL' => 'Polen', + 'PT' => 'Portugal', + 'PR' => 'Puerto Rico', + 'QA' => 'Qatar', + 'RO' => 'Rumänien', + 'RW' => 'Rwanda', + 'RU' => 'Ryssland', + 'RE' => 'Réunion', + 'BL' => 'S:t Barthélemy', + 'SH' => 'S:t Helena', + 'KN' => 'S:t Kitts och Nevis', + 'LC' => 'S:t Lucia', + 'MF' => 'S:t Martin', + 'PM' => 'S:t Pierre och Miquelon', + 'VC' => 'S:t Vincent och Grenadinerna', + 'SB' => 'Salomonöarna', + 'WS' => 'Samoa', + 'SM' => 'San Marino', + 'SA' => 'Saudiarabien', + 'CH' => 'Schweiz', + 'SN' => 'Senegal', + 'RS' => 'Serbien', + 'CS' => 'Serbien och Montenegro', + 'SC' => 'Seychellerna', + 'SL' => 'Sierra Leone', + 'SG' => 'Singapore', + 'SK' => 'Slovakien', + 'SI' => 'Slovenien', + 'SO' => 'Somalia', + 'ES' => 'Spanien', + 'LK' => 'Sri Lanka', + 'GB' => 'Storbritannien', + 'SD' => 'Sudan', + 'SR' => 'Surinam', + 'SJ' => 'Svalbard och Jan Mayen', + 'SE' => 'Sverige', + 'SZ' => 'Swaziland', + 'ZA' => 'Sydafrika', + 'GS' => 'Sydgeorgien och Södra Sandwichöarna', + 'KR' => 'Sydkorea', + 'SY' => 'Syrien', + 'ST' => 'São Tomé och Príncipe', + 'TJ' => 'Tadzjikistan', + 'TW' => 'Taiwan', + 'TZ' => 'Tanzania', + 'TD' => 'Tchad', + 'TH' => 'Thailand', + 'CZ' => 'Tjeckien', + 'TG' => 'Togo', + 'TK' => 'Tokelau', + 'TO' => 'Tonga', + 'TT' => 'Trinidad och Tobago', + 'TN' => 'Tunisien', + 'TR' => 'Turkiet', + 'TM' => 'Turkmenistan', + 'TC' => 'Turks- och Caicosöarna', + 'TV' => 'Tuvalu', + 'DE' => 'Tyskland', + 'US' => 'USA', + 'UM' => 'USA:s yttre öar', + 'UG' => 'Uganda', + 'UA' => 'Ukraina', + 'HU' => 'Ungern', + 'UY' => 'Uruguay', + 'UZ' => 'Uzbekistan', + 'VU' => 'Vanuatu', + 'VA' => 'Vatikanstaten', + 'VE' => 'Venezuela', + 'VN' => 'Vietnam', + 'BY' => 'Vitryssland', + 'EH' => 'Västsahara', + 'WF' => 'Wallis- och Futunaöarna', + 'ZM' => 'Zambia', + 'ZW' => 'Zimbabwe', + 'ZZ' => 'okänd eller ogiltig regionkod', + 'AX' => 'Åland', + 'AT' => 'Österrike', + 'TL' => 'Östtimor', +); diff --git a/application/helpers/country-list/tr/country.php b/application/helpers/country-list/tr/country.php new file mode 100644 index 0000000..a0d50f7 --- /dev/null +++ b/application/helpers/country-list/tr/country.php @@ -0,0 +1,250 @@ + 'ABD Virgin Adaları', + 'AF' => 'Afganistan', + 'AX' => 'Aland Adaları', + 'DE' => 'Almanya', + 'US' => 'Amerika Birleşik Devletleri', + 'UM' => 'Amerika Birleşik Devletleri Küçük Dış Adaları', + 'AS' => 'Amerikan Samoası', + 'AD' => 'Andorra', + 'AO' => 'Angola', + 'AI' => 'Anguilla', + 'AQ' => 'Antarktika', + 'AG' => 'Antigua ve Barbuda', + 'AR' => 'Arjantin', + 'AL' => 'Arnavutluk', + 'AW' => 'Aruba', + 'AU' => 'Avustralya', + 'AT' => 'Avusturya', + 'AZ' => 'Azerbaycan', + 'BS' => 'Bahamalar', + 'BH' => 'Bahreyn', + 'BD' => 'Bangladeş', + 'BB' => 'Barbados', + 'EH' => 'Batı Sahara', + 'BZ' => 'Belize', + 'BE' => 'Belçika', + 'BJ' => 'Benin', + 'BM' => 'Bermuda', + 'BY' => 'Beyaz Rusya', + 'BT' => 'Bhutan', + 'ZZ' => 'Bilinmeyen veya Geçersiz Bölge', + 'AE' => 'Birleşik Arap Emirlikleri', + 'GB' => 'Birleşik Krallık', + 'BO' => 'Bolivya', + 'BA' => 'Bosna Hersek', + 'BW' => 'Botsvana', + 'BV' => 'Bouvet Adası', + 'BR' => 'Brezilya', + 'BN' => 'Brunei', + 'BG' => 'Bulgaristan', + 'BF' => 'Burkina Faso', + 'BI' => 'Burundi', + 'CV' => 'Cape Verde', + 'KY' => 'Cayman Adaları', + 'GI' => 'Cebelitarık', + 'DZ' => 'Cezayir', + 'CX' => 'Christmas Adası', + 'DJ' => 'Cibuti', + 'CC' => 'Cocos Adaları', + 'CK' => 'Cook Adaları', + 'DK' => 'Danimarka', + 'DO' => 'Dominik Cumhuriyeti', + 'DM' => 'Dominika', + 'TL' => 'Doğu Timor', + 'EC' => 'Ekvador', + 'GQ' => 'Ekvator Ginesi', + 'SV' => 'El Salvador', + 'ID' => 'Endonezya', + 'ER' => 'Eritre', + 'AM' => 'Ermenistan', + 'EE' => 'Estonya', + 'ET' => 'Etiyopya', + 'FK' => 'Falkland Adaları', + 'FO' => 'Faroe Adaları', + 'MA' => 'Fas', + 'FJ' => 'Fiji', + 'CI' => 'Fildişi Sahili', + 'PH' => 'Filipinler', + 'PS' => 'Filistin Bölgesi', + 'FI' => 'Finlandiya', + 'FR' => 'Fransa', + 'GF' => 'Fransız Guyanası', + 'TF' => 'Fransız Güney Bölgeleri', + 'PF' => 'Fransız Polinezyası', + 'GA' => 'Gabon', + 'GM' => 'Gambiya', + 'GH' => 'Gana', + 'GN' => 'Gine', + 'GW' => 'Gine-Bissau', + 'GD' => 'Grenada', + 'GL' => 'Grönland', + 'GP' => 'Guadeloupe', + 'GU' => 'Guam', + 'GT' => 'Guatemala', + 'GG' => 'Guernsey', + 'GY' => 'Guyana', + 'ZA' => 'Güney Afrika', + 'GS' => 'Güney Georgia ve Güney Sandwich Adaları', + 'KR' => 'Güney Kore', + 'CY' => 'Güney Kıbrıs Rum Kesimi', + 'GE' => 'Gürcistan', + 'HT' => 'Haiti', + 'HM' => 'Heard Adası ve McDonald Adaları', + 'IN' => 'Hindistan', + 'IO' => 'Hint Okyanusu İngiliz Bölgesi', + 'NL' => 'Hollanda', + 'AN' => 'Hollanda Antilleri', + 'HN' => 'Honduras', + 'HK' => 'Hong Kong SAR - Çin', + 'HR' => 'Hırvatistan', + 'IQ' => 'Irak', + 'JM' => 'Jamaika', + 'JP' => 'Japonya', + 'JE' => 'Jersey', + 'KH' => 'Kamboçya', + 'CM' => 'Kamerun', + 'CA' => 'Kanada', + 'ME' => 'Karadağ', + 'QA' => 'Katar', + 'KZ' => 'Kazakistan', + 'KE' => 'Kenya', + 'KI' => 'Kiribati', + 'CO' => 'Kolombiya', + 'KM' => 'Komorlar', + 'CG' => 'Kongo - Brazavil', + 'CD' => 'Kongo - Kinşasa', + 'CR' => 'Kosta Rika', + 'KW' => 'Kuveyt', + 'KP' => 'Kuzey Kore', + 'MP' => 'Kuzey Mariana Adaları', + 'CU' => 'Küba', + 'KG' => 'Kırgızistan', + 'LA' => 'Laos', + 'LS' => 'Lesotho', + 'LV' => 'Letonya', + 'LR' => 'Liberya', + 'LY' => 'Libya', + 'LI' => 'Liechtenstein', + 'LT' => 'Litvanya', + 'LB' => 'Lübnan', + 'LU' => 'Lüksemburg', + 'HU' => 'Macaristan', + 'MG' => 'Madagaskar', + 'MO' => 'Makao S.A.R. Çin', + 'MK' => 'Makedonya', + 'MW' => 'Malavi', + 'MV' => 'Maldivler', + 'MY' => 'Malezya', + 'ML' => 'Mali', + 'MT' => 'Malta', + 'IM' => 'Man Adası', + 'MH' => 'Marshall Adaları', + 'MQ' => 'Martinik', + 'MU' => 'Mauritius', + 'YT' => 'Mayotte', + 'MX' => 'Meksika', + 'FM' => 'Mikronezya Federal Eyaletleri', + 'MD' => 'Moldova', + 'MC' => 'Monako', + 'MS' => 'Montserrat', + 'MR' => 'Moritanya', + 'MZ' => 'Mozambik', + 'MN' => 'Moğolistan', + 'MM' => 'Myanmar', + 'EG' => 'Mısır', + 'NA' => 'Namibya', + 'NR' => 'Nauru', + 'NP' => 'Nepal', + 'NE' => 'Nijer', + 'NG' => 'Nijerya', + 'NI' => 'Nikaragua', + 'NU' => 'Niue', + 'NF' => 'Norfolk Adası', + 'NO' => 'Norveç', + 'CF' => 'Orta Afrika Cumhuriyeti', + 'PK' => 'Pakistan', + 'PW' => 'Palau', + 'PA' => 'Panama', + 'PG' => 'Papua Yeni Gine', + 'PY' => 'Paraguay', + 'PE' => 'Peru', + 'PN' => 'Pitcairn', + 'PL' => 'Polonya', + 'PT' => 'Portekiz', + 'PR' => 'Porto Riko', + 'RE' => 'Reunion', + 'RO' => 'Romanya', + 'RW' => 'Ruanda', + 'RU' => 'Rusya Federasyonu', + 'BL' => 'Saint Barthelemy', + 'SH' => 'Saint Helena', + 'KN' => 'Saint Kitts ve Nevis', + 'LC' => 'Saint Lucia', + 'MF' => 'Saint Martin', + 'PM' => 'Saint Pierre ve Miquelon', + 'VC' => 'Saint Vincent ve Grenadinler', + 'WS' => 'Samoa', + 'SM' => 'San Marino', + 'ST' => 'Sao Tome ve Principe', + 'SN' => 'Senegal', + 'SC' => 'Seyşel Adaları', + 'SL' => 'Sierra Leone', + 'SG' => 'Singapur', + 'SK' => 'Slovakya', + 'SI' => 'Slovenya', + 'SB' => 'Solomon Adaları', + 'SO' => 'Somali', + 'LK' => 'Sri Lanka', + 'SD' => 'Sudan', + 'SR' => 'Surinam', + 'SY' => 'Suriye', + 'SA' => 'Suudi Arabistan', + 'SJ' => 'Svalbard ve Jan Mayen', + 'SZ' => 'Svaziland', + 'RS' => 'Sırbistan', + 'CS' => 'Sırbistan-Karadağ', + 'TJ' => 'Tacikistan', + 'TZ' => 'Tanzanya', + 'TH' => 'Tayland', + 'TW' => 'Tayvan', + 'TG' => 'Togo', + 'TK' => 'Tokelau', + 'TO' => 'Tonga', + 'TT' => 'Trinidad ve Tobago', + 'TN' => 'Tunus', + 'TC' => 'Turks ve Caicos Adaları', + 'TV' => 'Tuvalu', + 'TR' => 'Türkiye', + 'TM' => 'Türkmenistan', + 'UG' => 'Uganda', + 'UA' => 'Ukrayna', + 'OM' => 'Umman', + 'UY' => 'Uruguay', + 'VU' => 'Vanuatu', + 'VA' => 'Vatikan', + 'VE' => 'Venezuela', + 'VN' => 'Vietnam', + 'WF' => 'Wallis ve Futuna', + 'YE' => 'Yemen', + 'NC' => 'Yeni Kaledonya', + 'NZ' => 'Yeni Zelanda', + 'GR' => 'Yunanistan', + 'ZM' => 'Zambiya', + 'ZW' => 'Zimbabve', + 'TD' => 'Çad', + 'CZ' => 'Çek Cumhuriyeti', + 'CN' => 'Çin', + 'UZ' => 'Özbekistan', + 'JO' => 'Ürdün', + 'VG' => 'İngiliz Virgin Adaları', + 'IR' => 'İran', + 'IE' => 'İrlanda', + 'ES' => 'İspanya', + 'IL' => 'İsrail', + 'SE' => 'İsveç', + 'CH' => 'İsviçre', + 'IT' => 'İtalya', + 'IS' => 'İzlanda', + 'CL' => 'Şili', +); diff --git a/application/helpers/country-list/vi/country.php b/application/helpers/country-list/vi/country.php new file mode 100644 index 0000000..0906129 --- /dev/null +++ b/application/helpers/country-list/vi/country.php @@ -0,0 +1,238 @@ + 'A-rập Xê-út', + 'EG' => 'Ai Cập', + 'AZ' => 'Ai-déc-bai-gian', + 'IE' => 'Ai-len', + 'IS' => 'Ai-xơ-len', + 'AL' => 'An-ba-ni', + 'DZ' => 'An-giê-ri', + 'AG' => 'An-ti-gu-a và Ba-bu-đa', + 'AD' => 'Andorra', + 'BL' => 'BL', + 'PL' => 'Ba Lan', + 'BS' => 'Ba-ha-ma', + 'BH' => 'Ba-ren', + 'BR' => 'Bra-xin', + 'BN' => 'Bru-nây', + 'BI' => 'Bu-run-đi', + 'BT' => 'Bu-tan (Bhutan)', + 'BG' => 'Bun-ga-ri', + 'BF' => 'Buốc-ki-na Pha-xô', + 'BB' => 'Bác-ba-đốt', + 'BY' => 'Bê-la-rút', + 'BZ' => 'Bê-li-xê', + 'BJ' => 'Bê-nanh', + 'BO' => 'Bô-li-vi-a', + 'BA' => 'Bô-xni-a Héc-xê-gô-vi-na', + 'GL' => 'Băng Đảo', + 'BD' => 'Băng-la-đét', + 'KP' => 'Bắc Triều Tiên', + 'BE' => 'Bỉ', + 'BW' => 'Bốt-xoa-na', + 'PT' => 'Bồ Đào Nha', + 'CI' => 'Bờ Biển Ngà', + 'CM' => 'Ca-mơ-run', + 'CA' => 'Ca-na-đa', + 'QA' => 'Ca-ta', + 'KH' => 'Campuchia', + 'CL' => 'Chi-lê', + 'HR' => 'Crô-a-ti-a', + 'CU' => 'Cu Ba', + 'AE' => 'Các Tiểu Vương quốc A-rập Thống nhất', + 'UM' => 'Các đảo nhỏ xa trung tâm thuộc Mỹ', + 'CV' => 'Cáp-ve', + 'CO' => 'Cô-lôm-bi-a', + 'KM' => 'Cô-mô', + 'KW' => 'Cô-oét', + 'CG' => 'Công-gô', + 'KG' => 'Cư-rơ-gư-xtan', + 'CR' => 'Cốt-xta Ri-ca', + 'CD' => 'Cộng hoà dân chủ Côngô', + 'DO' => 'Cộng hoà Đô-mi-ni-ca', + 'CZ' => 'Cộng hòa Séc', + 'CF' => 'Cộng hòa Trung Phi', + 'ZW' => 'Dim-ba-bu-ê', + 'ZM' => 'Dăm-bi-a', + 'EE' => 'E-xtô-ni-a', + 'SV' => 'En-san-va-đo', + 'GA' => 'Ga-bông', + 'GH' => 'Gha-na', + 'GN' => 'Ghi-nê', + 'GW' => 'Ghi-nê Bít-xao', + 'GQ' => 'Ghi-nê Xích-đạo', + 'DJ' => 'Gi-bu-ti', + 'JO' => 'Gióc-đa-ni', + 'GT' => 'Goa-tê-ma-la', + 'GE' => 'Gru-di-a', + 'GD' => 'Grê-na-đa', + 'GG' => 'Guernsey', + 'GY' => 'Guy-a-na', + 'GM' => 'Găm-bi-a', + 'HT' => 'Ha-i-ti', + 'JM' => 'Ha-mai-ca', + 'US' => 'Hoa Kỳ', + 'HU' => 'Hung-ga-ri', + 'GR' => 'Hy Lạp', + 'NL' => 'Hà Lan', + 'KR' => 'Hàn Quốc', + 'HN' => 'Hôn-đu-rát', + 'IR' => 'I-ran', + 'IQ' => 'I-rắc', + 'IL' => 'I-xra-en', + 'JE' => 'Jersey', + 'KZ' => 'Ka-dắc-xtan', + 'KI' => 'Ki-ri-ba-ti', + 'KE' => 'Kê-ni-a', + 'LY' => 'Li-bi', + 'LR' => 'Li-bê-ri-a', + 'LB' => 'Li-băng', + 'LT' => 'Li-tu-a-ni-a', + 'LI' => 'Lich-ten-xtên', + 'LA' => 'Lào', + 'LV' => 'Lát-vi-a', + 'PS' => 'Lãnh thổ Palestine', + 'LS' => 'Lê-xô-thô', + 'LU' => 'Lúc-xăm-bua', + 'MF' => 'MF', + 'MQ' => 'MQ', + 'MW' => 'Ma-la-uy', + 'MY' => 'Ma-lay-xi-a', + 'ML' => 'Ma-li', + 'MA' => 'Ma-rốc', + 'MK' => 'Ma-xê-đô-ni-a', + 'MG' => 'Ma-đa-gát-xca', + 'MT' => 'Man-ta', + 'MV' => 'Man-đi-vơ', + 'MM' => 'Mi-an-ma', + 'FM' => 'Mi-crô-nê-xi-a', + 'ME' => 'Montenegro', + 'MX' => 'Mê-hi-cô', + 'MZ' => 'Mô-dăm-bích', + 'MC' => 'Mô-na-cô', + 'MR' => 'Mô-ri-ta-ni', + 'MU' => 'Mô-ri-xơ', + 'MD' => 'Môn-đô-va', + 'MN' => 'Mông Cổ', + 'NO' => 'Na Uy', + 'AQ' => 'Nam Cực', + 'ID' => 'Nam Dương', + 'ZA' => 'Nam Phi', + 'NA' => 'Nam-mi-bi-a', + 'NC' => 'New Caledonia', + 'RU' => 'Nga', + 'JP' => 'Nhật Bản', + 'NI' => 'Ni-ca-ra-goa', + 'NE' => 'Ni-giê', + 'NG' => 'Ni-giê-ri-a', + 'NZ' => 'Niu Di-lân', + 'NP' => 'Nê-pan', + 'PK' => 'Pa-ki-xtan', + 'PA' => 'Pa-na-ma', + 'PG' => 'Pa-pu-a Niu Ghi-nê', + 'PY' => 'Pa-ra-goay', + 'FJ' => 'Phi-gi', + 'PH' => 'Phi-lip-pin', + 'FR' => 'Pháp', + 'FI' => 'Phần Lan', + 'PF' => 'Polynesia thuộc Pháp', + 'PE' => 'Pê-ru', + 'GF' => 'Quiana thuộc Pháp', + 'MP' => 'Quần Đảo Bắc Mariana', + 'KY' => 'Quần Đảo Cayman', + 'CK' => 'Quần Đảo Cook', + 'FK' => 'Quần Đảo Falkland', + 'FO' => 'Quần Đảo Faroe', + 'TC' => 'Quần Đảo Turk và Caicos', + 'AX' => 'Quần đảo Aland', + 'CC' => 'Quần đảo Cocos', + 'MH' => 'Quần đảo Mác-san', + 'GS' => 'Quần đảo Nam Georgia và Nam Sandwich', + 'VI' => 'Quần đảo Virgin, Mỹ', + 'SB' => 'Quần đảo Xô-lô-mông', + 'RE' => 'RE', + 'RW' => 'Ru-an-đa', + 'RO' => 'Ru-ma-ni', + 'SH' => 'Saint Helena', + 'PM' => 'Saint Pierre và Miquelon', + 'SJ' => 'Svalbard và Jan Mayen', + 'TD' => 'Sát', + 'CS' => 'Séc-bia', + 'CY' => 'Síp', + 'TZ' => 'Tan-da-ni-a', + 'TF' => 'Thuộc Địa Nam của Pháp', + 'IO' => 'Thuộc địa Anh tại Ấn Độ Dương', + 'TH' => 'Thái Lan', + 'TR' => 'Thổ Nhĩ Kỳ', + 'CH' => 'Thụy Sĩ', + 'SE' => 'Thụy Điển', + 'TK' => 'Tokelau', + 'TT' => 'Tri-ni-đát và Tô-ba-gô', + 'CN' => 'Trung Quốc', + 'TV' => 'Tu-va-lu', + 'TN' => 'Tuy-ni-di', + 'TM' => 'Tuốc-mê-ni-xtan', + 'TJ' => 'Tát-gi-ki-xtan', + 'ES' => 'Tây Ban Nha', + 'EH' => 'Tây Sahara', + 'AN' => 'Tây Ấn Hà Lan', + 'TG' => 'Tô-gô', + 'TO' => 'Tông-ga', + 'UA' => 'U-crai-na', + 'UZ' => 'U-dơ-bê-ki-xtan', + 'UG' => 'U-gan-đa', + 'UY' => 'U-ru-goay', + 'VU' => 'Va-nu-a-tu', + 'VA' => 'Va-ti-căng', + 'VN' => 'Việt Nam', + 'VE' => 'Vê-nê-zu-ê-la', + 'ZZ' => 'Vùng Chưa biết hoặc không Hợp lệ', + 'GB' => 'Vương quốc Anh', + 'WF' => 'Wallis và Futuna', + 'WS' => 'Xa-moa', + 'LC' => 'Xan Lu-xi', + 'SM' => 'Xan Ma-ri-nô', + 'VC' => 'Xan Vin-xen và Grê-na-din', + 'KN' => 'Xan-kít và Nê-vi', + 'ST' => 'Xao Tô-mê và Prin-xi-pê', + 'SY' => 'Xi-ri', + 'SL' => 'Xi-ê-ra Lê-ôn', + 'SG' => 'Xin-ga-po', + 'SK' => 'Xlô-va-ki-a', + 'SI' => 'Xlô-ven-ni-a', + 'SZ' => 'Xoa-di-len', + 'LK' => 'Xri Lan-ca', + 'SR' => 'Xu-ri-nam', + 'SD' => 'Xu-đăng', + 'SC' => 'Xây-sen', + 'RS' => 'Xéc-bi', + 'SN' => 'Xê-nê-gan', + 'SO' => 'Xô-ma-li', + 'YE' => 'Y-ê-men', + 'YT' => 'YT', + 'AR' => 'Ác-hen-ti-na', + 'AM' => 'Ác-mê-ni-a', + 'AT' => 'Áo', + 'AF' => 'Áp-ga-ni-xtan', + 'EC' => 'Ê-cu-a-đo', + 'ER' => 'Ê-ri-tơ-rê-a', + 'ET' => 'Ê-ti-ô-pi-a', + 'OM' => 'Ô-man', + 'AU' => 'Úc', + 'IT' => 'Ý', + 'AO' => 'Ăng-gô-la', + 'DK' => 'Đan Mạch', + 'TW' => 'Đài Loan', + 'TL' => 'Đông Ti-mo', + 'BV' => 'Đảo Bouvet (Na Uy)', + 'CX' => 'Đảo Giáng Sinh', + 'GU' => 'Đảo Gu-am', + 'HM' => 'Đảo Heard và Quần đảo McDonald', + 'IM' => 'Đảo Man', + 'NF' => 'Đảo Norfolk', + 'AS' => 'Đảo Somoa thuộc Mỹ', + 'VG' => 'Đảo Virgin, thuộc Anh', + 'HK' => 'Đặc khu hành chính Hồng Kông thuộc CHND Trung Hoa', + 'MO' => 'Đặc khu hành chính Macao thuộc CHND Trung Hoa', + 'DE' => 'Đức', + 'IN' => 'Ấn Độ', +); diff --git a/application/helpers/country_helper.php b/application/helpers/country_helper.php new file mode 100644 index 0000000..fa62ec2 --- /dev/null +++ b/application/helpers/country_helper.php @@ -0,0 +1,40 @@ + country, translated in the language $cldr. + * If there is no translated country list, return the english one. + * + * @param $cldr + * @return mixed + */ +function get_country_list($cldr) +{ + if (file_exists(APPPATH . 'helpers/country-list/' . $cldr . '/country.php')) { + return (include APPPATH . 'helpers/country-list/' . $cldr . '/country.php'); + } else { + return (include APPPATH . 'helpers/country-list/en/country.php'); + } +} + +/** + * Returns the countryname of a given $countrycode, translated in the language $cldr. + * + * @param $cldr + * @param $countrycode + * @return mixed + */ +function get_country_name($cldr, $countrycode) +{ + $countries = get_country_list($cldr); + return (isset($countries[$countrycode]) ? $countries[$countrycode] : $countrycode); +} diff --git a/application/helpers/custom_values_helper.php b/application/helpers/custom_values_helper.php new file mode 100644 index 0000000..f18fc25 --- /dev/null +++ b/application/helpers/custom_values_helper.php @@ -0,0 +1,200 @@ +load->model('custom_values/mdl_custom_values', 'cv'); + $el = $CI->cv->get_by_id($txt)->row(); + + return $el->custom_values_value; +} + +/** + * @param $txt + * @return string + */ +function format_multiplechoice($txt) +{ + if ($txt == null) { + return ''; + } + + $CI = get_instance(); + $CI->load->model('custom_values/mdl_custom_values', 'cv'); + + $values = explode(',', $txt); + $values = $CI->cv->where_in('custom_values_id', $values)->get()->result(); + $values_text = []; + + foreach ($values as $value) { + $values_text[] = $value->custom_values_value; + } + + return implode("\n", $values_text); +} + +function format_boolean($txt) +{ + if ($txt == null) { + return ''; + } + + if ($txt == '1') { + return trans('true'); + } else if ($txt == '0') { + return trans('false'); + } + + return ''; +} + +function format_avs($txt) +{ + if (!preg_match('/(\d{3})(\d{4})(\d{4})(\d{2})/', $txt, $matches)) { + return $txt; + } + return $matches[1] . "." . $matches[2] . "." . $matches[3] . "." . $matches[4]; + +} + +/** + * @param $txt + * @return string + */ +function format_fallback($txt) +{ + return format_text($txt); +} + +/** + * Print a custom form field based on the type + * @param $module + * @param $custom_field + * @param $cv + * @param string $class_top + * @param string $class_bottom + * @param string $label_class + */ +function print_field($module, $custom_field, $cv, $class_top = '', $class_bottom = 'controls', $label_class = '') +{ + ?> +
    +
    + + for="custom[custom_field_id; ?>]"> + custom_field_label); ?> + +
    + form_value('custom[' . $custom_field->custom_field_id . ']'); ?> +
    + custom_field_type) { + case 'DATE': + $dateValue = ($fieldValue == "" ? "" : date_from_mysql($fieldValue)); + ?> + + custom_field_id]; + + ?> + + custom_field_id]; + $selChoices = explode(',', $fieldValue); ?> + + + + + + + +
    +
    + array( + 'setting' => 'm/d/Y', + 'datepicker' => 'mm/dd/yyyy' + ), + 'm-d-Y' => array( + 'setting' => 'm-d-Y', + 'datepicker' => 'mm-dd-yyyy' + ), + 'm.d.Y' => array( + 'setting' => 'm.d.Y', + 'datepicker' => 'mm.dd.yyyy' + ), + 'Y/m/d' => array( + 'setting' => 'Y/m/d', + 'datepicker' => 'yyyy/mm/dd' + ), + 'Y-m-d' => array( + 'setting' => 'Y-m-d', + 'datepicker' => 'yyyy-mm-dd' + ), + 'Y.m.d' => array( + 'setting' => 'Y.m.d', + 'datepicker' => 'yyyy.mm.dd' + ), + 'd/m/Y' => array( + 'setting' => 'd/m/Y', + 'datepicker' => 'dd/mm/yyyy' + ), + 'd-m-Y' => array( + 'setting' => 'd-m-Y', + 'datepicker' => 'dd-mm-yyyy' + ), + 'd-M-Y' => array( + 'setting' => 'd-M-Y', + 'datepicker' => 'dd-M-yyyy' + ), + 'd.m.Y' => array( + 'setting' => 'd.m.Y', + 'datepicker' => 'dd.mm.yyyy' + ), + 'j.n.Y' => array( + 'setting' => 'j.n.Y', + 'datepicker' => 'd.m.yyyy' + ), + 'd M,Y' => array( + 'setting' => 'd M,Y', + 'datepicker' => 'dd M,yyyy' + ), + ); +} + +/** + * @param $date + * @param bool $ignore_post_check + * @return bool|DateTime|string + */ +function date_from_mysql($date, $ignore_post_check = false) +{ + if ($date <> '0000-00-00') { + if (!$_POST or $ignore_post_check) { + $CI = &get_instance(); + + $date = DateTime::createFromFormat('Y-m-d', $date); + return $date->format($CI->mdl_settings->setting('date_format')); + } + return $date; + } + return ''; +} + +/** + * @param $timestamp + * @return string + */ +function date_from_timestamp($timestamp) +{ + $CI = &get_instance(); + + $date = new DateTime(); + $date->setTimestamp($timestamp); + return $date->format($CI->mdl_settings->setting('date_format')); +} + +/** + * @param $date + * @return string + */ +function date_to_mysql($date) +{ + $CI = &get_instance(); + + $date = DateTime::createFromFormat($CI->mdl_settings->setting('date_format'), $date); + return $date->format('Y-m-d'); +} + +/** + * @param $date + * @return bool + */ +function is_date($date) +{ + $CI = &get_instance(); + $format = $CI->mdl_settings->setting('date_format'); + $d = DateTime::createFromFormat($format, $date); + return $d && $d->format($format) == $date; +} + +/** + * @return string + */ +function date_format_setting() +{ + $CI = &get_instance(); + + $date_format = $CI->mdl_settings->setting('date_format'); + + $date_formats = date_formats(); + + return $date_formats[$date_format]['setting']; +} + +/** + * @return string + */ +function date_format_datepicker() +{ + $CI = &get_instance(); + + $date_format = $CI->mdl_settings->setting('date_format'); + + $date_formats = date_formats(); + + return $date_formats[$date_format]['datepicker']; +} + +/** + * Adds interval to user formatted date and returns user formatted date + * To be used when date is being output back to user. + * + * @param $date - user formatted date + * @param $increment - interval (1D, 2M, 1Y, etc) + * @return string + */ +function increment_user_date($date, $increment) +{ + $CI = &get_instance(); + + $mysql_date = date_to_mysql($date); + + $new_date = new DateTime($mysql_date); + $new_date->add(new DateInterval('P' . $increment)); + + return $new_date->format($CI->mdl_settings->setting('date_format')); +} + +/** + * Adds interval to yyyy-mm-dd date and returns in same format + * + * @param $date + * @param $increment + * @return string + */ +function increment_date($date, $increment) +{ + $new_date = new DateTime($date); + $new_date->add(new DateInterval('P' . $increment)); + return $new_date->format('Y-m-d'); +} diff --git a/application/helpers/diacritics_helper.php b/application/helpers/diacritics_helper.php new file mode 100644 index 0000000..b100fb1 --- /dev/null +++ b/application/helpers/diacritics_helper.php @@ -0,0 +1,306 @@ + 'A', chr(195) . chr(129) => 'A', + chr(195) . chr(130) => 'A', chr(195) . chr(131) => 'A', + chr(195) . chr(132) => 'A', chr(195) . chr(133) => 'A', + chr(195) . chr(135) => 'C', chr(195) . chr(136) => 'E', + chr(195) . chr(137) => 'E', chr(195) . chr(138) => 'E', + chr(195) . chr(139) => 'E', chr(195) . chr(140) => 'I', + chr(195) . chr(141) => 'I', chr(195) . chr(142) => 'I', + chr(195) . chr(143) => 'I', chr(195) . chr(145) => 'N', + chr(195) . chr(146) => 'O', chr(195) . chr(147) => 'O', + chr(195) . chr(148) => 'O', chr(195) . chr(149) => 'O', + chr(195) . chr(150) => 'O', chr(195) . chr(153) => 'U', + chr(195) . chr(154) => 'U', chr(195) . chr(155) => 'U', + chr(195) . chr(156) => 'U', chr(195) . chr(157) => 'Y', + chr(195) . chr(159) => 's', chr(195) . chr(160) => 'a', + chr(195) . chr(161) => 'a', chr(195) . chr(162) => 'a', + chr(195) . chr(163) => 'a', chr(195) . chr(164) => 'a', + chr(195) . chr(165) => 'a', chr(195) . chr(167) => 'c', + chr(195) . chr(168) => 'e', chr(195) . chr(169) => 'e', + chr(195) . chr(170) => 'e', chr(195) . chr(171) => 'e', + chr(195) . chr(172) => 'i', chr(195) . chr(173) => 'i', + chr(195) . chr(174) => 'i', chr(195) . chr(175) => 'i', + chr(195) . chr(177) => 'n', chr(195) . chr(178) => 'o', + chr(195) . chr(179) => 'o', chr(195) . chr(180) => 'o', + chr(195) . chr(181) => 'o', chr(195) . chr(182) => 'o', + chr(195) . chr(182) => 'o', chr(195) . chr(185) => 'u', + chr(195) . chr(186) => 'u', chr(195) . chr(187) => 'u', + chr(195) . chr(188) => 'u', chr(195) . chr(189) => 'y', + chr(195) . chr(191) => 'y', + // Decompositions for Latin Extended-A + chr(196) . chr(128) => 'A', chr(196) . chr(129) => 'a', + chr(196) . chr(130) => 'A', chr(196) . chr(131) => 'a', + chr(196) . chr(132) => 'A', chr(196) . chr(133) => 'a', + chr(196) . chr(134) => 'C', chr(196) . chr(135) => 'c', + chr(196) . chr(136) => 'C', chr(196) . chr(137) => 'c', + chr(196) . chr(138) => 'C', chr(196) . chr(139) => 'c', + chr(196) . chr(140) => 'C', chr(196) . chr(141) => 'c', + chr(196) . chr(142) => 'D', chr(196) . chr(143) => 'd', + chr(196) . chr(144) => 'D', chr(196) . chr(145) => 'd', + chr(196) . chr(146) => 'E', chr(196) . chr(147) => 'e', + chr(196) . chr(148) => 'E', chr(196) . chr(149) => 'e', + chr(196) . chr(150) => 'E', chr(196) . chr(151) => 'e', + chr(196) . chr(152) => 'E', chr(196) . chr(153) => 'e', + chr(196) . chr(154) => 'E', chr(196) . chr(155) => 'e', + chr(196) . chr(156) => 'G', chr(196) . chr(157) => 'g', + chr(196) . chr(158) => 'G', chr(196) . chr(159) => 'g', + chr(196) . chr(160) => 'G', chr(196) . chr(161) => 'g', + chr(196) . chr(162) => 'G', chr(196) . chr(163) => 'g', + chr(196) . chr(164) => 'H', chr(196) . chr(165) => 'h', + chr(196) . chr(166) => 'H', chr(196) . chr(167) => 'h', + chr(196) . chr(168) => 'I', chr(196) . chr(169) => 'i', + chr(196) . chr(170) => 'I', chr(196) . chr(171) => 'i', + chr(196) . chr(172) => 'I', chr(196) . chr(173) => 'i', + chr(196) . chr(174) => 'I', chr(196) . chr(175) => 'i', + chr(196) . chr(176) => 'I', chr(196) . chr(177) => 'i', + chr(196) . chr(178) => 'IJ', chr(196) . chr(179) => 'ij', + chr(196) . chr(180) => 'J', chr(196) . chr(181) => 'j', + chr(196) . chr(182) => 'K', chr(196) . chr(183) => 'k', + chr(196) . chr(184) => 'k', chr(196) . chr(185) => 'L', + chr(196) . chr(186) => 'l', chr(196) . chr(187) => 'L', + chr(196) . chr(188) => 'l', chr(196) . chr(189) => 'L', + chr(196) . chr(190) => 'l', chr(196) . chr(191) => 'L', + chr(197) . chr(128) => 'l', chr(197) . chr(129) => 'L', + chr(197) . chr(130) => 'l', chr(197) . chr(131) => 'N', + chr(197) . chr(132) => 'n', chr(197) . chr(133) => 'N', + chr(197) . chr(134) => 'n', chr(197) . chr(135) => 'N', + chr(197) . chr(136) => 'n', chr(197) . chr(137) => 'N', + chr(197) . chr(138) => 'n', chr(197) . chr(139) => 'N', + chr(197) . chr(140) => 'O', chr(197) . chr(141) => 'o', + chr(197) . chr(142) => 'O', chr(197) . chr(143) => 'o', + chr(197) . chr(144) => 'O', chr(197) . chr(145) => 'o', + chr(197) . chr(146) => 'OE', chr(197) . chr(147) => 'oe', + chr(197) . chr(148) => 'R', chr(197) . chr(149) => 'r', + chr(197) . chr(150) => 'R', chr(197) . chr(151) => 'r', + chr(197) . chr(152) => 'R', chr(197) . chr(153) => 'r', + chr(197) . chr(154) => 'S', chr(197) . chr(155) => 's', + chr(197) . chr(156) => 'S', chr(197) . chr(157) => 's', + chr(197) . chr(158) => 'S', chr(197) . chr(159) => 's', + chr(197) . chr(160) => 'S', chr(197) . chr(161) => 's', + chr(197) . chr(162) => 'T', chr(197) . chr(163) => 't', + chr(197) . chr(164) => 'T', chr(197) . chr(165) => 't', + chr(197) . chr(166) => 'T', chr(197) . chr(167) => 't', + chr(197) . chr(168) => 'U', chr(197) . chr(169) => 'u', + chr(197) . chr(170) => 'U', chr(197) . chr(171) => 'u', + chr(197) . chr(172) => 'U', chr(197) . chr(173) => 'u', + chr(197) . chr(174) => 'U', chr(197) . chr(175) => 'u', + chr(197) . chr(176) => 'U', chr(197) . chr(177) => 'u', + chr(197) . chr(178) => 'U', chr(197) . chr(179) => 'u', + chr(197) . chr(180) => 'W', chr(197) . chr(181) => 'w', + chr(197) . chr(182) => 'Y', chr(197) . chr(183) => 'y', + chr(197) . chr(184) => 'Y', chr(197) . chr(185) => 'Z', + chr(197) . chr(186) => 'z', chr(197) . chr(187) => 'Z', + chr(197) . chr(188) => 'z', chr(197) . chr(189) => 'Z', + chr(197) . chr(190) => 'z', chr(197) . chr(191) => 's', + // Euro Sign + chr(226) . chr(130) . chr(172) => 'E', + // GBP (Pound) Sign + chr(194) . chr(163) => ''); + + $string = strtr($string, $chars); + } else { + // Assume ISO-8859-1 if not UTF-8 + $chars['in'] = chr(128) . chr(131) . chr(138) . chr(142) . chr(154) . chr(158) + . chr(159) . chr(162) . chr(165) . chr(181) . chr(192) . chr(193) . chr(194) + . chr(195) . chr(196) . chr(197) . chr(199) . chr(200) . chr(201) . chr(202) + . chr(203) . chr(204) . chr(205) . chr(206) . chr(207) . chr(209) . chr(210) + . chr(211) . chr(212) . chr(213) . chr(214) . chr(216) . chr(217) . chr(218) + . chr(219) . chr(220) . chr(221) . chr(224) . chr(225) . chr(226) . chr(227) + . chr(228) . chr(229) . chr(231) . chr(232) . chr(233) . chr(234) . chr(235) + . chr(236) . chr(237) . chr(238) . chr(239) . chr(241) . chr(242) . chr(243) + . chr(244) . chr(245) . chr(246) . chr(248) . chr(249) . chr(250) . chr(251) + . chr(252) . chr(253) . chr(255); + + $chars['out'] = 'EfSZszYcYuAAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyy'; + + $string = strtr($string, $chars['in'], $chars['out']); + $double_chars['in'] = array(chr(140), chr(156), chr(198), chr(208), chr(222), chr(223), chr(230), chr(240), chr(254)); + $double_chars['out'] = array('OE', 'oe', 'AE', 'DH', 'TH', 'ss', 'ae', 'dh', 'th'); + $string = str_replace($double_chars['in'], $double_chars['out'], $string); + } + + return $string; +} + +/** + * @param string $text + * @return string + */ +function diacritics_remove_diacritics($text) +{ + $trans = array( + 'À' => 'A', 'Á' => 'A', 'Â' => 'A', 'Ã' => 'A', 'Ä' => 'A', 'Å' => 'A', 'Ç' => 'C', 'È' => 'E', + 'É' => 'E', 'Ê' => 'E', 'Ë' => 'E', 'Ì' => 'I', 'Í' => 'I', 'Î' => 'I', 'Ï' => 'I', 'Ñ' => 'N', + 'Ò' => 'O', 'Ó' => 'O', 'Ô' => 'O', 'Õ' => 'O', 'Ö' => 'O', 'Ø' => 'O', 'Ù' => 'U', 'Ú' => 'U', + 'Û' => 'U', 'Ü' => 'U', 'Ý' => 'Y', 'à' => 'a', 'á' => 'a', 'â' => 'a', 'ã' => 'a', 'ä' => 'a', + 'å' => 'a', 'ç' => 'c', 'è' => 'e', 'é' => 'e', 'ê' => 'e', 'ë' => 'e', 'ì' => 'i', 'í' => 'i', + 'î' => 'i', 'ï' => 'i', 'ñ' => 'n', 'ò' => 'o', 'ó' => 'o', 'ô' => 'o', 'õ' => 'o', 'ö' => 'o', + 'ø' => 'o', 'ù' => 'u', 'ú' => 'u', 'û' => 'u', 'ü' => 'u', 'ý' => 'y', 'ÿ' => 'y', 'Ā' => 'A', + 'ā' => 'a', 'Ă' => 'A', 'ă' => 'a', 'Ą' => 'A', 'ą' => 'a', 'Ć' => 'C', 'ć' => 'c', 'Ĉ' => 'C', + 'ĉ' => 'c', 'Ċ' => 'C', 'ċ' => 'c', 'Č' => 'C', 'č' => 'c', 'Ď' => 'D', 'ď' => 'd', 'Đ' => 'D', + 'đ' => 'd', 'Ē' => 'E', 'ē' => 'e', 'Ĕ' => 'E', 'ĕ' => 'e', 'Ė' => 'E', 'ė' => 'e', 'Ę' => 'E', + 'ę' => 'e', 'Ě' => 'E', 'ě' => 'e', 'Ĝ' => 'G', 'ĝ' => 'g', 'Ğ' => 'G', 'ğ' => 'g', 'Ġ' => 'G', + 'ġ' => 'g', 'Ģ' => 'G', 'ģ' => 'g', 'Ĥ' => 'H', 'ĥ' => 'h', 'Ħ' => 'H', 'ħ' => 'h', 'Ĩ' => 'I', + 'ĩ' => 'i', 'Ī' => 'I', 'ī' => 'i', 'Ĭ' => 'I', 'ĭ' => 'i', 'Į' => 'I', 'į' => 'i', 'İ' => 'I', + 'ı' => 'i', 'Ĵ' => 'J', 'ĵ' => 'j', 'Ķ' => 'K', 'ķ' => 'k', 'Ĺ' => 'L', 'ĺ' => 'l', 'Ļ' => 'L', + 'ļ' => 'l', 'Ľ' => 'L', 'ľ' => 'l', 'Ŀ' => 'L', 'ŀ' => 'l', 'Ł' => 'L', 'ł' => 'l', 'Ń' => 'N', + 'ń' => 'n', 'Ņ' => 'N', 'ņ' => 'n', 'Ň' => 'N', 'ň' => 'n', 'ʼn' => 'n', 'Ō' => 'O', 'ō' => 'o', + 'Ŏ' => 'O', 'ŏ' => 'o', 'Ő' => 'O', 'ő' => 'o', 'Ŕ' => 'R', 'ŕ' => 'r', 'Ŗ' => 'R', 'ŗ' => 'r', + 'Ř' => 'R', 'ř' => 'r', 'Ś' => 'S', 'ś' => 's', 'Ŝ' => 'S', 'ŝ' => 's', 'Ş' => 'S', 'ş' => 's', + 'Š' => 'S', 'š' => 's', 'Ţ' => 'T', 'ţ' => 't', 'Ť' => 'T', 'ť' => 't', 'Ŧ' => 'T', 'ŧ' => 't', + 'Ũ' => 'U', 'ũ' => 'u', 'Ū' => 'U', 'ū' => 'u', 'Ŭ' => 'U', 'ŭ' => 'u', 'Ů' => 'U', 'ů' => 'u', + 'Ű' => 'U', 'ű' => 'u', 'Ų' => 'U', 'ų' => 'u', 'Ŵ' => 'W', 'ŵ' => 'w', 'Ŷ' => 'Y', 'ŷ' => 'y', + 'Ÿ' => 'Y', 'Ź' => 'Z', 'ź' => 'z', 'Ż' => 'Z', 'ż' => 'z', 'Ž' => 'Z', 'ž' => 'z', 'ƀ' => 'b', + 'Ɓ' => 'B', 'Ƃ' => 'B', 'ƃ' => 'b', 'Ƈ' => 'C', 'ƈ' => 'c', 'Ɗ' => 'D', 'Ƌ' => 'D', 'ƌ' => 'd', + 'Ƒ' => 'F', 'ƒ' => 'f', 'Ɠ' => 'G', 'Ɨ' => 'I', 'Ƙ' => 'K', 'ƙ' => 'k', 'ƚ' => 'l', 'Ɲ' => 'N', + 'ƞ' => 'n', 'Ɵ' => 'O', 'Ơ' => 'O', 'ơ' => 'o', 'Ƥ' => 'P', 'ƥ' => 'p', 'ƫ' => 't', 'Ƭ' => 'T', + 'ƭ' => 't', 'Ʈ' => 'T', 'Ư' => 'U', 'ư' => 'u', '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 'ᵯ' => 'm', 'ᵰ' => 'n', 'ᵱ' => 'p', 'ᵲ' => 'r', 'ᵳ' => 'r', 'ᵴ' => 's', 'ᵵ' => 't', + 'ᵶ' => 'z', 'ᵻ' => 'i', 'ᵽ' => 'p', 'ᵾ' => 'u', 'ᶀ' => 'b', 'ᶁ' => 'd', 'ᶂ' => 'f', 'ᶃ' => 'g', + 'ᶄ' => 'k', 'ᶅ' => 'l', 'ᶆ' => 'm', 'ᶇ' => 'n', 'ᶈ' => 'p', 'ᶉ' => 'r', 'ᶊ' => 's', 'ᶌ' => 'v', + 'ᶍ' => 'x', 'ᶎ' => 'z', 'ᶏ' => 'a', 'ᶑ' => 'd', 'ᶒ' => 'e', 'ᶖ' => 'i', 'ᶙ' => 'u', '᷊' => 'r', + 'ᷗ' => 'c', 'ᷚ' => 'g', 'ᷜ' => 'k', 'ᷝ' => 'l', 'ᷠ' => 'n', 'ᷣ' => 'r', 'ᷤ' => 's', 'ᷦ' => 'z', + 'Ḁ' => 'A', 'ḁ' => 'a', 'Ḃ' => 'B', 'ḃ' => 'b', 'Ḅ' => 'B', 'ḅ' => 'b', 'Ḇ' => 'B', 'ḇ' => 'b', + 'Ḉ' => 'C', 'ḉ' => 'c', 'Ḋ' => 'D', 'ḋ' => 'd', 'Ḍ' => 'D', 'ḍ' => 'd', 'Ḏ' => 'D', 'ḏ' => 'd', + 'Ḑ' => 'D', 'ḑ' => 'd', 'Ḓ' => 'D', 'ḓ' => 'd', 'Ḕ' => 'E', 'ḕ' => 'e', 'Ḗ' => 'E', 'ḗ' => 'e', + 'Ḙ' => 'E', 'ḙ' => 'e', 'Ḛ' => 'E', 'ḛ' => 'e', 'Ḝ' => 'E', 'ḝ' => 'e', 'Ḟ' => 'F', 'ḟ' => 'f', + 'Ḡ' => 'G', 'ḡ' => 'g', 'Ḣ' => 'H', 'ḣ' => 'h', 'Ḥ' => 'H', 'ḥ' => 'h', 'Ḧ' => 'H', 'ḧ' => 'h', + 'Ḩ' => 'H', 'ḩ' => 'h', 'Ḫ' => 'H', 'ḫ' => 'h', 'Ḭ' => 'I', 'ḭ' => 'i', 'Ḯ' => 'I', 'ḯ' => 'i', + 'Ḱ' => 'K', 'ḱ' => 'k', 'Ḳ' => 'K', 'ḳ' => 'k', 'Ḵ' => 'K', 'ḵ' => 'k', 'Ḷ' => 'L', 'ḷ' => 'l', + 'Ḹ' => 'L', 'ḹ' => 'l', 'Ḻ' => 'L', 'ḻ' => 'l', 'Ḽ' => 'L', 'ḽ' => 'l', 'Ḿ' => 'M', 'ḿ' => 'm', + 'Ṁ' => 'M', 'ṁ' => 'm', 'Ṃ' => 'M', 'ṃ' => 'm', 'Ṅ' => 'N', 'ṅ' => 'n', 'Ṇ' => 'N', 'ṇ' => 'n', + 'Ṉ' => 'N', 'ṉ' => 'n', 'Ṋ' => 'N', 'ṋ' => 'n', 'Ṍ' => 'O', 'ṍ' => 'o', 'Ṏ' => 'O', 'ṏ' => 'o', + 'Ṑ' => 'O', 'ṑ' => 'o', 'Ṓ' => 'O', 'ṓ' => 'o', 'Ṕ' => 'P', 'ṕ' => 'p', 'Ṗ' => 'P', 'ṗ' => 'p', + 'Ṙ' => 'R', 'ṙ' => 'r', 'Ṛ' => 'R', 'ṛ' => 'r', 'Ṝ' => 'R', 'ṝ' => 'r', 'Ṟ' => 'R', 'ṟ' => 'r', + 'Ṡ' => 'S', 'ṡ' => 's', 'Ṣ' => 'S', 'ṣ' => 's', 'Ṥ' => 'S', 'ṥ' => 's', 'Ṧ' => 'S', 'ṧ' => 's', + 'Ṩ' => 'S', 'ṩ' => 's', 'Ṫ' => 'T', 'ṫ' => 't', 'Ṭ' => 'T', 'ṭ' => 't', 'Ṯ' => 'T', 'ṯ' => 't', + 'Ṱ' => 'T', 'ṱ' => 't', 'Ṳ' => 'U', 'ṳ' => 'u', 'Ṵ' => 'U', 'ṵ' => 'u', 'Ṷ' => 'U', 'ṷ' => 'u', + 'Ṹ' => 'U', 'ṹ' => 'u', 'Ṻ' => 'U', 'ṻ' => 'u', 'Ṽ' => 'V', 'ṽ' => 'v', 'Ṿ' => 'V', 'ṿ' => 'v', + 'Ẁ' => 'W', 'ẁ' => 'w', 'Ẃ' => 'W', 'ẃ' => 'w', 'Ẅ' => 'W', 'ẅ' => 'w', 'Ẇ' => 'W', 'ẇ' => 'w', + 'Ẉ' => 'W', 'ẉ' => 'w', 'Ẋ' => 'X', 'ẋ' => 'x', 'Ẍ' => 'X', 'ẍ' => 'x', 'Ẏ' => 'Y', 'ẏ' => 'y', + 'Ẑ' => 'Z', 'ẑ' => 'z', 'Ẓ' => 'Z', 'ẓ' => 'z', 'Ẕ' => 'Z', 'ẕ' => 'z', 'ẖ' => 'h', 'ẗ' => 't', + 'ẘ' => 'w', 'ẙ' => 'y', 'ẚ' => 'a', 'Ạ' => 'A', 'ạ' => 'a', 'Ả' => 'A', 'ả' => 'a', 'Ấ' => 'A', + 'ấ' => 'a', 'Ầ' => 'A', 'ầ' => 'a', 'Ẩ' => 'A', 'ẩ' => 'a', 'Ẫ' => 'A', 'ẫ' => 'a', 'Ậ' => 'A', + 'ậ' => 'a', 'Ắ' => 'A', 'ắ' => 'a', 'Ằ' => 'A', 'ằ' => 'a', 'Ẳ' => 'A', 'ẳ' => 'a', 'Ẵ' => 'A', + 'ẵ' => 'a', 'Ặ' => 'A', 'ặ' => 'a', 'Ẹ' => 'E', 'ẹ' => 'e', 'Ẻ' => 'E', 'ẻ' => 'e', 'Ẽ' => 'E', + 'ẽ' => 'e', 'Ế' => 'E', 'ế' => 'e', 'Ề' => 'E', 'ề' => 'e', 'Ể' => 'E', 'ể' => 'e', 'Ễ' => 'E', + 'ễ' => 'e', 'Ệ' => 'E', 'ệ' => 'e', 'Ỉ' => 'I', 'ỉ' => 'i', 'Ị' => 'I', 'ị' => 'i', 'Ọ' => 'O', + 'ọ' => 'o', 'Ỏ' => 'O', 'ỏ' => 'o', 'Ố' => 'O', 'ố' => 'o', 'Ồ' => 'O', 'ồ' => 'o', 'Ổ' => 'O', + 'ổ' => 'o', 'Ỗ' => 'O', 'ỗ' => 'o', 'Ộ' => 'O', 'ộ' => 'o', 'Ớ' => 'O', 'ớ' => 'o', 'Ờ' => 'O', + 'ờ' => 'o', 'Ở' => 'O', 'ở' => 'o', 'Ỡ' => 'O', 'ỡ' => 'o', 'Ợ' => 'O', 'ợ' => 'o', 'Ụ' => 'U', + 'ụ' => 'u', 'Ủ' => 'U', 'ủ' => 'u', 'Ứ' => 'U', 'ứ' => 'u', 'Ừ' => 'U', 'ừ' => 'u', 'Ử' => 'U', + 'ử' => 'u', 'Ữ' => 'U', 'ữ' => 'u', 'Ự' => 'U', 'ự' => 'u', 'Ỳ' => 'Y', 'ỳ' => 'y', 'Ỵ' => 'Y', + 'ỵ' => 'y', 'Ỷ' => 'Y', 'ỷ' => 'y', 'Ỹ' => 'Y', 'ỹ' => 'y', 'Ỿ' => 'Y', 'ỿ' => 'y', 'ⁱ' => 'i', + 'ⁿ' => 'n', 'ₐ' => 'a', 'ₑ' => 'e', 'ₒ' => 'o', 'ₓ' => 'x', '⒜' => 'a', '⒝' => 'b', '⒞' => 'c', + '⒟' => 'd', '⒠' => 'e', '⒡' => 'f', '⒢' => 'g', '⒣' => 'h', '⒤' => 'i', '⒥' => 'j', '⒦' => 'k', + '⒧' => 'l', '⒨' => 'm', '⒩' => 'n', '⒪' => 'o', '⒫' => 'p', '⒬' => 'q', '⒭' => 'r', '⒮' => 's', + '⒯' => 't', '⒰' => 'u', '⒱' => 'v', '⒲' => 'w', '⒳' => 'x', '⒴' => 'y', '⒵' => 'z', 'Ⓐ' => 'A', + 'Ⓑ' => 'B', 'Ⓒ' => 'C', 'Ⓓ' => 'D', 'Ⓔ' => 'E', 'Ⓕ' => 'F', 'Ⓖ' => 'G', 'Ⓗ' => 'H', 'Ⓘ' => 'I', + 'Ⓙ' => 'J', 'Ⓚ' => 'K', 'Ⓛ' => 'L', 'Ⓜ' => 'M', 'Ⓝ' => 'N', 'Ⓞ' => 'O', 'Ⓟ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' => 'Q', 'ꝗ' => 'q', 'Ꝙ' => 'Q', 'ꝙ' => 'q', 'Ꝛ' => 'R', 'ꝛ' => 'r', + 'Ꝟ' => 'V', 'ꝟ' => 'v', 'A' => 'A', 'B' => 'B', 'C' => 'C', 'D' => 'D', 'E' => 'E', 'F' => 'F', + 'G' => 'G', 'H' => 'H', 'I' => 'I', 'J' => 'J', 'K' => 'K', 'L' => 'L', 'M' => 'M', 'N' => 'N', + 'O' => 'O', 'P' => 'P', 'Q' => 'Q', 'R' => 'R', 'S' => 'S', 'T' => 'T', 'U' => 'U', 'V' => 'V', + 'W' => 'W', 'X' => 'X', 'Y' => 'Y', 'Z' => 'Z', 'a' => 'a', 'b' => 'b', 'c' => 'c', 'd' => 'd', + 'e' => 'e', 'f' => 'f', 'g' => 'g', 'h' => 'h', 'i' => 'i', 'j' => 'j', 'k' => 'k', 'l' => 'l', + 'm' => 'm', 'n' => 'n', 'o' => 'o', 'p' => 'p', 'q' => 'q', 'r' => 'r', 's' => 's', 't' => 't', + 'u' => 'u', 'v' => 'v', 'w' => 'w', 'x' => 'x', 'y' => 'y', 'z' => 'z'); + return strtr($text, $trans); +} diff --git a/application/helpers/echo_helper.php b/application/helpers/echo_helper.php new file mode 100644 index 0000000..565c1ae --- /dev/null +++ b/application/helpers/echo_helper.php @@ -0,0 +1,53 @@ + + + 403 Forbidden + + + +

    Directory access is forbidden.

    + + + \ No newline at end of file diff --git a/application/helpers/invoice_helper.php b/application/helpers/invoice_helper.php new file mode 100644 index 0000000..564fcc3 --- /dev/null +++ b/application/helpers/invoice_helper.php @@ -0,0 +1,107 @@ +mdl_settings->setting('invoice_logo')) { + return ''; + } + + return ''; +} + +/** + * Returns the invoice logo for PDF files + * + * @return string + */ +function invoice_logo_pdf() +{ + $CI = &get_instance(); + + if ($CI->mdl_settings->setting('invoice_logo')) { + return ''; + } + + return ''; +} + + +/** + * Returns a Swiss IS / IS+ code line + * Documentation: https://www.postfinance.ch/binp/postfinance/public/dam.M26m_i6_6ceYcN2XtAN4w8OHMynQG7FKxJVK8TtQzr0.spool/content/dam/pf/de/doc/consult/manual/dlserv/inpayslip_isr_man_en.pdf + * + * @param string $slipType + * @param $amount + * @param string $rnumb + * @param $subNumb + * @return string + * @throws Error + */ +function invoice_genCodeline($slipType, $amount, $rnumb, $subNumb) +{ + $isEur = false; + + if ((int)$slipType > 14) { + $isEur = true; + } else { + $amount = .5 * round((float)$amount / .5, 1); + } + + if (!$isEur && $amount > 99999999.95) { + throw new Error("Invalid amount"); + } elseif ($isEur && $amount > 99999999.99) { + throw new Error("Invalid amount"); + } + + $amountLine = sprintf("%010d", $amount * 100); + $checkSlAmount = invoice_recMod10($slipType . $amountLine); + + if (!preg_match("/\d{2}-\d{1,6}-\d{1}/", $subNumb)) { + throw new Error("Invalid subscriber number"); + } + + $subNumb = explode("-", $subNumb); + $fullSub = $subNumb[0] . sprintf("%06d", $subNumb[1]) . $subNumb[2]; + $rnumb = preg_replace('/\s+/', '', $rnumb); + + return $slipType . $amountLine . $checkSlAmount . ">" . $rnumb . "+ " . $fullSub . ">"; +} + +/** + * Calculate checksum using Recursive Mod10 + * See https://www.postfinance.ch/binp/postfinance/public/dam.Ii-X5NgtAixO8cQPvja46blV6d7cZCyGUscxO15L5S8.spool/content/dam/pf/de/doc/consult/manual/dldata/efin_recdescr_man_en.pdf + * Page 5 + * + * @param string $in + * @return integer + */ +function invoice_recMod10($in) +{ + $line = [0, 9, 4, 6, 8, 2, 7, 1, 3, 5]; + $carry = 0; + $chars = str_split($in); + + foreach ($chars as $char) { + $carry = $line[($carry + intval($char)) % 10]; + } + + return (10 - $carry) % 10; +} diff --git a/application/helpers/json_error_helper.php b/application/helpers/json_error_helper.php new file mode 100644 index 0000000..106adc8 --- /dev/null +++ b/application/helpers/json_error_helper.php @@ -0,0 +1,30 @@ +mdl_settings->setting('email_send_method') == 'phpmail') || + ($CI->mdl_settings->setting('email_send_method') == 'sendmail') || + (($CI->mdl_settings->setting('email_send_method') == 'smtp') && ($CI->mdl_settings->setting('smtp_server_address'))) + ); +} + +/** + * Send an invoice via email + * + * @param $invoice_id + * @param $invoice_template + * @param $from + * @param $to + * @param $subject + * @param string $body + * @param null $cc + * @param null $bcc + * @param null $attachments + * @return bool + */ +function email_invoice($invoice_id, $invoice_template, $from, $to, $subject, $body, $cc = null, $bcc = null, $attachments = null) +{ + $CI = &get_instance(); + + $CI->load->helper('mailer/phpmailer'); + $CI->load->helper('template'); + $CI->load->helper('invoice'); + $CI->load->helper('pdf'); + + $db_invoice = $CI->mdl_invoices->where('ip_invoices.invoice_id', $invoice_id)->get()->row(); + + if ($db_invoice->sumex_id == null) { + $invoice = generate_invoice_pdf($invoice_id, false, $invoice_template); + } else { + $invoice = generate_invoice_sumex($invoice_id, false, true); + } + + $message = parse_template($db_invoice, $body, $invoice_id); + $subject = parse_template($db_invoice, $subject, $invoice_id); + $cc = parse_template($db_invoice, $cc, $invoice_id); + $bcc = parse_template($db_invoice, $bcc, $invoice_id); + $from = array(parse_template($db_invoice, $from[0], $invoice_id), parse_template($db_invoice, $from[1], $invoice_id)); + + $message = (empty($message) ? ' ' : $message); + + return phpmail_send($from, $to, $subject, $message, $invoice, $cc, $bcc, $attachments); +} + +/** + * Send a quote via email + * + * @param $quote_id + * @param $quote_template + * @param $from + * @param $to + * @param $subject + * @param string $body + * @param null $cc + * @param null $bcc + * @param null $attachments + * @return bool + */ +function email_quote($quote_id, $quote_template, $from, $to, $subject, $body, $cc = null, $bcc = null, $attachments = null) +{ + $CI = &get_instance(); + + $CI->load->helper('mailer/phpmailer'); + $CI->load->helper('template'); + $CI->load->helper('pdf'); + + $quote = generate_quote_pdf($quote_id, false, $quote_template); + + $db_quote = $CI->mdl_quotes->where('ip_quotes.quote_id', $quote_id)->get()->row(); + + $message = parse_template($db_quote, $body, $quote_id); + $subject = parse_template($db_quote, $subject, $quote_id); + $cc = parse_template($db_quote, $cc, $quote_id); + $bcc = parse_template($db_quote, $bcc, $quote_id); + $from = array(parse_template($db_quote, $from[0], $quote_id), parse_template($db_quote, $from[1], $quote_id)); + + $message = (empty($message) ? ' ' : $message); + + return phpmail_send($from, $to, $subject, $message, $quote, $cc, $bcc, $attachments); +} + +/** + * Send an email if the status of an email changed + * @param $quote_id + * @param string $status string "accepted" or "rejected" + * @return bool if the email was sent + */ +function email_quote_status($quote_id, $status) +{ + ini_set('display_errors', 'on'); + error_reporting(E_ALL); + + if (!mailer_configured()) { + return false; + } + + $CI = &get_instance(); + $CI->load->helper('mailer/phpmailer'); + + $quote = $CI->mdl_quotes->where('ip_quotes.quote_id', $quote_id)->get()->row(); + $base_url = base_url('/quotes/view/' . $quote_id); + + $user_email = $quote->user_email; + $subject = sprintf(trans('quote_status_email_subject'), + $quote->client_name, + strtolower(lang($status)), + $quote->quote_number + ); + $body = sprintf(nl2br(trans('quote_status_email_body')), + $quote->client_name, + strtolower(lang($status)), + $quote->quote_number, + '' . $base_url . '' + ); + + return phpmail_send($user_email, $user_email, $subject, $body); +} diff --git a/application/helpers/mpdf_helper.php b/application/helpers/mpdf_helper.php new file mode 100644 index 0000000..c17b648 --- /dev/null +++ b/application/helpers/mpdf_helper.php @@ -0,0 +1,126 @@ +useAdobeCJK = true; + $mpdf->autoScriptToLang = true; + + if (IP_DEBUG) { + // Enable image error logging + $mpdf->showImageErrors = true; + } + + // Include zugferd if enabled + if ($zugferd_invoice) { + $CI->load->helper('zugferd'); + $mpdf->PDFA = true; + $mpdf->PDFAauto = true; + $mpdf->SetAdditionalXmpRdf(zugferd_rdf()); + $mpdf->SetAssociatedFiles($associated_files); + } + + // Set a password if set for the voucher + if (!empty($password)) { + $mpdf->SetProtection(array('copy', 'print'), $password, $password); + } + + // Check if the archive folder is available + if (!(is_dir('./uploads/archive/') || is_link('./uploads/archive/'))) { + mkdir('./uploads/archive/', '0777'); + } + + // Set the footer if voucher is invoice and if set in settings + if (!empty($CI->mdl_settings->settings['pdf_invoice_footer'])) { + $mpdf->setAutoBottomMargin = 'stretch'; + $mpdf->SetHTMLFooter(''); + } + + $mpdf->WriteHTML($html); + + if ($isInvoice) { + + foreach (glob(UPLOADS_FOLDER . 'archive/*' . $filename . '.pdf') as $file) { + array_push($invoice_array, $file); + } + + if (!empty($invoice_array) && !is_null($is_guest)) { + rsort($invoice_array); + + if ($stream) { + return $mpdf->Output($filename . '.pdf', 'I'); + } else { + return $invoice_array[0]; + } + } + + $archived_file = UPLOADS_FOLDER . 'archive/' . date('Y-m-d') . '_' . $filename . '.pdf'; + $mpdf->Output($archived_file, 'F'); + + if ($stream) { + return $mpdf->Output($filename . '.pdf', 'I'); + } else { + return $archived_file; + } + } + + // If $stream is true (default) the PDF will be displayed directly in the browser + // otherwise will be returned as a download + if ($stream) { + return $mpdf->Output($filename . '.pdf', 'I'); + } else { + + $mpdf->Output(UPLOADS_FOLDER . 'temp/' . $filename . '.pdf', 'F'); + + // Housekeeping + // Delete any files in temp/ directory that are >1 hrs old + $interval = 3600; + if ($handle = @opendir(preg_replace('/\/$/', '', './uploads/temp/'))) { + while (false !== ($file = readdir($handle))) { + if (($file != '..') && ($file != '.') && !is_dir($file) && ((filemtime('./uploads/temp/' . $file) + $interval) < time()) && (substr($file, 0, 1) !== '.') && ($file != 'remove.txt')) { // mPDF 5.7.3 + unlink(UPLOADS_FOLDER . 'temp/' . $file); + } + } + closedir($handle); + } + + return UPLOADS_FOLDER . 'temp/' . $filename . '.pdf'; + + } +} diff --git a/application/helpers/number_helper.php b/application/helpers/number_helper.php new file mode 100644 index 0000000..563ede7 --- /dev/null +++ b/application/helpers/number_helper.php @@ -0,0 +1,70 @@ +mdl_settings->setting('currency_symbol'); + $currency_symbol_placement = $CI->mdl_settings->setting('currency_symbol_placement'); + $thousands_separator = $CI->mdl_settings->setting('thousands_separator'); + $decimal_point = $CI->mdl_settings->setting('decimal_point'); + + if ($currency_symbol_placement == 'before') { + return $currency_symbol . number_format($amount, ($decimal_point) ? 2 : 0, $decimal_point, $thousands_separator); + } elseif ($currency_symbol_placement == 'afterspace') { + return number_format($amount, ($decimal_point) ? 2 : 0, $decimal_point, $thousands_separator) . ' ' . $currency_symbol; + } else { + return number_format($amount, ($decimal_point) ? 2 : 0, $decimal_point, $thousands_separator) . $currency_symbol; + } +} + +/** + * Output the amount as a currency amount, e.g. 1.234,56 + * + * @param null $amount + * @return null|string + */ +function format_amount($amount = null) +{ + if ($amount) { + $CI =& get_instance(); + $thousands_separator = $CI->mdl_settings->setting('thousands_separator'); + $decimal_point = $CI->mdl_settings->setting('decimal_point'); + + return number_format($amount, ($decimal_point) ? 2 : 0, $decimal_point, $thousands_separator); + } + return null; +} + +/** + * Standardize an amount based on the system settings + * + * @param $amount + * @return mixed + */ +function standardize_amount($amount) +{ + $CI =& get_instance(); + $thousands_separator = $CI->mdl_settings->setting('thousands_separator'); + $decimal_point = $CI->mdl_settings->setting('decimal_point'); + + $amount = str_replace($thousands_separator, '', $amount); + $amount = str_replace($decimal_point, '.', $amount); + + return $amount; +} diff --git a/application/helpers/orphan_helper.php b/application/helpers/orphan_helper.php new file mode 100644 index 0000000..01700bf --- /dev/null +++ b/application/helpers/orphan_helper.php @@ -0,0 +1,41 @@ +db->query($query); + } +} diff --git a/application/helpers/pager_helper.php b/application/helpers/pager_helper.php new file mode 100644 index 0000000..622f639 --- /dev/null +++ b/application/helpers/pager_helper.php @@ -0,0 +1,45 @@ +'; + + if (($previous_page = $CI->$model->previous_offset) >= 0) { + $pager .= ''; + $pager .= ''; + } else { + $pager .= ''; + $pager .= ''; + } + + if (($next_page = $CI->$model->next_offset) <= $CI->$model->last_offset) { + $pager .= ''; + $pager .= ''; + } else { + $pager .= ''; + $pager .= ''; + } + + $pager .= ''; + + return $pager; +} diff --git a/application/helpers/pdf_helper.php b/application/helpers/pdf_helper.php new file mode 100644 index 0000000..0dd8417 --- /dev/null +++ b/application/helpers/pdf_helper.php @@ -0,0 +1,258 @@ +load->model('invoices/mdl_items'); + $CI->load->model('invoices/mdl_invoices'); + $CI->load->model('invoices/mdl_invoice_tax_rates'); + $CI->load->model('custom_fields/mdl_custom_fields'); + $CI->load->model('payment_methods/mdl_payment_methods'); + + $CI->load->helper('country'); + $CI->load->helper('client'); + + $invoice = $CI->mdl_invoices->get_by_id($invoice_id); + + // Override language with system language + set_language($invoice->client_language); + + if (!$invoice_template) { + $CI->load->helper('template'); + $invoice_template = select_pdf_invoice_template($invoice); + } + + $payment_method = $CI->mdl_payment_methods->where('payment_method_id', $invoice->payment_method)->get()->row(); + if ($invoice->payment_method == 0) { + $payment_method = false; + } + + // Determine if discounts should be displayed + $items = $CI->mdl_items->where('invoice_id', $invoice_id)->get()->result(); + + // Discount settings + $show_item_discounts = false; + foreach ($items as $item) { + if ($item->item_discount != '0.00') { + $show_item_discounts = true; + } + } + + // Get all custom fields + $custom_fields = array( + 'invoice' => $CI->mdl_custom_fields->get_values_for_fields('mdl_invoice_custom', $invoice->invoice_id), + 'client' => $CI->mdl_custom_fields->get_values_for_fields('mdl_client_custom', $invoice->client_id), + 'user' => $CI->mdl_custom_fields->get_values_for_fields('mdl_user_custom', $invoice->user_id), + ); + + if ($invoice->quote_id) { + $custom_fields['quote'] = $CI->mdl_custom_fields->get_values_for_fields('mdl_quote_custom', $invoice->quote_id); + } + + // PDF associated files + $include_zugferd = $CI->mdl_settings->setting('include_zugferd'); + + if ($include_zugferd) { + $CI->load->helper('zugferd'); + + $associatedFiles = array(array( + 'name' => 'ZUGFeRD-invoice.xml', + 'description' => 'ZUGFeRD Invoice', + 'AFRelationship' => 'Alternative', + 'mime' => 'text/xml', + 'path' => generate_invoice_zugferd_xml_temp_file($invoice, $items) + )); + } else { + $associatedFiles = null; + } + + $data = array( + 'invoice' => $invoice, + 'invoice_tax_rates' => $CI->mdl_invoice_tax_rates->where('invoice_id', $invoice_id)->get()->result(), + 'items' => $items, + 'payment_method' => $payment_method, + 'output_type' => 'pdf', + 'show_item_discounts' => $show_item_discounts, + 'custom_fields' => $custom_fields, + ); + + $html = $CI->load->view('invoice_templates/pdf/' . $invoice_template, $data, true); + + $CI->load->helper('mpdf'); + + return pdf_create($html, trans('invoice') . '_' . str_replace(array('\\', '/'), '_', $invoice->invoice_number), + $stream, $invoice->invoice_password, true, $is_guest, $include_zugferd, $associatedFiles); + +} + +function generate_invoice_sumex($invoice_id, $stream = true, $client = false) +{ + $CI = &get_instance(); + + $CI->load->model('invoices/mdl_items'); + $invoice = $CI->mdl_invoices->get_by_id($invoice_id); + $CI->load->library('Sumex', array( + 'invoice' => $invoice, + 'items' => $CI->mdl_items->where('invoice_id', $invoice_id)->get()->result() + )); + + // Append a copy at the end and change the title: + // WARNING: The title depends on what invoice type is (TP, TG) + // and is language-dependant. Fix accordingly if you really need this hack + $temp = tempnam("/tmp", "invsumex_"); + $tempCopy = tempnam("/tmp", "invsumex_"); + $pdf = new FPDI(); + $sumexPDF = $CI->sumex->pdf(); + + $sha1sum = sha1($sumexPDF); + $shortsum = substr($sha1sum, 0, 8); + $filename = trans('invoice') . '_' . $invoice->invoice_number . '_' . $shortsum; + + if (!$client) { + file_put_contents($temp, $sumexPDF); + + // Hackish + $sumexPDF = str_replace( + "Giustificativo per la richiesta di rimborso", + "Copia: Giustificativo per la richiesta di rimborso", + $sumexPDF + ); + + file_put_contents($tempCopy, $sumexPDF); + + $pageCount = $pdf->setSourceFile($temp); + + for ($pageNo = 1; $pageNo <= $pageCount; $pageNo++) { + $templateId = $pdf->importPage($pageNo); + $size = $pdf->getTemplateSize($templateId); + + if ($size['w'] > $size['h']) { + $pageFormat = 'L'; // landscape + } else { + $pageFormat = 'P'; // portrait + } + + $pdf->addPage($pageFormat, array($size['w'], $size['h'])); + $pdf->useTemplate($templateId); + } + + $pageCount = $pdf->setSourceFile($tempCopy); + + for ($pageNo = 2; $pageNo <= $pageCount; $pageNo++) { + $templateId = $pdf->importPage($pageNo); + $size = $pdf->getTemplateSize($templateId); + + if ($size['w'] > $size['h']) { + $pageFormat = 'L'; // landscape + } else { + $pageFormat = 'P'; // portrait + } + + $pdf->addPage($pageFormat, array($size['w'], $size['h'])); + $pdf->useTemplate($templateId); + } + + unlink($temp); + unlink($tempCopy); + + if ($stream) { + header("Content-Type", "application/pdf"); + $pdf->Output($filename . '.pdf', 'I'); + return; + } + + $filePath = UPLOADS_FOLDER . 'temp/' . $filename . '.pdf'; + $pdf->Output($filePath, 'F'); + return $filePath; + } else { + if ($stream) { + return $sumexPDF; + } + + $filePath = UPLOADS_FOLDER . 'temp/' . $filename . '.pdf'; + file_put_contents($filePath, $sumexPDF); + return $filePath; + } +} + +/** + * Generate the PDF for a quote + * + * @param $quote_id + * @param bool $stream + * @param null $quote_template + * @return string + */ +function generate_quote_pdf($quote_id, $stream = true, $quote_template = null) +{ + $CI = &get_instance(); + + $CI->load->model('quotes/mdl_quotes'); + $CI->load->model('quotes/mdl_quote_items'); + $CI->load->model('quotes/mdl_quote_tax_rates'); + $CI->load->model('custom_fields/mdl_custom_fields'); + $CI->load->helper('country'); + $CI->load->helper('client'); + + $quote = $CI->mdl_quotes->get_by_id($quote_id); + + // Override language with system language + set_language($quote->client_language); + + if (!$quote_template) { + $quote_template = $CI->mdl_settings->setting('pdf_quote_template'); + } + + // Determine if discounts should be displayed + $items = $CI->mdl_quote_items->where('quote_id', $quote_id)->get()->result(); + + $show_item_discounts = false; + foreach ($items as $item) { + if ($item->item_discount != '0.00') { + $show_item_discounts = true; + } + } + + // Get all custom fields + $custom_fields = array( + 'quote' => $CI->mdl_custom_fields->get_values_for_fields('mdl_quote_custom', $quote->quote_id), + 'client' => $CI->mdl_custom_fields->get_values_for_fields('mdl_client_custom', $quote->client_id), + 'user' => $CI->mdl_custom_fields->get_values_for_fields('mdl_user_custom', $quote->user_id), + ); + + $data = array( + 'quote' => $quote, + 'quote_tax_rates' => $CI->mdl_quote_tax_rates->where('quote_id', $quote_id)->get()->result(), + 'items' => $items, + 'output_type' => 'pdf', + 'show_item_discounts' => $show_item_discounts, + 'custom_fields' => $custom_fields, + ); + + $html = $CI->load->view('quote_templates/pdf/' . $quote_template, $data, true); + + $CI->load->helper('mpdf'); + + return pdf_create($html, trans('quote') . '_' . str_replace(array('\\', '/'), '_', $quote->quote_number), $stream, $quote->quote_password); +} diff --git a/application/helpers/redirect_helper.php b/application/helpers/redirect_helper.php new file mode 100644 index 0000000..7cee9b6 --- /dev/null +++ b/application/helpers/redirect_helper.php @@ -0,0 +1,39 @@ +session->userdata('redirect_to')) ? $CI->session->userdata('redirect_to') : $fallback_url_string; + + if ($redirect) { + redirect($redirect_url); + } + return $redirect_url; +} + +/** + * Sets the current URL in the session + */ +function redirect_to_set() +{ + $CI = &get_instance(); + $CI->session->set_userdata('redirect_to', $CI->uri->uri_string()); +} diff --git a/application/helpers/settings_helper.php b/application/helpers/settings_helper.php new file mode 100644 index 0000000..e62ae32 --- /dev/null +++ b/application/helpers/settings_helper.php @@ -0,0 +1,86 @@ +mdl_settings->setting($setting_key, $default); + return $escape ? htmlsc($value) : $value; +} + +/** + * Get the settings for a payment gateway + * + * @param string $gateway + * @return array + */ +function get_gateway_settings($gateway) +{ + $CI = &get_instance(); + return $CI->mdl_settings->gateway_settings($gateway); +} + +/** + * Compares the two given values and outputs selected="selected" + * if the values match or the operation is true for the single value + * + * Examples + * check_select($option_key, 'key_1') Checks if $option_key equals (==) 'key_1'. + * check_select($option_key, 'key_1', '!=') Checks if $option_key not equals (!=) 'key_1'. + * check_select($option_key) The same like if ($option_key) { ... + * check_select($option_key, null, 'e') Checks if the $option_key value is empty. + * check_select($option_key != 'key_1') If the first param is bool, it is used to validate the select + * + * @param string|integer $value1 + * @param string|integer|null $value2 + * @param string $operator + * @param bool $checked + * @return void + */ +function check_select($value1, $value2 = null, $operator = '==', $checked = false) +{ + $select = $checked ? 'checked="checked"' : 'selected="selected"'; + + // Instant-validate if $value1 is a bool value + if (is_bool($value1) && $value2 === null) { + echo $value1 ? $select : ''; + return; + } + + switch ($operator) { + case '==': + $echo_selected = $value1 == $value2 ? true : false; + break; + case '!=': + $echo_selected = $value1 != $value2 ? true : false; + break; + case 'e': + $echo_selected = empty($value1) ? true : false; + break; + case '!e': + $echo_selected = empty($value1) ? true : false; + break; + default: + $echo_selected = $value1 ? true : false; + break; + } + + echo $echo_selected ? $select : ''; +} diff --git a/application/helpers/template_helper.php b/application/helpers/template_helper.php new file mode 100644 index 0000000..22d3bf7 --- /dev/null +++ b/application/helpers/template_helper.php @@ -0,0 +1,126 @@ +invoice_url_key); + break; + case 'invoice_date_due': + $replace = date_from_mysql($object->invoice_date_due, true); + break; + case 'invoice_date_created': + $replace = date_from_mysql($object->invoice_date_created, true); + break; + case 'invoice_total': + $replace = format_currency($object->invoice_total); + break; + case 'invoice_paid': + $replace = format_currency($object->invoice_paid); + break; + case 'invoice_balance': + $replace = format_currency($object->invoice_balance); + break; + case 'quote_total': + $replace = format_currency($object->quote_total); + break; + case 'quote_date_created': + $replace = date_from_mysql($object->quote_date_created, true); + break; + case 'quote_date_expires': + $replace = date_from_mysql($object->quote_date_expires, true); + break; + case 'quote_guest_url': + $replace = site_url('guest/view/quote/' . $object->quote_url_key); + break; + default: + // Check if it's a custom field + if (preg_match('/ip_cf_([0-9].*)/', $var, $cf_id)) { + // Get the custom field + $CI =& get_instance(); + $CI->load->model('custom_fields/mdl_custom_fields'); + $cf = $CI->mdl_custom_fields->get_by_id($cf_id[1]); + + if ($cf) { + // Get the values for the custom field + $cf_model = str_replace('ip_', 'mdl_', $cf->custom_field_table); + $replace = $CI->mdl_custom_fields + ->get_value_for_field($cf_id[1], $cf_model, $model_id); + } else { + $replace = ''; + } + } else { + $replace = isset($object->{$var}) ? $object->{$var} : $var; + } + } + + $body = str_replace('{{{' . $var . '}}}', $replace, $body); + } + } + + return $body; +} + +/** + * Returns the appropriate PDF template for the given invoice + * + * @param $invoice + * @return mixed + */ +function select_pdf_invoice_template($invoice) +{ + $CI =& get_instance(); + + if ($invoice->is_overdue) { + // Use the overdue template + return $CI->mdl_settings->setting('pdf_invoice_template_overdue'); + } elseif ($invoice->invoice_status_id == 4) { + // Use the paid template + return $CI->mdl_settings->setting('pdf_invoice_template_paid'); + } else { + // Use the default template + return $CI->mdl_settings->setting('pdf_invoice_template'); + } +} + +/** + * Returns the appropriate email template for the given invoice + * + * @param $invoice + * @return mixed + */ +function select_email_invoice_template($invoice) +{ + $CI =& get_instance(); + + if ($invoice->is_overdue) { + // Use the overdue template + return $CI->mdl_settings->setting('email_invoice_template_overdue'); + } elseif ($invoice->invoice_status_id == 4) { + // Use the paid template + return $CI->mdl_settings->setting('email_invoice_template_paid'); + } else { + // Use the default template + return $CI->mdl_settings->setting('email_invoice_template'); + } +} diff --git a/application/helpers/trans_helper.php b/application/helpers/trans_helper.php new file mode 100644 index 0000000..1994c08 --- /dev/null +++ b/application/helpers/trans_helper.php @@ -0,0 +1,109 @@ +lang->line($line); + + // Fall back to default language if the current language has no translated string + if (empty($lang_string)) { + // Load the default language + set_language('english'); + $lang_string = $CI->lang->line($line); + reset_language(); + } + + // Fall back to the $line value if the default language has no translation either + if (empty($lang_string)) { + $lang_string = $default != null ? $default : $line; + } + + if ($id != '') { + $lang_string = '"; + } + + return $lang_string; +} + +/** + * Load the translations for the given language + * + * @param string $language + * @return void + */ +function set_language($language) +{ + // Clear the current loaded language + $CI =& get_instance(); + $CI->lang->is_loaded = array(); + $CI->lang->language = array(); + + // Load system language if no custom language is set + $default_lang = isset($CI->mdl_settings) ? $CI->mdl_settings->setting('default_language') : 'english'; + $new_language = ($language == 'system' ? $default_lang : $language); + + // Set the new language + $CI->lang->load('ip', $new_language); + $CI->lang->load('form_validation', $new_language); + $CI->lang->load('custom', $new_language); + $CI->lang->load('gateway', $new_language); +} + +/** + * Reset the langauge to the default one + * + * @return void + */ +function reset_language() +{ + // Clear the current loaded language + $CI =& get_instance(); + $CI->lang->is_loaded = array(); + $CI->lang->language = array(); + + // Reset to the default language + $default_lang = isset($CI->mdl_settings) ? $CI->mdl_settings->setting('default_language') : 'english'; + + $CI->lang->load('ip', $default_lang); + $CI->lang->load('form_validation', $default_lang); + $CI->lang->load('custom', $default_lang); + $CI->lang->load('gateway', $default_lang); +} + +/** + * Returns all available languages + * + * @return array + */ +function get_available_languages() +{ + $CI =& get_instance(); + $CI->load->helper('directory'); + + $languages = directory_map(APPPATH . 'language', true); + sort($languages); + + for ($i = 0; $i < count($languages); $i++) { + $languages[$i] = str_replace(array('\\', '/'), '', $languages[$i]); + } + + return $languages; +} diff --git a/application/helpers/zugferd_helper.php b/application/helpers/zugferd_helper.php new file mode 100644 index 0000000..4b82efb --- /dev/null +++ b/application/helpers/zugferd_helper.php @@ -0,0 +1,44 @@ +load->helper('file'); + + $path = './uploads/temp/invoice_' . $invoice->invoice_id . '_zugferd.xml'; + $CI->load->library('zugferdxml', array('invoice' => $invoice, 'items' => $items)); + + write_file($path, $CI->zugferdxml->xml()); + return $path; +} + +/** + * Returns the correct RDF string for the Zugferd XML + * @return string + */ +function zugferd_rdf() +{ + $s = '' . "\n"; + $s .= ' INVOICE' . "\n"; + $s .= ' ZUGFeRD-invoice.xml' . "\n"; + $s .= ' 1.0' . "\n"; + $s .= ' COMFORT' . "\n"; + $s .= '' . "\n"; + return $s; +} diff --git a/application/hooks/SetTimezoneClass.php b/application/hooks/SetTimezoneClass.php new file mode 100644 index 0000000..33a5ce9 --- /dev/null +++ b/application/hooks/SetTimezoneClass.php @@ -0,0 +1,27 @@ + + + 403 Forbidden + + + +

    Directory access is forbidden.

    + + + \ No newline at end of file diff --git a/application/index.html b/application/index.html new file mode 100644 index 0000000..423d9d5 --- /dev/null +++ b/application/index.html @@ -0,0 +1,10 @@ + + + 403 Forbidden + + + +

    Directory access is forbidden.

    + + + diff --git a/application/language/.gitignore b/application/language/.gitignore new file mode 100644 index 0000000..08c857f --- /dev/null +++ b/application/language/.gitignore @@ -0,0 +1,4 @@ +* +!english +!english/* +!.gitignore diff --git a/application/language/english/custom_lang.php b/application/language/english/custom_lang.php new file mode 100644 index 0000000..a350715 --- /dev/null +++ b/application/language/english/custom_lang.php @@ -0,0 +1,17 @@ + 'Actual content of the Language String', + * + * Please notice that 'language_string_key' should only contain alphanumeric + * characters and underscores. + * If you are not sure take a look at the ip_lang.php file or visit the + * community forums. + */ + +$lang = array( + +); diff --git a/application/language/english/gateway_lang.php b/application/language/english/gateway_lang.php new file mode 100644 index 0000000..2e7fa32 --- /dev/null +++ b/application/language/english/gateway_lang.php @@ -0,0 +1,71 @@ + 'Online Payment', + 'online_payments' => 'Online Payments', + 'online_payment_for' => 'Online Payment for', + 'online_payment_for_invoice' => 'Online Payment for Invoice', + 'online_payment_method' => 'Online Payment Method', + 'online_payment_creditcard_hint' => 'If you want to pay via credit card please enter the information below.
    The credit card information are not stored on our servers and will be transferred to the online payment gateway using a secure connection.', + 'enable_online_payments' => 'Enable Online Payments', + 'payment_provider' => 'Payment Provider', + 'add_payment_provider' => 'Add a Payment Provider', + 'transaction_reference' => 'Transaction Reference', + 'payment_description' => 'Payment for Invoice %s', + + // Credit card strings + 'creditcard_cvv' => 'CVV / CSC', + 'creditcard_details' => 'Credit Card details', + 'creditcard_expiry_month' => 'Expiry Month', + 'creditcard_expiry_year' => 'Expiry Year', + 'creditcard_number' => 'Credit Card Number', + 'online_payment_card_invalid' => 'This credit card is invalid. Please check the provided information.', + + // Payment Gateway Fields + 'online_payment_apiLoginId' => 'Api Login Id', // Field for AuthorizeNet_AIM + 'online_payment_transactionKey' => 'Transaction Key', // Field for AuthorizeNet_AIM + 'online_payment_testMode' => 'Test Mode', // Field for AuthorizeNet_AIM + 'online_payment_developerMode' => 'Developer Mode', // Field for AuthorizeNet_AIM + 'online_payment_websiteKey' => 'Website Key', // Field for Buckaroo_Ideal + 'online_payment_secretKey' => 'Secret Key', // Field for Buckaroo_Ideal + 'online_payment_merchantId' => 'Merchant Id', // Field for CardSave + 'online_payment_password' => 'Password', // Field for CardSave + 'online_payment_apiKey' => 'Api Key', // Field for Coinbase + 'online_payment_secret' => 'Secret', // Field for Coinbase + 'online_payment_accountId' => 'Account Id', // Field for Coinbase + 'online_payment_storeId' => 'Store Id', // Field for FirstData_Connect + 'online_payment_sharedSecret' => 'Shared Secret', // Field for FirstData_Connect + 'online_payment_appId' => 'App Id', // Field for GoCardless + 'online_payment_appSecret' => 'App Secret', // Field for GoCardless + 'online_payment_accessToken' => 'Access Token', // Field for GoCardless + 'online_payment_merchantAccessCode' => 'Merchant Access Code', // Field for Migs_ThreeParty + 'online_payment_secureHash' => 'Secure Hash', // Field for Migs_ThreeParty + 'online_payment_siteId' => 'Site Id', // Field for MultiSafepay + 'online_payment_siteCode' => 'Site Code', // Field for MultiSafepay + 'online_payment_accountNumber' => 'Account Number', // Field for NetBanx + 'online_payment_storePassword' => 'Store Password', // Field for NetBanx + 'online_payment_merchantKey' => 'Merchant Key', // Field for PayFast + 'online_payment_pdtKey' => 'Pdt Key', // Field for PayFast + 'online_payment_username' => 'Username', // Field for Payflow_Pro + 'online_payment_vendor' => 'Vendor', // Field for Payflow_Pro + 'online_payment_partner' => 'Partner', // Field for Payflow_Pro + 'online_payment_pxPostUsername' => 'Px Post Username', // Field for PaymentExpress_PxPay + 'online_payment_pxPostPassword' => 'Px Post Password', // Field for PaymentExpress_PxPay + 'online_payment_signature' => 'Signature', // Field for PayPal_Express + 'online_payment_referrerId' => 'Referrer Id', // Field for SagePay_Direct + 'online_payment_transactionPassword' => 'Transaction Password', // Field for SecurePay_DirectPost + 'online_payment_subAccountId' => 'Sub Account Id', // Field for TargetPay_Directebanking + 'online_payment_secretWord' => 'Secret Word', // Field for TwoCheckout + 'online_payment_installationId' => 'Installation Id', // Field for WorldPay + 'online_payment_callbackPassword' => 'Callback Password', // Field for WorldPay + + // Status / Error Messages + 'online_payment_payment_cancelled' => 'Payment cancelled.', + 'online_payment_payment_failed' => 'Payment failed. Please try again.', + 'online_payment_payment_successful' => 'Payment for Invoice %s successful!', + 'online_payment_payment_redirect' => 'Please wait while we redirect you to the payment page...', + 'online_payment_3dauth_redirect' => 'Please wait while we redirect you to your card issuer for authentication...' +); \ No newline at end of file diff --git a/application/language/english/index.html b/application/language/english/index.html new file mode 100644 index 0000000..04e928c --- /dev/null +++ b/application/language/english/index.html @@ -0,0 +1,10 @@ + + + 403 Forbidden + + + +

    Directory access is forbidden.

    + + + \ No newline at end of file diff --git a/application/language/english/ip_lang.php b/application/language/english/ip_lang.php new file mode 100644 index 0000000..9108865 --- /dev/null +++ b/application/language/english/ip_lang.php @@ -0,0 +1,672 @@ + 'Account Information', + 'active' => 'Active', + 'active_client' => 'Active', + 'add_client' => 'Add Customer', + 'add_family' => 'Add Family', + 'add_files' => 'Add Files...', + 'add_invoice_tax' => 'Add Invoice Tax', + 'add_new_row' => 'Add new row', + 'add_note' => 'Add Note', + 'add_notes' => 'Add Notes', + 'add_product' => 'Add product', + 'add_quote_tax' => 'Add Quote Tax', + 'add_unit' => 'Add Unit', + 'address' => 'Address', + 'administrator' => 'Administrator', + 'after_amount' => 'After Amount', + 'after_amount_space' => 'After Amount with nonbreaking space', + 'all' => 'All', + 'amount' => 'Amount', + 'amount_due' => 'Amount Due', + 'amount_settings' => 'Amount Settings', + 'any_family' => 'Any family', + 'apply_after_item_tax' => 'Apply After Item Tax', + 'apply_before_item_tax' => 'Apply Before Item Tax', + 'approve' => 'Approve', + 'approve_this_quote' => 'Approve This Quote', + 'approved' => 'Approved', + 'assign_client' => 'Assign Customer', + 'assigned_clients' => 'Assigned Customers', + 'attachments' => 'Attachments', + 'automatic_email_on_recur' => 'Automatically Email recurring invoices', + 'balance' => 'Balance', + 'back' => 'Back', + 'base_invoice' => 'Base Invoice', + 'bcc' => 'BCC', + 'bcc_mails_to_admin' => 'Send all outgoing emails as BCC to the admin account', + 'bcc_mails_to_admin_hint' => 'The admin account is the account that was created while installing InvoicePlane.', + 'before_amount' => 'Before Amount', + 'boolean' => 'Boolean', + 'bill_to' => 'Bill To', + 'body' => 'Body', + 'change_client' => 'Change Customer', + 'calculate_discounts' => 'Calculate Discounts', + 'calendar_week_1' => '1 Week', + 'calendar_week_2' => '2 Weeks', + 'calendar_week_3' => '3 Weeks', + 'calendar_week_4' => '4 Weeks', + 'calendar_month_1' => '1 Month', + 'calendar_month_2' => '2 Months', + 'calendar_month_3' => '3 Months', + 'calendar_month_4' => '4 Months', + 'calendar_month_5' => '5 Months', + 'calendar_month_6' => '6 Months', + 'calendar_year_1' => '1 Year', + 'cancel' => 'Cancel', + 'canceled' => 'Canceled', + 'can_be_changed' => 'Can be changed', + 'cc' => 'CC', + 'change_password' => 'Change Password', + 'checking_for_news' => 'Checking for News...', + 'checking_for_updates' => 'Checking for Updates...', + 'city' => 'City', + 'cldr' => 'en', + 'client' => 'Ccustomer', + 'client_access' => 'Customer Access', + 'client_already_exists' => 'Customer already exists!', + 'client_form' => 'Customer Form', + 'client_name' => 'Customer Name', + 'client_surname' => 'Customer Surname', + 'client_surname_optional' => 'Customer Surname (Optional)', + 'clients' => 'Customers', + 'close' => 'Close', + 'closed' => 'Closed', + 'column' => 'Column', + 'company' => 'Company', + 'confirm' => 'Confirm', + 'confirm_deletion' => 'Confirm deletion', + 'contact_information' => 'Contact Information', + 'continue' => 'Continue', + 'copy_invoice' => 'Copy Invoice', + 'copy_quote' => 'Copy Quote', + 'country' => 'Country', + 'create_credit_invoice' => 'Create credit invoice', + 'create_credit_invoice_alert' => 'Creating a credit invoice will make the current invoice read-only which means you will not be able to edit the invoice anymore. The credit invoice will contain the current state with all items but with negative amounts and balances.', + 'create_invoice' => 'Create Invoice', + 'create_product' => 'Create product', + 'create_quote' => 'Create Quote', + 'create_recurring' => 'Create Recurring', + 'created' => 'Created', + 'credit_invoice' => 'Credit Invoice', + 'credit_invoice_date' => 'Credit invoice date', + 'credit_invoice_details' => 'Credit invoice details', + 'credit_invoice_for_invoice' => 'Credit invoice for invoice', + 'cron_key' => 'CRON Key', + 'currency_code' => 'Currency Code', + 'currency' => 'Currency', + 'currency_symbol' => 'Currency Symbol', + 'currency_symbol_placement' => 'Currency Symbol Placement', + 'current_day' => 'Current day', + 'current_month' => 'Current month', + 'current_version' => 'Current Version', + 'current_year' => 'Current year', + 'current_yy' => 'Current year (2-digit format)', + 'custom_field_form' => 'Custom Field Form', + 'custom_fields' => 'Custom Fields', + 'custom_title' => 'Custom Title', + 'custom_values' => 'Custom Values', + 'custom_values_new' => 'New Custom Value', + 'custom_values_edit' => 'Edit Custom Value', + 'dashboard' => 'Dashboard', + 'database' => 'Database', + 'database_properly_configured' => 'The database is properly configured', + 'date' => 'Date', + 'date_applied' => 'Date Applied', + 'date_format' => 'Date Format', + 'days' => 'Days', + 'decimal_point' => 'Decimal Point', + 'default_country' => 'Default country', + 'default_email_template' => 'Default Email Template', + 'default_invoice_group' => 'Default Invoice Group', + 'default_invoice_tax_rate' => 'Default Invoice Tax Rate', + 'default_invoice_tax_rate_placement' => 'Default Invoice Tax Rate Placement', + 'default_item_tax_rate' => 'Default Item Tax Rate', + 'default_list_limit' => 'Number of Items in Lists', + 'default_notes' => 'Default Notes', + 'default_payment_method' => 'Default Payment Method', + 'default_pdf_template' => 'Default PDF Template', + 'default_public_template' => 'Default Public Template', + 'default_quote_group' => 'Default Quote Group', + 'default_terms' => 'Default Terms', + 'delete' => 'Delete', + 'delete_attachment_warning' => 'Are you sure you wish to delete this attachment?', + 'delete_client' => 'Delete Customer', + 'delete_client_warning' => 'If you delete this customer you will also delete any invoices, quotes and payments related to this customer. Are you sure you want to permanently delete this client?', + 'delete_invoice' => 'Delete Invoice', + 'delete_invoice_warning' => 'If you delete this invoice you will not be able to recover it later. Are you sure you want to permanently delete this invoice?', + 'delete_quote' => 'Delete Quote', + 'delete_quote_warning' => 'If you delete this quote you will not be able to recover it later. Are you sure you want to permanently delete this quote?', + 'delete_record_warning' => 'Are you sure you wish to delete this record?', + 'description' => 'Description', + 'details' => 'Details', + 'disable_quickactions' => 'Disable the Quickactions', + 'disable_sidebar' => 'Disable the Sidebar', + 'discount' => 'Discount', + 'documentation' => 'Documentation', + 'download' => 'Download', + 'download_pdf' => 'Download PDF', + 'draft' => 'Draft', + 'drop_files_here' => 'Drop files here!', + 'due_date' => 'Due Date', + 'edit' => 'Edit', + 'elements' => 'Elements', + 'email' => 'Email', + 'email_address' => 'Email Address', + 'email_invoice' => 'Email Invoice', + 'email_not_configured' => 'Before you can send Email, you have to configure your Email settings in the System Settings area.', + 'email_to_address_missing' => 'You have to specify an email address the email should be sent to.', + 'email_pdf_attachment' => 'Attach Quote/Invoice on email?', + 'email_quote' => 'Email Quote', + 'email_send_method' => 'Email Sending Method', + 'email_send_method_phpmail' => 'PHP Mail', + 'email_send_method_sendmail' => 'Sendmail', + 'email_send_method_smtp' => 'SMTP', + 'email_settings' => 'Email Settings', + 'email_successfully_sent' => 'Email successfully sent', + 'email_template' => 'Email Template', + 'email_template_already_exists' => 'Email Template already exists!', + 'email_template_form' => 'Email Template Form', + 'email_template_overdue' => 'Overdue Email Template', + 'email_template_paid' => 'Paid Email Template', + 'email_template_tags' => 'Email Template Tags', + 'email_template_tags_instructions' => 'Template tags can be used to add dynamic information like the customer name or an invoice number to the email template. Click on the Body textfield and then select a tag from the drop down. It will be automatically inserted into the textfield.', + 'email_templates' => 'Email Templates', + 'enabled' => 'Enabled', + 'enable_debug_mode' => 'Enable the Debug Mode', + 'end_date' => 'End Date', + 'enter_payment' => 'Enter Payment', + 'errors' => 'Errors', + 'error_duplicate_file' => 'Error: Duplicate file name, please change it!', + 'every' => 'Every', + 'example' => 'Example', + 'expired' => 'Expired', + 'expires' => 'Expires', + 'extra_information' => 'Extra information', + 'failure' => 'Failure', + 'families' => 'Families', + 'family' => 'Family', + 'family_already_exists' => 'Family already exists!', + 'family_name' => 'Family name', + 'fax' => 'Fax', + 'fax_abbr' => 'F', + 'fax_number' => 'Fax Number', + 'field' => 'Field', + 'filter_clients' => 'Filter Customers', + 'filter_invoices' => 'Filter Invoices', + 'filter_payments' => 'Filter Payments', + 'filter_quotes' => 'Filter Quotes', + 'first' => 'First', + 'first_day_of_week' => 'Fist day of week', + 'footer' => 'Footer', + 'forgot_your_password' => 'I forgot my password', + 'from_date' => 'From Date', + 'from_email' => 'From Email', + 'from_name' => 'From Name', + 'general' => 'General', + 'general_settings' => 'General Settings', + 'generate' => 'Generate', + 'generate_invoice_number_for_draft' => 'Generate the invoice number for draft invoices', + 'generate_quote_number_for_draft' => 'Generate the quote number for draft quotes', + 'generate_sumex' => 'Generate Sumex PDF', + 'guest_account_denied' => 'This account is not configured. Please contact the system administrator.', + 'guest_read_only' => 'Guest (Read Only)', + 'guest_url' => 'Guest URL', + 'hostname' => 'Hostname', + 'id' => 'ID', + 'identifier_format' => 'Identifier formatting', + 'identifier_format_template_tags' => 'Template tags for the Identifier', + 'identifier_format_template_tags_instructions' => 'Template tags can be used to add dynamic information like the customer name or an invoice number to the email template. Click on the Identifier formatting field and then select a tag from the drop down. It will be automatically inserted into the textfield.', + 'import' => 'Import', + 'import_data' => 'Import Data', + 'import_from_csv' => 'Import from CSV', + 'inactive' => 'Inactive', + 'interface' => 'Interface', + 'invoice' => 'Invoice', + 'invoice_aging' => 'Invoice Aging', + 'invoice_aging_16_30' => '16 - 30 Days', + 'invoice_aging_1_15' => '1 - 15 Days', + 'invoice_aging_above_30' => 'Above 30 Days', + 'invoice_already_paid' => 'This invoice was already paid.', + 'invoice_archive' => 'Invoice Archive', + 'invoice_count' => 'Invoice Count', + 'invoice_date' => 'Invoice Date', + 'invoice_deletion_forbidden' => 'Deleting invoices is forbidden. Please contact the administrator or consult the documentation.', + 'invoice_group' => 'Invoice Group', + 'invoice_group_form' => 'Invoice Group Form', + 'invoice_groups' => 'Invoice Groups', + 'invoice_items' => 'Invoice Items', + 'invoice_logo' => 'Invoice Logo', + 'invoice_not_found' => 'Invoice Not Found', + 'invoice_overview' => 'Invoice Overview', + 'invoice_overview_period' => 'Invoice Overview Period', + 'invoice_password' => 'PDF password (optional)', + 'invoice_pdf_include_zugferd' => 'Include ZUGFeRD', + 'invoice_pdf_include_zugferd_help' => 'Enabling this option will include ZUGFeRD XML in invoice PDFs, which is an XML standard for invoices. More information', + 'invoice_pre_password' => 'Invoice standard PDF password (optional)', + 'invoice_sumex' => 'Sumex', + 'invoice_sumex_help' => 'This options adds a menu entry in invoices to generate a TARMED / SUMEX1 semi compatible invoice. TARMED / SUMEX1 is a swiss standard for healthcares. More Info', + 'invoice_tax' => 'Invoice Tax', + 'invoice_tax_rate' => 'Invoice Tax Rate', + 'invoice_template' => 'Invoice Template', + 'invoice_terms' => 'Invoice Terms', + 'invoiced' => 'Invoiced', + 'invoiceplane_news' => 'InvoicePlane News', + 'invoices' => 'Invoices', + 'invoices_due_after' => 'Invoices Due After (Days)', + 'is_not_writable' => 'is not writable', + 'is_writable' => 'is writable', + 'item' => 'Item', + 'item_discount' => 'Item Discount', + 'item_lookup_form' => 'Item Lookup Form', + 'item_lookups' => 'Item Lookups', + 'item_name' => 'Item Name', + 'item_tax' => 'Item Tax', + 'item_tax_rate' => 'Item Tax Rate', + 'label' => 'Label', + 'language' => 'Language', + 'last' => 'Last', + 'last_month' => 'Last Month', + 'last_quarter' => 'Last Quarter', + 'last_year' => 'Last Year', + 'left_pad' => 'Left Pad', + 'loading_error' => 'It seems that the application stuck because of an error.', + 'loading_error_help' => 'Get Help', + 'login' => 'Login', + 'login_logo' => 'Login Logo', + 'loginalert_credentials_incorrect' => 'Email or Password incorrect.', + 'loginalert_no_password' => 'Please enter a password.', + 'loginalert_user_inactive' => 'This user is marked as inactive. Please contact the system administrator.', + 'loginalert_user_not_found' => 'There is no account registered with this Email address.', + 'loginalert_wrong_auth_code' => 'Password reset denied. You provided an invalid auth token.', + 'logout' => 'Logout', + 'mark_invoices_sent_pdf' => 'Mark invoices as sent when PDF is generated', + 'mark_quotes_sent_pdf' => 'Mark quotes as sent when PDF is generated', + 'max_quantity' => 'Maximum Quantity', + 'menu' => 'Menu', + 'min_quantity' => 'Minimal Quantity', + 'mobile' => 'Mobile', + 'mobile_number' => 'Mobile Number', + 'monday' => 'Monday', + 'monospaced_font_for_amounts' => 'Use a Monospace font for amounts', + 'month' => 'Month', + 'month_prefix' => 'Month Prefix', + 'multiple_choice' => 'Multiple Choice', + 'name' => 'Name', + 'new' => 'New', + 'new_password' => 'New password', + 'new_product' => 'New product', + 'next' => 'Next', + 'next_date' => 'Next Date', + 'next_id' => 'Next ID', + 'no' => 'No', + 'no_overdue_invoices' => 'No overdue Invoices', + 'no_quotes_requiring_approval' => 'There are no quotes requiring approval.', + 'no_updates_available' => 'No updates available.', + 'none' => 'None', + 'note' => 'Note', + 'notes' => 'Notes', + 'not_set' => 'Not set yet', + 'open' => 'Open', + 'open_invoices' => 'Open Invoices', + 'open_quotes' => 'Open Quotes', + 'open_reports_in_new_tab' => 'Open Reports in a new Browser Tab', + 'optional' => 'Optional', + 'options' => 'Options', + 'order' => 'Order', + 'other_settings' => 'Other Settings', + 'overdue' => 'Overdue', + 'overdue_invoices' => 'Overdue Invoices', + 'page' => 'Page', + 'paid' => 'Paid', + 'password' => 'Password', + 'password_changed' => 'Password successfully changed', + 'password_reset' => 'Password Reset', + 'password_reset_email' => 'You requested a new password for your Installation of InvoicePlane. Please click the following link to reset your password:', + 'password_reset_info' => 'You will get an Email with a link to reset your password.', + 'password_reset_failed' => 'An error occurred while trying to send your password reset email. Please review the application logs or contact the system administrator.', + 'pay_now' => 'Pay Now', + 'payment' => 'Payment', + 'payment_cannot_exceed_balance' => 'Payment amount cannot exceed invoice balance.', + 'payment_date' => 'Payment Date', + 'payment_form' => 'Payment Form', + 'payment_history' => 'Payment History', + 'payment_method' => 'Payment Method', + 'payment_method_already_exists' => 'Payment Method already exists!', + 'payment_method_form' => 'Payment Method Form', + 'payment_methods' => 'Payment Methods', + 'payments' => 'Payments', + 'per_item' => 'per Item', + 'pdf' => 'PDF', + 'pdf_invoice_footer' => 'PDF Footer', + 'pdf_invoice_footer_hint' => 'You can enter any HTML here which will be displayed on the bottom of your PDF invoices and your PDF quotes.', + 'pdf_settings' => 'PDF Settings', + 'pdf_template' => 'PDF Template', + 'pdf_template_overdue' => 'Overdue PDF Template', + 'pdf_template_paid' => 'Paid PDF Template', + 'period' => 'Period', + 'personal_information' => 'Personal Information', + 'phone' => 'Phone', + 'phone_abbr' => 'P', + 'phone_number' => 'Phone Number', + 'php_timezone_fail' => 'There seems to be no timezone configured. Please check date.timezone in your php configuration. Otherwise %s will be selected.', + 'php_timezone_success' => 'A valid timezone is configured.', + 'php_version_fail' => 'PHP version %s is installed but InvoicePlane requires PHP version %s or higher', + 'php_version_success' => 'PHP appears to meet the installation requirement', + 'please_enable_js' => 'Please enable Javascript to use InvoicePlane', + 'port' => 'Port', + 'position' => 'Position', + 'prefix' => 'Prefix', + 'prev' => 'Prev', + 'preview' => 'Preview', + 'price' => 'Price', + 'product' => 'Product', + 'product_description' => 'Product description', + 'product_families' => 'Product families', + 'product_name' => 'Product name', + 'product_price' => 'Price', + 'product_sku' => 'HSN', + 'product_tariff' => 'Tariff', + 'product_units' => 'Product Units', + 'product_unit' => 'Product Unit', + 'products' => 'Products', + 'products_form' => 'Product Form', + 'properties' => 'Properties', + 'provider_name' => 'Provider Name', + 'purchase_price' => 'Purchase price', + 'Q1' => 'Q1', + 'Q2' => 'Q2', + 'Q3' => 'Q3', + 'Q4' => 'Q4', + 'qty' => 'Qty', + 'quantity' => 'Quantity', + 'quarter' => 'Quarter', + 'quick_actions' => 'Quick Actions', + 'quote' => 'Quote', + 'quote_approved' => 'This quote has been approved', + 'quote_date' => 'Quote Date', + 'quote_group' => 'Quote Group', + 'quote_overview' => 'Quote Overview', + 'quote_overview_period' => 'Quote Overview Period', + 'quote_password' => 'Quote PDF password (optional)', + 'quote_pre_password' => 'Quote standard PDF password (optional)', + 'quote_rejected' => 'This quote has been rejected', + 'quote_status_email_body' => 'The customer %1$s has %2$s the quote %3$s.' . "\n\n" . 'Link to Quote: %4$s', + 'quote_status_email_subject' => 'Customer %1$s %2$s quote %3$s', + 'quote_tax' => 'Quote Tax', + 'quote_template' => 'Quote Template', + 'quote_templates' => 'Quote Templates', + 'quote_to_invoice' => 'Quote to Invoice', + 'quotes' => 'Quotes', + 'quotes_expire_after' => 'Quotes Expire After (Days)', + 'quotes_requiring_approval' => 'Quotes Requiring Approval', + 'read_only' => 'Read only', + 'recent_clients' => 'Recent Customers', + 'recent_invoices' => 'Recent Invoices', + 'recent_payments' => 'Recent Payments', + 'recent_quotes' => 'Recent Quotes', + 'record_successfully_created' => 'Record successfully created', + 'record_successfully_deleted' => 'Record successfully deleted', + 'record_successfully_updated' => 'Record successfully updated', + 'recurring' => 'Recurring', + 'recurring_invoices' => 'Recurring Invoices', + 'reject' => 'Reject', + 'reject_this_quote' => 'Reject This Quote', + 'rejected' => 'Rejected', + 'remove' => 'Remove', + 'remove_logo' => 'Remove Logo', + 'report_options' => 'Report Options', + 'reports' => 'Reports', + 'reset' => 'Reset', + 'reset_password' => 'Reset password', + 'run_report' => 'Run Report', + 'search_product' => 'Search product', + 'sales' => 'Sales', + 'sales_by_client' => 'Sales by Customer', + 'sales_by_date' => 'Sales by Date', + 'sales_with_tax' => 'Sales with Tax', + 'save' => 'Save', + 'save_item_as_lookup' => 'Save item as lookup', + 'select_family' => 'Select family', + 'select_unit' => 'Select unit', + 'select_payment_method' => 'Select the Payment Method', + 'send' => 'Send', + 'send_email' => 'Send Email', + 'sent' => 'Printed', + 'set_new_password' => 'Set a new password', + 'settings' => 'Settings', + 'settings_successfully_saved' => 'Settings successfully saved', + 'setup_choose_language' => 'Choose a Language', + 'setup_choose_language_message' => 'Choose a language to continue the installation.', + 'setup_complete' => 'Installation Complete', + 'setup_complete_message' => 'InvoicePlane has been successfully installed. You may now log in.', + 'setup_complete_secure_setup' => 'If you want to secure your installation, you may disable the setup for now. To do so, replace the line DISABLE_SETUP=false with DISABLE_SETUP=true in your ipconfig.php file.', + 'setup_complete_support_note' => 'If you encounter any problems or you need help take a look at the official wiki or the community forum.', + 'setup_create_user' => 'Create User Account', + 'setup_create_user_message' => 'This is the information you will need to log into InvoicePlane.', + 'setup_database_configured_message' => 'The database is successfully configured.', + 'setup_database_details' => 'Database Details', + 'setup_database_message' => 'Provide the following information to connect to your database.', + 'setup_db_cannot_connect' => 'Cannot connect to the database server with the provided database information. Please check the credentials and try again.', + 'setup_db_database_info' => 'The name of the database you created for InvoicePlane.', + 'setup_db_hostname_info' => 'The hostname for your database.', + 'setup_db_port_info' => 'The port your hostname is listening on. Default is 3306.', + 'setup_db_password_info' => 'Password associated with the database.', + 'setup_db_username_info' => 'Username associated with the database.', + 'setup_install_tables' => 'Install Tables', + 'setup_other_contact' => 'Other Contact', + 'setup_prerequisites' => 'Prerequisites', + 'setup_prerequisites_message' => 'Welcome to InvoicePlane! Any issue listed below must be resolved before the installation can continue.', + 'setup_tables_errors' => 'The errors below need to be resolved before the installation can continue.', + 'setup_tables_success' => 'The database tables were successfully installed.', + 'setup_upgrade_message' => 'The errors below need to be resolved before the installation can continue.', + 'setup_upgrade_success' => 'The database tables were successfully upgraded.', + 'setup_upgrade_tables' => 'Upgrade Tables', + 'setup_user_address_info' => 'The address information entered below will display on your invoices.', + 'setup_user_contact_info' => 'This contact information can also display on your invoices.', + 'setup_user_email_info' => 'Your Email address will be used to log into InvoicePlane.', + 'setup_user_name_info' => 'Either your company name or your first and last name.', + 'setup_user_password_info' => 'Remember to use a strong password. A combination of upper and lower case letters, numbers and symbols is recommended. Minimum length: 8 characters', + 'setup_user_password_verify_info' => 'Verify your password by providing the same password again.', + 'setup_v120_alert' => 'Attention!
    It\'s very important that you read this update notice about some significant changes of the InvoicePlane application.', + 'setup_v147_alert' => 'Attention!
    Please open the file application/config/config.php and change the line $config[\'sess_use_database\'] = false; to $config[\'sess_use_database\'] = true;.
    More details can be found here', + 'set_to_read_only' => 'Set the Invoice to read-only on', + 'single_choice' => 'Single Choice', + 'six_months' => 'Six Months', + 'smtp_password' => 'SMTP Password', + 'smtp_port' => 'SMTP Port', + 'smtp_requires_authentication' => 'Requires Authentication', + 'smtp_security' => 'Security', + 'smtp_server_address' => 'SMTP Server Address', + 'smtp_ssl' => 'SSL', + 'smtp_tls' => 'TLS', + 'smtp_username' => 'SMTP Username', + 'smtp_verify_certs' => 'Verify SMTP certificates', + 'sql_file' => 'SQL File', + 'start_date' => 'Start Date', + 'state' => 'State', + 'status' => 'Status', + 'stop' => 'Stop', + 'street_address' => 'Street Address', + 'street_address_2' => 'Street Address 2', + 'subject' => 'Subject', + 'submenu' => 'Submenu', + 'submit' => 'Submit', + 'subtotal' => 'Subtotal', + 'success' => 'Success', + 'sunday' => 'Sunday', + 'system_settings' => 'System Settings', + 'table' => 'Table', + 'tax' => 'Tax', + 'tax_code' => 'Taxes Code', + 'tax_code_short' => 'Tax Code', + 'tax_information' => 'Taxes Information', + 'tax_rate' => 'Tax Rate', + 'tax_rate_decimal_places' => 'Tax Rate Decimal Places', + 'tax_rate_form' => 'Tax Rate Form', + 'tax_rate_name' => 'Tax Rate Name', + 'tax_rate_percent' => 'Tax Rate Percent', + 'tax_rate_placement' => 'Tax Rate Placement', + 'tax_rates' => 'Tax Rates', + 'taxes' => 'Taxes', + 'terms' => 'Terms', + 'text' => 'Text', + 'theme' => 'Theme', + 'this_month' => 'This Month', + 'this_quarter' => 'This Quarter', + 'this_year' => 'This Year', + 'thousands_separator' => 'Thousands Separator', + 'title' => 'Title', + 'to_date' => 'To Date', + 'to_email' => 'To Email', + 'total' => 'Total', + 'total_balance' => 'Total Balance', + 'total_billed' => 'Total Billed', + 'total_paid' => 'Total Paid', + 'try_again' => 'Try Again', + 'type' => 'Type', + 'unknown' => 'Unknown', + 'updatecheck' => 'Updatecheck', + 'updatecheck_failed' => 'Updatecheck failed! Check your network connection.', + 'updates' => 'Updates', + 'updates_available' => 'Updates available!', + 'user' => 'User', + 'user_accounts' => 'User Accounts', + 'user_form' => 'User Form', + 'user_type' => 'User Type', + 'username' => 'Username', + 'users' => 'Users', + 'unit' => 'Unit', + 'units' => 'Units', + 'unit_already_exists' => 'Unit already exists!', + 'unit_name' => 'Unit Name', + 'unit_name_plrl' => 'Unit Name (plural form)', + 'use_system_language' => 'Use System language', + 'value' => 'Value', + 'values' => 'Values', + 'values_with_taxes' => 'Values with taxes', + 'vat_id' => 'VAT ID', + 'vat_id_short' => 'VAT', + 'verify_password' => 'Verify Password', + 'version_history' => 'Version History', + 'view' => 'View', + 'view_all' => 'View All', + 'view_client' => 'View Customer', + 'view_clients' => 'View Customers', + 'view_invoices' => 'View Invoices', + 'view_payments' => 'View Payments', + 'view_products' => 'View products', + 'view_quotes' => 'View Quotes', + 'view_recurring_invoices' => 'View Recurring Invoices', + 'viewed' => 'Viewed', + 'warning' => 'Warning', + 'web' => 'Web', + 'web_address' => 'Web Address', + 'welcome' => 'Welcome', + 'wrong_passwordreset_token' => 'No user found for the provided reset token. If you think this is an error, contact your administrator.', + 'year' => 'Year', + 'year_prefix' => 'Year Prefix', + 'years' => 'Years', + 'yes' => 'Yes', + 'zip' => 'Zip Code', + 'zip_code' => 'Zip Code', + + //Time Management + 'default_hourly_rate' => 'Default hourly rate', + 'add_task' => 'Add task', + 'tasks' => 'Tasks', + 'project' => 'Project', + 'projects' => 'Projects', + 'projects_form' => 'Projects', + 'create_task' => 'Create task', + 'show_tasks' => 'Show tasks', + 'project_name' => 'Project name', + 'task_name' => 'Task name', + 'task_description' => 'Task description', + 'task_price' => 'Task price', + 'tasks_form' => 'Task form', + 'new_task' => 'New task', + 'select_project' => 'Select project', + 'task_finish_date' => 'Finish date', + 'no_client' => 'No customer', + 'alert_no_client_assigned' => 'No customer assigned to this project.', + 'not_started' => 'Not started', + 'in_progress' => 'In progress', + 'complete' => 'Complete', + 'alert_no_tasks_found' => 'No tasks found for this project.', + 'alert_task_delete' => 'Caution! You want to delete a task that was used to generate an invoice.', + 'info_task_readonly' => 'This task cannot be altered anymore because it is already invoiced.', + 'enable_projects' => 'Enable the Projects module', + + // Sumex + 'sumex_settings' => 'Sumex Settings', + 'birthdate' => 'Birthdate', + 'gender' => 'Gender', + 'gender_male' => 'Male', + 'gender_female' => 'Female', + 'gender_other' => 'Other', + 'treatment' => 'Treatment', + 'start' => 'Start', + 'end' => 'End', + 'reason' => 'Reason', + 'reason_disease' => 'Disease', + 'reason_accident' => 'Accident', + 'reason_maternity' => 'Maternity', + 'reason_prevention' => 'Prevention', + 'reason_birthdefect' => 'Birth defect', + 'reason_unknown' => 'Unknown', + 'item_date' => 'Item Date', + 'sumex_information' => 'Sumex Information', + 'gln' => 'GLN', + 'case_date' => 'Case Date', + 'case_number' => 'Case Number', + 'generate_copy' => 'Generate Copy', + 'invoice_sumex_sliptype' => 'Sumex Slip Type', + 'invoice_sumex_sliptype-esr9' => 'ESR 9 (Orange Slip)', + 'invoice_sumex_sliptype-esrRed' => 'Red Slip', + 'invoice_sumex_sliptype_help' => 'This option will change the slip type in Sumex. Please note that if you select the Orange slip you need a subscriber number that starts with "01-"', + 'invoice_sumex_role' => 'Sumex Role', + 'invoice_sumex_role_physician' => 'Physician', + 'invoice_sumex_role_physiotherapist' => 'Physiotherapist', + 'invoice_sumex_role_chiropractor' => 'Chiropractor', + 'invoice_sumex_role_ergotherapist' => 'Ergotherapist', + 'invoice_sumex_role_nutritionist' => 'Nutritionist', + 'invoice_sumex_role_midwife' => 'Midwife', + 'invoice_sumex_role_logotherapist' => 'Logotherapist', + 'invoice_sumex_role_hospital' => 'Hospital', + 'invoice_sumex_role_pharmacist' => 'Pharmacist', + 'invoice_sumex_role_dentist' => 'Dentist', + 'invoice_sumex_role_labtechnician' => 'Lab Technician', + 'invoice_sumex_role_dentaltechnician' => 'Dental Technician', + 'invoice_sumex_role_othertechnician' => 'Other Technician', + 'invoice_sumex_role_psychologist' => 'Psychologist', + 'invoice_sumex_role_wholesaler' => 'Wholesaler', + 'invoice_sumex_role_nursingstaff' => 'Nursing Staff', + 'invoice_sumex_role_transport' => 'Transport', + 'invoice_sumex_role_druggist' => 'Druggist', + 'invoice_sumex_role_naturopathicdoctor' => 'Naturopathicdoctor', + 'invoice_sumex_role_naturopathictherapist' => 'Naturopathictherapist', + 'invoice_sumex_role_other' => 'Other', + 'invoice_sumex_place' => 'Sumex Place', + 'invoice_sumex_place_practice' => 'Practice', + 'invoice_sumex_place_hospital' => 'Hospital', + 'invoice_sumex_place_lab' => 'Lab', + 'invoice_sumex_place_association' => 'Association', + 'invoice_sumex_place_company' => 'Company', + 'invoice_sumex_diagnosis' => 'Diagnosis', + 'invoice_sumex_canton' => 'Canton', + 'sumex_observations' => 'Observations', + 'sumex_rcc' => 'RCC', + 'sumex_ssn' => 'AVS', + 'sumex_insurednumber' => 'Insured Number', + 'sumex_veka' => 'VEKA', + 'user_iban' => 'IBAN', + 'user_subscriber_number' => 'Subscriber Number', + // Errors + 'validator_fail' => 'Unable to process field %s: %s', + + // Types + 'true' => 'True', + 'false' => 'False' +); diff --git a/application/libraries/Crypt.php b/application/libraries/Crypt.php new file mode 100644 index 0000000..377d689 --- /dev/null +++ b/application/libraries/Crypt.php @@ -0,0 +1,89 @@ +load->library('cryptor'); + + $key = getenv('ENCRYPTION_KEY'); + if (preg_match("/^base64:(.*)$/", $key, $matches)) { + $key = base64_decode($matches[1]); + } + + $encrypted = Cryptor::Encrypt($data, $key); + return $encrypted; + + } + + /** + * @param string $data + * @return string + */ + public function decode($data) + { + $CI = &get_instance(); + $CI->load->library('cryptor'); + + if (empty($data)) { + return ''; + } + + $key = getenv('ENCRYPTION_KEY'); + if (preg_match("/^base64:(.*)$/", $key, $matches)) { + $key = base64_decode($matches[1]); + } + + $decrypted = Cryptor::Decrypt($data, $key); + return $decrypted; + + } +} diff --git a/application/libraries/Cryptor.php b/application/libraries/Cryptor.php new file mode 100644 index 0000000..ded1694 --- /dev/null +++ b/application/libraries/Cryptor.php @@ -0,0 +1,198 @@ +cipher_algo = $cipher_algo; + $this->hash_algo = $hash_algo; + $this->format = $fmt; + + if (!in_array($cipher_algo, openssl_get_cipher_methods(true))) + { + throw new \Exception("Cryptor:: - unknown cipher algo {$cipher_algo}"); + } + + if (!in_array($hash_algo, openssl_get_md_methods(true))) + { + throw new \Exception("Cryptor:: - unknown hash algo {$hash_algo}"); + } + + $this->iv_num_bytes = openssl_cipher_iv_length($cipher_algo); + } + + /** + * Encrypt a string. + * @param string $in String to encrypt. + * @param string $key Encryption key. + * @param int $fmt Optional override for the output encoding. One of FORMAT_RAW, FORMAT_B64 or FORMAT_HEX. + * @return string The encrypted string. + */ + public function encryptString($in, $key, $fmt = null) + { + if ($fmt === null) + { + $fmt = $this->format; + } + + // Build an initialisation vector + $iv = random_bytes($this->iv_num_bytes); + + // Hash the key + $keyhash = openssl_digest($key, $this->hash_algo, true); + + // and encrypt + $opts = OPENSSL_RAW_DATA; + $encrypted = openssl_encrypt($in, $this->cipher_algo, $keyhash, $opts, $iv); + + if ($encrypted === false) + { + throw new \Exception('Cryptor::encryptString() - Encryption failed: ' . openssl_error_string()); + } + + // The result comprises the IV and encrypted data + $res = $iv . $encrypted; + + // and format the result if required. + if ($fmt == Cryptor::FORMAT_B64) + { + $res = base64_encode($res); + } + else if ($fmt == Cryptor::FORMAT_HEX) + { + $res = unpack('H*', $res)[1]; + } + + return $res; + } + + /** + * Decrypt a string. + * @param string $in String to decrypt. + * @param string $key Decryption key. + * @param int $fmt Optional override for the input encoding. One of FORMAT_RAW, FORMAT_B64 or FORMAT_HEX. + * @return string The decrypted string. + */ + public function decryptString($in, $key, $fmt = null) + { + if ($fmt === null) + { + $fmt = $this->format; + } + + $raw = $in; + + // Restore the encrypted data if encoded + if ($fmt == Cryptor::FORMAT_B64) + { + $raw = base64_decode($in); + } + else if ($fmt == Cryptor::FORMAT_HEX) + { + $raw = pack('H*', $in); + } + + // and do an integrity check on the size. + if (strlen($raw) < $this->iv_num_bytes) + { + throw new \Exception('Cryptor::decryptString() - ' . + 'data length ' . strlen($raw) . " is less than iv length {$this->iv_num_bytes}"); + } + + // Extract the initialisation vector and encrypted data + $iv = substr($raw, 0, $this->iv_num_bytes); + $raw = substr($raw, $this->iv_num_bytes); + + // Hash the key + $keyhash = openssl_digest($key, $this->hash_algo, true); + + // and decrypt. + $opts = OPENSSL_RAW_DATA; + $res = openssl_decrypt($raw, $this->cipher_algo, $keyhash, $opts, $iv); + + if ($res === false) + { + throw new \Exception('Cryptor::decryptString - decryption failed: ' . openssl_error_string()); + } + + return $res; + } + + /** + * Static convenience method for encrypting. + * @param string $in String to encrypt. + * @param string $key Encryption key. + * @param int $fmt Optional override for the output encoding. One of FORMAT_RAW, FORMAT_B64 or FORMAT_HEX. + * @return string The encrypted string. + */ + public static function Encrypt($in, $key, $fmt = null) + { + $c = new Cryptor(); + return $c->encryptString($in, $key, $fmt); + } + + /** + * Static convenience method for decrypting. + * @param string $in String to decrypt. + * @param string $key Decryption key. + * @param int $fmt Optional override for the input encoding. One of FORMAT_RAW, FORMAT_B64 or FORMAT_HEX. + * @return string The decrypted string. + */ + public static function Decrypt($in, $key, $fmt = null) + { + $c = new Cryptor(); + return $c->decryptString($in, $key, $fmt); + } +} +?> diff --git a/application/libraries/MY_Form_validation.php b/application/libraries/MY_Form_validation.php new file mode 100644 index 0000000..424cb84 --- /dev/null +++ b/application/libraries/MY_Form_validation.php @@ -0,0 +1,38 @@ +CI->db->limit(1)->where($field, $str)->where($id_field . ' != ', $id_val)->get($table); + } else { + list($table, $field) = explode('.', $field); + $query = $this->CI->db->limit(1)->get_where($table, array($field => $str)); + } + + return $query->num_rows() === 0; + } + + function run($module = '', $group = '') + { + (is_object($module)) AND $this->CI = &$module; + return parent::run($group); + } +} diff --git a/application/libraries/Sumex.php b/application/libraries/Sumex.php new file mode 100644 index 0000000..f17d179 --- /dev/null +++ b/application/libraries/Sumex.php @@ -0,0 +1,757 @@ + 'male', + 'birthdate' => '1970-01-01', + 'familyName' => 'FamilyName', + 'givenName' => 'GivenName', + 'street' => 'ClientStreet 10', + 'zip' => '0000', + 'city' => 'ClientCity', + 'phone' => '000 000 00 00', + 'avs' => '7000000000000' + ); + + public $_casedate = "1970-01-01"; + public $_casenumber = "0"; + public $_insuredid = '1234567'; + + public $_treatment = array( + 'start' => '', + 'end' => '', + 'reason' => 'disease', + 'diagnosis' => '.' + ); + + public $_company = array( + 'name' => 'SomeCompany GmbH', + 'street' => 'Via Cantonale 5', + 'zip' => '6900', + 'city' => 'Lugano', + 'phone' => '091 902 11 00', + 'gln' => '123456789123', // EAN 13 + 'rcc' => 'C000002' + ); + + public $_insurance = array( + 'gln' => '7634567890000', + 'name' => 'SUVA', + 'street' => 'ChangeMe 12', + 'zip' => '6900', + 'city' => 'Lugano' + ); + + public $_options = array( + 'copy' => "0", + 'storno' => "0" + ); + + public function __construct($params) + { + $CI = &get_instance(); + + $CI->load->helper('invoice'); + + $this->invoice = $params['invoice']; + $this->items = $params['items']; + if (!is_array(@$params['options'])) { + $params['options'] = array(); + } + $this->_options = array_merge($this->_options, $params['options']); + + $this->_storno = $this->_options['storno']; + $this->_copy = $this->_options['copy']; + + + $this->_patient['givenName'] = $this->invoice->client_name; + $this->_patient['familyName'] = $this->invoice->client_surname; + $this->_patient['birthdate'] = $this->invoice->client_birthdate; + $this->_patient['gender'] = ($this->invoice->client_gender == "0" ? "male" : "female"); + $this->_patient['street'] = $this->invoice->client_address_1; + $this->_patient['zip'] = $this->invoice->client_zip; + $this->_patient['city'] = $this->invoice->client_city; + $this->_patient['phone'] = ($this->invoice->client_phone == "" ? null : $this->invoice->client_phone); + $this->_patient['avs'] = $this->invoice->client_avs; + + $this->_company['name'] = $this->invoice->user_company; + $this->_company['street'] = $this->invoice->user_address_1; + $this->_company['zip'] = $this->invoice->user_zip; + $this->_company['city'] = $this->invoice->user_city; + $this->_company['phone'] = $this->invoice->user_phone; + $this->_company['gln'] = $this->invoice->user_gln; + $this->_company['rcc'] = $this->invoice->user_rcc; + + $this->_casedate = $this->invoice->sumex_casedate; + $this->_casenumber = $this->invoice->sumex_casenumber; + $this->_insuredid = $this->invoice->client_insurednumber; + + + $treatments = array( + 'disease', + 'accident', + 'maternity', + 'prevention', + 'birthdefect', + 'unknown' + ); + + + $this->_treatment = array( + 'start' => $this->invoice->sumex_treatmentstart, + 'end' => $this->invoice->sumex_treatmentend, + 'reason' => $treatments[$this->invoice->sumex_reason], + 'diagnosis' => $this->invoice->sumex_diagnosis, + 'observations' => $this->invoice->sumex_observations, + ); + + $esrTypes = array("9", "red"); + $this->_esrType = $esrTypes[$CI->mdl_settings->setting('sumex_sliptype')]; + + $this->currencyCode = $CI->mdl_settings->setting('currency_code'); + $this->_role = Sumex::ROLES[$CI->mdl_settings->setting('sumex_role')]; + $this->_place = Sumex::PLACES[$CI->mdl_settings->setting('sumex_place')]; + $this->_canton = Sumex::CANTONS[$CI->mdl_settings->setting('sumex_canton')]; + } + + public function pdf() + { + $ch = curl_init(); + + $xml = $this->xml(); + + curl_setopt($ch, CURLOPT_URL, SUMEX_URL . "/generateInvoice"); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30); + curl_setopt($ch, CURLOPT_TIMEOUT, 180); //timeout in seconds + curl_setopt($ch, CURLOPT_POSTFIELDS, $xml); + $out = curl_exec($ch); + curl_close($ch); + + + return $out; + } + + public function xml() + { + $this->doc = new DOMDocument('1.0', 'UTF-8'); + $this->doc->formatOutput = true; + + $this->root = $this->xmlRoot(); + $this->root->appendChild($this->xmlInvoiceProcessing()); + $this->root->appendChild($this->xmlInvoicePayload()); + + $this->doc->appendChild($this->root); + return $this->doc->saveXML(); + } + + protected function xmlRoot() + { + $node = $this->doc->createElement('invoice:request'); + $node->setAttribute('xmlns:invoice', 'http://www.forum-datenaustausch.ch/invoice'); + $node->setAttribute('xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance'); + $node->setAttribute('xmlns:nsxenc', 'http://www.w3.org/2001/04/xmlenc#'); + $node->setAttribute('xsi:schemaLocation', 'http://www.forum-datenaustausch.ch/invoice generalInvoiceRequest_440.xsd'); + $node->setAttribute('modus', $this->_mode); + $node->setAttribute('language', $this->_lang); + return $node; + } + + protected function xmlInvoiceProcessing() + { + // TODO: CHECK! + // Only to pass XML validation. This DOES NOT represent a valid TARMED file. + $node = $this->doc->createElement('invoice:processing'); + $node->setAttribute('print_at_intermediate', 'false'); + $node->setAttribute('print_patient_copy', 'true'); + + $transport = $this->doc->createElement('invoice:transport'); + $transport->setAttribute('from', $this->_company['gln']); + $transport->setAttribute('to', '7601003000078'); # Example: SUVA + + $via = $this->doc->createElement('invoice:via'); + $via->setAttribute('via', '7601003000078'); # Example: SUVA + $via->setAttribute('sequence_id', '1'); + + $transport->appendChild($via); + + $node->appendChild($transport); + return $node; + } + + protected function xmlInvoicePayload() + { + $node = $this->doc->createElement('invoice:payload'); + $node->setAttribute('type', 'invoice'); + $node->setAttribute('copy', $this->_copy); + $node->setAttribute('storno', $this->_storno); + + $invoiceInvoice = $this->doc->createElement('invoice:invoice'); + $invoiceInvoice->setAttribute('request_timestamp', time()); + $invoiceInvoice->setAttribute('request_id', $this->invoice->invoice_number); + $invoiceInvoice->setAttribute('request_date', date("Y-m-d\TH:i:s", strtotime($this->invoice->invoice_date_modified))); + + $invoiceBody = $this->xmlInvoiceBody(); + + $node->appendChild($invoiceInvoice); + $node->appendChild($invoiceBody); + + return $node; + } + + protected function xmlInvoiceBody() + { + $node = $this->doc->createElement('invoice:body'); + $node->setAttribute('role', $this->_role); + $node->setAttribute('place', $this->_place); + + if ($this->_esrType == "9") { + $esr = $this->xmlInvoiceEsr9(); + } else { + // Red + $esr = $this->xmlInvoiceEsrRed(); + } + + $prolog = $this->xmlInvoiceProlog(); + $remark = $this->xmlInvoiceRemark(); + $balance = $this->xmlInvoiceBalance(); + $tiersGarant = $this->xmlInvoiceTiersGarant(); + //$tiersPayant = $this->xmlInvoiceTiersPayant(); + //$mvg = $this->xmlInvoiceMvg(); + $org = $this->xmlInvoiceOrg(); + $treatment = $this->xmlInvoiceTreatment(); + $services = $this->xmlServices(); + + $node->appendChild($prolog); + if ($this->_treatment['observations'] != "") { + $node->appendChild($remark); + } + $node->appendChild($balance); + $node->appendChild($esr); + $node->appendChild($tiersGarant); + //$node->appendChild($tiersPayant); + $node->appendChild($org); + $node->appendChild($treatment); + $node->appendChild($services); + + return $node; + } + + protected function xmlInvoiceEsr9() + { + $node = $this->doc->createElement('invoice:esr9'); + + $subNumb = $this->invoice->user_subscribernumber; + + $node->setAttribute('participant_number', $subNumb); // MUST begin with 01 + $node->setAttribute('type', '16or27'); // 16or27 = 01, 16or27plus = 04 + + // 26numbers + 1 chek + $referenceNumber = ""; + + // Custom style, we create the reference number as following: + // 5 digits for client id, 10 digits for invoice ID, 9 digits for Invoice Date, 1 for checksum + + $referenceNumber .= "06"; // Dog Fooding + $referenceNumber .= sprintf("%05d", $this->invoice->client_id); + $referenceNumber .= sprintf("%010d", $this->invoice->invoice_id); + $referenceNumber .= sprintf("%09d", date("Ymd", strtotime($this->invoice->invoice_date_modified))); + $refCsum = invoice_recMod10($referenceNumber); + $referenceNumber = $referenceNumber . $refCsum; + + if (!preg_match("/\d{27}/", $referenceNumber)) { + throw new Error("Invalid reference number!"); + } + + $slipType = "01"; // ISR in CHF + $amount = $this->invoice->invoice_total; + + $formattedRN = ""; + $formattedRN .= substr($referenceNumber, 0, 2); + $formattedRN .= " "; + $formattedRN .= substr($referenceNumber, 2, 5); + $formattedRN .= " "; + $formattedRN .= substr($referenceNumber, 7, 5); + $formattedRN .= " "; + $formattedRN .= substr($referenceNumber, 12, 5); + $formattedRN .= " "; + $formattedRN .= substr($referenceNumber, 17, 5); + $formattedRN .= " "; + $formattedRN .= substr($referenceNumber, 22, 5); + + $codingLine = invoice_genCodeline($slipType, $amount, $formattedRN, $subNumb); + + $node->setAttribute('reference_number', $formattedRN); + $node->setAttribute('coding_line', $codingLine); + + return $node; + } + + protected function xmlInvoiceEsrRed() + { + $node = $this->doc->createElement('invoice:esrRed'); + + $reason = $this->doc->createElement('invoice:payment_reason'); + $reason->nodeValue = $this->invoice->invoice_number; + + $subNumb = $this->invoice->user_subscribernumber; + // postal_account: coding_line2 + // bank_account: coding_line1 + coding_line2 + // Assume always postal: This should be have an option in the future + $node->setAttribute('payment_to', 'postal_account'); + $node->setAttribute('post_account', $subNumb); + + + // IBAN not required + //$node->setAttribute('iban', 'CH1111111111111111111'); + $node->setAttribute('reference_number', '1112111111'); + $node->setAttribute('coding_line1', '111111111111111111111111111+ 071234567>'); + $node->setAttribute('coding_line2', str_replace('-', '', $subNumb) . '>'); + + $node->appendChild($reason); + + return $node; + } + + protected function xmlInvoiceProlog() + { + $node = $this->doc->createElement('invoice:prolog'); + + $package = $this->doc->createElement('invoice:package'); + $package->setAttribute('version', '150'); + $package->setAttribute('name', 'InvoicePlane'); + + $generator = $this->doc->createElement('invoice:generator'); + $generator->setAttribute('name', 'PHP_Sumex'); + $generator->setAttribute('version', '100'); + + $node->appendChild($package); + $node->appendChild($generator); + + return $node; + } + + protected function xmlInvoiceRemark() + { + $node = $this->doc->createElement('invoice:remark'); + $node->nodeValue = $this->_treatment['observations']; + return $node; + } + + protected function xmlInvoiceBalance() + { + $node = $this->doc->createElement('invoice:balance'); + $node->setAttribute('currency', $this->_currency); + + // TODO: Integrate Invoice details + + $node->setAttribute('amount', 1.23); + $node->setAttribute('amount_due', 4.56); + $node->setAttribute('amount_obligations', 7.89); + + $vat = $this->doc->createElement('invoice:vat'); + $vat->setAttribute('vat', "0.00"); + + $vatRate = $this->doc->createElement('invoice:vat_rate'); + $vatRate->setAttribute('vat_rate', "0.00"); + $vatRate->setAttribute('amount', "9.99"); + $vatRate->setAttribute('vat', "0.00"); + + $vat->appendChild($vatRate); + $node->appendChild($vat); + + return $node; + } + + protected function xmlInvoiceTiersGarant() + { + $node = $this->doc->createElement('invoice:tiers_garant'); + $node->setAttribute('payment_period', $this->_paymentperiod); + + $biller = $this->doc->createElement('invoice:biller'); + $provider = $this->doc->createElement('invoice:provider'); + $patient = $this->doc->createElement('invoice:patient'); + $guarantor = $this->doc->createElement('guarantor'); + + // + // TODO: Check ean_party, zsr, specialty + $biller->setAttribute('ean_party', $this->_company['gln']); + $biller->setAttribute('zsr', $this->_company['rcc']); // Zahlstellenregister-Nummer (RCC) + //$biller->setAttribute('specialty', 'unknown'); + + $bcompany = $this->xmlCompany(); + $biller->appendChild($bcompany); + // + + // + // TODO: Check if **always** same as biller + // TODO: Check ean_party, zsr, speciality + $provider->setAttribute('ean_party', $this->_company['gln']); + $provider->setAttribute('zsr', $this->_company['rcc']); // Zahlstellenregister-Nummer (RCC) + //$provider->setAttribute('specialty', 'Allgemein'); + + $pcompany = $this->xmlCompany(); + $provider->appendChild($pcompany); + // + + // + $patient->setAttribute('gender', $this->_patient['gender']); + $patient->setAttribute('birthdate', date("Y-m-d\TH:i:s", strtotime($this->_patient['birthdate']))); + + $person = $this->generatePerson($this->_patient['givenName'], $this->_patient['familyName'], $this->_patient['street'], $this->_patient['zip'], $this->_patient['city'], $this->_patient['phone']); + $patient->appendChild($person); + // + + // + $guarantor->setAttribute('xmlns', 'http://www.forum-datenaustausch.ch/invoice'); + $person = $this->generatePerson($this->_patient['givenName'], $this->_patient['familyName'], $this->_patient['street'], $this->_patient['zip'], $this->_patient['city'], $this->_patient['phone']); + $guarantor->appendChild($person); + // + + $node->appendChild($biller); + $node->appendChild($provider); + $node->appendChild($patient); + $node->appendChild($guarantor); + + return $node; + } + + protected function xmlCompany() + { + // + $bcompany = $this->doc->createElement('invoice:company'); + $bcompany_name = $this->doc->createElement('invoice:companyname'); + $bcompany_name->nodeValue = $this->_company['name']; + + $bcompany->appendChild($bcompany_name); + + $bcompany_postal = $this->generatePostal($this->_company['street'], $this->_company['zip'], $this->_company['city']); + $bcompany->appendChild($bcompany_postal); + + $bcompany_telecom = $this->doc->createElement('invoice:telecom'); + $bcompany_telecom_phone = $this->doc->createElement('invoice:phone'); + $bcompany_telecom_phone->nodeValue = $this->_company['phone']; + + $bcompany_telecom->appendChild($bcompany_telecom_phone); + $bcompany->appendChild($bcompany_telecom); + // + + return $bcompany; + } + + protected function generatePostal($street, $zip, $city) + { + $postal = $this->doc->createElement('invoice:postal'); + + $postal_street = $this->doc->createElement('invoice:street'); + $postal_street->nodeValue = $street; + + $postal_zip = $this->doc->createELement('invoice:zip'); + $postal_zip->nodeValue = $zip; + + $postal_city = $this->doc->createElement('invoice:city'); + $postal_city->nodeValue = $city; + + $postal->appendChild($postal_street); + $postal->appendChild($postal_zip); + $postal->appendChild($postal_city); + + return $postal; + } + + protected function generatePerson($name, $surname, $street, $zip, $city, $phone) + { + $person = $this->doc->createElement('invoice:person'); + + $familyName = $this->doc->createElement('invoice:familyname'); + $familyName->nodeValue = $this->_patient['familyName']; + + $givenName = $this->doc->createElement('invoice:givenname'); + $givenName->nodeValue = $this->_patient['givenName']; + + $postal = $this->generatePostal($street, $zip, $city); + + if ($phone != null) { + $telecom = $this->generateTelecom($phone); + } else { + $telecom = null; + } + + + $person->appendChild($familyName); + $person->appendChild($givenName); + $person->appendChild($postal); + if ($telecom != null) { + $person->appendChild($telecom); + } + + return $person; + } + + protected function generateTelecom($phoneNr) + { + $telecom = $this->doc->createElement('invoice:telecom'); + $phone = $this->doc->createElement('invoice:phone'); + $phone->nodeValue = $phoneNr; + $telecom->appendChild($phone); + return $telecom; + } + + protected function xmlInvoiceOrg() + { + $node = $this->doc->createElement('invoice:org'); + $node->setAttribute('case_date', date("Y-m-d\TH:i:s", strtotime($this->_casedate))); + if ($this->_casenumber != "") { + $node->setAttribute('case_id', $this->_casenumber); + } + + if ($this->_insuredid != "") { + $node->setAttribute('insured_id', $this->_insuredid); + } + + return $node; + } + + protected function xmlInvoiceTreatment() + { + $node = $this->doc->createElement('invoice:treatment'); + $node->setAttribute('date_begin', date("Y-m-d\TH:i:s", strtotime($this->_treatment['start']))); + $node->setAttribute('date_end', date("Y-m-d\TH:i:s", strtotime($this->_treatment['end']))); + $node->setAttribute('canton', $this->_canton); + $node->setAttribute('reason', $this->_treatment['reason']); + + if ($this->_treatment['diagnosis'] != "") { + $diag = $this->doc->createElement('invoice:diagnosis'); + $diag->setAttribute('type', 'freetext'); + //$diag->setAttribute('code', ); + $diag->nodeValue = $this->_treatment['diagnosis']; + $node->appendChild($diag); + } + + return $node; + } + + protected function xmlServices() + { + $node = $this->doc->createElement('services'); + $node->setAttribute('xmlns', 'http://www.forum-datenaustausch.ch/invoice'); + + $recordId = 1; + foreach ($this->items as $item) { + $node->appendChild($this->generateRecord($recordId, $item)); + $recordId++; + } + + return $node; + } + + /** + * @param integer $recordId + */ + protected function generateRecord($recordId, $item) + { + $node = $this->doc->createElement('invoice:record_other'); + $node->setAttribute('record_id', $recordId); + $node->setAttribute('tariff_type', 590); + $node->setAttribute('code', (int)$item->product_sku); + $node->setAttribute('session', 1); + $node->setAttribute('quantity', $item->item_quantity); + $node->setAttribute('date_begin', date("Y-m-d\TH:i:s", strtotime($item->item_date))); + $node->setAttribute('provider_id', $this->_company['gln']); + $node->setAttribute('responsible_id', $this->_company['gln']); + $node->setAttribute('unit', $item->item_price); + #$node->setAttribute('unit_factor', 1); + $node->setAttribute('amount', $item->item_total); + #$node->setAttribute('validate', 0); + #$node->setAttribute('service_attributes', 0); + #$node->setAttribute('obligation', 0); + $node->setAttribute('name', $item->item_name); + + //var_dump($item); + return $node; + } + + protected function xmlInvoiceTiersPayant() + { + $node = $this->doc->createElement('invoice:tiers_payant'); + $node->setAttribute('payment_period', $this->_paymentperiod); + + $biller = $this->doc->createElement('invoice:biller'); + $provider = $this->doc->createElement('invoice:provider'); + $insurance = $this->doc->createElement('invoice:insurance'); + $patient = $this->doc->createElement('invoice:patient'); + $insured = $this->doc->createElement('invoice:insured'); + $guarantor = $this->doc->createElement('invoice:guarantor'); + + // + // TODO: Check ean_party, zsr, specialty + $biller->setAttribute('ean_party', $this->_company['gln']); + $biller->setAttribute('zsr', $this->_company['rcc']); // Zahlstellenregister-Nummer (RCC) + //$biller->setAttribute('specialty', 'unknown'); + + $bcompany = $this->xmlCompany(); + $biller->appendChild($bcompany); + // + + // + // TODO: Check if **always** same as biller + // TODO: Check ean_party, zsr, speciality + $provider->setAttribute('ean_party', $this->_company['gln']); + $provider->setAttribute('zsr', $this->_company['rcc']); // Zahlstellenregister-Nummer (RCC) + //$provider->setAttribute('specialty', 'Allgemein'); + + $pcompany = $this->xmlCompany(); + $provider->appendChild($pcompany); + // + + // + $insurance->setAttribute('ean_party', $this->_insurance['gln']); + $insuranceCompany = $this->xmlInsurance(); + $insurance->appendChild($insuranceCompany); + // + + // + $patient->setAttribute('gender', $this->_patient['gender']); + $patient->setAttribute('birthdate', date("Y-m-d\TH:i:s", strtotime($this->_patient['birthdate']))); + + $person = $this->generatePerson($this->_patient['givenName'], $this->_patient['familyName'], $this->_patient['street'], $this->_patient['zip'], $this->_patient['city'], $this->_patient['phone']); + $patient->appendChild($person); + // + + // + $insured->setAttribute('gender', $this->_patient['gender']); + $insured->setAttribute('birthdate', date("Y-m-d\TH:i:s", strtotime($this->_patient['birthdate']))); + + $person = $this->generatePerson($this->_patient['givenName'], $this->_patient['familyName'], $this->_patient['street'], $this->_patient['zip'], $this->_patient['city'], $this->_patient['phone']); + $insured->appendChild($person); + // + + // + $guarantor->setAttribute('xmlns', 'http://www.forum-datenaustausch.ch/invoice'); + $person = $this->generatePerson($this->_patient['givenName'], $this->_patient['familyName'], $this->_patient['street'], $this->_patient['zip'], $this->_patient['city'], $this->_patient['phone']); + $guarantor->appendChild($person); + // + + $node->appendChild($biller); + $node->appendChild($provider); + $node->appendChild($insurance); + $node->appendChild($patient); + //$node->appendChild($insured); + $node->appendChild($guarantor); + + return $node; + } + + protected function xmlInsurance() + { + // + $bcompany = $this->doc->createElement('invoice:company'); + $bcompany_name = $this->doc->createElement('invoice:companyname'); + $bcompany_name->nodeValue = $this->_insurance['name']; + + $bcompany->appendChild($bcompany_name); + + $bcompany_postal = $this->generatePostal($this->_insurance['street'], $this->_insurance['zip'], $this->_insurance['city']); + $bcompany->appendChild($bcompany_postal); + + /*$bcompany_telecom = $this->doc->createElement('invoice:telecom'); + $bcompany_telecom_phone = $this->doc->createElement('invoice:phone'); + $bcompany_telecom_phone->nodeValue = $this->_company['phone']; + $bcompany_telecom->appendChild($bcompany_telecom_phone); + $bcompany->appendChild($bcompany_telecom);*/ + + // + + return $bcompany; + } + + protected function xmlInvoiceMvg() + { + $node = $this->doc->createElement('invoice:mvg'); + $node->setAttribute('ssn', $this->_patient['avs']); + #$node->setAttribute('insured_id', '1234'); + $node->setAttribute('case_date', date("Y-m-d\TH:i:s", strtotime($this->_casedate))); + + return $node; + } +} diff --git a/application/libraries/ZugferdXml.php b/application/libraries/ZugferdXml.php new file mode 100644 index 0000000..a912806 --- /dev/null +++ b/application/libraries/ZugferdXml.php @@ -0,0 +1,343 @@ +invoice = $params['invoice']; + $this->items = $params['items']; + $this->currencyCode = $CI->mdl_settings->setting('currency_code'); + } + + public function xml() + { + $this->doc = new DOMDocument('1.0', 'UTF-8'); + $this->doc->formatOutput = true; + + $this->root = $this->xmlRoot(); + $this->root->appendChild($this->xmlSpecifiedExchangedDocumentContext()); + $this->root->appendChild($this->xmlHeaderExchangedDocument()); + $this->root->appendChild($this->xmlSpecifiedSupplyChainTradeTransaction()); + + $this->doc->appendChild($this->root); + return $this->doc->saveXML(); + } + + protected function xmlRoot() + { + $node = $this->doc->createElement('rsm:CrossIndustryDocument'); + $node->setAttribute('xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance'); + $node->setAttribute('xmlns:rsm', 'urn:ferd:CrossIndustryDocument:invoice:1p0'); + $node->setAttribute('xmlns:ram', 'urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:12'); + $node->setAttribute('xmlns:udt', 'urn:un:unece:uncefact:data:standard:UnqualifiedDataType:15'); + return $node; + } + + protected function xmlSpecifiedExchangedDocumentContext() + { + $node = $this->doc->createElement('rsm:SpecifiedExchangedDocumentContext'); + $guidelineNode = $this->doc->createElement('ram:GuidelineSpecifiedDocumentContextParameter'); + $guidelineNode->appendChild($this->doc->createElement('ram:ID', 'urn:ferd:CrossIndustryDocument:invoice:1p0:basic')); + $node->appendChild($guidelineNode); + return $node; + } + + protected function xmlHeaderExchangedDocument() + { + $node = $this->doc->createElement('rsm:HeaderExchangedDocument'); + + $node->appendChild($this->doc->createElement('ram:ID', $this->invoice->invoice_number)); + $node->appendChild($this->doc->createElement('ram:Name', trans('invoice'))); + $node->appendChild($this->doc->createElement('ram:TypeCode', 380)); + + // IssueDateTime + $dateNode = $this->doc->createElement('ram:IssueDateTime'); + $dateNode->appendChild($this->dateElement($this->invoice->invoice_date_created)); + $node->appendChild($dateNode); + + // IncludedNote + $noteNode = $this->doc->createElement('ram:IncludedNote'); + $noteNode->appendChild($this->doc->createElement('ram:Content', htmlsc($this->invoice->invoice_terms))); + $node->appendChild($noteNode); + + return $node; + } + + protected function dateElement($date) + { + $el = $this->doc->createElement('udt:DateTimeString', $this->zugferdFormattedDate($date)); + $el->setAttribute('format', 102); + return $el; + } + + /** + * @return string|null + */ + function zugferdFormattedDate($date) + { + if ($date && $date <> '0000-00-00') { + $date = DateTime::createFromFormat('Y-m-d', $date); + return $date->format('Ymd'); + } + return ''; + } + + protected function xmlSpecifiedSupplyChainTradeTransaction() + { + $node = $this->doc->createElement('rsm:SpecifiedSupplyChainTradeTransaction'); + $node->appendChild($this->xmlApplicableSupplyChainTradeAgreement()); + $node->appendChild($this->xmlApplicableSupplyChainTradeDelivery()); + $node->appendChild($this->xmlApplicableSupplyChainTradeSettlement()); + foreach ($this->items as $index => $item) { + $node->appendChild($this->xmlIncludedSupplyChainTradeLineItem($index + 1, $item)); + } + return $node; + } + + protected function xmlApplicableSupplyChainTradeAgreement() + { + $node = $this->doc->createElement('ram:ApplicableSupplyChainTradeAgreement'); + $node->appendChild($this->xmlSellerTradeParty()); + $node->appendChild($this->xmlBuyerTradeParty()); + return $node; + } + + protected function xmlSellerTradeParty($index = '', $item = '') + { + $node = $this->doc->createElement('ram:SellerTradeParty'); + $node->appendChild($this->doc->createElement('ram:Name', htmlsc($this->invoice->user_name))); + + // PostalTradeAddress + $addressNode = $this->doc->createElement('ram:PostalTradeAddress'); + $addressNode->appendChild($this->doc->createElement('ram:PostcodeCode', htmlsc($this->invoice->user_zip))); + $addressNode->appendChild($this->doc->createElement('ram:LineOne', htmlsc($this->invoice->user_address_1))); + $addressNode->appendChild($this->doc->createElement('ram:LineTwo', htmlsc($this->invoice->user_address_2))); + $addressNode->appendChild($this->doc->createElement('ram:CityName', htmlsc($this->invoice->user_city))); + $addressNode->appendChild($this->doc->createElement('ram:CountryID', htmlsc($this->invoice->user_country))); + + $node->appendChild($addressNode); + return $node; + } + + protected function xmlBuyerTradeParty($index = '', $item = '') + { + $node = $this->doc->createElement('ram:BuyerTradeParty'); + $node->appendChild($this->doc->createElement('ram:Name', $this->invoice->client_name)); + + // PostalTradeAddress + $addressNode = $this->doc->createElement('ram:PostalTradeAddress'); + $addressNode->appendChild($this->doc->createElement('ram:PostcodeCode', htmlsc($this->invoice->client_zip))); + $addressNode->appendChild($this->doc->createElement('ram:LineOne', htmlsc($this->invoice->client_address_1))); + $addressNode->appendChild($this->doc->createElement('ram:LineTwo', htmlsc($this->invoice->client_address_2))); + $addressNode->appendChild($this->doc->createElement('ram:CityName', htmlsc($this->invoice->client_city))); + $addressNode->appendChild($this->doc->createElement('ram:CountryID', htmlsc($this->invoice->client_country))); + $node->appendChild($addressNode); + + // SpecifiedTaxRegistration + $node->appendChild($this->xmlSpecifiedTaxRegistration('VA', $this->invoice->client_vat_id)); + $node->appendChild($this->xmlSpecifiedTaxRegistration('FC', htmlsc($this->invoice->client_tax_code))); + + return $node; + } + + /** + * @param string $schemeID + */ + protected function xmlSpecifiedTaxRegistration($schemeID, $content) + { + $node = $this->doc->createElement('ram:SpecifiedTaxRegistration'); + $el = $this->doc->createElement('ram:ID', $content); + $el->setAttribute('schemeID', $schemeID); + $node->appendChild($el); + return $node; + } + + protected function xmlApplicableSupplyChainTradeDelivery() + { + $node = $this->doc->createElement('ram:ApplicableSupplyChainTradeDelivery'); + + // ActualDeliverySupplyChainEvent + $eventNode = $this->doc->createElement('ram:ActualDeliverySupplyChainEvent'); + $dateNode = $this->doc->createElement('ram:OccurrenceDateTime'); + $dateNode->appendChild($this->dateElement($this->invoice->invoice_date_created)); + $eventNode->appendChild($dateNode); + + $node->appendChild($eventNode); + return $node; + } + + protected function xmlApplicableSupplyChainTradeSettlement() + { + $node = $this->doc->createElement('ram:ApplicableSupplyChainTradeSettlement'); + + $node->appendChild($this->doc->createElement('ram:PaymentReference', $this->invoice->invoice_number)); + $node->appendChild($this->doc->createElement('ram:InvoiceCurrencyCode', $this->currencyCode)); + + // taxes + foreach ($this->itemsSubtotalGroupedByTaxPercent() as $percent => $subtotal) { + $node->appendChild($this->xmlApplicableTradeTax($percent, $subtotal)); + } + + // sums + $node->appendChild($this->xmlSpecifiedTradeSettlementMonetarySummation()); + + return $node; + } + + function itemsSubtotalGroupedByTaxPercent() + { + $result = []; + foreach ($this->items as $item) { + if ($item->item_tax_rate_percent == 0) { + continue; + } + + if (!isset($result[$item->item_tax_rate_percent])) { + $result[$item->item_tax_rate_percent] = 0; + } + $result[$item->item_tax_rate_percent] += $item->item_subtotal; + } + return $result; + } + + protected function xmlApplicableTradeTax($percent, $subtotal) + { + $node = $this->doc->createElement('ram:ApplicableTradeTax'); + $node->appendChild($this->currencyElement('ram:CalculatedAmount', $subtotal * $percent / 100)); + $node->appendChild($this->doc->createElement('ram:TypeCode', 'VAT')); + $node->appendChild($this->currencyElement('ram:BasisAmount', $subtotal)); + $node->appendChild($this->doc->createElement('ram:CategoryCode', 'S')); + $node->appendChild($this->doc->createElement('ram:ApplicablePercent', $percent)); + return $node; + } + + /** + * @param string $name + */ + protected function currencyElement($name, $amount, $nb_decimals = 2) + { + $el = $this->doc->createElement($name, $this->zugferdFormattedFloat($amount, $nb_decimals)); + $el->setAttribute('currencyID', $this->currencyCode); + return $el; + } + + // =========================================================================== + // elements helpers + // =========================================================================== + + function zugferdFormattedFloat($amount, $nb_decimals = 2) + { + return number_format((float)$amount, $nb_decimals); + } + + protected function xmlSpecifiedTradeSettlementMonetarySummation() + { + $node = $this->doc->createElement('ram:SpecifiedTradeSettlementMonetarySummation'); + $node->appendChild($this->currencyElement('ram:LineTotalAmount', $this->invoice->invoice_item_subtotal)); + $node->appendChild($this->currencyElement('ram:ChargeTotalAmount', 0)); + $node->appendChild($this->currencyElement('ram:AllowanceTotalAmount', 0)); + $node->appendChild($this->currencyElement('ram:TaxBasisTotalAmount', $this->invoice->invoice_item_subtotal)); + $node->appendChild($this->currencyElement('ram:TaxTotalAmount', $this->invoice->invoice_item_tax_total)); + $node->appendChild($this->currencyElement('ram:GrandTotalAmount', $this->invoice->invoice_total)); + $node->appendChild($this->currencyElement('ram:TotalPrepaidAmount', $this->invoice->invoice_paid)); + $node->appendChild($this->currencyElement('ram:DuePayableAmount', $this->invoice->invoice_balance)); + return $node; + } + + protected function xmlIncludedSupplyChainTradeLineItem($lineNumber, $item) + { + $node = $this->doc->createElement('ram:IncludedSupplyChainTradeLineItem'); + + // AssociatedDocumentLineDocument + $lineNode = $this->doc->createElement('ram:AssociatedDocumentLineDocument'); + $lineNode->appendChild($this->doc->createElement('ram:LineID', $lineNumber)); + $node->appendChild($lineNode); + + // SpecifiedSupplyChainTradeAgreement + $node->appendChild($this->xmlSpecifiedSupplyChainTradeAgreement($item)); + + // SpecifiedSupplyChainTradeDelivery + $deliveyNode = $this->doc->createElement('ram:SpecifiedSupplyChainTradeDelivery'); + $deliveyNode->appendChild($this->quantityElement('ram:BilledQuantity', $item->item_quantity)); + $node->appendChild($deliveyNode); + + // SpecifiedSupplyChainTradeSettlement + $node->appendChild($this->xmlSpecifiedSupplyChainTradeSettlement($item)); + + // SpecifiedTradeProduct + $tradeNode = $this->doc->createElement('ram:SpecifiedTradeProduct'); + $tradeNode->appendChild($this->doc->createElement('ram:Name', htmlsc($item->item_name) . "\n" . htmlsc($item->item_description))); + $node->appendChild($tradeNode); + + return $node; + } + + // =========================================================================== + // helpers + // =========================================================================== + + protected function xmlSpecifiedSupplyChainTradeAgreement($item) + { + $node = $this->doc->createElement('ram:SpecifiedSupplyChainTradeAgreement'); + + // GrossPriceProductTradePrice + $grossPriceNode = $this->doc->createElement('ram:GrossPriceProductTradePrice'); + $grossPriceNode->appendChild($this->currencyElement('ram:ChargeAmount', $item->item_price, 4)); + $node->appendChild($grossPriceNode); + + // NetPriceProductTradePrice + $netPriceNode = $this->doc->createElement('ram:NetPriceProductTradePrice'); + $netPriceNode->appendChild($this->currencyElement('ram:ChargeAmount', $item->item_price, 4)); + $node->appendChild($netPriceNode); + + return $node; + } + + /** + * @param string $name + */ + protected function quantityElement($name, $quantity) + { + $el = $this->doc->createElement($name, $this->zugferdFormattedFloat($quantity, 4)); + $el->setAttribute('unitCode', 'C62'); + return $el; + } + + protected function xmlSpecifiedSupplyChainTradeSettlement($item) + { + $node = $this->doc->createElement('ram:SpecifiedSupplyChainTradeSettlement'); + + // ApplicableTradeTax + if ($item->item_tax_rate_percent > 0) { + $taxNode = $this->doc->createElement('ram:ApplicableTradeTax'); + $taxNode->appendChild($this->doc->createElement('ram:TypeCode', 'VAT')); + $taxNode->appendChild($this->doc->createElement('ram:ApplicablePercent', $item->item_tax_rate_percent)); + $node->appendChild($taxNode); + } + + // SpecifiedTradeSettlementMonetarySummation + $sumNode = $this->doc->createElement('ram:SpecifiedTradeSettlementMonetarySummation'); + $sumNode->appendChild($this->currencyElement('ram:LineTotalAmount', $item->item_subtotal)); + $node->appendChild($sumNode); + + return $node; + } +} diff --git a/application/libraries/index.html b/application/libraries/index.html new file mode 100644 index 0000000..04e928c --- /dev/null +++ b/application/libraries/index.html @@ -0,0 +1,10 @@ + + + 403 Forbidden + + + +

    Directory access is forbidden.

    + + + \ No newline at end of file diff --git a/application/logs/.gitignore b/application/logs/.gitignore new file mode 100644 index 0000000..6b6c592 --- /dev/null +++ b/application/logs/.gitignore @@ -0,0 +1,3 @@ +* +!index.html +!.gitignore diff --git a/application/logs/index.html b/application/logs/index.html new file mode 100644 index 0000000..43a0179 --- /dev/null +++ b/application/logs/index.html @@ -0,0 +1,10 @@ + + + 403 Forbidden + + + +

    Directory access is forbidden.

    + + + \ No newline at end of file diff --git a/application/models/index.html b/application/models/index.html new file mode 100644 index 0000000..43a0179 --- /dev/null +++ b/application/models/index.html @@ -0,0 +1,10 @@ + + + 403 Forbidden + + + +

    Directory access is forbidden.

    + + + \ No newline at end of file diff --git a/application/modules/clients/controllers/Ajax.php b/application/modules/clients/controllers/Ajax.php new file mode 100644 index 0000000..2d8e40e --- /dev/null +++ b/application/modules/clients/controllers/Ajax.php @@ -0,0 +1,91 @@ +load->model('clients/mdl_clients'); + + $response = array(); + + // Get the post input + $query = $this->input->get('query'); + + if (empty($query)) { + echo json_encode($response); + exit; + } + + // Search for clients + $escapedQuery = $this->db->escape_str($query); + $escapedQuery = str_replace("%", "", $escapedQuery); + $clients = $this->mdl_clients + ->where('client_active', 1) + ->having('client_name LIKE \'' . $escapedQuery . '%\'') + ->or_having('client_surname LIKE \'' . $escapedQuery . '%\'') + ->or_having('client_fullname LIKE \'' . $escapedQuery . '%\'') + ->order_by('client_name') + ->get() + ->result(); + + foreach ($clients as $client) { + $response[] = array( + 'id' => $client->client_id, + 'text' => htmlsc(format_client($client)), + ); + } + + // Return the results + echo json_encode($response); + } + + public function save_client_note() + { + $this->load->model('clients/mdl_client_notes'); + + if ($this->mdl_client_notes->run_validation()) { + $this->mdl_client_notes->save(); + + $response = array( + 'success' => 1, + 'new_token' => $this->security->get_csrf_hash(), + ); + } else { + $this->load->helper('json_error'); + $response = array( + 'success' => 0, + 'new_token' => $this->security->get_csrf_hash(), + 'validation_errors' => json_errors(), + ); + } + + echo json_encode($response); + } + + public function load_client_notes() + { + $this->load->model('clients/mdl_client_notes'); + $data = array( + 'client_notes' => $this->mdl_client_notes->where('client_id', $this->input->post('client_id'))->get()->result() + ); + + $this->layout->load_view('clients/partial_notes', $data); + } + +} diff --git a/application/modules/clients/controllers/Clients.php b/application/modules/clients/controllers/Clients.php new file mode 100644 index 0000000..bbbe6b1 --- /dev/null +++ b/application/modules/clients/controllers/Clients.php @@ -0,0 +1,242 @@ +load->model('mdl_clients'); + } + + public function index() + { + // Display active clients by default + redirect('clients/status/active'); + } + + /** + * @param string $status + * @param int $page + */ + public function status($status = 'active', $page = 0) + { + if (is_numeric(array_search($status, array('active', 'inactive')))) { + $function = 'is_' . $status; + $this->mdl_clients->$function(); + } + + $this->mdl_clients->with_total_balance()->paginate(site_url('clients/status/' . $status), $page); + $clients = $this->mdl_clients->result(); + + $this->layout->set( + array( + 'records' => $clients, + 'filter_display' => true, + 'filter_placeholder' => trans('filter_clients'), + 'filter_method' => 'filter_clients' + ) + ); + + $this->layout->buffer('content', 'clients/index'); + $this->layout->render(); + } + + /** + * @param null $id + */ + public function form($id = null) + { + if ($this->input->post('btn_cancel')) { + redirect('clients'); + } + + // Set validation rule based on is_update + if ($this->input->post('is_update') == 0 && $this->input->post('client_name') != '') { + $check = $this->db->get_where('ip_clients', array( + 'client_name' => $this->input->post('client_name'), + 'client_surname' => $this->input->post('client_surname') + ))->result(); + + if (!empty($check)) { + $this->session->set_flashdata('alert_error', trans('client_already_exists')); + redirect('clients/form'); + } + } + + if ($this->mdl_clients->run_validation()) { + $id = $this->mdl_clients->save($id); + + $this->load->model('custom_fields/mdl_client_custom'); + $result = $this->mdl_client_custom->save_custom($id, $this->input->post('custom')); + + if ($result !== true) { + $this->session->set_flashdata('alert_error', $result); + $this->session->set_flashdata('alert_success', null); + redirect('clients/form/' . $id); + return; + } else { + redirect('clients/view/' . $id); + } + } + + if ($id and !$this->input->post('btn_submit')) { + if (!$this->mdl_clients->prep_form($id)) { + show_404(); + } + + $this->load->model('custom_fields/mdl_client_custom'); + $this->mdl_clients->set_form_value('is_update', true); + + $client_custom = $this->mdl_client_custom->where('client_id', $id)->get(); + + if ($client_custom->num_rows()) { + $client_custom = $client_custom->row(); + + unset($client_custom->client_id, $client_custom->client_custom_id); + + foreach ($client_custom as $key => $val) { + $this->mdl_clients->set_form_value('custom[' . $key . ']', $val); + } + } + } elseif ($this->input->post('btn_submit')) { + if ($this->input->post('custom')) { + foreach ($this->input->post('custom') as $key => $val) { + $this->mdl_clients->set_form_value('custom[' . $key . ']', $val); + } + } + } + + $this->load->model('custom_fields/mdl_custom_fields'); + $this->load->model('custom_values/mdl_custom_values'); + $this->load->model('custom_fields/mdl_client_custom'); + + $custom_fields = $this->mdl_custom_fields->by_table('ip_client_custom')->get()->result(); + $custom_values = []; + foreach ($custom_fields as $custom_field) { + if (in_array($custom_field->custom_field_type, $this->mdl_custom_values->custom_value_fields())) { + $values = $this->mdl_custom_values->get_by_fid($custom_field->custom_field_id)->result(); + $custom_values[$custom_field->custom_field_id] = $values; + } + } + + $fields = $this->mdl_client_custom->get_by_clid($id); + + foreach ($custom_fields as $cfield) { + foreach ($fields as $fvalue) { + if ($fvalue->client_custom_fieldid == $cfield->custom_field_id) { + // TODO: Hackish, may need a better optimization + $this->mdl_clients->set_form_value( + 'custom[' . $cfield->custom_field_id . ']', + $fvalue->client_custom_fieldvalue + ); + break; + } + } + } + + $this->load->helper('country'); + $this->load->helper('custom_values'); + + $this->layout->set( + array( + 'custom_fields' => $custom_fields, + 'custom_values' => $custom_values, + 'countries' => get_country_list(trans('cldr')), + 'selected_country' => $this->mdl_clients->form_value('client_country') ?: get_setting('default_country'), + 'languages' => get_available_languages(), + ) + ); + + $this->layout->buffer('content', 'clients/form'); + $this->layout->render(); + } + + /** + * @param int $client_id + */ + public function view($client_id) + { + $this->load->model('clients/mdl_client_notes'); + $this->load->model('invoices/mdl_invoices'); + $this->load->model('quotes/mdl_quotes'); + $this->load->model('payments/mdl_payments'); + $this->load->model('custom_fields/mdl_custom_fields'); + $this->load->model('custom_fields/mdl_client_custom'); + + $client = $this->mdl_clients->with_total()->with_total_balance()->with_total_paid()->where('ip_clients.client_id', $client_id)->get()->row(); + $custom_fields = $this->mdl_client_custom->get_by_client($client_id)->result(); + + $this->mdl_client_custom->prep_form($client_id); + + if (!$client) { + show_404(); + } + + $this->layout->set( + array( + 'client' => $client, + 'client_notes' => $this->mdl_client_notes->where('client_id', $client_id)->get()->result(), + 'invoices' => $this->mdl_invoices->by_client($client_id)->limit(20)->get()->result(), + 'quotes' => $this->mdl_quotes->by_client($client_id)->limit(20)->get()->result(), + 'payments' => $this->mdl_payments->by_client($client_id)->limit(20)->get()->result(), + 'custom_fields' => $custom_fields, + 'quote_statuses' => $this->mdl_quotes->statuses(), + 'invoice_statuses' => $this->mdl_invoices->statuses() + ) + ); + + $this->layout->buffer( + array( + array( + 'invoice_table', + 'invoices/partial_invoice_table' + ), + array( + 'quote_table', + 'quotes/partial_quote_table' + ), + array( + 'payment_table', + 'payments/partial_payment_table' + ), + array( + 'partial_notes', + 'clients/partial_notes' + ), + array( + 'content', + 'clients/view' + ) + ) + ); + + $this->layout->render(); + } + + /** + * @param int $client_id + */ + public function delete($client_id) + { + $this->mdl_clients->delete($client_id); + redirect('clients'); + } + +} diff --git a/application/modules/clients/models/Mdl_client_notes.php b/application/modules/clients/models/Mdl_client_notes.php new file mode 100644 index 0000000..5041fba --- /dev/null +++ b/application/modules/clients/models/Mdl_client_notes.php @@ -0,0 +1,51 @@ +db->order_by('ip_client_notes.client_note_date DESC'); + } + + public function validation_rules() + { + return array( + 'client_id' => array( + 'field' => 'client_id', + 'label' => trans('client'), + 'rules' => 'required' + ), + 'client_note' => array( + 'field' => 'client_note', + 'label' => trans('note'), + 'rules' => 'required' + ) + ); + } + + public function db_array() + { + $db_array = parent::db_array(); + + $db_array['client_note_date'] = date('Y-m-d'); + + return $db_array; + } + +} diff --git a/application/modules/clients/models/Mdl_clients.php b/application/modules/clients/models/Mdl_clients.php new file mode 100644 index 0000000..0c83ba3 --- /dev/null +++ b/application/modules/clients/models/Mdl_clients.php @@ -0,0 +1,258 @@ +db->select( + 'SQL_CALC_FOUND_ROWS ' . $this->table . '.*, ' . + 'CONCAT(' . $this->table . '.client_name, " ", ' . $this->table . '.client_surname) as client_fullname' + , false); + } + + public function default_order_by() + { + $this->db->order_by('ip_clients.client_name'); + } + + public function validation_rules() + { + return array( + 'client_name' => array( + 'field' => 'client_name', + 'label' => trans('client_name'), + 'rules' => 'required' + ), + 'client_surname' => array( + 'field' => 'client_surname', + 'label' => trans('client_surname') + ), + 'client_active' => array( + 'field' => 'client_active' + ), + 'client_language' => array( + 'field' => 'client_language', + 'label' => trans('language'), + ), + 'client_address_1' => array( + 'field' => 'client_address_1' + ), + 'client_address_2' => array( + 'field' => 'client_address_2' + ), + 'client_city' => array( + 'field' => 'client_city' + ), + 'client_state' => array( + 'field' => 'client_state' + ), + 'client_zip' => array( + 'field' => 'client_zip' + ), + 'client_country' => array( + 'field' => 'client_country' + ), + 'client_phone' => array( + 'field' => 'client_phone' + ), + 'client_fax' => array( + 'field' => 'client_fax' + ), + 'client_mobile' => array( + 'field' => 'client_mobile' + ), + 'client_email' => array( + 'field' => 'client_email' + ), + 'client_web' => array( + 'field' => 'client_web' + ), + 'client_vat_id' => array( + 'field' => 'user_vat_id' + ), + 'client_tax_code' => array( + 'field' => 'user_tax_code' + ), + // SUMEX + 'client_birthdate' => array( + 'field' => 'client_birthdate', + 'rules' => 'callback_convert_date' + ), + 'client_gender' => array( + 'field' => 'client_gender' + ), + 'client_avs' => array( + 'field' => 'client_avs', + 'label' => trans('sumex_ssn'), + 'rules' => 'callback_fix_avs' + ), + 'client_insurednumber' => array( + 'field' => 'client_insurednumber', + 'label' => trans('sumex_insurednumber') + ), + 'client_veka' => array( + 'field' => 'client_veka', + 'label' => trans('sumex_veka') + ), + ); + } + + /** + * @param int $amount + * @return mixed + */ + function get_latest($amount = 10) + { + return $this->mdl_clients + ->where('client_active', 1) + ->order_by('client_id', 'DESC') + ->limit($amount) + ->get() + ->result(); + } + + /** + * @param $input + * @return string + */ + function fix_avs($input) + { + if ($input != "") { + if (preg_match('/(\d{3})\.(\d{4})\.(\d{4})\.(\d{2})/', $input, $matches)) { + return $matches[1] . $matches[2] . $matches[3] . $matches[4]; + } else if (preg_match('/^\d{13}$/', $input)) { + return $input; + } + } + + return ""; + } + + function convert_date($input) + { + $this->load->helper('date_helper'); + + if ($input == '') { + return ''; + } + + return date_to_mysql($input); + } + + public function db_array() + { + $db_array = parent::db_array(); + + if (!isset($db_array['client_active'])) { + $db_array['client_active'] = 0; + } + + return $db_array; + } + + /** + * @param int $id + */ + public function delete($id) + { + parent::delete($id); + + $this->load->helper('orphan'); + delete_orphans(); + } + + /** + * Returns client_id of existing client + * + * @param $client_name + * @return int|null + */ + public function client_lookup($client_name) + { + $client = $this->mdl_clients->where('client_name', $client_name)->get(); + + if ($client->num_rows()) { + $client_id = $client->row()->client_id; + } else { + $db_array = array( + 'client_name' => $client_name + ); + + $client_id = parent::save(null, $db_array); + } + + return $client_id; + } + + public function with_total() + { + $this->filter_select('IFnull((SELECT SUM(invoice_total) FROM ip_invoice_amounts WHERE invoice_id IN (SELECT invoice_id FROM ip_invoices WHERE ip_invoices.client_id = ip_clients.client_id)), 0) AS client_invoice_total', false); + return $this; + } + + public function with_total_paid() + { + $this->filter_select('IFnull((SELECT SUM(invoice_paid) FROM ip_invoice_amounts WHERE invoice_id IN (SELECT invoice_id FROM ip_invoices WHERE ip_invoices.client_id = ip_clients.client_id)), 0) AS client_invoice_paid', false); + return $this; + } + + public function with_total_balance() + { + $this->filter_select('IFnull((SELECT SUM(invoice_balance) FROM ip_invoice_amounts WHERE invoice_id IN (SELECT invoice_id FROM ip_invoices WHERE ip_invoices.client_id = ip_clients.client_id)), 0) AS client_invoice_balance', false); + return $this; + } + + public function is_inactive() + { + $this->filter_where('client_active', 0); + return $this; + } + + /** + * @param $user_id + * @return $this + */ + public function get_not_assigned_to_user($user_id) + { + $this->load->model('user_clients/mdl_user_clients'); + $clients = $this->mdl_user_clients->select('ip_user_clients.client_id') + ->assigned_to($user_id)->get()->result(); + + $assigned_clients = []; + foreach ($clients as $client) { + $assigned_clients[] = $client->client_id; + } + + if (count($assigned_clients) > 0) { + $this->where_not_in('ip_clients.client_id', $assigned_clients); + } + + $this->is_active(); + return $this->get()->result(); + } + + public function is_active() + { + $this->filter_where('client_active', 1); + return $this; + } + +} diff --git a/application/modules/clients/views/form.php b/application/modules/clients/views/form.php new file mode 100644 index 0000000..52ae68e --- /dev/null +++ b/application/modules/clients/views/form.php @@ -0,0 +1,410 @@ +controller->view_data['custom_values']; +?> + + + +
    + + + +
    +

    + layout->load_view('layout/header_buttons'); ?> +
    + +
    + + layout->load_view('layout/alerts'); ?> + + mdl_clients->form_value('is_update')) { + echo 'value="1"'; + } else { + echo 'value="0"'; + } ?> + > + +
    + + +
    + +
    + +
    + +
    + +
    + + custom_field_location != 0) { + continue; + } + //print_r($custom_field); + print_field($this->mdl_clients, $custom_field, $cv); + ?> + +
    + +
    +
    + + +
    + +
    +
    + + +
    + +
    +
    + +
    +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    +
    + +
    + +
    + +
    +
    +
    + +
    + +
    + +
    +
    + + +
    + +
    +
    + +
    + + +
    + +
    +
    + +
    + + +
    + +
    +
    + +
    + + +
    + +
    +
    + +
    + + +
    + +
    +
    + +
    + + +
    + +
    +
    + + + + custom_field_location != 1) { + continue; + } ?> + mdl_clients, $custom_field, $cv); ?> + +
    + +
    + +
    +
    + +
    + +
    + +
    + +
    + + + + + custom_field_location != 3) { + continue; + } ?> + mdl_clients, $custom_field, $cv); ?> + +
    + +
    + +
    + +
    + +
    +
    + +
    + +
    + +
    + +
    +
    + + +
    + +
    +
    + +
    + + +
    + +
    +
    + +
    + + +
    + +
    +
    + +
    + + +
    + +
    +
    + +
    + + +
    + +
    +
    + + + + custom_field_location != 2) { + continue; + } ?> + mdl_clients, $custom_field, $cv); ?> + +
    + +
    + +
    + +
    + +
    +
    + +
    + +
    +
    + + +
    + +
    +
    + +
    + + +
    + +
    +
    + + + + custom_field_location != 4) { + continue; + } ?> + mdl_clients, $custom_field, $cv); ?> + +
    + +
    + +
    +
    + +
    +
    diff --git a/application/modules/clients/views/index.php b/application/modules/clients/views/index.php new file mode 100644 index 0000000..575c282 --- /dev/null +++ b/application/modules/clients/views/index.php @@ -0,0 +1,73 @@ +
    + +

    + +
    + + + + +
    + +
    + uri->segment(3)), 'mdl_clients'); ?> +
    + +
    + +
    + +
    + + + +
    + + layout->load_view('layout/alerts'); ?> + +
    + layout->load_view('clients/partial_client_table'); ?> +
    + +
    diff --git a/application/modules/clients/views/partial_client_address.php b/application/modules/clients/views/partial_client_address.php new file mode 100644 index 0000000..a6bc8c0 --- /dev/null +++ b/application/modules/clients/views/partial_client_address.php @@ -0,0 +1,16 @@ +load->helper('country'); ?> + + + client_address_1 ? htmlsc($client->client_address_1) . '
    ' : ''); ?> +
    + + client_address_2 ? htmlsc($client->client_address_2) . '
    ' : ''); ?> +
    + + client_city ? htmlsc($client->client_city) . ' ' : ''); ?> + client_state ? htmlsc($client->client_state) . ' ' : ''); ?> + client_zip ? htmlsc($client->client_zip) : ''); ?> + + + client_country ? '
    ' . get_country_name(trans('cldr'), $client->client_country) : ''); ?> +
    diff --git a/application/modules/clients/views/partial_client_table.php b/application/modules/clients/views/partial_client_table.php new file mode 100644 index 0000000..4b0128a --- /dev/null +++ b/application/modules/clients/views/partial_client_table.php @@ -0,0 +1,62 @@ +
    + + + + + + + + + + + + + + + + + + + + + + + +
    client_active) ? trans('yes') : trans('no'); ?>client_id, htmlsc(format_client($client))); ?>client_email); ?>client_phone ? $client->client_phone : ($client->client_mobile ? $client->client_mobile : '')); ?>client_invoice_balance); ?> +
    + + + + +
    +
    +
    diff --git a/application/modules/clients/views/partial_notes.php b/application/modules/clients/views/partial_notes.php new file mode 100644 index 0000000..57564aa --- /dev/null +++ b/application/modules/clients/views/partial_notes.php @@ -0,0 +1,10 @@ + +
    +
    + client_note)); ?> +
    + +
    + diff --git a/application/modules/clients/views/script_select2_client_id.js b/application/modules/clients/views/script_select2_client_id.js new file mode 100644 index 0000000..f4c2f86 --- /dev/null +++ b/application/modules/clients/views/script_select2_client_id.js @@ -0,0 +1,26 @@ +$(".client-id-select").select2({ + placeholder: "", + ajax: { + url: "", + dataType: 'json', + delay: 250, + data: function (params) { + return { + query: params.term, + page: params.page, + _ip_csrf: Cookies.get('ip_csrf_cookie') + }; + }, + processResults: function (data) { + console.log(data); + return { + results: data + }; + }, + cache: true + }, + escapeMarkup: function (markup) { + return markup; + }, + minimumInputLength: 2 +}); diff --git a/application/modules/clients/views/view.php b/application/modules/clients/views/view.php new file mode 100644 index 0000000..5803afa --- /dev/null +++ b/application/modules/clients/views/view.php @@ -0,0 +1,367 @@ + + +custom_field_location, $locations)) { + $locations[$custom_field->custom_field_location] += 1; + } else { + $locations[$custom_field->custom_field_location] = 1; + } +} +?> + +
    +

    + + + +
    + + + +
    +
    + +
    + + layout->load_view('layout/alerts'); ?> + +
    +
    + +

    +

    + layout->load_view('clients/partial_client_address'); ?> +

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    + + + client_language); ?> +
    + + + client_invoice_total); ?> +
    + + + client_invoice_paid); ?> +
    + + + client_invoice_balance); ?> +
    + +
    +
    + +
    + +
    +
    + +
    +
    +
    + + client_email) : ?> + + + + + + client_phone) : ?> + + + + + + client_mobile) : ?> + + + + + + client_fax) : ?> + + + + + + client_web) : ?> + + + + + + + + custom_field_location != 2) { + continue; + } ?> + + custom_field_label; + $value = $this->mdl_client_custom->form_value('cf_' . $custom_field->custom_field_id); + ?> + + + + +
    client_email, 'email'); ?>
    client_phone); ?>
    client_mobile); ?>
    client_fax); ?>
    client_web, 'url', true); ?>
    +
    +
    + +
    +
    +
    + +
    +
    + + client_vat_id) : ?> + + + + + + client_tax_code) : ?> + + + + + + + + custom_field_location != 4) { + continue; + } ?> + + custom_field_label; + $value = $this->mdl_client_custom->form_value('cf_' . $custom_field->custom_field_id); + ?> + + + + +
    client_vat_id); ?>
    client_tax_code); ?>
    +
    + +
    +
    +
    + + client_surname != ""): //Client is not a company ?> +
    + +
    +
    + +
    +
    + +
    + +
    + + + + + + + + + + mdl_settings->setting('sumex') == '1'): ?> + + + + + + + + + + + + + + + + + + custom_field_location != 3) { + continue; + } ?> + + custom_field_label; + $value = $this->mdl_client_custom->form_value('cf_' . $custom_field->custom_field_id); + ?> + + + + +
    client_birthdate); ?>
    client_gender) ?>
    client_avs) ?>
    client_insurednumber) ?>
    client_veka) ?>
    +
    +
    + +
    +
    + + + +
    + +
    +
    +
    + +
    + +
    +
    + + + custom_field_location != 0) { + continue; + } ?> + + custom_field_label; + $value = $this->mdl_client_custom->form_value('cf_' . $custom_field->custom_field_id); + ?> + + + + +
    +
    + +
    +
    +
    + + +
    + +
    +
    + +
    +
    + +
    +
    +
    + +
    + +
    + + + + +
    +
    +
    + +
    +
    + +
    + +
    + +
    + +
    + +
    + +
    + +
    +
    + +
    diff --git a/application/modules/custom_fields/controllers/Custom_fields.php b/application/modules/custom_fields/controllers/Custom_fields.php new file mode 100644 index 0000000..a596904 --- /dev/null +++ b/application/modules/custom_fields/controllers/Custom_fields.php @@ -0,0 +1,85 @@ +load->model('mdl_custom_fields'); + } + + /** + * @param int $page + */ + public function index($page = 0) + { + $this->mdl_custom_fields->paginate(site_url('custom_fields/index'), $page); + $custom_fields = $this->mdl_custom_fields->result(); + + $this->load->model('custom_values/mdl_custom_values'); + $this->layout->set('custom_fields', $custom_fields); + $this->layout->set('custom_tables', $this->mdl_custom_fields->custom_tables()); + $this->layout->set('custom_value_fields', $this->mdl_custom_values->custom_value_fields()); + $this->layout->buffer('content', 'custom_fields/index'); + $this->layout->render(); + } + + /** + * @param null $id + */ + public function form($id = null) + { + if ($this->input->post('btn_cancel')) { + redirect('custom_fields'); + } + + if ($this->mdl_custom_fields->run_validation()) { + $this->mdl_custom_fields->save($id); + redirect('custom_fields'); + } + + if ($id and !$this->input->post('btn_submit')) { + if (!$this->mdl_custom_fields->prep_form($id)) { + show_404(); + } + } + + $this->load->model('mdl_client_custom'); + $this->load->model('mdl_invoice_custom'); + $this->load->model('mdl_payment_custom'); + $this->load->model('mdl_quote_custom'); + $this->load->model('mdl_user_custom'); + + $this->layout->set('custom_field_tables', $this->mdl_custom_fields->custom_tables()); + $this->layout->set('custom_field_types', $this->mdl_custom_fields->custom_types()); + $this->layout->buffer('content', 'custom_fields/form'); + $this->layout->render(); + } + + /** + * @param $id + */ + public function delete($id) + { + $this->mdl_custom_fields->delete($id); + redirect('custom_fields'); + } + +} diff --git a/application/modules/custom_fields/models/Mdl_client_custom.php b/application/modules/custom_fields/models/Mdl_client_custom.php new file mode 100644 index 0000000..d0ca100 --- /dev/null +++ b/application/modules/custom_fields/models/Mdl_client_custom.php @@ -0,0 +1,164 @@ +db->select('SQL_CALC_FOUND_ROWS ip_client_custom.*, ip_custom_fields.*', false); + } + + public function default_order_by() + { + $this->db->order_by('custom_field_table ASC, custom_field_order ASC, custom_field_label ASC'); + } + + public function default_join() + { + $this->db->join('ip_custom_fields', 'ip_client_custom.client_custom_fieldid = ip_custom_fields.custom_field_id', 'inner'); + } + + /** + * @param integer $client_id + * @param array $db_array + * @return bool|string + */ + public function save_custom($client_id, $db_array) + { + $result = $this->validate($db_array); + + if ($result === true) { + $form_data = isset($this->_formdata) ? $this->_formdata : null; + + if (is_null($form_data)) { + return true; + } + + $client_custom_id = null; + $db_array['client_id'] = $client_id; + + foreach ($form_data as $key => $value) { + $db_array = array( + 'client_id' => $client_id, + 'client_custom_fieldid' => $key, + 'client_custom_fieldvalue' => $value + ); + + $client_custom = $this->where('client_id', $client_id)->where('client_custom_fieldid', $key)->get(); + + if ($client_custom->num_rows()) { + $client_custom_id = $client_custom->row()->client_custom_id; + } + + parent::save($client_custom_id, $db_array); + } + + return true; + } + + return $result; + } + + /** + * @param null $id + * @return void + */ + public function prep_form($id = null) + { + if ($id) { + $values = $this->get_by_client($id)->result(); + $this->load->helper('custom_values_helper'); + $this->load->module('custom_fields/mdl_custom_fields'); + + if ($values != null) { + foreach ($values as $value) { + $type = $value->custom_field_type; + if ($type != null) { + $nicename = Mdl_Custom_Fields::get_nicename( + $type + ); + $formatted = call_user_func("format_" . $nicename, $value->client_custom_fieldvalue); + $this->set_form_value('cf_' . $value->custom_field_id, $formatted); + } + } + } + + parent::prep_form($id); + } + } + + /** + * @param integer $client_id + * @return $this + */ + public function get_by_client($client_id) + { + $this->where('client_id', $client_id); + return $this->get(); + } + + /** + * @param integer $client_id + * @return $this + */ + public function by_id($client_id) + { + $this->db->where('ip_client_custom.client_id', $client_id); + return $this; + } + + /** + * @param integer $client_id + * @return mixed + */ + public function get_by_clid($client_id) + { + $result = $this->where('ip_client_custom.client_id', $client_id)->get()->result(); + return $result; + } + + /** + * @return array + */ + public function db_array() + { + $db_array = parent::db_array(); + $this->load->module('custom_fields/mdl_custom_fields'); + $fields = $this->mdl_custom_fields->result(); + + foreach ($fields as $field) { + if ($field->custom_field_type == "DATE") { + $db_array[$field->custom_field_column] = date_to_mysql( + $db_array[$field->custom_field_column] + ); + } elseif ($field->custom_field_type == "MULTIPLE-CHOICE") { + $db_array[$field->custom_field_column] = implode(",", $db_array[$field->custom_field_column]); + } + } + + return $db_array; + } + +} diff --git a/application/modules/custom_fields/models/Mdl_custom_fields.php b/application/modules/custom_fields/models/Mdl_custom_fields.php new file mode 100644 index 0000000..b756532 --- /dev/null +++ b/application/modules/custom_fields/models/Mdl_custom_fields.php @@ -0,0 +1,298 @@ +load->module("custom_values/mdl_custom_values"); + return Mdl_Custom_Values::custom_types(); + } + + public function default_select() + { + $this->db->select('SQL_CALC_FOUND_ROWS ip_custom_fields.*', false); + } + + public function default_order_by() + { + $this->db->order_by('custom_field_table ASC, custom_field_order ASC, custom_field_label ASC'); + } + + /** + * @return array + */ + public function validation_rules() + { + return array( + 'custom_field_table' => array( + 'field' => 'custom_field_table', + 'label' => trans('table'), + 'rules' => 'required' + ), + 'custom_field_label' => array( + 'field' => 'custom_field_label', + 'label' => trans('label'), + 'rules' => 'required|max_length[50]' + ), + 'custom_field_type' => array( + 'field' => 'custom_field_type', + 'label' => trans('type'), + 'rules' => 'required' + ), + 'custom_field_order' => array( + 'field' => 'custom_field_order', + 'label' => trans('order'), + 'rules' => 'is_natural' + ), + 'custom_field_location' => array( + 'field' => 'custom_field_location', + 'label' => trans('position'), + 'rules' => 'is_natural' + ) + ); + } + + /** + * @param $table + * @return $this + */ + public function get_by_table($table) + { + $this->where('custom_field_table', $table); + return $this->get()->result(); + } + + /** + * @param null $id + * @param null $db_array + * @return null + */ + public function save($id = null, $db_array = null) + { + if ($id) { + // Get the original record before saving + $original_record = $this->get_by_id($id); + } + + // Create the record + $db_array = ($db_array) ? $db_array : $this->db_array(); + + // Save the record to ip_custom_fields + $id = parent::save($id, $db_array); + return $id; + } + + /** + * @param $column + * @return $this + */ + public function get_by_id($column) + { + $this->where('custom_field_id', $column); + return $this->get()->row(); + } + + /** + * @return array + */ + public function db_array() + { + // Get the default db array + $db_array = parent::db_array(); + + // Get the array of custom tables + $custom_tables = $this->custom_tables(); + + // Check if the user wants to add 'id' as custom field + if (strtolower($db_array['custom_field_label']) == 'id') { + // Replace 'id' with 'field_id' to avoid problems with the primary key + $custom_field_label = 'field_id'; + } else { + $custom_field_label = strtolower(str_replace(' ', '_', $db_array['custom_field_label'])); + } + + if (in_array($db_array['custom_field_type'], $this->custom_types())) { + $type = $db_array['custom_field_type']; + } else { + $type = $this->custom_types()[0]; + } + + // Create the name for the custom field column + $this->load->helper('diacritics'); + + $clean_name = preg_replace('/[^a-z0-9_\s]/', '', strtolower(diacritics_remove_diacritics($custom_field_label))); + + $db_array['custom_field_type'] = $type; + + // Return the db array + return $db_array; + } + + /** + * @return array + */ + public function custom_tables() + { + return array( + 'ip_client_custom' => 'client', + 'ip_invoice_custom' => 'invoice', + 'ip_payment_custom' => 'payment', + 'ip_quote_custom' => 'quote', + 'ip_user_custom' => 'user' + ); + } + + /** + * @param $id + */ + public function delete($id) + { + $custom_field = $this->get_by_id($id); + parent::delete($id); + } + + /** + * @param $table + * @return $this + */ + public function by_table($table) + { + $this->filter_where('custom_field_table', $table); + return $this; + } + + /** + * @param integer $field_id + * @param string $custom_field_model + * @param integer $model_id + * @return string + */ + public function get_value_for_field($field_id, $custom_field_model, $model_id) + { + $this->load->model('custom_fields/' . $custom_field_model); + + $cf_table = str_replace('mdl_', '', $custom_field_model); + $cf_model_name = str_replace('_custom', '', $cf_table); + + $value = $this->$custom_field_model + ->where($cf_table . '_fieldid', $field_id) + ->where($cf_model_name . '_id', $model_id) + ->get()->result(); + + $value_key = $cf_table . '_fieldvalue'; + + if (!isset($value[0]->$value_key)) { + return ''; + } + + return $value[0]->$value_key; + } + + /** + * @param string $custom_field_model + * @param integer $model_id + * @return array + */ + public function get_values_for_fields($custom_field_model, $model_id) + { + $this->load->model('custom_fields/' . $custom_field_model); + + $fields = $this->$custom_field_model->by_id($model_id)->get()->result(); + + if (empty($fields)) { + return array(); + } + + $this->load->model('custom_values/mdl_custom_values'); + + $values = array(); + $custom_field = str_replace('mdl_', '', $custom_field_model); + + foreach ($fields as $field) { + // Get the custom field value + $field_id_fieldid = $custom_field . '_fieldid'; + $field_id_fieldlabel = $custom_field . '_fieldvalue'; + $custom_value = $this->mdl_custom_values->get_by_id($field->$field_id_fieldid); + + if ($custom_value->num_rows() > 0) { + $custom_value = $custom_value->result()[0]; + $field->custom_value_label = $custom_value->custom_values_value; + } + + $values[$field->custom_field_label] = $field->$field_id_fieldlabel; + } + + return $values; + } + + /** + * @param string $table_name + * @param string $old_column_name + * @param string $new_column_name + */ + private function rename_column($table_name, $old_column_name, $new_column_name) + { + $this->load->dbforge(); + + $column = array( + $old_column_name => array( + 'name' => $new_column_name, + 'type' => 'VARCHAR', + 'constraint' => 50 + ) + ); + + $this->dbforge->modify_column($table_name, $column); + } + + /** + * @param string $table_name + * @param string $column_name + */ + private function add_column($table_name, $column_name) + { + $this->load->dbforge(); + + $column = array( + $column_name => array( + 'type' => 'VARCHAR', + 'constraint' => 256 + ) + ); + + $this->dbforge->add_column($table_name, $column); + } + +} diff --git a/application/modules/custom_fields/models/Mdl_invoice_custom.php b/application/modules/custom_fields/models/Mdl_invoice_custom.php new file mode 100644 index 0000000..99f8be6 --- /dev/null +++ b/application/modules/custom_fields/models/Mdl_invoice_custom.php @@ -0,0 +1,80 @@ +db->select('SQL_CALC_FOUND_ROWS ip_invoice_custom.*, ip_custom_fields.*', false); + } + + public function default_join() + { + $this->db->join('ip_custom_fields', 'ip_invoice_custom.invoice_custom_fieldid = ip_custom_fields.custom_field_id'); + } + + public function default_order_by() + { + $this->db->order_by('custom_field_table ASC, custom_field_order ASC, custom_field_label ASC'); + } + + public function save_custom($invoice_id, $db_array) + { + $result = $this->validate($db_array); + if ($result === true) { + $form_data = isset($this->_formdata) ? $this->_formdata : null; + + if (is_null($form_data)) { + return true; + } + + $invoice_custom_id = null; + + foreach ($form_data as $key => $value) { + $db_array = array( + 'invoice_id' => $invoice_id, + 'invoice_custom_fieldid' => $key, + 'invoice_custom_fieldvalue' => $value + ); + + $invoice_custom = $this->where('invoice_id', $invoice_id)->where('invoice_custom_fieldid', $key)->get(); + + if ($invoice_custom->num_rows()) { + $invoice_custom_id = $invoice_custom->row()->invoice_custom_id; + } + + parent::save($invoice_custom_id, $db_array); + } + + return true; + } + + return $result; + } + + public function by_id($invoice_id) + { + $this->db->where('ip_invoice_custom.invoice_id', $invoice_id); + return $this; + } + +} diff --git a/application/modules/custom_fields/models/Mdl_payment_custom.php b/application/modules/custom_fields/models/Mdl_payment_custom.php new file mode 100644 index 0000000..63dca45 --- /dev/null +++ b/application/modules/custom_fields/models/Mdl_payment_custom.php @@ -0,0 +1,95 @@ +db->select('SQL_CALC_FOUND_ROWS ip_payment_custom.*, ip_custom_fields.*', false); + } + + public function default_join() + { + $this->db->join('ip_custom_fields', 'ip_payment_custom.payment_custom_fieldid = ip_custom_fields.custom_field_id'); + } + + public function default_order_by() + { + $this->db->order_by('custom_field_table ASC, custom_field_order ASC, custom_field_label ASC'); + } + + /** + * @param $payment_id + * @param $db_array + * @return bool|string + */ + public function save_custom($payment_id, $db_array) + { + $result = $this->validate($db_array); + + if ($result === true) { + $form_data = isset($this->_formdata) ? $this->_formdata : null; + + if (is_null($form_data)) { + return true; + } + + $payment_custom_id = null; + + foreach ($form_data as $key => $value) { + $db_array = array( + 'payment_id' => $payment_id, + 'payment_custom_fieldid' => $key, + 'payment_custom_fieldvalue' => $value + ); + + $payment_custom = $this->where('payment_id', $payment_id)->where('payment_custom_fieldid', $key)->get(); + + if ($payment_custom->num_rows()) { + $payment_custom_id = $payment_custom->row()->payment_custom_id; + } + + parent::save($payment_custom_id, $db_array); + } + + return true; + } + + return $result; + } + + /** + * @param integer $payment_id + * @return $this + */ + public function by_id($payment_id) + { + $this->db->where('ip_payment_custom.payment_id', $payment_id); + return $this; + } + + public function get_by_payid($payment_id) + { + $result = $this->where('ip_payment_custom.payment_id', $payment_id)->get()->result(); + return $result; + } + +} diff --git a/application/modules/custom_fields/models/Mdl_quote_custom.php b/application/modules/custom_fields/models/Mdl_quote_custom.php new file mode 100644 index 0000000..b974df3 --- /dev/null +++ b/application/modules/custom_fields/models/Mdl_quote_custom.php @@ -0,0 +1,87 @@ +db->select('SQL_CALC_FOUND_ROWS ip_quote_custom.*, ip_custom_fields.*', false); + } + + public function default_join() + { + $this->db->join('ip_custom_fields', 'ip_quote_custom.quote_custom_fieldid = ip_custom_fields.custom_field_id'); + } + + public function default_order_by() + { + $this->db->order_by('custom_field_table ASC, custom_field_order ASC, custom_field_label ASC'); + } + + + /** + * @param $quote_id + * @param $db_array + * @return bool|string + */ + public function save_custom($quote_id, $db_array) + { + $result = $this->validate($db_array); + + if ($result === true) { + $form_data = isset($this->_formdata) ? $this->_formdata : null; + + if (is_null($form_data)) { + return true; + } + + $quote_custom_id = null; + + foreach ($form_data as $key => $value) { + $db_array = array( + 'quote_id' => $quote_id, + 'quote_custom_fieldid' => $key, + 'quote_custom_fieldvalue' => $value + ); + + $quote_custom = $this->where('quote_id', $quote_id)->where('quote_custom_fieldid', $key)->get(); + + if ($quote_custom->num_rows()) { + $quote_custom_id = $quote_custom->row()->quote_custom_id; + } + + parent::save($quote_custom_id, $db_array); + } + + return true; + } + + return $result; + } + + public function by_id($quote_id) + { + $this->db->where('ip_quote_custom.quote_id', $quote_id); + return $this; + } + +} diff --git a/application/modules/custom_fields/models/Mdl_user_custom.php b/application/modules/custom_fields/models/Mdl_user_custom.php new file mode 100644 index 0000000..bc84f3d --- /dev/null +++ b/application/modules/custom_fields/models/Mdl_user_custom.php @@ -0,0 +1,102 @@ +db->select('SQL_CALC_FOUND_ROWS ip_user_custom.*, ip_custom_fields.*', false); + } + + public function default_join() + { + $this->db->join('ip_custom_fields', 'ip_user_custom.user_custom_fieldid = ip_custom_fields.custom_field_id'); + } + + public function default_order_by() + { + $this->db->order_by('custom_field_table ASC, custom_field_order ASC, custom_field_label ASC'); + } + + /** + * @param $user_id + * @param $db_array + * @return bool|string + */ + public function save_custom($user_id, $db_array) + { + $result = $this->validate($db_array); + + if ($result === true) { + $form_data = isset($this->_formdata) ? $this->_formdata : null; + + if (is_null($form_data)) { + return true; + } + + $user_custom_id = null; + + foreach ($form_data as $key => $value) { + $db_array = array( + 'user_id' => $user_id, + 'user_custom_fieldid' => $key, + 'user_custom_fieldvalue' => $value + ); + + $user_custom = $this->where('user_id', $user_id)->where('user_custom_fieldid', $key)->get(); + + if ($user_custom->num_rows()) { + $user_custom_id = $user_custom->row()->user_custom_id; + } + + parent::save($user_custom_id, $db_array); + } + return true; + } + + return $result; + } + + /** + * @param integer $user_id + * @return $this + */ + public function by_id($user_id) + { + $this->db->where('ip_user_custom.user_id', $user_id); + return $this; + } + + /** + * @param integer $user_id + * @return mixed + */ + public function get_by_useid($user_id) + { + $result = $this->where('ip_user_custom.user_id', $user_id)->get()->result(); + return $result; + } + +} diff --git a/application/modules/custom_fields/views/form.php b/application/modules/custom_fields/views/form.php new file mode 100644 index 0000000..b786eab --- /dev/null +++ b/application/modules/custom_fields/views/form.php @@ -0,0 +1,112 @@ +
    + + + +
    +

    + layout->load_view('layout/header_buttons'); ?> +
    + +
    + +
    + + layout->load_view('layout/alerts'); ?> + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + + Mdl_client_custom::$positions, + 'invoice' => Mdl_invoice_custom::$positions, + 'payment' => Mdl_payment_custom::$positions, + 'quote' => Mdl_quote_custom::$positions, + 'user' => Mdl_user_custom::$positions, + ); + + foreach ($positions as $key => $val) { + foreach ($val as $key2 => $val2) { + $val[$key2] = trans($val2); + } + $positions[$key] = $val; + } + ?> + + mdl_custom_fields->form_value('custom_field_location'); ?> + +
    + +
    + +
    + +
    + + diff --git a/application/modules/custom_fields/views/index.php b/application/modules/custom_fields/views/index.php new file mode 100644 index 0000000..86c3811 --- /dev/null +++ b/application/modules/custom_fields/views/index.php @@ -0,0 +1,73 @@ +
    +

    + +
    + + + +
    + +
    + +
    + +
    + +
    + + layout->load_view('layout/alerts'); ?> + + + + + + + + + + + + + + + + custom_field_type)); ?> + + + + + + + + + + +
    custom_field_table]); ?>custom_field_label); ?>custom_field_order; ?> +
    + custom_field_type, $custom_value_fields)) { ?> + + + + + + + + +
    +
    + +
    diff --git a/application/modules/custom_values/controllers/Custom_values.php b/application/modules/custom_values/controllers/Custom_values.php new file mode 100644 index 0000000..ac1b8e3 --- /dev/null +++ b/application/modules/custom_values/controllers/Custom_values.php @@ -0,0 +1,126 @@ +load->model('mdl_custom_values'); + } + + /** + * @param int $page + */ + public function index($page = 0) + { + $this->mdl_custom_values->paginate(site_url('custom_values/index'), $page); + $custom_values = $this->mdl_custom_values->get_grouped()->result(); + + $this->layout->set('custom_values', $custom_values); + $this->layout->buffer('content', 'custom_values/index'); + $this->layout->render(); + } + + /** + * @param null $id + */ + public function field($id = null) + { + if ($this->input->post('btn_cancel')) { + redirect('custom_values'); + } + + $this->load->model('custom_fields/mdl_custom_fields'); + $field = $this->mdl_custom_fields->get_by_id($id); + $result = $this->mdl_custom_values->get_by_fid($id)->result(); + + $custom_field_types = $this->mdl_custom_fields->custom_types(); + + $this->layout->set('elements', $result); + $this->layout->set('field', $field); + $this->layout->set('id', $id); + $this->layout->set('custom_values_types', $custom_field_types); + $this->layout->buffer('content', 'custom_values/field'); + $this->layout->render(); + } + + /** + * @param null $id + */ + public function edit($id = null) + { + $this->layout->set('id', $id); + + $value = $this->mdl_custom_values->get_by_id($id)->row(); + $fid = $value->custom_field_id; + + if ($this->input->post('btn_cancel')) { + redirect('custom_values/field/' . $fid); + } + + if ($this->mdl_custom_values->run_validation()) { + $this->mdl_custom_values->save($id); + redirect('custom_values/field/' . $fid); + } + + $this->layout->set('fid', $fid); + $this->layout->set('value', $value); + $this->layout->buffer('content', 'custom_values/edit'); + $this->layout->render(); + } + + /** + * @param null $id + */ + public function create($id = null) + { + if (!$id) { + redirect('custom_values'); + } + + $fid = $id; + + if ($this->input->post('btn_cancel')) { + redirect('custom_values/field/' . $fid); + } + + if ($this->mdl_custom_values->run_validation()) { + $this->mdl_custom_values->save_custom($fid); + redirect('custom_values/field/' . $fid); + } + + $this->load->model('custom_fields/mdl_custom_fields'); + $field = $this->mdl_custom_fields->get_by_id($id); + $this->layout->set('id', $id); + $this->layout->set('field', $field); + $this->layout->buffer('content', 'custom_values/new'); + $this->layout->render(); + } + + /** + * @param $id + */ + public function delete($id) + { + $this->mdl_custom_values->delete($id); + redirect('custom_values'); + } + +} diff --git a/application/modules/custom_values/models/Mdl_custom_values.php b/application/modules/custom_values/models/Mdl_custom_values.php new file mode 100644 index 0000000..2a26a19 --- /dev/null +++ b/application/modules/custom_values/models/Mdl_custom_values.php @@ -0,0 +1,174 @@ +load->module('custom_fields'); + $field_custom = $this->mdl_custom_fields->get_by_id($fid); + + if (!$field_custom) { + return; + } + + $db_array = $this->db_array(); + $db_array['custom_values_field'] = $fid; + + parent::save(null, $db_array); + } + + /** + * @return array + */ + public function validation_rules() + { + return array( + 'custom_values_value' => array( + 'field' => 'custom_values_value', + 'label' => 'Value', + 'rules' => 'required' + ) + ); + } + + /** + * @return array + */ + public function custom_tables() + { + return array( + 'ip_client_custom' => 'client', + 'ip_invoice_custom' => 'invoice', + 'ip_payment_custom' => 'payment', + 'ip_quote_custom' => 'quote', + 'ip_user_custom' => 'user' + ); + } + + /** + * @param $id + * @return $this + */ + public function get_by_fid($id) + { + $this->where('custom_values_field', $id); + return $this->get(); + } + + /** + * @param $column + * @return $this + */ + public function get_by_column($id) + { + $this->where('custom_field_id', $id); + return $this->get(); + } + + /** + * @param $id + * @return mixed + */ + public function get_by_id($id) + { + return $this->where('custom_values_id', $id)->get(); + } + + /** + * @param $column + * @param $id + * @return bool + */ + public function column_has_value($fid, $id) + { + $this->where('custom_field_id', $fid); + $this->where('custom_values_id', $id); + $this->get(); + if ($this->num_rows()) { + return true; + } + return false; + } + + /** + * @return $this + */ + public function get_grouped() + { + $this->db->select('count(custom_field_label) as count'); + $this->db->group_by('ip_custom_fields.custom_field_id'); + return $this->get(); + } + + public function default_select() + { + $this->db->select('ip_custom_fields.*,ip_custom_values.*', false); + } + + public function default_join() + { + $this->db->join('ip_custom_fields', 'ip_custom_values.custom_values_field = ip_custom_fields.custom_field_id', 'inner'); + } + + public function default_order_by() + { + //$this->db->group_by('ip_custom_fields.custom_field_label'); + } + + public function default_group_by() + { + //$this->db->group_by('ip_custom_values.custom_values_field'); + } +} diff --git a/application/modules/custom_values/views/edit.php b/application/modules/custom_values/views/edit.php new file mode 100644 index 0000000..1a6c1d4 --- /dev/null +++ b/application/modules/custom_values/views/edit.php @@ -0,0 +1,32 @@ +
    + + + +
    +

    + layout->load_view('layout/header_buttons'); ?> +
    + +
    + +
    +
    + layout->load_view('layout/alerts'); ?> + +
    + + +
    + +
    + + +
    +
    +
    + +
    + +
    diff --git a/application/modules/custom_values/views/field.php b/application/modules/custom_values/views/field.php new file mode 100644 index 0000000..6a54f12 --- /dev/null +++ b/application/modules/custom_values/views/field.php @@ -0,0 +1,95 @@ +
    + + + +
    +

    + +
    + +
    +
    + +
    + + layout->load_view('layout/alerts'); ?> + +
    +
    + +
    + + +
    + +
    + + +
    + +
    + + + + + + + + + + + + + + + + + + + + +
    custom_values_id; ?>custom_values_value); ?> +
    + + + + +
    +
    +
    + +
    +
    + +
    + +
    diff --git a/application/modules/custom_values/views/index.php b/application/modules/custom_values/views/index.php new file mode 100644 index 0000000..72f6b82 --- /dev/null +++ b/application/modules/custom_values/views/index.php @@ -0,0 +1,65 @@ +
    +

    + +
    + + + +
    + +
    + +
    +
    + +
    + + layout->load_view('layout/alerts'); ?> + + + + + + + + + + + + + + + + custom_field_type)); ?> + + + + + + + + + + +
    custom_field_id; ?>custom_field_label); ?>count; ?> +
    + + + + +
    +
    + +
    diff --git a/application/modules/custom_values/views/new.php b/application/modules/custom_values/views/new.php new file mode 100644 index 0000000..1664cfc --- /dev/null +++ b/application/modules/custom_values/views/new.php @@ -0,0 +1,41 @@ +
    + + + +
    +

    + layout->load_view('layout/header_buttons'); ?> +
    + +
    + +
    +
    + + layout->load_view('layout/alerts'); ?> + + custom_field_type)); ?> + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    +
    + +
    + +
    diff --git a/application/modules/dashboard/controllers/Dashboard.php b/application/modules/dashboard/controllers/Dashboard.php new file mode 100644 index 0000000..33ea3e8 --- /dev/null +++ b/application/modules/dashboard/controllers/Dashboard.php @@ -0,0 +1,51 @@ +load->model('invoices/mdl_invoice_amounts'); + $this->load->model('quotes/mdl_quote_amounts'); + $this->load->model('invoices/mdl_invoices'); + $this->load->model('quotes/mdl_quotes'); + $this->load->model('projects/mdl_projects'); + $this->load->model('tasks/mdl_tasks'); + + $quote_overview_period = get_setting('quote_overview_period'); + $invoice_overview_period = get_setting('invoice_overview_period'); + + $this->layout->set( + array( + 'invoice_status_totals' => $this->mdl_invoice_amounts->get_status_totals($invoice_overview_period), + 'quote_status_totals' => $this->mdl_quote_amounts->get_status_totals($quote_overview_period), + 'invoice_status_period' => str_replace('-', '_', $invoice_overview_period), + 'quote_status_period' => str_replace('-', '_', $quote_overview_period), + 'invoices' => $this->mdl_invoices->limit(10)->get()->result(), + 'quotes' => $this->mdl_quotes->limit(10)->get()->result(), + 'invoice_statuses' => $this->mdl_invoices->statuses(), + 'quote_statuses' => $this->mdl_quotes->statuses(), + 'overdue_invoices' => $this->mdl_invoices->is_overdue()->get()->result(), + 'projects' => $this->mdl_projects->get_latest()->get()->result(), + 'tasks' => $this->mdl_tasks->get_latest()->get()->result(), + 'task_statuses' => $this->mdl_tasks->statuses(), + ) + ); + + $this->layout->buffer('content', 'dashboard/index'); + $this->layout->render(); + } + +} diff --git a/application/modules/dashboard/views/index.php b/application/modules/dashboard/views/index.php new file mode 100644 index 0000000..1cd54fd --- /dev/null +++ b/application/modules/dashboard/views/index.php @@ -0,0 +1,345 @@ +
    + layout->load_view('layout/alerts'); ?> + +
    +
    + +
    + +
    + +
    + + + +
    +
    +
    + +
    +
    + +
    + +
    + + +
    + + + + + + + + +
    + + + + + + + +
    +
    + +
    +
    + +
    + +
    + + +
    + + + + + + + + +
    + + + + + + + +
    +
    + + + +
    + +
    + invoice_balance; + } + ?> +
    + ' . trans('overdue_invoices'), 'class="text-danger"'); ?> + + + +
    + + +
    +
    + +
    +
    + +
    + +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + quote_status_id]['label']; ?> + + + quote_date_created); ?> + + quote_id, ($quote->quote_number ? $quote->quote_number : $quote->quote_id)); ?> + + client_id, htmlsc(format_client($quote))); ?> + + quote_total); ?> + + + + +
    + +
    +
    +
    + +
    +
    + +
    + +
    + +
    + +
    + + + + + + + + + + + + + + config->item('disable_read_only') == true) { + $invoice->is_read_only = 0; + } ?> + + + + + + + + + + + + + +
    + + invoice_status_id]['label']; + if ($invoice->invoice_sign == '-1') { ?> +   + is_read_only == 1) { ?> +   + + + + + invoice_date_due); ?> + + + invoice_id, ($invoice->invoice_number ? $invoice->invoice_number : $invoice->invoice_id)); ?> + + client_id, htmlsc(format_client($invoice))); ?> + + invoice_balance * $invoice->invoice_sign); ?> + + sumex_id != null): ?> + + + + + + + + +
    + +
    + +
    +
    + +
    +
    + + +
    +
    + +
    + +
    + +
    +
    + + + + + + + + + + + + + + + + + +
    + project_id, htmlsc($project->project_name)); ?> + + client_id, htmlsc(format_client($project))); ?> +
    +
    +
    + +
    +
    + +
    + +
    + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + +
    + task_status"]['class']; ?>"> + task_status"]['label']; ?> + + + task_id, htmlsc($task->task_name)) ?> + + + task_finish_date); ?> + + + project_id) ? anchor('projects/view/' . $task->project_id, htmlsc($task->project_name)) : ''; ?> +
    +
    + +
    + +
    +
    + + +
    diff --git a/application/modules/email_templates/controllers/Ajax.php b/application/modules/email_templates/controllers/Ajax.php new file mode 100644 index 0000000..a0104f5 --- /dev/null +++ b/application/modules/email_templates/controllers/Ajax.php @@ -0,0 +1,29 @@ +load->model('email_templates/mdl_email_templates'); + + $id = $this->input->post('email_template_id'); + + echo json_encode($this->mdl_email_templates->get_by_id($id)); + } + +} diff --git a/application/modules/email_templates/controllers/Email_templates.php b/application/modules/email_templates/controllers/Email_templates.php new file mode 100644 index 0000000..7c7169d --- /dev/null +++ b/application/modules/email_templates/controllers/Email_templates.php @@ -0,0 +1,94 @@ +load->model('mdl_email_templates'); + } + + /** + * @param int $page + */ + public function index($page = 0) + { + $this->mdl_email_templates->paginate(site_url('email_templates/index'), $page); + $email_templates = $this->mdl_email_templates->result(); + + $this->layout->set('email_templates', $email_templates); + $this->layout->buffer('content', 'email_templates/index'); + $this->layout->render(); + } + + /** + * @param null $id + */ + public function form($id = null) + { + if ($this->input->post('btn_cancel')) { + redirect('email_templates'); + } + + if ($this->input->post('is_update') == 0 && $this->input->post('email_template_title') != '') { + $check = $this->db->get_where('ip_email_templates', array('email_template_title' => $this->input->post('email_template_title')))->result(); + if (!empty($check)) { + $this->session->set_flashdata('alert_error', trans('email_template_already_exists')); + redirect('email_templates/form'); + } + } + + if ($this->mdl_email_templates->run_validation()) { + $this->mdl_email_templates->save($id); + redirect('email_templates'); + } + + if ($id and !$this->input->post('btn_submit')) { + if (!$this->mdl_email_templates->prep_form($id)) { + show_404(); + } + $this->mdl_email_templates->set_form_value('is_update', true); + } + + $this->load->model('custom_fields/mdl_custom_fields'); + $this->load->model('invoices/mdl_templates'); + + foreach (array_keys($this->mdl_custom_fields->custom_tables()) as $table) { + $custom_fields[$table] = $this->mdl_custom_fields->by_table($table)->get()->result(); + } + + $this->layout->set('custom_fields', $custom_fields); + $this->layout->set('invoice_templates', $this->mdl_templates->get_invoice_templates()); + $this->layout->set('quote_templates', $this->mdl_templates->get_quote_templates()); + $this->layout->set('selected_pdf_template', $this->mdl_email_templates->form_value('email_template_pdf_template')); + $this->layout->buffer('content', 'email_templates/form'); + $this->layout->render(); + } + + /** + * @param $id + */ + public function delete($id) + { + $this->mdl_email_templates->delete($id); + redirect('email_templates'); + } + +} diff --git a/application/modules/email_templates/models/Mdl_email_templates.php b/application/modules/email_templates/models/Mdl_email_templates.php new file mode 100644 index 0000000..8788727 --- /dev/null +++ b/application/modules/email_templates/models/Mdl_email_templates.php @@ -0,0 +1,77 @@ +db->select('SQL_CALC_FOUND_ROWS *', false); + } + + public function default_order_by() + { + $this->db->order_by('email_template_title'); + } + + /** + * @return array + */ + public function validation_rules() + { + return array( + 'email_template_title' => array( + 'field' => 'email_template_title', + 'label' => trans('title'), + 'rules' => 'required' + ), + 'email_template_type' => array( + 'field' => 'email_template_pdf_quote_template', + 'label' => trans('type') + ), + 'email_template_subject' => array( + 'field' => 'email_template_subject', + 'label' => trans('subject') + ), + 'email_template_from_name' => array( + 'field' => 'email_template_from_name', + 'label' => trans('from_name') + ), + 'email_template_from_email' => array( + 'field' => 'email_template_from_email', + 'label' => trans('from_email') + ), + 'email_template_cc' => array( + 'field' => 'email_template_cc', + 'label' => trans('cc') + ), + 'email_template_bcc' => array( + 'field' => 'email_template_bcc', + 'label' => trans('bcc') + ), + 'email_template_pdf_template' => array( + 'field' => 'email_template_pdf_template', + 'label' => trans('default_pdf_template') + ), + 'email_template_body' => array( + 'field' => 'email_template_body', + 'label' => trans('body') + ) + ); + } + +} diff --git a/application/modules/email_templates/views/form.php b/application/modules/email_templates/views/form.php new file mode 100644 index 0000000..8b648ff --- /dev/null +++ b/application/modules/email_templates/views/form.php @@ -0,0 +1,214 @@ +
    + + + +
    +

    + layout->load_view('layout/header_buttons'); ?> +
    + +
    + + layout->load_view('layout/alerts'); ?> + + mdl_email_templates->form_value('is_update')) { + echo 'value="1"'; + } else { + echo 'value="0"'; + } ?> + > + +
    +
    + +
    + + +
    + +
    + +
    + +
    +
    + +
    +
    + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    +
    + +
    + +
    +
    + + +
    + +
    + + + + + + + + + +
    +
    + H1 + H2 + H3 + H4 +
    +
    + + + + + <hr/> + + + CSS + +
    + + +
    + +
    +
    + + + + +
    +
    + +
    +
    + +
    + +
    +
    + + layout->load_view('email_templates/template-tags'); ?> + +
    +
    + +
    + +
    + + diff --git a/application/modules/email_templates/views/index.php b/application/modules/email_templates/views/index.php new file mode 100644 index 0000000..10987d7 --- /dev/null +++ b/application/modules/email_templates/views/index.php @@ -0,0 +1,59 @@ +
    +

    + +
    + + + +
    + +
    + +
    +
    + +
    + + layout->load_view('layout/alerts'); ?> + + + + + + + + + + + + + + + + + + + + + +
    email_template_title); ?>email_template_type); ?> +
    + + +
    +
    + +
    diff --git a/application/modules/email_templates/views/template-tags.php b/application/modules/email_templates/views/template-tags.php new file mode 100644 index 0000000..c203479 --- /dev/null +++ b/application/modules/email_templates/views/template-tags.php @@ -0,0 +1,208 @@ +
    +
    +
    + +

    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    +
    diff --git a/application/modules/families/controllers/Families.php b/application/modules/families/controllers/Families.php new file mode 100644 index 0000000..b0d0957 --- /dev/null +++ b/application/modules/families/controllers/Families.php @@ -0,0 +1,85 @@ +load->model('mdl_families'); + } + + /** + * @param int $page + */ + public function index($page = 0) + { + $this->mdl_families->paginate(site_url('families/index'), $page); + $families = $this->mdl_families->result(); + + $this->layout->set('families', $families); + $this->layout->buffer('content', 'families/index'); + $this->layout->render(); + } + + /** + * @param null $id + */ + public function form($id = null) + { + if ($this->input->post('btn_cancel')) { + redirect('families'); + } + + if ($this->input->post('is_update') == 0 && $this->input->post('family_name') != '') { + $check = $this->db->get_where('ip_families', array('family_name' => $this->input->post('family_name')))->result(); + + if (!empty($check)) { + $this->session->set_flashdata('alert_error', trans('family_already_exists')); + redirect('families/form'); + } + } + + if ($this->mdl_families->run_validation()) { + $this->mdl_families->save($id); + redirect('families'); + } + + if ($id and !$this->input->post('btn_submit')) { + if (!$this->mdl_families->prep_form($id)) { + show_404(); + } + + $this->mdl_families->set_form_value('is_update', true); + } + + $this->layout->buffer('content', 'families/form'); + $this->layout->render(); + } + + /** + * @param $id + */ + public function delete($id) + { + $this->mdl_families->delete($id); + redirect('families'); + } + +} diff --git a/application/modules/families/models/Mdl_families.php b/application/modules/families/models/Mdl_families.php new file mode 100644 index 0000000..6d1f604 --- /dev/null +++ b/application/modules/families/models/Mdl_families.php @@ -0,0 +1,45 @@ +db->select('SQL_CALC_FOUND_ROWS *', false); + } + + public function default_order_by() + { + $this->db->order_by('ip_families.family_name'); + } + + /** + * @return array + */ + public function validation_rules() + { + return array( + 'family_name' => array( + 'field' => 'family_name', + 'label' => trans('family_name'), + 'rules' => 'required' + ) + ); + } + +} diff --git a/application/modules/families/views/form.php b/application/modules/families/views/form.php new file mode 100644 index 0000000..c4e5eb8 --- /dev/null +++ b/application/modules/families/views/form.php @@ -0,0 +1,37 @@ +
    + + + +
    +

    + layout->load_view('layout/header_buttons'); ?> +
    + +
    + +
    +
    + + layout->load_view('layout/alerts'); ?> + + mdl_families->form_value('is_update')) { + echo 'value="1"'; + } else { + echo 'value="0"'; + } ?>> + +
    + + +
    + +
    +
    + +
    + +
    diff --git a/application/modules/families/views/index.php b/application/modules/families/views/index.php new file mode 100644 index 0000000..98d4d0d --- /dev/null +++ b/application/modules/families/views/index.php @@ -0,0 +1,61 @@ +
    +

    + +
    + + + +
    + +
    + +
    + +
    + +
    + + layout->load_view('layout/alerts'); ?> + +
    + + + + + + + + + + + + + + + + + + +
    family_name); ?> +
    + + + + +
    +
    +
    +
    diff --git a/application/modules/filter/controllers/Ajax.php b/application/modules/filter/controllers/Ajax.php new file mode 100644 index 0000000..5ca11d1 --- /dev/null +++ b/application/modules/filter/controllers/Ajax.php @@ -0,0 +1,106 @@ +load->model('invoices/mdl_invoices'); + + $query = $this->input->post('filter_query'); + $keywords = explode(' ', $query); + + foreach ($keywords as $keyword) { + if ($keyword) { + $keyword = strtolower($keyword); + $this->mdl_invoices->like("CONCAT_WS('^',LOWER(invoice_number),invoice_date_created,invoice_date_due,LOWER(client_name),invoice_total,invoice_balance)", $keyword); + } + } + + $data = array( + 'invoices' => $this->mdl_invoices->get()->result(), + 'invoice_statuses' => $this->mdl_invoices->statuses() + ); + + $this->layout->load_view('invoices/partial_invoice_table', $data); + } + + public function filter_quotes() + { + $this->load->model('quotes/mdl_quotes'); + + $query = $this->input->post('filter_query'); + $keywords = explode(' ', $query); + + foreach ($keywords as $keyword) { + if ($keyword) { + $keyword = strtolower($keyword); + $this->mdl_quotes->like("CONCAT_WS('^',LOWER(quote_number),quote_date_created,quote_date_expires,LOWER(client_name),quote_total)", $keyword); + } + } + + $data = array( + 'quotes' => $this->mdl_quotes->get()->result(), + 'quote_statuses' => $this->mdl_quotes->statuses() + ); + + $this->layout->load_view('quotes/partial_quote_table', $data); + } + + public function filter_clients() + { + $this->load->model('clients/mdl_clients'); + + $query = $this->input->post('filter_query'); + $keywords = explode(' ', $query); + + foreach ($keywords as $keyword) { + if ($keyword) { + $keyword = strtolower($keyword); + $this->mdl_clients->like("CONCAT_WS('^',LOWER(client_name),LOWER(client_surname),LOWER(client_email),client_phone,client_active)", $keyword); + } + } + + $data = array( + 'records' => $this->mdl_clients->with_total_balance()->get()->result() + ); + + $this->layout->load_view('clients/partial_client_table', $data); + } + + public function filter_payments() + { + $this->load->model('payments/mdl_payments'); + + $query = $this->input->post('filter_query'); + $keywords = explode(' ', $query); + + foreach ($keywords as $keyword) { + if ($keyword) { + $keyword = strtolower($keyword); + $this->mdl_payments->like("CONCAT_WS('^',payment_date,LOWER(invoice_number),LOWER(client_name),payment_amount,LOWER(payment_method_name),LOWER(payment_note))", $keyword); + } + } + + $data = array( + 'payments' => $this->mdl_payments->get()->result() + ); + + $this->layout->load_view('payments/partial_payment_table', $data); + } + +} diff --git a/application/modules/filter/views/jquery_filter.php b/application/modules/filter/views/jquery_filter.php new file mode 100644 index 0000000..a488277 --- /dev/null +++ b/application/modules/filter/views/jquery_filter.php @@ -0,0 +1,23 @@ + \ No newline at end of file diff --git a/application/modules/guest/controllers/Get.php b/application/modules/guest/controllers/Get.php new file mode 100644 index 0000000..8f6d78f --- /dev/null +++ b/application/modules/guest/controllers/Get.php @@ -0,0 +1,40 @@ +Forbidden'; + return; + } + + $filePath = realpath($filePath); + + if (!file_exists($filePath)) { + show_404(); + return; + } + + header("Content-Type: " . mime_content_type($filePath)); + echo file_get_contents($filePath); + } + +} diff --git a/application/modules/guest/controllers/Guest.php b/application/modules/guest/controllers/Guest.php new file mode 100644 index 0000000..aff2529 --- /dev/null +++ b/application/modules/guest/controllers/Guest.php @@ -0,0 +1,35 @@ +load->model('quotes/mdl_quotes'); + $this->load->model('invoices/mdl_invoices'); + + $this->layout->set( + array( + 'overdue_invoices' => $this->mdl_invoices->is_overdue()->where_in('ip_invoices.client_id', $this->user_clients)->get()->result(), + 'open_quotes' => $this->mdl_quotes->is_open()->where_in('ip_quotes.client_id', $this->user_clients)->get()->result(), + 'open_invoices' => $this->mdl_invoices->is_open()->where_in('ip_invoices.client_id', $this->user_clients)->get()->result() + ) + ); + + $this->layout->buffer('content', 'guest/index'); + $this->layout->render('layout_guest'); + } + +} diff --git a/application/modules/guest/controllers/Invoices.php b/application/modules/guest/controllers/Invoices.php new file mode 100644 index 0000000..47e5ac2 --- /dev/null +++ b/application/modules/guest/controllers/Invoices.php @@ -0,0 +1,143 @@ +load->model('invoices/mdl_invoices'); + } + + public function index() + { + // Display open invoices by default + redirect('guest/invoices/status/open'); + } + + /** + * @param string $status + * @param int $page + */ + public function status($status = 'open', $page = 0) + { + // Determine which group of invoices to load + switch ($status) { + case 'paid': + $this->mdl_invoices->is_paid()->where_in('ip_invoices.client_id', $this->user_clients); + break; + default: + $this->mdl_invoices->is_open()->where_in('ip_invoices.client_id', $this->user_clients); + break; + + } + + $this->mdl_invoices->paginate(site_url('guest/invoices/status/' . $status), $page); + $invoices = $this->mdl_invoices->result(); + + $this->layout->set( + array( + 'invoices' => $invoices, + 'status' => $status + ) + ); + + $this->layout->buffer('content', 'guest/invoices_index'); + $this->layout->render('layout_guest'); + } + + /** + * @param $invoice_id + */ + public function view($invoice_id) + { + $this->load->model('invoices/mdl_items'); + $this->load->model('invoices/mdl_invoice_tax_rates'); + + $invoice = $this->mdl_invoices->where('ip_invoices.invoice_id', $invoice_id)->where_in('ip_invoices.client_id', $this->user_clients)->get()->row(); + + if (!$invoice) { + show_404(); + } + + $this->mdl_invoices->mark_viewed($invoice->invoice_id); + + $this->layout->set( + array( + 'invoice' => $invoice, + 'items' => $this->mdl_items->where('invoice_id', $invoice_id)->get()->result(), + 'invoice_tax_rates' => $this->mdl_invoice_tax_rates->where('invoice_id', $invoice_id)->get()->result(), + 'invoice_id' => $invoice_id + ) + ); + + $this->layout->buffer( + array( + array('content', 'guest/invoices_view') + ) + ); + + $this->layout->render('layout_guest'); + } + + /** + * @param $invoice_id + * @param bool $stream + * @param null $invoice_template + */ + public function generate_pdf($invoice_id, $stream = true, $invoice_template = null) + { + $this->load->helper('pdf'); + + $invoice = $this->mdl_invoices->guest_visible()->where('ip_invoices.invoice_id', $invoice_id) + ->where_in('ip_invoices.client_id', $this->user_clients) + ->get()->row(); + + if (!$invoice) { + show_404(); + } + + $this->mdl_invoices->mark_viewed($invoice_id); + + generate_invoice_pdf($invoice_id, $stream, $invoice_template, true); + } + + /** + * @param $invoice_id + * @param bool $stream + * @param null $invoice_template + */ + public function generate_sumex_pdf($invoice_id, $stream = true, $invoice_template = null) + { + $this->load->helper('pdf'); + + $invoice = $this->mdl_invoices->guest_visible()->where('ip_invoices.invoice_id', $invoice_id) + ->where_in('ip_invoices.client_id', $this->user_clients) + ->get()->row(); + + if (!$invoice) { + show_404(); + } + + $this->mdl_invoices->mark_viewed($invoice_id); + + generate_invoice_sumex($invoice_id); + } + +} diff --git a/application/modules/guest/controllers/Payment_handler.php b/application/modules/guest/controllers/Payment_handler.php new file mode 100644 index 0000000..24ed4c0 --- /dev/null +++ b/application/modules/guest/controllers/Payment_handler.php @@ -0,0 +1,281 @@ +load->library('crypt'); + + $this->load->model('invoices/mdl_invoices'); + } + + /** + * Process the payment for the given invoice + */ + public function make_payment() + { + // Attempt to get the invoice + $invoice = $this->mdl_invoices->where('invoice_url_key', $this->input->post('invoice_url_key'))->get(); + + if ($invoice->num_rows() == 1) { + + // Get the invoice data + $invoice = $invoice->row(); + + // Initialize the gateway + $driver = $this->input->post('gateway'); + $d = strtolower($driver); + $gateway = $this->initialize_gateway($driver); + + // Get the credit card data + $cc_number = $this->input->post('creditcard_number'); + $cc_expire_month = $this->input->post('creditcard_expiry_month'); + $cc_expire_year = $this->input->post('creditcard_expiry_year'); + $cc_cvv = $this->input->post('creditcard_cvv'); + + if ($cc_number) { + try { + $credit_card = new \Omnipay\Common\CreditCard(array( + 'number' => $cc_number, + 'expiryMonth' => $cc_expire_month, + 'expiryYear' => $cc_expire_year, + 'cvv' => $cc_cvv + )); + $credit_card->validate(); + } catch (\Exception $e) { + // Redirect the user and display failure message + $this->session->set_flashdata('alert_error', trans('online_payment_card_invalid') . '
    ' . $e->getMessage()); + redirect('guest/payment_information/form/' . $invoice->invoice_url_key); + } + } else { + $credit_card = array(); + } + + // Set up the api data + $driver_currency = $this->mdl_settings->setting('gateway_' . $d . '_currency'); + + $request = array( + 'amount' => $invoice->invoice_balance, + 'currency' => $driver_currency, + 'card' => $credit_card, + 'description' => sprintf(trans('payment_description'), $invoice->invoice_number), + 'metadata' => array( + 'invoice_number' => $invoice->invoice_number, + 'invoice_guest_url' => $invoice->invoice_url_key + ), + 'returnUrl' => site_url('guest/payment_handler/payment_return/' . $invoice->invoice_url_key . '/' . $driver), + 'cancelUrl' => site_url('guest/payment_handler/payment_cancel/' . $invoice->invoice_url_key . '/' . $driver), + ); + + $this->session->set_userdata($invoice->invoice_url_key . '_online_payment', $request); + + // Send the request + $response = $gateway->purchase($request)->send(); + + // Process the response + if ($response->isSuccessful()) { + + $payment_note = trans('transaction_reference') . ': ' . $response->getTransactionReference() . "\n"; + $payment_note .= trans('payment_provider') . ': ' . ucwords(str_replace('_', ' ', $d)); + + // Set invoice to paid + $this->load->model('payments/mdl_payments'); + + $db_array = array( + 'invoice_id' => $invoice->invoice_id, + 'payment_date' => date('Y-m-d'), + 'payment_amount' => $invoice->invoice_balance, + 'payment_method_id' => $invoice->payment_method, + 'payment_note' => $payment_note, + ); + + $this->mdl_payments->save(null, $db_array); + + // Save gateway response + $db_array = array( + 'invoice_id' => $invoice->invoice_id, + 'merchant_response_date' => date('Y-m-d'), + 'merchant_response_driver' => $driver, + ); + + $this->db->insert('ip_merchant_responses', $db_array); + + // Redirect user and display the success message + $this->session->set_flashdata('alert_success', sprintf(trans('online_payment_payment_successful'), $invoice->invoice_number)); + $this->session->keep_flashdata('alert_success'); + + redirect('guest/view/invoice/' . $invoice->invoice_url_key); + + } elseif ($response->isRedirect()) { + + // Redirect to offsite payment gateway + $response->redirect(); + + } else { + // Payment failed + // Save the response in the database + $db_array = array( + 'invoice_id' => $invoice->invoice_id, + 'merchant_response_date' => date('Y-m-d'), + 'merchant_response_driver' => $driver, + 'merchant_response' => $response->getMessage(), + ); + + $this->db->insert('ip_merchant_responses', $db_array); + + // Redirect the user and display failure message + $this->session->set_flashdata('alert_error', trans('online_payment_payment_failed') . '
    ' . $response->getMessage()); + $this->session->keep_flashdata('alert_error'); + + redirect('guest/payment_information/form/' . $invoice->invoice_url_key); + } + } + } + + private function initialize_gateway($driver) + { + $d = strtolower($driver); + $settings = get_gateway_settings($driver); + + // Get the payment gateway fields + $this->config->load('payment_gateways'); + $gateway_settings = $this->config->item('payment_gateways'); + $gateway_settings = $gateway_settings[$driver]; + + $gateway_init = array(); + foreach ($settings as $setting) { + // Sanitize the field key + $key = str_replace('gateway_' . $d . '_', '', $setting->setting_key); + $key = str_replace('gateway_' . $d, '', $key); + + // skip empty key + if (!$key) { + continue; + } + + // Decode password fields and checkboxes + if (isset($gateway_settings[$key]) && $gateway_settings[$key]['type'] == 'password') { + $value = $this->crypt->decode($setting->setting_value); + } elseif (isset($gateway_settings[$key]) && $gateway_settings[$key]['type'] == 'checkbox') { + $value = $setting->setting_value == 'on' ? true : false; + } else { + $value = $setting->setting_value; + } + + $gateway_init[$key] = $value; + } + + // Load Omnipay and initialize the gateway + $gateway = \Omnipay\Omnipay::create($driver); + $gateway->initialize($gateway_init); + + return $gateway; + } + + public function payment_return($invoice_url_key, $driver) + { + $d = strtolower($driver); + + // See if the response can be validated + if ($this->payment_validate($invoice_url_key, $driver)) { + + // Save the payment for the invoice + $this->load->model('payments/mdl_payments'); + + $invoice = $this->mdl_invoices->where('invoice_url_key', $invoice_url_key)->get()->row(); + + $db_array = array( + 'invoice_id' => $invoice->invoice_id, + 'payment_date' => date('Y-m-d'), + 'payment_amount' => $invoice->invoice_balance, + 'payment_method_id' => (get_setting('gateway_' . $d . '_payment_method')) ? get_setting('gateway_' . $d . '_payment_method') : 0 + ); + + $this->mdl_payments->save(null, $db_array); + + // Set the success flash message + $this->session->set_flashdata('alert_success', sprintf(trans('online_payment_payment_successful'), $invoice->invoice_number)); + + } else { + // Set the failure flash message + $this->session->set_flashdata('alert_error', trans('online_payment_payment_failed')); + } + + // Redirect to guest invoice view with flash message + redirect('guest/view/invoice/' . $invoice_url_key); + } + + private function payment_validate($invoice_url_key, $driver, $canceled = false) + { + // Attempt to get the invoice + $invoice = $this->mdl_invoices->where('invoice_url_key', $invoice_url_key)->get(); + + if ($invoice->num_rows() == 1) { + $invoice = $invoice->row(); + + if (!$canceled) { + $gateway = $this->initialize_gateway($driver); + + // Load previous settings + $params = $this->session->userdata($invoice->invoice_url_key . '_online_payment'); + + if (isset($_GET['PayerID'])) { + $params['transactionReference'] = $_GET['PayerID']; + } + + $response = $gateway->completePurchase($params)->send(); + + $message = $response->getMessage() ? $response->getMessage() : 'No details provided'; + } else { + $response = ''; + $message = 'Customer cancelled the purchase process'; + } + + // Create the record for ip_merchant_responses + $db_array = array( + 'invoice_id' => $invoice->invoice_id, + 'merchant_response_date' => date('Y-m-d'), + 'merchant_response_driver' => $driver, + 'merchant_response' => $message, + 'merchant_response_reference' => $canceled ? '' : $response->getTransactionReference(), + ); + + $this->db->insert('ip_merchant_responses', $db_array); + + return true; + } + + return false; + } + + public function payment_cancel($invoice_url_key, $driver) + { + // Validate the response + $this->payment_validate($invoice_url_key, $driver, true); + + // Set the cancel flash message + $this->session->set_flashdata('alert_info', trans('online_payment_payment_cancelled')); + + // Redirect to guest invoice view with flash message + redirect('guest/view/invoice/' . $invoice_url_key); + } + +} diff --git a/application/modules/guest/controllers/Payment_information.php b/application/modules/guest/controllers/Payment_information.php new file mode 100644 index 0000000..8c4dc6c --- /dev/null +++ b/application/modules/guest/controllers/Payment_information.php @@ -0,0 +1,89 @@ +load->model('invoices/mdl_invoices'); + } + + public function form($invoice_url_key) + { + $this->load->model('payment_methods/mdl_payment_methods'); + $disable_form = false; + + // Check if the invoice exists and is billable + $invoice = $this->mdl_invoices->where('ip_invoices.invoice_url_key', $invoice_url_key) + ->get()->row(); + + if (!$invoice) { + show_404(); + } + + // Check if the invoice is payable + if ($invoice->invoice_balance == 0) { + $this->session->set_userdata('alert_error', lang('invoice_already_paid')); + $disable_form = true; + } + + // Get all payment gateways + $this->load->model('mdl_settings'); + $this->config->load('payment_gateways'); + $gateways = $this->config->item('payment_gateways'); + + $available_drivers = array(); + foreach ($gateways as $driver => $fields) { + + $d = strtolower($driver); + + if (get_setting('gateway_' . $d . '_enabled') == 1) { + $invoice_payment_method = $invoice->payment_method; + $driver_payment_method = get_setting('gateway_' . $d . '_payment_method'); + + if ($invoice_payment_method == 0 || $driver_payment_method == 0 || $driver_payment_method == $invoice_payment_method) { + array_push($available_drivers, $driver); + } + } + } + + // Get additional invoice information + $payment_method = $this->mdl_payment_methods->where('payment_method_id', $invoice->payment_method)->get()->row(); + if ($invoice->payment_method == 0) { + $payment_method = null; + } + + $is_overdue = ($invoice->invoice_balance > 0 && strtotime($invoice->invoice_date_due) < time() ? true : false); + + // Return the view + $view_data = array( + 'disable_form' => $disable_form, + 'invoice' => $invoice, + 'gateways' => $available_drivers, + 'payment_method' => $payment_method, + 'is_overdue' => $is_overdue, + ); + + $this->load->view('guest/payment_information', $view_data); + + } + +} diff --git a/application/modules/guest/controllers/Payments.php b/application/modules/guest/controllers/Payments.php new file mode 100644 index 0000000..c7534a8 --- /dev/null +++ b/application/modules/guest/controllers/Payments.php @@ -0,0 +1,50 @@ +load->model('payments/mdl_payments'); + } + + /** + * @param int $page + */ + public function index($page = 0) + { + $this->mdl_payments->where('(ip_payments.invoice_id IN (SELECT invoice_id FROM ip_invoices WHERE client_id IN (' . implode(',', $this->user_clients) . ')))'); + $this->mdl_payments->paginate(site_url('guest/payments/index'), $page); + $payments = $this->mdl_payments->result(); + + $this->layout->set( + array( + 'payments' => $payments, + 'filter_display' => true, + 'filter_placeholder' => trans('filter_payments'), + 'filter_method' => 'filter_payments' + ) + ); + + $this->layout->buffer('content', 'guest/payments_index'); + $this->layout->render('layout_guest'); + } + +} diff --git a/application/modules/guest/controllers/Quotes.php b/application/modules/guest/controllers/Quotes.php new file mode 100644 index 0000000..86219e4 --- /dev/null +++ b/application/modules/guest/controllers/Quotes.php @@ -0,0 +1,160 @@ +load->model('quotes/mdl_quotes'); + } + + public function index() + { + // Display open quotes by default + redirect('guest/quotes/status/open'); + } + + /** + * @param string $status + * @param int $page + */ + public function status($status = 'open', $page = 0) + { + redirect_to_set(); + + // Determine which group of quotes to load + switch ($status) { + case 'approved': + $this->mdl_quotes + ->is_approved() + ->where_in('ip_quotes.client_id', $this->user_clients); + break; + case 'rejected': + $this->mdl_quotes + ->is_rejected() + ->where_in('ip_quotes.client_id', $this->user_clients); + $this->layout->set('show_invoice_column', true); + break; + default: + $this->mdl_quotes + ->is_open() + ->where_in('ip_quotes.client_id', $this->user_clients); + break; + } + + $this->mdl_quotes->paginate(site_url('guest/quotes/status/' . $status), $page); + $quotes = $this->mdl_quotes->result(); + + $this->layout->set('quotes', $quotes); + $this->layout->set('status', $status); + $this->layout->buffer('content', 'guest/quotes_index'); + $this->layout->render('layout_guest'); + } + + /** + * @param $quote_id + */ + public function view($quote_id) + { + redirect_to_set(); + + $this->load->model('quotes/mdl_quote_items'); + $this->load->model('quotes/mdl_quote_tax_rates'); + + $quote = $this->mdl_quotes->guest_visible() + ->where('ip_quotes.quote_id', $quote_id) + ->where_in('ip_quotes.client_id', $this->user_clients) + ->get()->row(); + + if (!$quote) { + show_404(); + } + + $this->mdl_quotes->mark_viewed($quote->quote_id); + + $this->layout->set( + array( + 'quote' => $quote, + 'items' => $this->mdl_quote_items + ->where('quote_id', $quote_id) + ->get()->result(), + 'quote_tax_rates' => $this->mdl_quote_tax_rates + ->where('quote_id', $quote_id) + ->get()->result(), + 'quote_id' => $quote_id + ) + ); + + $this->layout->buffer('content', 'guest/quotes_view'); + $this->layout->render('layout_guest'); + } + + /** + * @param $quote_id + * @param bool $stream + * @param null $quote_template + */ + public function generate_pdf($quote_id, $stream = true, $quote_template = null) + { + $this->load->helper('pdf'); + + $this->mdl_quotes->mark_viewed($quote_id); + + $quote = $this->mdl_quotes->guest_visible() + ->where('ip_quotes.quote_id', $quote_id) + ->where_in('ip_quotes.client_id', $this->user_clients) + ->get()->row(); + + if (!$quote) { + show_404(); + } else { + generate_quote_pdf($quote_id, $stream, $quote_template); + } + } + + /** + * @param $quote_id + */ + public function approve($quote_id) + { + $this->load->model('quotes/mdl_quotes'); + $this->load->helper('mailer'); + + $this->mdl_quotes->approve_quote_by_id($quote_id); + email_quote_status($quote_id, "approved"); + + redirect_to('guest/quotes'); + } + + /** + * @param $quote_id + */ + public function reject($quote_id) + { + $this->load->model('quotes/mdl_quotes'); + $this->load->helper('mailer'); + + $this->mdl_quotes->reject_quote_by_id($quote_id); + email_quote_status($quote_id, "rejected"); + + redirect_to('guest/quotes'); + } + +} diff --git a/application/modules/guest/controllers/View.php b/application/modules/guest/controllers/View.php new file mode 100644 index 0000000..44f0af8 --- /dev/null +++ b/application/modules/guest/controllers/View.php @@ -0,0 +1,254 @@ +load->model('invoices/mdl_invoices'); + + $invoice = $this->mdl_invoices->guest_visible()->where('invoice_url_key', $invoice_url_key)->get(); + + if ($invoice->num_rows() != 1) { + show_404(); + } + + $this->load->model('invoices/mdl_items'); + $this->load->model('invoices/mdl_invoice_tax_rates'); + $this->load->model('payment_methods/mdl_payment_methods'); + + $invoice = $invoice->row(); + + if ($this->session->userdata('user_type') <> 1 and $invoice->invoice_status_id == 2) { + $this->mdl_invoices->mark_viewed($invoice->invoice_id); + } + + $payment_method = $this->mdl_payment_methods->where('payment_method_id', $invoice->payment_method)->get()->row(); + if ($invoice->payment_method == 0) { + $payment_method = null; + } + + // Attachments + $attachments = $this->get_attachments($invoice_url_key); + + $is_overdue = ($invoice->invoice_balance > 0 && strtotime($invoice->invoice_date_due) < time() ? true : false); + + $data = array( + 'invoice' => $invoice, + 'items' => $this->mdl_items->where('invoice_id', $invoice->invoice_id)->get()->result(), + 'invoice_tax_rates' => $this->mdl_invoice_tax_rates->where('invoice_id', $invoice->invoice_id)->get()->result(), + 'invoice_url_key' => $invoice_url_key, + 'flash_message' => $this->session->flashdata('flash_message'), + 'payment_method' => $payment_method, + 'is_overdue' => $is_overdue, + 'attachments' => $attachments, + ); + + $this->load->view('invoice_templates/public/' . get_setting('public_invoice_template') . '.php', $data); + } + + private function get_attachments($key) + { + $path = UPLOADS_FOLDER . '/customer_files'; + $files = scandir($path); + $attachments = array(); + + if ($files !== false) { + foreach ($files as $file) { + if ('.' != $file && '..' != $file && strpos($file, $key) !== false) { + $obj['name'] = substr($file, strpos($file, '_', 1) + 1); + $obj['fullname'] = $file; + $obj['size'] = filesize($path . '/' . $file); + $obj['fullpath'] = base_url($path . '/' . $file); + $attachments[] = $obj; + } + } + } + + return $attachments; + } + + /** + * @param $invoice_url_key + * @param bool $stream + * @param null $invoice_template + */ + public function generate_invoice_pdf($invoice_url_key, $stream = true, $invoice_template = null) + { + $this->load->model('invoices/mdl_invoices'); + + $invoice = $this->mdl_invoices->guest_visible()->where('invoice_url_key', $invoice_url_key)->get(); + + if ($invoice->num_rows() == 1) { + $invoice = $invoice->row(); + + if (!$invoice_template) { + $invoice_template = get_setting('pdf_invoice_template'); + } + + $this->load->helper('pdf'); + + generate_invoice_pdf($invoice->invoice_id, $stream, $invoice_template, 1); + } + } + + /** + * @param $invoice_url_key + * @param bool $stream + * @param null $invoice_template + */ + public function generate_sumex_pdf($invoice_url_key, $stream = true, $invoice_template = null) + { + $this->load->model('invoices/mdl_invoices'); + + $invoice = $this->mdl_invoices->guest_visible()->where('invoice_url_key', $invoice_url_key)->get(); + + if ($invoice->num_rows() == 1) { + $invoice = $invoice->row(); + + if ($invoice->sumex_id == NULL) { + show_404(); + return; + } + + if (!$invoice_template) { + $invoice_template = get_setting('pdf_invoice_template'); + } + + $this->load->helper('pdf'); + + generate_invoice_sumex($invoice->invoice_id); + } + } + + /** + * @param $quote_url_key + */ + public function quote($quote_url_key = '') + { + if (!$quote_url_key) { + show_404(); + } + + $this->load->model('quotes/mdl_quotes'); + + $quote = $this->mdl_quotes->guest_visible()->where('quote_url_key', $quote_url_key)->get(); + + if ($quote->num_rows() != 1) { + show_404(); + } + + $this->load->model('quotes/mdl_quote_items'); + $this->load->model('quotes/mdl_quote_tax_rates'); + + $quote = $quote->row(); + + if ($this->session->userdata('user_type') <> 1 and $quote->quote_status_id == 2) { + $this->mdl_quotes->mark_viewed($quote->quote_id); + } + + // Attachments + $attachments = $this->get_attachments($quote_url_key); + /*$path = '/uploads/customer_files'; + $files = scandir(getcwd() . $path); + $attachments = array(); + + if ($files !== false) { + foreach ($files as $file) { + if ('.' != $file && '..' != $file && strpos($file, $quote_url_key) !== false) { + $obj['name'] = substr($file, strpos($file, '_', 1) + 1); + $obj['fullname'] = $file; + $obj['size'] = filesize($path . '/' . $file); + $obj['fullpath'] = base_url($path . '/' . $file); + $attachments[] = $obj; + } + } + }*/ + + $is_expired = (strtotime($quote->quote_date_expires) < time() ? true : false); + + $data = array( + 'quote' => $quote, + 'items' => $this->mdl_quote_items->where('quote_id', $quote->quote_id)->get()->result(), + 'quote_tax_rates' => $this->mdl_quote_tax_rates->where('quote_id', $quote->quote_id)->get()->result(), + 'quote_url_key' => $quote_url_key, + 'flash_message' => $this->session->flashdata('flash_message'), + 'is_expired' => $is_expired, + 'attachments' => $attachments, + ); + + $this->load->view('quote_templates/public/' . get_setting('public_quote_template') . '.php', $data); + } + + /** + * @param $quote_url_key + * @param bool $stream + * @param null $quote_template + */ + public function generate_quote_pdf($quote_url_key, $stream = true, $quote_template = null) + { + $this->load->model('quotes/mdl_quotes'); + + $quote = $this->mdl_quotes->guest_visible()->where('quote_url_key', $quote_url_key)->get(); + + if ($quote->num_rows() == 1) { + $quote = $quote->row(); + + if (!$quote_template) { + $quote_template = get_setting('pdf_quote_template'); + } + + $this->load->helper('pdf'); + + generate_quote_pdf($quote->quote_id, $stream, $quote_template); + } + } + + /** + * @param $quote_url_key + */ + public function approve_quote($quote_url_key) + { + $this->load->model('quotes/mdl_quotes'); + $this->load->helper('mailer'); + + $this->mdl_quotes->approve_quote_by_key($quote_url_key); + email_quote_status($this->mdl_quotes->where('ip_quotes.quote_url_key', $quote_url_key)->get()->row()->quote_id, "approved"); + + redirect('guest/view/quote/' . $quote_url_key); + } + + /** + * @param $quote_url_key + */ + public function reject_quote($quote_url_key) + { + $this->load->model('quotes/mdl_quotes'); + $this->load->helper('mailer'); + + $this->mdl_quotes->reject_quote_by_key($quote_url_key); + email_quote_status($this->mdl_quotes->where('ip_quotes.quote_url_key', $quote_url_key)->get()->row()->quote_id, "rejected"); + + redirect('guest/view/quote/' . $quote_url_key); + } + +} diff --git a/application/modules/guest/views/index.php b/application/modules/guest/views/index.php new file mode 100644 index 0000000..3a2176b --- /dev/null +++ b/application/modules/guest/views/index.php @@ -0,0 +1,51 @@ +
    +

    +
    + +
    + +
    + +
    + +
    + +
    + + + layout->load_view('guest/partial_quotes_table', array('quotes' => $open_quotes)); ?> + +
    + + +
    +
    + +
    +
    + +
    +
    + + + layout->load_view('guest/partial_invoices_table', array('invoices' => $overdue_invoices)); ?> + +
    + + +
    +
    + +
    + +
    + +
    + +
    + layout->load_view('guest/partial_invoices_table', array('invoices' => $open_invoices)); ?> +
    + +
    + +
    diff --git a/application/modules/guest/views/invoices_index.php b/application/modules/guest/views/invoices_index.php new file mode 100644 index 0000000..99b7856 --- /dev/null +++ b/application/modules/guest/views/invoices_index.php @@ -0,0 +1,96 @@ +
    + +

    + +
    + uri->segment(4)), 'mdl_invoices'); ?> +
    + +
    + +
    + +
    + +
    + + layout->load_view('layout/alerts'); ?> + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + invoice_number; ?> + + + invoice_date_created); ?> + + invoice_date_due); ?> + + + + invoice_total); ?> + + invoice_balance); ?> + +
    + invoice_status_id != 4 && get_setting('enable_online_payments')) : ?> + + + + + + + + + + + + + +
    +
    +
    +
    + +
    diff --git a/application/modules/guest/views/invoices_view.php b/application/modules/guest/views/invoices_view.php new file mode 100644 index 0000000..f8bb0cf --- /dev/null +++ b/application/modules/guest/views/invoices_view.php @@ -0,0 +1,215 @@ + + +
    +

    #invoice_number; ?>

    + +
    +
    + invoice_status_id == 4) { ?> + + + invoice_status_id != 4 && get_setting('enable_online_payments') == 'on') : ?> + + + + + + + + +
    +
    + +
    + +
    + + layout->load_view('layout/alerts'); ?> + +
    + +
    + +
    + +
    +
    + +

    + +
    + layout->load_view('clients/partial_client_address', array('client' => $invoice)); ?> +
    +

    + + client_phone) { ?> + + : + client_phone); ?> +
    + + + client_email) { ?> + + : + client_email); ?> + + + +
    +
    + +
    + + + + + + + + + + + + + + +
    #invoice_number; ?>
    invoice_date_created); ?>
    invoice_date_due); ?>
    + +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    /
    + + item_name); ?> + + item_quantity; ?> + + + + item_discount); ?> + + + + + item_subtotal); ?> + +
    item_description)); ?> + + + item_price); ?> + + + + + item_tax_total); ?> + + + + + item_total); ?> + +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + +
    invoice_item_subtotal); ?>invoice_item_tax_total); ?> + + invoice_tax_rate_name . ' ' . $invoice_tax_rate->invoice_tax_rate_percent; ?>%: + invoice_tax_rate_amount); ?>
    + +
    invoice_discount_amount == floatval(0)) { + echo $invoice->invoice_discount_percent . '%'; + } else { + echo format_currency($invoice->invoice_discount_amount); + } + ?> + invoice_total); ?>invoice_paid); ?>invoice_balance); ?>
    +
    + + invoice_terms): ?> +

    +
    + invoice_terms)); ?> +

    + + +
    + +
    + +
    diff --git a/application/modules/guest/views/partial_invoices_table.php b/application/modules/guest/views/partial_invoices_table.php new file mode 100644 index 0000000..dffbbf6 --- /dev/null +++ b/application/modules/guest/views/partial_invoices_table.php @@ -0,0 +1,69 @@ +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + invoice_number; ?> + + invoice_date_created); ?> + + invoice_date_due < date('Y-m-d')) : ?> + + invoice_date_due); ?> + + + invoice_date_due); ?> + + + client_name); ?> + + invoice_total); ?> + + invoice_balance); ?> + +
    + invoice_status_id != 4 && get_setting('enable_online_payments') == 1) : ?> + + + + + + + + + + + + + +
    +
    +
    \ No newline at end of file diff --git a/application/modules/guest/views/partial_quotes_table.php b/application/modules/guest/views/partial_quotes_table.php new file mode 100644 index 0000000..0480dd8 --- /dev/null +++ b/application/modules/guest/views/partial_quotes_table.php @@ -0,0 +1,73 @@ +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + quote_number; ?> + + quote_status_id == 4) : ?> + + + quote_status_id == 5) : ?> + + + + quote_date_created); ?> + + quote_date_expires); ?> + + client_name); ?> + + quote_total); ?> + +
    + quote_status_id, array(2, 3))) { ?> + + + + + + + + + + + + + + + + + +
    +
    +
    \ No newline at end of file diff --git a/application/modules/guest/views/payment_information.php b/application/modules/guest/views/payment_information.php new file mode 100644 index 0000000..59a7f7b --- /dev/null +++ b/application/modules/guest/views/payment_information.php @@ -0,0 +1,249 @@ +"> + + + + + + + + + + <?php + if (get_setting('custom_title') != '') { + echo get_setting('custom_title', '', true); + } else { + echo 'InvoicePlane'; + } ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    +
    + +
    +
    '; + } + ?> + + layout->load_view('layout/alerts'); ?> + +
    + +
    + +
    +
    +

    + +

    +
    + layout->load_view('clients/partial_client_address', array('client' => $invoice)); ?> +
    +
    + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    invoice_date_created); ?>
    + invoice_date_due); ?> +
    invoice_total); ?>
    invoice_balance); ?>
    payment_method_name); ?>
    +
    +
    + invoice_terms)) : ?> +
    +
    +

    +
    invoice_terms)); ?>
    +
    + +
    + +
    +
    + + +
    + +
    + + + +
    + + + + +
    + +
    + +
    + +
    + +
    +
    +
    + +
    +
    + +
    + + +
    + +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + +
    + + +
    + +
    + +
    + + + +
    +
    + +
    + + + +layout->load_view('layout/includes/fullpage-loader'); ?> + + + + + + + + diff --git a/application/modules/guest/views/payments_index.php b/application/modules/guest/views/payments_index.php new file mode 100644 index 0000000..3e146c4 --- /dev/null +++ b/application/modules/guest/views/payments_index.php @@ -0,0 +1,48 @@ +
    +

    + +
    + +
    + +
    + +
    + + layout->load_view('layout/alerts'); ?> + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    payment_date); ?> + + invoice_number; ?> + + payment_amount); ?>payment_method_name; ?>payment_note); ?>
    +
    +
    + +
    diff --git a/application/modules/guest/views/quotes_index.php b/application/modules/guest/views/quotes_index.php new file mode 100644 index 0000000..cb1a990 --- /dev/null +++ b/application/modules/guest/views/quotes_index.php @@ -0,0 +1,38 @@ +
    + +

    + +
    + uri->segment(3)), 'mdl_quotes'); ?> +
    + +
    + +
    + +
    + +
    + +
    + + layout->load_view('layout/alerts'); ?> + + layout->load_view('guest/partial_quotes_table'); ?> + +
    + +
    diff --git a/application/modules/guest/views/quotes_view.php b/application/modules/guest/views/quotes_view.php new file mode 100644 index 0000000..3d61d34 --- /dev/null +++ b/application/modules/guest/views/quotes_view.php @@ -0,0 +1,180 @@ +
    +

    #quote_number; ?>

    + +
    +
    + quote_status_id, array(2, 3))) { ?> + + + + + + + + + quote_status_id == 4) { ?> + + + + + quote_status_id == 5) { ?> + + + + + + + + + +
    + +
    + +
    + +
    + + layout->load_view('layout/alerts'); ?> + +
    + +
    +
    + +


    +
    + layout->load_view('clients/partial_client_address', array('client' => $quote)); ?> +
    +

    + client_phone) { ?> + : client_phone); ?> +
    + + client_email) { ?> + : client_email); ?> + + +
    + +
    + + + + + + + + + + + + + + +
    #quote_number; ?>
    quote_date_created); ?>
    quote_date_expires); ?>
    + +
    + +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    /
    + + item_name); ?> + + item_quantity; ?> + + + item_discount); ?> + + + item_subtotal); ?> +
    item_description)); ?> + + item_price); ?> + + + item_tax_total); ?> + + + item_total); ?> +
    +
    + +
    + + + + + + + + + + + + + + + + + + + +
    quote_item_subtotal); ?>quote_item_tax_total); ?> + + quote_tax_rate_name . ' ' . $quote_tax_rate->quote_tax_rate_percent; ?>%: + quote_tax_rate_amount); ?>
    + +
    quote_discount_percent == floatval(0)) { + echo $quote->quote_discount_percent . '%'; + } else { + echo format_currency($quote->quote_discount_amount); + } + ?> + quote_total); ?>
    +
    +
    + +
    diff --git a/application/modules/import/controllers/Import.php b/application/modules/import/controllers/Import.php new file mode 100644 index 0000000..10aa6b9 --- /dev/null +++ b/application/modules/import/controllers/Import.php @@ -0,0 +1,118 @@ + 'clients.csv', + 1 => 'invoices.csv', + 2 => 'invoice_items.csv', + 3 => 'payments.csv' + ); + + /** + * Import constructor. + */ + public function __construct() + { + parent::__construct(); + + $this->load->model('mdl_import'); + } + + /** + * @param int $page + */ + public function index($page = 0) + { + $this->mdl_import->paginate(site_url('import/index'), $page); + $imports = $this->mdl_import->result(); + + $this->layout->set('imports', $imports); + $this->layout->buffer('content', 'import/index'); + $this->layout->render(); + } + + public function form() + { + if (!$this->input->post('btn_submit')) { + $this->load->helper('directory'); + + $files = directory_map('./uploads/import'); + + foreach ($files as $key => $file) { + if (!is_numeric(array_search($file, $this->allowed_files))) { + unset($files[$key]); + } + } + + $this->layout->set('files', $files); + $this->layout->buffer('content', 'import/import_index'); + $this->layout->render(); + } else { + $this->load->helper('file'); + + $import_id = $this->mdl_import->start_import(); + + if ($this->input->post('files')) { + $files = $this->allowed_files; + + foreach ($files as $key => $file) { + if (!is_numeric(array_search($file, $this->input->post('files')))) { + unset($files[$key]); + } + } + + foreach ($files as $file) { + if ($file == 'clients.csv') { + $ids = $this->mdl_import->import_data($file, 'ip_clients'); + + $this->mdl_import->record_import_details($import_id, 'ip_clients', 'clients', $ids); + } elseif ($file == 'invoices.csv') { + $this->load->model('invoices/mdl_invoices'); + + $ids = $this->mdl_import->import_invoices(); + + $this->mdl_import->record_import_details($import_id, 'ip_invoices', 'invoices', $ids); + } elseif ($file == 'invoice_items.csv') { + $this->load->model('invoices/mdl_items'); + + $ids = $this->mdl_import->import_invoice_items(); + + $this->mdl_import->record_import_details($import_id, 'ip_invoice_items', 'invoice_items', $ids); + } elseif ($file == 'payments.csv') { + $this->load->model('payments/mdl_payments'); + + $ids = $this->mdl_import->import_payments(); + + $this->mdl_import->record_import_details($import_id, 'ip_payments', 'payments', $ids); + } + } + } + + redirect('import'); + } + } + + /** + * @param $id + */ + public function delete($id) + { + $this->mdl_import->delete($id); + redirect('import'); + } + +} diff --git a/application/modules/import/models/Mdl_import.php b/application/modules/import/models/Mdl_import.php new file mode 100644 index 0000000..d978159 --- /dev/null +++ b/application/modules/import/models/Mdl_import.php @@ -0,0 +1,421 @@ + array( + 'client_name', + 'client_address_1', + 'client_address_2', + 'client_city', + 'client_state', + 'client_zip', + 'client_country', + 'client_phone', + 'client_fax', + 'client_mobile', + 'client_email', + 'client_web', + 'client_vat_id', + 'client_tax_code', + 'client_active' + ), + 'invoices.csv' => array( + 'user_email', + 'client_name', + 'invoice_date_created', + 'invoice_date_due', + 'invoice_number', + 'invoice_terms' + ), + 'invoice_items.csv' => array( + 'invoice_number', + 'item_tax_rate', + 'item_date_added', + 'item_name', + 'item_description', + 'item_quantity', + 'item_price' + ), + 'payments.csv' => array( + 'invoice_number', + 'payment_method', + 'payment_date', + 'payment_amount', + 'payment_note' + ) + ); + public $primary_keys = array( + 'ip_clients' => 'client_id', + 'ip_invoices' => 'invoice_id', + 'ip_invoice_items' => 'item_id', + 'ip_payments' => 'payment_id' + ); + + /** + * Mdl_Import constructor. + */ + public function __construct() + { + // Provides better line ending detection + ini_set("auto_detect_line_endings", true); + } + + public function default_select() + { + $this->db->select("SQL_CALC_FOUND_ROWS ip_imports.*, + (SELECT COUNT(*) FROM ip_import_details WHERE import_table_name = 'ip_clients' AND ip_import_details.import_id = ip_imports.import_id) AS num_clients, + (SELECT COUNT(*) FROM ip_import_details WHERE import_table_name = 'ip_invoices' AND ip_import_details.import_id = ip_imports.import_id) AS num_invoices, + (SELECT COUNT(*) FROM ip_import_details WHERE import_table_name = 'ip_invoice_items' AND ip_import_details.import_id = ip_imports.import_id) AS num_invoice_items, + (SELECT COUNT(*) FROM ip_import_details WHERE import_table_name = 'ip_payments' AND ip_import_details.import_id = ip_imports.import_id) AS num_payments", false); + } + + public function default_order_by() + { + $this->db->order_by('ip_imports.import_date DESC'); + } + + public function start_import() + { + $db_array = array( + 'import_date' => date('Y-m-d H:i:s') + ); + + $this->db->insert('ip_imports', $db_array); + + return $this->db->insert_id(); + } + + /** + * @param $file + * @param $table + * @return array|bool + */ + public function import_data($file, $table) + { + // Open the file + $handle = fopen('./uploads/import/' . $file, 'r'); + + $row = 1; + + // Get the expected file headers + $headers = $this->expected_headers[$file]; + + // Init an array to store the inserted ids + $ids = array(); + + while (($data = fgetcsv($handle, 1000, ",")) <> false) { + // Check to make sure the file headers match the expected headers + $fileheaders = null; + if ($row == 1) { + foreach ($headers as $header) { + if (!in_array($header, $data)) { + return false; + } + } + $fileheaders = $data; + } elseif ($row > 1) { + // Init the array + $db_array = array(); + // Loop through each of the values in the row + foreach ($headers as $key => $header) { + $db_array[$header] = ($data[array_keys($fileheaders, $header)[0]] <> 'null') ? $data[array_keys($fileheaders, $header)[0]] : ''; + } + + // Create a couple of default values if file is clients.csv + if ($file == 'clients.csv') { + $db_array['client_date_created'] = date('Y-m-d'); + $db_array['client_date_modified'] = date('Y-m-d'); + } + + // Insert the record + $this->db->insert($table, $db_array); + + // Record the inserted id + $ids[] = $this->db->insert_id(); + } + + $row++; + } + + // Return the array of recorded ids + return $ids; + } + + /** + * @return array|bool + */ + public function import_invoices() + { + // Open the file + $handle = fopen('./uploads/import/invoices.csv', 'r'); + + $row = 1; + + // Get the list of expected headers + $headers = $this->expected_headers['invoices.csv']; + + // Init an array to store the inserted ids + $ids = array(); + + while (($data = fgetcsv($handle, 1000, ",")) <> false) { + // Init $record_error as false + $record_error = false; + + // Check to make sure the file headers match expected headers + if ($row == 1 and $data <> $headers) { + return false; + } elseif ($row > 1) { + // Init the array + $db_array = array(); + + // Loop through each of the values in the row + foreach ($headers as $key => $header) { + if ($header == 'user_email') { + // Attempt to replace email address with user id + $this->db->where('user_email', $data[$key]); + $user = $this->db->get('ip_users'); + if ($user->num_rows()) { + $header = 'user_id'; + $data[$key] = $user->row()->user_id; + } else { + // Email address not found + $record_error = true; + } + } elseif ($header == 'client_name') { + // Replace client name with client id + $header = 'client_id'; + $this->db->where('client_name', $data[$key]); + $client = $this->db->get('ip_clients'); + if ($client->num_rows()) { + // Existing client found + $data[$key] = $client->row()->client_id; + } else { + // Existing client not found - create new client + $client_db_array = array( + 'client_name' => $data[$key], + 'client_date_created' => date('Y-m-d'), + 'client_date_modified' => date('Y-m-d') + ); + + $this->db->insert('ip_clients', $client_db_array); + $data[$key] = $this->db->insert_id(); + } + } + // Each invoice needs a url key + $db_array['invoice_url_key'] = $this->mdl_invoices->get_url_key(); + + // Assign the final value to the array + $db_array[$header] = ($data[$key] <> 'null') ? $data[$key] : ''; + } + + // Check for any record errors + if (!$record_error) { + // No record errors exist - go ahead and create the invoice + $db_array['invoice_group_id'] = 0; + $ids[] = $this->mdl_invoices->create($db_array); + } + } + + $row++; + } + + // Return the array of recorded ids + return $ids; + } + + /** + * @return array|bool + */ + public function import_invoice_items() + { + // Open the file + $handle = fopen('./uploads/import/invoice_items.csv', 'r'); + + $row = 1; + + // Get the list of expected headers + $headers = $this->expected_headers['invoice_items.csv']; + + // Init an array to store the inserted ids + $ids = array(); + + while (($data = fgetcsv($handle, 1000, ",")) <> false) { + // Init record_error as false + $record_error = false; + + // Check to make sure the file headers match expected headers + if ($row == 1 and $data <> $headers) { + return false; + } elseif ($row > 1) { + // Init the array + $db_array = array(); + + foreach ($headers as $key => $header) { + if ($header == 'invoice_number') { + // Replace invoice_number with invoice_id + $this->db->where('invoice_number', $data[$key]); + $user = $this->db->get('ip_invoices'); + if ($user->num_rows()) { + $header = 'invoice_id'; + $data[$key] = $user->row()->invoice_id; + } else { + $record_error = true; + } + } elseif ($header == 'item_tax_rate') { + // Replace item_tax_rate with item_tax_rate_id + $header = 'item_tax_rate_id'; + if ($data[$key] > 0) { + $this->db->where('tax_rate_percent', $data[$key]); + $tax_rate = $this->db->get('ip_tax_rates'); + if ($tax_rate->num_rows()) { + $data[$key] = $tax_rate->row()->tax_rate_id; + } else { + $this->db->insert('ip_tax_rates', array('tax_rate_name' => $data[$key], 'tax_rate_percent' => $data[$key])); + $data[$key] = $this->db->insert_id(); + } + } else { + $data[$key] = 0; + } + } + + // Assign the final value to the array + $db_array[$header] = ($data[$key] <> 'null') ? $data[$key] : ''; + } + + if (!$record_error) { + // No errors, go ahead and create the record + $ids[] = $this->mdl_items->save(null, $db_array); + } + } + + $row++; + } + + return $ids; + } + + /** + * @return array|bool + */ + public function import_payments() + { + $handle = fopen('./uploads/import/payments.csv', 'r'); + + $row = 1; + + $headers = $this->expected_headers['payments.csv']; + + $ids = array(); + + while (($data = fgetcsv($handle, 1000, ",")) <> false) { + $record_error = false; + + if ($row == 1 and $data <> $headers) { + return false; + } elseif ($row > 1) { + $db_array = array(); + + foreach ($headers as $key => $header) { + if ($header == 'invoice_number') { + $this->db->where('invoice_number', $data[$key]); + $user = $this->db->get('ip_invoices'); + if ($user->num_rows()) { + $header = 'invoice_id'; + $data[$key] = $user->row()->invoice_id; + } else { + $record_error = true; + } + } elseif ($header == 'payment_method') { + $header = 'payment_method_id'; + + if ($data[$key]) { + $this->db->where('payment_method_name', $data[$key]); + $payment_method = $this->db->get('ip_payment_methods'); + if ($payment_method->num_rows()) { + $data[$key] = $payment_method->row()->payment_method_id; + } else { + $this->db->insert('ip_payment_methods', array('payment_method_name' => $data[$key])); + $data[$key] = $this->db->insert_id(); + } + } else { + // No payment method provided + $data[$key] = 0; + } + } + + $db_array[$header] = ($data[$key] <> 'null') ? $data[$key] : ''; + } + + if (!$record_error) { + $ids[] = $this->mdl_payments->save(null, $db_array); + } + } + + $row++; + } + + return $ids; + } + + /** + * @param $import_id + * @param $table_name + * @param $import_lang_key + * @param $ids + */ + public function record_import_details($import_id, $table_name, $import_lang_key, $ids) + { + foreach ($ids as $id) { + $db_array = array( + 'import_id' => $import_id, + 'import_table_name' => $table_name, + 'import_lang_key' => $import_lang_key, + 'import_record_id' => $id + ); + + $this->db->insert('ip_import_details', $db_array); + } + } + + /** + * @param int $import_id + */ + public function delete($import_id) + { + // Gather the import details + $import_details = $this->db->where('import_id', $import_id)->get('ip_import_details')->result(); + + // Loop through details and delete each of the imported records + foreach ($import_details as $import_detail) { + $this->db->query("DELETE FROM " . $import_detail->import_table_name . " WHERE " . $this->primary_keys[$import_detail->import_table_name] . ' = ' . $import_detail->import_record_id); + } + + // Delete the master import record + parent::delete($import_id); + + // Delete the detail records + $this->db->where('import_id', $import_id); + $this->db->delete('ip_import_details'); + + // Delete any orphaned records + $this->load->helper('orphan'); + delete_orphans(); + } + +} diff --git a/application/modules/import/views/import_index.php b/application/modules/import/views/import_index.php new file mode 100644 index 0000000..af7bc75 --- /dev/null +++ b/application/modules/import/views/import_index.php @@ -0,0 +1,39 @@ +
    +

    +
    + +
    + +
    +
    + + layout->load_view('layout/alerts'); ?> + +
    +
    +
    +
    + +
    +
    + + + + +
    + +
    + + +
    +
    +
    + +
    +
    + +
    diff --git a/application/modules/import/views/index.php b/application/modules/import/views/index.php new file mode 100644 index 0000000..aece8af --- /dev/null +++ b/application/modules/import/views/index.php @@ -0,0 +1,66 @@ +
    +

    + +
    + + + +
    + +
    + +
    + +
    + +
    + + layout->load_view('layout/alerts'); ?> + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    import_id; ?>import_date; ?>num_clients; ?>num_invoices; ?>num_invoice_items; ?>num_payments; ?> +
    + + + + +
    +
    +
    + +
    diff --git a/application/modules/invoice_groups/controllers/Invoice_groups.php b/application/modules/invoice_groups/controllers/Invoice_groups.php new file mode 100644 index 0000000..f0db806 --- /dev/null +++ b/application/modules/invoice_groups/controllers/Invoice_groups.php @@ -0,0 +1,77 @@ +load->model('mdl_invoice_groups'); + } + + /** + * @param int $page + */ + public function index($page = 0) + { + $this->mdl_invoice_groups->paginate(site_url('invoice_groups/index'), $page); + $invoice_groups = $this->mdl_invoice_groups->result(); + + $this->layout->set('invoice_groups', $invoice_groups); + $this->layout->buffer('content', 'invoice_groups/index'); + $this->layout->render(); + } + + /** + * @param null $id + */ + public function form($id = null) + { + if ($this->input->post('btn_cancel')) { + redirect('invoice_groups'); + } + + if ($this->mdl_invoice_groups->run_validation()) { + $this->mdl_invoice_groups->save($id); + redirect('invoice_groups'); + } + + if ($id and !$this->input->post('btn_submit')) { + if (!$this->mdl_invoice_groups->prep_form($id)) { + show_404(); + } + } elseif (!$id) { + $this->mdl_invoice_groups->set_form_value('invoice_group_left_pad', 0); + $this->mdl_invoice_groups->set_form_value('invoice_group_next_id', 1); + } + + $this->layout->buffer('content', 'invoice_groups/form'); + $this->layout->render(); + } + + /** + * @param $id + */ + public function delete($id) + { + $this->mdl_invoice_groups->delete($id); + redirect('invoice_groups'); + } + +} diff --git a/application/modules/invoice_groups/models/Mdl_invoice_groups.php b/application/modules/invoice_groups/models/Mdl_invoice_groups.php new file mode 100644 index 0000000..d3ae04c --- /dev/null +++ b/application/modules/invoice_groups/models/Mdl_invoice_groups.php @@ -0,0 +1,129 @@ +db->select('SQL_CALC_FOUND_ROWS *', false); + } + + public function default_order_by() + { + $this->db->order_by('ip_invoice_groups.invoice_group_name'); + } + + /** + * @return array + */ + public function validation_rules() + { + return array( + 'invoice_group_name' => array( + 'field' => 'invoice_group_name', + 'label' => trans('name'), + 'rules' => 'required' + ), + 'invoice_group_identifier_format' => array( + 'field' => 'invoice_group_identifier_format', + 'label' => trans('identifier_format'), + 'rules' => 'required' + ), + 'invoice_group_next_id' => array( + 'field' => 'invoice_group_next_id', + 'label' => trans('next_id'), + 'rules' => 'required' + ), + 'invoice_group_left_pad' => array( + 'field' => 'invoice_group_left_pad', + 'label' => trans('left_pad'), + 'rules' => 'required' + ) + ); + } + + /** + * @param $invoice_group_id + * @param bool $set_next + * @return mixed + */ + public function generate_invoice_number($invoice_group_id, $set_next = true) + { + $invoice_group = $this->get_by_id($invoice_group_id); + + $invoice_identifier = $this->parse_identifier_format( + $invoice_group->invoice_group_identifier_format, + $invoice_group->invoice_group_next_id, + $invoice_group->invoice_group_left_pad + ); + + if ($set_next) { + $this->set_next_invoice_number($invoice_group_id); + } + + return $invoice_identifier; + } + + /** + * @param $identifier_format + * @param $next_id + * @param $left_pad + * @return mixed + */ + private function parse_identifier_format($identifier_format, $next_id, $left_pad) + { + if (preg_match_all('/{{{([^{|}]*)}}}/', $identifier_format, $template_vars)) { + foreach ($template_vars[1] as $var) { + switch ($var) { + case 'year': + $replace = date('Y'); + break; + case 'yy': + $replace = date('y'); + break; + case 'month': + $replace = date('m'); + break; + case 'day': + $replace = date('d'); + break; + case 'id': + $replace = str_pad($next_id, $left_pad, '0', STR_PAD_LEFT); + break; + default: + $replace = ''; + } + + $identifier_format = str_replace('{{{' . $var . '}}}', $replace, $identifier_format); + } + } + + return $identifier_format; + } + + /** + * @param $invoice_group_id + */ + public function set_next_invoice_number($invoice_group_id) + { + $this->db->where($this->primary_key, $invoice_group_id); + $this->db->set('invoice_group_next_id', 'invoice_group_next_id+1', false); + $this->db->update($this->table); + } + +} diff --git a/application/modules/invoice_groups/views/form.php b/application/modules/invoice_groups/views/form.php new file mode 100644 index 0000000..82080ae --- /dev/null +++ b/application/modules/invoice_groups/views/form.php @@ -0,0 +1,84 @@ +
    + + + +
    +

    + layout->load_view('layout/header_buttons'); ?> +
    + +
    + +
    +
    + + layout->load_view('layout/alerts'); ?> + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + +
    + + + +

    + + + +
    + +
    +
    + +
    + +
    diff --git a/application/modules/invoice_groups/views/index.php b/application/modules/invoice_groups/views/index.php new file mode 100644 index 0000000..4f96680 --- /dev/null +++ b/application/modules/invoice_groups/views/index.php @@ -0,0 +1,66 @@ +
    +

    + +
    + + + +
    + +
    + +
    + +
    + +
    + + layout->load_view('layout/alerts'); ?> + +
    + + + + + + + + + + + + + + + + + + + + + + +
    invoice_group_name); ?>invoice_group_next_id; ?>invoice_group_left_pad; ?> +
    + + + + +
    +
    +
    + +
    diff --git a/application/modules/invoices/controllers/Ajax.php b/application/modules/invoices/controllers/Ajax.php new file mode 100644 index 0000000..26d27ff --- /dev/null +++ b/application/modules/invoices/controllers/Ajax.php @@ -0,0 +1,446 @@ +load->model('invoices/mdl_items'); + $this->load->model('invoices/mdl_invoices'); + $this->load->model('units/mdl_units'); + $this->load->model('invoices/mdl_invoice_sumex'); + + $invoice_id = $this->input->post('invoice_id'); + + $this->mdl_invoices->set_id($invoice_id); + + if ($this->mdl_invoices->run_validation('validation_rules_save_invoice')) { + $items = json_decode($this->input->post('items')); + + foreach ($items as $item) { + // Check if an item has either a quantity + price or name or description + if (!empty($item->item_name)) { + $item->item_quantity = ($item->item_quantity ? standardize_amount($item->item_quantity) : floatval(0)); + $item->item_price = ($item->item_quantity ? standardize_amount($item->item_price) : floatval(0)); + $item->item_discount_amount = ($item->item_discount_amount) ? standardize_amount($item->item_discount_amount) : null; + $item->item_product_id = ($item->item_product_id ? $item->item_product_id : null); + if (property_exists($item, 'item_date')) { + $item->item_date = ($item->item_date ? date_to_mysql($item->item_date) : null); + } + $item->item_product_unit_id = ($item->item_product_unit_id ? $item->item_product_unit_id : null); + $item->item_product_unit = $this->mdl_units->get_name($item->item_product_unit_id, $item->item_quantity); + $item_id = ($item->item_id) ?: null; + unset($item->item_id); + + if (!$item->item_task_id) { + unset($item->item_task_id); + } else { + $this->load->model('tasks/mdl_tasks'); + $this->mdl_tasks->update_status(4, $item->item_task_id); + } + + $this->mdl_items->save($item_id, $item); + } else { + // Throw an error message and use the form validation for that + $this->load->library('form_validation'); + $this->form_validation->set_rules('item_name', trans('item'), 'required'); + $this->form_validation->run(); + + $response = array( + 'success' => 0, + 'validation_errors' => array( + 'item_name' => form_error('item_name', '', ''), + ) + ); + + echo json_encode($response); + exit; + } + } + + $invoice_status = $this->input->post('invoice_status_id'); + + if ($this->input->post('invoice_discount_amount') === '') { + $invoice_discount_amount = floatval(0); + } else { + $invoice_discount_amount = $this->input->post('invoice_discount_amount'); + } + + if ($this->input->post('invoice_discount_percent') === '') { + $invoice_discount_percent = floatval(0); + } else { + $invoice_discount_percent = $this->input->post('invoice_discount_percent'); + } + + // Generate new invoice number if needed + $invoice_number = $this->input->post('invoice_number'); + + if (empty($invoice_number) && $invoice_status != 1) { + $invoice_group_id = $this->mdl_invoices->get_invoice_group_id($invoice_id); + $invoice_number = $this->mdl_invoices->get_invoice_number($invoice_group_id); + } + + $db_array = array( + 'invoice_number' => $invoice_number, + 'invoice_terms' => $this->input->post('invoice_terms'), + 'invoice_date_created' => date_to_mysql($this->input->post('invoice_date_created')), + 'invoice_date_due' => date_to_mysql($this->input->post('invoice_date_due')), + 'invoice_password' => $this->input->post('invoice_password'), + 'invoice_status_id' => $invoice_status, + 'payment_method' => $this->input->post('payment_method'), + 'invoice_discount_amount' => standardize_amount($invoice_discount_amount), + 'invoice_discount_percent' => standardize_amount($invoice_discount_percent), + ); + + // check if status changed to sent, the feature is enabled and settings is set to sent + if ($this->config->item('disable_read_only') === false) { + if ($invoice_status == get_setting('read_only_toggle')) { + $db_array['is_read_only'] = 1; + } + } + + $this->mdl_invoices->save($invoice_id, $db_array); + $sumexInvoice = $this->mdl_invoices->where('sumex_invoice', $invoice_id)->get()->num_rows(); + + if ($sumexInvoice >= 1) { + $sumex_array = array( + 'sumex_invoice' => $invoice_id, + 'sumex_reason' => $this->input->post('invoice_sumex_reason'), + 'sumex_diagnosis' => $this->input->post('invoice_sumex_diagnosis'), + 'sumex_treatmentstart' => date_to_mysql($this->input->post('invoice_sumex_treatmentstart')), + 'sumex_treatmentend' => date_to_mysql($this->input->post('invoice_sumex_treatmentend')), + 'sumex_casedate' => date_to_mysql($this->input->post('invoice_sumex_casedate')), + 'sumex_casenumber' => $this->input->post('invoice_sumex_casenumber'), + 'sumex_observations' => $this->input->post('invoice_sumex_observations') + ); + $this->mdl_invoice_sumex->save($invoice_id, $sumex_array); + } + + // Recalculate for discounts + $this->load->model('invoices/mdl_invoice_amounts'); + $this->mdl_invoice_amounts->calculate($invoice_id); + + $response = array( + 'success' => 1, + ); + } else { + $this->load->helper('json_error'); + $response = array( + 'success' => 0, + 'validation_errors' => json_errors() + ); + } + + // Save all custom fields + if ($this->input->post('custom')) { + $db_array = array(); + + $values = []; + foreach ($this->input->post('custom') as $custom) { + if (preg_match("/^(.*)\[\]$/i", $custom['name'], $matches)) { + $values[$matches[1]][] = $custom['value']; + } else { + $values[$custom['name']] = $custom['value']; + } + } + + foreach ($values as $key => $value) { + preg_match("/^custom\[(.*?)\](?:\[\]|)$/", $key, $matches); + if ($matches) { + $db_array[$matches[1]] = $value; + } + } + + + $this->load->model('custom_fields/mdl_invoice_custom'); + $result = $this->mdl_invoice_custom->save_custom($invoice_id, $db_array); + if ($result !== true) { + $response = array( + 'success' => 0, + 'validation_errors' => $result + ); + + echo json_encode($response); + exit; + } + } + + echo json_encode($response); + } + + public function save_invoice_tax_rate() + { + $this->load->model('invoices/mdl_invoice_tax_rates'); + + if ($this->mdl_invoice_tax_rates->run_validation()) { + $this->mdl_invoice_tax_rates->save(); + + $response = array( + 'success' => 1 + ); + } else { + $response = array( + 'success' => 0, + 'validation_errors' => $this->mdl_invoice_tax_rates->validation_errors + ); + } + + echo json_encode($response); + } + + public function create() + { + $this->load->model('invoices/mdl_invoices'); + + if ($this->mdl_invoices->run_validation()) { + $invoice_id = $this->mdl_invoices->create(); + + $response = array( + 'success' => 1, + 'invoice_id' => $invoice_id + ); + } else { + $this->load->helper('json_error'); + $response = array( + 'success' => 0, + 'validation_errors' => json_errors() + ); + } + + echo json_encode($response); + } + + public function create_recurring() + { + $this->load->model('invoices/mdl_invoices_recurring'); + + if ($this->mdl_invoices_recurring->run_validation()) { + $this->mdl_invoices_recurring->save(); + + $response = array( + 'success' => 1, + ); + } else { + $this->load->helper('json_error'); + $response = array( + 'success' => 0, + 'validation_errors' => json_errors() + ); + } + + echo json_encode($response); + } + + public function get_item() + { + $this->load->model('invoices/mdl_items'); + + $item = $this->mdl_items->get_by_id($this->input->post('item_id')); + + echo json_encode($item); + } + + public function modal_create_invoice() + { + $this->load->module('layout'); + $this->load->model('invoice_groups/mdl_invoice_groups'); + $this->load->model('tax_rates/mdl_tax_rates'); + $this->load->model('clients/mdl_clients'); + + $data = array( + 'invoice_groups' => $this->mdl_invoice_groups->get()->result(), + 'tax_rates' => $this->mdl_tax_rates->get()->result(), + 'client' => $this->mdl_clients->get_by_id($this->input->post('client_id')), + 'clients' => $this->mdl_clients->get_latest(), + ); + + $this->layout->load_view('invoices/modal_create_invoice', $data); + } + + public function modal_create_recurring() + { + $this->load->module('layout'); + + $this->load->model('mdl_invoices_recurring'); + + $data = array( + 'invoice_id' => $this->input->post('invoice_id'), + 'recur_frequencies' => $this->mdl_invoices_recurring->recur_frequencies + ); + + $this->layout->load_view('invoices/modal_create_recurring', $data); + } + + public function get_recur_start_date() + { + $invoice_date = $this->input->post('invoice_date'); + $recur_frequency = $this->input->post('recur_frequency'); + + echo increment_user_date($invoice_date, $recur_frequency); + } + + public function modal_change_client() + { + $this->load->module('layout'); + $this->load->model('clients/mdl_clients'); + + $data = array( + 'client_id' => $this->input->post('client_id'), + 'invoice_id' => $this->input->post('invoice_id'), + 'clients' => $this->mdl_clients->get_latest(), + ); + + $this->layout->load_view('invoices/modal_change_client', $data); + } + + public function change_client() + { + $this->load->model('invoices/mdl_invoices'); + $this->load->model('clients/mdl_clients'); + + // Get the client ID + $client_id = $this->input->post('client_id'); + $client = $this->mdl_clients->where('ip_clients.client_id', $client_id)->get()->row(); + + if (!empty($client)) { + $invoice_id = $this->input->post('invoice_id'); + + $db_array = array( + 'client_id' => $client_id, + ); + $this->db->where('invoice_id', $invoice_id); + $this->db->update('ip_invoices', $db_array); + + $response = array( + 'success' => 1, + 'invoice_id' => $invoice_id, + ); + } else { + $this->load->helper('json_error'); + $response = array( + 'success' => 0, + 'validation_errors' => json_errors() + ); + } + + echo json_encode($response); + } + + public function modal_copy_invoice() + { + $this->load->module('layout'); + + $this->load->model('invoices/mdl_invoices'); + $this->load->model('invoice_groups/mdl_invoice_groups'); + $this->load->model('tax_rates/mdl_tax_rates'); + + $data = array( + 'invoice_groups' => $this->mdl_invoice_groups->get()->result(), + 'tax_rates' => $this->mdl_tax_rates->get()->result(), + 'invoice_id' => $this->input->post('invoice_id'), + 'invoice' => $this->mdl_invoices->where('ip_invoices.invoice_id', $this->input->post('invoice_id'))->get()->row(), + ); + + $this->layout->load_view('invoices/modal_copy_invoice', $data); + } + + public function copy_invoice() + { + $this->load->model('invoices/mdl_invoices'); + $this->load->model('invoices/mdl_items'); + $this->load->model('invoices/mdl_invoice_tax_rates'); + + if ($this->mdl_invoices->run_validation()) { + $target_id = $this->mdl_invoices->save(); + $source_id = $this->input->post('invoice_id'); + + $this->mdl_invoices->copy_invoice($source_id, $target_id); + + $response = array( + 'success' => 1, + 'invoice_id' => $target_id + ); + } else { + $this->load->helper('json_error'); + $response = array( + 'success' => 0, + 'validation_errors' => json_errors() + ); + } + + echo json_encode($response); + } + + public function modal_create_credit() + { + $this->load->module('layout'); + + $this->load->model('invoices/mdl_invoices'); + $this->load->model('invoice_groups/mdl_invoice_groups'); + $this->load->model('tax_rates/mdl_tax_rates'); + + $data = array( + 'invoice_groups' => $this->mdl_invoice_groups->get()->result(), + 'tax_rates' => $this->mdl_tax_rates->get()->result(), + 'invoice_id' => $this->input->post('invoice_id'), + 'invoice' => $this->mdl_invoices->where('ip_invoices.invoice_id', $this->input->post('invoice_id'))->get()->row() + ); + + $this->layout->load_view('invoices/modal_create_credit', $data); + } + + public function create_credit() + { + $this->load->model('invoices/mdl_invoices'); + $this->load->model('invoices/mdl_items'); + $this->load->model('invoices/mdl_invoice_tax_rates'); + + if ($this->mdl_invoices->run_validation()) { + $target_id = $this->mdl_invoices->save(); + $source_id = $this->input->post('invoice_id'); + + $this->mdl_invoices->copy_credit_invoice($source_id, $target_id); + + // Set source invoice to read-only + if ($this->config->item('disable_read_only') == false) { + $this->mdl_invoices->where('invoice_id', $source_id); + $this->mdl_invoices->update('ip_invoices', array('is_read_only' => '1')); + } + + // Set target invoice to credit invoice + $this->mdl_invoices->where('invoice_id', $target_id); + $this->mdl_invoices->update('ip_invoices', array('creditinvoice_parent_id' => $source_id)); + + $this->mdl_invoices->where('invoice_id', $target_id); + $this->mdl_invoices->update('ip_invoice_amounts', array('invoice_sign' => '-1')); + + $response = array( + 'success' => 1, + 'invoice_id' => $target_id + ); + } else { + $this->load->helper('json_error'); + $response = array( + 'success' => 0, + 'validation_errors' => json_errors() + ); + } + + echo json_encode($response); + } + +} diff --git a/application/modules/invoices/controllers/Cron.php b/application/modules/invoices/controllers/Cron.php new file mode 100644 index 0000000..d0c0607 --- /dev/null +++ b/application/modules/invoices/controllers/Cron.php @@ -0,0 +1,125 @@ +load->model('invoices/mdl_invoices_recurring'); + $this->load->model('invoices/mdl_invoices'); + $this->load->helper('mailer'); + + // Gather a list of recurring invoices to generate + $invoices_recurring = $this->mdl_invoices_recurring->active()->get()->result(); + + foreach ($invoices_recurring as $invoice_recurring) { + // This is the original invoice id + $source_id = $invoice_recurring->invoice_id; + + // This is the original invoice + // $invoice = $this->db->where('ip_invoices.invoice_id', $source_id)->get('ip_invoices')->row(); + $invoice = $this->mdl_invoices->get_by_id($source_id); + + // Create the new invoice + $db_array = array( + 'client_id' => $invoice->client_id, + 'invoice_date_created' => $invoice_recurring->recur_next_date, + 'invoice_date_due' => $this->mdl_invoices->get_date_due($invoice_recurring->recur_next_date), + 'invoice_group_id' => $invoice->invoice_group_id, + 'user_id' => $invoice->user_id, + 'invoice_number' => $this->mdl_invoices->get_invoice_number($invoice->invoice_group_id), + 'invoice_url_key' => $this->mdl_invoices->get_url_key(), + 'invoice_terms' => $invoice->invoice_terms + ); + + // This is the new invoice id + $target_id = $this->mdl_invoices->create($db_array, false); + + // Copy the original invoice to the new invoice + $this->mdl_invoices->copy_invoice($source_id, $target_id); + + // Update the next recur date for the recurring invoice + $this->mdl_invoices_recurring->set_next_recur_date($invoice_recurring->invoice_recurring_id); + + // Email the new invoice if applicable + if (get_setting('automatic_email_on_recur') && mailer_configured()) { + $new_invoice = $this->mdl_invoices->get_by_id($target_id); + + // Set the email body, use default email template if available + $this->load->model('email_templates/mdl_email_templates'); + + $email_template_id = get_setting('email_invoice_template'); + if (!$email_template_id) { + return; + } + + $email_template = $this->mdl_email_templates->where('email_template_id', $email_template_id)->get(); + if ($email_template->num_rows() == 0) { + return; + } + + $tpl = $email_template->row(); + + // Prepare the attachments + $this->load->model('upload/mdl_uploads'); + $attachment_files = $this->mdl_uploads->get_invoice_uploads($target_id); + + // Prepare the body + $body = $tpl->email_template_body; + if (strlen($body) != strlen(strip_tags($body))) { + $body = htmlspecialchars_decode($body); + } else { + $body = htmlspecialchars_decode(nl2br($body)); + } + + $from = !empty($tpl->email_template_from_email) ? + array($tpl->email_template_from_email, $tpl->email_template_from_name) : + array($invoice->user_email, ""); + + $subject = !empty($tpl->email_template_subject) ? + $tpl->email_template_subject : + trans('invoice') . ' #' . $new_invoice->invoice_number; + + $pdf_template = $tpl->email_template_pdf_template; + $to = $invoice->client_email; + $cc = $tpl->email_template_cc; + $bcc = $tpl->email_template_bcc; + + $email_invoice = email_invoice($target_id, $pdf_template, $from, $to, $subject, $body, $cc, $bcc, $attachment_files); + + if ($email_invoice) { + $this->mdl_invoices->mark_sent($target_id); + $this->mdl_invoice_amounts->calculate($target_id); + } else { + log_message('error', 'Invoice ' . $target_id . 'could not be sent. Please review your Email settings.'); + } + } + } + + log_message('debug', '[Recurring Invoices] ' . count($invoices_recurring) . ' recurring invoices processed'); + } + +} diff --git a/application/modules/invoices/controllers/Invoices.php b/application/modules/invoices/controllers/Invoices.php new file mode 100644 index 0000000..3e8cd82 --- /dev/null +++ b/application/modules/invoices/controllers/Invoices.php @@ -0,0 +1,386 @@ +load->model('mdl_invoices'); + } + + public function index() + { + + // Display all invoices by default + redirect('invoices/status/all'); + } + + /** + * @param string $status + * @param int $page + */ + public function status($status = 'all', $page = 0) + { + //echo 'main'; + // Determine which group of invoices to load + switch ($status) { + case 'draft': + $this->mdl_invoices->is_draft(); + break; + case 'sent': + $this->mdl_invoices->is_sent(); + break; + case 'viewed': + $this->mdl_invoices->is_viewed(); + break; + case 'paid': + $this->mdl_invoices->is_paid(); + break; + case 'overdue': + $this->mdl_invoices->is_overdue(); + break; + } + + $this->mdl_invoices->paginate(site_url('invoices/status/' . $status), $page); + $invoices = $this->mdl_invoices->result(); + + $this->layout->set( + array( + 'invoices' => $invoices, + 'status' => $status, + 'filter_display' => true, + 'filter_placeholder' => trans('filter_invoices'), + 'filter_method' => 'filter_invoices', + 'invoice_statuses' => $this->mdl_invoices->statuses() + ) + ); + + $this->layout->buffer('content', 'invoices/index'); + $this->layout->render(); + } + + public function archive() + { + $invoice_array = array(); + if (isset($_POST['invoice_number'])) { + $invoiceNumber = $_POST['invoice_number']; + $invoice_array = glob('./uploads/archive/*' . '_' . $invoiceNumber . '.pdf'); + $this->layout->set( + array( + 'invoices_archive' => $invoice_array)); + $this->layout->buffer('content', 'invoices/archive'); + $this->layout->render(); + + } else { + foreach (glob('./uploads/archive/*.pdf') as $file) { + array_push($invoice_array, $file); + } + rsort($invoice_array); + $this->layout->set( + array( + 'invoices_archive' => $invoice_array)); + $this->layout->buffer('content', 'invoices/archive'); + $this->layout->render(); + } + + } + + /** + * @param $invoice + */ + public function download($invoice) + { + header('Content-type: application/pdf'); + header('Content-Disposition: attachment; filename="' . $invoice . '"'); + readfile('./uploads/archive/' . $invoice); + } + + /** + * @param $invoice_id + */ + public function view($invoice_id) + { + //echo 'Edit'; + $this->load->model( + array( + 'mdl_items', + 'tax_rates/mdl_tax_rates', + 'payment_methods/mdl_payment_methods', + 'mdl_invoice_tax_rates', + 'custom_fields/mdl_custom_fields', + ) + ); + + $this->load->helper("custom_values"); + $this->load->helper("client"); + $this->load->model('units/mdl_units'); + $this->load->module('payments'); + + $this->load->model('custom_values/mdl_custom_values'); + $this->load->model('custom_fields/mdl_invoice_custom'); + + $this->db->reset_query(); + + /*$invoice_custom = $this->mdl_invoice_custom->where('invoice_id', $invoice_id)->get(); + + if ($invoice_custom->num_rows()) { + $invoice_custom = $invoice_custom->row(); + + unset($invoice_custom->invoice_id, $invoice_custom->invoice_custom_id); + + foreach ($invoice_custom as $key => $val) { + $this->mdl_invoices->set_form_value('custom[' . $key . ']', $val); + } + }*/ + + $fields = $this->mdl_invoice_custom->by_id($invoice_id)->get()->result(); + //print_r($fields); + $invoice = $this->mdl_invoices->get_by_id($invoice_id); + //print_r($invoice); + if (!$invoice) { + show_404(); + } + //$ClientID = ''; + // foreach ($invoice[0] as $key ) { + $InvoiceDetails = json_decode(json_encode($invoice),true); + $ClientID = $InvoiceDetails['client_id']; + //echo $ClientID; + // } + /*foreach ($invoice as $inv) { + $ClientID = $inv->client_id; + } + echo $ClientID; */ + $PaymentDays = $this->mdl_invoices->GetPaymentDays($invoice_id,$ClientID,'51'); + $GetSecondaryAddress = $this->mdl_invoices->GetSecondaryAddress($ClientID); + + $getSecondayAddressSelected = $this->mdl_invoices->getSecondayAddressSelected($invoice_id,'44'); + // print_r($GetSecondaryAddress); + + $custom_fields = $this->mdl_custom_fields->by_table('ip_invoice_custom')->get()->result(); + $custom_values = []; + foreach ($custom_fields as $custom_field) { + if (in_array($custom_field->custom_field_type, $this->mdl_custom_values->custom_value_fields())) { + $values = $this->mdl_custom_values->get_by_fid($custom_field->custom_field_id)->result(); + $custom_values[$custom_field->custom_field_id] = $values; + } + } + + foreach ($custom_fields as $cfield) { + foreach ($fields as $fvalue) { + if ($fvalue->invoice_custom_fieldid == $cfield->custom_field_id) { + // TODO: Hackish, may need a better optimization + //echo $fvalue->invoice_custom_fieldid ; + if ($fvalue->invoice_custom_fieldid == "7" && $fvalue->invoice_custom_fieldvalue == '') + { + echo 'Mode'. $fvalue->invoice_custom_fieldvalue; + $this->mdl_invoices->set_form_value( + 'custom[' . $cfield->custom_field_id . ']', + 'By Road' + ); + } + else + { + $this->mdl_invoices->set_form_value( + 'custom[' . $cfield->custom_field_id . ']', + $fvalue->invoice_custom_fieldvalue + ); + } + break; + } + } + } + + $this->layout->set( + array( + 'invoice' => $invoice, + 'Duedate' =>$PaymentDays, + 'GetSecondary' =>$GetSecondaryAddress, + 'getSecondaySelected' => $getSecondayAddressSelected, + 'items' => $this->mdl_items->where('invoice_id', $invoice_id)->get()->result(), + 'invoice_id' => $invoice_id, + 'tax_rates' => $this->mdl_tax_rates->get()->result(), + 'invoice_tax_rates' => $this->mdl_invoice_tax_rates->where('invoice_id', $invoice_id)->get()->result(), + 'units' => $this->mdl_units->get()->result(), + 'payment_methods' => $this->mdl_payment_methods->get()->result(), + 'custom_fields' => $custom_fields, + 'custom_values' => $custom_values, + 'custom_js_vars' => array( + 'currency_symbol' => get_setting('currency_symbol'), + 'currency_symbol_placement' => get_setting('currency_symbol_placement'), + 'decimal_point' => get_setting('decimal_point') + ), + 'invoice_statuses' => $this->mdl_invoices->statuses() + ) + ); + + if ($invoice->sumex_id != null) { + $this->layout->buffer( + array( + array('modal_delete_invoice', 'invoices/modal_delete_invoice'), + array('modal_add_invoice_tax', 'invoices/modal_add_invoice_tax'), + array('modal_add_payment', 'payments/modal_add_payment'), + array('content', 'invoices/view_sumex') + ) + ); + } else { + $this->layout->buffer( + array( + array('modal_delete_invoice', 'invoices/modal_delete_invoice'), + array('modal_add_invoice_tax', 'invoices/modal_add_invoice_tax'), + array('modal_add_payment', 'payments/modal_add_payment'), + array('content', 'invoices/view') + ) + ); + } + + $this->layout->render(); + } + + /** + * @param $invoice_id + */ + public function delete($invoice_id) + { + // Get the status of the invoice + $invoice = $this->mdl_invoices->get_by_id($invoice_id); + $invoice_status = $invoice->invoice_status_id; + + if ($invoice_status == 1 || $this->config->item('enable_invoice_deletion') === true) { + // If invoice refers to tasks, mark those tasks back to 'Complete' + $this->load->model('tasks/mdl_tasks'); + $tasks = $this->mdl_tasks->update_on_invoice_delete($invoice_id); + + // Delete the invoice + $this->mdl_invoices->delete($invoice_id); + } else { + // Add alert that invoices can't be deleted + $this->session->set_flashdata('alert_error', trans('invoice_deletion_forbidden')); + } + + // Redirect to invoice index + redirect('invoices/index'); + } + + /** + * @param $invoice_id + * @param $item_id + */ + public function delete_item($invoice_id, $item_id) + { + // Delete invoice item + $this->load->model('mdl_items'); + $item = $this->mdl_items->delete($item_id); + + // Mark item back to complete: + if ($item && $item->item_task_id) { + $this->load->model('tasks/mdl_tasks'); + $this->mdl_tasks->update_status(3, $item->item_task_id); + } + + // Redirect to invoice view + redirect('invoices/view/' . $invoice_id); + } + + /** + * @param $invoice_id + * @param bool $stream + * @param null $invoice_template + */ + public function generate_pdf($invoice_id, $stream = true, $invoice_template = null) + { + + $this->load->helper('pdf'); + + if (get_setting('mark_invoices_sent_pdf') == 1) { + + $this->mdl_invoices->mark_sent($invoice_id); + } + + generate_invoice_pdf($invoice_id, $stream, $invoice_template, null); + } + + /** + * @param $invoice_id + */ + public function generate_zugferd_xml($invoice_id) + { + $this->load->model('invoices/mdl_items'); + $this->load->library('ZugferdXml', array( + 'invoice' => $this->mdl_invoices->get_by_id($invoice_id), + 'items' => $this->mdl_items->where('invoice_id', $invoice_id)->get()->result() + )); + + $this->output->set_content_type('text/xml'); + $this->output->set_output($this->zugferdxml->xml()); + } + + public function generate_sumex_pdf($invoice_id) + { + $this->load->helper('pdf'); + + generate_invoice_sumex($invoice_id); + } + + public function generate_sumex_copy($invoice_id) + { + + + $this->load->model('invoices/mdl_items'); + $this->load->library('Sumex', array( + 'invoice' => $this->mdl_invoices->get_by_id($invoice_id), + 'items' => $this->mdl_items->where('invoice_id', $invoice_id)->get()->result(), + 'options' => array( + 'copy' => "1", + 'storno' => "0" + ) + )); + + $this->output->set_content_type('application/pdf'); + $this->output->set_output($this->sumex->pdf()); + } + + /** + * @param $invoice_id + * @param $invoice_tax_rate_id + */ + public function delete_invoice_tax($invoice_id, $invoice_tax_rate_id) + { + $this->load->model('mdl_invoice_tax_rates'); + $this->mdl_invoice_tax_rates->delete($invoice_tax_rate_id); + + $this->load->model('mdl_invoice_amounts'); + $this->mdl_invoice_amounts->calculate($invoice_id); + + redirect('invoices/view/' . $invoice_id); + } + + public function recalculate_all_invoices() + { + $this->db->select('invoice_id'); + $invoice_ids = $this->db->get('ip_invoices')->result(); + + $this->load->model('mdl_invoice_amounts'); + + foreach ($invoice_ids as $invoice_id) { + $this->mdl_invoice_amounts->calculate($invoice_id->invoice_id); + } + } + +} diff --git a/application/modules/invoices/controllers/Recurring.php b/application/modules/invoices/controllers/Recurring.php new file mode 100644 index 0000000..ce3fe53 --- /dev/null +++ b/application/modules/invoices/controllers/Recurring.php @@ -0,0 +1,60 @@ +load->model('mdl_invoices_recurring'); + } + + /** + * @param int $page + */ + public function index($page = 0) + { + $this->mdl_invoices_recurring->paginate(site_url('invoices/recurring'), $page); + $recurring_invoices = $this->mdl_invoices_recurring->result(); + + $this->layout->set('recur_frequencies', $this->mdl_invoices_recurring->recur_frequencies); + $this->layout->set('recurring_invoices', $recurring_invoices); + $this->layout->buffer('content', 'invoices/index_recurring'); + $this->layout->render(); + } + + /** + * @param $invoice_recurring_id + */ + public function stop($invoice_recurring_id) + { + $this->mdl_invoices_recurring->stop($invoice_recurring_id); + redirect('invoices/recurring/index'); + } + + /** + * @param $invoice_recurring_id + */ + public function delete($invoice_recurring_id) + { + $this->mdl_invoices_recurring->delete($invoice_recurring_id); + redirect('invoices/recurring/index'); + } + +} diff --git a/application/modules/invoices/models/Mdl_invoice_amounts.php b/application/modules/invoices/models/Mdl_invoice_amounts.php new file mode 100644 index 0000000..fca804c --- /dev/null +++ b/application/modules/invoices/models/Mdl_invoice_amounts.php @@ -0,0 +1,407 @@ +db->query(" + SELECT SUM(item_subtotal) AS invoice_item_subtotal, + SUM(item_tax_total) AS invoice_item_tax_total, + SUM(item_subtotal) + SUM(item_tax_total) AS invoice_total, + SUM(item_discount) AS invoice_item_discount + FROM ip_invoice_item_amounts + WHERE item_id IN ( + SELECT item_id FROM ip_invoice_items WHERE invoice_id = " . $this->db->escape($invoice_id) . " + ) + "); + + $invoice_amounts = $query->row(); + + $invoice_item_subtotal = $invoice_amounts->invoice_item_subtotal - $invoice_amounts->invoice_item_discount; + $invoice_subtotal = $invoice_item_subtotal + $invoice_amounts->invoice_item_tax_total; + $invoice_total = $this->calculate_discount($invoice_id, $invoice_subtotal); + + // Get the amount already paid + $query = $this->db->query(" + SELECT SUM(payment_amount) AS invoice_paid + FROM ip_payments + WHERE invoice_id = " . $this->db->escape($invoice_id) + ); + + $invoice_paid = $query->row()->invoice_paid ? floatval($query->row()->invoice_paid) : 0; + + // Create the database array and insert or update + $db_array = array( + 'invoice_id' => $invoice_id, + 'invoice_item_subtotal' => $invoice_item_subtotal, + 'invoice_item_tax_total' => $invoice_amounts->invoice_item_tax_total, + 'invoice_total' => $invoice_total, + 'invoice_paid' => $invoice_paid, + 'invoice_balance' => $invoice_total - $invoice_paid + ); + + $this->db->where('invoice_id', $invoice_id); + + if ($this->db->get('ip_invoice_amounts')->num_rows()) { + // The record already exists; update it + $this->db->where('invoice_id', $invoice_id); + $this->db->update('ip_invoice_amounts', $db_array); + } else { + // The record does not yet exist; insert it + $this->db->insert('ip_invoice_amounts', $db_array); + } + + // Calculate the invoice taxes + $this->calculate_invoice_taxes($invoice_id); + + // Get invoice status + $this->load->model('invoices/mdl_invoices'); + $invoice = $this->mdl_invoices->get_by_id($invoice_id); + $invoice_is_credit = ($invoice->creditinvoice_parent_id > 0 ? true : false); + + // Set to paid if balance is zero + if ($invoice->invoice_balance == 0) { + // Check if the invoice total is not zero or negative + if ($invoice->invoice_total != 0 || $invoice_is_credit) { + $this->db->where('invoice_id', $invoice_id); + $payment = $this->db->get('ip_payments')->row(); + $payment_method_id = ($payment->payment_method_id ? $payment->payment_method_id : 0); + + $this->db->where('invoice_id', $invoice_id); + $this->db->set('invoice_status_id', 4); + $this->db->set('payment_method', $payment_method_id); + $this->db->update('ip_invoices'); + + // Set to read-only if applicable + if ( + $this->config->item('disable_read_only') == false + && $invoice->invoice_status_id == get_setting('read_only_toggle') + ) { + $this->db->where('invoice_id', $invoice_id); + $this->db->set('is_read_only', 1); + $this->db->update('ip_invoices'); + } + } + } + } + + /** + * @param $invoice_id + * @param $invoice_total + * @return float + */ + public function calculate_discount($invoice_id, $invoice_total) + { + $this->db->where('invoice_id', $invoice_id); + $invoice_data = $this->db->get('ip_invoices')->row(); + + $total = (float)number_format($invoice_total, 2, '.', ''); + $discount_amount = (float)number_format($invoice_data->invoice_discount_amount, 2, '.', ''); + $discount_percent = (float)number_format($invoice_data->invoice_discount_percent, 2, '.', ''); + + $total = $total - $discount_amount; + $total = $total - round(($total / 100 * $discount_percent), 2); + + return $total; + } + + /** + * @param $invoice_id + */ + public function calculate_invoice_taxes($invoice_id) + { + // First check to see if there are any invoice taxes applied + $this->load->model('invoices/mdl_invoice_tax_rates'); + $invoice_tax_rates = $this->mdl_invoice_tax_rates->where('invoice_id', $invoice_id)->get()->result(); + + if ($invoice_tax_rates) { + // There are invoice taxes applied + // Get the current invoice amount record + $invoice_amount = $this->db->where('invoice_id', $invoice_id)->get('ip_invoice_amounts')->row(); + + // Loop through the invoice taxes and update the amount for each of the applied invoice taxes + foreach ($invoice_tax_rates as $invoice_tax_rate) { + if ($invoice_tax_rate->include_item_tax) { + // The invoice tax rate should include the applied item tax + $invoice_tax_rate_amount = ($invoice_amount->invoice_item_subtotal + $invoice_amount->invoice_item_tax_total) * ($invoice_tax_rate->invoice_tax_rate_percent / 100); + } else { + // The invoice tax rate should not include the applied item tax + $invoice_tax_rate_amount = $invoice_amount->invoice_item_subtotal * ($invoice_tax_rate->invoice_tax_rate_percent / 100); + } + + // Update the invoice tax rate record + $db_array = array( + 'invoice_tax_rate_amount' => $invoice_tax_rate_amount + ); + $this->db->where('invoice_tax_rate_id', $invoice_tax_rate->invoice_tax_rate_id); + $this->db->update('ip_invoice_tax_rates', $db_array); + } + + // Update the invoice amount record with the total invoice tax amount + $this->db->query(" + UPDATE ip_invoice_amounts + SET invoice_tax_total = ( + SELECT SUM(invoice_tax_rate_amount) + FROM ip_invoice_tax_rates + WHERE invoice_id = " . $this->db->escape($invoice_id) . ") + WHERE invoice_id = " . $this->db->escape($invoice_id)); + + // Get the updated invoice amount record + $invoice_amount = $this->db->where('invoice_id', $invoice_id)->get('ip_invoice_amounts')->row(); + + // Recalculate the invoice total and balance + $invoice_total = $invoice_amount->invoice_item_subtotal + $invoice_amount->invoice_item_tax_total + $invoice_amount->invoice_tax_total; + $invoice_total = $this->calculate_discount($invoice_id, $invoice_total); + $invoice_balance = $invoice_total - $invoice_amount->invoice_paid; + + // Update the invoice amount record + $db_array = array( + 'invoice_total' => $invoice_total, + 'invoice_balance' => $invoice_balance + ); + + $this->db->where('invoice_id', $invoice_id); + $this->db->update('ip_invoice_amounts', $db_array); + } else { + // No invoice taxes applied + + $db_array = array( + 'invoice_tax_total' => '0.00' + ); + + $this->db->where('invoice_id', $invoice_id); + $this->db->update('ip_invoice_amounts', $db_array); + } + } + + /** + * @param null $period + * @return mixed + */ + public function get_total_invoiced($period = null) + { + switch ($period) { + case 'month': + return $this->db->query(" + SELECT SUM(invoice_total) AS total_invoiced + FROM ip_invoice_amounts + WHERE invoice_id IN + (SELECT invoice_id FROM ip_invoices + WHERE MONTH(invoice_date_created) = MONTH(NOW()) + AND YEAR(invoice_date_created) = YEAR(NOW()))")->row()->total_invoiced; + case 'last_month': + return $this->db->query(" + SELECT SUM(invoice_total) AS total_invoiced + FROM ip_invoice_amounts + WHERE invoice_id IN + (SELECT invoice_id FROM ip_invoices + WHERE MONTH(invoice_date_created) = MONTH(NOW() - INTERVAL 1 MONTH) + AND YEAR(invoice_date_created) = YEAR(NOW() - INTERVAL 1 MONTH))")->row()->total_invoiced; + case 'year': + return $this->db->query(" + SELECT SUM(invoice_total) AS total_invoiced + FROM ip_invoice_amounts + WHERE invoice_id IN + (SELECT invoice_id FROM ip_invoices WHERE YEAR(invoice_date_created) = YEAR(NOW()))")->row()->total_invoiced; + case 'last_year': + return $this->db->query(" + SELECT SUM(invoice_total) AS total_invoiced + FROM ip_invoice_amounts + WHERE invoice_id IN + (SELECT invoice_id FROM ip_invoices WHERE YEAR(invoice_date_created) = YEAR(NOW() - INTERVAL 1 YEAR))")->row()->total_invoiced; + default: + return $this->db->query("SELECT SUM(invoice_total) AS total_invoiced FROM ip_invoice_amounts")->row()->total_invoiced; + } + } + + /** + * @param null $period + * @return mixed + */ + public function get_total_paid($period = null) + { + switch ($period) { + case 'month': + return $this->db->query(" + SELECT SUM(invoice_paid) AS total_paid + FROM ip_invoice_amounts + WHERE invoice_id IN + (SELECT invoice_id FROM ip_invoices + WHERE MONTH(invoice_date_created) = MONTH(NOW()) + AND YEAR(invoice_date_created) = YEAR(NOW()))")->row()->total_paid; + case 'last_month': + return $this->db->query("SELECT SUM(invoice_paid) AS total_paid + FROM ip_invoice_amounts + WHERE invoice_id IN + (SELECT invoice_id FROM ip_invoices + WHERE MONTH(invoice_date_created) = MONTH(NOW() - INTERVAL 1 MONTH) + AND YEAR(invoice_date_created) = YEAR(NOW() - INTERVAL 1 MONTH))")->row()->total_paid; + case 'year': + return $this->db->query("SELECT SUM(invoice_paid) AS total_paid + FROM ip_invoice_amounts + WHERE invoice_id IN + (SELECT invoice_id FROM ip_invoices WHERE YEAR(invoice_date_created) = YEAR(NOW()))")->row()->total_paid; + case 'last_year': + return $this->db->query("SELECT SUM(invoice_paid) AS total_paid + FROM ip_invoice_amounts + WHERE invoice_id IN + (SELECT invoice_id FROM ip_invoices WHERE YEAR(invoice_date_created) = YEAR(NOW() - INTERVAL 1 YEAR))")->row()->total_paid; + default: + return $this->db->query("SELECT SUM(invoice_paid) AS total_paid FROM ip_invoice_amounts")->row()->total_paid; + } + } + + /** + * @param null $period + * @return mixed + */ + public function get_total_balance($period = null) + { + switch ($period) { + case 'month': + return $this->db->query("SELECT SUM(invoice_balance) AS total_balance + FROM ip_invoice_amounts + WHERE invoice_id IN + (SELECT invoice_id FROM ip_invoices + WHERE MONTH(invoice_date_created) = MONTH(NOW()) + AND YEAR(invoice_date_created) = YEAR(NOW()))")->row()->total_balance; + case 'last_month': + return $this->db->query("SELECT SUM(invoice_balance) AS total_balance + FROM ip_invoice_amounts + WHERE invoice_id IN + (SELECT invoice_id FROM ip_invoices + WHERE MONTH(invoice_date_created) = MONTH(NOW() - INTERVAL 1 MONTH) + AND YEAR(invoice_date_created) = YEAR(NOW() - INTERVAL 1 MONTH))")->row()->total_balance; + case 'year': + return $this->db->query("SELECT SUM(invoice_balance) AS total_balance + FROM ip_invoice_amounts + WHERE invoice_id IN + (SELECT invoice_id FROM ip_invoices WHERE YEAR(invoice_date_created) = YEAR(NOW()))")->row()->total_balance; + case 'last_year': + return $this->db->query("SELECT SUM(invoice_balance) AS total_balance + FROM ip_invoice_amounts + WHERE invoice_id IN + (SELECT invoice_id FROM ip_invoices WHERE YEAR(invoice_date_created) = (YEAR(NOW() - INTERVAL 1 YEAR)))")->row()->total_balance; + default: + return $this->db->query("SELECT SUM(invoice_balance) AS total_balance FROM ip_invoice_amounts")->row()->total_balance; + } + } + + /** + * @param string $period + * @return array + */ + public function get_status_totals($period = '') + { + switch ($period) { + default: + case 'this-month': + $results = $this->db->query(" + SELECT ip_invoices.invoice_status_id, (CASE ip_invoices.invoice_status_id WHEN 4 THEN SUM(ip_invoice_amounts.invoice_paid) ELSE SUM(ip_invoice_amounts.invoice_balance) END) AS sum_total, COUNT(*) AS num_total + FROM ip_invoice_amounts + JOIN ip_invoices ON ip_invoices.invoice_id = ip_invoice_amounts.invoice_id + AND MONTH(ip_invoices.invoice_date_created) = MONTH(NOW()) + AND YEAR(ip_invoices.invoice_date_created) = YEAR(NOW()) + GROUP BY ip_invoices.invoice_status_id")->result_array(); + break; + case 'last-month': + $results = $this->db->query(" + SELECT invoice_status_id, (CASE ip_invoices.invoice_status_id WHEN 4 THEN SUM(invoice_paid) ELSE SUM(invoice_balance) END) AS sum_total, COUNT(*) AS num_total + FROM ip_invoice_amounts + JOIN ip_invoices ON ip_invoices.invoice_id = ip_invoice_amounts.invoice_id + AND MONTH(ip_invoices.invoice_date_created) = MONTH(NOW() - INTERVAL 1 MONTH) + AND YEAR(ip_invoices.invoice_date_created) = YEAR(NOW()) + GROUP BY ip_invoices.invoice_status_id")->result_array(); + break; + case 'this-quarter': + $results = $this->db->query(" + SELECT invoice_status_id, (CASE ip_invoices.invoice_status_id WHEN 4 THEN SUM(ip_invoice_amounts.invoice_paid) ELSE SUM(ip_invoice_amounts.invoice_balance) END) AS sum_total, COUNT(*) AS num_total + FROM ip_invoice_amounts + JOIN ip_invoices ON ip_invoices.invoice_id = ip_invoice_amounts.invoice_id + AND QUARTER(ip_invoices.invoice_date_created) = QUARTER(NOW()) + AND YEAR(ip_invoices.invoice_date_created) = YEAR(NOW()) + GROUP BY ip_invoices.invoice_status_id")->result_array(); + break; + case 'last-quarter': + $results = $this->db->query(" + SELECT invoice_status_id, (CASE ip_invoices.invoice_status_id WHEN 4 THEN SUM(invoice_paid) ELSE SUM(invoice_balance) END) AS sum_total, COUNT(*) AS num_total + FROM ip_invoice_amounts + JOIN ip_invoices ON ip_invoices.invoice_id = ip_invoice_amounts.invoice_id + AND QUARTER(ip_invoices.invoice_date_created) = QUARTER(NOW() - INTERVAL 1 QUARTER) + AND YEAR(ip_invoices.invoice_date_created) = YEAR(NOW()) + GROUP BY ip_invoices.invoice_status_id")->result_array(); + break; + case 'this-year': + $results = $this->db->query(" + SELECT invoice_status_id, (CASE ip_invoices.invoice_status_id WHEN 4 THEN SUM(ip_invoice_amounts.invoice_paid) ELSE SUM(ip_invoice_amounts.invoice_balance) END) AS sum_total, COUNT(*) AS num_total + FROM ip_invoice_amounts + JOIN ip_invoices ON ip_invoices.invoice_id = ip_invoice_amounts.invoice_id + AND YEAR(ip_invoices.invoice_date_created) = YEAR(NOW()) + GROUP BY ip_invoices.invoice_status_id")->result_array(); + break; + case 'last-year': + $results = $this->db->query(" + SELECT invoice_status_id, (CASE ip_invoices.invoice_status_id WHEN 4 THEN SUM(invoice_paid) ELSE SUM(invoice_balance) END) AS sum_total, COUNT(*) AS num_total + FROM ip_invoice_amounts + JOIN ip_invoices ON ip_invoices.invoice_id = ip_invoice_amounts.invoice_id + AND YEAR(ip_invoices.invoice_date_created) = YEAR(NOW() - INTERVAL 1 YEAR) + GROUP BY ip_invoices.invoice_status_id")->result_array(); + break; + } + + $return = array(); + + foreach ($this->mdl_invoices->statuses() as $key => $status) { + $return[$key] = array( + 'invoice_status_id' => $key, + 'class' => $status['class'], + 'label' => $status['label'], + 'href' => $status['href'], + 'sum_total' => 0, + 'num_total' => 0 + ); + } + + foreach ($results as $result) { + $return[$result['invoice_status_id']] = array_merge($return[$result['invoice_status_id']], $result); + } + + return $return; + } + +} diff --git a/application/modules/invoices/models/Mdl_invoice_sumex.php b/application/modules/invoices/models/Mdl_invoice_sumex.php new file mode 100644 index 0000000..64ad0a6 --- /dev/null +++ b/application/modules/invoices/models/Mdl_invoice_sumex.php @@ -0,0 +1,83 @@ +db->select('ip_invoice_sumex.*'); + } + + /** + * @param null $id + * @param null $db_array + * @return void + */ + public function save($id = null, $db_array = null) + { + $id = $this->where('sumex_invoice', $id)->get()->row()->sumex_id; + parent::save($id, $db_array); + } + + /** + * @return array + */ + public function validation_rules() + { + return array( + 'sumex_invoice' => array( + 'field' => 'sumex_invoice', + 'label' => trans('invoice'), + 'rules' => 'required' + ), + 'sumex_reason' => array( + 'field' => 'sumex_reason', + 'label' => trans('reason'), + 'rules' => 'required|greater_than_equal_to[0]|less_than_equal_to[5]' + ), + 'sumex_diagnosis' => array( + 'field' => 'sumex_diagnosis', + 'label' => trans('diagnosis') + ), + 'sumex_observations' => array( + 'field' => 'sumex_observations', + 'label' => trans('sumex_observations') + ), + 'sumex_treatmentstart' => array( + 'field' => 'sumex_treatmentstart', + 'label' => trans('start'), + 'rules' => 'required' + ), + 'sumex_treatmentend' => array( + 'field' => 'sumex_treatmentend', + 'label' => trans('end'), + 'rules' => 'required' + ), + 'sumex_casedate' => array( + 'field' => 'sumex_casedate', + 'label' => trans('case_date'), + 'rules' => 'required' + ), + 'sumex_casenumber' => array( + 'field' => 'sumex_casenumber', + 'label' => trans('case_number') + ) + ); + } + +} diff --git a/application/modules/invoices/models/Mdl_invoice_tax_rates.php b/application/modules/invoices/models/Mdl_invoice_tax_rates.php new file mode 100644 index 0000000..d58c0c3 --- /dev/null +++ b/application/modules/invoices/models/Mdl_invoice_tax_rates.php @@ -0,0 +1,75 @@ +db->select('ip_tax_rates.tax_rate_name AS invoice_tax_rate_name'); + $this->db->select('ip_tax_rates.tax_rate_percent AS invoice_tax_rate_percent'); + $this->db->select('ip_invoice_tax_rates.*'); + } + + public function default_join() + { + $this->db->join('ip_tax_rates', 'ip_tax_rates.tax_rate_id = ip_invoice_tax_rates.tax_rate_id'); + } + + /** + * @param null $id + * @param null $db_array + * @return void + */ + public function save($id = null, $db_array = null) + { + parent::save($id, $db_array); + + $this->load->model('invoices/mdl_invoice_amounts'); + + $invoice_id = $this->input->post('invoice_id'); + + if ($invoice_id) { + $this->mdl_invoice_amounts->calculate($invoice_id); + } + } + + /** + * @return array + */ + public function validation_rules() + { + return array( + 'invoice_id' => array( + 'field' => 'invoice_id', + 'label' => trans('invoice'), + 'rules' => 'required' + ), + 'tax_rate_id' => array( + 'field' => 'tax_rate_id', + 'label' => trans('tax_rate'), + 'rules' => 'required' + ), + 'include_item_tax' => array( + 'field' => 'include_item_tax', + 'label' => trans('tax_rate_placement'), + 'rules' => 'required' + ) + ); + } + +} diff --git a/application/modules/invoices/models/Mdl_invoices.php b/application/modules/invoices/models/Mdl_invoices.php new file mode 100644 index 0000000..e821e24 --- /dev/null +++ b/application/modules/invoices/models/Mdl_invoices.php @@ -0,0 +1,574 @@ + array( + 'label' => trans('draft'), + 'class' => 'draft', + 'href' => 'invoices/status/draft' + ), + '2' => array( + 'label' => trans('sent'), + 'class' => 'sent', + 'href' => 'invoices/status/sent' + ), + '3' => array( + 'label' => trans('viewed'), + 'class' => 'viewed', + 'href' => 'invoices/status/viewed' + ), + '4' => array( + 'label' => trans('paid'), + 'class' => 'paid', + 'href' => 'invoices/status/paid' + ) + ); + } + public function GetPaymentDays($InvID,$ClientID,$client_custom_fieldid) + { + $this->db->select('inv.client_id,client_custom_fieldid,client_custom_fieldvalue,invoice_id'); + $this->db->from('ip_client_custom clients'); + $this->db->join('ip_invoices inv', 'clients.client_id=inv.client_id'); + $this->db->where('inv.invoice_id',$InvID); + $this->db->where('client_custom_fieldid',$client_custom_fieldid); + $this->db->where('inv.client_id',$ClientID); + $query = $this->db->get(); + return $query->result(); + } + public function GetSecondaryAddress($ClientID) + { + + $subQuery = "select group_concat(client_custom_fieldvalue separator '
    ') as Secondary from ip_client_custom where + client_id =? and client_custom_fieldid in (12,45,46,47,48,50,49)"; + + $query = $this->db->query($subQuery,array($ClientID)); + + return $query->result(); + + } + + public function getSecondayAddressSelected($InvID,$client_custom_fieldid) + { + $subQuery = "select invoice_custom_fieldvalue as secondary from ip_invoice_custom where invoice_id=? and + invoice_custom_fieldid=?"; + + $query = $this->db->query($subQuery,array($InvID,$client_custom_fieldid)); + + return $query->result(); + } + + public function default_select() + { + $this->db->select(" + SQL_CALC_FOUND_ROWS + ip_quotes.*, + ip_users.user_name, + ip_users.user_company, + ip_users.user_address_1, + ip_users.user_address_2, + ip_users.user_city, + ip_users.user_state, + ip_users.user_zip, + ip_users.user_country, + ip_users.user_phone, + ip_users.user_fax, + ip_users.user_mobile, + ip_users.user_email, + ip_users.user_web, + ip_users.user_vat_id, + ip_users.user_tax_code, + ip_users.user_subscribernumber, + ip_users.user_iban, + ip_users.user_gln, + ip_users.user_rcc, + ip_clients.*, + ip_invoice_sumex.*, + ip_invoice_amounts.invoice_amount_id, + IFnull(ip_invoice_amounts.invoice_item_subtotal, '0.00') AS invoice_item_subtotal, + IFnull(ip_invoice_amounts.invoice_item_tax_total, '0.00') AS invoice_item_tax_total, + IFnull(ip_invoice_amounts.invoice_tax_total, '0.00') AS invoice_tax_total, + IFnull(ip_invoice_amounts.invoice_total, '0.00') AS invoice_total, + IFnull(ip_invoice_amounts.invoice_paid, '0.00') AS invoice_paid, + IFnull(ip_invoice_amounts.invoice_balance, '0.00') AS invoice_balance, + ip_invoice_amounts.invoice_sign AS invoice_sign, + (CASE WHEN ip_invoices.invoice_status_id NOT IN (1,4) AND DATEDIFF(NOW(), invoice_date_due) > 0 THEN 1 ELSE 0 END) is_overdue, + DATEDIFF(NOW(), invoice_date_due) AS days_overdue, + (CASE (SELECT COUNT(*) FROM ip_invoices_recurring WHERE ip_invoices_recurring.invoice_id = ip_invoices.invoice_id and ip_invoices_recurring.recur_next_date <> '0000-00-00') WHEN 0 THEN 0 ELSE 1 END) AS invoice_is_recurring, + ip_invoices.*", false); + } + + public function default_order_by() + { + $this->db->order_by('ip_invoices.invoice_id DESC'); + } + + public function default_join() + { + $this->db->join('ip_clients', 'ip_clients.client_id = ip_invoices.client_id'); + $this->db->join('ip_users', 'ip_users.user_id = ip_invoices.user_id'); + $this->db->join('ip_invoice_amounts', 'ip_invoice_amounts.invoice_id = ip_invoices.invoice_id', 'left'); + $this->db->join('ip_invoice_sumex', 'sumex_invoice = ip_invoices.invoice_id', 'left'); + $this->db->join('ip_quotes', 'ip_quotes.invoice_id = ip_invoices.invoice_id', 'left'); + $this->db->join('ip_payments', 'ip_payments.invoice_id = ip_invoices.invoice_id', 'left'); + } + + /** + * @return array + */ + public function validation_rules() + { + return array( + 'client_id' => array( + 'field' => 'client_id', + 'label' => trans('client'), + 'rules' => 'required' + ), + 'invoice_date_created' => array( + 'field' => 'invoice_date_created', + 'label' => trans('invoice_date'), + 'rules' => 'required' + ), + 'invoice_time_created' => array( + 'rules' => 'required' + ), + 'invoice_group_id' => array( + 'field' => 'invoice_group_id', + 'label' => trans('invoice_group'), + 'rules' => 'required' + ), + 'invoice_password' => array( + 'field' => 'invoice_password', + 'label' => trans('invoice_password') + ), + 'user_id' => array( + 'field' => 'user_id', + 'label' => trans('user'), + 'rule' => 'required' + ), + 'payment_method' => array( + 'field' => 'payment_method', + 'label' => trans('payment_method') + ), + ); + } + + /** + * @return array + */ + public function validation_rules_save_invoice() + { + return array( + 'invoice_number' => array( + 'field' => 'invoice_number', + 'label' => trans('invoice') . ' #', + 'rules' => 'is_unique[ip_invoices.invoice_number' . (($this->id) ? '.invoice_id.' . $this->id : '') . ']' + ), + 'invoice_date_created' => array( + 'field' => 'invoice_date_created', + 'label' => trans('date'), + 'rules' => 'required' + ), + 'invoice_date_due' => array( + 'field' => 'invoice_date_due', + 'label' => trans('due_date'), + 'rules' => 'required' + ), + 'invoice_time_created' => array( + 'rules' => 'required' + ), + 'invoice_password' => array( + 'field' => 'invoice_password', + 'label' => trans('invoice_password') + ) + ); + } + + /** + * @param null $db_array + * @param bool $include_invoice_tax_rates + * @return int|null + */ + public function create($db_array = null, $include_invoice_tax_rates = true) + { + + $invoice_id = parent::save(null, $db_array); + + $inv = $this->where('ip_invoices.invoice_id', $invoice_id)->get()->row(); + $invoice_group = $inv->invoice_group_id; + + // Create an invoice amount record + $db_array = array( + 'invoice_id' => $invoice_id + ); + + $this->db->insert('ip_invoice_amounts', $db_array); + + if ($include_invoice_tax_rates) { + // Create the default invoice tax record if applicable + if (get_setting('default_invoice_tax_rate')) { + $db_array = array( + 'invoice_id' => $invoice_id, + 'tax_rate_id' => get_setting('default_invoice_tax_rate'), + 'include_item_tax' => get_setting('default_include_item_tax', 0), + 'invoice_tax_rate_amount' => 0 + ); + + $this->db->insert('ip_invoice_tax_rates', $db_array); + } + } + $invgroup = $this->mdl_invoice_groups->where('invoice_group_id', $invoice_group)->get()->row(); + if (preg_match("/sumex/i", $invgroup->invoice_group_name)) { + // If the Invoice Group includes "Sumex", make the invoice a Sumex one + $db_array = array( + 'sumex_invoice' => $invoice_id + ); + $this->db->insert('ip_invoice_sumex', $db_array); + } + + return $invoice_id; + } + + /** + * Copies invoice items, tax rates, etc from source to target + * @param int $source_id + * @param int $target_id + */ + public function copy_invoice($source_id, $target_id) + { + $this->load->model('invoices/mdl_items'); + + $invoice_items = $this->mdl_items->where('invoice_id', $source_id)->get()->result(); + + foreach ($invoice_items as $invoice_item) { + $db_array = array( + 'invoice_id' => $target_id, + 'item_tax_rate_id' => $invoice_item->item_tax_rate_id, + 'item_name' => $invoice_item->item_name, + 'item_description' => $invoice_item->item_description, + 'item_quantity' => $invoice_item->item_quantity, + 'item_price' => $invoice_item->item_price, + 'item_order' => $invoice_item->item_order + ); + + $this->mdl_items->save(null, $db_array); + } + + $invoice_tax_rates = $this->mdl_invoice_tax_rates->where('invoice_id', $source_id)->get()->result(); + + foreach ($invoice_tax_rates as $invoice_tax_rate) { + $db_array = array( + 'invoice_id' => $target_id, + 'tax_rate_id' => $invoice_tax_rate->tax_rate_id, + 'include_item_tax' => $invoice_tax_rate->include_item_tax, + 'invoice_tax_rate_amount' => $invoice_tax_rate->invoice_tax_rate_amount + ); + + $this->mdl_invoice_tax_rates->save(null, $db_array); + } + + // Copy the custom fields + $this->load->model('custom_fields/mdl_invoice_custom'); + $db_array = $this->mdl_invoice_custom->where('invoice_id', $source_id)->get()->row_array(); + + if (count($db_array) > 2) { + unset($db_array['invoice_custom_id']); + $db_array['invoice_id'] = $target_id; + $this->mdl_invoice_custom->save_custom($target_id, $db_array); + } + } + + /** + * Copies invoice items, tax rates, etc from source to target + * @param int $source_id + * @param int $target_id + */ + public function copy_credit_invoice($source_id, $target_id) + { + $this->load->model('invoices/mdl_items'); + + $invoice_items = $this->mdl_items->where('invoice_id', $source_id)->get()->result(); + + foreach ($invoice_items as $invoice_item) { + $db_array = array( + 'invoice_id' => $target_id, + 'item_tax_rate_id' => $invoice_item->item_tax_rate_id, + 'item_name' => $invoice_item->item_name, + 'item_description' => $invoice_item->item_description, + 'item_quantity' => -$invoice_item->item_quantity, + 'item_price' => $invoice_item->item_price, + 'item_order' => $invoice_item->item_order + ); + + $this->mdl_items->save(null, $db_array); + } + + $invoice_tax_rates = $this->mdl_invoice_tax_rates->where('invoice_id', $source_id)->get()->result(); + + foreach ($invoice_tax_rates as $invoice_tax_rate) { + $db_array = array( + 'invoice_id' => $target_id, + 'tax_rate_id' => $invoice_tax_rate->tax_rate_id, + 'include_item_tax' => $invoice_tax_rate->include_item_tax, + 'invoice_tax_rate_amount' => -$invoice_tax_rate->invoice_tax_rate_amount + ); + + $this->mdl_invoice_tax_rates->save(null, $db_array); + } + + // Copy the custom fields + $this->load->model('custom_fields/mdl_invoice_custom'); + $db_array = $this->mdl_invoice_custom->where('invoice_id', $source_id)->get()->row_array(); + + if (count($db_array) > 2) { + unset($db_array['invoice_custom_id']); + $db_array['invoice_id'] = $target_id; + $this->mdl_invoice_custom->save_custom($target_id, $db_array); + } + } + + /** + * @return array + */ + public function db_array() + { + $db_array = parent::db_array(); + + // Get the client id for the submitted invoice + $this->load->model('clients/mdl_clients'); + + // Check if is SUMEX + $this->load->model('invoice_groups/mdl_invoice_groups'); + + $db_array['invoice_date_created'] = date_to_mysql($db_array['invoice_date_created']); + $db_array['invoice_date_due'] = $this->get_date_due($db_array['invoice_date_created']); + $db_array['invoice_terms'] = get_setting('default_invoice_terms'); + + if (!isset($db_array['invoice_status_id'])) { + $db_array['invoice_status_id'] = 1; + } + + $generate_invoice_number = get_setting('generate_invoice_number_for_draft'); + + if ($db_array['invoice_status_id'] === 1 && $generate_invoice_number == 1) { + $db_array['invoice_number'] = $this->get_invoice_number($db_array['invoice_group_id']); + } elseif ($db_array['invoice_status_id'] != 1) { + $db_array['invoice_number'] = $this->get_invoice_number($db_array['invoice_group_id']); + } else { + $db_array['invoice_number'] = ''; + } + + // Set default values + $db_array['payment_method'] = (empty($db_array['payment_method']) ? 0 : $db_array['payment_method']); + + // Generate the unique url key + $db_array['invoice_url_key'] = $this->get_url_key(); + + return $db_array; + } + + /** + * @param string $invoice_date_created + * @return string + */ + public function get_date_due($invoice_date_created) + { + $invoice_date_due = new DateTime($invoice_date_created); + $invoice_date_due->add(new DateInterval('P' . get_setting('invoices_due_after') . 'D')); + return $invoice_date_due->format('Y-m-d'); + } + + /** + * @param $invoice_group_id + * @return mixed + */ + public function get_invoice_number($invoice_group_id) + { + $this->load->model('invoice_groups/mdl_invoice_groups'); + return $this->mdl_invoice_groups->generate_invoice_number($invoice_group_id); + } + + /** + * @return string + */ + public function get_url_key() + { + $this->load->helper('string'); + return random_string('alnum', 15); + } + + /** + * @param $invoice_id + * @return mixed + */ + public function get_invoice_group_id($invoice_id) + { + $invoice = $this->get_by_id($invoice_id); + return $invoice->invoice_group_id; + } + + /** + * @param int $parent_invoice_id + * @return mixed + */ + public function get_parent_invoice_number($parent_invoice_id) + { + $parent_invoice = $this->get_by_id($parent_invoice_id); + return $parent_invoice->invoice_number; + } + + /** + * @return mixed + */ + public function get_custom_values($id) + { + $this->load->module('custom_fields/Mdl_invoice_custom'); + return $this->invoice_custom->get_by_invid($id); + } + + + /** + * @param int $invoice_id + */ + public function delete($invoice_id) + { + parent::delete($invoice_id); + + $this->load->helper('orphan'); + delete_orphans(); + } + + // Used from the guest module, excludes draft and paid + public function is_open() + { + $this->filter_where_in('invoice_status_id', array(2, 3)); + return $this; + } + + // Used to check if the invoice is Sumex + public function is_sumex() + { + $this->where('sumex_id is NOT NULL', null, FALSE); + return $this; + } + + public function guest_visible() + { + $this->filter_where_in('invoice_status_id', array(2, 3, 4)); + return $this; + } + + public function is_draft() + { + $this->filter_where('invoice_status_id', 1); + return $this; + } + + public function is_sent() + { + $this->filter_where('invoice_status_id', 2); + return $this; + } + + public function is_viewed() + { + $this->filter_where('invoice_status_id', 3); + return $this; + } + + public function is_paid() + { + $this->filter_where('invoice_status_id', 4); + return $this; + } + + public function is_overdue() + { + $this->filter_having('is_overdue', 1); + return $this; + } + + public function by_client($client_id) + { + $this->filter_where('ip_invoices.client_id', $client_id); + return $this; + } + + /** + * @param $invoice_id + */ + public function mark_viewed($invoice_id) + { + $invoice = $this->get_by_id($invoice_id); + + if (!empty($invoice)) { + if ($invoice->invoice_status_id == 2) { + $this->db->where('invoice_id', $invoice_id); + $this->db->where('invoice_id', $invoice_id); + $this->db->set('invoice_status_id', 3); + $this->db->update('ip_invoices'); + } + + // Set the invoice to read-only if feature is not disabled and setting is view + if ($this->config->item('disable_read_only') == false && get_setting('read_only_toggle') == 3) { + $this->db->where('invoice_id', $invoice_id); + $this->db->set('is_read_only', 1); + $this->db->update('ip_invoices'); + } + } + } + + /** + * @param $invoice_id + */ + public function mark_sent($invoice_id) + { + $invoice = $this->mdl_invoices->get_by_id($invoice_id); + if (!empty($invoice)) { + if ($invoice->invoice_status_id == 1) { + // Generate new invoice number if applicable + if (get_setting('generate_invoice_number_for_draft') == 0) { + $invoice_number = $this->mdl_invoices->get_invoice_number($invoice->invoice_group_id); + } else { + $invoice_number = $invoice->invoice_number; + } + + // Set new date and save + $this->db->where('invoice_id', $invoice_id); + $this->db->set('invoice_status_id', 2); + $this->db->set('invoice_number', $invoice_number); + $this->db->update('ip_invoices'); + } + + // Set the invoice to read-only if feature is not disabled and setting is sent + if ($this->config->item('disable_read_only') == false && get_setting('read_only_toggle') == 2) { + $this->db->where('invoice_id', $invoice_id); + $this->db->set('is_read_only', 1); + $this->db->update('ip_invoices'); + } + } + } + +} diff --git a/application/modules/invoices/models/Mdl_invoices_recurring.php b/application/modules/invoices/models/Mdl_invoices_recurring.php new file mode 100644 index 0000000..5a1c516 --- /dev/null +++ b/application/modules/invoices/models/Mdl_invoices_recurring.php @@ -0,0 +1,135 @@ + 'calendar_week_1', + '14D' => 'calendar_week_2', + '21D' => 'calendar_week_3', + '28D' => 'calendar_week_4', + '1M' => 'calendar_month_1', + '2M' => 'calendar_month_2', + '3M' => 'calendar_month_3', + '4M' => 'calendar_month_4', + '5M' => 'calendar_month_5', + '6M' => 'calendar_month_6', + '1Y' => 'calendar_year_1', + ); + + public function default_select() + { + $this->db->select("SQL_CALC_FOUND_ROWS ip_invoices.*, + ip_clients.client_name, + ip_invoices_recurring.*, + IF(recur_end_date > date(NOW()) OR recur_end_date = '0000-00-00', 'active', 'inactive') AS recur_status", false); + } + + public function default_join() + { + $this->db->join('ip_invoices', 'ip_invoices.invoice_id = ip_invoices_recurring.invoice_id'); + $this->db->join('ip_clients', 'ip_clients.client_id = ip_invoices.client_id'); + } + + /** + * @return array + */ + public function validation_rules() + { + return array( + 'invoice_id' => array( + 'field' => 'invoice_id', + 'rules' => 'required' + ), + 'recur_start_date' => array( + 'field' => 'recur_start_date', + 'label' => trans('start_date'), + 'rules' => 'required' + ), + 'recur_end_date' => array( + 'field' => 'recur_end_date', + 'label' => trans('end_date') + ), + 'recur_frequency' => array( + 'field' => 'recur_frequency', + 'label' => trans('every'), + 'rules' => 'required' + ), + ); + } + + /** + * @return array + */ + public function db_array() + { + $db_array = parent::db_array(); + + $db_array['recur_start_date'] = date_to_mysql($db_array['recur_start_date']); + $db_array['recur_next_date'] = $db_array['recur_start_date']; + + if ($db_array['recur_end_date']) { + $db_array['recur_end_date'] = date_to_mysql($db_array['recur_end_date']); + } else { + $db_array['recur_end_date'] = '0000-00-00'; + } + + return $db_array; + } + + /** + * @param $invoice_recurring_id + */ + public function stop($invoice_recurring_id) + { + $db_array = array( + 'recur_end_date' => date('Y-m-d'), + 'recur_next_date' => '0000-00-00' + ); + + $this->db->where('invoice_recurring_id', $invoice_recurring_id); + $this->db->update('ip_invoices_recurring', $db_array); + } + + /** + * Sets filter to only recurring invoices which should be generated now + * @return \Mdl_Invoices_Recurring + */ + public function active() + { + $this->filter_where("recur_next_date <= date(NOW()) AND (recur_end_date > date(NOW()) OR recur_end_date = '0000-00-00')"); + return $this; + } + + /** + * @param $invoice_recurring_id + */ + public function set_next_recur_date($invoice_recurring_id) + { + $invoice_recurring = $this->where('invoice_recurring_id', $invoice_recurring_id)->get()->row(); + + $recur_next_date = increment_date($invoice_recurring->recur_next_date, $invoice_recurring->recur_frequency); + + $db_array = array( + 'recur_next_date' => $recur_next_date + ); + + $this->db->where('invoice_recurring_id', $invoice_recurring_id); + $this->db->update('ip_invoices_recurring', $db_array); + } + +} diff --git a/application/modules/invoices/models/Mdl_item_amounts.php b/application/modules/invoices/models/Mdl_item_amounts.php new file mode 100644 index 0000000..fd8f20c --- /dev/null +++ b/application/modules/invoices/models/Mdl_item_amounts.php @@ -0,0 +1,55 @@ +load->model('invoices/mdl_items'); + $item = $this->mdl_items->get_by_id($item_id); + $item_subtotal = $item->item_quantity * $item->item_price; + $amount = $item->item_subtotal - $item->item_discount; + $item_tax_total = $amount * (($item->Sgst_item_tax_rate_percent + $item->Cgst_item_tax_rate_percent +$item->Igst_item_tax_rate_percent) / 100); + $item_discount_total = $item->item_discount_amount * $item->item_quantity; + $item_total = $item_subtotal + $item_tax_total - $item_discount_total; + + $db_array = array( + 'item_id' => $item_id, + 'item_subtotal' => $item_subtotal, + 'item_tax_total' => $item_tax_total, + 'item_discount' => $item_discount_total, + 'item_total' => $item_total + ); + + $this->db->where('item_id', $item_id); + if ($this->db->get('ip_invoice_item_amounts')->num_rows()) { + $this->db->where('item_id', $item_id); + $this->db->update('ip_invoice_item_amounts', $db_array); + } else { + $this->db->insert('ip_invoice_item_amounts', $db_array); + } + } + +} diff --git a/application/modules/invoices/models/Mdl_items.php b/application/modules/invoices/models/Mdl_items.php new file mode 100644 index 0000000..c2ca08a --- /dev/null +++ b/application/modules/invoices/models/Mdl_items.php @@ -0,0 +1,149 @@ +db->select('ip_invoice_item_amounts.*, ip_products.*, ip_invoice_items.*, + Sgst_item_tax_rates.tax_rate_percent AS Sgst_item_tax_rate_percent, + Sgst_item_tax_rates.tax_rate_name AS Sgst_item_tax_rate_name,(((ip_invoice_items.item_quantity * ip_invoice_items.item_price) - (ip_invoice_items.item_quantity * ip_invoice_items.item_discount_amount)) * Sgst_item_tax_rates.tax_rate_percent /100) AS Sgst_item_tax_rate_amount,Cgst_item_tax_rates.tax_rate_percent AS Cgst_item_tax_rate_percent, + Cgst_item_tax_rates.tax_rate_name AS Cgst_item_tax_rate_name,(((ip_invoice_items.item_quantity * ip_invoice_items.item_price) - (ip_invoice_items.item_quantity * ip_invoice_items.item_discount_amount)) * Cgst_item_tax_rates.tax_rate_percent /100) AS Cgst_item_tax_rate_amount,Igst_item_tax_rates.tax_rate_percent AS Igst_item_tax_rate_percent, + Igst_item_tax_rates.tax_rate_name AS Igst_item_tax_rate_name,(((ip_invoice_items.item_quantity * ip_invoice_items.item_price) - (ip_invoice_items.item_quantity * ip_invoice_items.item_discount_amount)) * Igst_item_tax_rates.tax_rate_percent /100) AS Igst_item_tax_rate_amount'); + } + + public function default_order_by() + { + $this->db->order_by('ip_invoice_items.item_order'); + } + + public function default_join() + { + $this->db->join('ip_invoice_item_amounts', 'ip_invoice_item_amounts.item_id = ip_invoice_items.item_id', 'left'); + $this->db->join('ip_tax_rates AS Sgst_item_tax_rates', 'Sgst_item_tax_rates.tax_rate_id = ip_invoice_items.Sgst_item_tax_rate_id', 'left'); + $this->db->join('ip_tax_rates AS Cgst_item_tax_rates', 'Cgst_item_tax_rates.tax_rate_id = ip_invoice_items.Cgst_item_tax_rate_id', 'left'); + $this->db->join('ip_tax_rates AS Igst_item_tax_rates', 'Igst_item_tax_rates.tax_rate_id = ip_invoice_items.Igst_item_tax_rate_id', 'left'); + $this->db->join('ip_products', 'ip_products.product_id = ip_invoice_items.item_product_id', 'left'); + } + + /** + * @return array + */ + public function validation_rules() + { + return array( + 'invoice_id' => array( + 'field' => 'invoice_id', + 'label' => trans('invoice'), + 'rules' => 'required' + ), + 'item_sku' => array( + 'field' => 'item_sku', + 'label' => trans('item_sku'), + 'rules' => 'required|unique' + ), + 'item_name' => array( + 'field' => 'item_name', + 'label' => trans('item_name'), + 'rules' => 'required' + ), + 'item_description' => array( + 'field' => 'item_description', + 'label' => trans('description') + ), + 'item_quantity' => array( + 'field' => 'item_quantity', + 'label' => trans('quantity'), + 'rules' => 'required' + ), + 'item_price' => array( + 'field' => 'item_price', + 'label' => trans('price'), + 'rules' => 'required' + ), + 'item_tax_rate_id' => array( + 'field' => 'item_tax_rate_id', + 'label' => trans('item_tax_rate') + ), + 'item_product_id' => array( + 'field' => 'item_product_id', + 'label' => trans('original_product') + ), + 'item_date' => array( + 'field' => 'item_date', + 'label' => trans('item_date') + ) + ); + } + + /** + * @param null $id + * @param null $db_array + * @return int|null + */ + public function save($id = null, $db_array = null) + { + + $id = parent::save($id, $db_array); + + $this->load->model('invoices/mdl_item_amounts'); + + $this->mdl_item_amounts->calculate($id); + + $this->load->model('invoices/mdl_invoice_amounts'); + + if (is_object($db_array) && isset($db_array->invoice_id)) { + $this->mdl_invoice_amounts->calculate($db_array->invoice_id); + } elseif (is_array($db_array) && isset($db_array['invoice_id'])) { + $this->mdl_invoice_amounts->calculate($db_array['invoice_id']); + } + + return $id; + } + + /** + * @param int $item_id + */ + public function delete($item_id) + { + // Get item: + // the invoice id is needed to recalculate invoice amounts + // and the task id to update status if the item refers a task + $query = $this->db->get_where($this->table, + array('item_id' => $item_id)); + if ($query->num_rows() == 0) { + return null; + } + + $row = $query->row(); + $invoice_id = $row->invoice_id; + + // Delete the item + parent::delete($item_id); + + // Delete the item amounts + $this->db->where('item_id', $item_id); + $this->db->delete('ip_invoice_item_amounts'); + + // Recalculate invoice amounts + $this->load->model('invoices/mdl_invoice_amounts'); + $this->mdl_invoice_amounts->calculate($invoice_id); + return $row; + } +} diff --git a/application/modules/invoices/models/Mdl_templates.php b/application/modules/invoices/models/Mdl_templates.php new file mode 100644 index 0000000..22f6307 --- /dev/null +++ b/application/modules/invoices/models/Mdl_templates.php @@ -0,0 +1,70 @@ +load->helper('directory'); + + if ($type == 'pdf') { + + $templates = directory_map(APPPATH . '/views/invoice_templates/pdf', true); + } elseif ($type == 'public') { + $templates = directory_map(APPPATH . '/views/invoice_templates/public', true); + } + + $templates = $this->remove_extension($templates); + + return $templates; + } + + /** + * @param $files + * @return mixed + */ + private function remove_extension($files) + { + foreach ($files as $key => $file) { + $files[$key] = str_replace('.php', '', $file); + } + + return $files; + } + + /** + * @param string $type + * @return array|mixed + */ + public function get_quote_templates($type = 'pdf') + { + $this->load->helper('directory'); + + if ($type == 'pdf') { + $templates = directory_map(APPPATH . '/views/quote_templates/pdf', true); + } elseif ($type == 'public') { + $templates = directory_map(APPPATH . '/views/quote_templates/public', true); + } + + $templates = $this->remove_extension($templates); + + return $templates; + } + +} diff --git a/application/modules/invoices/views/archive.php b/application/modules/invoices/views/archive.php new file mode 100644 index 0000000..d34cbf5 --- /dev/null +++ b/application/modules/invoices/views/archive.php @@ -0,0 +1,24 @@ +
    + +

    + +
    +
    +
    + + + + +
    +
    +
    + +
    + +
    + layout->load_view('invoices/partial_invoice_archive', array('invoices_archive' => $invoices_archive)); ?> +
    + + diff --git a/application/modules/invoices/views/index.php b/application/modules/invoices/views/index.php new file mode 100644 index 0000000..843a640 --- /dev/null +++ b/application/modules/invoices/views/index.php @@ -0,0 +1,93 @@ +
    + +

    + +
    + + + + +
    + +
    + uri->segment(3)), 'mdl_invoices'); ?> +
    + + + +
    + + + +
    +
    + layout->load_view('invoices/partial_invoice_table', array('invoices' => $invoices)); ?> +
    +
    diff --git a/application/modules/invoices/views/index_client.php b/application/modules/invoices/views/index_client.php new file mode 100644 index 0000000..222cbea --- /dev/null +++ b/application/modules/invoices/views/index_client.php @@ -0,0 +1,38 @@ +
    + +

    + +
    + + + +
    + +
    + +
    + +
    + +
    + +
    + +
    + + layout->load_view('invoices/partial_invoice_table', array('invoices' => $invoices)); ?> + +
    diff --git a/application/modules/invoices/views/index_recurring.php b/application/modules/invoices/views/index_recurring.php new file mode 100644 index 0000000..054d947 --- /dev/null +++ b/application/modules/invoices/views/index_recurring.php @@ -0,0 +1,89 @@ +
    +

    + +
    + +
    +
    + +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + recur_status); ?> + + + + invoice_number; ?> + + + client_id, htmlsc($invoice->client_name)); ?> + + recur_start_date); ?> + + recur_end_date); ?> + + recur_frequency]); ?> + + recur_next_date); ?> +
    + + + + +
    +
    +
    +
    + +
    diff --git a/application/modules/invoices/views/modal_add_invoice_tax.php b/application/modules/invoices/views/modal_add_invoice_tax.php new file mode 100644 index 0000000..4c1d022 --- /dev/null +++ b/application/modules/invoices/views/modal_add_invoice_tax.php @@ -0,0 +1,66 @@ + + + diff --git a/application/modules/invoices/views/modal_change_client.php b/application/modules/invoices/views/modal_change_client.php new file mode 100644 index 0000000..c2a3897 --- /dev/null +++ b/application/modules/invoices/views/modal_change_client.php @@ -0,0 +1,65 @@ + + + diff --git a/application/modules/invoices/views/modal_copy_invoice.php b/application/modules/invoices/views/modal_copy_invoice.php new file mode 100644 index 0000000..2554fa1 --- /dev/null +++ b/application/modules/invoices/views/modal_copy_invoice.php @@ -0,0 +1,129 @@ + + + diff --git a/application/modules/invoices/views/modal_create_credit.php b/application/modules/invoices/views/modal_create_credit.php new file mode 100644 index 0000000..29cbe9b --- /dev/null +++ b/application/modules/invoices/views/modal_create_credit.php @@ -0,0 +1,102 @@ + + + diff --git a/application/modules/invoices/views/modal_create_invoice.php b/application/modules/invoices/views/modal_create_invoice.php new file mode 100644 index 0000000..f274e62 --- /dev/null +++ b/application/modules/invoices/views/modal_create_invoice.php @@ -0,0 +1,113 @@ + + + diff --git a/application/modules/invoices/views/modal_create_recurring.php b/application/modules/invoices/views/modal_create_recurring.php new file mode 100644 index 0000000..42aa2be --- /dev/null +++ b/application/modules/invoices/views/modal_create_recurring.php @@ -0,0 +1,109 @@ + + + diff --git a/application/modules/invoices/views/modal_delete_invoice.php b/application/modules/invoices/views/modal_delete_invoice.php new file mode 100644 index 0000000..0125ac1 --- /dev/null +++ b/application/modules/invoices/views/modal_delete_invoice.php @@ -0,0 +1,36 @@ + + + diff --git a/application/modules/invoices/views/partial_invoice_archive.php b/application/modules/invoices/views/partial_invoice_archive.php new file mode 100644 index 0000000..2fb2c8a --- /dev/null +++ b/application/modules/invoices/views/partial_invoice_archive.php @@ -0,0 +1,31 @@ +
    + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +
    diff --git a/application/modules/invoices/views/partial_invoice_table.php b/application/modules/invoices/views/partial_invoice_table.php new file mode 100644 index 0000000..15fe829 --- /dev/null +++ b/application/modules/invoices/views/partial_invoice_table.php @@ -0,0 +1,130 @@ +
    + + + + + + + + + + + + + + + + + 3 ? $invoice_count / 2 : 9999; + foreach ($invoices as $invoice) { + // Disable read-only if not applicable + if ($this->config->item('disable_read_only') == true) { + $invoice->is_read_only = 0; + } + // Convert the dropdown menu to a dropup if invoice is after the invoice split + $dropup = $invoice_idx > $invoice_list_split ? true : false; + ?> + + + + + + + + + + + + + + + + + + + + +
    + + invoice_status_id]['label']; + if ($invoice->invoice_sign == '-1') { ?> +   + is_read_only == 1) { ?> +   + + + + + invoice_number ? $invoice->invoice_number : $invoice->invoice_id); ?> + + + invoice_date_created); ?> + + + invoice_date_due); ?> + + + + + + + invoice_total); ?> + + invoice_balance); ?> + +
    + + + + +
    +
    +
    diff --git a/application/modules/invoices/views/partial_item_table.php b/application/modules/invoices/views/partial_item_table.php new file mode 100644 index 0000000..47319f7 --- /dev/null +++ b/application/modules/invoices/views/partial_item_table.php @@ -0,0 +1,434 @@ +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + sumex_id == ""): ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + sumex_id == ""): ?> + + + + + + + + + + + + + + +
    + + is_read_only == 1) { + echo 'disabled="disabled"'; + } ?>> + + + +
    + + is_read_only == 1) { + echo 'disabled="disabled"'; + } ?>> +
    +
    +
    + + is_read_only == 1) { + echo 'disabled="disabled"'; + } ?>> +
    +
    +
    + + is_read_only == 1) { + echo 'disabled="disabled"'; + } ?>> +
    +
    +
    + + is_read_only == 1) { + echo 'disabled="disabled"'; + } ?>> +
    +
    +
    + + +
    +
    +
    + + +
    +
    +
    + + +
    +
    + is_read_only != 1): ?> + + + + +
    +
    + + +
    +
    +
    + + is_read_only == 1) { + echo 'disabled="disabled"'; + } ?>> +
    +
    +
    + + +
    +
    +
    + + item_subtotal); ?> + +
    +
    + + item_discount); ?> + +
    +
    + + item_tax_total); ?> + +
    +
    + + item_total); ?> + +
    +
    + +
    + +
    +
    +
    + is_read_only != 1) { ?> + + + + + + + + + + + +
    +
    + +

    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    invoice_item_subtotal); ?>
    invoice_item_tax_total); ?>
    + + + invoice_id . '/' . $invoice_tax_rate->invoice_tax_rate_id, ''); + echo ' ' . htmlsc($invoice_tax_rate->invoice_tax_rate_name) . ' ' . format_amount($invoice_tax_rate->invoice_tax_rate_percent); ?> + %  + + invoice_tax_rate_amount); ?> + + +
    +
    +
    + is_read_only == 1) { + echo 'disabled="disabled"'; + } ?>> +
    +
    +
    +
    +
    + is_read_only == 1) { + echo 'disabled="disabled"'; + } ?>> +
    %
    +
    +
    +
    invoice_total); ?>
    invoice_balance); ?>
    +
    + +
    \ No newline at end of file diff --git a/application/modules/invoices/views/view.php b/application/modules/invoices/views/view.php new file mode 100644 index 0000000..f8b86c0 --- /dev/null +++ b/application/modules/invoices/views/view.php @@ -0,0 +1,581 @@ +controller->view_data["custom_values"]; +$CustomVal = ''; +$Secondary = ''; +if(!empty($Duedate)) +{ + foreach ($Duedate as $Due) + { + $CustomVal = $Due->client_custom_fieldvalue; + } +} +if(!empty($GetSecondary)) +{ + foreach ($GetSecondary as $GetSec) + { + $Secondary = $GetSec->Secondary; + } +} + +?> + + + +config->item('disable_read_only') == true) { + $invoice->is_read_only = 0; +} +?> + +
    +

    + invoice_number ? '#' . $invoice->invoice_number : $invoice->invoice_id); + ?> +

    + +
    + +
    + + + + +
    + + is_read_only != 1 || $invoice->invoice_status_id != 4) { ?> + + + + +
    + +
    + invoice_is_recurring) { ?> + + + is_read_only == 1) { ?> + + + + +
    + +
    + +
    + + layout->load_view('layout/alerts'); ?> + +
    +
    + +
    +
    + +

    + + + + invoice_status_id == 1 && !$invoice->creditinvoice_parent_id) { ?> + + +

    +
    +
    + layout->load_view('clients/partial_client_address', array('client' => $invoice)); ?> +
    +
    +
    + + + +
    +
    + +
    + +
    +
    + +
    +
    +
    + +
    + + + custom_field_location != 0) { + continue; + } ?> + + + mdl_invoices, $custom_field, $cv); ?> + + +
    +
    + + + custom_field_location != 0) { + continue; + } ?> + + + mdl_invoices, $custom_field, $cv); ?> + + +
    + +
    +
    +
    + +
    +
    + + + + client_phone || $invoice->client_email) : ?> +
    + + client_phone): ?> +
    + :  + client_phone); ?> +
    + + client_email): ?> +
    + :  + client_email; ?> +
    + + +
    + +

    + +
    +
    +
    + + invoice_sign == -1) { ?> +
    +
    +   + mdl_invoices->get_parent_invoice_number($invoice->creditinvoice_parent_id); + echo anchor('/invoices/view/' . $invoice->creditinvoice_parent_id, $parent_invoice_number); + ?> +
    +
    + + +
    + +
    + + invoice_number) : ?> + value="invoice_number; ?>" + + placeholder="" + + is_read_only == 1) { + echo 'disabled="disabled"'; + } ?>> +
    + +
    + + +
    + is_read_only == 1) { + echo 'disabled="disabled"'; + } ?>> + + + +
    +
    + +
    + + +
    + is_read_only == 1) { + echo 'disabled="disabled"'; + } ?>> + + + +
    +
    + + + + custom_field_location != 1) { + continue; + } ?> + mdl_invoices, $custom_field, $cv); ?> + + +
    + +
    + +
    + + +
    + +
    + + +
    + +
    + + is_read_only == 1) { + echo 'disabled="disabled"'; + } ?>> +
    +
    + + invoice_status_id != 1) { ?> +
    +
    + +
    + + + + +
    +
    +
    + + +
    +
    +
    + +
    + +
    + + layout->load_view('invoices/partial_item_table'); ?> + +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +

    + +
    +
    + + layout->load_view('upload/dropzone-invoice-html'); ?> + +
    +
    + + +
    + +
    +
    + +layout->load_view('upload/dropzone-invoice-scripts'); ?> + diff --git a/application/modules/invoices/views/view_sumex.php b/application/modules/invoices/views/view_sumex.php new file mode 100644 index 0000000..95144e0 --- /dev/null +++ b/application/modules/invoices/views/view_sumex.php @@ -0,0 +1,752 @@ +controller->view_data["custom_values"]; +?> + + +config->item('disable_read_only') == true) { + $invoice->is_read_only = 0; +} +?> + +
    +

    + invoice_number ? '#' . $invoice->invoice_number : $invoice->invoice_id); + ?> +

    + +
    + +
    + + + + +
    + + is_read_only != 1 || $invoice->invoice_status_id != 4) { ?> + + + + +
    + +
    + invoice_is_recurring) { ?> + + + is_read_only == 1) { ?> + + + + +
    + +
    + +
    + layout->load_view('layout/alerts'); ?> +
    +
    +
    +
    +
    +

    + + invoice_status_id == 1) { ?> + + +


    + + client_address_1) ? $invoice->client_address_1 . '
    ' : ''; ?> + client_address_2) ? $invoice->client_address_2 . '
    ' : ''; ?> + client_city) ? $invoice->client_city : ''; ?> + client_state) ? $invoice->client_state : ''; ?> + client_zip) ? $invoice->client_zip : ''; ?> + client_country) ? '
    ' . $invoice->client_country : ''; ?> +
    +

    + client_phone): ?> + + : + client_phone; ?> + +
    + + client_email): ?> + + : + client_email; ?> + + +

    + ' . trans('birthdate') . ': ' . format_date($invoice->client_birthdate); ?> +
    + ' . trans('gender') . ': ' . format_gender($invoice->client_gender); ?> +
    +
    +

    +
    +
    + + + + + + + + + + + + + + + + + + + +
    +
    + + +
    +
    +
    + + +
    +
    +
    + + +
    +
    +
    + + +
    +
    +
    + + +
    +
    +
    + + +
    +
    +
    +
    +
    + +
    + +
    + +
    + + invoice_sign == -1) { ?> +
    + +   + creditinvoice_parent_id, + $invoice->creditinvoice_parent_id) ?> + +
    + + +
    + +
    + + +
    + +
    + + invoice_number) : ?> + value="invoice_number; ?>" + + placeholder="" + + is_read_only == 1) { + echo 'disabled="disabled"'; + } ?>> +
    + +
    + + +
    + is_read_only == 1) { + echo 'disabled="disabled"'; + } ?>> + + + +
    +
    + +
    + + +
    + is_read_only == 1) { + echo 'disabled="disabled"'; + } ?>> + + + +
    +
    + + + + custom_field_location != 1) { + continue; + } ?> + mdl_invoices, $custom_field, $cv); ?> + +
    +
    +
    +
    + +
    + + layout->load_view('invoices/partial_item_table'); ?> + +
    + +
    +
    + + + + +
    + +
    + + +
    + + + + + + + +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    + +
    +
    + +
    + +
    +
    +

    + +
    +
    +

    + +
    +
    +
    +
    +
    + + is_read_only != 1) { ?> + + +
    +
    +
    +
    + +
    +
    +
    + + + controller->view_data["custom_values"]; ?> +
    +
    +
    + +
    + + + custom_field_location != 0) { + continue; + } ?> + + + mdl_invoices, $custom_field, $cv); ?> + + +
    + +
    + + + custom_field_location != 0) { + continue; + } ?> + + + mdl_invoices, $custom_field, $cv); ?> + + +
    +
    +
    +
    + + + + invoice_status_id != 1) { ?> +

    + : + invoice_url_key)); ?> +

    + + +
    + +
    + +
    + diff --git a/application/modules/layout/controllers/Layout.php b/application/modules/layout/controllers/Layout.php new file mode 100644 index 0000000..08df58d --- /dev/null +++ b/application/modules/layout/controllers/Layout.php @@ -0,0 +1,84 @@ +view_data); + + $this->view_data[$key] = $this->load->view($view[0] . '/' . $view[1], $data, true); + } + } else { + $key = $args[0]; + $view = explode('/', $args[1]); + $data = array_merge(isset($args[2]) ? $args[2] : array(), $this->view_data); + + $this->view_data[$key] = $this->load->view($view[0] . '/' . $view[1], $data, true); + } + + return $this; + } + + /** + * @return $this + */ + public function set() + { + $args = func_get_args(); + + if (count($args) == 1) { + foreach ($args[0] as $key => $value) { + $this->view_data[$key] = $value; + } + } else { + $this->view_data[$args[0]] = $args[1]; + } + + return $this; + } + + public function render($view = 'layout') + { + $this->load->view('layout/' . $view, $this->view_data); + } + + /** + * Simple function to load a view directly using the assigned template + * Does not use buffering or rendering + * @param string $view + * @param array $data + */ + public function load_view($view, $data = array()) + { + $view = explode('/', $view); + + $view = $view[0] . '/' . $view[1] . (isset($view[2]) ? '/' . $view[2] : ''); + + $this->load->view($view, $data); + } + +} diff --git a/application/modules/layout/views/alerts.php b/application/modules/layout/views/alerts.php new file mode 100644 index 0000000..09d03f3 --- /dev/null +++ b/application/modules/layout/views/alerts.php @@ -0,0 +1,18 @@ +', ''); + } +} ?> + +session->flashdata('alert_success')) { ?> +
    session->flashdata('alert_success'); ?>
    + + +session->flashdata('alert_info')) { ?> +
    session->flashdata('alert_info'); ?>
    + + +session->flashdata('alert_error')) { ?> +
    session->flashdata('alert_error'); ?>
    + + diff --git a/application/modules/layout/views/header_buttons.php b/application/modules/layout/views/header_buttons.php new file mode 100644 index 0000000..14011b2 --- /dev/null +++ b/application/modules/layout/views/header_buttons.php @@ -0,0 +1,14 @@ +
    +
    + + + + + + +
    +
    diff --git a/application/modules/layout/views/includes/fullpage-loader.php b/application/modules/layout/views/includes/fullpage-loader.php new file mode 100644 index 0000000..6479ecb --- /dev/null +++ b/application/modules/layout/views/includes/fullpage-loader.php @@ -0,0 +1,18 @@ + diff --git a/application/modules/layout/views/includes/head.php b/application/modules/layout/views/includes/head.php new file mode 100644 index 0000000..70a4abf --- /dev/null +++ b/application/modules/layout/views/includes/head.php @@ -0,0 +1,103 @@ + + <?php + if (get_setting('custom_title') != '') { + echo get_setting('custom_title', '', true); + } else { + echo 'InvoicePlane'; + } ?> + + + + + + + + + + + + + + + + + + + + + diff --git a/application/modules/layout/views/includes/navbar.php b/application/modules/layout/views/includes/navbar.php new file mode 100644 index 0000000..eb4a8d9 --- /dev/null +++ b/application/modules/layout/views/includes/navbar.php @@ -0,0 +1,181 @@ + diff --git a/application/modules/layout/views/includes/sidebar.php b/application/modules/layout/views/includes/sidebar.php new file mode 100644 index 0000000..3aef3c2 --- /dev/null +++ b/application/modules/layout/views/includes/sidebar.php @@ -0,0 +1,48 @@ + diff --git a/application/modules/layout/views/layout.php b/application/modules/layout/views/layout.php new file mode 100644 index 0000000..9c06d12 --- /dev/null +++ b/application/modules/layout/views/layout.php @@ -0,0 +1,55 @@ +"> + + + + + + + + + + layout->load_view('layout/includes/head'); + ?> + + + + + + +layout->load_view('layout/includes/navbar'); + +?> + +
    + layout->load_view('layout/includes/sidebar'); + } + ?> +
    + +
    + +
    + + + +layout->load_view('layout/includes/fullpage-loader'); ?> + + + + + + + + diff --git a/application/modules/layout/views/layout_guest.php b/application/modules/layout/views/layout_guest.php new file mode 100644 index 0000000..aa35300 --- /dev/null +++ b/application/modules/layout/views/layout_guest.php @@ -0,0 +1,130 @@ +"> + + + + + + + + + + <?php + if (get_setting('custom_title') != '') { + echo get_setting('custom_title', '', true); + } else { + echo 'InvoicePlane'; + } ?> + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    + +
    + +
    + + + +layout->load_view('layout/includes/fullpage-loader'); ?> + + + + + + + + diff --git a/application/modules/layout/views/setup.php b/application/modules/layout/views/setup.php new file mode 100644 index 0000000..c41bb84 --- /dev/null +++ b/application/modules/layout/views/setup.php @@ -0,0 +1,40 @@ +"> + + + + + + + + + InvoicePlane Setup + + + + + + + + + + + + + + + + + + + + + + + diff --git a/application/modules/mailer/controllers/Mailer.php b/application/modules/mailer/controllers/Mailer.php new file mode 100644 index 0000000..be06754 --- /dev/null +++ b/application/modules/mailer/controllers/Mailer.php @@ -0,0 +1,219 @@ +load->helper('mailer'); + + $this->mailer_configured = mailer_configured(); + + if ($this->mailer_configured == false) { + $this->layout->buffer('content', 'mailer/not_configured'); + $this->layout->render(); + } + } + + /** + * @param $invoice_id + */ + public function invoice($invoice_id) + { + if (!$this->mailer_configured) { + return; + } + + $this->load->model('invoices/mdl_templates'); + $this->load->model('invoices/mdl_invoices'); + $this->load->model('email_templates/mdl_email_templates'); + $this->load->helper('template'); + + $invoice = $this->mdl_invoices->get_by_id($invoice_id); + + $email_template_id = select_email_invoice_template($invoice); + + if ($email_template_id) { + $email_template = $this->mdl_email_templates->get_by_id($email_template_id); + $this->layout->set('email_template', json_encode($email_template)); + } else { + $this->layout->set('email_template', '{}'); + } + + // Get all custom fields + $this->load->model('custom_fields/mdl_custom_fields'); + $custom_fields = array(); + foreach (array_keys($this->mdl_custom_fields->custom_tables()) as $table) { + $custom_fields[$table] = $this->mdl_custom_fields->by_table($table)->get()->result(); + } + + $this->layout->set('selected_pdf_template', select_pdf_invoice_template($invoice)); + $this->layout->set('selected_email_template', $email_template_id); + $this->layout->set('email_templates', $this->mdl_email_templates->where('email_template_type', 'invoice')->get()->result()); + $this->layout->set('invoice', $invoice); + $this->layout->set('custom_fields', $custom_fields); + $this->layout->set('pdf_templates', $this->mdl_templates->get_invoice_templates()); + $this->layout->buffer('content', 'mailer/invoice'); + $this->layout->render(); + } + + /** + * @param $quote_id + */ + public function quote($quote_id) + { + if (!$this->mailer_configured) { + return; + } + + $this->load->model('invoices/mdl_templates'); + $this->load->model('quotes/mdl_quotes'); + $this->load->model('upload/mdl_uploads'); + $this->load->model('email_templates/mdl_email_templates'); + + $email_template_id = get_setting('email_quote_template'); + + if ($email_template_id) { + $email_template = $this->mdl_email_templates->get_by_id($email_template_id); + $this->layout->set('email_template', json_encode($email_template)); + } else { + $this->layout->set('email_template', '{}'); + } + + // Get all custom fields + $this->load->model('custom_fields/mdl_custom_fields'); + $custom_fields = array(); + foreach (array_keys($this->mdl_custom_fields->custom_tables()) as $table) { + $custom_fields[$table] = $this->mdl_custom_fields->by_table($table)->get()->result(); + } + + $this->layout->set('selected_pdf_template', get_setting('pdf_quote_template')); + $this->layout->set('selected_email_template', $email_template_id); + $this->layout->set('email_templates', $this->mdl_email_templates->where('email_template_type', 'quote')->get()->result()); + $this->layout->set('quote', $this->mdl_quotes->get_by_id($quote_id)); + $this->layout->set('custom_fields', $custom_fields); + $this->layout->set('pdf_templates', $this->mdl_templates->get_quote_templates()); + $this->layout->buffer('content', 'mailer/quote'); + $this->layout->render(); + + } + + /** + * @param $invoice_id + */ + public function send_invoice($invoice_id) + { + if ($this->input->post('btn_cancel')) { + redirect('invoices/view/' . $invoice_id); + } + + if (!$this->mailer_configured) { + return; + } + + $to = $this->input->post('to_email'); + + if (empty($to)) { + $this->session->set_flashdata('alert_danger', trans('email_to_address_missing')); + redirect('mailer/invoice/' . $invoice_id); + } + + $this->load->model('upload/mdl_uploads'); + $from = array( + $this->input->post('from_email'), + $this->input->post('from_name') + ); + + $pdf_template = $this->input->post('pdf_template'); + $subject = $this->input->post('subject'); + $body = $this->input->post('body'); + + if (strlen($body) != strlen(strip_tags($body))) { + $body = htmlspecialchars_decode($body); + } else { + $body = htmlspecialchars_decode(nl2br($body)); + } + + $cc = $this->input->post('cc'); + $bcc = $this->input->post('bcc'); + $attachment_files = $this->mdl_uploads->get_invoice_uploads($invoice_id); + + if (email_invoice($invoice_id, $pdf_template, $from, $to, $subject, $body, $cc, $bcc, $attachment_files)) { + $this->mdl_invoices->mark_sent($invoice_id); + $this->session->set_flashdata('alert_success', trans('email_successfully_sent')); + redirect('invoices/view/' . $invoice_id); + } else { + redirect('mailer/invoice/' . $invoice_id); + } + } + + /** + * @param $quote_id + */ + public function send_quote($quote_id) + { + if ($this->input->post('btn_cancel')) { + redirect('quotes/view/' . $quote_id); + } + + if (!$this->mailer_configured) { + return; + } + + $to = $this->input->post('to_email'); + + if (empty($to)) { + $this->session->set_flashdata('alert_danger', trans('email_to_address_missing')); + redirect('mailer/quote/' . $quote_id); + } + + $this->load->model('upload/mdl_uploads'); + $from = array( + $this->input->post('from_email'), + $this->input->post('from_name') + ); + + $pdf_template = $this->input->post('pdf_template'); + $subject = $this->input->post('subject'); + + if (strlen($this->input->post('body')) != strlen(strip_tags($this->input->post('body')))) { + $body = htmlspecialchars_decode($this->input->post('body')); + } else { + $body = htmlspecialchars_decode(nl2br($this->input->post('body'))); + } + + $cc = $this->input->post('cc'); + $bcc = $this->input->post('bcc'); + $attachment_files = $this->mdl_uploads->get_quote_uploads($quote_id); + + if (email_quote($quote_id, $pdf_template, $from, $to, $subject, $body, $cc, $bcc, $attachment_files)) { + $this->mdl_quotes->mark_sent($quote_id); + + $this->session->set_flashdata('alert_success', trans('email_successfully_sent')); + + redirect('quotes/view/' . $quote_id); + } else { + redirect('mailer/quote/' . $quote_id); + } + } + +} diff --git a/application/modules/mailer/helpers/phpmailer_helper.php b/application/modules/mailer/helpers/phpmailer_helper.php new file mode 100644 index 0000000..c5c7208 --- /dev/null +++ b/application/modules/mailer/helpers/phpmailer_helper.php @@ -0,0 +1,148 @@ +load->library('crypt'); + + // Create the basic mailer object + $mail = new PHPMailer(); + $mail->CharSet = 'UTF-8'; + $mail->isHTML(); + + switch (get_setting('email_send_method')) { + case 'smtp': + $mail->IsSMTP(); + + // Set the basic properties + $mail->Host = get_setting('smtp_server_address'); + $mail->Port = get_setting('smtp_port'); + + // Is SMTP authentication required? + if (get_setting('smtp_authentication')) { + $mail->SMTPAuth = true; + + $decoded = $CI->crypt->decode($CI->mdl_settings->get('smtp_password')); + + $mail->Username = get_setting('smtp_username'); + $mail->Password = $decoded; + } + + // Is a security method required? + if (get_setting('smtp_security')) { + $mail->SMTPSecure = get_setting('smtp_security'); + } + + // Check if certificates should not be verified + if (!get_setting('smtp_verify_certs', true)) { + $mail->SMTPOptions = array( + 'ssl' => array( + 'verify_peer' => false, + 'verify_peer_name' => false, + 'allow_self_signed' => true + ) + ); + } + + break; + case 'sendmail': + $mail->IsMail(); + break; + case 'phpmail': + case 'default': + $mail->IsMail(); + break; + } + + $mail->Subject = $subject; + $mail->Body = $message; + + + if (is_array($from)) { + // This array should be address, name + $mail->setFrom($from[0], $from[1]); + } else { + // This is just an address + $mail->setFrom($from); + } + + // Allow multiple recipients delimited by comma or semicolon + $to = (strpos($to, ',')) ? explode(',', $to) : explode(';', $to); + + // Add the addresses + foreach ($to as $address) { + $mail->addAddress($address); + } + + if ($cc) { + // Allow multiple CC's delimited by comma or semicolon + $cc = (strpos($cc, ',')) ? explode(',', $cc) : explode(';', $cc); + + // Add the CC's + foreach ($cc as $address) { + $mail->addCC($address); + } + } + + if ($bcc) { + // Allow multiple BCC's delimited by comma or semicolon + $bcc = (strpos($bcc, ',')) ? explode(',', $bcc) : explode(';', $bcc); + // Add the BCC's + foreach ($bcc as $address) { + $mail->addBCC($address); + } + } + + if (get_setting('bcc_mails_to_admin') == 1) { + // Get email address of admin account and push it to the array + $CI->load->model('users/mdl_users'); + $CI->db->where('user_id', 1); + $admin = $CI->db->get('ip_users')->row(); + $mail->addBCC($admin->user_email); + } + + // Add the attachment if supplied + if ($attachment_path && get_setting('email_pdf_attachment')) { + $mail->addAttachment($attachment_path); + } + // Add the other attachments if supplied + if ($more_attachments) { + foreach ($more_attachments as $paths) { + $mail->addAttachment($paths['path'], $paths['filename']); + } + } + + // And away it goes... + if ($mail->send()) { + $CI->session->set_flashdata('alert_success', 'The email has been sent'); + return true; + } else { + // Or not... + $CI->session->set_flashdata('alert_error', $mail->ErrorInfo); + return false; + } + +} diff --git a/application/modules/mailer/views/invoice.php b/application/modules/mailer/views/invoice.php new file mode 100644 index 0000000..06d264d --- /dev/null +++ b/application/modules/mailer/views/invoice.php @@ -0,0 +1,208 @@ + + +
    + + +
    +

    + +
    +
    + + +
    +
    +
    + +
    + +
    +
    + + layout->load_view('layout/alerts'); ?> + +
    + + +
    + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    +
    + +
    + +
    +
    + +
    + + +
    + +
    + + + + + + + + + +
    +
    + H1 + H2 + H3 + H4 +
    +
    + + + + + <hr/> + + + CSS + +
    + + + +
    + +
    +
    + +
    + +
    +
    +
    + +
    +
    + +
    + +
    +
    + + layout->load_view('email_templates/template-tags'); ?> + +
    +
    + +
    + +
    +
    + +
    + layout->load_view('upload/dropzone-invoice-html'); ?> +
    + +
    +
    + +
    + +
    +
    +
    + +
    +
    + +
    + +
    + +layout->load_view('upload/dropzone-invoice-scripts'); ?> diff --git a/application/modules/mailer/views/not_configured.php b/application/modules/mailer/views/not_configured.php new file mode 100644 index 0000000..a86ab79 --- /dev/null +++ b/application/modules/mailer/views/not_configured.php @@ -0,0 +1,11 @@ +
    + +
    +

    +
    + +
    +
    +
    + +
    diff --git a/application/modules/mailer/views/quote.php b/application/modules/mailer/views/quote.php new file mode 100644 index 0000000..7cf7497 --- /dev/null +++ b/application/modules/mailer/views/quote.php @@ -0,0 +1,211 @@ + + +
    + + + +
    +

    + +
    +
    + + +
    +
    +
    + +
    + +
    +
    + + layout->load_view('layout/alerts'); ?> + +
    + + +
    + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + +
    +
    + +
    + + +
    + +
    + + + + + + + + + +
    +
    + H1 + H2 + H3 + H4 +
    +
    + + + + + <hr/> + + + CSS + +
    + + + +
    + +
    +
    + +
    + +
    +
    +
    + +
    +
    + +
    + +
    +
    + + layout->load_view('email_templates/template-tags'); ?> + +
    +
    +
    +
    + +
    + + +
    +
    + +
    + layout->load_view('upload/dropzone-quote-html'); ?> +
    + +
    + +
    + +
    + +
    +
    +
    + +
    +
    + +
    + +
    + +layout->load_view('upload/dropzone-quote-scripts'); ?> diff --git a/application/modules/payment_methods/controllers/Payment_methods.php b/application/modules/payment_methods/controllers/Payment_methods.php new file mode 100644 index 0000000..825a48b --- /dev/null +++ b/application/modules/payment_methods/controllers/Payment_methods.php @@ -0,0 +1,83 @@ +load->model('mdl_payment_methods'); + } + + /** + * @param int $page + */ + public function index($page = 0) + { + $this->mdl_payment_methods->paginate(site_url('payment_methods/index'), $page); + $payment_methods = $this->mdl_payment_methods->result(); + + $this->layout->set('payment_methods', $payment_methods); + $this->layout->buffer('content', 'payment_methods/index'); + $this->layout->render(); + } + + /** + * @param null $id + */ + public function form($id = null) + { + if ($this->input->post('btn_cancel')) { + redirect('payment_methods'); + } + + if ($this->input->post('is_update') == 0 && $this->input->post('payment_method_name') != '') { + $check = $this->db->get_where('ip_payment_methods', array('payment_method_name' => $this->input->post('payment_method_name')))->result(); + if (!empty($check)) { + $this->session->set_flashdata('alert_error', trans('payment_method_already_exists')); + redirect('payment_methods/form'); + } + } + + if ($this->mdl_payment_methods->run_validation()) { + $this->mdl_payment_methods->save($id); + redirect('payment_methods'); + } + + if ($id and !$this->input->post('btn_submit')) { + if (!$this->mdl_payment_methods->prep_form($id)) { + show_404(); + } + $this->mdl_payment_methods->set_form_value('is_update', true); + } + + $this->layout->buffer('content', 'payment_methods/form'); + $this->layout->render(); + } + + /** + * @param $id + */ + public function delete($id) + { + $this->mdl_payment_methods->delete($id); + redirect('payment_methods'); + } + +} diff --git a/application/modules/payment_methods/models/Mdl_payment_methods.php b/application/modules/payment_methods/models/Mdl_payment_methods.php new file mode 100644 index 0000000..d039549 --- /dev/null +++ b/application/modules/payment_methods/models/Mdl_payment_methods.php @@ -0,0 +1,45 @@ +db->select('SQL_CALC_FOUND_ROWS *', false); + } + + public function order_by() + { + $this->db->order_by('ip_payment_methods.payment_method_name'); + } + + /** + * @return array + */ + public function validation_rules() + { + return array( + 'payment_method_name' => array( + 'field' => 'payment_method_name', + 'label' => trans('payment_method'), + 'rules' => 'required' + ) + ); + } + +} diff --git a/application/modules/payment_methods/views/form.php b/application/modules/payment_methods/views/form.php new file mode 100644 index 0000000..23ca79d --- /dev/null +++ b/application/modules/payment_methods/views/form.php @@ -0,0 +1,36 @@ +
    + + + +
    +

    + layout->load_view('layout/header_buttons'); ?> +
    + +
    + + layout->load_view('layout/alerts'); ?> + + mdl_payment_methods->form_value('is_update')) { + echo 'value="1"'; + } else { + echo 'value="0"'; + } ?> + > + +
    +
    + +
    +
    + +
    +
    + +
    + +
    diff --git a/application/modules/payment_methods/views/index.php b/application/modules/payment_methods/views/index.php new file mode 100644 index 0000000..739bf43 --- /dev/null +++ b/application/modules/payment_methods/views/index.php @@ -0,0 +1,65 @@ +
    +

    + +
    + + + +
    + +
    + +
    + +
    + +
    + + layout->load_view('layout/alerts'); ?> + +
    + + + + + + + + + + + + + + + + + + +
    payment_method_name); ?> +
    + + + + + +
    +
    +
    + +
    diff --git a/application/modules/payments/controllers/Ajax.php b/application/modules/payments/controllers/Ajax.php new file mode 100644 index 0000000..6ee13ef --- /dev/null +++ b/application/modules/payments/controllers/Ajax.php @@ -0,0 +1,57 @@ +load->model('payments/mdl_payments'); + + if ($this->mdl_payments->run_validation()) { + $this->mdl_payments->save(); + + $response = array( + 'success' => 1 + ); + } else { + $this->load->helper('json_error'); + $response = array( + 'success' => 0, + 'validation_errors' => json_errors() + ); + } + + echo json_encode($response); + } + + public function modal_add_payment() + { + $this->load->module('layout'); + $this->load->model('payments/mdl_payments'); + $this->load->model('payment_methods/mdl_payment_methods'); + + $data = array( + 'payment_methods' => $this->mdl_payment_methods->get()->result(), + 'invoice_id' => $this->input->post('invoice_id'), + 'invoice_balance' => $this->input->post('invoice_balance'), + 'invoice_payment_method' => $this->input->post('invoice_payment_method') + ); + + $this->layout->load_view('payments/modal_add_payment', $data); + } + +} diff --git a/application/modules/payments/controllers/Payments.php b/application/modules/payments/controllers/Payments.php new file mode 100644 index 0000000..201afb7 --- /dev/null +++ b/application/modules/payments/controllers/Payments.php @@ -0,0 +1,169 @@ +load->model('mdl_payments'); + } + + /** + * @param int $page + */ + public function index($page = 0) + { + $this->mdl_payments->paginate(site_url('payments/index'), $page); + $payments = $this->mdl_payments->result(); + + $this->layout->set( + array( + 'payments' => $payments, + 'filter_display' => true, + 'filter_placeholder' => trans('filter_payments'), + 'filter_method' => 'filter_payments' + ) + ); + + $this->layout->buffer('content', 'payments/index'); + $this->layout->render(); + } + + /** + * @param null $id + */ + public function form($id = null) + { + if ($this->input->post('btn_cancel')) { + redirect('payments'); + } + + if ($this->mdl_payments->run_validation()) { + $id = $this->mdl_payments->save($id); + + $this->load->model('custom_fields/mdl_payment_custom'); + + $this->mdl_payment_custom->save_custom($id, $this->input->post('custom')); + + redirect('payments'); + } + + if (!$this->input->post('btn_submit')) { + $prep_form = $this->mdl_payments->prep_form($id); + + if ($id and !$prep_form) { + show_404(); + } + + $this->load->model('custom_fields/mdl_payment_custom'); + $this->load->model('custom_values/mdl_custom_values'); + + $payment_custom = $this->mdl_payment_custom->where('payment_id', $id)->get(); + + if ($payment_custom->num_rows()) { + $payment_custom = $payment_custom->row(); + + unset($payment_custom->payment_id, $payment_custom->payment_custom_id); + + foreach ($payment_custom as $key => $val) { + $this->mdl_payments->set_form_value('custom[' . $key . ']', $val); + } + } + } else { + if ($this->input->post('custom')) { + foreach ($this->input->post('custom') as $key => $val) { + $this->mdl_payments->set_form_value('custom[' . $key . ']', $val); + } + } + } + + $this->load->helper('custom_values'); + $this->load->model('invoices/mdl_invoices'); + $this->load->model('payment_methods/mdl_payment_methods'); + $this->load->model('custom_fields/mdl_custom_fields'); + $this->load->model('custom_values/mdl_custom_values'); + + $open_invoices = $this->mdl_invoices + ->where('ip_invoice_amounts.invoice_balance >', 0) + ->or_where('ip_invoice_amounts.invoice_balance <', 0) + ->get()->result(); + + $custom_fields = $this->mdl_custom_fields->by_table('ip_payment_custom')->get()->result(); + $custom_values = []; + + foreach ($custom_fields as $custom_field) { + if (in_array($custom_field->custom_field_type, $this->mdl_custom_values->custom_value_fields())) { + $values = $this->mdl_custom_values->get_by_fid($custom_field->custom_field_id)->result(); + $custom_values[$custom_field->custom_field_id] = $values; + } + } + + $fields = $this->mdl_payment_custom->get_by_payid($id); + + foreach ($custom_fields as $cfield) { + foreach ($fields as $fvalue) { + if ($fvalue->payment_custom_fieldid == $cfield->custom_field_id) { + // TODO: Hackish, may need a better optimization + $this->mdl_payments->set_form_value( + 'custom[' . $cfield->custom_field_id . ']', + $fvalue->payment_custom_fieldvalue + ); + break; + } + } + } + + $amounts = array(); + $invoice_payment_methods = array(); + foreach ($open_invoices as $open_invoice) { + $amounts['invoice' . $open_invoice->invoice_id] = format_amount($open_invoice->invoice_balance); + $invoice_payment_methods['invoice' . $open_invoice->invoice_id] = $open_invoice->payment_method; + } + + $this->layout->set( + array( + 'payment_id' => $id, + 'payment_methods' => $this->mdl_payment_methods->get()->result(), + 'open_invoices' => $open_invoices, + 'custom_fields' => $custom_fields, + 'custom_values' => $custom_values, + 'amounts' => json_encode($amounts), + 'invoice_payment_methods' => json_encode($invoice_payment_methods) + ) + ); + + if ($id) { + $this->layout->set('payment', $this->mdl_payments->where('ip_payments.payment_id', $id)->get()->row()); + } + + $this->layout->buffer('content', 'payments/form'); + $this->layout->render(); + } + + /** + * @param $id + */ + public function delete($id) + { + $this->mdl_payments->delete($id); + redirect('payments'); + } + +} diff --git a/application/modules/payments/models/Mdl_payments.php b/application/modules/payments/models/Mdl_payments.php new file mode 100644 index 0000000..446bb49 --- /dev/null +++ b/application/modules/payments/models/Mdl_payments.php @@ -0,0 +1,226 @@ +db->select(" + SQL_CALC_FOUND_ROWS + ip_payment_methods.*, + ip_invoice_amounts.*, + ip_clients.client_name, + ip_clients.client_surname, + ip_clients.client_id, + ip_invoices.invoice_number, + ip_invoices.invoice_date_created, + ip_payments.*", false); + } + + public function default_order_by() + { + $this->db->order_by('ip_payments.payment_date DESC'); + } + + public function default_join() + { + $this->db->join('ip_invoices', 'ip_invoices.invoice_id = ip_payments.invoice_id'); + $this->db->join('ip_clients', 'ip_clients.client_id = ip_invoices.client_id'); + $this->db->join('ip_invoice_amounts', 'ip_invoice_amounts.invoice_id = ip_invoices.invoice_id'); + $this->db->join('ip_payment_methods', 'ip_payment_methods.payment_method_id = ip_payments.payment_method_id', 'left'); + } + + /** + * @return array + */ + public function validation_rules() + { + return array( + 'invoice_id' => array( + 'field' => 'invoice_id', + 'label' => trans('invoice'), + 'rules' => 'required' + ), + 'payment_date' => array( + 'field' => 'payment_date', + 'label' => trans('date'), + 'rules' => 'required' + ), + 'payment_amount' => array( + 'field' => 'payment_amount', + 'label' => trans('payment'), + 'rules' => 'required|callback_validate_payment_amount' + ), + 'payment_method_id' => array( + 'field' => 'payment_method_id', + 'label' => trans('payment_method') + ), + 'payment_note' => array( + 'field' => 'payment_note', + 'label' => trans('note') + ) + ); + } + + /** + * @param $amount + * @return bool + */ + public function validate_payment_amount($amount) + { + $amount = (float)standardize_amount($amount); + $invoice_id = $this->input->post('invoice_id'); + $payment_id = $this->input->post('payment_id'); + + $invoice = $this->db->where('invoice_id', $invoice_id)->get('ip_invoice_amounts')->row(); + + if ($invoice == null) { + return false; + } + + $invoice_balance = (float)$invoice->invoice_balance; + + if ($payment_id) { + $payment = $this->db->where('payment_id', $payment_id)->get('ip_payments')->row(); + + $invoice_balance = $invoice_balance + (float)$payment->payment_amount; + } + + $invoice_balance = (float)$invoice_balance; + + if ($amount > $invoice_balance) { + $this->form_validation->set_message('validate_payment_amount', trans('payment_cannot_exceed_balance')); + return false; + } + + return true; + } + + /** + * @param null $id + * @param null $db_array + * @return bool|int|null + */ + public function save($id = null, $db_array = null) + { + $db_array = ($db_array) ? $db_array : $this->db_array(); + $this->load->model('invoices/mdl_invoice_amounts'); + + // Save the payment + $id = parent::save($id, $db_array); + + // Recalculate invoice amounts + $this->mdl_invoice_amounts->calculate($db_array['invoice_id']); + + // Set proper status for the invoice + $invoice = $this->db->where('invoice_id', $db_array['invoice_id'])->get('ip_invoice_amounts')->row(); + + // Calculate sum for payments + if ($invoice == null) { + return false; + } + + $paid = (float)$invoice->invoice_paid; + $total = (float)$invoice->invoice_total; + + if ($paid >= $total) { + $this->db->where('invoice_id', $db_array['invoice_id']); + $this->db->set('invoice_status_id', 4); + $this->db->update('ip_invoices'); + } + + // Recalculate invoice amounts + $this->mdl_invoice_amounts->calculate($db_array['invoice_id']); + + return $id; + } + + /** + * @return array + */ + public function db_array() + { + $db_array = parent::db_array(); + + $db_array['payment_date'] = date_to_mysql($db_array['payment_date']); + $db_array['payment_amount'] = standardize_amount($db_array['payment_amount']); + + return $db_array; + } + + /** + * @param null $id + */ + public function delete($id = null) + { + // Get the invoice id before deleting payment + $this->db->select('invoice_id'); + $this->db->where('payment_id', $id); + $invoice_id = $this->db->get('ip_payments')->row()->invoice_id; + + // Delete the payment + parent::delete($id); + + // Recalculate invoice amounts + $this->load->model('invoices/mdl_invoice_amounts'); + $this->mdl_invoice_amounts->calculate($invoice_id); + + // Change invoice status back to sent + $this->db->select('invoice_status_id'); + $this->db->where('invoice_id', $invoice_id); + $invoice = $this->db->get('ip_invoices')->row(); + + if ($invoice->invoice_status_id == 4) { + $this->db->where('invoice_id', $invoice_id); + $this->db->set('invoice_status_id', 2); + $this->db->update('ip_invoices'); + } + + $this->load->helper('orphan'); + delete_orphans(); + } + + /** + * @param null $id + * @return bool + */ + public function prep_form($id = null) + { + if (!parent::prep_form($id)) { + return false; + } + + if (!$id) { + parent::set_form_value('payment_date', date('Y-m-d')); + } + + return true; + } + + /** + * @param $client_id + * @return $this + */ + public function by_client($client_id) + { + $this->filter_where('ip_clients.client_id', $client_id); + return $this; + } + +} diff --git a/application/modules/payments/views/form.php b/application/modules/payments/views/form.php new file mode 100644 index 0000000..05376bc --- /dev/null +++ b/application/modules/payments/views/form.php @@ -0,0 +1,137 @@ + + +
    + + + + + + + +
    +

    + layout->load_view('layout/header_buttons'); ?> +
    + +
    + + layout->load_view('layout/alerts'); ?> + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    + + + + +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + + mdl_payments->form_value('payment_method_id')) { ?> + + + + +
    +
    + +
    +
    + +
    +
    + +
    + +
    + + controller->view_data["custom_values"]; + foreach ($custom_fields as $custom_field) { + print_field($this->mdl_payments, $custom_field, $cv, "col-xs-12 col-sm-2 text-right text-left-xs", "col-xs-12 col-sm-6"); + } ?> + +
    + +
    diff --git a/application/modules/payments/views/index.php b/application/modules/payments/views/index.php new file mode 100644 index 0000000..a517e4b --- /dev/null +++ b/application/modules/payments/views/index.php @@ -0,0 +1,24 @@ +
    +

    + +
    + + + +
    + +
    + +
    + +
    + +
    + + layout->load_view('layout/alerts'); ?> + +
    + layout->load_view('payments/partial_payment_table'); ?> +
    + +
    diff --git a/application/modules/payments/views/modal_add_payment.php b/application/modules/payments/views/modal_add_payment.php new file mode 100644 index 0000000..6d708c9 --- /dev/null +++ b/application/modules/payments/views/modal_add_payment.php @@ -0,0 +1,129 @@ + + + diff --git a/application/modules/payments/views/partial_payment_table.php b/application/modules/payments/views/partial_payment_table.php new file mode 100644 index 0000000..5346240 --- /dev/null +++ b/application/modules/payments/views/partial_payment_table.php @@ -0,0 +1,59 @@ +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    payment_date); ?>invoice_date_created); ?>invoice_id, $payment->invoice_number); ?> + + + + payment_amount); ?>payment_method_name); ?>payment_note); ?> +
    + + + + +
    +
    +
    diff --git a/application/modules/products/controllers/Ajax.php b/application/modules/products/controllers/Ajax.php new file mode 100644 index 0000000..3a3dd32 --- /dev/null +++ b/application/modules/products/controllers/Ajax.php @@ -0,0 +1,67 @@ +input->get('filter_product'); + $filter_family = $this->input->get('filter_family'); + $reset_table = $this->input->get('reset_table'); + + $this->load->model('mdl_products'); + $this->load->model('families/mdl_families'); + + if (!empty($filter_family)) { + $this->mdl_products->by_family($filter_family); + } + + if (!empty($filter_product)) { + $this->mdl_products->by_product($filter_product); + } + + $products = $this->mdl_products->get()->result(); + $families = $this->mdl_families->get()->result(); + + $data = array( + 'products' => $products, + 'families' => $families, + 'filter_product' => $filter_product, + 'filter_family' => $filter_family, + ); + + if ($filter_product || $filter_family || $reset_table) { + $this->layout->load_view('products/partial_product_table_modal', $data); + } else { + $this->layout->load_view('products/modal_product_lookups', $data); + } + } + + public function process_product_selections() + { + $this->load->model('mdl_products'); + + $products = $this->mdl_products->where_in('product_id', $this->input->post('product_ids'))->get()->result(); + + foreach ($products as $product) { + $product->product_price = format_amount($product->product_price); + } + + echo json_encode($products); + } + +} diff --git a/application/modules/products/controllers/Products.php b/application/modules/products/controllers/Products.php new file mode 100644 index 0000000..6142f81 --- /dev/null +++ b/application/modules/products/controllers/Products.php @@ -0,0 +1,88 @@ +load->model('mdl_products'); + } + + /** + * @param int $page + */ + public function index($page = 0) + { + $this->mdl_products->paginate(site_url('products/index'), $page); + $products = $this->mdl_products->result(); + + $this->layout->set('products', $products); + $this->layout->buffer('content', 'products/index'); + $this->layout->render(); + } + + /** + * @param null $id + */ + public function form($id = null) + { + if ($this->input->post('btn_cancel')) { + redirect('products'); + } + + if ($this->mdl_products->run_validation()) { + // Get the db array + $db_array = $this->mdl_products->db_array(); + $this->mdl_products->save($id, $db_array); + redirect('products'); + } + + if ($id and !$this->input->post('btn_submit')) { + if (!$this->mdl_products->prep_form($id)) { + show_404(); + } + } + + $this->load->model('families/mdl_families'); + $this->load->model('units/mdl_units'); + $this->load->model('tax_rates/mdl_tax_rates'); + + $this->layout->set( + array( + 'families' => $this->mdl_families->get()->result(), + 'units' => $this->mdl_units->get()->result(), + 'tax_rates' => $this->mdl_tax_rates->get()->result(), + ) + ); + + $this->layout->buffer('content', 'products/form'); + $this->layout->render(); + } + + /** + * @param $id + */ + public function delete($id) + { + $this->mdl_products->delete($id); + redirect('products'); + } + +} diff --git a/application/modules/products/models/Mdl_products.php b/application/modules/products/models/Mdl_products.php new file mode 100644 index 0000000..e7ede37 --- /dev/null +++ b/application/modules/products/models/Mdl_products.php @@ -0,0 +1,128 @@ +db->select('SQL_CALC_FOUND_ROWS *', false); + } + + public function default_order_by() + { + $this->db->order_by('ip_families.family_name, ip_products.product_name'); + } + + public function default_join() + { + $this->db->join('ip_families', 'ip_families.family_id = ip_products.family_id', 'left'); + $this->db->join('ip_units', 'ip_units.unit_id = ip_products.unit_id', 'left'); + $this->db->join('ip_tax_rates', 'ip_tax_rates.tax_rate_id = ip_products.tax_rate_id', 'left'); + } + + public function by_product($match) + { + $this->db->group_start(); + $this->db->like('ip_products.product_sku', $match); + $this->db->or_like('ip_products.product_name', $match); + $this->db->or_like('ip_products.product_description', $match); + $this->db->group_end(); + } + + public function by_family($match) + { + $this->db->where('ip_products.family_id', $match); + } + + /** + * @return array + */ + public function validation_rules() + { + return array( + 'product_sku' => array( + 'field' => 'product_sku', + 'label' => trans('product_sku'), + 'rules' => '' + ), + 'product_name' => array( + 'field' => 'product_name', + 'label' => trans('product_name'), + 'rules' => 'required' + ), + 'product_description' => array( + 'field' => 'product_description', + 'label' => trans('product_description'), + 'rules' => '' + ), + 'product_price' => array( + 'field' => 'product_price', + 'label' => trans('product_price'), + 'rules' => 'required' + ), + 'purchase_price' => array( + 'field' => 'purchase_price', + 'label' => trans('purchase_price'), + 'rules' => '' + ), + 'provider_name' => array( + 'field' => 'provider_name', + 'label' => trans('provider_name'), + 'rules' => '' + ), + 'family_id' => array( + 'field' => 'family_id', + 'label' => trans('family'), + 'rules' => 'numeric' + ), + 'unit_id' => array( + 'field' => 'unit_id', + 'label' => trans('unit'), + 'rules' => 'numeric' + ), + 'tax_rate_id' => array( + 'field' => 'tax_rate_id', + 'label' => trans('tax_rate'), + 'rules' => 'numeric' + ), + // Sumex + 'product_tariff' => array( + 'field' => 'product_tariff', + 'label' => trans('product_tariff'), + 'rules' => '' + ), + ); + } + + /** + * @return array + */ + public function db_array() + { + $db_array = parent::db_array(); + + $db_array['product_price'] = (empty($db_array['product_price']) ? null : standardize_amount($db_array['product_price'])); + $db_array['purchase_price'] = (empty($db_array['purchase_price']) ? null : standardize_amount($db_array['purchase_price'])); + $db_array['family_id'] = (empty($db_array['family_id']) ? null : $db_array['family_id']); + $db_array['unit_id'] = (empty($db_array['unit_id']) ? null : $db_array['unit_id']); + $db_array['tax_rate_id'] = (empty($db_array['tax_rate_id']) ? null : $db_array['tax_rate_id']); + + return $db_array; + } + +} diff --git a/application/modules/products/views/form.php b/application/modules/products/views/form.php new file mode 100644 index 0000000..a7145ae --- /dev/null +++ b/application/modules/products/views/form.php @@ -0,0 +1,175 @@ +
    + + + +
    +

    + layout->load_view('layout/header_buttons'); ?> +
    + +
    + +
    +
    + + layout->load_view('layout/alerts'); ?> + +
    +
    + + mdl_products->form_value('product_id')) : ?> + #mdl_products->form_value('product_id'); ?>  + mdl_products->form_value('product_name', true); ?> + + + + +
    +
    + +
    + + + +
    + +
    + + + +
    + +
    + + + +
    + +
    + + + +
    + +
    + + +
    + + +
    +
    + +
    + + + +
    + + + +
    +
    +
    + + +
    + +
    + +
    diff --git a/application/modules/products/views/index.php b/application/modules/products/views/index.php new file mode 100644 index 0000000..d6f19db --- /dev/null +++ b/application/modules/products/views/index.php @@ -0,0 +1,80 @@ +
    +

    + +
    + + + +
    + +
    + +
    + +
    + +
    + + layout->load_view('layout/alerts'); ?> + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    family_name); ?>product_sku); ?>product_name); ?>product_description)); ?>product_price); ?>unit_name); ?>tax_rate_id) ? htmlsc($product->tax_rate_name) : trans('none'); ?>product_tariff); ?> +
    + + + + +
    +
    +
    + +
    diff --git a/application/modules/products/views/modal_product_lookups.php b/application/modules/products/views/modal_product_lookups.php new file mode 100644 index 0000000..83a4ee7 --- /dev/null +++ b/application/modules/products/views/modal_product_lookups.php @@ -0,0 +1,161 @@ + + + diff --git a/application/modules/products/views/partial_product_table_modal.php b/application/modules/products/views/partial_product_table_modal.php new file mode 100644 index 0000000..7b3fc56 --- /dev/null +++ b/application/modules/products/views/partial_product_table_modal.php @@ -0,0 +1,36 @@ +
    + + + + + + + + + + + + + + + + + + + + +
     
    + + + product_sku); ?> + + family_name); ?> + + product_name); ?> + + product_description)); ?> + + product_price); ?> +
    +
    diff --git a/application/modules/projects/controllers/Projects.php b/application/modules/projects/controllers/Projects.php new file mode 100644 index 0000000..f2cb1c7 --- /dev/null +++ b/application/modules/projects/controllers/Projects.php @@ -0,0 +1,112 @@ +load->model('mdl_projects'); + } + + /** + * @param int $page + */ + public function index($page = 0) + { + $this->mdl_projects->paginate(site_url('projects/index'), $page); + $projects = $this->mdl_projects->result(); + + $this->layout->set('projects', $projects); + $this->layout->buffer('content', 'projects/index'); + $this->layout->render(); + } + + /** + * @param null $id + */ + public function form($id = null) + { + if ($this->input->post('btn_cancel')) { + redirect('projects'); + } + + if ($this->mdl_projects->run_validation()) { + $this->mdl_projects->save($id); + redirect('projects'); + } + + if ($id and !$this->input->post('btn_submit')) { + if (!$this->mdl_projects->prep_form($id)) { + show_404(); + } + } + + $this->load->model('clients/mdl_clients'); + + $this->layout->set( + array( + 'clients' => $this->mdl_clients->where('client_active', 1)->get()->result() + ) + ); + + $this->layout->buffer('content', 'projects/form'); + $this->layout->render(); + } + + /** + * @param null $project_id + */ + public function view($project_id) + { + if ($this->input->post('btn_cancel')) { + redirect('projects'); + } + + $this->load->model('projects/mdl_projects'); + $project = $this->mdl_projects->get_by_id($project_id); + + if (!$project) { + show_404(); + } + + $this->load->model('tasks/mdl_tasks'); + + $this->layout->set(array( + 'project' => $project, + 'tasks' => $this->mdl_projects->get_tasks($project->project_id), + 'task_statuses' => $this->mdl_tasks->statuses(), + )); + $this->layout->buffer('content', 'projects/view'); + $this->layout->render(); + } + + /** + * @param $id + */ + public function delete($id) + { + $this->load->model('tasks/mdl_tasks'); + $this->mdl_tasks->update_on_project_delete($id); + + $this->mdl_projects->delete($id); + redirect('projects'); + } + +} diff --git a/application/modules/projects/models/Mdl_projects.php b/application/modules/projects/models/Mdl_projects.php new file mode 100644 index 0000000..e1b2826 --- /dev/null +++ b/application/modules/projects/models/Mdl_projects.php @@ -0,0 +1,80 @@ +db->select('SQL_CALC_FOUND_ROWS *', false); + } + + public function default_order_by() + { + $this->db->order_by('ip_projects.project_id'); + } + + public function default_join() + { + $this->db->join('ip_clients', 'ip_clients.client_id = ip_projects.client_id', 'left'); + } + + public function get_latest() + { + $this->db->order_by('ip_projects.project_id', 'DESC'); + return $this; + } + + /** + * @return array + */ + public function validation_rules() + { + return array( + 'project_name' => array( + 'field' => 'project_name', + 'label' => trans('project_name'), + 'rules' => 'required' + ), + 'client_id' => array( + 'field' => 'client_id', + 'label' => trans('client'), + ) + ); + } + + public function get_tasks($project_id) + { + $result = array(); + + if (!$project_id) { + return $result; + } + + $this->load->model('tasks/mdl_tasks'); + $query = $this->mdl_tasks + ->where('ip_tasks.project_id', $project_id) + ->get(); + + foreach ($query->result() as $row) { + $result[] = $row; + } + + return $result; + } + +} diff --git a/application/modules/projects/views/form.php b/application/modules/projects/views/form.php new file mode 100644 index 0000000..dcc05bc --- /dev/null +++ b/application/modules/projects/views/form.php @@ -0,0 +1,57 @@ + + +
    + + + +
    +

    + layout->load_view('layout/header_buttons'); ?> +
    + +
    + + layout->load_view('layout/alerts'); ?> + +
    + + +
    +
    + + +
    + +
    + +
    diff --git a/application/modules/projects/views/index.php b/application/modules/projects/views/index.php new file mode 100644 index 0000000..0d65df0 --- /dev/null +++ b/application/modules/projects/views/index.php @@ -0,0 +1,64 @@ +
    +

    + +
    + + + +
    + +
    + +
    + +
    + +
    + + layout->load_view('layout/alerts'); ?> + +
    + + + + + + + + + + + + + + + + + + + + +
    project_id, htmlsc($project->project_name)); ?>client_id) ? htmlsc($project->client_name) : trans('none'); ?> +
    + + + + +
    +
    +
    + +
    diff --git a/application/modules/projects/views/view.php b/application/modules/projects/views/view.php new file mode 100644 index 0000000..bf003f2 --- /dev/null +++ b/application/modules/projects/views/view.php @@ -0,0 +1,103 @@ +
    +

    project_name; ?>

    + +
    + +
    +
    + +
    + +
    +
    + + client_name)) : ?> + +
    +
    + +
    +
    +
    + layout->load_view('clients/partial_client_address', array('client' => $project)); ?> +
    +
    +
    + + + +
    + + + +
    +
    + +
    +
    + +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + + + +
    + task_id, htmlsc($task->task_name)) ?> + + task_status"]['class']; ?>"> + task_status"]['label']; ?> + + + + task_finish_date); ?> + + project_name); ?>
    + + +
    +
    + + +
    + +
    +
    + +
    +
    + +
    + diff --git a/application/modules/quotes/controllers/Ajax.php b/application/modules/quotes/controllers/Ajax.php new file mode 100644 index 0000000..3a84d9d --- /dev/null +++ b/application/modules/quotes/controllers/Ajax.php @@ -0,0 +1,389 @@ +load->model('quotes/mdl_quote_items'); + $this->load->model('quotes/mdl_quotes'); + $this->load->model('units/mdl_units'); + + $quote_id = $this->input->post('quote_id'); + + $this->mdl_quotes->set_id($quote_id); + + if ($this->mdl_quotes->run_validation('validation_rules_save_quote')) { + $items = json_decode($this->input->post('items')); + + foreach ($items as $item) { + if ($item->item_name) { + $item->item_quantity = ($item->item_quantity ? standardize_amount($item->item_quantity) : floatval(0)); + $item->item_price = ($item->item_quantity ? standardize_amount($item->item_price) : floatval(0)); + $item->item_discount_amount = ($item->item_discount_amount) ? standardize_amount($item->item_discount_amount) : null; + $item->item_product_id = ($item->item_product_id ? $item->item_product_id : null); + $item->item_product_unit_id = ($item->item_product_unit_id ? $item->item_product_unit_id : null); + $item->item_product_unit = $this->mdl_units->get_name($item->item_product_unit_id, $item->item_quantity); + + $item_id = ($item->item_id) ?: null; + unset($item->item_id); + + $this->mdl_quote_items->save($item_id, $item); + } + } + + if ($this->input->post('quote_discount_amount') === '') { + $quote_discount_amount = floatval(0); + } else { + $quote_discount_amount = $this->input->post('quote_discount_amount'); + } + + if ($this->input->post('quote_discount_percent') === '') { + $quote_discount_percent = floatval(0); + } else { + $quote_discount_percent = $this->input->post('quote_discount_percent'); + } + + // Generate new quote number if needed + $quote_number = $this->input->post('quote_number'); + $quote_status_id = $this->input->post('quote_status_id'); + + if (empty($quote_number) && $quote_status_id != 1) { + $quote_group_id = $this->mdl_quotes->get_invoice_group_id($quote_id); + $quote_number = $this->mdl_quotes->get_quote_number($quote_group_id); + } + + $db_array = array( + 'quote_number' => $quote_number, + 'quote_date_created' => date_to_mysql($this->input->post('quote_date_created')), + 'quote_date_expires' => date_to_mysql($this->input->post('quote_date_expires')), + 'quote_status_id' => $quote_status_id, + 'quote_password' => $this->input->post('quote_password'), + 'notes' => $this->input->post('notes'), + 'quote_discount_amount' => standardize_amount($quote_discount_amount), + 'quote_discount_percent' => standardize_amount($quote_discount_percent), + ); + + $this->mdl_quotes->save($quote_id, $db_array); + + // Recalculate for discounts + $this->load->model('quotes/mdl_quote_amounts'); + $this->mdl_quote_amounts->calculate($quote_id); + + $response = array( + 'success' => 1 + ); + } else { + $this->load->helper('json_error'); + $response = array( + 'success' => 0, + 'validation_errors' => json_errors() + ); + } + + + // Save all custom fields + if ($this->input->post('custom')) { + $db_array = array(); + + $values = []; + foreach ($this->input->post('custom') as $custom) { + if (preg_match("/^(.*)\[\]$/i", $custom['name'], $matches)) { + $values[$matches[1]][] = $custom['value']; + } else { + $values[$custom['name']] = $custom['value']; + } + } + + foreach ($values as $key => $value) { + preg_match("/^custom\[(.*?)\](?:\[\]|)$/", $key, $matches); + if ($matches) { + $db_array[$matches[1]] = $value; + } + } + $this->load->model('custom_fields/mdl_quote_custom'); + $result = $this->mdl_quote_custom->save_custom($quote_id, $db_array); + if ($result !== true) { + $response = array( + 'success' => 0, + 'validation_errors' => $result + ); + + echo json_encode($response); + exit; + } + } + + echo json_encode($response); + } + + public function save_quote_tax_rate() + { + $this->load->model('quotes/mdl_quote_tax_rates'); + + if ($this->mdl_quote_tax_rates->run_validation()) { + $this->mdl_quote_tax_rates->save(); + + $response = array( + 'success' => 1 + ); + } else { + $response = array( + 'success' => 0, + 'validation_errors' => $this->mdl_quote_tax_rates->validation_errors + ); + } + + echo json_encode($response); + } + + public function create() + { + $this->load->model('quotes/mdl_quotes'); + + if ($this->mdl_quotes->run_validation()) { + $quote_id = $this->mdl_quotes->create(); + + $response = array( + 'success' => 1, + 'quote_id' => $quote_id + ); + } else { + $this->load->helper('json_error'); + $response = array( + 'success' => 0, + 'validation_errors' => json_errors() + ); + } + + echo json_encode($response); + } + + public function modal_change_client() + { + $this->load->module('layout'); + $this->load->model('clients/mdl_clients'); + + $data = array( + 'client_id' => $this->input->post('client_id'), + 'quote_id' => $this->input->post('quote_id'), + 'clients' => $this->mdl_clients->get_latest(), + ); + + $this->layout->load_view('quotes/modal_change_client', $data); + } + + public function change_client() + { + $this->load->model('quotes/mdl_quotes'); + $this->load->model('clients/mdl_clients'); + + // Get the client ID + $client_id = $this->input->post('client_id'); + $client = $this->mdl_clients->where('ip_clients.client_id', $client_id) + ->get()->row(); + + if (!empty($client)) { + $quote_id = $this->input->post('quote_id'); + + $db_array = array( + 'client_id' => $client_id, + ); + $this->db->where('quote_id', $quote_id); + $this->db->update('ip_quotes', $db_array); + + $response = array( + 'success' => 1, + 'quote_id' => $quote_id + ); + } else { + $this->load->helper('json_error'); + $response = array( + 'success' => 0, + 'validation_errors' => json_errors() + ); + } + + echo json_encode($response); + } + + public function get_item() + { + $this->load->model('quotes/mdl_quote_items'); + + $item = $this->mdl_quote_items->get_by_id($this->input->post('item_id')); + + echo json_encode($item); + } + + public function modal_create_quote() + { + $this->load->module('layout'); + $this->load->model('invoice_groups/mdl_invoice_groups'); + $this->load->model('tax_rates/mdl_tax_rates'); + $this->load->model('clients/mdl_clients'); + + $data = array( + 'invoice_groups' => $this->mdl_invoice_groups->get()->result(), + 'tax_rates' => $this->mdl_tax_rates->get()->result(), + 'client' => $this->mdl_clients->get_by_id($this->input->post('client_id')), + 'clients' => $this->mdl_clients->get_latest(), + ); + + $this->layout->load_view('quotes/modal_create_quote', $data); + } + + public function modal_copy_quote() + { + $this->load->module('layout'); + + $this->load->model('quotes/mdl_quotes'); + $this->load->model('invoice_groups/mdl_invoice_groups'); + $this->load->model('tax_rates/mdl_tax_rates'); + $this->load->model('clients/mdl_clients'); + + $data = array( + 'invoice_groups' => $this->mdl_invoice_groups->get()->result(), + 'tax_rates' => $this->mdl_tax_rates->get()->result(), + 'quote_id' => $this->input->post('quote_id'), + 'quote' => $this->mdl_quotes->where('ip_quotes.quote_id', $this->input->post('quote_id'))->get()->row(), + 'client' => $this->mdl_clients->get_by_id($this->input->post('client_id')), + ); + + $this->layout->load_view('quotes/modal_copy_quote', $data); + } + + public function copy_quote() + { + $this->load->model('quotes/mdl_quotes'); + $this->load->model('quotes/mdl_quote_items'); + $this->load->model('quotes/mdl_quote_tax_rates'); + + if ($this->mdl_quotes->run_validation()) { + $target_id = $this->mdl_quotes->save(); + $source_id = $this->input->post('quote_id'); + + $this->mdl_quotes->copy_quote($source_id, $target_id); + + $response = array( + 'success' => 1, + 'quote_id' => $target_id + ); + } else { + $this->load->helper('json_error'); + $response = array( + 'success' => 0, + 'validation_errors' => json_errors() + ); + } + + echo json_encode($response); + } + + public function modal_quote_to_invoice($quote_id) + { + $this->load->model('invoice_groups/mdl_invoice_groups'); + $this->load->model('quotes/mdl_quotes'); + + $data = array( + 'invoice_groups' => $this->mdl_invoice_groups->get()->result(), + 'quote_id' => $quote_id, + 'quote' => $this->mdl_quotes->where('ip_quotes.quote_id', $quote_id)->get()->row() + ); + + $this->load->view('quotes/modal_quote_to_invoice', $data); + } + + public function quote_to_invoice() + { + $this->load->model( + array( + 'invoices/mdl_invoices', + 'invoices/mdl_items', + 'quotes/mdl_quotes', + 'quotes/mdl_quote_items', + 'invoices/mdl_invoice_tax_rates', + 'quotes/mdl_quote_tax_rates' + ) + ); + + if ($this->mdl_invoices->run_validation()) { + // Get the quote + $quote = $this->mdl_quotes->get_by_id($this->input->post('quote_id')); + + $invoice_id = $this->mdl_invoices->create(null, false); + + // Update the discounts + $this->db->where('invoice_id', $invoice_id); + $this->db->set('invoice_discount_amount', $quote->quote_discount_amount); + $this->db->set('invoice_discount_percent', $quote->quote_discount_percent); + $this->db->update('ip_invoices'); + + // Save the invoice id to the quote + $this->db->where('quote_id', $this->input->post('quote_id')); + $this->db->set('invoice_id', $invoice_id); + $this->db->update('ip_quotes'); + + $quote_items = $this->mdl_quote_items->where('quote_id', $this->input->post('quote_id'))->get()->result(); + + foreach ($quote_items as $quote_item) { + $db_array = array( + 'invoice_id' => $invoice_id, + 'item_tax_rate_id' => $quote_item->item_tax_rate_id, + 'item_product_id' => $quote_item->item_product_id, + 'item_name' => $quote_item->item_name, + 'item_description' => $quote_item->item_description, + 'item_quantity' => $quote_item->item_quantity, + 'item_price' => $quote_item->item_price, + 'item_product_unit_id' => $quote_item->item_product_unit_id, + 'item_product_unit' => $quote_item->item_product_unit, + 'item_discount_amount' => $quote_item->item_discount_amount, + 'item_order' => $quote_item->item_order + ); + + $this->mdl_items->save(null, $db_array); + } + + $quote_tax_rates = $this->mdl_quote_tax_rates->where('quote_id', $this->input->post('quote_id'))->get()->result(); + + foreach ($quote_tax_rates as $quote_tax_rate) { + $db_array = array( + 'invoice_id' => $invoice_id, + 'tax_rate_id' => $quote_tax_rate->tax_rate_id, + 'include_item_tax' => $quote_tax_rate->include_item_tax, + 'invoice_tax_rate_amount' => $quote_tax_rate->quote_tax_rate_amount + ); + + $this->mdl_invoice_tax_rates->save(null, $db_array); + } + + $response = array( + 'success' => 1, + 'invoice_id' => $invoice_id + ); + } else { + $this->load->helper('json_error'); + $response = array( + 'success' => 0, + 'validation_errors' => json_errors() + ); + } + + echo json_encode($response); + } + +} diff --git a/application/modules/quotes/controllers/Quotes.php b/application/modules/quotes/controllers/Quotes.php new file mode 100644 index 0000000..30e45d4 --- /dev/null +++ b/application/modules/quotes/controllers/Quotes.php @@ -0,0 +1,237 @@ +load->model('mdl_quotes'); + } + + public function index() + { + // Display all quotes by default + redirect('quotes/status/all'); + } + + /** + * @param string $status + * @param int $page + */ + public function status($status = 'all', $page = 0) + { + // Determine which group of quotes to load + switch ($status) { + case 'draft': + $this->mdl_quotes->is_draft(); + break; + case 'sent': + $this->mdl_quotes->is_sent(); + break; + case 'viewed': + $this->mdl_quotes->is_viewed(); + break; + case 'approved': + $this->mdl_quotes->is_approved(); + break; + case 'rejected': + $this->mdl_quotes->is_rejected(); + break; + case 'canceled': + $this->mdl_quotes->is_canceled(); + break; + } + + $this->mdl_quotes->paginate(site_url('quotes/status/' . $status), $page); + $quotes = $this->mdl_quotes->result(); + + $this->layout->set( + array( + 'quotes' => $quotes, + 'status' => $status, + 'filter_display' => true, + 'filter_placeholder' => trans('filter_quotes'), + 'filter_method' => 'filter_quotes', + 'quote_statuses' => $this->mdl_quotes->statuses() + ) + ); + + $this->layout->buffer('content', 'quotes/index'); + $this->layout->render(); + } + + /** + * @param $quote_id + */ + public function view($quote_id) + { + $this->load->helper('custom_values'); + $this->load->model('mdl_quote_items'); + $this->load->model('tax_rates/mdl_tax_rates'); + $this->load->model('units/mdl_units'); + $this->load->model('mdl_quote_tax_rates'); + $this->load->model('custom_fields/mdl_custom_fields'); + $this->load->model('custom_values/mdl_custom_values'); + $this->load->model('custom_fields/mdl_quote_custom'); + + $fields = $this->mdl_quote_custom->by_id($quote_id)->get()->result(); + $this->db->reset_query(); + + $quote_custom = $this->mdl_quote_custom->where('quote_id', $quote_id)->get(); + + if ($quote_custom->num_rows()) { + $quote_custom = $quote_custom->row(); + + unset($quote_custom->quote_id, $quote_custom->quote_custom_id); + + foreach ($quote_custom as $key => $val) { + $this->mdl_quotes->set_form_value('custom[' . $key . ']', $val); + } + } + + $quote = $this->mdl_quotes->get_by_id($quote_id); + + + if (!$quote) { + show_404(); + } + + $custom_fields = $this->mdl_custom_fields->by_table('ip_quote_custom')->get()->result(); + $custom_values = []; + foreach ($custom_fields as $custom_field) { + if (in_array($custom_field->custom_field_type, $this->mdl_custom_values->custom_value_fields())) { + $values = $this->mdl_custom_values->get_by_fid($custom_field->custom_field_id)->result(); + $custom_values[$custom_field->custom_field_id] = $values; + } + } + + foreach ($custom_fields as $cfield) { + foreach ($fields as $fvalue) { + if ($fvalue->quote_custom_fieldid == $cfield->custom_field_id) { + // TODO: Hackish, may need a better optimization + $this->mdl_quotes->set_form_value( + 'custom[' . $cfield->custom_field_id . ']', + $fvalue->quote_custom_fieldvalue + ); + break; + } + } + } + + $this->layout->set( + array( + 'quote' => $quote, + 'items' => $this->mdl_quote_items->where('quote_id', $quote_id)->get()->result(), + 'quote_id' => $quote_id, + 'tax_rates' => $this->mdl_tax_rates->get()->result(), + 'units' => $this->mdl_units->get()->result(), + 'quote_tax_rates' => $this->mdl_quote_tax_rates->where('quote_id', $quote_id)->get()->result(), + 'custom_fields' => $custom_fields, + 'custom_values' => $custom_values, + 'custom_js_vars' => array( + 'currency_symbol' => get_setting('currency_symbol'), + 'currency_symbol_placement' => get_setting('currency_symbol_placement'), + 'decimal_point' => get_setting('decimal_point') + ), + 'quote_statuses' => $this->mdl_quotes->statuses() + ) + ); + + $this->layout->buffer( + array( + array('modal_delete_quote', 'quotes/modal_delete_quote'), + array('modal_add_quote_tax', 'quotes/modal_add_quote_tax'), + array('content', 'quotes/view') + ) + ); + + $this->layout->render(); + } + + /** + * @param $quote_id + */ + public function delete($quote_id) + { + // Delete the quote + $this->mdl_quotes->delete($quote_id); + + // Redirect to quote index + redirect('quotes/index'); + } + + /** + * @param $quote_id + * @param $item_id + */ + public function delete_item($quote_id, $item_id) + { + // Delete quote item + $this->load->model('mdl_quote_items'); + $this->mdl_quote_items->delete($item_id); + + // Redirect to quote view + redirect('quotes/view/' . $quote_id); + } + + /** + * @param $quote_id + * @param bool $stream + * @param null $quote_template + */ + public function generate_pdf($quote_id, $stream = true, $quote_template = null) + { + $this->load->helper('pdf'); + + if (get_setting('mark_quotes_sent_pdf') == 1) { + $this->mdl_quotes->mark_sent($quote_id); + } + + generate_quote_pdf($quote_id, $stream, $quote_template); + } + + /** + * @param $quote_id + * @param $quote_tax_rate_id + */ + public function delete_quote_tax($quote_id, $quote_tax_rate_id) + { + $this->load->model('mdl_quote_tax_rates'); + $this->mdl_quote_tax_rates->delete($quote_tax_rate_id); + + $this->load->model('mdl_quote_amounts'); + $this->mdl_quote_amounts->calculate($quote_id); + + redirect('quotes/view/' . $quote_id); + } + + public function recalculate_all_quotes() + { + $this->db->select('quote_id'); + $quote_ids = $this->db->get('ip_quotes')->result(); + + $this->load->model('mdl_quote_amounts'); + + foreach ($quote_ids as $quote_id) { + $this->mdl_quote_amounts->calculate($quote_id->quote_id); + } + } + +} diff --git a/application/modules/quotes/models/Mdl_quote_amounts.php b/application/modules/quotes/models/Mdl_quote_amounts.php new file mode 100644 index 0000000..84e5f28 --- /dev/null +++ b/application/modules/quotes/models/Mdl_quote_amounts.php @@ -0,0 +1,302 @@ +db->query(" + SELECT SUM(item_subtotal) AS quote_item_subtotal, + SUM(item_tax_total) AS quote_item_tax_total, + SUM(item_subtotal) + SUM(item_tax_total) AS quote_total, + SUM(item_discount) AS quote_item_discount + FROM ip_quote_item_amounts + WHERE item_id + IN (SELECT item_id FROM ip_quote_items WHERE quote_id = " . $this->db->escape($quote_id) . ") + "); + + $quote_amounts = $query->row(); + + $quote_item_subtotal = $quote_amounts->quote_item_subtotal - $quote_amounts->quote_item_discount; + $quote_subtotal = $quote_item_subtotal + $quote_amounts->quote_item_tax_total; + $quote_total = $this->calculate_discount($quote_id, $quote_subtotal); + + // Create the database array and insert or update + $db_array = array( + 'quote_id' => $quote_id, + 'quote_item_subtotal' => $quote_item_subtotal, + 'quote_item_tax_total' => $quote_amounts->quote_item_tax_total, + 'quote_total' => $quote_total, + ); + + $this->db->where('quote_id', $quote_id); + if ($this->db->get('ip_quote_amounts')->num_rows()) { + // The record already exists; update it + $this->db->where('quote_id', $quote_id); + $this->db->update('ip_quote_amounts', $db_array); + } else { + // The record does not yet exist; insert it + $this->db->insert('ip_quote_amounts', $db_array); + } + + // Calculate the quote taxes + $this->calculate_quote_taxes($quote_id); + } + + /** + * @param $quote_id + * @param $quote_total + * @return float + */ + public function calculate_discount($quote_id, $quote_total) + { + $this->db->where('quote_id', $quote_id); + $quote_data = $this->db->get('ip_quotes')->row(); + + $total = (float)number_format($quote_total, 2, '.', ''); + $discount_amount = (float)number_format($quote_data->quote_discount_amount, 2, '.', ''); + $discount_percent = (float)number_format($quote_data->quote_discount_percent, 2, '.', ''); + + $total = $total - $discount_amount; + $total = $total - round(($total / 100 * $discount_percent), 2); + + return $total; + } + + /** + * @param $quote_id + */ + public function calculate_quote_taxes($quote_id) + { + // First check to see if there are any quote taxes applied + $this->load->model('quotes/mdl_quote_tax_rates'); + $quote_tax_rates = $this->mdl_quote_tax_rates->where('quote_id', $quote_id)->get()->result(); + + if ($quote_tax_rates) { + // There are quote taxes applied + // Get the current quote amount record + $quote_amount = $this->db->where('quote_id', $quote_id)->get('ip_quote_amounts')->row(); + + // Loop through the quote taxes and update the amount for each of the applied quote taxes + foreach ($quote_tax_rates as $quote_tax_rate) { + if ($quote_tax_rate->include_item_tax) { + // The quote tax rate should include the applied item tax + $quote_tax_rate_amount = ($quote_amount->quote_item_subtotal + $quote_amount->quote_item_tax_total) * ($quote_tax_rate->quote_tax_rate_percent / 100); + } else { + // The quote tax rate should not include the applied item tax + $quote_tax_rate_amount = $quote_amount->quote_item_subtotal * ($quote_tax_rate->quote_tax_rate_percent / 100); + } + + // Update the quote tax rate record + $db_array = array( + 'quote_tax_rate_amount' => $quote_tax_rate_amount + ); + $this->db->where('quote_tax_rate_id', $quote_tax_rate->quote_tax_rate_id); + $this->db->update('ip_quote_tax_rates', $db_array); + } + + // Update the quote amount record with the total quote tax amount + $this->db->query(" + UPDATE ip_quote_amounts SET quote_tax_total = + ( + SELECT SUM(quote_tax_rate_amount) + FROM ip_quote_tax_rates + WHERE quote_id = " . $this->db->escape($quote_id) . " + ) + WHERE quote_id = " . $this->db->escape($quote_id) + ); + + // Get the updated quote amount record + $quote_amount = $this->db->where('quote_id', $quote_id)->get('ip_quote_amounts')->row(); + + // Recalculate the quote total + $quote_total = $quote_amount->quote_item_subtotal + $quote_amount->quote_item_tax_total + $quote_amount->quote_tax_total; + + $quote_total = $this->calculate_discount($quote_id, $quote_total); + + // Update the quote amount record + $db_array = array( + 'quote_total' => $quote_total + ); + + $this->db->where('quote_id', $quote_id); + $this->db->update('ip_quote_amounts', $db_array); + } else { + // No quote taxes applied + + $db_array = array( + 'quote_tax_total' => '0.00' + ); + + $this->db->where('quote_id', $quote_id); + $this->db->update('ip_quote_amounts', $db_array); + } + } + + /** + * @param null $period + * @return mixed + */ + public function get_total_quoted($period = null) + { + switch ($period) { + case 'month': + return $this->db->query(" + SELECT SUM(quote_total) AS total_quoted + FROM ip_quote_amounts + WHERE quote_id IN + (SELECT quote_id FROM ip_quotes + WHERE MONTH(quote_date_created) = MONTH(NOW()) + AND YEAR(quote_date_created) = YEAR(NOW()))")->row()->total_quoted; + case 'last_month': + return $this->db->query(" + SELECT SUM(quote_total) AS total_quoted + FROM ip_quote_amounts + WHERE quote_id IN + (SELECT quote_id FROM ip_quotes + WHERE MONTH(quote_date_created) = MONTH(NOW() - INTERVAL 1 MONTH) + AND YEAR(quote_date_created) = YEAR(NOW() - INTERVAL 1 MONTH))")->row()->total_quoted; + case 'year': + return $this->db->query(" + SELECT SUM(quote_total) AS total_quoted + FROM ip_quote_amounts + WHERE quote_id IN + (SELECT quote_id FROM ip_quotes WHERE YEAR(quote_date_created) = YEAR(NOW()))")->row()->total_quoted; + case 'last_year': + return $this->db->query(" + SELECT SUM(quote_total) AS total_quoted + FROM ip_quote_amounts + WHERE quote_id IN + (SELECT quote_id FROM ip_quotes WHERE YEAR(quote_date_created) = YEAR(NOW() - INTERVAL 1 YEAR))")->row()->total_quoted; + default: + return $this->db->query("SELECT SUM(quote_total) AS total_quoted FROM ip_quote_amounts")->row()->total_quoted; + } + } + + /** + * @param string $period + * @return array + */ + public function get_status_totals($period = '') + { + switch ($period) { + default: + case 'this-month': + $results = $this->db->query(" + SELECT quote_status_id, + SUM(quote_total) AS sum_total, + COUNT(*) AS num_total + FROM ip_quote_amounts + JOIN ip_quotes ON ip_quotes.quote_id = ip_quote_amounts.quote_id + AND MONTH(ip_quotes.quote_date_created) = MONTH(NOW()) + AND YEAR(ip_quotes.quote_date_created) = YEAR(NOW()) + GROUP BY ip_quotes.quote_status_id")->result_array(); + break; + case 'last-month': + $results = $this->db->query(" + SELECT quote_status_id, + SUM(quote_total) AS sum_total, + COUNT(*) AS num_total + FROM ip_quote_amounts + JOIN ip_quotes ON ip_quotes.quote_id = ip_quote_amounts.quote_id + AND MONTH(ip_quotes.quote_date_created) = MONTH(NOW() - INTERVAL 1 MONTH) + AND YEAR(ip_quotes.quote_date_created) = YEAR(NOW()) + GROUP BY ip_quotes.quote_status_id")->result_array(); + break; + case 'this-quarter': + $results = $this->db->query(" + SELECT quote_status_id, + SUM(quote_total) AS sum_total, + COUNT(*) AS num_total + FROM ip_quote_amounts + JOIN ip_quotes ON ip_quotes.quote_id = ip_quote_amounts.quote_id + AND QUARTER(ip_quotes.quote_date_created) = QUARTER(NOW()) + AND YEAR(ip_quotes.quote_date_created) = YEAR(NOW()) + GROUP BY ip_quotes.quote_status_id")->result_array(); + break; + case 'last-quarter': + $results = $this->db->query(" + SELECT quote_status_id, + SUM(quote_total) AS sum_total, + COUNT(*) AS num_total + FROM ip_quote_amounts + JOIN ip_quotes ON ip_quotes.quote_id = ip_quote_amounts.quote_id + AND QUARTER(ip_quotes.quote_date_created) = QUARTER(NOW() - INTERVAL 1 QUARTER) + AND YEAR(ip_quotes.quote_date_created) = YEAR(NOW()) + GROUP BY ip_quotes.quote_status_id")->result_array(); + break; + case 'this-year': + $results = $this->db->query(" + SELECT quote_status_id, + SUM(quote_total) AS sum_total, + COUNT(*) AS num_total + FROM ip_quote_amounts + JOIN ip_quotes ON ip_quotes.quote_id = ip_quote_amounts.quote_id + AND YEAR(ip_quotes.quote_date_created) = YEAR(NOW()) + GROUP BY ip_quotes.quote_status_id")->result_array(); + break; + case 'last-year': + $results = $this->db->query(" + SELECT quote_status_id, + SUM(quote_total) AS sum_total, + COUNT(*) AS num_total + FROM ip_quote_amounts + JOIN ip_quotes ON ip_quotes.quote_id = ip_quote_amounts.quote_id + AND YEAR(ip_quotes.quote_date_created) = YEAR(NOW() - INTERVAL 1 YEAR) + GROUP BY ip_quotes.quote_status_id")->result_array(); + break; + } + + $return = array(); + + foreach ($this->mdl_quotes->statuses() as $key => $status) { + $return[$key] = array( + 'quote_status_id' => $key, + 'class' => $status['class'], + 'label' => $status['label'], + 'href' => $status['href'], + 'sum_total' => 0, + 'num_total' => 0 + ); + } + + foreach ($results as $result) { + $return[$result['quote_status_id']] = array_merge($return[$result['quote_status_id']], $result); + } + + return $return; + } + +} diff --git a/application/modules/quotes/models/Mdl_quote_item_amounts.php b/application/modules/quotes/models/Mdl_quote_item_amounts.php new file mode 100644 index 0000000..26e283e --- /dev/null +++ b/application/modules/quotes/models/Mdl_quote_item_amounts.php @@ -0,0 +1,55 @@ +load->model('quotes/mdl_quote_items'); + $item = $this->mdl_quote_items->get_by_id($item_id); + + $item_price = $item->item_price; + $item_subtotal = $item->item_quantity * $item_price; + $item_tax_total = $item_subtotal * ($item->item_tax_rate_percent / 100); + $item_discount_total = $item->item_discount_amount * $item->item_quantity; + $item_total = $item_subtotal + $item_tax_total - $item_discount_total; + + $db_array = array( + 'item_id' => $item_id, + 'item_subtotal' => $item_subtotal, + 'item_tax_total' => $item_tax_total, + 'item_discount' => $item_discount_total, + 'item_total' => $item_total, + ); + + $this->db->where('item_id', $item_id); + if ($this->db->get('ip_quote_item_amounts')->num_rows()) { + $this->db->where('item_id', $item_id); + $this->db->update('ip_quote_item_amounts', $db_array); + } else { + $this->db->insert('ip_quote_item_amounts', $db_array); + } + } + +} diff --git a/application/modules/quotes/models/Mdl_quote_items.php b/application/modules/quotes/models/Mdl_quote_items.php new file mode 100644 index 0000000..8afa995 --- /dev/null +++ b/application/modules/quotes/models/Mdl_quote_items.php @@ -0,0 +1,122 @@ +db->select('ip_quote_item_amounts.*, ip_quote_items.*, item_tax_rates.tax_rate_percent AS item_tax_rate_percent'); + } + + public function default_order_by() + { + $this->db->order_by('ip_quote_items.item_order'); + } + + public function default_join() + { + $this->db->join('ip_quote_item_amounts', 'ip_quote_item_amounts.item_id = ip_quote_items.item_id', 'left'); + $this->db->join('ip_tax_rates AS item_tax_rates', 'item_tax_rates.tax_rate_id = ip_quote_items.item_tax_rate_id', 'left'); + } + + /** + * @return array + */ + public function validation_rules() + { + return array( + 'quote_id' => array( + 'field' => 'quote_id', + 'label' => trans('quote'), + 'rules' => 'required' + ), + 'item_name' => array( + 'field' => 'item_name', + 'label' => trans('item_name'), + 'rules' => 'required' + ), + 'item_description' => array( + 'field' => 'item_description', + 'label' => trans('description') + ), + 'item_quantity' => array( + 'field' => 'item_quantity', + 'label' => trans('quantity'), + ), + 'item_price' => array( + 'field' => 'item_price', + 'label' => trans('price'), + ), + 'item_tax_rate_id' => array( + 'field' => 'item_tax_rate_id', + 'label' => trans('item_tax_rate') + ), + 'item_product_id' => array( + 'field' => 'item_product_id', + 'label' => trans('original_product') + ), + ); + } + + /** + * @param null $id + * @param null $db_array + * @return int|null + */ + public function save($id = null, $db_array = null) + { + $id = parent::save($id, $db_array); + + $this->load->model('quotes/mdl_quote_item_amounts'); + $this->mdl_quote_item_amounts->calculate($id); + + $this->load->model('quotes/mdl_quote_amounts'); + + if (is_object($db_array) && isset($db_array->quote_id)) { + $this->mdl_quote_amounts->calculate($db_array->quote_id); + } elseif (is_array($db_array) && isset($db_array['quote_id'])) { + $this->mdl_quote_amounts->calculate($db_array['quote_id']); + } + + return $id; + } + + /** + * @param int $item_id + */ + public function delete($item_id) + { + // Get the quote id so we can recalculate quote amounts + $this->db->select('quote_id'); + $this->db->where('item_id', $item_id); + $quote_id = $this->db->get('ip_quote_items')->row()->quote_id; + + // Delete the item + parent::delete($item_id); + + // Delete the item amounts + $this->db->where('item_id', $item_id); + $this->db->delete('ip_quote_item_amounts'); + + // Recalculate quote amounts + $this->load->model('quotes/mdl_quote_amounts'); + $this->mdl_quote_amounts->calculate($quote_id); + } + +} diff --git a/application/modules/quotes/models/Mdl_quote_tax_rates.php b/application/modules/quotes/models/Mdl_quote_tax_rates.php new file mode 100644 index 0000000..bd89a08 --- /dev/null +++ b/application/modules/quotes/models/Mdl_quote_tax_rates.php @@ -0,0 +1,76 @@ +db->select('ip_tax_rates.tax_rate_name AS quote_tax_rate_name'); + $this->db->select('ip_tax_rates.tax_rate_percent AS quote_tax_rate_percent'); + $this->db->select('ip_quote_tax_rates.*'); + } + + public function default_join() + { + $this->db->join('ip_tax_rates', 'ip_tax_rates.tax_rate_id = ip_quote_tax_rates.tax_rate_id'); + } + + /** + * @param null $id + * @param null $db_array + * @return void + */ + public function save($id = null, $db_array = null) + { + parent::save($id, $db_array); + + $this->load->model('quotes/mdl_quote_amounts'); + + $quote_id = $this->input->post('quote_id'); + + if ($quote_id) { + $this->mdl_quote_amounts->calculate($quote_id); + } + } + + /** + * @return array + * @return void + */ + public function validation_rules() + { + return array( + 'quote_id' => array( + 'field' => 'quote_id', + 'label' => trans('quote'), + 'rules' => 'required' + ), + 'tax_rate_id' => array( + 'field' => 'tax_rate_id', + 'label' => trans('tax_rate'), + 'rules' => 'required' + ), + 'include_item_tax' => array( + 'field' => 'include_item_tax', + 'label' => trans('tax_rate_placement'), + 'rules' => 'required' + ) + ); + } + +} diff --git a/application/modules/quotes/models/Mdl_quotes.php b/application/modules/quotes/models/Mdl_quotes.php new file mode 100644 index 0000000..da80015 --- /dev/null +++ b/application/modules/quotes/models/Mdl_quotes.php @@ -0,0 +1,496 @@ + array( + 'label' => trans('draft'), + 'class' => 'draft', + 'href' => 'quotes/status/draft' + ), + '2' => array( + 'label' => trans('sent'), + 'class' => 'sent', + 'href' => 'quotes/status/sent' + ), + '3' => array( + 'label' => trans('viewed'), + 'class' => 'viewed', + 'href' => 'quotes/status/viewed' + ), + '4' => array( + 'label' => trans('approved'), + 'class' => 'approved', + 'href' => 'quotes/status/approved' + ), + '5' => array( + 'label' => trans('rejected'), + 'class' => 'rejected', + 'href' => 'quotes/status/rejected' + ), + '6' => array( + 'label' => trans('canceled'), + 'class' => 'canceled', + 'href' => 'quotes/status/canceled' + ) + ); + } + + public function default_select() + { + $this->db->select(" + SQL_CALC_FOUND_ROWS + ip_users.user_name, + ip_users.user_company, + ip_users.user_address_1, + ip_users.user_address_2, + ip_users.user_city, + ip_users.user_state, + ip_users.user_zip, + ip_users.user_country, + ip_users.user_phone, + ip_users.user_fax, + ip_users.user_mobile, + ip_users.user_email, + ip_users.user_web, + ip_users.user_vat_id, + ip_users.user_tax_code, + ip_clients.*, + ip_quote_amounts.quote_amount_id, + IFnull(ip_quote_amounts.quote_item_subtotal, '0.00') AS quote_item_subtotal, + IFnull(ip_quote_amounts.quote_item_tax_total, '0.00') AS quote_item_tax_total, + IFnull(ip_quote_amounts.quote_tax_total, '0.00') AS quote_tax_total, + IFnull(ip_quote_amounts.quote_total, '0.00') AS quote_total, + ip_invoices.invoice_number, + ip_quotes.*", false); + } + + public function default_order_by() + { + $this->db->order_by('ip_quotes.quote_id DESC'); + } + + public function default_join() + { + $this->db->join('ip_clients', 'ip_clients.client_id = ip_quotes.client_id'); + $this->db->join('ip_users', 'ip_users.user_id = ip_quotes.user_id'); + $this->db->join('ip_quote_amounts', 'ip_quote_amounts.quote_id = ip_quotes.quote_id', 'left'); + $this->db->join('ip_invoices', 'ip_invoices.invoice_id = ip_quotes.invoice_id', 'left'); + } + + /** + * @return array + */ + public function validation_rules() + { + return array( + 'client_id' => array( + 'field' => 'client_id', + 'label' => trans('client'), + 'rules' => 'required' + ), + 'quote_date_created' => array( + 'field' => 'quote_date_created', + 'label' => trans('quote_date'), + 'rules' => 'required' + ), + 'invoice_group_id' => array( + 'field' => 'invoice_group_id', + 'label' => trans('quote_group'), + 'rules' => 'required' + ), + 'quote_password' => array( + 'field' => 'quote_password', + 'label' => trans('quote_password') + ), + 'user_id' => array( + 'field' => 'user_id', + 'label' => trans('user'), + 'rule' => 'required' + ) + ); + } + + /** + * @return array + */ + public function validation_rules_save_quote() + { + return array( + 'quote_number' => array( + 'field' => 'quote_number', + 'label' => trans('quote') . ' #', + 'rules' => 'is_unique[ip_quotes.quote_number' . (($this->id) ? '.quote_id.' . $this->id : '') . ']' + ), + 'quote_date_created' => array( + 'field' => 'quote_date_created', + 'label' => trans('date'), + 'rules' => 'required' + ), + 'quote_date_expires' => array( + 'field' => 'quote_date_expires', + 'label' => trans('due_date'), + 'rules' => 'required' + ), + 'quote_password' => array( + 'field' => 'quote_password', + 'label' => trans('quote_password') + ) + ); + } + + /** + * @param null $db_array + * @return int|null + */ + public function create($db_array = null) + { + $quote_id = parent::save(null, $db_array); + + // Create an quote amount record + $db_array = array( + 'quote_id' => $quote_id + ); + + $this->db->insert('ip_quote_amounts', $db_array); + + // Create the default invoice tax record if applicable + if (get_setting('default_invoice_tax_rate')) { + $db_array = array( + 'quote_id' => $quote_id, + 'tax_rate_id' => get_setting('default_invoice_tax_rate'), + 'include_item_tax' => get_setting('default_include_item_tax'), + 'quote_tax_rate_amount' => 0 + ); + + $this->db->insert('ip_quote_tax_rates', $db_array); + } + + return $quote_id; + } + + /** + * Copies quote items, tax rates, etc from source to target + * @param int $source_id + * @param int $target_id + */ + public function copy_quote($source_id, $target_id) + { + $this->load->model('quotes/mdl_quote_items'); + + $quote_items = $this->mdl_quote_items->where('quote_id', $source_id)->get()->result(); + + foreach ($quote_items as $quote_item) { + $db_array = array( + 'quote_id' => $target_id, + 'item_tax_rate_id' => $quote_item->item_tax_rate_id, + 'item_name' => $quote_item->item_name, + 'item_description' => $quote_item->item_description, + 'item_quantity' => $quote_item->item_quantity, + 'item_price' => $quote_item->item_price, + 'item_order' => $quote_item->item_order + ); + + $this->mdl_quote_items->save(null, $db_array); + } + + $quote_tax_rates = $this->mdl_quote_tax_rates->where('quote_id', $source_id)->get()->result(); + + foreach ($quote_tax_rates as $quote_tax_rate) { + $db_array = array( + 'quote_id' => $target_id, + 'tax_rate_id' => $quote_tax_rate->tax_rate_id, + 'include_item_tax' => $quote_tax_rate->include_item_tax, + 'quote_tax_rate_amount' => $quote_tax_rate->quote_tax_rate_amount + ); + + $this->mdl_quote_tax_rates->save(null, $db_array); + } + + // Copy the custom fields + $this->load->model('custom_fields/mdl_quote_custom'); + $db_array = $this->mdl_quote_custom->where('quote_id', $source_id)->get()->row_array(); + + if (count($db_array) > 2) { + unset($db_array['quote_custom_id']); + $db_array['quote_id'] = $target_id; + $this->mdl_quote_custom->save_custom($target_id, $db_array); + } + } + + /** + * @return array + */ + public function db_array() + { + $db_array = parent::db_array(); + + // Get the client id for the submitted quote + $this->load->model('clients/mdl_clients'); + $cid = $this->mdl_clients->where('ip_clients.client_id', $db_array['client_id'])->get()->row()->client_id; + $db_array['client_id'] = $cid; + + $db_array['quote_date_created'] = date_to_mysql($db_array['quote_date_created']); + $db_array['quote_date_expires'] = $this->get_date_due($db_array['quote_date_created']); + + $db_array['notes'] = get_setting('default_quote_notes'); + + if (!isset($db_array['quote_status_id'])) { + $db_array['quote_status_id'] = 1; + } + + $generate_quote_number = get_setting('generate_quote_number_for_draft'); + + if ($db_array['quote_status_id'] === 1 && $generate_quote_number == 1) { + $db_array['quote_number'] = $this->get_quote_number($db_array['invoice_group_id']); + } elseif ($db_array['quote_status_id'] != 1) { + $db_array['quote_number'] = $this->get_quote_number($db_array['invoice_group_id']); + } else { + $db_array['quote_number'] = ''; + } + + // Generate the unique url key + $db_array['quote_url_key'] = $this->get_url_key(); + + return $db_array; + } + + /** + * @param string $quote_date_created + */ + public function get_date_due($quote_date_created) + { + $quote_date_expires = new DateTime($quote_date_created); + $quote_date_expires->add(new DateInterval('P' . get_setting('quotes_expire_after') . 'D')); + return $quote_date_expires->format('Y-m-d'); + } + + /** + * @param $invoice_group_id + * @return mixed + */ + public function get_quote_number($invoice_group_id) + { + $this->load->model('invoice_groups/mdl_invoice_groups'); + return $this->mdl_invoice_groups->generate_invoice_number($invoice_group_id); + } + + /** + * @return string + */ + public function get_url_key() + { + $this->load->helper('string'); + return random_string('alnum', 15); + } + + /** + * @param $invoice_id + * @return mixed + */ + public function get_invoice_group_id($invoice_id) + { + $invoice = $this->get_by_id($invoice_id); + return $invoice->invoice_group_id; + } + + /** + * @param int $quote_id + */ + public function delete($quote_id) + { + parent::delete($quote_id); + + $this->load->helper('orphan'); + delete_orphans(); + } + + /** + * @return $this + */ + public function is_draft() + { + $this->filter_where('quote_status_id', 1); + return $this; + } + + /** + * @return $this + */ + public function is_sent() + { + $this->filter_where('quote_status_id', 2); + return $this; + } + + /** + * @return $this + */ + public function is_viewed() + { + $this->filter_where('quote_status_id', 3); + return $this; + } + + /** + * @return $this + */ + public function is_approved() + { + $this->filter_where('quote_status_id', 4); + return $this; + } + + /** + * @return $this + */ + public function is_rejected() + { + $this->filter_where('quote_status_id', 5); + return $this; + } + + /** + * @return $this + */ + public function is_canceled() + { + $this->filter_where('quote_status_id', 6); + return $this; + } + + /** + * Used by guest module; includes only sent and viewed + * + * @return $this + */ + public function is_open() + { + $this->filter_where_in('quote_status_id', array(2, 3)); + return $this; + } + + /** + * @return $this + */ + public function guest_visible() + { + $this->filter_where_in('quote_status_id', array(2, 3, 4, 5)); + return $this; + } + + /** + * @param $client_id + * @return $this + */ + public function by_client($client_id) + { + $this->filter_where('ip_quotes.client_id', $client_id); + return $this; + } + + /** + * @param $quote_url_key + */ + public function approve_quote_by_key($quote_url_key) + { + $this->db->where_in('quote_status_id', array(2, 3)); + $this->db->where('quote_url_key', $quote_url_key); + $this->db->set('quote_status_id', 4); + $this->db->update('ip_quotes'); + } + + /** + * @param $quote_url_key + */ + public function reject_quote_by_key($quote_url_key) + { + $this->db->where_in('quote_status_id', array(2, 3)); + $this->db->where('quote_url_key', $quote_url_key); + $this->db->set('quote_status_id', 5); + $this->db->update('ip_quotes'); + } + + /** + * @param $quote_id + */ + public function approve_quote_by_id($quote_id) + { + $this->db->where_in('quote_status_id', array(2, 3)); + $this->db->where('quote_id', $quote_id); + $this->db->set('quote_status_id', 4); + $this->db->update('ip_quotes'); + } + + /** + * @param $quote_id + */ + public function reject_quote_by_id($quote_id) + { + $this->db->where_in('quote_status_id', array(2, 3)); + $this->db->where('quote_id', $quote_id); + $this->db->set('quote_status_id', 5); + $this->db->update('ip_quotes'); + } + + /** + * @param $quote_id + */ + public function mark_viewed($quote_id) + { + $this->db->select('quote_status_id'); + $this->db->where('quote_id', $quote_id); + + $quote = $this->db->get('ip_quotes'); + + if ($quote->num_rows()) { + if ($quote->row()->quote_status_id == 2) { + $this->db->where('quote_id', $quote_id); + $this->db->set('quote_status_id', 3); + $this->db->update('ip_quotes'); + } + } + } + + /** + * @param $quote_id + */ + public function mark_sent($quote_id) + { + $this->db->select('quote_status_id'); + $this->db->where('quote_id', $quote_id); + + $quote = $this->db->get('ip_quotes'); + + if ($quote->num_rows()) { + if ($quote->row()->quote_status_id == 1) { + $this->db->where('quote_id', $quote_id); + $this->db->set('quote_status_id', 2); + $this->db->update('ip_quotes'); + } + } + } + +} diff --git a/application/modules/quotes/views/index.php b/application/modules/quotes/views/index.php new file mode 100644 index 0000000..d71c1d1 --- /dev/null +++ b/application/modules/quotes/views/index.php @@ -0,0 +1,103 @@ +
    + +

    + +
    + + + + +
    + +
    + uri->segment(3)), 'mdl_quotes'); ?> +
    + + + +
    + + + +
    + +
    + layout->load_view('quotes/partial_quote_table', array('quotes' => $quotes)); ?> +
    + +
    diff --git a/application/modules/quotes/views/modal_add_quote_tax.php b/application/modules/quotes/views/modal_add_quote_tax.php new file mode 100644 index 0000000..2efb448 --- /dev/null +++ b/application/modules/quotes/views/modal_add_quote_tax.php @@ -0,0 +1,77 @@ + + + diff --git a/application/modules/quotes/views/modal_change_client.php b/application/modules/quotes/views/modal_change_client.php new file mode 100644 index 0000000..4b32962 --- /dev/null +++ b/application/modules/quotes/views/modal_change_client.php @@ -0,0 +1,65 @@ + + + diff --git a/application/modules/quotes/views/modal_copy_quote.php b/application/modules/quotes/views/modal_copy_quote.php new file mode 100644 index 0000000..46ef47b --- /dev/null +++ b/application/modules/quotes/views/modal_copy_quote.php @@ -0,0 +1,102 @@ + + + diff --git a/application/modules/quotes/views/modal_create_quote.php b/application/modules/quotes/views/modal_create_quote.php new file mode 100644 index 0000000..3c8b8f0 --- /dev/null +++ b/application/modules/quotes/views/modal_create_quote.php @@ -0,0 +1,108 @@ + + + diff --git a/application/modules/quotes/views/modal_delete_quote.php b/application/modules/quotes/views/modal_delete_quote.php new file mode 100644 index 0000000..093a0b4 --- /dev/null +++ b/application/modules/quotes/views/modal_delete_quote.php @@ -0,0 +1,34 @@ + + + diff --git a/application/modules/quotes/views/modal_quote_to_invoice.php b/application/modules/quotes/views/modal_quote_to_invoice.php new file mode 100644 index 0000000..c686c1e --- /dev/null +++ b/application/modules/quotes/views/modal_quote_to_invoice.php @@ -0,0 +1,101 @@ + + + diff --git a/application/modules/quotes/views/partial_item_table.php b/application/modules/quotes/views/partial_item_table.php new file mode 100644 index 0000000..b0722d5 --- /dev/null +++ b/application/modules/quotes/views/partial_item_table.php @@ -0,0 +1,295 @@ +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    + + +
    +
    +
    + + +
    +
    +
    + + +
    +
    +
    + + +
    +
    +
    + + +
    +
    + + + +
    +
    + + +
    +
    +
    + + +
    +
    +
    + + item_subtotal); ?> + +
    +
    + + item_discount); ?> + +
    +
    + + item_tax_total); ?> + +
    +
    + + item_total); ?> + +
    +
    + +
    + +
    + + +

    + +
    + + + + + + + + + + + + + + + + + + + + + +
    quote_item_subtotal); ?>
    quote_item_tax_total); ?>
    + + + quote_id . '/' . $quote_tax_rate->quote_tax_rate_id, ''); + echo ' ' . htmlsc($quote_tax_rate->quote_tax_rate_name) . ' ' . format_amount($quote_tax_rate->quote_tax_rate_percent); ?> + %  + + quote_tax_rate_amount); ?> + + +
    +
    +
    + + +
    +
    +
    +
    +
    + +
    %
    +
    +
    +
    quote_total); ?>
    +
    + +
    diff --git a/application/modules/quotes/views/partial_quote_table.php b/application/modules/quotes/views/partial_quote_table.php new file mode 100644 index 0000000..3667a6d --- /dev/null +++ b/application/modules/quotes/views/partial_quote_table.php @@ -0,0 +1,92 @@ +
    + + + + + + + + + + + + + + + + 3 ? $quote_count / 2 : 9999; + + foreach ($quotes as $quote) { + // Convert the dropdown menu to a dropup if quote is after the invoice split + $dropup = $quote_idx > $quote_list_split ? true : false; + ?> + + + + + + + + + + + + +
    + + quote_status_id]['label']; ?> + + + + quote_number ? $quote->quote_number : $quote->quote_id); ?> + + + quote_date_created); ?> + + quote_date_expires); ?> + + + + + + quote_total); ?> + +
    + + + + +
    +
    +
    diff --git a/application/modules/quotes/views/view.php b/application/modules/quotes/views/view.php new file mode 100644 index 0000000..5c51b60 --- /dev/null +++ b/application/modules/quotes/views/view.php @@ -0,0 +1,403 @@ +controller->view_data["custom_values"]; +?> + + + + + +
    +

    + quote_number ? '#' . $quote->quote_number : $quote->quote_id); + ?> +

    + +
    +
    + + + + +
    + + + + + +
    + +
    + +
    + layout->load_view('layout/alerts'); ?> +
    +
    + +
    +
    + +

    + + + + quote_status_id == 1) { ?> + + +

    +
    +
    + layout->load_view('clients/partial_client_address', array('client' => $quote)); ?> +
    + client_phone || $quote->client_email) : ?> +
    + + client_phone): ?> +
    + :  + client_phone); ?> +
    + + client_email): ?> +
    + :  + client_email; ?> +
    + + +
    + +

    + +
    +
    +
    + +
    + +
    + + quote_number) : ?> value="quote_number; ?>" + placeholder="" + > +
    +
    + +
    + + + + +
    +
    +
    + +
    + + + + +
    +
    + + + + custom_field_location != 1) { + continue; + } ?> + mdl_quotes, $custom_field, $cv); ?> + + +
    +
    + +
    + + +
    +
    + + +
    + + quote_status_id != 1) { ?> +
    + +
    + + + + +
    +
    + + +
    + +
    +
    +
    +
    + +
    + + layout->load_view('quotes/partial_item_table'); ?> + +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +

    + +
    +
    + + layout->load_view('upload/dropzone-quote-html'); ?> + + + controller->view_data["custom_values"]; ?> +
    +
    + +
    + +
    +
    + +
    +
    +
    +
    + + + custom_field_location != 0) { + continue; + } ?> + + + mdl_quotes, $custom_field, $cv); ?> + + +
    +
    + + + custom_field_location != 0) { + continue; + } ?> + + + mdl_quotes, $custom_field, $cv); ?> + + +
    +
    +
    +
    +
    +
    + +
    + +
    + +layout->load_view('upload/dropzone-quote-scripts'); ?> diff --git a/application/modules/reports/controllers/Reports.php b/application/modules/reports/controllers/Reports.php new file mode 100644 index 0000000..4d2f3b7 --- /dev/null +++ b/application/modules/reports/controllers/Reports.php @@ -0,0 +1,105 @@ +load->model('mdl_reports'); + } + + public function sales_by_client() + { + + + if ($this->input->post('btn_submit')) { + $data = array( + 'results' => $this->mdl_reports->sales_by_client($this->input->post('from_date'), $this->input->post('to_date')), + 'from_date' => $this->input->post('from_date'), + 'to_date' => $this->input->post('to_date'), + ); + + $html = $this->load->view('reports/sales_by_client', $data, true); + + $this->load->helper('mpdf'); + + pdf_create($html, trans('sales_by_client'), true); + } + + $this->layout->buffer('content', 'reports/sales_by_client_index')->render(); + } + + public function payment_history() + { + if ($this->input->post('btn_submit')) { + $data = array( + 'results' => $this->mdl_reports->payment_history($this->input->post('from_date'), $this->input->post('to_date')), + 'from_date' => $this->input->post('from_date'), + 'to_date' => $this->input->post('to_date'), + ); + + $html = $this->load->view('reports/payment_history', $data, true); + + $this->load->helper('mpdf'); + + pdf_create($html, trans('payment_history'), true); + } + + $this->layout->buffer('content', 'reports/payment_history_index')->render(); + } + + public function invoice_aging() + { + if ($this->input->post('btn_submit')) { + $data = array( + 'results' => $this->mdl_reports->invoice_aging() + ); + + $html = $this->load->view('reports/invoice_aging', $data, true); + + $this->load->helper('mpdf'); + + pdf_create($html, trans('invoice_aging'), true); + } + + $this->layout->buffer('content', 'reports/invoice_aging_index')->render(); + } + + public function sales_by_year() + { + + if ($this->input->post('btn_submit')) { + $data = array( + 'results' => $this->mdl_reports->sales_by_year($this->input->post('from_date'), $this->input->post('to_date'), $this->input->post('minQuantity'), $this->input->post('maxQuantity'), $this->input->post('checkboxTax')), + 'from_date' => $this->input->post('from_date'), + 'to_date' => $this->input->post('to_date'), + ); + + $html = $this->load->view('reports/sales_by_year', $data, true); + + $this->load->helper('mpdf'); + + pdf_create($html, trans('sales_by_date'), true); + } + + $this->layout->buffer('content', 'reports/sales_by_year_index')->render(); + } + +} diff --git a/application/modules/reports/models/Mdl_reports.php b/application/modules/reports/models/Mdl_reports.php new file mode 100644 index 0000000..90b2f8f --- /dev/null +++ b/application/modules/reports/models/Mdl_reports.php @@ -0,0 +1,723 @@ +db->select('client_name, client_surname, CONCAT(client_name," ", client_surname) AS client_namesurname'); + + if ($from_date and $to_date) { + + $from_date = date_to_mysql($from_date); + $to_date = date_to_mysql($to_date); + + $this->db->select(" + ( + SELECT COUNT(*) FROM ip_invoices + WHERE ip_invoices.client_id = ip_clients.client_id + AND invoice_date_created >= " . $this->db->escape($from_date) . " + AND invoice_date_created <= " . $this->db->escape($to_date) . " + ) AS invoice_count"); + + $this->db->select(" + ( + SELECT SUM(invoice_item_subtotal) FROM ip_invoice_amounts + WHERE ip_invoice_amounts.invoice_id IN + ( + SELECT invoice_id FROM ip_invoices + WHERE ip_invoices.client_id = ip_clients.client_id + AND invoice_date_created >= " . $this->db->escape($from_date) . " + AND invoice_date_created <= " . $this->db->escape($to_date) . " + ) + ) AS sales"); + + $this->db->select(" + ( + SELECT SUM(invoice_total) FROM ip_invoice_amounts + WHERE ip_invoice_amounts.invoice_id IN + ( + SELECT invoice_id FROM ip_invoices + WHERE ip_invoices.client_id = ip_clients.client_id + AND invoice_date_created >= " . $this->db->escape($from_date) . " + AND invoice_date_created <= " . $this->db->escape($to_date) . " + ) + ) AS sales_with_tax"); + + $this->db->where(' + client_id IN + ( + SELECT client_id FROM ip_invoices + WHERE invoice_date_created >=' . $this->db->escape($from_date) . ' + AND invoice_date_created <= ' . $this->db->escape($to_date) . ' + )'); + + } else { + + $this->db->select(' + ( + SELECT COUNT(*) FROM ip_invoices + WHERE ip_invoices.client_id = ip_clients.client_id + ) AS invoice_count'); + + $this->db->select(' + ( + SELECT SUM(invoice_item_subtotal) FROM ip_invoice_amounts + WHERE ip_invoice_amounts.invoice_id IN + ( + SELECT invoice_id FROM ip_invoices + WHERE ip_invoices.client_id = ip_clients.client_id + ) + ) AS sales'); + + $this->db->select(' + ( + SELECT SUM(invoice_total) FROM ip_invoice_amounts + WHERE ip_invoice_amounts.invoice_id IN + ( + SELECT invoice_id FROM ip_invoices + WHERE ip_invoices.client_id = ip_clients.client_id + ) + ) AS sales_with_tax'); + + $this->db->where('client_id IN (SELECT client_id FROM ip_invoices)'); + + } + + $this->db->order_by('client_namesurname'); + + return $this->db->get('ip_clients')->result(); + } + + /** + * @param null $from_date + * @param null $to_date + * @return mixed + */ + public function payment_history($from_date = null, $to_date = null) + { + $this->load->model('payments/mdl_payments'); + + if ($from_date and $to_date) { + $from_date = date_to_mysql($from_date); + $to_date = date_to_mysql($to_date); + + $this->mdl_payments->where('payment_date >=', $from_date); + $this->mdl_payments->where('payment_date <=', $to_date); + } + + return $this->mdl_payments->get()->result(); + } + + /** + * @return mixed + */ + public function invoice_aging() + { + $this->db->select('client_name, client_surname'); + + $this->db->select(' + ( + SELECT SUM(invoice_balance) FROM ip_invoice_amounts + WHERE invoice_id IN + ( + SELECT invoice_id FROM ip_invoices + WHERE ip_invoices.client_id = ip_clients.client_id + AND invoice_date_due <= DATE_SUB(NOW(),INTERVAL 1 DAY) + AND invoice_date_due >= DATE_SUB(NOW(), INTERVAL 15 DAY) + ) + ) AS range_1', false); + + $this->db->select(' + ( + SELECT SUM(invoice_balance) FROM ip_invoice_amounts + WHERE invoice_id IN + ( + SELECT invoice_id FROM ip_invoices + WHERE ip_invoices.client_id = ip_clients.client_id + AND invoice_date_due <= DATE_SUB(NOW(),INTERVAL 16 DAY) + AND invoice_date_due >= DATE_SUB(NOW(), INTERVAL 30 DAY) + ) + ) AS range_2', false); + + $this->db->select(' + ( + SELECT SUM(invoice_balance) FROM ip_invoice_amounts + WHERE invoice_id IN + ( + SELECT invoice_id FROM ip_invoices + WHERE ip_invoices.client_id = ip_clients.client_id + AND invoice_date_due <= DATE_SUB(NOW(),INTERVAL 31 DAY) + ) + ) AS range_3', false); + + $this->db->select(' + ( + SELECT SUM(invoice_balance) FROM ip_invoice_amounts + WHERE invoice_id IN + ( + SELECT invoice_id FROM ip_invoices + WHERE ip_invoices.client_id = ip_clients.client_id + AND invoice_date_due <= DATE_SUB(NOW(), INTERVAL 1 DAY) + ) + ) AS total_balance', false); + + $this->db->having('range_1 >', 0); + $this->db->or_having('range_2 >', 0); + $this->db->or_having('range_3 >', 0); + $this->db->or_having('total_balance >', 0); + + return $this->db->get('ip_clients')->result(); + } + + /** + * @param null $from_date + * @param null $to_date + * @param null $minQuantity + * @param null $maxQuantity + * @param bool $taxChecked + * @return mixed + */ + public function sales_by_year($from_date = null, $to_date = null, $minQuantity = null, $maxQuantity = null, $taxChecked = False) + { + if ($minQuantity == "") { + $minQuantity = 0; + } + + if ($from_date == "") { + $from_date = date("Y-m-d"); + } else { + $from_date = date_to_mysql($from_date); + } + + if ($to_date == "") { + $to_date = date("Y-m-d"); + } else { + $to_date = date_to_mysql($to_date); + } + + $from_date_year = intval(substr($from_date, 0, 4)); + $to_date_year = intval(substr($to_date, 0, 4)); + + $this->db->select('client_name as Name'); + $this->db->select('client_name'); + $this->db->select('client_surname'); + $this->db->select('CONCAT(client_name," ", client_surname) AS client_namesurname'); + + if ($taxChecked == false) { + + if ($maxQuantity) { + + $this->db->select('client_id'); + $this->db->select('client_vat_id AS VAT_ID'); + $this->db->select(' + ( + SELECT SUM(amounts.invoice_item_subtotal) FROM ip_invoice_amounts amounts + WHERE amounts.invoice_id IN + ( + SELECT inv.invoice_id FROM ip_invoices inv + WHERE inv.client_id=ip_clients.client_id + AND ' . $this->db->escape($from_date) . '<= inv.invoice_date_created + AND ' . $this->db->escape($to_date) . '>= inv.invoice_date_created + ) + ) AS total_payment', false); + + for ($index = $from_date_year; $index <= $to_date_year; $index++) { + $this->db->select(' + ( + SELECT SUM(invoice_item_subtotal) FROM ip_invoice_amounts + WHERE invoice_id IN + ( + SELECT invoice_id FROM ip_invoices inv + WHERE inv.client_id=ip_clients.client_id + AND ' . $this->db->escape($from_date) . '<= inv.invoice_date_created + AND ' . $this->db->escape($to_date) . '>= inv.invoice_date_created + AND + ( + inv.invoice_date_created LIKE \'%' . $index . '-01-%\' + OR inv.invoice_date_created LIKE \'%' . $index . '-02-%\' + OR inv.invoice_date_created LIKE \'%' . $index . '-03-%\' + ) + ) + ) AS payment_t1_' . $index . '', false); + + $this->db->select(' + ( + SELECT SUM(invoice_item_subtotal) FROM ip_invoice_amounts + WHERE invoice_id IN + ( + SELECT invoice_id FROM ip_invoices inv + WHERE inv.client_id=ip_clients.client_id + AND ' . $this->db->escape($from_date) . '<= inv.invoice_date_created + AND ' . $this->db->escape($to_date) . '>= inv.invoice_date_created + AND + ( + inv.invoice_date_created LIKE \'%' . $index . '-04-%\' + OR inv.invoice_date_created LIKE \'%' . $index . '-05-%\' + OR inv.invoice_date_created LIKE \'%' . $index . '-06-%\' + ) + ) + ) AS payment_t2_' . $index . '', false); + + $this->db->select(' + ( + SELECT SUM(invoice_item_subtotal) FROM ip_invoice_amounts + WHERE invoice_id IN + ( + SELECT invoice_id FROM ip_invoices inv + WHERE inv.client_id=ip_clients.client_id + AND ' . $this->db->escape($from_date) . '<= inv.invoice_date_created + AND ' . $this->db->escape($to_date) . '>= inv.invoice_date_created + AND + ( + inv.invoice_date_created LIKE \'%' . $index . '-07-%\' + OR inv.invoice_date_created LIKE \'%' . $index . '-08-%\' + OR inv.invoice_date_created LIKE \'%' . $index . '-09-%\' + ) + ) + ) AS payment_t3_' . $index . '', false); + + $this->db->select(' + ( + SELECT SUM(invoice_item_subtotal) FROM ip_invoice_amounts + WHERE invoice_id IN + ( + SELECT invoice_id FROM ip_invoices inv + WHERE inv.client_id=ip_clients.client_id + AND ' . $this->db->escape($from_date) . '<= inv.invoice_date_created + AND ' . $this->db->escape($to_date) . '>= inv.invoice_date_created + AND + ( + inv.invoice_date_created LIKE \'%' . $index . '-10-%\' + OR inv.invoice_date_created LIKE \'%' . $index . '-11-%\' + OR inv.invoice_date_created LIKE \'%' . $index . '-12-%\' + ) + ) + ) AS payment_t4_' . $index . '', false); + + } + + $this->db->where(' + ( + SELECT SUM(amounts.invoice_item_subtotal) FROM ip_invoice_amounts amounts + WHERE amounts.invoice_id IN + ( + SELECT inv.invoice_id FROM ip_invoices inv + WHERE inv.client_id=ip_clients.client_id + AND ' . $this->db->escape($from_date) . ' <= inv.invoice_date_created + AND ' . $this->db->escape($to_date) . ' >= inv.invoice_date_created + AND ' . $minQuantity . ' <= + ( + SELECT SUM(amounts2.invoice_item_subtotal) FROM ip_invoice_amounts amounts2 + WHERE amounts2.invoice_id IN + ( + SELECT inv2.invoice_id FROM ip_invoices inv2 + WHERE inv2.client_id=ip_clients.client_id + AND ' . $this->db->escape($from_date) . ' <= inv2.invoice_date_created + AND ' . $this->db->escape($to_date) . ' >= inv2.invoice_date_created + ) + ) AND ' . $maxQuantity . ' >= + ( + SELECT SUM(amounts3.invoice_item_subtotal) FROM ip_invoice_amounts amounts3 + WHERE amounts3.invoice_id IN + ( + SELECT inv3.invoice_id FROM ip_invoices inv3 + WHERE inv3.client_id=ip_clients.client_id + AND ' . $this->db->escape($from_date) . ' <= inv3.invoice_date_created + AND ' . $this->db->escape($to_date) . ' >= inv3.invoice_date_created + ) + ) + ) + ) <>0'); + + } else { + + $this->db->select('client_id'); + $this->db->select('client_vat_id AS VAT_ID'); + $this->db->select('client_name as Name'); + + $this->db->select(' + ( + SELECT SUM(amounts.invoice_item_subtotal) FROM ip_invoice_amounts amounts + WHERE amounts.invoice_id IN + ( + SELECT inv.invoice_id FROM ip_invoices inv + WHERE inv.client_id=ip_clients.client_id + AND ' . $this->db->escape($from_date) . '<= inv.invoice_date_created + AND ' . $this->db->escape($to_date) . '>= inv.invoice_date_created + ) + ) AS total_payment', false); + + for ($index = $from_date_year; $index <= $to_date_year; $index++) { + + $this->db->select(' + ( + SELECT SUM(invoice_item_subtotal) FROM ip_invoice_amounts + WHERE invoice_id IN + ( + SELECT invoice_id FROM ip_invoices inv + WHERE inv.client_id=ip_clients.client_id + AND ' . $this->db->escape($from_date) . '<= inv.invoice_date_created + AND ' . $this->db->escape($to_date) . '>= inv.invoice_date_created + AND + ( + inv.invoice_date_created LIKE \'%' . $index . '-01-%\' + OR inv.invoice_date_created LIKE \'%' . $index . '-02-%\' + OR inv.invoice_date_created LIKE \'%' . $index . '-03-%\' + ) + ) + ) AS payment_t1_' . $index . '', false); + + $this->db->select(' + ( + SELECT SUM(invoice_item_subtotal) FROM ip_invoice_amounts + WHERE invoice_id IN + ( + SELECT invoice_id FROM ip_invoices inv + WHERE inv.client_id=ip_clients.client_id + AND ' . $this->db->escape($from_date) . '<= inv.invoice_date_created + AND ' . $this->db->escape($to_date) . '>= inv.invoice_date_created + AND + ( + inv.invoice_date_created LIKE \'%' . $index . '-04-%\' + OR inv.invoice_date_created LIKE \'%' . $index . '-05-%\' + OR inv.invoice_date_created LIKE \'%' . $index . '-06-%\' + ) + ) + ) AS payment_t2_' . $index . '', false); + + $this->db->select(' + ( + SELECT SUM(invoice_item_subtotal) FROM ip_invoice_amounts + WHERE invoice_id IN + ( + SELECT invoice_id FROM ip_invoices inv + WHERE inv.client_id=ip_clients.client_id + AND ' . $this->db->escape($from_date) . '<= inv.invoice_date_created + AND ' . $this->db->escape($to_date) . '>= inv.invoice_date_created + AND + ( + inv.invoice_date_created LIKE \'%' . $index . '-07-%\' + OR inv.invoice_date_created LIKE \'%' . $index . '-08-%\' + OR inv.invoice_date_created LIKE \'%' . $index . '-09-%\' + ) + ) + ) AS payment_t3_' . $index . '', false); + + $this->db->select(' + ( + SELECT SUM(invoice_item_subtotal) FROM ip_invoice_amounts + WHERE invoice_id IN + ( + SELECT invoice_id FROM ip_invoices inv + WHERE inv.client_id=ip_clients.client_id + AND ' . $this->db->escape($from_date) . '<= inv.invoice_date_created + AND ' . $this->db->escape($to_date) . '>= inv.invoice_date_created + AND + ( + inv.invoice_date_created LIKE \'%' . $index . '-10-%\' + OR inv.invoice_date_created LIKE \'%' . $index . '-11-%\' + OR inv.invoice_date_created LIKE \'%' . $index . '-12-%\' + ) + ) + ) AS payment_t4_' . $index . '', false); + + } + + $this->db->where(' + ( + SELECT SUM(amounts.invoice_item_subtotal) FROM ip_invoice_amounts amounts + WHERE amounts.invoice_id IN + ( + SELECT inv.invoice_id FROM ip_invoices inv + WHERE inv.client_id=ip_clients.client_id + AND ' . $this->db->escape($from_date) . ' <= inv.invoice_date_created + AND ' . $this->db->escape($to_date) . ' >= inv.invoice_date_created + AND ' . $minQuantity . ' <= + ( + SELECT SUM(amounts2.invoice_item_subtotal) FROM ip_invoice_amounts amounts2 + WHERE amounts2.invoice_id IN + ( + SELECT inv2.invoice_id FROM ip_invoices inv2 + WHERE inv2.client_id=ip_clients.client_id + AND ' . $this->db->escape($from_date) . ' <= inv2.invoice_date_created + AND ' . $this->db->escape($to_date) . ' >= inv2.invoice_date_created + ) + ) + ) + ) <>0'); + + } + + } else if ($taxChecked == true) { + + if ($maxQuantity) { + + $this->db->select('client_id'); + $this->db->select('client_vat_id AS VAT_ID'); + $this->db->select('client_name as Name'); + + $this->db->select(' + ( + SELECT SUM(amounts.invoice_total) FROM ip_invoice_amounts amounts + WHERE amounts.invoice_id IN + ( + SELECT inv.invoice_id FROM ip_invoices inv + WHERE inv.client_id=ip_clients.client_id + AND ' . $this->db->escape($from_date) . '<= inv.invoice_date_created + AND ' . $this->db->escape($to_date) . '>= inv.invoice_date_created + ) + ) AS total_payment', false); + + for ($index = $from_date_year; $index <= $to_date_year; $index++) { + + $this->db->select(' + ( + SELECT SUM(invoice_total) FROM ip_invoice_amounts + WHERE invoice_id IN + ( + SELECT invoice_id FROM ip_invoices inv + WHERE inv.client_id=ip_clients.client_id + AND ' . $this->db->escape($from_date) . '<= inv.invoice_date_created + AND ' . $this->db->escape($to_date) . '>= inv.invoice_date_created + AND + ( + inv.invoice_date_created LIKE \'%' . $index . '-01-%\' + OR inv.invoice_date_created LIKE \'%' . $index . '-02-%\' + OR inv.invoice_date_created LIKE \'%' . $index . '-03-%\' + ) + ) + ) AS payment_t1_' . $index . '', false); + + $this->db->select(' + ( + SELECT SUM(invoice_total) FROM ip_invoice_amounts + WHERE invoice_id IN + ( + SELECT invoice_id FROM ip_invoices inv + WHERE inv.client_id=ip_clients.client_id + AND ' . $this->db->escape($from_date) . '<= inv.invoice_date_created + AND ' . $this->db->escape($to_date) . '>= inv.invoice_date_created + AND + ( + inv.invoice_date_created LIKE \'%' . $index . '-04-%\' + OR inv.invoice_date_created LIKE \'%' . $index . '-05-%\' + OR inv.invoice_date_created LIKE \'%' . $index . '-06-%\' + ) + ) + ) AS payment_t2_' . $index . '', false); + + $this->db->select(' + ( + SELECT SUM(invoice_total) FROM ip_invoice_amounts + WHERE invoice_id IN + ( + SELECT invoice_id FROM ip_invoices inv + WHERE inv.client_id=ip_clients.client_id + AND ' . $this->db->escape($from_date) . '<= inv.invoice_date_created + AND ' . $this->db->escape($to_date) . '>= inv.invoice_date_created + AND + ( + inv.invoice_date_created LIKE \'%' . $index . '-07-%\' + OR inv.invoice_date_created LIKE \'%' . $index . '-08-%\' + OR inv.invoice_date_created LIKE \'%' . $index . '-09-%\' + ) + ) + ) AS payment_t3_' . $index . '', false); + + $this->db->select(' + ( + SELECT SUM(invoice_total) FROM ip_invoice_amounts + WHERE invoice_id IN + ( + SELECT invoice_id FROM ip_invoices inv + WHERE inv.client_id=ip_clients.client_id + AND ' . $this->db->escape($from_date) . '<= inv.invoice_date_created + AND ' . $this->db->escape($to_date) . '>= inv.invoice_date_created + AND + ( + inv.invoice_date_created LIKE \'%' . $index . '-10-%\' + OR inv.invoice_date_created LIKE \'%' . $index . '-11-%\' + OR inv.invoice_date_created LIKE \'%' . $index . '-12-%\' + ) + ) + ) AS payment_t4_' . $index . '', false); + + } + + $this->db->where(' + ( + SELECT SUM(amounts.invoice_total) FROM ip_invoice_amounts amounts + WHERE amounts.invoice_id IN + ( + SELECT inv.invoice_id FROM ip_invoices inv + WHERE inv.client_id=ip_clients.client_id + AND ' . $this->db->escape($from_date) . ' <= inv.invoice_date_created + AND ' . $this->db->escape($to_date) . ' >= inv.invoice_date_created + AND ' . $minQuantity . ' <= + ( + SELECT SUM(amounts2.invoice_total) FROM ip_invoice_amounts amounts2 + WHERE amounts2.invoice_id IN + ( + SELECT inv2.invoice_id FROM ip_invoices inv2 + WHERE inv2.client_id=ip_clients.client_id + AND ' . $this->db->escape($from_date) . ' <= inv2.invoice_date_created + AND ' . $this->db->escape($to_date) . ' >= inv2.invoice_date_created + ) + ) AND ' . $maxQuantity . ' >= + ( + SELECT SUM(amounts3.invoice_total) FROM ip_invoice_amounts amounts3 + WHERE amounts3.invoice_id IN + ( + SELECT inv3.invoice_id FROM ip_invoices inv3 + WHERE inv3.client_id=ip_clients.client_id + AND ' . $this->db->escape($from_date) . ' <= inv3.invoice_date_created + AND ' . $this->db->escape($to_date) . ' >= inv3.invoice_date_created + ) + ) + ) + ) <>0'); + + } else { + + $this->db->select('client_id'); + $this->db->select('client_vat_id AS VAT_ID'); + $this->db->select('client_name as Name'); + + $this->db->select(' + ( + SELECT SUM(amounts.invoice_total) FROM ip_invoice_amounts amounts + WHERE amounts.invoice_id IN + ( + SELECT inv.invoice_id FROM ip_invoices inv + WHERE inv.client_id=ip_clients.client_id + AND ' . $this->db->escape($from_date) . '<= inv.invoice_date_created + AND ' . $this->db->escape($to_date) . '>= inv.invoice_date_created + ) + ) AS total_payment', false); + + for ($index = $from_date_year; $index <= $to_date_year; $index++) { + + $this->db->select(' + ( + SELECT SUM(invoice_total) FROM ip_invoice_amounts + WHERE invoice_id IN + ( + SELECT invoice_id FROM ip_invoices inv + WHERE inv.client_id=ip_clients.client_id + AND ' . $this->db->escape($from_date) . '<= inv.invoice_date_created + AND ' . $this->db->escape($to_date) . '>= inv.invoice_date_created + AND + ( + inv.invoice_date_created LIKE \'%' . $index . '-01-%\' + OR inv.invoice_date_created LIKE \'%' . $index . '-02-%\' + OR inv.invoice_date_created LIKE \'%' . $index . '-03-%\' + ) + ) + ) AS payment_t1_' . $index . '', false); + + $this->db->select(' + ( + SELECT SUM(invoice_total) FROM ip_invoice_amounts + WHERE invoice_id IN + ( + SELECT invoice_id FROM ip_invoices inv + WHERE inv.client_id=ip_clients.client_id + AND ' . $this->db->escape($from_date) . '<= inv.invoice_date_created + AND ' . $this->db->escape($to_date) . '>= inv.invoice_date_created + AND + ( + inv.invoice_date_created LIKE \'%' . $index . '-04-%\' + OR inv.invoice_date_created LIKE \'%' . $index . '-05-%\' + OR inv.invoice_date_created LIKE \'%' . $index . '-06-%\' + ) + ) + ) AS payment_t2_' . $index . '', false); + + $this->db->select(' + ( + SELECT SUM(invoice_total) FROM ip_invoice_amounts + WHERE invoice_id IN + ( + SELECT invoice_id FROM ip_invoices inv + WHERE inv.client_id=ip_clients.client_id + AND ' . $this->db->escape($from_date) . '<= inv.invoice_date_created + AND ' . $this->db->escape($to_date) . '>= inv.invoice_date_created + AND + ( + inv.invoice_date_created LIKE \'%' . $index . '-07-%\' + OR inv.invoice_date_created LIKE \'%' . $index . '-08-%\' + OR inv.invoice_date_created LIKE \'%' . $index . '-09-%\' + ) + ) + ) AS payment_t3_' . $index . '', false); + + $this->db->select(' + ( + SELECT SUM(invoice_total) FROM ip_invoice_amounts + WHERE invoice_id IN + ( + SELECT invoice_id FROM ip_invoices inv + WHERE inv.client_id=ip_clients.client_id + AND ' . $this->db->escape($from_date) . '<= inv.invoice_date_created + AND ' . $this->db->escape($to_date) . '>= inv.invoice_date_created + AND + ( + inv.invoice_date_created LIKE \'%' . $index . '-10-%\' + OR inv.invoice_date_created LIKE \'%' . $index . '-11-%\' + OR inv.invoice_date_created LIKE \'%' . $index . '-12-%\' + ) + ) + ) AS payment_t4_' . $index . '', false); + + } + + $this->db->where(' + ( + SELECT SUM(amounts.invoice_total) FROM ip_invoice_amounts amounts + WHERE amounts.invoice_id IN + ( + SELECT inv.invoice_id FROM ip_invoices inv + WHERE inv.client_id=ip_clients.client_id + AND ' . $this->db->escape($from_date) . ' <= inv.invoice_date_created + AND ' . $this->db->escape($to_date) . ' >= inv.invoice_date_created + AND ' . $minQuantity . ' <= + ( + SELECT SUM(amounts2.invoice_total) FROM ip_invoice_amounts amounts2 + WHERE amounts2.invoice_id IN + ( + SELECT inv2.invoice_id FROM ip_invoices inv2 + WHERE inv2.client_id=ip_clients.client_id + AND ' . $this->db->escape($from_date) . ' <= inv2.invoice_date_created + AND ' . $this->db->escape($to_date) . ' >= inv2.invoice_date_created + ) + ) + ) + ) <>0'); + + } + + } + + $this->db->order_by('client_namesurname'); + return $this->db->get('ip_clients')->result(); + } + +} diff --git a/application/modules/reports/views/invoice_aging_index.php b/application/modules/reports/views/invoice_aging_index.php new file mode 100644 index 0000000..4749a1b --- /dev/null +++ b/application/modules/reports/views/invoice_aging_index.php @@ -0,0 +1,36 @@ +
    +

    +
    + +
    + +
    +
    + + layout->load_view('layout/alerts'); ?> + +
    + +
    + + +
    + +
    +
    > + + + + + +
    +
    + +
    + +
    +
    + +
    diff --git a/application/modules/reports/views/payment_history_index.php b/application/modules/reports/views/payment_history_index.php new file mode 100644 index 0000000..13d89b9 --- /dev/null +++ b/application/modules/reports/views/payment_history_index.php @@ -0,0 +1,65 @@ +
    +

    +
    + +
    + +
    +
    + + layout->load_view('layout/alerts'); ?> + +
    + +
    + + +
    + +
    + +
    > + + + +
    + + +
    + + + + +
    +
    + +
    + + +
    + + + + +
    +
    + + + +
    + +
    + +
    + +
    +
    + +
    diff --git a/application/modules/reports/views/sales_by_client_index.php b/application/modules/reports/views/sales_by_client_index.php new file mode 100644 index 0000000..1238766 --- /dev/null +++ b/application/modules/reports/views/sales_by_client_index.php @@ -0,0 +1,64 @@ +
    +

    +
    + +
    + +
    +
    + + layout->load_view('layout/alerts'); ?> + +
    + +
    + + +
    + +
    + +
    > + + + +
    + + +
    + + + + +
    +
    + +
    + + +
    + + + + +
    +
    + + + +
    + +
    + +
    + +
    +
    + +
    diff --git a/application/modules/reports/views/sales_by_year_index.php b/application/modules/reports/views/sales_by_year_index.php new file mode 100644 index 0000000..aea8ee9 --- /dev/null +++ b/application/modules/reports/views/sales_by_year_index.php @@ -0,0 +1,93 @@ +
    +

    +
    + +
    + +
    +
    + + layout->load_view('layout/alerts'); ?> + +
    + +
    + + +
    + +
    + +
    > + + + +
    + + +
    + + + + +
    +
    + +
    + + +
    + + + + +
    +
    + + +
    +
    + + +
    + +
    +
    + +
    + + +
    + +
    +
    +
    + +
    +
    + +
    +
    + + + +
    +
    +
    + +
    diff --git a/application/modules/sessions/controllers/Sessions.php b/application/modules/sessions/controllers/Sessions.php new file mode 100644 index 0000000..498b725 --- /dev/null +++ b/application/modules/sessions/controllers/Sessions.php @@ -0,0 +1,236 @@ + get_setting('login_logo') + ); + + if ($this->input->post('btn_login')) { + + $this->db->where('user_email', $this->input->post('email')); + $query = $this->db->get('ip_users'); + $user = $query->row(); + + // Check if the user exists + if (empty($user)) { + $this->session->set_flashdata('alert_error', trans('loginalert_user_not_found')); + redirect('sessions/login'); + } else { + + // Check if the user is marked as active + if ($user->user_active == 0) { + $this->session->set_flashdata('alert_error', trans('loginalert_user_inactive')); + redirect('sessions/login'); + } else { + + if ($this->authenticate($this->input->post('email'), $this->input->post('password'))) { + if ($this->session->userdata('user_type') == 1) { + redirect('dashboard'); + } elseif ($this->session->userdata('user_type') == 2) { + redirect('guest'); + } + } else { + $this->session->set_flashdata('alert_error', trans('loginalert_credentials_incorrect')); + redirect('sessions/login'); + } + + } + + } + + } + + $this->load->view('session_login', $view_data); + } + + /** + * @param $email_address + * @param $password + * @return bool + */ + public function authenticate($email_address, $password) + { + $this->load->model('mdl_sessions'); + + if ($this->mdl_sessions->auth($email_address, $password)) { + return true; + } + + return false; + } + + public function logout() + { + $this->session->sess_destroy(); + + redirect('sessions/login'); + } + + /** + * @param null $token + * @return mixed + */ + public function passwordreset($token = null) + { + // Check if a token was provided + if ($token) { + $this->db->where('user_passwordreset_token', $token); + $user = $this->db->get('ip_users'); + $user = $user->row(); + + if (empty($user)) { + // Redirect back to the login screen with an alert + $this->session->set_flashdata('alert_error', trans('wrong_passwordreset_token')); + redirect('sessions/passwordreset'); + } + + $formdata = array( + 'token' => $token, + 'user_id' => $user->user_id, + ); + + return $this->load->view('session_new_password', $formdata); + } + + // Check if the form for a new password was used + if ($this->input->post('btn_new_password')) { + $new_password = $this->input->post('new_password'); + $user_id = $this->input->post('user_id'); + + if (empty($user_id) || empty($new_password)) { + $this->session->set_flashdata('alert_error', trans('loginalert_no_password')); + redirect($_SERVER['HTTP_REFERER']); + } + + $this->load->model('users/mdl_users'); + + // Check for the reset token + $user = $this->mdl_users->get_by_id($user_id); + + if (empty($user)) { + $this->session->set_flashdata('alert_error', trans('loginalert_user_not_found')); + redirect($_SERVER['HTTP_REFERER']); + } + + if (empty($user->user_passwordreset_token) || $this->input->post('token') !== $user->user_passwordreset_token) { + $this->session->set_flashdata('alert_error', trans('loginalert_wrong_auth_code')); + redirect($_SERVER['HTTP_REFERER']); + } + + // Call the save_change_password() function from users model + $this->mdl_users->save_change_password( + $user_id, $new_password + ); + + // Update the user and set him active again + $db_array = array( + 'user_passwordreset_token' => '', + ); + + $this->db->where('user_id', $user_id); + $this->db->update('ip_users', $db_array); + + // Redirect back to the login form + redirect('sessions/login'); + + } + + // Check if the password reset form was used + if ($this->input->post('btn_reset')) { + $email = $this->input->post('email'); + + if (empty($email)) { + $this->session->set_flashdata('alert_error', trans('loginalert_user_not_found')); + redirect($_SERVER['HTTP_REFERER']); + } + + // Test if a user with this email exists + if ($this->db->where('user_email', $email)) { + // Create a passwordreset token + $email = $this->input->post('email'); + $token = md5(time() . $email); + + // Save the token to the database and set the user to inactive + $db_array = array( + 'user_passwordreset_token' => $token, + ); + + $this->db->where('user_email', $email); + $this->db->update('ip_users', $db_array); + + // Send the email with reset link + $this->load->helper('mailer'); + + // Preprare some variables for the email + $email_resetlink = site_url('sessions/passwordreset/' . $token); + $email_message = $this->load->view('emails/passwordreset', array( + 'resetlink' => $email_resetlink + ), true); + $email_from = 'system@' . preg_replace("/^[\w]{2,6}:\/\/([\w\d\.\-]+).*$/", "$1", base_url()); + + // Mail the invoice with the pre-configured mailer if possible + if (mailer_configured()) { + + $this->load->helper('mailer/phpmailer'); + + if (!phpmail_send($email_from, $email, trans('password_reset'), $email_message)) { + $email_failed = true; + } + + } else { + + $this->load->library('email'); + + // Set email configuration + $config['mailtype'] = 'html'; + $this->email->initialize($config); + + // Set the email params + $this->email->from($email_from); + $this->email->to($email); + $this->email->subject(trans('password_reset')); + $this->email->message($email_message); + + // Send the reset email + if (!$this->email->send()) { + $email_failed = true; + log_message('error', $this->email->print_debugger()); + } + } + + // Redirect back to the login screen with an alert + if (isset($email_failed)) { + $this->session->set_flashdata('alert_error', trans('password_reset_failed')); + } else { + $this->session->set_flashdata('alert_success', trans('email_successfully_sent')); + } + + redirect('sessions/login'); + } + } + + return $this->load->view('session_passwordreset'); + } + +} diff --git a/application/modules/sessions/models/Mdl_sessions.php b/application/modules/sessions/models/Mdl_sessions.php new file mode 100644 index 0000000..47362b7 --- /dev/null +++ b/application/modules/sessions/models/Mdl_sessions.php @@ -0,0 +1,89 @@ +db->where('user_email', $email); + + $query = $this->db->get('ip_users'); + + if ($query->num_rows()) { + $user = $query->row(); + + $this->load->library('crypt'); + + /** + * Password hashing changed after 1.2.0 + * Check to see if user has logged in since the password change + */ + if (!$user->user_psalt) { + /** + * The user has not logged in, so we're going to attempt to + * update their record with the updated hash + */ + if (md5($password) == $user->user_password) { + /** + * The md5 login validated - let's update this user + * to the new hash + */ + $salt = $this->crypt->salt(); + $hash = $this->crypt->generate_password($password, $salt); + + $db_array = array( + 'user_psalt' => $salt, + 'user_password' => $hash + ); + + $this->db->where('user_id', $user->user_id); + $this->db->update('ip_users', $db_array); + + $this->db->where('user_email', $email); + $user = $this->db->get('ip_users')->row(); + + } else { + /** + * The password didn't verify against original md5 + */ + return false; + } + } + + if ($this->crypt->check_password($user->user_password, $password)) { + $session_data = array( + 'user_type' => $user->user_type, + 'user_id' => $user->user_id, + 'user_name' => $user->user_name, + 'user_email' => $user->user_email, + 'user_company' => $user->user_company, + 'user_language' => isset($user->user_language) ? $user->user_language : 'system', + ); + + $this->session->set_userdata($session_data); + + return true; + } + } + + return false; + } + +} diff --git a/application/modules/sessions/views/session_login.php b/application/modules/sessions/views/session_login.php new file mode 100644 index 0000000..0a38885 --- /dev/null +++ b/application/modules/sessions/views/session_login.php @@ -0,0 +1,88 @@ + + + + + + + + + + + <?php + if (get_setting('custom_title') != '') { + echo get_setting('custom_title'); + } else { + echo 'InvoicePlane'; + } ?> + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + + + + +

    + + +
    layout->load_view('layout/alerts'); ?>
    + +
    + + + +
    + + value=""> +
    + +
    + + value=""> +
    + + + + + + + + +
    + +
    +
    + + + diff --git a/application/modules/sessions/views/session_new_password.php b/application/modules/sessions/views/session_new_password.php new file mode 100644 index 0000000..dc1e445 --- /dev/null +++ b/application/modules/sessions/views/session_new_password.php @@ -0,0 +1,79 @@ + + + + + + + + + + + <?php + if (get_setting('custom_title') != '') { + echo get_setting('custom_title'); + } else { + echo 'InvoicePlane'; + } ?> + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +

    + +
    + +
    layout->load_view('layout/alerts'); ?>
    + +
    + + + + + + +
    + + +
    + + + + + +
    + +
    + +
    + + + diff --git a/application/modules/sessions/views/session_passwordreset.php b/application/modules/sessions/views/session_passwordreset.php new file mode 100644 index 0000000..56355ac --- /dev/null +++ b/application/modules/sessions/views/session_passwordreset.php @@ -0,0 +1,79 @@ + + + + + + + + + + + <?php + if (get_setting('custom_title') != '') { + echo get_setting('custom_title'); + } else { + echo 'InvoicePlane'; + } ?> + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +
    layout->load_view('layout/alerts'); ?>
    + +

    + +
    + +

    + +
    + + + +
    + + +
    + + + + + +
    + +
    + +
    + + + diff --git a/application/modules/settings/controllers/Ajax.php b/application/modules/settings/controllers/Ajax.php new file mode 100644 index 0000000..ac0c1df --- /dev/null +++ b/application/modules/settings/controllers/Ajax.php @@ -0,0 +1,35 @@ +load->helper('string'); + echo random_string('alnum', 16); + } + + public function test_mail() + { + $this->load->helper('mailer'); + email_invoice(1, 'InvoicePlane', 'denys@denv.it', 'denys@denv.it', 'Test', 'Some text'); + } + +} diff --git a/application/modules/settings/controllers/Settings.php b/application/modules/settings/controllers/Settings.php new file mode 100644 index 0000000..0bec98f --- /dev/null +++ b/application/modules/settings/controllers/Settings.php @@ -0,0 +1,181 @@ +load->model('mdl_settings'); + $this->load->library('crypt'); + $this->load->library('form_validation'); + } + + public function index() + { + // Get the payment gateway configurations + $this->config->load('payment_gateways'); + $gateways = $this->config->item('payment_gateways'); + + // Save input if request is POSt + if ($this->input->post('settings')) { + $settings = $this->input->post('settings'); + + // Only execute if the setting is different + if ($settings['tax_rate_decimal_places'] != get_setting('tax_rate_decimal_places')) { + $this->db->query(" + ALTER TABLE `ip_tax_rates` CHANGE `tax_rate_percent` `tax_rate_percent` + DECIMAL( 5, {$settings['tax_rate_decimal_places']} ) NOT null" + ); + } + + // Save the submitted settings + foreach ($settings as $key => $value) { + if (strpos($key, 'field_is_password') !== false || strpos($key, 'field_is_amount') !== false) { + // Skip all meta fields + continue; + } + + if (isset($settings[$key . '_field_is_password']) && empty($value)) { + // Password field, but empty value, let's skip it + continue; + } + + if (isset($settings[$key . '_field_is_password']) && $value != '') { + // Encrypt passwords but don't save empty passwords + $this->mdl_settings->save($key, $this->crypt->encode(trim($value))); + + } elseif (isset($settings[$key . '_field_is_amount'])) { + + // Format amount inputs + $this->mdl_settings->save($key, standardize_amount($value)); + + } else { + + $this->mdl_settings->save($key, $value); + + } + } + + $upload_config = array( + 'upload_path' => './uploads/', + 'allowed_types' => 'gif|jpg|jpeg|png|svg', + 'max_size' => '9999', + 'max_width' => '9999', + 'max_height' => '9999' + ); + + // Check for invoice logo upload + if ($_FILES['invoice_logo']['name']) { + $this->load->library('upload', $upload_config); + + if (!$this->upload->do_upload('invoice_logo')) { + $this->session->set_flashdata('alert_error', $this->upload->display_errors()); + redirect('settings'); + } + + $upload_data = $this->upload->data(); + + $this->mdl_settings->save('invoice_logo', $upload_data['file_name']); + } + + // Check for login logo upload + if ($_FILES['login_logo']['name']) { + $this->load->library('upload', $upload_config); + + if (!$this->upload->do_upload('login_logo')) { + $this->session->set_flashdata('alert_error', $this->upload->display_errors()); + redirect('settings'); + } + + $upload_data = $this->upload->data(); + + $this->mdl_settings->save('login_logo', $upload_data['file_name']); + } + + $this->session->set_flashdata('alert_success', trans('settings_successfully_saved')); + + redirect('settings'); + } + + // Load required resources + $this->load->model('invoice_groups/mdl_invoice_groups'); + $this->load->model('tax_rates/mdl_tax_rates'); + $this->load->model('email_templates/mdl_email_templates'); + $this->load->model('settings/mdl_versions'); + $this->load->model('payment_methods/mdl_payment_methods'); + $this->load->model('invoices/mdl_templates'); + + $this->load->helper('country'); + + // Collect the list of templates + $pdf_invoice_templates = $this->mdl_templates->get_invoice_templates('pdf'); + $public_invoice_templates = $this->mdl_templates->get_invoice_templates('public'); + $pdf_quote_templates = $this->mdl_templates->get_quote_templates('pdf'); + $public_quote_templates = $this->mdl_templates->get_quote_templates('public'); + + // Get all themes + $available_themes = $this->mdl_settings->get_themes(); + + // Get the current version + $current_version = $this->mdl_versions->limit(1)->where('version_sql_errors', 0)->get()->row()->version_file; + $current_version = str_replace('.sql', '', substr($current_version, strpos($current_version, '_') + 1)); + + // Set data in the layout + $this->layout->set( + array( + 'invoice_groups' => $this->mdl_invoice_groups->get()->result(), + 'tax_rates' => $this->mdl_tax_rates->get()->result(), + 'payment_methods' => $this->mdl_payment_methods->get()->result(), + 'public_invoice_templates' => $public_invoice_templates, + 'pdf_invoice_templates' => $pdf_invoice_templates, + 'public_quote_templates' => $public_quote_templates, + 'pdf_quote_templates' => $pdf_quote_templates, + 'languages' => get_available_languages(), + 'countries' => get_country_list(trans('cldr')), + 'date_formats' => date_formats(), + 'current_date' => new DateTime(), + 'available_themes' => $available_themes, + 'email_templates_quote' => $this->mdl_email_templates->where('email_template_type', 'quote')->get()->result(), + 'email_templates_invoice' => $this->mdl_email_templates->where('email_template_type', 'invoice')->get()->result(), + 'gateway_drivers' => $gateways, + 'gateway_currency_codes' => \Omnipay\Common\Currency::all(), + 'current_version' => $current_version, + 'first_days_of_weeks' => array('0' => lang('sunday'), '1' => lang('monday')) + ) + ); + + $this->layout->buffer('content', 'settings/index'); + $this->layout->render(); + } + + /** + * @param $type + */ + public function remove_logo($type) + { + unlink('./uploads/' . get_setting($type . '_logo')); + + $this->mdl_settings->save($type . '_logo', ''); + + $this->session->set_flashdata('alert_success', lang($type . '_logo_removed')); + + redirect('settings'); + } +} diff --git a/application/modules/settings/controllers/Versions.php b/application/modules/settings/controllers/Versions.php new file mode 100644 index 0000000..f9cc462 --- /dev/null +++ b/application/modules/settings/controllers/Versions.php @@ -0,0 +1,41 @@ +load->model('mdl_versions'); + } + + /** + * @param int $page + */ + public function index($page = 0) + { + $this->mdl_versions->paginate(site_url('versions/index'), $page); + $versions = $this->mdl_versions->result(); + + $this->layout->set('versions', $versions); + $this->layout->buffer('content', 'settings/versions'); + $this->layout->render(); + } + +} diff --git a/application/modules/settings/models/Mdl_settings.php b/application/modules/settings/models/Mdl_settings.php new file mode 100644 index 0000000..114fe16 --- /dev/null +++ b/application/modules/settings/models/Mdl_settings.php @@ -0,0 +1,134 @@ + $key, + 'setting_value' => $value, + ); + + if ($this->get($key) !== null) { + $this->db->where('setting_key', $key); + $this->db->update('ip_settings', $db_array); + } else { + $this->db->insert('ip_settings', $db_array); + } + } + + /** + * @param $key + * @return null + */ + public function get($key) + { + $this->db->select('setting_value'); + $this->db->where('setting_key', $key); + $query = $this->db->get('ip_settings'); + + if ($query->row()) { + return $query->row()->setting_value; + } else { + return null; + } + } + + /** + * @param $key + */ + public function delete($key) + { + $this->db->where('setting_key', $key); + $this->db->delete('ip_settings'); + } + + public function load_settings() + { + $ip_settings = $this->db->get('ip_settings')->result(); + + foreach ($ip_settings as $data) { + $this->settings[$data->setting_key] = $data->setting_value; + } + } + + /** + * @param $key + * @param string $default + * @return mixed|string + */ + public function setting($key, $default = '') + { + return (isset($this->settings[$key])) ? $this->settings[$key] : $default; + } + + /** + * @param string $key + * @return mixed|string + */ + public function gateway_settings($key) + { + return $this->db->like('setting_key', 'gateway_' . strtolower($key), 'after')->get('ip_settings')->result(); + } + + /** + * @param $key + * @param $value + */ + public function set_setting($key, $value) + { + $this->settings[$key] = $value; + } + + /** + * Returns all available themes + * @return array + */ + public function get_themes() + { + $this->load->helper('directory'); + + $found_folders = directory_map(THEME_FOLDER, 1); + + $themes = []; + + foreach ($found_folders as $theme) { + if ($theme == 'core') { + continue; + } + + // Get the theme info file + $theme = str_replace('/', '', $theme); + $info_path = THEME_FOLDER . $theme . '/'; + $info_file = $theme . '.theme'; + + if (file_exists($info_path . $info_file)) { + $theme_info = new \Dotenv\Dotenv($info_path, $info_file); + $theme_info->overload(); + $themes[$theme] = env('TITLE'); + } + } + + return $themes; + } + +} diff --git a/application/modules/settings/models/Mdl_versions.php b/application/modules/settings/models/Mdl_versions.php new file mode 100644 index 0000000..400b44f --- /dev/null +++ b/application/modules/settings/models/Mdl_versions.php @@ -0,0 +1,31 @@ +db->select('SQL_CALC_FOUND_ROWS *', false); + } + + public function default_order_by() + { + $this->db->order_by('ip_versions.version_date_applied DESC, ip_versions.version_file DESC'); + } + +} diff --git a/application/modules/settings/views/index.php b/application/modules/settings/views/index.php new file mode 100644 index 0000000..dcc00b2 --- /dev/null +++ b/application/modules/settings/views/index.php @@ -0,0 +1,93 @@ + + +
    +

    + layout->load_view('layout/header_buttons', array('hide_cancel_button' => true)); ?> +
    + + + +
    + + + +
    + +
    + +
    + layout->load_view('layout/alerts'); ?> +
    + +
    + layout->load_view('settings/partial_settings_general'); ?> +
    + +
    + layout->load_view('settings/partial_settings_invoices'); ?> +
    + +
    + layout->load_view('settings/partial_settings_quotes'); ?> +
    + +
    + layout->load_view('settings/partial_settings_taxes'); ?> +
    + +
    + layout->load_view('settings/partial_settings_email'); ?> +
    + +
    + layout->load_view('settings/partial_settings_online_payment'); ?> +
    + +
    + layout->load_view('settings/partial_settings_projects_tasks'); ?> +
    + +
    + layout->load_view('settings/partial_settings_updates'); ?> +
    + +
    + +
    + +
    diff --git a/application/modules/settings/views/partial_settings_email.php b/application/modules/settings/views/partial_settings_email.php new file mode 100644 index 0000000..f67f21b --- /dev/null +++ b/application/modules/settings/views/partial_settings_email.php @@ -0,0 +1,158 @@ + + +
    + +
    +
    + +
    +
    + +
    +
    + +
    + + +
    + +
    + + +
    + +
    +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + + +
    + +
    +
    + + +
    +
    + +
    + + +
    + +
    + + +
    + +
    + +
    +
    + +
    +
    + +
    diff --git a/application/modules/settings/views/partial_settings_general.php b/application/modules/settings/views/partial_settings_general.php new file mode 100644 index 0000000..73dd341 --- /dev/null +++ b/application/modules/settings/views/partial_settings_general.php @@ -0,0 +1,453 @@ + + +
    + +
    +
    + +
    +
    + +
    +
    +
    + + +
    +
    + +
    +
    + + +
    +
    +
    + +
    +
    +
    + + +
    +
    + +
    +
    + + +
    +
    +
    + +
    +
    +
    + + +
    +
    +
    + +
    +
    + + +
    +
    + +
    +
    + +
    +
    +
    + + +
    +
    + +
    +
    + + +
    +
    +
    + +
    +
    +
    + + +
    +
    + +
    +
    + + +
    +
    +
    + +
    +
    +
    + + +
    +
    + +
    +
    + + +
    +
    +
    + +
    +
    + + +
    +
    + +
    +
    + +
    +
    +
    + + +
    +
    + +
    +
    + + +
    +
    +
    + +
    +
    +
    + + +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    + + +
    +
    + +
    +
    + + +
    +
    +
    + +
    +
    + +
    + + + +

    + : + + + +

    +
    + +
    + + +
    +
    + + +
    + +
    +
    + +
    + + +
    + + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    + + + +

    +
    + +
    +
    + +
    + +
    + +
    + +
    +
    +
    + +
    +
    + +
    +
    + +
    diff --git a/application/modules/settings/views/partial_settings_invoices.php b/application/modules/settings/views/partial_settings_invoices.php new file mode 100644 index 0000000..de0e2d4 --- /dev/null +++ b/application/modules/settings/views/partial_settings_invoices.php @@ -0,0 +1,459 @@ +
    + +
    +
    + +
    +
    + +
    +
    + +
    + + +
    + +
    + + +
    + +
    +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    + + +
    + +
    + + +
    + +
    + + +

    +
    + +
    +
    + +
    + + + +
    +
    + + +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    +
    + +
    +
    + +
    + + +

    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    + + +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    + + +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    + + +

    +
    + +
    + + +

    +
    +
    +
    +
    + + +
    + +
    + + +
    + +
    + + +
    +
    +
    + +
    +
    + +
    diff --git a/application/modules/settings/views/partial_settings_online_payment.php b/application/modules/settings/views/partial_settings_online_payment.php new file mode 100644 index 0000000..b711eee --- /dev/null +++ b/application/modules/settings/views/partial_settings_online_payment.php @@ -0,0 +1,152 @@ + + +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    + + +
    + +
    +
    + + $fields) : + $d = strtolower($driver); + ?> +
    + +
    + +
    +
    + +
    +
    +
    + +
    + + $setting) { ?> + + +
    + +
    + + + +
    + + + value="crypt->decode(get_setting('gateway_' . $d . '_' . $key)); ?>" + + value="" + + > + + + +
    + + + + +
    + +
    + + +
    + +
    + + +
    + +
    + +
    + + +
    diff --git a/application/modules/settings/views/partial_settings_projects_tasks.php b/application/modules/settings/views/partial_settings_projects_tasks.php new file mode 100644 index 0000000..ac7fd7e --- /dev/null +++ b/application/modules/settings/views/partial_settings_projects_tasks.php @@ -0,0 +1,49 @@ +
    + +
    +
    + +
    +
    + +
    +
    + +
    + + +
    + +
    +
    + +
    + +
    + + + +
    +
    + +
    +
    + +
    +
    + +
    diff --git a/application/modules/settings/views/partial_settings_quotes.php b/application/modules/settings/views/partial_settings_quotes.php new file mode 100644 index 0000000..0276f13 --- /dev/null +++ b/application/modules/settings/views/partial_settings_quotes.php @@ -0,0 +1,158 @@ +
    + +
    +
    + +
    +
    + +
    +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    +
    + +
    + + +
    + +
    + + +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    + + +
    + +
    + + +
    + +
    +
    + +
    + + +
    + +
    +
    + +
    +
    + +
    diff --git a/application/modules/settings/views/partial_settings_taxes.php b/application/modules/settings/views/partial_settings_taxes.php new file mode 100644 index 0000000..2cba44c --- /dev/null +++ b/application/modules/settings/views/partial_settings_taxes.php @@ -0,0 +1,66 @@ +
    + +
    +
    + +
    +
    + +
    +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    +
    + +
    +
    + +
    diff --git a/application/modules/settings/views/partial_settings_updates.php b/application/modules/settings/views/partial_settings_updates.php new file mode 100644 index 0000000..198963f --- /dev/null +++ b/application/modules/settings/views/partial_settings_updates.php @@ -0,0 +1,105 @@ + + +
    + +
    +
    + +
    +
    + +
    + +
    +
    +
    + +
    + + + + + + +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    + +
    +
    + +
    +
    + +
    diff --git a/application/modules/settings/views/versions.php b/application/modules/settings/views/versions.php new file mode 100644 index 0000000..73ded7a --- /dev/null +++ b/application/modules/settings/views/versions.php @@ -0,0 +1,36 @@ +
    +

    + +
    + +
    +
    + +
    + +
    + + + + + + + + + + + + + + + + + + + + +
    version_date_applied); ?>version_file; ?>version_sql_errors; ?>
    +
    + +
    + diff --git a/application/modules/setup/controllers/Setup.php b/application/modules/setup/controllers/Setup.php new file mode 100644 index 0000000..86181a7 --- /dev/null +++ b/application/modules/setup/controllers/Setup.php @@ -0,0 +1,443 @@ +load->library('session'); + + $this->load->helper('file'); + $this->load->helper('directory'); + $this->load->helper('url'); + $this->load->helper('language'); + $this->load->helper('trans'); + $this->load->helper('settings'); + $this->load->helper('echo'); + + $this->load->model('mdl_setup'); + + $this->load->module('layout'); + + if (!$this->session->userdata('ip_lang')) { + $this->session->set_userdata('ip_lang', 'english'); + } else { + set_language($this->session->userdata('ip_lang')); + } + + $this->lang->load('ip', $this->session->userdata('ip_lang')); + } + + public function index() + { + redirect('setup/language'); + } + + public function language() + { + if ($this->input->post('btn_continue')) { + $this->session->set_userdata('ip_lang', $this->input->post('ip_lang')); + $this->session->set_userdata('install_step', 'prerequisites'); + redirect('setup/prerequisites'); + } + + // Reset the session cache + $this->session->unset_userdata('install_step'); + $this->session->unset_userdata('is_upgrade'); + + // Get all languages + $languages = get_available_languages(); + $this->layout->set('languages', $languages); + + $this->layout->buffer('content', 'setup/language'); + $this->layout->render('setup'); + } + + public function prerequisites() + { + if ($this->session->userdata('install_step') <> 'prerequisites') { + redirect('setup/language'); + } + + if ($this->input->post('btn_continue')) { + $this->session->set_userdata('install_step', 'configure_database'); + redirect('setup/configure_database'); + } + + $this->layout->set( + array( + 'basics' => $this->check_basics(), + 'writables' => $this->check_writables(), + 'errors' => $this->errors + ) + ); + + $this->layout->buffer('content', 'setup/prerequisites'); + $this->layout->render('setup'); + } + + /** + * @return array + */ + private function check_basics() + { + $checks = array(); + + $php_required = '5.6'; + $php_installed = PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION; + + if ($php_installed < $php_required) { + $this->errors += 1; + + $checks[] = array( + 'message' => sprintf(trans('php_version_fail'), $php_installed, $php_required), + 'success' => 0 + ); + } else { + $checks[] = array( + 'message' => trans('php_version_success'), + 'success' => 1 + ); + } + + if (!ini_get('date.timezone')) { + $checks[] = array( + 'message' => sprintf(trans('php_timezone_fail'), date_default_timezone_get()), + 'success' => 1, + 'warning' => 1 + ); + } else { + $checks[] = array( + 'message' => trans('php_timezone_success'), + 'success' => 1 + ); + } + + return $checks; + } + + /** + * @return array + */ + private function check_writables() + { + $checks = array(); + + $writables = array( + './ipconfig.php', + './uploads', + './uploads/archive', + './uploads/customer_files', + './uploads/temp', + './uploads/temp/mpdf', + './application/logs', + ); + + foreach ($writables as $writable) { + if (!is_writable($writable)) { + $checks[] = array( + 'message' => $writable . ' ' . trans('is_not_writable'), + 'success' => 0 + ); + + $this->errors += 1; + } else { + $checks[] = array( + 'message' => $writable . ' ' . trans('is_writable'), + 'success' => 1 + ); + } + } + + return $checks; + } + + public function configure_database() + { + if ($this->session->userdata('install_step') <> 'configure_database') { + redirect('setup/prerequisites'); + } + + if ($this->input->post('btn_continue')) { + $this->load_ci_database(); + + // This might be an upgrade - check if it is + if (!$this->db->table_exists('ip_versions')) { + // This appears to be an install + $this->session->set_userdata('install_step', 'install_tables'); + redirect('setup/install_tables'); + } else { + // This appears to be an upgrade + $this->session->set_userdata('is_upgrade', true); + $this->session->set_userdata('install_step', 'upgrade_tables'); + redirect('setup/upgrade_tables'); + } + } + + if ($this->input->post('db_hostname')) { + // Write a new database configuration to the ipconfig.php file + $this->write_database_config( + $this->input->post('db_hostname'), + $this->input->post('db_username'), + $this->input->post('db_password'), + $this->input->post('db_database'), + $this->input->post('db_port') + ); + } + + // Check if the set credentials are correct + $check_database = $this->check_database(); + + $this->layout->set('database', $check_database); + $this->layout->set('errors', $this->errors); + $this->layout->buffer('content', 'setup/configure_database'); + $this->layout->render('setup'); + } + + /** + * Load the database connection trough CodeIgniter + */ + private function load_ci_database() + { + $this->load->database(); + } + + /** + * @param $hostname + * @param $username + * @param $password + * @param $database + * @param int $port + */ + private function write_database_config($hostname, $username, $password, $database, $port = 3306) + { + $config = file_get_contents(IPCONFIG_FILE); + + $config = preg_replace("/DB_HOSTNAME=(.*)?/", "DB_HOSTNAME=" . $hostname, $config); + $config = preg_replace("/DB_USERNAME=(.*)?/", "DB_USERNAME=" . $username, $config); + $config = preg_replace("/DB_PASSWORD=(.*)?/", "DB_PASSWORD=" . $password, $config); + $config = preg_replace("/DB_DATABASE=(.*)?/", "DB_DATABASE=" . $database, $config); + $config = preg_replace("/DB_PORT=(.*)?/", "DB_PORT=" . $port, $config); + + write_file(IPCONFIG_FILE, $config); + } + + /** + * @return array + */ + private function check_database() + { + // Reload the ipconfig.php file + global $dotenv; + $dotenv->overload(); + + // Load the database config and configure it to test the connection + include(APPPATH . 'config/database.php'); + $db = $db['default']; + $db['autoinit'] = false; + $db['db_debug'] = false; + + // Check if there is some configuration set + if (empty($db['hostname'])) { + $this->errors += 1; + + return array( + 'message' => trans('cannot_connect_database_server'), + 'success' => false, + ); + } + + // Initialize the database connection, turn off automatic error reporting to display connection issues manually + error_reporting(0); + $db_object = $this->load->database($db, true); + + // Try to initialize the database connection + $can_connect = $db_object->conn_id ? true : false; + + if (!$can_connect) { + $this->errors += 1; + + return array( + 'message' => trans('setup_db_cannot_connect'), + 'success' => false, + ); + } + + return array( + 'message' => trans('database_properly_configured'), + 'success' => true, + ); + } + + public function install_tables() + { + if ($this->session->userdata('install_step') <> 'install_tables') { + redirect('setup/prerequisites'); + } + + if ($this->input->post('btn_continue')) { + $this->session->set_userdata('install_step', 'upgrade_tables'); + redirect('setup/upgrade_tables'); + } + + $this->load_ci_database(); + + $this->layout->set( + array( + 'success' => $this->mdl_setup->install_tables(), + 'errors' => $this->mdl_setup->errors + ) + ); + + $this->layout->buffer('content', 'setup/install_tables'); + $this->layout->render('setup'); + } + + public function upgrade_tables() + { + if ($this->session->userdata('install_step') <> 'upgrade_tables') { + redirect('setup/prerequisites'); + } + + if ($this->input->post('btn_continue')) { + if (!$this->session->userdata('is_upgrade')) { + $this->session->set_userdata('install_step', 'create_user'); + redirect('setup/create_user'); + } else { + $this->session->set_userdata('install_step', 'complete'); + redirect('setup/complete'); + } + } + + $this->load_ci_database(); + + // Set a new encryption key if none exists + if (env('ENCRYPTION_KEY') === null) { + $this->set_encryption_key(); + } + + $this->layout->set( + array( + 'success' => $this->mdl_setup->upgrade_tables(), + 'errors' => $this->mdl_setup->errors + ) + ); + + $this->layout->buffer('content', 'setup/upgrade_tables'); + $this->layout->render('setup'); + } + + /** + * Set a new encryption key in the ipconfig.php file + */ + private function set_encryption_key() + { + $length = (env('ENCRYPTION_CIPHER') == 'AES-256' ? 32 : 16); + + if (function_exists('random_bytes')) { + $key = 'base64:' . base64_encode(random_bytes($length)); + } else { + $key = 'base64:' . base64_encode(openssl_random_pseudo_bytes($length)); + } + + $config = file_get_contents(IPCONFIG_FILE); + $config = preg_replace("/ENCRYPTION_KEY=(.*)?/", "ENCRYPTION_KEY=" . $key, $config); + write_file(IPCONFIG_FILE, $config); + } + + public function create_user() + { + if ($this->session->userdata('install_step') <> 'create_user') { + redirect('setup/prerequisites'); + } + + $this->load_ci_database(); + + $this->load->model('users/mdl_users'); + + $this->load->helper('country'); + + if ($this->mdl_users->run_validation()) { + $db_array = $this->mdl_users->db_array(); + $db_array['user_type'] = 1; + + $this->mdl_users->save(null, $db_array); + + $this->session->set_userdata('install_step', 'complete'); + redirect('setup/complete'); + } + + $this->layout->set( + array( + 'countries' => get_country_list(trans('cldr')), + 'languages' => get_available_languages(), + ) + ); + $this->layout->buffer('content', 'setup/create_user'); + $this->layout->render('setup'); + } + + public function complete() + { + if ($this->session->userdata('install_step') <> 'complete') { + redirect('setup/prerequisites'); + } + + // Additional tasks after setup is completed + $this->post_setup_tasks(); + + // Check if this is an update or the first install + // First get all version entries from the database and format them + $this->load_ci_database(); + $versions = $this->db->query('SELECT * FROM ip_versions'); + if ($versions->num_rows() > 0) { + foreach ($versions->result() as $row): + $data[] = $row; + endforeach; + } + + // Then check if the first version entry is less than 30 minutes old + // If yes we assume that the user ran the setup a few minutes ago + if ($data[0]->version_date_applied < (time() - 1800)) { + $update = true; + } else { + $update = false; + } + $this->layout->set('update', $update); + + $this->layout->buffer('content', 'setup/complete'); + $this->layout->render('setup'); + } + + private function post_setup_tasks() + { + // Set SETUP_COMPLETED to true + $config = file_get_contents(IPCONFIG_FILE); + $config = preg_replace("/SETUP_COMPLETED=(.*)?/", "SETUP_COMPLETED=true", $config); + write_file(IPCONFIG_FILE, $config); + } + +} diff --git a/application/modules/setup/models/Mdl_setup.php b/application/modules/setup/models/Mdl_setup.php new file mode 100644 index 0000000..7d7b42b --- /dev/null +++ b/application/modules/setup/models/Mdl_setup.php @@ -0,0 +1,346 @@ +execute_contents($file_contents); + + $this->save_version('000_1.0.0.sql'); + + if ($this->errors) { + return false; + } + + $this->install_default_data(); + + $this->install_default_settings(); + + return true; + } + + /** + * @param string $contents + */ + private function execute_contents($contents) + { + $commands = explode(';', $contents); + + foreach ($commands as $command) { + if (trim($command)) { + if (!$this->db->query(trim($command) . ';')) { + $this->errors[] = $this->db->_error_message(); + } + } + } + } + + /** + * @param $sql_file + */ + private function save_version($sql_file) + { + $version_db_array = array( + 'version_date_applied' => time(), + 'version_file' => $sql_file, + 'version_sql_errors' => count($this->errors) + ); + + $this->db->insert('ip_versions', $version_db_array); + } + + /** + * + */ + public function install_default_data() + { + $this->db->insert('ip_invoice_groups', array( + 'invoice_group_name' => 'Invoice Default', + 'invoice_group_next_id' => 1) + ); + + $this->db->insert('ip_invoice_groups', array( + 'invoice_group_name' => 'Quote Default', + 'invoice_group_prefix' => 'QUO', + 'invoice_group_next_id' => 1) + ); + + $this->db->insert('ip_payment_methods', array( + 'payment_method_name' => 'Cash', + )); + + $this->db->insert('ip_payment_methods', array( + 'payment_method_name' => 'Credit Card', + )); + } + + /** + * + */ + private function install_default_settings() + { + $this->load->helper('string'); + + $default_settings = array( + 'default_language' => $this->session->userdata('ip_lang'), + 'date_format' => 'm/d/Y', + 'currency_symbol' => '$', + 'currency_symbol_placement' => 'before', + 'currency_code' => 'USD', + 'invoices_due_after' => 30, + 'quotes_expire_after' => 15, + 'default_invoice_group' => 3, + 'default_quote_group' => 4, + 'thousands_separator' => ',', + 'decimal_point' => '.', + 'cron_key' => random_string('alnum', 16), + 'tax_rate_decimal_places' => 2, + 'pdf_invoice_template' => 'InvoicePlane', + 'pdf_invoice_template_paid' => 'InvoicePlane - paid', + 'pdf_invoice_template_overdue' => 'InvoicePlane - overdue', + 'pdf_quote_template' => 'InvoicePlane', + 'public_invoice_template' => 'InvoicePlane_Web', + 'public_quote_template' => 'InvoicePlane_Web', + 'disable_sidebar' => 1, + ); + + foreach ($default_settings as $setting_key => $setting_value) { + $this->db->where('setting_key', $setting_key); + + if (!$this->db->get('ip_settings')->num_rows()) { + $db_array = array( + 'setting_key' => $setting_key, + 'setting_value' => $setting_value + ); + + $this->db->insert('ip_settings', $db_array); + } + } + } + + /** + * @return bool + */ + public function upgrade_tables() + { + // Collect the available SQL files + $sql_files = directory_map(APPPATH . 'modules/setup/sql', true); + + // Sort them so they're in natural order + sort($sql_files); + + // Unset the installer + unset($sql_files[0]); + + // Loop through the files and take appropriate action + foreach ($sql_files as $sql_file) { + if (substr($sql_file, -4) == '.sql') { + // $this->db->select('COUNT(*) AS update_applied'); + $this->db->where('version_file', $sql_file); + // $update_applied = $this->db->get('ip_versions')->row()->update_applied; + $update_applied = $this->db->get('ip_versions'); + + // if (!$update_applied) + if (!$update_applied->num_rows()) { + $file_contents = file_get_contents(APPPATH . 'modules/setup/sql/' . $sql_file); + + $this->execute_contents($file_contents); + + $this->save_version($sql_file); + + // Check for any required upgrade methods + $upgrade_method = 'upgrade_' . str_replace('.', '_', substr($sql_file, 0, -4)); + + if (method_exists($this, $upgrade_method)) { + $this->$upgrade_method(); + } + } + } + } + + if ($this->errors) { + return false; + } + + $this->install_default_settings(); + + return true; + } + + /** + * =========================================== + * Place upgrade functions here + * e.g. if table rows have to be converted + * public function upgrade_010_1_0_1() { ... } + */ + + public function upgrade_006_1_2_0() + { + /* Update alert to notify about the changes with invoice deletion and credit invoices + * but only display the warning when the previous version is 1.1.2 or lower and it's an update + * therefore check if it's an update, if the time difference between v1.1.2 and v1.2.0 is + * greater than 100 and if v1.2.0 was not installed within this update process + */ + $this->db->where_in("version_file", array("006_1.2.0.sql", "005_1.1.2.sql")); + $versions = $this->db->get('ip_versions')->result(); + $upgrade_diff = $versions[1]->version_date_applied - $versions[0]->version_date_applied; + + if ($this->session->userdata('is_upgrade') && $upgrade_diff > 100 && $versions[1]->version_date_applied > (time() - 100)) { + $setup_notice = array( + 'type' => 'alert-danger', + 'content' => trans('setup_v120_alert'), + ); + $this->session->set_userdata('setup_notice', $setup_notice); + } + } + + public function upgrade_019_1_4_7() + { + /* Update alert to set the session configuration $config['sess_use_database'] = false to true + * but only display the warning when the previous version is 1.4.6 or lower and it's an update + * (see above for details) + */ + $this->db->where_in("version_file", array("018_1.4.6.sql", "019_1.4.7.sql")); + $versions = $this->db->get('ip_versions')->result(); + $upgrade_diff = $versions[1]->version_date_applied - $versions[0]->version_date_applied; + + if ($this->session->userdata('is_upgrade') && $upgrade_diff > 100 && $versions[1]->version_date_applied > (time() - 100)) { + $setup_notice = array( + 'type' => 'alert-danger', + 'content' => trans('setup_v147_alert'), + ); + $this->session->set_userdata('setup_notice', $setup_notice); + } + } + + public function upgrade_023_1_5_0() + { + $res = $this->db->query('SELECT * FROM ip_custom_fields'); + $drop_columns = array(); + + $tables = array( + 'client', + 'invoice', + 'quote', + 'payment', + 'user', + ); + + if ($res->num_rows()) { + foreach ($res->result() as $row) { + $drop_columns[] = array( + 'field_id' => $row->custom_field_id, + 'column' => $row->custom_field_column, + 'table' => $row->custom_field_table, + ); + } + } + + // Create tables + $this->db->query('CREATE TABLE `ip_client_custom_new` + ( + `client_custom_id` INT NOT NULL PRIMARY KEY AUTO_INCREMENT , + `client_id` INT NOT NULL, `client_custom_fieldid` INT NOT NULL, + `client_custom_fieldvalue` TEXT NULL , + UNIQUE (client_id, client_custom_fieldid) + );' + ); + + $this->db->query('CREATE TABLE `ip_invoice_custom_new` + ( + `invoice_custom_id` INT NOT NULL PRIMARY KEY AUTO_INCREMENT , + `invoice_id` INT NOT NULL, `invoice_custom_fieldid` INT NOT NULL, + `invoice_custom_fieldvalue` TEXT NULL , + UNIQUE (invoice_id, invoice_custom_fieldid) + );' + ); + + $this->db->query('CREATE TABLE `ip_quote_custom_new` + ( + `quote_custom_id` INT NOT NULL PRIMARY KEY AUTO_INCREMENT , + `quote_id` INT NOT NULL, `quote_custom_fieldid` INT NOT NULL, + `quote_custom_fieldvalue` TEXT NULL , + UNIQUE (quote_id, quote_custom_fieldid) + );' + ); + + $this->db->query('CREATE TABLE `ip_payment_custom_new` + ( + `payment_custom_id` INT NOT NULL PRIMARY KEY AUTO_INCREMENT , + `payment_id` INT NOT NULL, `payment_custom_fieldid` INT NOT NULL, + `payment_custom_fieldvalue` TEXT NULL , + UNIQUE (payment_id, payment_custom_fieldid) + );' + ); + + $this->db->query('CREATE TABLE `ip_user_custom_new` + ( + `user_custom_id` INT NOT NULL PRIMARY KEY AUTO_INCREMENT , + `user_id` INT NOT NULL, `user_custom_fieldid` INT NOT NULL, + `user_custom_fieldvalue` TEXT NULL , + UNIQUE (user_id, user_custom_fieldid) + );' + ); + + // Migrate Data + foreach ($drop_columns as $value) { + $res = $this->db->query('SELECT * FROM ' . $value['table']); + + preg_match('/^ip_(.*?)_custom$/i', $value['table'], $matches); + $table_type = $matches[1]; + $table_name = $value['table'] . '_new'; + + if ($res->num_rows()) { + foreach ($res->result() as $row) { + + $escaped_table_type = $this->db->escape($row->{$table_type . '_id'}); + $escaped_column = $this->db->escape($row->{$value['column']}); + + $query = "INSERT INTO $table_name + (" . $table_type . "_id, " . $table_type . "_custom_fieldid, " . $table_type . "_custom_fieldvalue) + VALUES ( + $escaped_table_type, + ( + SELECT custom_field_id + FROM ip_custom_fields + WHERE ip_custom_fields.custom_field_column = " . $this->db->escape($value['column']) . " + ), + $escaped_column + )"; + + $this->db->query($query); + } + } + } + + // Drop old cloumns, and rename new ones + foreach ($tables as $table) { + $this->db->query('DROP TABLE IF EXISTS `ip_' . $table . '_custom`'); + $query = 'RENAME TABLE `ip_' . $table . '_custom_new` TO `ip_' . $table . '_custom`'; + $this->db->query($query); + } + + $this->db->query('ALTER TABLE ip_custom_fields DROP COLUMN custom_field_column'); + } + +} diff --git a/application/modules/setup/sql/000_1.0.0.sql b/application/modules/setup/sql/000_1.0.0.sql new file mode 100644 index 0000000..35125e3 --- /dev/null +++ b/application/modules/setup/sql/000_1.0.0.sql @@ -0,0 +1,411 @@ +CREATE TABLE `ip_client_custom` ( + `client_custom_id` INT(11) NOT NULL AUTO_INCREMENT, + `client_id` INT(11) NOT NULL, + PRIMARY KEY (`client_custom_id`), + KEY `client_id` (`client_id`) +) + ENGINE = MyISAM + DEFAULT CHARSET = utf8; + +CREATE TABLE `ip_client_notes` ( + `client_note_id` INT(11) NOT NULL AUTO_INCREMENT, + `client_id` INT(11) NOT NULL, + `client_note_date` DATE NOT NULL, + `client_note` LONGTEXT NOT NULL, + PRIMARY KEY (`client_note_id`), + KEY `client_id` (`client_id`, `client_note_date`) +) + ENGINE = MyISAM + DEFAULT CHARSET = utf8; + +CREATE TABLE `ip_clients` ( + `client_id` INT(11) NOT NULL AUTO_INCREMENT, + `client_date_created` DATETIME NOT NULL, + `client_date_modified` DATETIME NOT NULL, + `client_name` VARCHAR(100) NOT NULL, + `client_address_1` VARCHAR(100) DEFAULT '', + `client_address_2` VARCHAR(100) DEFAULT '', + `client_city` VARCHAR(45) DEFAULT '', + `client_state` VARCHAR(35) DEFAULT '', + `client_zip` VARCHAR(15) DEFAULT '', + `client_country` VARCHAR(35) DEFAULT '', + `client_phone` VARCHAR(20) DEFAULT '', + `client_fax` VARCHAR(20) DEFAULT '', + `client_mobile` VARCHAR(20) DEFAULT '', + `client_email` VARCHAR(100) DEFAULT '', + `client_web` VARCHAR(100) DEFAULT '', + `client_active` INT(1) NOT NULL DEFAULT '1', + PRIMARY KEY (`client_id`), + KEY `client_active` (`client_active`) +) + ENGINE = MyISAM + DEFAULT CHARSET = utf8; + +CREATE TABLE `ip_custom_fields` ( + `custom_field_id` INT(11) NOT NULL AUTO_INCREMENT, + `custom_field_table` VARCHAR(35) NOT NULL, + `custom_field_label` VARCHAR(64) NOT NULL, + `custom_field_column` VARCHAR(64) NOT NULL, + PRIMARY KEY (`custom_field_id`), + KEY `custom_field_table` (`custom_field_table`) +) + ENGINE = MyISAM + DEFAULT CHARSET = utf8; + +CREATE TABLE `ip_email_templates` ( + `email_template_id` INT(11) NOT NULL AUTO_INCREMENT, + `email_template_title` VARCHAR(255) NOT NULL, + `email_template_body` LONGTEXT NOT NULL, + PRIMARY KEY (`email_template_id`) +) + ENGINE = MyISAM + DEFAULT CHARSET = utf8; + +CREATE TABLE `ip_import_details` ( + `import_detail_id` INT(11) NOT NULL AUTO_INCREMENT, + `import_id` INT(11) NOT NULL, + `import_lang_key` VARCHAR(35) NOT NULL, + `import_table_name` VARCHAR(35) NOT NULL, + `import_record_id` INT(11) NOT NULL, + PRIMARY KEY (`import_detail_id`), + KEY `import_id` (`import_id`, `import_record_id`) +) + ENGINE = MyISAM + DEFAULT CHARSET = utf8; + +CREATE TABLE `ip_imports` ( + `import_id` INT(11) NOT NULL AUTO_INCREMENT, + `import_date` DATETIME NOT NULL, + PRIMARY KEY (`import_id`) +) + ENGINE = MyISAM + DEFAULT CHARSET = utf8; + +CREATE TABLE `ip_invoice_amounts` ( + `invoice_amount_id` INT(11) NOT NULL AUTO_INCREMENT, + `invoice_id` INT(11) NOT NULL, + `invoice_item_subtotal` DECIMAL(10, 2) DEFAULT '0.00', + `invoice_item_tax_total` DECIMAL(10, 2) DEFAULT '0.00', + `invoice_tax_total` DECIMAL(10, 2) DEFAULT '0.00', + `invoice_total` DECIMAL(10, 2) DEFAULT '0.00', + `invoice_paid` DECIMAL(10, 2) DEFAULT '0.00', + `invoice_balance` DECIMAL(10, 2) DEFAULT '0.00', + PRIMARY KEY (`invoice_amount_id`), + KEY `invoice_id` (`invoice_id`), + KEY `invoice_paid` (`invoice_paid`, `invoice_balance`) +) + ENGINE = MyISAM + DEFAULT CHARSET = utf8; + +CREATE TABLE `ip_invoice_custom` ( + `invoice_custom_id` INT(11) NOT NULL AUTO_INCREMENT, + `invoice_id` INT(11) NOT NULL, + PRIMARY KEY (`invoice_custom_id`), + KEY `invoice_id` (`invoice_id`) +) + ENGINE = MyISAM + DEFAULT CHARSET = utf8; + +CREATE TABLE `ip_invoice_groups` ( + `invoice_group_id` INT(11) NOT NULL AUTO_INCREMENT, + `invoice_group_name` VARCHAR(50) NOT NULL DEFAULT '', + `invoice_group_prefix` VARCHAR(10) NOT NULL DEFAULT '', + `invoice_group_next_id` INT(11) NOT NULL, + `invoice_group_left_pad` INT(2) NOT NULL DEFAULT '0', + `invoice_group_prefix_year` INT(1) NOT NULL DEFAULT '0', + `invoice_group_prefix_month` INT(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`invoice_group_id`), + KEY `invoice_group_next_id` (`invoice_group_next_id`), + KEY `invoice_group_left_pad` (`invoice_group_left_pad`) +) + ENGINE = MyISAM + AUTO_INCREMENT = 3 + DEFAULT CHARSET = utf8; + +CREATE TABLE `ip_invoice_item_amounts` ( + `item_amount_id` INT(11) NOT NULL AUTO_INCREMENT, + `item_id` INT(11) NOT NULL, + `item_subtotal` DECIMAL(10, 2) NOT NULL, + `item_tax_total` DECIMAL(10, 2) NOT NULL, + `item_total` DECIMAL(10, 2) NOT NULL, + PRIMARY KEY (`item_amount_id`), + KEY `item_id` (`item_id`) +) + ENGINE = MyISAM + DEFAULT CHARSET = utf8; + +CREATE TABLE `ip_invoice_items` ( + `item_id` INT(11) NOT NULL AUTO_INCREMENT, + `invoice_id` INT(11) NOT NULL, + `item_tax_rate_id` INT(11) NOT NULL DEFAULT '0', + `item_date_added` DATE NOT NULL, + `item_name` VARCHAR(100) NOT NULL, + `item_description` LONGTEXT NOT NULL, + `item_quantity` DECIMAL(10, 2) NOT NULL, + `item_price` DECIMAL(10, 2) NOT NULL, + `item_order` INT(2) NOT NULL DEFAULT '0', + PRIMARY KEY (`item_id`), + KEY `invoice_id` (`invoice_id`, `item_tax_rate_id`, `item_date_added`, `item_order`) +) + ENGINE = MyISAM + DEFAULT CHARSET = utf8; + +CREATE TABLE `ip_invoice_tax_rates` ( + `invoice_tax_rate_id` INT(11) NOT NULL AUTO_INCREMENT, + `invoice_id` INT(11) NOT NULL, + `tax_rate_id` INT(11) NOT NULL, + `include_item_tax` INT(1) NOT NULL DEFAULT '0', + `invoice_tax_rate_amount` DECIMAL(10, 2) NOT NULL, + PRIMARY KEY (`invoice_tax_rate_id`), + KEY `invoice_id` (`invoice_id`, `tax_rate_id`) +) + ENGINE = MyISAM + DEFAULT CHARSET = utf8; + +CREATE TABLE `ip_invoices` ( + `invoice_id` INT(11) NOT NULL AUTO_INCREMENT, + `user_id` INT(11) NOT NULL, + `client_id` INT(11) NOT NULL, + `invoice_group_id` INT(11) NOT NULL, + `invoice_status_id` TINYINT(2) NOT NULL DEFAULT '1', + `invoice_date_created` DATE NOT NULL, + `invoice_date_modified` DATETIME NOT NULL, + `invoice_date_due` DATE NOT NULL, + `invoice_number` VARCHAR(20) NOT NULL, + `invoice_terms` LONGTEXT NOT NULL, + `invoice_url_key` CHAR(32) NOT NULL, + PRIMARY KEY (`invoice_id`), + UNIQUE KEY `invoice_url_key` (`invoice_url_key`), + KEY `user_id` (`user_id`, `client_id`, `invoice_group_id`, `invoice_date_created`, `invoice_date_due`, `invoice_number`), + KEY `invoice_status_id` (`invoice_status_id`) +) + ENGINE = MyISAM + DEFAULT CHARSET = utf8; + +CREATE TABLE `ip_invoices_recurring` ( + `invoice_recurring_id` INT(11) NOT NULL AUTO_INCREMENT, + `invoice_id` INT(11) NOT NULL, + `recur_start_date` DATE NOT NULL, + `recur_end_date` DATE NOT NULL, + `recur_frequency` CHAR(2) NOT NULL, + `recur_next_date` DATE NOT NULL, + PRIMARY KEY (`invoice_recurring_id`), + KEY `invoice_id` (`invoice_id`) +) + ENGINE = MyISAM + DEFAULT CHARSET = utf8; + +CREATE TABLE `ip_item_lookups` ( + `item_lookup_id` INT(11) NOT NULL AUTO_INCREMENT, + `item_name` VARCHAR(100) NOT NULL DEFAULT '', + `item_description` LONGTEXT NOT NULL, + `item_price` DECIMAL(10, 2) NOT NULL, + PRIMARY KEY (`item_lookup_id`) +) + ENGINE = MyISAM + DEFAULT CHARSET = utf8; + +CREATE TABLE `ip_merchant_responses` ( + `merchant_response_id` INT(11) NOT NULL AUTO_INCREMENT, + `invoice_id` INT(11) NOT NULL, + `merchant_response_date` DATE NOT NULL, + `merchant_response_driver` VARCHAR(35) NOT NULL, + `merchant_response` VARCHAR(255) NOT NULL, + `merchant_response_reference` VARCHAR(255) NOT NULL, + PRIMARY KEY (`merchant_response_id`), + KEY `merchant_response_date` (`merchant_response_date`), + KEY `invoice_id` (`invoice_id`) +) + ENGINE = MyISAM + DEFAULT CHARSET = utf8; + +CREATE TABLE `ip_payment_custom` ( + `payment_custom_id` INT(11) NOT NULL AUTO_INCREMENT, + `payment_id` INT(11) NOT NULL, + PRIMARY KEY (`payment_custom_id`), + KEY `payment_id` (`payment_id`) +) + ENGINE = MyISAM + DEFAULT CHARSET = utf8; + +CREATE TABLE `ip_payment_methods` ( + `payment_method_id` INT(11) NOT NULL AUTO_INCREMENT, + `payment_method_name` VARCHAR(35) NOT NULL, + PRIMARY KEY (`payment_method_id`) +) + ENGINE = MyISAM + DEFAULT CHARSET = utf8; + +CREATE TABLE `ip_payments` ( + `payment_id` INT(11) NOT NULL AUTO_INCREMENT, + `invoice_id` INT(11) NOT NULL, + `payment_method_id` INT(11) NOT NULL DEFAULT '0', + `payment_date` DATE NOT NULL, + `payment_amount` DECIMAL(10, 2) NOT NULL, + `payment_note` LONGTEXT NOT NULL, + PRIMARY KEY (`payment_id`), + KEY `invoice_id` (`invoice_id`), + KEY `payment_method_id` (`payment_method_id`), + KEY `payment_amount` (`payment_amount`) +) + ENGINE = MyISAM + DEFAULT CHARSET = utf8; + +CREATE TABLE `ip_quote_amounts` ( + `quote_amount_id` INT(11) NOT NULL AUTO_INCREMENT, + `quote_id` INT(11) NOT NULL, + `quote_item_subtotal` DECIMAL(10, 2) NOT NULL DEFAULT '0.00', + `quote_item_tax_total` DECIMAL(10, 2) NOT NULL DEFAULT '0.00', + `quote_tax_total` DECIMAL(10, 2) NOT NULL DEFAULT '0.00', + `quote_total` DECIMAL(10, 2) NOT NULL DEFAULT '0.00', + PRIMARY KEY (`quote_amount_id`), + KEY `quote_id` (`quote_id`) +) + ENGINE = MyISAM + DEFAULT CHARSET = utf8; + +CREATE TABLE `ip_quote_custom` ( + `quote_custom_id` INT(11) NOT NULL AUTO_INCREMENT, + `quote_id` INT(11) NOT NULL, + PRIMARY KEY (`quote_custom_id`), + KEY `quote_id` (`quote_id`) +) + ENGINE = MyISAM + DEFAULT CHARSET = utf8; + +CREATE TABLE `ip_quote_item_amounts` ( + `item_amount_id` INT(11) NOT NULL AUTO_INCREMENT, + `item_id` INT(11) NOT NULL, + `item_subtotal` DECIMAL(10, 2) NOT NULL DEFAULT '0.00', + `item_tax_total` DECIMAL(10, 2) NOT NULL, + `item_total` DECIMAL(10, 2) NOT NULL, + PRIMARY KEY (`item_amount_id`), + KEY `item_id` (`item_id`) +) + ENGINE = MyISAM + DEFAULT CHARSET = utf8; + +CREATE TABLE `ip_quote_items` ( + `item_id` INT(11) NOT NULL AUTO_INCREMENT, + `quote_id` INT(11) NOT NULL, + `item_tax_rate_id` INT(11) NOT NULL, + `item_date_added` DATE NOT NULL, + `item_name` VARCHAR(100) NOT NULL, + `item_description` LONGTEXT NOT NULL, + `item_quantity` DECIMAL(10, 2) NOT NULL, + `item_price` DECIMAL(10, 2) NOT NULL, + `item_order` INT(2) NOT NULL DEFAULT '0', + PRIMARY KEY (`item_id`), + KEY `quote_id` (`quote_id`, `item_date_added`, `item_order`), + KEY `item_tax_rate_id` (`item_tax_rate_id`) +) + ENGINE = MyISAM + DEFAULT CHARSET = utf8; + +CREATE TABLE `ip_quote_tax_rates` ( + `quote_tax_rate_id` INT(11) NOT NULL AUTO_INCREMENT, + `quote_id` INT(11) NOT NULL, + `tax_rate_id` INT(11) NOT NULL, + `include_item_tax` INT(1) NOT NULL DEFAULT '0', + `quote_tax_rate_amount` DECIMAL(10, 2) NOT NULL, + PRIMARY KEY (`quote_tax_rate_id`), + KEY `quote_id` (`quote_id`), + KEY `tax_rate_id` (`tax_rate_id`) +) + ENGINE = MyISAM + DEFAULT CHARSET = utf8; + +CREATE TABLE `ip_quotes` ( + `quote_id` INT(11) NOT NULL AUTO_INCREMENT, + `invoice_id` INT(11) NOT NULL DEFAULT '0', + `user_id` INT(11) NOT NULL, + `client_id` INT(11) NOT NULL, + `invoice_group_id` INT(11) NOT NULL, + `quote_status_id` TINYINT(2) NOT NULL DEFAULT '1', + `quote_date_created` DATE NOT NULL, + `quote_date_modified` DATETIME NOT NULL, + `quote_date_expires` DATE NOT NULL, + `quote_number` VARCHAR(20) NOT NULL, + `quote_url_key` CHAR(32) NOT NULL, + PRIMARY KEY (`quote_id`), + KEY `user_id` (`user_id`, `client_id`, `invoice_group_id`, `quote_date_created`, `quote_date_expires`, `quote_number`), + KEY `invoice_id` (`invoice_id`), + KEY `quote_status_id` (`quote_status_id`) +) + ENGINE = MyISAM + DEFAULT CHARSET = utf8; + +CREATE TABLE `ip_settings` ( + `setting_id` INT(11) NOT NULL AUTO_INCREMENT, + `setting_key` VARCHAR(50) NOT NULL, + `setting_value` LONGTEXT NOT NULL, + PRIMARY KEY (`setting_id`), + KEY `setting_key` (`setting_key`) +) + ENGINE = MyISAM + AUTO_INCREMENT = 19 + DEFAULT CHARSET = utf8; + +CREATE TABLE `ip_tax_rates` ( + `tax_rate_id` INT(11) NOT NULL AUTO_INCREMENT, + `tax_rate_name` VARCHAR(25) NOT NULL, + `tax_rate_percent` DECIMAL(5, 2) NOT NULL, + PRIMARY KEY (`tax_rate_id`) +) + ENGINE = MyISAM + DEFAULT CHARSET = utf8; + +CREATE TABLE `ip_user_clients` ( + `user_client_id` INT(11) NOT NULL AUTO_INCREMENT, + `user_id` INT(11) NOT NULL, + `client_id` INT(11) NOT NULL, + PRIMARY KEY (`user_client_id`), + KEY `user_id` (`user_id`, `client_id`) +) + ENGINE = MyISAM + DEFAULT CHARSET = utf8; + +CREATE TABLE `ip_user_custom` ( + `user_custom_id` INT(11) NOT NULL AUTO_INCREMENT, + `user_id` INT(11) NOT NULL, + PRIMARY KEY (`user_custom_id`), + KEY `user_id` (`user_id`) +) + ENGINE = MyISAM + DEFAULT CHARSET = utf8; + +CREATE TABLE `ip_users` ( + `user_id` INT(11) NOT NULL AUTO_INCREMENT, + `user_type` INT(1) NOT NULL DEFAULT '0', + `user_date_created` DATETIME NOT NULL, + `user_date_modified` DATETIME NOT NULL, + `user_name` VARCHAR(100) DEFAULT '', + `user_company` VARCHAR(100) DEFAULT '', + `user_address_1` VARCHAR(100) DEFAULT '', + `user_address_2` VARCHAR(100) DEFAULT '', + `user_city` VARCHAR(45) DEFAULT '', + `user_state` VARCHAR(35) DEFAULT '', + `user_zip` VARCHAR(15) DEFAULT '', + `user_country` VARCHAR(35) DEFAULT '', + `user_phone` VARCHAR(20) DEFAULT '', + `user_fax` VARCHAR(20) DEFAULT '', + `user_mobile` VARCHAR(20) DEFAULT '', + `user_email` VARCHAR(100) NOT NULL, + `user_password` VARCHAR(60) NOT NULL, + `user_web` VARCHAR(100) DEFAULT '', + `user_psalt` CHAR(22) NOT NULL, + PRIMARY KEY (`user_id`) +) + ENGINE = MyISAM + DEFAULT CHARSET = utf8; + +CREATE TABLE `ip_versions` ( + `version_id` INT(11) NOT NULL AUTO_INCREMENT, + `version_date_applied` VARCHAR(14) NOT NULL, + `version_file` VARCHAR(45) NOT NULL, + `version_sql_errors` INT(2) NOT NULL, + PRIMARY KEY (`version_id`), + KEY `version_date_applied` (`version_date_applied`) +) + ENGINE = MyISAM + DEFAULT CHARSET = utf8; \ No newline at end of file diff --git a/application/modules/setup/sql/001_1.0.1.sql b/application/modules/setup/sql/001_1.0.1.sql new file mode 100644 index 0000000..dcf093e --- /dev/null +++ b/application/modules/setup/sql/001_1.0.1.sql @@ -0,0 +1 @@ +/* Added for versioning */ \ No newline at end of file diff --git a/application/modules/setup/sql/002_1.0.2.sql b/application/modules/setup/sql/002_1.0.2.sql new file mode 100644 index 0000000..dcf093e --- /dev/null +++ b/application/modules/setup/sql/002_1.0.2.sql @@ -0,0 +1 @@ +/* Added for versioning */ \ No newline at end of file diff --git a/application/modules/setup/sql/003_1.1.0.sql b/application/modules/setup/sql/003_1.1.0.sql new file mode 100644 index 0000000..47887eb --- /dev/null +++ b/application/modules/setup/sql/003_1.1.0.sql @@ -0,0 +1,54 @@ +# VAT ID and VAT Code added (see #76) +ALTER TABLE `ip_email_templates` + ADD COLUMN `email_template_type` VARCHAR(255) NULL + AFTER `email_template_title`, + ADD COLUMN `email_template_subject` VARCHAR(255) NULL + AFTER `email_template_body`, + ADD COLUMN `email_template_from_name` VARCHAR(255) NULL + AFTER `email_template_subject`, + ADD COLUMN `email_template_from_email` VARCHAR(255) NULL + AFTER `email_template_from_name`, + ADD COLUMN `email_template_cc` VARCHAR(255) NULL + AFTER `email_template_from_email`, + ADD COLUMN `email_template_bcc` VARCHAR(255) NULL + AFTER `email_template_cc`, + ADD COLUMN `email_template_pdf_template` VARCHAR(255) NULL + AFTER `email_template_bcc`; + +ALTER TABLE `ip_clients` + ADD COLUMN `client_vat_id` VARCHAR(100) NOT NULL DEFAULT '' + AFTER `client_web`, + ADD COLUMN `client_tax_code` VARCHAR(100) NOT NULL DEFAULT '' + AFTER `client_vat_id`; + +ALTER TABLE `ip_users` + ADD COLUMN `user_vat_id` VARCHAR(100) NOT NULL DEFAULT '' + AFTER `user_web`, + ADD COLUMN `user_tax_code` VARCHAR(100) NOT NULL DEFAULT '' + AFTER `user_vat_id`, + ADD COLUMN `user_passwordreset_token` VARCHAR(100) DEFAULT '' + AFTER `user_psalt`, + ADD COLUMN `user_active` BOOLEAN DEFAULT TRUE + AFTER `user_type`; + +# Allow quote/invoice amounts to be higher (see #84) +ALTER TABLE ip_quote_amounts + MODIFY COLUMN quote_item_subtotal DECIMAL(20, 2); +ALTER TABLE ip_quote_amounts + MODIFY COLUMN quote_item_tax_total DECIMAL(20, 2); +ALTER TABLE ip_quote_amounts + MODIFY COLUMN quote_tax_total DECIMAL(20, 2); +ALTER TABLE ip_quote_amounts + MODIFY COLUMN quote_total DECIMAL(20, 2); +ALTER TABLE ip_invoice_amounts + MODIFY COLUMN invoice_item_subtotal DECIMAL(20, 2); +ALTER TABLE ip_invoice_amounts + MODIFY COLUMN invoice_item_tax_total DECIMAL(20, 2); +ALTER TABLE ip_invoice_amounts + MODIFY COLUMN invoice_tax_total DECIMAL(20, 2); +ALTER TABLE ip_invoice_amounts + MODIFY COLUMN invoice_total DECIMAL(20, 2); +ALTER TABLE ip_invoice_amounts + MODIFY COLUMN invoice_paid DECIMAL(20, 2); +ALTER TABLE ip_invoice_amounts + MODIFY COLUMN invoice_balance DECIMAL(20, 2); diff --git a/application/modules/setup/sql/004_1.1.1.sql b/application/modules/setup/sql/004_1.1.1.sql new file mode 100644 index 0000000..dcf093e --- /dev/null +++ b/application/modules/setup/sql/004_1.1.1.sql @@ -0,0 +1 @@ +/* Added for versioning */ \ No newline at end of file diff --git a/application/modules/setup/sql/005_1.1.2.sql b/application/modules/setup/sql/005_1.1.2.sql new file mode 100644 index 0000000..dcf093e --- /dev/null +++ b/application/modules/setup/sql/005_1.1.2.sql @@ -0,0 +1 @@ +/* Added for versioning */ \ No newline at end of file diff --git a/application/modules/setup/sql/006_1.2.0.sql b/application/modules/setup/sql/006_1.2.0.sql new file mode 100644 index 0000000..e617cea --- /dev/null +++ b/application/modules/setup/sql/006_1.2.0.sql @@ -0,0 +1,85 @@ +/* Customize quote / invoice groups #5 */ +ALTER TABLE `ip_invoice_groups` + ADD COLUMN `invoice_group_identifier_format` VARCHAR(255) NOT NULL + AFTER `invoice_group_name`; + +/* convert fields to format string + * Schema: Prefix{{{YEAR}}}{{{MONTH}}}{{{ID}}} + * (based on existing schema) + */ +UPDATE ip_invoice_groups +SET invoice_group_identifier_format = CONCAT( + invoice_group_prefix, + CASE invoice_group_prefix_year + WHEN 1 + THEN '{{{year}}}' + ELSE '' + END, + CASE invoice_group_prefix_month + WHEN 1 + THEN '{{{month}}}' + ELSE '' + END, + '{{{id}}}' +); +ALTER TABLE `ip_invoice_groups` + DROP invoice_group_prefix, + DROP invoice_group_prefix_month, + DROP invoice_group_prefix_year; + +# Module "families" +CREATE TABLE IF NOT EXISTS `ip_families` ( + `family_id` INT(11) NOT NULL AUTO_INCREMENT, + `family_name` VARCHAR(50) DEFAULT NULL, + PRIMARY KEY (`family_id`) +) + ENGINE = MyISAM + DEFAULT CHARSET = utf8; + +# Module "products" +CREATE TABLE IF NOT EXISTS `ip_products` ( + `product_id` INT(11) NOT NULL AUTO_INCREMENT, + `family_id` INT(11) NOT NULL, + `product_sku` VARCHAR(15) NOT NULL, + `product_name` VARCHAR(50) NOT NULL, + `product_description` LONGTEXT NOT NULL, + `product_price` FLOAT(10, 2) NOT NULL, + `purchase_price` FLOAT(10, 2) NOT NULL, + `tax_rate_id` INT(11) NOT NULL, + PRIMARY KEY (`product_id`) +) + ENGINE = MyISAM + DEFAULT CHARSET = utf8; + +# Move lookup items to products +INSERT INTO ip_products ( + family_id, + product_sku, + product_name, + product_description, + product_price, + purchase_price, + tax_rate_id +) + SELECT + 0 AS family_id, + -- default to 0 (no family) + concat('sku-', item_lookup_id) AS product_sku, + -- use ip_item_lookup primary key as new SKU + item_name, + item_description, + item_price, + 0 AS product_purchase_price, + -- default purchase price to 0 + 0 AS tax_rate_id -- default tax rate ID + FROM ip_item_lookups; + +/* Add the Invoice Sign */ +ALTER TABLE `ip_invoice_amounts` + ADD `invoice_sign` ENUM ('1', '-1') NOT NULL DEFAULT '1' + AFTER `invoice_id`; + +ALTER TABLE `ip_invoices` + ADD `creditinvoice_parent_id` INT(11), + ADD `is_read_only` TINYINT(1) + AFTER `invoice_status_id`; \ No newline at end of file diff --git a/application/modules/setup/sql/007_1.2.1.sql b/application/modules/setup/sql/007_1.2.1.sql new file mode 100644 index 0000000..b1d297d --- /dev/null +++ b/application/modules/setup/sql/007_1.2.1.sql @@ -0,0 +1,15 @@ +# Insert default value for read_only_toggle in ip_settings +INSERT INTO `ip_settings` (`setting_key`, `setting_value`) +VALUES ('read_only_toggle', 'paid'); + +# Update the period settings +UPDATE `ip_settings` +SET `setting_value` = "this-month" +WHERE `setting_value` = "month"; +UPDATE `ip_settings` +SET `setting_value` = "this-year" +WHERE `setting_value` = "year"; + +# Solves IP-198 +ALTER TABLE ip_tax_rates + CHANGE tax_rate_name tax_rate_name VARCHAR(60) NOT NULL; diff --git a/application/modules/setup/sql/008_1.3.0.sql b/application/modules/setup/sql/008_1.3.0.sql new file mode 100644 index 0000000..618cf4e --- /dev/null +++ b/application/modules/setup/sql/008_1.3.0.sql @@ -0,0 +1,30 @@ +# Solves IP-195 +ALTER TABLE `ip_quotes` + ADD COLUMN `notes` LONGTEXT; + +# Solves IP-216 +ALTER TABLE `ip_invoices` + ADD COLUMN `invoice_time_created` TIME NOT NULL DEFAULT '00:00:00' + AFTER `invoice_date_created`, + ADD COLUMN `invoice_password` VARCHAR(90) NULL + AFTER `is_read_only`; + +# Solves IP-196 +ALTER TABLE `ip_invoices` + ADD COLUMN `payment_method` INT NOT NULL DEFAULT 0 + AFTER `invoice_url_key`; + +# Solves IP-213 +INSERT INTO `ip_settings` (`setting_key`, `setting_value`) +VALUES ('invoice_pre_password', ''); +INSERT INTO `ip_settings` (`setting_key`, `setting_value`) +VALUES ('quote_pre_password', ''); +ALTER TABLE `ip_quotes` + ADD COLUMN `quote_password` VARCHAR(90) NULL + AFTER `quote_url_key`; + +# Solves IP-227 +ALTER TABLE `ip_invoices` + CHANGE `invoice_number` `invoice_number` VARCHAR(100) NOT NULL; +ALTER TABLE `ip_quotes` + CHANGE `quote_number` `quote_number` VARCHAR(100) NOT NULL; \ No newline at end of file diff --git a/application/modules/setup/sql/009_1.3.1.sql b/application/modules/setup/sql/009_1.3.1.sql new file mode 100644 index 0000000..e1b08bb --- /dev/null +++ b/application/modules/setup/sql/009_1.3.1.sql @@ -0,0 +1 @@ +# Added for versioning \ No newline at end of file diff --git a/application/modules/setup/sql/010_1.3.2.sql b/application/modules/setup/sql/010_1.3.2.sql new file mode 100644 index 0000000..e1b08bb --- /dev/null +++ b/application/modules/setup/sql/010_1.3.2.sql @@ -0,0 +1 @@ +# Added for versioning \ No newline at end of file diff --git a/application/modules/setup/sql/011_1.3.3.sql b/application/modules/setup/sql/011_1.3.3.sql new file mode 100644 index 0000000..e1b08bb --- /dev/null +++ b/application/modules/setup/sql/011_1.3.3.sql @@ -0,0 +1 @@ +# Added for versioning \ No newline at end of file diff --git a/application/modules/setup/sql/012_1.4.0.sql b/application/modules/setup/sql/012_1.4.0.sql new file mode 100644 index 0000000..7862ab5 --- /dev/null +++ b/application/modules/setup/sql/012_1.4.0.sql @@ -0,0 +1,82 @@ +# Discounts +ALTER TABLE `ip_quotes` + ADD COLUMN `quote_discount_amount` DECIMAL(20, 2) NOT NULL DEFAULT 0 + AFTER `quote_number`, + ADD COLUMN `quote_discount_percent` DECIMAL(20, 2) NOT NULL DEFAULT 0 + AFTER `quote_discount_amount`; + +ALTER TABLE `ip_quote_item_amounts` + ADD COLUMN `item_discount` DECIMAL(20, 2) NOT NULL DEFAULT 0 + AFTER `item_tax_total`; +ALTER TABLE `ip_quote_items` + ADD COLUMN `item_discount_amount` DECIMAL(20, 2) NOT NULL DEFAULT 0 + AFTER `item_price`; + +ALTER TABLE `ip_invoices` + ADD COLUMN `invoice_discount_amount` DECIMAL(20, 2) NOT NULL DEFAULT 0 + AFTER `invoice_number`, + ADD COLUMN `invoice_discount_percent` DECIMAL(20, 2) NOT NULL DEFAULT 0 + AFTER `invoice_discount_amount`; + +ALTER TABLE `ip_invoice_item_amounts` + ADD COLUMN `item_discount` DECIMAL(20, 2) NOT NULL DEFAULT 0 + AFTER `item_tax_total`; +ALTER TABLE `ip_invoice_items` + ADD COLUMN `item_discount_amount` DECIMAL(20, 2) NOT NULL DEFAULT 0 + AFTER `item_price`; + +# Feature IP-162 +# For module "projects" +CREATE TABLE `ip_projects` ( + `project_id` INT(11) NOT NULL AUTO_INCREMENT, + `client_id` INT(11) NOT NULL, + `project_name` VARCHAR(150) NOT NULL, + PRIMARY KEY (`project_id`) +) + ENGINE = MyISAM + DEFAULT CHARSET = utf8; + +# For module "tasks" +CREATE TABLE `ip_tasks` ( + `task_id` INT(11) NOT NULL AUTO_INCREMENT, + `project_id` INT(11) NOT NULL, + `task_name` VARCHAR(50) NOT NULL, + `task_description` LONGTEXT NOT NULL, + `task_price` FLOAT(10, 2) NOT NULL, + `task_finish_date` DATE NOT NULL, + `task_status` TINYINT(1) NOT NULL, + PRIMARY KEY (`task_id`) +) + ENGINE = MyISAM + DEFAULT CHARSET = utf8; + +# For module "upload" IP-211 +CREATE TABLE `ip_uploads` ( + `upload_id` INT(11) NOT NULL AUTO_INCREMENT, + `client_id` INT(11) NOT NULL, + `url_key` CHAR(32) NOT NULL, + `file_name_original` LONGTEXT NOT NULL, + `file_name_new` LONGTEXT NOT NULL, + `uploaded_date` DATE NOT NULL, + PRIMARY KEY (`upload_id`) +) + ENGINE = MyISAM + DEFAULT CHARSET = utf8; + +# Attach pdf on emails setting +INSERT INTO `ip_settings` (`setting_key`, `setting_value`) +VALUES ('email_pdf_attachment', '1'); + +# IP-283 - Allow larger item amounts +ALTER TABLE ip_invoice_item_amounts + MODIFY COLUMN item_subtotal DECIMAL(20, 2); +ALTER TABLE ip_invoice_item_amounts + MODIFY COLUMN item_tax_total DECIMAL(20, 2); +ALTER TABLE ip_invoice_item_amounts + MODIFY COLUMN item_total DECIMAL(20, 2); +ALTER TABLE ip_quote_item_amounts + MODIFY COLUMN item_subtotal DECIMAL(20, 2); +ALTER TABLE ip_quote_item_amounts + MODIFY COLUMN item_tax_total DECIMAL(20, 2); +ALTER TABLE ip_quote_item_amounts + MODIFY COLUMN item_total DECIMAL(20, 2); diff --git a/application/modules/setup/sql/013_1.4.1.sql b/application/modules/setup/sql/013_1.4.1.sql new file mode 100644 index 0000000..e1b08bb --- /dev/null +++ b/application/modules/setup/sql/013_1.4.1.sql @@ -0,0 +1 @@ +# Added for versioning \ No newline at end of file diff --git a/application/modules/setup/sql/014_1.4.2.sql b/application/modules/setup/sql/014_1.4.2.sql new file mode 100644 index 0000000..e1b08bb --- /dev/null +++ b/application/modules/setup/sql/014_1.4.2.sql @@ -0,0 +1 @@ +# Added for versioning \ No newline at end of file diff --git a/application/modules/setup/sql/015_1.4.3.sql b/application/modules/setup/sql/015_1.4.3.sql new file mode 100644 index 0000000..e1b08bb --- /dev/null +++ b/application/modules/setup/sql/015_1.4.3.sql @@ -0,0 +1 @@ +# Added for versioning \ No newline at end of file diff --git a/application/modules/setup/sql/016_1.4.4.sql b/application/modules/setup/sql/016_1.4.4.sql new file mode 100644 index 0000000..551ee23 --- /dev/null +++ b/application/modules/setup/sql/016_1.4.4.sql @@ -0,0 +1,21 @@ +# IP-355 - Overhaul for PDF files, change the old file names to the new ones +UPDATE ip_settings +SET setting_value = 'InvoicePlane' +WHERE setting_key = 'pdf_invoice_template' AND + (setting_value = 'default' OR setting_value = 'default-payment' OR setting_value = 'red' OR + setting_value = 'green'); + +UPDATE ip_settings +SET setting_value = 'InvoicePlane - paid' +WHERE setting_key = 'pdf_invoice_template_paid' AND + setting_value = 'default-paid'; + +UPDATE ip_settings +SET setting_value = 'InvoicePlane - overdue' +WHERE setting_key = 'pdf_invoice_template_overdue' AND + setting_value = 'default-overdue'; + +UPDATE ip_settings +SET setting_value = 'InvoicePlane' +WHERE setting_key = 'pdf_quote_template' AND + (setting_value = 'default' OR setting_value = 'blue' OR setting_value = 'red' OR setting_value = 'green'); \ No newline at end of file diff --git a/application/modules/setup/sql/017_1.4.5.sql b/application/modules/setup/sql/017_1.4.5.sql new file mode 100644 index 0000000..e1b08bb --- /dev/null +++ b/application/modules/setup/sql/017_1.4.5.sql @@ -0,0 +1 @@ +# Added for versioning \ No newline at end of file diff --git a/application/modules/setup/sql/018_1.4.6.sql b/application/modules/setup/sql/018_1.4.6.sql new file mode 100644 index 0000000..e1b08bb --- /dev/null +++ b/application/modules/setup/sql/018_1.4.6.sql @@ -0,0 +1 @@ +# Added for versioning \ No newline at end of file diff --git a/application/modules/setup/sql/019_1.4.7.sql b/application/modules/setup/sql/019_1.4.7.sql new file mode 100644 index 0000000..fb026ee --- /dev/null +++ b/application/modules/setup/sql/019_1.4.7.sql @@ -0,0 +1,213 @@ +# IP-406 - Update the web preview for invoices and quotes +UPDATE ip_settings +SET setting_value = 'InvoicePlane_Web' +WHERE setting_key = 'public_invoice_template' AND + setting_value = 'default'; + +UPDATE ip_settings +SET setting_value = 'InvoicePlane_Web' +WHERE setting_key = 'public_quote_template' AND + setting_value = 'default'; + +# IP-255 - Do not generate invoice number for draft invoices, set default value +INSERT INTO ip_settings (setting_key, setting_value) +VALUES ('generate_invoice_number_for_draft', '1'); + +INSERT INTO ip_settings (setting_key, setting_value) +VALUES ('generate_quote_number_for_draft', '1'); + +ALTER TABLE `ip_invoices` + MODIFY COLUMN invoice_number VARCHAR(100) NULL DEFAULT NULL; + +ALTER TABLE `ip_quotes` + MODIFY COLUMN quote_number VARCHAR(100) NULL DEFAULT NULL; + +# IP-408 - Add reference to products to items +ALTER TABLE `ip_invoice_items` + ADD COLUMN `item_product_id` INT(11) DEFAULT NULL + AFTER `item_tax_rate_id`; + +ALTER TABLE `ip_quote_items` + ADD COLUMN `item_product_id` INT(11) DEFAULT NULL + AFTER `item_tax_rate_id`; + +# IP-303 - Incorrect decimal value: '' for column 'item_discount_amount' +ALTER TABLE `ip_invoices` + MODIFY COLUMN invoice_discount_amount DECIMAL(20, 2) NULL DEFAULT NULL, + MODIFY COLUMN invoice_discount_percent DECIMAL(20, 2) NULL DEFAULT NULL; + +ALTER TABLE `ip_invoice_item_amounts` + MODIFY COLUMN item_discount DECIMAL(20, 2) NULL DEFAULT NULL; +ALTER TABLE `ip_invoice_items` + MODIFY COLUMN item_discount_amount DECIMAL(20, 2) NULL DEFAULT NULL; + +ALTER TABLE `ip_invoice_tax_rates` + MODIFY COLUMN invoice_tax_rate_amount DECIMAL(10, 2) NOT NULL DEFAULT 0.00; + +ALTER TABLE `ip_quotes` + MODIFY COLUMN quote_discount_amount DECIMAL(20, 2) NULL DEFAULT NULL, + MODIFY COLUMN quote_discount_percent DECIMAL(20, 2) NULL DEFAULT NULL; + +ALTER TABLE `ip_quote_item_amounts` + MODIFY COLUMN item_discount DECIMAL(20, 2) NULL DEFAULT NULL; +ALTER TABLE `ip_quote_items` + MODIFY COLUMN item_discount_amount DECIMAL(20, 2) NULL DEFAULT NULL; + +ALTER TABLE `ip_products` + MODIFY COLUMN purchase_price DECIMAL(20, 2) NULL DEFAULT NULL; +ALTER TABLE `ip_products` + MODIFY COLUMN product_price DECIMAL(20, 2) NULL DEFAULT NULL; + +# IP-322 - Invoice item_name database field should be larger + additional db changes +ALTER TABLE ip_clients + MODIFY COLUMN client_name TEXT; +ALTER TABLE ip_clients + MODIFY COLUMN client_address_1 TEXT; +ALTER TABLE ip_clients + MODIFY COLUMN client_address_2 TEXT; +ALTER TABLE ip_clients + MODIFY COLUMN client_city TEXT; +ALTER TABLE ip_clients + MODIFY COLUMN client_state TEXT; +ALTER TABLE ip_clients + MODIFY COLUMN client_zip TEXT; +ALTER TABLE ip_clients + MODIFY COLUMN client_country TEXT; +ALTER TABLE ip_clients + MODIFY COLUMN client_phone TEXT; +ALTER TABLE ip_clients + MODIFY COLUMN client_fax TEXT; +ALTER TABLE ip_clients + MODIFY COLUMN client_mobile TEXT; +ALTER TABLE ip_clients + MODIFY COLUMN client_email TEXT; +ALTER TABLE ip_clients + MODIFY COLUMN client_web TEXT; +ALTER TABLE ip_clients + MODIFY COLUMN client_vat_id TEXT; +ALTER TABLE ip_clients + MODIFY COLUMN client_tax_code TEXT; +ALTER TABLE ip_custom_fields + MODIFY COLUMN custom_field_table VARCHAR(255); +ALTER TABLE ip_custom_fields + MODIFY COLUMN custom_field_label TEXT; +ALTER TABLE ip_custom_fields + MODIFY COLUMN custom_field_column TEXT; +ALTER TABLE ip_email_templates + MODIFY COLUMN email_template_title TEXT; +ALTER TABLE ip_email_templates + MODIFY COLUMN email_template_subject TEXT; +ALTER TABLE ip_email_templates + MODIFY COLUMN email_template_from_name TEXT; +ALTER TABLE ip_email_templates + MODIFY COLUMN email_template_from_email TEXT; +ALTER TABLE ip_email_templates + MODIFY COLUMN email_template_cc TEXT; +ALTER TABLE ip_email_templates + MODIFY COLUMN email_template_bcc TEXT; +ALTER TABLE ip_families + MODIFY COLUMN family_name TEXT; +ALTER TABLE ip_invoice_groups + MODIFY COLUMN invoice_group_name TEXT; +ALTER TABLE ip_invoice_items + MODIFY COLUMN item_name TEXT DEFAULT NULL; +ALTER TABLE ip_invoice_items + MODIFY COLUMN item_description LONGTEXT DEFAULT NULL; +ALTER TABLE ip_invoice_items + MODIFY COLUMN item_price DECIMAL(20, 2) DEFAULT NULL; +ALTER TABLE ip_payment_methods + MODIFY COLUMN payment_method_name TEXT; +ALTER TABLE ip_payments + MODIFY COLUMN payment_amount DECIMAL(20, 2); +ALTER TABLE ip_products + MODIFY COLUMN product_sku TEXT; +ALTER TABLE ip_products + MODIFY COLUMN product_name TEXT; +ALTER TABLE ip_projects + MODIFY COLUMN project_name TEXT; +ALTER TABLE ip_quote_items + MODIFY COLUMN item_name TEXT DEFAULT NULL; +ALTER TABLE ip_quote_items + MODIFY COLUMN item_description TEXT DEFAULT NULL; +ALTER TABLE ip_quote_items + MODIFY COLUMN item_quantity DECIMAL(20, 2) DEFAULT NULL; +ALTER TABLE ip_quote_items + MODIFY COLUMN item_price DECIMAL(20, 2); +ALTER TABLE ip_quote_tax_rates + MODIFY COLUMN quote_tax_rate_amount DECIMAL(20, 2); +ALTER TABLE ip_tasks + MODIFY COLUMN task_name TEXT; +ALTER TABLE ip_tasks + MODIFY COLUMN task_price DECIMAL(20, 2); +ALTER TABLE ip_tax_rates + MODIFY COLUMN tax_rate_name TEXT; +ALTER TABLE ip_users + MODIFY COLUMN user_name TEXT; +ALTER TABLE ip_users + MODIFY COLUMN user_company TEXT; +ALTER TABLE ip_users + MODIFY COLUMN user_address_1 TEXT; +ALTER TABLE ip_users + MODIFY COLUMN user_address_2 TEXT; +ALTER TABLE ip_users + MODIFY COLUMN user_city TEXT; +ALTER TABLE ip_users + MODIFY COLUMN user_state TEXT; +ALTER TABLE ip_users + MODIFY COLUMN user_zip TEXT; +ALTER TABLE ip_users + MODIFY COLUMN user_country TEXT; +ALTER TABLE ip_users + MODIFY COLUMN user_phone TEXT; +ALTER TABLE ip_users + MODIFY COLUMN user_fax TEXT; +ALTER TABLE ip_users + MODIFY COLUMN user_mobile TEXT; +ALTER TABLE ip_users + MODIFY COLUMN user_email TEXT; +ALTER TABLE ip_users + MODIFY COLUMN user_web TEXT; +ALTER TABLE ip_users + MODIFY COLUMN user_vat_id TEXT; +ALTER TABLE ip_users + MODIFY COLUMN user_tax_code TEXT; +ALTER TABLE ip_users + MODIFY COLUMN user_psalt TEXT; +ALTER TABLE ip_users + MODIFY COLUMN user_tax_code TEXT; + +# IP-417 - Improve product database handling +ALTER TABLE ip_products + MODIFY COLUMN family_id INT(11) NULL DEFAULT NULL; +ALTER TABLE ip_products + MODIFY COLUMN tax_rate_id INT(11) NULL DEFAULT NULL; +ALTER TABLE ip_products + ADD COLUMN provider_name TEXT NULL DEFAULT NULL + AFTER purchase_price; + +# Change values for read-only setting +UPDATE ip_settings +SET setting_value = 2 +WHERE setting_key = 'read_only_toggle' AND + setting_value = 'sent'; + +UPDATE ip_settings +SET setting_value = 3 +WHERE setting_key = 'read_only_toggle' AND + setting_value = 'viewed'; + +UPDATE ip_settings +SET setting_value = 4 +WHERE setting_key = 'read_only_toggle' AND + setting_value = 'paid'; + +# IP-422 - Improve session security +CREATE TABLE IF NOT EXISTS `ip_sessions` ( + session_id VARCHAR(40) DEFAULT '0' NOT NULL, + ip_address VARCHAR(45) DEFAULT '0' NOT NULL, + user_agent VARCHAR(120) NOT NULL, + last_activity INT(10) UNSIGNED DEFAULT 0 NOT NULL, + user_data TEXT NOT NULL, + PRIMARY KEY (session_id), + KEY `last_activity_idx` (`last_activity`) +); diff --git a/application/modules/setup/sql/020_1.4.8.sql b/application/modules/setup/sql/020_1.4.8.sql new file mode 100644 index 0000000..af5abb9 --- /dev/null +++ b/application/modules/setup/sql/020_1.4.8.sql @@ -0,0 +1,105 @@ +# IP-322 - Invoice item_name database field should be larger + additional db changes +ALTER TABLE ip_clients + MODIFY COLUMN client_name TEXT; +ALTER TABLE ip_clients + MODIFY COLUMN client_address_1 TEXT; +ALTER TABLE ip_clients + MODIFY COLUMN client_address_2 TEXT; +ALTER TABLE ip_clients + MODIFY COLUMN client_city TEXT; +ALTER TABLE ip_clients + MODIFY COLUMN client_state TEXT; +ALTER TABLE ip_clients + MODIFY COLUMN client_zip TEXT; +ALTER TABLE ip_clients + MODIFY COLUMN client_country TEXT; +ALTER TABLE ip_clients + MODIFY COLUMN client_phone TEXT; +ALTER TABLE ip_clients + MODIFY COLUMN client_fax TEXT; +ALTER TABLE ip_clients + MODIFY COLUMN client_mobile TEXT; +ALTER TABLE ip_clients + MODIFY COLUMN client_email TEXT; +ALTER TABLE ip_clients + MODIFY COLUMN client_web TEXT; +ALTER TABLE ip_clients + MODIFY COLUMN client_vat_id TEXT; +ALTER TABLE ip_clients + MODIFY COLUMN client_tax_code TEXT; +ALTER TABLE ip_custom_fields + MODIFY COLUMN custom_field_table VARCHAR(255); +ALTER TABLE ip_custom_fields + MODIFY COLUMN custom_field_label TEXT; +ALTER TABLE ip_custom_fields + MODIFY COLUMN custom_field_column TEXT; +ALTER TABLE ip_email_templates + MODIFY COLUMN email_template_title TEXT; +ALTER TABLE ip_email_templates + MODIFY COLUMN email_template_subject TEXT; +ALTER TABLE ip_email_templates + MODIFY COLUMN email_template_from_name TEXT; +ALTER TABLE ip_email_templates + MODIFY COLUMN email_template_from_email TEXT; +ALTER TABLE ip_email_templates + MODIFY COLUMN email_template_cc TEXT; +ALTER TABLE ip_email_templates + MODIFY COLUMN email_template_bcc TEXT; +ALTER TABLE ip_families + MODIFY COLUMN family_name TEXT; +ALTER TABLE ip_invoice_groups + MODIFY COLUMN invoice_group_name TEXT; +ALTER TABLE ip_invoice_items + MODIFY COLUMN item_name TEXT DEFAULT NULL; +ALTER TABLE ip_invoice_items + MODIFY COLUMN item_description LONGTEXT DEFAULT NULL; +ALTER TABLE ip_payment_methods + MODIFY COLUMN payment_method_name TEXT; +ALTER TABLE ip_products + MODIFY COLUMN product_sku TEXT; +ALTER TABLE ip_products + MODIFY COLUMN product_name TEXT; +ALTER TABLE ip_projects + MODIFY COLUMN project_name TEXT; +ALTER TABLE ip_quote_items + MODIFY COLUMN item_name TEXT DEFAULT NULL; +ALTER TABLE ip_quote_items + MODIFY COLUMN item_description TEXT DEFAULT NULL; +ALTER TABLE ip_tasks + MODIFY COLUMN task_name TEXT; +ALTER TABLE ip_tax_rates + MODIFY COLUMN tax_rate_name TEXT; +ALTER TABLE ip_users + MODIFY COLUMN user_name TEXT; +ALTER TABLE ip_users + MODIFY COLUMN user_company TEXT; +ALTER TABLE ip_users + MODIFY COLUMN user_address_1 TEXT; +ALTER TABLE ip_users + MODIFY COLUMN user_address_2 TEXT; +ALTER TABLE ip_users + MODIFY COLUMN user_city TEXT; +ALTER TABLE ip_users + MODIFY COLUMN user_state TEXT; +ALTER TABLE ip_users + MODIFY COLUMN user_zip TEXT; +ALTER TABLE ip_users + MODIFY COLUMN user_country TEXT; +ALTER TABLE ip_users + MODIFY COLUMN user_phone TEXT; +ALTER TABLE ip_users + MODIFY COLUMN user_fax TEXT; +ALTER TABLE ip_users + MODIFY COLUMN user_mobile TEXT; +ALTER TABLE ip_users + MODIFY COLUMN user_email TEXT; +ALTER TABLE ip_users + MODIFY COLUMN user_web TEXT; +ALTER TABLE ip_users + MODIFY COLUMN user_vat_id TEXT; +ALTER TABLE ip_users + MODIFY COLUMN user_tax_code TEXT; +ALTER TABLE ip_users + MODIFY COLUMN user_psalt TEXT; +ALTER TABLE ip_users + MODIFY COLUMN user_tax_code TEXT; diff --git a/application/modules/setup/sql/021_1.4.9.sql b/application/modules/setup/sql/021_1.4.9.sql new file mode 100644 index 0000000..14f6e2b --- /dev/null +++ b/application/modules/setup/sql/021_1.4.9.sql @@ -0,0 +1 @@ +# Added for versioning diff --git a/application/modules/setup/sql/022_1.4.10.sql b/application/modules/setup/sql/022_1.4.10.sql new file mode 100644 index 0000000..14f6e2b --- /dev/null +++ b/application/modules/setup/sql/022_1.4.10.sql @@ -0,0 +1 @@ +# Added for versioning diff --git a/application/modules/setup/sql/023_1.5.0.sql b/application/modules/setup/sql/023_1.5.0.sql new file mode 100644 index 0000000..1f46d12 --- /dev/null +++ b/application/modules/setup/sql/023_1.5.0.sql @@ -0,0 +1,134 @@ +# Module "units" +CREATE TABLE IF NOT EXISTS `ip_units` ( + `unit_id` INT(11) NOT NULL AUTO_INCREMENT, + `unit_name` VARCHAR(50) DEFAULT NULL, + `unit_name_plrl` VARCHAR(50) DEFAULT NULL, + PRIMARY KEY (`unit_id`) +) + ENGINE = MyISAM + DEFAULT CHARSET = utf8; + +ALTER TABLE ip_products + ADD COLUMN unit_id INT(11); + +ALTER TABLE ip_quote_items + ADD COLUMN item_product_unit VARCHAR(50) DEFAULT NULL, + ADD COLUMN item_product_unit_id INT(11); + +ALTER TABLE ip_invoice_items + ADD COLUMN item_product_unit VARCHAR(50) DEFAULT NULL, + ADD COLUMN item_product_unit_id INT(11); + +# Custom Field Enhancements +CREATE TABLE `ip_custom_values` ( + `custom_values_id` INT(11) NOT NULL AUTO_INCREMENT, + `custom_values_field` INT(11) NOT NULL, + `custom_values_value` TEXT NOT NULL, + PRIMARY KEY (`custom_values_id`) +) + ENGINE = MyISAM + DEFAULT CHARSET = utf8; + +ALTER TABLE `ip_custom_fields` + ADD `custom_field_type` VARCHAR(255) DEFAULT 'TEXT' NOT NULL + AFTER `custom_field_label`; + +# Sumex changes +CREATE TABLE `ip_invoice_sumex` ( + `sumex_id` INT(11) NOT NULL, + `sumex_invoice` INT(11) NOT NULL, + `sumex_reason` INT(11) NOT NULL, + `sumex_diagnosis` VARCHAR(500) NOT NULL, + `sumex_observations` VARCHAR(500) NOT NULL, + `sumex_treatmentstart` DATE NOT NULL, + `sumex_treatmentend` DATE NOT NULL, + `sumex_casedate` DATE NOT NULL, + `sumex_casenumber` VARCHAR(35) DEFAULT NULL +) + ENGINE = MyISAM + DEFAULT CHARSET = utf8; + +ALTER TABLE `ip_invoice_sumex` + ADD PRIMARY KEY (`sumex_id`), + MODIFY `sumex_id` INT(11) NOT NULL AUTO_INCREMENT; + +ALTER TABLE `ip_clients` + ADD COLUMN client_surname VARCHAR(255) DEFAULT NULL, + ADD COLUMN client_avs VARCHAR(16) DEFAULT NULL; + +ALTER TABLE `ip_clients` + ADD COLUMN client_insurednumber VARCHAR(30) DEFAULT NULL, + ADD COLUMN client_veka VARCHAR(30) DEFAULT NULL, + ADD COLUMN client_birthdate DATE DEFAULT NULL, + ADD COLUMN client_gender INT(1) DEFAULT 0; + +ALTER TABLE `ip_invoice_items` + ADD COLUMN item_date DATE; + +INSERT INTO `ip_settings` (setting_key, setting_value) +VALUES + ('sumex', '0'), + ('sumex_sliptype', '1'), + ('sumex_canton', '0'); + +ALTER TABLE `ip_users` + ADD COLUMN user_subscribernumber VARCHAR(40) DEFAULT NULL, + ADD COLUMN user_iban VARCHAR(34) DEFAULT NULL, + ADD COLUMN user_gln BIGINT(13) DEFAULT NULL, + ADD COLUMN user_rcc VARCHAR(7) DEFAULT NULL; + +ALTER TABLE `ip_products` + ADD COLUMN product_tariff INT(11) DEFAULT NULL; + +# End Sumex Changes + +# Delete and re-add the ip_sessions table for CI 3 +DROP TABLE `ip_sessions`; +CREATE TABLE IF NOT EXISTS `ip_sessions` ( + `id` VARCHAR(128) NOT NULL, + `ip_address` VARCHAR(45) NOT NULL, + `timestamp` INT(10) UNSIGNED DEFAULT 0 NOT NULL, + `data` BLOB NOT NULL, + KEY `ip_sessions_timestamp` (`timestamp`) +); + +# IP-491 - Localization per client and user +ALTER TABLE `ip_users` + ADD `user_language` VARCHAR(255) DEFAULT 'system' + AFTER `user_date_modified`; + +ALTER TABLE `ip_clients` + ADD `client_language` VARCHAR(255) DEFAULT 'system' + AFTER `client_tax_code`; + +# Insert default theme into database (IP-338) +INSERT INTO `ip_settings` (setting_key, setting_value) +VALUES ('system_theme', 'invoiceplane'); + +# Feature IP-162 +# Allow invoice item to refer to a table `products` or to table `tasks` +ALTER TABLE `ip_invoice_items` + ADD COLUMN `item_task_id` INT(11) DEFAULT NULL + AFTER `item_date_added`; + +# Add default hourly rate for tasks +INSERT INTO `ip_settings` (`setting_key`, `setting_value`) +VALUES ('default_hourly_rate', '0.00'); +INSERT INTO `ip_settings` (`setting_key`, `setting_value`) +VALUES ('projects_enabled', '1'); + +# Add tax rate to tasks +ALTER TABLE `ip_tasks` + ADD COLUMN `tax_rate_id` INT(11) NOT NULL + AFTER `task_status`; + +# Switch to row based custom fields (instead of columns) +# (See Mdl_setup for the migration script) + +# Custom Fields +ALTER TABLE ip_custom_fields + MODIFY custom_field_table VARCHAR(50), + MODIFY custom_field_label VARCHAR(50), + ADD custom_field_location INT(11) DEFAULT 0, + ADD custom_field_order INT(11) DEFAULT 999, + ADD CONSTRAINT UNIQUE (custom_field_table, custom_field_label); diff --git a/application/modules/setup/sql/024_1.5.1.sql b/application/modules/setup/sql/024_1.5.1.sql new file mode 100644 index 0000000..14f6e2b --- /dev/null +++ b/application/modules/setup/sql/024_1.5.1.sql @@ -0,0 +1 @@ +# Added for versioning diff --git a/application/modules/setup/sql/025_1.5.2.sql b/application/modules/setup/sql/025_1.5.2.sql new file mode 100644 index 0000000..14f6e2b --- /dev/null +++ b/application/modules/setup/sql/025_1.5.2.sql @@ -0,0 +1 @@ +# Added for versioning diff --git a/application/modules/setup/sql/026_1.5.3.sql b/application/modules/setup/sql/026_1.5.3.sql new file mode 100644 index 0000000..14f6e2b --- /dev/null +++ b/application/modules/setup/sql/026_1.5.3.sql @@ -0,0 +1 @@ +# Added for versioning diff --git a/application/modules/setup/views/complete.php b/application/modules/setup/views/complete.php new file mode 100644 index 0000000..cbfcd28 --- /dev/null +++ b/application/modules/setup/views/complete.php @@ -0,0 +1,33 @@ +
    +
    + +

    InvoicePlane

    + +

    + +

    + +

    + +

    + +

    + +

    + +

    + + session->userdata('setup_notice')) { + $setup_notice = $this->session->userdata('setup_notice'); + ?> +
    + +
    + + + + + + +
    +
    diff --git a/application/modules/setup/views/configure_database.php b/application/modules/setup/views/configure_database.php new file mode 100644 index 0000000..1c2c1e8 --- /dev/null +++ b/application/modules/setup/views/configure_database.php @@ -0,0 +1,83 @@ +
    +
    + +

    InvoicePlane

    + +
    + + + + + + + + +
    +
    + +
    + + +

    + +
    + + + +
    + +
    + + + +
    + +
    + + + +
    + +
    + + + +
    + +
    + + + +
    + + + + + +

    + +

    + + + +
    + +
    +
    diff --git a/application/modules/setup/views/create_user.php b/application/modules/setup/views/create_user.php new file mode 100644 index 0000000..7a0690f --- /dev/null +++ b/application/modules/setup/views/create_user.php @@ -0,0 +1,210 @@ + + + + +
    +
    + +

    InvoicePlane

    + +
    + + + + + + + + layout->load_view('layout/alerts'); ?> + +

    + +
    + + + +
    + +
    + + + +
    + +
    + + +
    +
    + + +
    + + +
    + +
    + + + +
    + +
    + + +
    + + +

    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + + + +

    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + + + +
    + +
    +
    diff --git a/application/modules/setup/views/install_tables.php b/application/modules/setup/views/install_tables.php new file mode 100644 index 0000000..f2d7f2b --- /dev/null +++ b/application/modules/setup/views/install_tables.php @@ -0,0 +1,42 @@ +
    +
    + +

    InvoicePlane

    + +
    + + + + + + +

    + + +

    + + + + +

    + + + +

    + + +

    + + + + + + + + +
    + +
    +
    diff --git a/application/modules/setup/views/language.php b/application/modules/setup/views/language.php new file mode 100644 index 0000000..24fad1a --- /dev/null +++ b/application/modules/setup/views/language.php @@ -0,0 +1,30 @@ +
    +
    + +

    InvoicePlane

    + +
    + + + + + +

    + + + +
    + + + +
    + +
    +
    diff --git a/application/modules/setup/views/prerequisites.php b/application/modules/setup/views/prerequisites.php new file mode 100644 index 0000000..f946880 --- /dev/null +++ b/application/modules/setup/views/prerequisites.php @@ -0,0 +1,47 @@ +
    +
    + +

    InvoicePlane

    +
    + + + + + +

    + + +

    + +

    + +

    + + +
    + + +

    + +

    + + + + + + + + + + +
    + +
    +
    diff --git a/application/modules/setup/views/upgrade_tables.php b/application/modules/setup/views/upgrade_tables.php new file mode 100644 index 0000000..7991a61 --- /dev/null +++ b/application/modules/setup/views/upgrade_tables.php @@ -0,0 +1,42 @@ +
    +
    + +

    InvoicePlane

    + +
    + + + + + + +

    + +

    + + +

    + + +

    + + + +

    + + +

    + + + + + + + + +
    + +
    +
    diff --git a/application/modules/tasks/controllers/Ajax.php b/application/modules/tasks/controllers/Ajax.php new file mode 100644 index 0000000..4fdf9f4 --- /dev/null +++ b/application/modules/tasks/controllers/Ajax.php @@ -0,0 +1,41 @@ +load->model('mdl_tasks'); + + if (!empty($invoice_id)) { + $data['tasks'] = $this->mdl_tasks->get_tasks_to_invoice($invoice_id); + } + + $this->layout->load_view('tasks/modal_task_lookups', $data); + } + + public function process_task_selections() + { + $this->load->model('mdl_tasks'); + + $tasks = $this->mdl_tasks->where_in('task_id', $this->input->post('task_ids'))->get()->result(); + foreach ($tasks as $task) { + $task->task_price = format_amount($task->task_price); + } + + echo json_encode($tasks); + } +} diff --git a/application/modules/tasks/controllers/Tasks.php b/application/modules/tasks/controllers/Tasks.php new file mode 100644 index 0000000..f2a49e7 --- /dev/null +++ b/application/modules/tasks/controllers/Tasks.php @@ -0,0 +1,85 @@ +load->model('mdl_tasks'); + } + + /** + * @param int $page + */ + public function index($page = 0) + { + $this->mdl_tasks->paginate(site_url('tasks/index'), $page); + $tasks = $this->mdl_tasks->result(); + + $this->layout->set('tasks', $tasks); + $this->layout->set('task_statuses', $this->mdl_tasks->statuses()); + $this->layout->buffer('content', 'tasks/index'); + $this->layout->render(); + } + + /** + * @param null $id + */ + public function form($id = null) + { + if ($this->input->post('btn_cancel')) { + redirect('tasks'); + } + + if ($this->mdl_tasks->run_validation()) { + $this->mdl_tasks->save($id); + redirect('tasks'); + } + + if (!$this->input->post('btn_submit')) { + $prep_form = $this->mdl_tasks->prep_form($id); + if ($id and !$prep_form) { + show_404(); + } + } + + $this->load->model('projects/mdl_projects'); + $this->load->model('tax_rates/mdl_tax_rates'); + + $this->layout->set( + array( + 'projects' => $this->mdl_projects->get()->result(), + 'task_statuses' => $this->mdl_tasks->statuses(), + 'tax_rates' => $this->mdl_tax_rates->get()->result(), + ) + ); + $this->layout->buffer('content', 'tasks/form'); + $this->layout->render(); + } + + /** + * @param $id + */ + public function delete($id) + { + $this->mdl_tasks->delete($id); + redirect('tasks'); + } +} diff --git a/application/modules/tasks/models/Mdl_tasks.php b/application/modules/tasks/models/Mdl_tasks.php new file mode 100644 index 0000000..4d409d6 --- /dev/null +++ b/application/modules/tasks/models/Mdl_tasks.php @@ -0,0 +1,269 @@ +db->select('SQL_CALC_FOUND_ROWS *, + (CASE WHEN DATEDIFF(NOW(), task_finish_date) > 0 THEN 1 ELSE 0 END) is_overdue + ', false); + } + + public function default_order_by() + { + $this->db->order_by('ip_projects.project_name, ip_tasks.task_name'); + } + + public function default_join() + { + $this->db->join('ip_projects', 'ip_projects.project_id = ip_tasks.project_id', 'left'); + } + + public function get_latest() + { + $this->db->order_by('ip_tasks.task_id', 'DESC'); + return $this; + } + + /** + * @param string $match + */ + public function by_task($match) + { + $this->db->like('task_name', $match); + $this->db->or_like('task_description', $match); + } + + /** + * @return array + */ + public function validation_rules() + { + return array( + 'task_name' => array( + 'field' => 'task_name', + 'label' => trans('task_name'), + 'rules' => 'required' + ), + 'task_description' => array( + 'field' => 'task_description', + 'label' => trans('task_description'), + 'rules' => '' + ), + 'task_price' => array( + 'field' => 'task_price', + 'label' => trans('task_price'), + 'rules' => 'required' + ), + 'task_finish_date' => array( + 'field' => 'task_finish_date', + 'label' => trans('task_finish_date'), + 'rules' => 'required' + ), + 'project_id' => array( + 'field' => 'project_id', + 'label' => trans('project'), + 'rules' => '' + ), + 'task_status' => array( + 'field' => 'task_status', + 'label' => lang('status') + ), + 'tax_rate_id' => array( + 'field' => 'tax_rate_id', + 'label' => lang('tax_rate'), + 'rules' => 'numeric' + ), + ); + } + + /** + * @return array + */ + public function db_array() + { + $db_array = parent::db_array(); + + $db_array['task_finish_date'] = date_to_mysql($db_array['task_finish_date']); + $db_array['task_price'] = standardize_amount($db_array['task_price']); + + return $db_array; + } + + /** + * @param null|integer $id + * @return bool + */ + public function prep_form($id = null) + { + if (!parent::prep_form($id)) { + return false; + } + + if (!$id) { + parent::set_form_value('task_finish_date', date('Y-m-d')); + parent::set_form_value('task_price', get_setting('default_hourly_rate')); + } + + return true; + } + + /** + * @param integer $task_id + * @return array + */ + public function get_invoice_for_task($task_id) + { + if (!$task_id) { + return null; + } + + $invoice_item = $this->db->select('ip_invoice_items.invoice_id') + ->from('ip_invoice_items') + ->where('ip_invoice_items.item_task_id', $task_id) + ->get()->result(); + + if (empty($invoice_item) || !isset($invoice_item->invoice_id)) { + return null; + } + + $this->load->model('invoices/mdl_invoices'); + + return $this->mdl_invoices->get_by_id($invoice_item->invoice_id); + } + + /** + * @param integer $invoice_id + * @return array + */ + public function get_tasks_to_invoice($invoice_id) + { + $result = array(); + + if (!$invoice_id) { + return $result; + } + + // Get tasks without any project + $query = $this->db->select($this->table . '.*') + ->from($this->table) + ->where($this->table . '.project_id', 0) + ->where($this->table . '.task_status', 3) + ->order_by($this->table . '.task_finish_date', 'ASC') + ->order_by($this->table . '.task_name', 'ASC') + ->get(); + + foreach ($query->result() as $row) { + $result[] = $row; + } + + // Get tasks for this invoice + $query = $this->db->select($this->table . '.*, ip_projects.project_name') + ->from($this->table) + ->join('ip_projects', 'ip_projects.project_id = ' . $this->table . '.project_id') + ->join('ip_invoices', 'ip_invoices.client_id = ip_projects.client_id') + ->where('ip_invoices.invoice_id', $invoice_id) + ->where($this->table . '.task_status', 3) + ->order_by($this->table . '.task_finish_date', 'ASC') + ->order_by('ip_projects.project_name', 'ASC') + ->order_by($this->table . '.task_name', 'ASC') + ->get(); + + foreach ($query->result() as $row) { + $result[] = $row; + } + + return $result; + } + + /** + * @param integer $invoice_id + */ + public function update_on_invoice_delete($invoice_id) + { + if (!$invoice_id) { + return; + } + $query = $this->db->select($this->table . '.*') + ->from($this->table) + ->join('ip_invoice_items', 'ip_invoice_items.item_task_id = ' . $this->table . '.task_id') + ->where('ip_invoice_items.invoice_id', $invoice_id) + ->get(); + + foreach ($query->result() as $task) { + $this->update_status(3, $task->task_id); + } + } + + /** + * @param integer $new_status + * @param integer $task_id + */ + public function update_status($new_status, $task_id) + { + $statuses_ok = $this->statuses(); + if (isset($statuses_ok[$new_status])) { + parent::save($task_id, array('task_status' => $new_status)); + } + } + + /** + * @return array + */ + public function statuses() + { + return array( + '1' => array( + 'label' => trans('not_started'), + 'class' => 'draft' + ), + '2' => array( + 'label' => trans('in_progress'), + 'class' => 'viewed' + ), + '3' => array( + 'label' => trans('complete'), + 'class' => 'sent' + ), + '4' => array( + 'label' => trans('invoiced'), + 'class' => 'paid' + ) + ); + } + + /** + * @param integer $project_id + */ + public function update_on_project_delete($project_id) + { + if (!$project_id) { + return; + } + + $query = $this->db->select($this->table . '.*') + ->from($this->table) + ->where($this->table . '.project_id', $project_id) + ->get(); + + foreach ($query->result() as $task) { + parent::save($task->task_id, array('task_project_id' => null)); + } + } +} diff --git a/application/modules/tasks/views/form.php b/application/modules/tasks/views/form.php new file mode 100644 index 0000000..71e226a --- /dev/null +++ b/application/modules/tasks/views/form.php @@ -0,0 +1,135 @@ +mdl_tasks->form_value('task_id') && $this->mdl_tasks->form_value('task_status') == 4) : + ?> + + + +
    + + + +
    +

    + layout->load_view('layout/header_buttons'); ?> +
    + +
    + + layout->load_view('layout/alerts'); ?> + + mdl_tasks->form_value('task_id') && $this->mdl_tasks->form_value('task_status') == 4) : ?> +
    + + +
    +
    +
    +
    + mdl_tasks->form_value('task_id')) : ?> + #mdl_tasks->form_value('task_id'); ?>  + mdl_tasks->form_value('task_name', true); ?> + + + +
    +
    + +
    + + +
    + +
    + + +
    + +
    + +
    + +
    + +
    +
    +
    + +
    + + +
    + +
    + +
    + +
    + +
    +
    +
    + +
    + + +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    + +
    + + +
    + +
    +
    +
    +
    + +
    + +
    diff --git a/application/modules/tasks/views/index.php b/application/modules/tasks/views/index.php new file mode 100644 index 0000000..85a628e --- /dev/null +++ b/application/modules/tasks/views/index.php @@ -0,0 +1,92 @@ +
    +

    + +
    + + + +
    + +
    + +
    + +
    + +
    + + layout->load_view('layout/alerts'); ?> + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + task_status"]['class']; ?>"> + task_status"]['label']; ?> + + + task_name); ?> + +
    + task_finish_date); ?> +
    +
    + project_id) ? anchor('projects/view/' . $task->project_id, $task->project_name) : ''; ?> + + task_price); ?> + +
    + + + + +
    + + +
    + +
    + +
    diff --git a/application/modules/tasks/views/modal_task_lookups.php b/application/modules/tasks/views/modal_task_lookups.php new file mode 100644 index 0000000..b8fecf6 --- /dev/null +++ b/application/modules/tasks/views/modal_task_lookups.php @@ -0,0 +1,99 @@ + + + \ No newline at end of file diff --git a/application/modules/tasks/views/partial_task_table_modal.php b/application/modules/tasks/views/partial_task_table_modal.php new file mode 100644 index 0000000..68c6cb0 --- /dev/null +++ b/application/modules/tasks/views/partial_task_table_modal.php @@ -0,0 +1,38 @@ +
    + + + + + + + + + + + + + + + + + + + + + +
      +
    + + + project_name) ? htmlsc($task->project_name) : ''; ?> + + task_name); ?> + + task_finish_date); ?> + + task_description)); ?> + + task_price); ?> +
    +
    \ No newline at end of file diff --git a/application/modules/tax_rates/controllers/Tax_rates.php b/application/modules/tax_rates/controllers/Tax_rates.php new file mode 100644 index 0000000..e8ffdad --- /dev/null +++ b/application/modules/tax_rates/controllers/Tax_rates.php @@ -0,0 +1,81 @@ +load->model('mdl_tax_rates'); + } + + /** + * @param int $page + */ + public function index($page = 0) + { + $this->mdl_tax_rates->paginate(site_url('tax_rates/index'), $page); + $tax_rates = $this->mdl_tax_rates->result(); + + $this->layout->set('tax_rates', $tax_rates); + $this->layout->buffer('content', 'tax_rates/index'); + $this->layout->render(); + } + + /** + * @param null $id + */ + public function form($id = null) + { + if ($this->input->post('btn_cancel')) { + redirect('tax_rates'); + } + + if ($this->mdl_tax_rates->run_validation()) { + $this->mdl_tax_rates->form_values['tax_rate_percent'] = standardize_amount($this->mdl_tax_rates->form_values['tax_rate_percent']); + + // We need to use the correct decimal point for sql IPT-310 + $db_array = $this->mdl_tax_rates->db_array(); + $db_array['tax_rate_percent'] = standardize_amount($this->input->post('tax_rate_percent')); + + $this->mdl_tax_rates->save($id, $db_array); + + redirect('tax_rates'); + } + + if ($id and !$this->input->post('btn_submit')) { + if (!$this->mdl_tax_rates->prep_form($id)) { + show_404(); + } + } + + $this->layout->buffer('content', 'tax_rates/form'); + $this->layout->render(); + } + + /** + * @param $id + */ + public function delete($id) + { + $this->mdl_tax_rates->delete($id); + redirect('tax_rates'); + } + +} diff --git a/application/modules/tax_rates/models/Mdl_tax_rates.php b/application/modules/tax_rates/models/Mdl_tax_rates.php new file mode 100644 index 0000000..67cd2d3 --- /dev/null +++ b/application/modules/tax_rates/models/Mdl_tax_rates.php @@ -0,0 +1,50 @@ +db->select('SQL_CALC_FOUND_ROWS *', false); + } + + public function default_order_by() + { + $this->db->order_by('ip_tax_rates.tax_rate_percent'); + } + + /** + * @return array + */ + public function validation_rules() + { + return array( + 'tax_rate_name' => array( + 'field' => 'tax_rate_name', + 'label' => trans('tax_rate_name'), + 'rules' => 'required' + ), + 'tax_rate_percent' => array( + 'field' => 'tax_rate_percent', + 'label' => trans('tax_rate_percent'), + 'rules' => 'required' + ) + ); + } + +} diff --git a/application/modules/tax_rates/views/form.php b/application/modules/tax_rates/views/form.php new file mode 100644 index 0000000..cf77e41 --- /dev/null +++ b/application/modules/tax_rates/views/form.php @@ -0,0 +1,41 @@ +
    + + + +
    +

    + layout->load_view('layout/header_buttons'); ?> +
    + +
    + + layout->load_view('layout/alerts'); ?> + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + + +
    +
    + +
    + +
    diff --git a/application/modules/tax_rates/views/index.php b/application/modules/tax_rates/views/index.php new file mode 100644 index 0000000..a0adbf6 --- /dev/null +++ b/application/modules/tax_rates/views/index.php @@ -0,0 +1,63 @@ +
    +

    + +
    + + + +
    + +
    + +
    + +
    + +
    + + layout->load_view('layout/alerts'); ?> + +
    + + + + + + + + + + + + + + + + + + + + +
    tax_rate_name); ?>tax_rate_percent); ?>% +
    + + + + +
    +
    +
    + +
    diff --git a/application/modules/units/controllers/Units.php b/application/modules/units/controllers/Units.php new file mode 100644 index 0000000..af9bee8 --- /dev/null +++ b/application/modules/units/controllers/Units.php @@ -0,0 +1,88 @@ +load->model('mdl_units'); + } + + /** + * @param int $page + */ + public function index($page = 0) + { + $this->mdl_units->paginate(site_url('units/index'), $page); + $units = $this->mdl_units->result(); + + $this->layout->set('units', $units); + $this->layout->buffer('content', 'units/index'); + $this->layout->render(); + } + + /** + * @param null $id + */ + public function form($id = null) + { + if ($this->input->post('btn_cancel')) { + redirect('units'); + } + + if ($this->input->post('is_update') == 0 + && $this->input->post('unit_name') != '' + && $this->input->post('unit_name_plrl') != '' + ) { + $check = $this->db->get_where('ip_units', array('unit_name' => $this->input->post('unit_name')))->result(); + + if (!empty($check)) { + $this->session->set_flashdata('alert_error', trans('unit_already_exists')); + redirect('units/form'); + } + } + + if ($this->mdl_units->run_validation()) { + $this->mdl_units->save($id); + redirect('units'); + } + + if ($id and !$this->input->post('btn_submit')) { + if (!$this->mdl_units->prep_form($id)) { + show_404(); + } + + $this->mdl_units->set_form_value('is_update', true); + } + + $this->layout->buffer('content', 'units/form'); + $this->layout->render(); + } + + /** + * @param $id + */ + public function delete($id) + { + $this->mdl_units->delete($id); + redirect('units'); + } + +} diff --git a/application/modules/units/models/Mdl_units.php b/application/modules/units/models/Mdl_units.php new file mode 100644 index 0000000..ccf146d --- /dev/null +++ b/application/modules/units/models/Mdl_units.php @@ -0,0 +1,73 @@ +db->select('SQL_CALC_FOUND_ROWS *', false); + } + + public function default_order_by() + { + $this->db->order_by('ip_units.unit_name'); + } + + /** + * Return either the singular unit name or the plural unit name, + * depending on the quantity + * + * @param $unit_id + * @param $quantity + * @return mixed + */ + public function get_name($unit_id, $quantity) + { + if ($unit_id) { + $units = $this->get()->result(); + foreach ($units as $unit) { + if ($unit->unit_id == $unit_id) { + if ($quantity > 1) + return $unit->unit_name_plrl; + else + return $unit->unit_name; + } + } + } + } + + /** + * @return array + */ + public function validation_rules() + { + return array( + 'unit_name' => array( + 'field' => 'unit_name', + 'label' => trans('unit_name'), + 'rules' => 'required' + ), + 'unit_name_plrl' => array( + 'field' => 'unit_name_plrl', + 'label' => trans('unit_name_plrl'), + 'rules' => 'required' + ) + ); + } + +} diff --git a/application/modules/units/views/form.php b/application/modules/units/views/form.php new file mode 100644 index 0000000..090cfb0 --- /dev/null +++ b/application/modules/units/views/form.php @@ -0,0 +1,46 @@ +
    + + + +
    +

    + layout->load_view('layout/header_buttons'); ?> +
    + +
    + +
    +
    + + layout->load_view('layout/alerts'); ?> + + mdl_units->form_value('is_update')) { + echo 'value="1"'; + } else { + echo 'value="0"'; + } ?> + > + +
    + + +
    + +
    + + +
    + +
    +
    + +
    + +
    diff --git a/application/modules/units/views/index.php b/application/modules/units/views/index.php new file mode 100644 index 0000000..d378252 --- /dev/null +++ b/application/modules/units/views/index.php @@ -0,0 +1,65 @@ +
    +

    + +
    + + + +
    + +
    + +
    + +
    + +
    + + layout->load_view('layout/alerts'); ?> + +
    + + + + + + + + + + + + + + + + + + + + +
    unit_name); ?>unit_name_plrl); ?> +
    + + + + +
    +
    + +
    + +
    diff --git a/application/modules/upload/controllers/Upload.php b/application/modules/upload/controllers/Upload.php new file mode 100644 index 0000000..e34ba10 --- /dev/null +++ b/application/modules/upload/controllers/Upload.php @@ -0,0 +1,195 @@ + 'image/gif', + 'jpg' => 'image/jpeg', + 'jpeg' => 'image/jpeg', + 'pdf' => 'application/pdf', + 'png' => 'image/png', + 'txt' => 'text/plain', + 'xml' => 'application/xml', + ); + + /** + * Upload constructor. + */ + public function __construct() + { + parent::__construct(); + $this->load->model('upload/mdl_uploads'); + $this->targetPath = UPLOADS_FOLDER . '/customer_files'; + } + + /** + * @param $customerId + * @param $url_key + * @return boolean|null + */ + public function upload_file($customerId, $url_key) + { + Upload::create_dir($this->targetPath . '/'); + + if (!empty($_FILES)) { + $tempFile = $_FILES['file']['tmp_name']; + $fileName = preg_replace('/\s+/', '_', $_FILES['file']['name']); + $targetFile = $this->targetPath . '/' . $url_key . '_' . $fileName; + $file_exists = file_exists($targetFile); + + if (!$file_exists) { + // If file does not exists then upload + $data = array( + 'client_id' => $customerId, + 'url_key' => $url_key, + 'file_name_original' => $fileName, + 'file_name_new' => $url_key . '_' . $fileName + ); + + $this->mdl_uploads->create($data); + + move_uploaded_file($tempFile, $targetFile); + + echo json_encode([ + 'success' => true + ]); + + } else { + // If file exists then echo the error and set a http error response + echo json_encode([ + 'success' => false, + 'message' => trans('error_duplicate_file') + ]); + http_response_code(404); + } + + } else { + Upload::show_files($url_key, $customerId); + } + } + + /** + * @param string $path + * @param string $chmod + * @return bool + */ + public function create_dir($path, $chmod = '0777') + { + if (!(is_dir($path) || is_link($path))) { + return mkdir($path, $chmod); + } else { + return false; + } + } + + /** + * @param $url_key + * @param null $customerId + * @return void + */ + public function show_files($url_key, $customerId = null) + { + $result = array(); + $path = $this->targetPath; + + $files = scandir($path); + + if ($files !== false) { + + foreach ($files as $file) { + if (in_array($file, array(".", ".."))) { + continue; + } + if (strpos($file, $url_key) !== 0) { + continue; + } + if (substr(realpath($path), realpath($file) == 0)) { + $obj['name'] = substr($file, strpos($file, '_', 1) + 1); + $obj['fullname'] = $file; + $obj['size'] = filesize($path . '/' . $file); + $obj['fullpath'] = $path . '/' . $file; + $result[] = $obj; + } + } + + } else { + return; + } + + echo json_encode($result); + } + + /** + * @param $url_key + */ + public function delete_file($url_key) + { + $path = $this->targetPath; + $fileName = $_POST['name']; + + $this->mdl_uploads->delete_file($url_key, $fileName); + + // AVOID TREE TRAVERSAL! + $finalPath = $path . '/' . $url_key . '_' . $fileName; + + if (strpos(realpath($path), realpath($finalPath)) == 0) { + unlink($path . '/' . $url_key . '_' . $fileName); + } + } + + /** + * Returns the corresponding file as a download and prevents execution of files + * + * @param string $filename + * @return resource + */ + public function get_file($filename) + { + $base_path = UPLOADS_FOLDER . 'customer_files/'; + $file_path = $base_path . $filename; + + if (strpos(realpath($base_path), realpath($file_path)) != 0) { + show_404(); + exit; + } + + $path_parts = pathinfo($file_path); + $file_ext = $path_parts['extension']; + + if (file_exists($file_path)) { + $file_size = filesize($file_path); + + $save_ctype = isset($this->content_types[$file_ext]); + $ctype = $save_ctype ? $this->content_types[$file_ext] : $this->ctype_default; + + header("Expires: -1"); + header("Cache-Control: public, must-revalidate, post-check=0, pre-check=0"); + header("Content-Disposition: attachment; filename=\"$filename\""); + header("Content-Type: " . $ctype); + header("Content-Length: " . $file_size); + + echo file_get_contents($file_path); + exit; + } + + show_404(); + exit; + } + +} diff --git a/application/modules/upload/models/Mdl_uploads.php b/application/modules/upload/models/Mdl_uploads.php new file mode 100644 index 0000000..21b5967 --- /dev/null +++ b/application/modules/upload/models/Mdl_uploads.php @@ -0,0 +1,105 @@ +db->order_by('ip_uploads.upload_id ASC'); + } + + /** + * @param null $db_array + * @return int|null + */ + public function create($db_array = null) + { + $upload_id = parent::save(null, $db_array); + + return $upload_id; + } + + /** + * @param $id + * @return array + */ + public function get_quote_uploads($id) + { + $this->load->model('quotes/mdl_quotes'); + $quote = $this->mdl_quotes->get_by_id($id); + $query = $this->db->query("SELECT file_name_new,file_name_original FROM ip_uploads WHERE url_key = '" . $quote->quote_url_key . "'"); + + $names = array(); + + if ($query->num_rows() > 0) { + foreach ($query->result() as $row) { + array_push($names, array( + 'path' => getcwd() . '/uploads/customer_files/' . $row->file_name_new, + 'filename' => $row->file_name_original)); + } + } + + return $names; + } + + /** + * @param $id + * @return array + */ + public function get_invoice_uploads($id) + { + $this->load->model('invoices/mdl_invoices'); + $invoice = $this->mdl_invoices->get_by_id($id); + $query = $this->db->query("SELECT file_name_new,file_name_original FROM ip_uploads WHERE url_key = '" . $invoice->invoice_url_key . "'"); + + $names = array(); + + if ($query->num_rows() > 0) { + foreach ($query->result() as $row) { + array_push($names, array( + 'path' => getcwd() . '/uploads/customer_files/' . $row->file_name_new, + 'filename' => $row->file_name_original)); + } + } + + return $names; + } + + /** + * @param $url_key + * @param $filename + */ + public function delete_file($url_key, $filename) + { + $this->db->where('url_key', $url_key); + $this->db->where('file_name_original', $filename); + $this->db->delete('ip_uploads'); + } + + /** + * @param $client_id + * @return $this + */ + public function by_client($client_id) + { + $this->filter_where('ip_uploads.client_id', $client_id); + return $this; + } + +} diff --git a/application/modules/upload/views/dropzone-invoice-html.php b/application/modules/upload/views/dropzone-invoice-html.php new file mode 100644 index 0000000..9b582b7 --- /dev/null +++ b/application/modules/upload/views/dropzone-invoice-html.php @@ -0,0 +1,67 @@ +
    + +
    + +
    + +
    + + + + +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    + +
    +
    + +
    + +
    +
    +

    + +
    +
    +

    +
    +
    +
    +
    +
    + + is_read_only != 1) { ?> + + +
    +
    +
    +
    +
    + +
    + +
    diff --git a/application/modules/upload/views/dropzone-invoice-scripts.php b/application/modules/upload/views/dropzone-invoice-scripts.php new file mode 100644 index 0000000..0c20b1e --- /dev/null +++ b/application/modules/upload/views/dropzone-invoice-scripts.php @@ -0,0 +1,146 @@ + \ No newline at end of file diff --git a/application/modules/upload/views/dropzone-quote-html.php b/application/modules/upload/views/dropzone-quote-html.php new file mode 100644 index 0000000..5b812e4 --- /dev/null +++ b/application/modules/upload/views/dropzone-quote-html.php @@ -0,0 +1,71 @@ +
    + +
    + +
    + +
    + + + + +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    + + + +
    +
    +

    +

    + + +
    +
    +

    +

    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + + +
    +
    diff --git a/application/modules/upload/views/dropzone-quote-scripts.php b/application/modules/upload/views/dropzone-quote-scripts.php new file mode 100644 index 0000000..9417536 --- /dev/null +++ b/application/modules/upload/views/dropzone-quote-scripts.php @@ -0,0 +1,129 @@ + \ No newline at end of file diff --git a/application/modules/user_clients/controllers/User_clients.php b/application/modules/user_clients/controllers/User_clients.php new file mode 100644 index 0000000..e4b172f --- /dev/null +++ b/application/modules/user_clients/controllers/User_clients.php @@ -0,0 +1,98 @@ +load->model('users/mdl_users'); + $this->load->model('clients/mdl_clients'); + $this->load->model('user_clients/mdl_user_clients'); + } + + public function index() + { + redirect('users'); + } + + /** + * @param null $id + */ + public function user($id = null) + { + if ($this->input->post('btn_cancel')) { + redirect('users'); + } + + $user = $this->mdl_users->get_by_id($id); + + if (empty($user)) { + redirect('users'); + } + + $user_clients = $this->mdl_user_clients->assigned_to($id)->get()->result(); + + $this->layout->set('user', $user); + $this->layout->set('user_clients', $user_clients); + $this->layout->set('id', $id); + $this->layout->buffer('content', 'user_clients/field'); + $this->layout->render(); + } + + /** + * @param null $user_id + */ + public function create($user_id = null) + { + if (!$user_id) { + redirect('custom_values'); + } + + if ($this->input->post('btn_cancel')) { + redirect('user_clients/field/' . $user_id); + } + + if ($this->mdl_user_clients->run_validation()) { + $this->mdl_user_clients->save(); + redirect('user_clients/user/' . $user_id); + } + + $user = $this->mdl_users->get_by_id($user_id); + $clients = $this->mdl_clients->get_not_assigned_to_user($user_id); + + $this->layout->set('id', $user_id); + $this->layout->set('user', $user); + $this->layout->set('clients', $clients); + $this->layout->buffer('content', 'user_clients/new'); + $this->layout->render(); + } + + /** + * @param integer $user_client_id + */ + public function delete($user_client_id) + { + $ref = $this->mdl_user_clients->get_by_id($user_client_id); + + $this->mdl_user_clients->delete($user_client_id); + redirect('user_clients/user/' . $ref->user_id); + } + +} diff --git a/application/modules/user_clients/models/Mdl_user_clients.php b/application/modules/user_clients/models/Mdl_user_clients.php new file mode 100644 index 0000000..35bb05e --- /dev/null +++ b/application/modules/user_clients/models/Mdl_user_clients.php @@ -0,0 +1,66 @@ +db->select('ip_user_clients.*, ip_users.user_name, ip_clients.client_name, ip_clients.client_surname'); + } + + public function default_join() + { + $this->db->join('ip_users', 'ip_users.user_id = ip_user_clients.user_id'); + $this->db->join('ip_clients', 'ip_clients.client_id = ip_user_clients.client_id'); + } + + public function default_order_by() + { + $this->db->order_by('ip_clients.client_name', 'ACS'); + } + + /** + * @return array + */ + public function validation_rules() + { + return array( + 'user_id' => array( + 'field' => 'user_id', + 'label' => trans('user'), + 'rules' => 'required' + ), + 'client_id' => array( + 'field' => 'client_id', + 'label' => trans('client'), + 'rules' => 'required' + ), + ); + } + + /** + * @param $user_id + * @return $this + */ + public function assigned_to($user_id) + { + $this->filter_where('ip_user_clients.user_id', $user_id); + return $this; + } + +} diff --git a/application/modules/user_clients/views/field.php b/application/modules/user_clients/views/field.php new file mode 100644 index 0000000..95ce13b --- /dev/null +++ b/application/modules/user_clients/views/field.php @@ -0,0 +1,74 @@ +
    + + + +
    +

    + +
    + +
    +
    + +
    + + layout->load_view('layout/alerts'); ?> + +
    +
    + +
    +
    + user_name); ?> +
    + +
    +
    + + + + + + + + + + + + + + + + + + +
    + + + + +
    + + + +
    +
    +
    +
    +
    + +
    +
    + +
    + +
    diff --git a/application/modules/user_clients/views/new.php b/application/modules/user_clients/views/new.php new file mode 100644 index 0000000..0f45041 --- /dev/null +++ b/application/modules/user_clients/views/new.php @@ -0,0 +1,45 @@ +
    + + + +
    +

    + layout->load_view('layout/header_buttons'); ?> +
    + +
    + +
    +
    + + layout->load_view('layout/alerts'); ?> + + + +
    +
    + user_name) ?> +
    +
    + + + + +
    +
    + +
    +
    + +
    + +
    diff --git a/application/modules/users/controllers/Ajax.php b/application/modules/users/controllers/Ajax.php new file mode 100644 index 0000000..5b5b5bd --- /dev/null +++ b/application/modules/users/controllers/Ajax.php @@ -0,0 +1,106 @@ +input->post('user_id'); + $client_id = $this->input->post('client_id'); + + $this->load->model('clients/mdl_clients'); + $this->load->model('users/mdl_user_clients'); + + $client = $this->mdl_clients->get_by_id($client_id); + if ($client) { + $client_id = $client->client_id; + + // Is this a new user or an existing user? + if (!empty($user_id)) { + // Existing user - go ahead and save the entries + $user_client = $this->mdl_user_clients->where('ip_user_clients.user_id', $user_id) + ->where('ip_user_clients.client_id', $client_id)->get(); + + if (!$user_client->num_rows()) { + $this->mdl_user_clients->save(null, array('user_id' => $user_id, 'client_id' => $client_id)); + } + } else { + // New user - assign the entries to a session variable until user record is saved + $user_clients = $this->session->userdata('user_clients') ? $this->session->userdata('user_clients') : array(); + + $user_clients[$client_id] = $client_id; + + $this->session->set_userdata('user_clients', $user_clients); + } + } + } + + public function load_user_client_table() + { + $session_user_clients = $this->session->userdata('user_clients'); + + if ($session_user_clients) { + $this->load->model('clients/mdl_clients'); + + $data = array( + 'id' => null, + 'user_clients' => $this->mdl_clients->where_in('ip_clients.client_id', $session_user_clients)->get()->result() + ); + } else { + $this->load->model('users/mdl_user_clients'); + + $data = array( + 'id' => $this->input->post('user_id'), + 'user_clients' => $this->mdl_user_clients->where('ip_user_clients.user_id', $this->input->post('user_id'))->get()->result() + ); + } + + $this->layout->load_view('users/partial_user_client_table', $data); + } + + public function modal_add_user_client($user_id = null) + { + $this->load->model('clients/mdl_clients'); + + if ($session_user_clients = $this->session->userdata('user_clients')) { + $clients = $this->mdl_clients->where_not_in('ip_clients.client_id', $session_user_clients)->get()->result(); + $assigned_clients = array(); + } else { + $this->load->model('users/mdl_user_clients'); + $assigned_clients_query = $this->mdl_user_clients->where('ip_user_clients.user_id', $user_id)->get()->result(); + $assigned_clients = array(); + + foreach ($assigned_clients_query as $assigned_client) { + $assigned_clients[] = (int)$assigned_client->client_id; + } + + if (empty($assigned_clients)) { + $clients = $this->mdl_clients->get()->result(); + } else { + $clients = $this->mdl_clients->where_not_in('ip_clients.client_id', $assigned_clients)->get()->result(); + } + } + + $data = array( + 'user_id' => $user_id, + 'clients' => $clients, + ); + + $this->layout->load_view('users/modal_user_client', $data); + } + +} diff --git a/application/modules/users/controllers/Users.php b/application/modules/users/controllers/Users.php new file mode 100644 index 0000000..dcaca0d --- /dev/null +++ b/application/modules/users/controllers/Users.php @@ -0,0 +1,196 @@ +load->model('mdl_users'); + } + + /** + * @param int $page + */ + public function index($page = 0) + { + $this->mdl_users->paginate(site_url('users/index'), $page); + $users = $this->mdl_users->result(); + + $this->layout->set('users', $users); + $this->layout->set('user_types', $this->mdl_users->user_types()); + $this->layout->buffer('content', 'users/index'); + $this->layout->render(); + } + + /** + * @param null $id + */ + public function form($id = null) + { + if ($this->input->post('btn_cancel')) { + redirect('users'); + } + + if ($this->mdl_users->run_validation(($id) ? 'validation_rules_existing' : 'validation_rules')) { + $id = $this->mdl_users->save($id); + + $this->load->model('custom_fields/mdl_user_custom'); + $this->mdl_user_custom->save_custom($id, $this->input->post('custom')); + + // Update the session details if the logged in user edited his account + if ($this->session->userdata('user_id') == $id) { + $new_details = $this->mdl_users->get_by_id($id); + + $session_data = array( + 'user_type' => $new_details->user_type, + 'user_id' => $new_details->user_id, + 'user_name' => $new_details->user_name, + 'user_email' => $new_details->user_email, + 'user_company' => $new_details->user_company, + 'user_language' => isset($new_details->user_language) ? $new_details->user_language : 'system', + ); + + $this->session->set_userdata($session_data); + } + + $this->session->unset_userdata('user_clients'); + + redirect('users'); + } + + if ($id && !$this->input->post('btn_submit')) { + if (!$this->mdl_users->prep_form($id)) { + show_404(); + } + + $this->load->model('custom_fields/mdl_user_custom'); + + $user_custom = $this->mdl_user_custom->where('user_id', $id)->get(); + + if ($user_custom->num_rows()) { + $user_custom = $user_custom->row(); + + unset($user_custom->user_id, $user_custom->user_custom_id); + + foreach ($user_custom as $key => $val) { + $this->mdl_users->set_form_value('custom[' . $key . ']', $val); + } + } + } elseif ($this->input->post('btn_submit')) { + if ($this->input->post('custom')) { + foreach ($this->input->post('custom') as $key => $val) { + $this->mdl_users->set_form_value('custom[' . $key . ']', $val); + } + } + } + + $this->load->helper('custom_values'); + $this->load->model('user_clients/mdl_user_clients'); + $this->load->model('clients/mdl_clients'); + $this->load->model('custom_fields/mdl_custom_fields'); + $this->load->model('custom_fields/mdl_user_custom'); + $this->load->model('custom_values/mdl_custom_values'); + $this->load->helper('country'); + + $custom_fields = $this->mdl_custom_fields->by_table('ip_user_custom')->get()->result(); + $custom_values = []; + foreach ($custom_fields as $custom_field) { + if (in_array($custom_field->custom_field_type, $this->mdl_custom_values->custom_value_fields())) { + $values = $this->mdl_custom_values->get_by_fid($custom_field->custom_field_id)->result(); + $custom_values[$custom_field->custom_field_id] = $values; + } + } + + $fields = $this->mdl_user_custom->get_by_useid($id); + + foreach ($custom_fields as $cfield) { + foreach ($fields as $fvalue) { + if ($fvalue->user_custom_fieldid == $cfield->custom_field_id) { + // TODO: Hackish, may need a better optimization + $this->mdl_users->set_form_value( + 'custom[' . $cfield->custom_field_id . ']', + $fvalue->user_custom_fieldvalue + ); + break; + } + } + } + + $this->layout->set( + array( + 'id' => $id, + 'user_types' => $this->mdl_users->user_types(), + 'user_clients' => $this->mdl_user_clients->where('ip_user_clients.user_id', $id)->get()->result(), + 'custom_fields' => $custom_fields, + 'custom_values' => $custom_values, + 'countries' => get_country_list(trans('cldr')), + 'selected_country' => $this->mdl_users->form_value('user_country') ?: get_setting('default_country'), + 'clients' => $this->mdl_clients->where('client_active', 1)->get()->result(), + 'languages' => get_available_languages(), + ) + ); + + $this->layout->buffer('content', 'users/form'); + $this->layout->render(); + } + + /** + * @param $user_id + */ + public function change_password($user_id) + { + if ($this->input->post('btn_cancel')) { + redirect('users'); + } + + if ($this->mdl_users->run_validation('validation_rules_change_password')) { + $this->mdl_users->save_change_password($user_id, $this->input->post('user_password')); + redirect('users/form/' . $user_id); + } + + $this->layout->buffer('content', 'users/form_change_password'); + $this->layout->render(); + } + + /** + * @param $id + */ + public function delete($id) + { + if ($id <> 1) { + $this->mdl_users->delete($id); + } + redirect('users'); + } + + /** + * @param $user_id + * @param $user_client_id + */ + public function delete_user_client($user_id, $user_client_id) + { + $this->load->model('mdl_user_clients'); + + $this->mdl_user_clients->delete($user_client_id); + + redirect('users/form/' . $user_id); + } + +} diff --git a/application/modules/users/models/Mdl_users.php b/application/modules/users/models/Mdl_users.php new file mode 100644 index 0000000..91e9518 --- /dev/null +++ b/application/modules/users/models/Mdl_users.php @@ -0,0 +1,322 @@ + trans('administrator'), + '2' => trans('guest_read_only') + ); + } + + public function default_select() + { + $this->db->select('SQL_CALC_FOUND_ROWS ip_users.*', false); + } + + public function default_order_by() + { + $this->db->order_by('ip_users.user_name'); + } + + /** + * @return array + */ + public function validation_rules() + { + return array( + 'user_type' => array( + 'field' => 'user_type', + 'label' => trans('user_type'), + 'rules' => 'required' + ), + 'user_email' => array( + 'field' => 'user_email', + 'label' => trans('email'), + 'rules' => 'required|callback_validate_email|is_unique[ip_users.user_email]' + ), + 'user_name' => array( + 'field' => 'user_name', + 'label' => trans('name'), + 'rules' => 'required' + ), + 'user_password' => array( + 'field' => 'user_password', + 'label' => trans('password'), + 'rules' => 'required|min_length[8]' + ), + 'user_passwordv' => array( + 'field' => 'user_passwordv', + 'label' => trans('verify_password'), + 'rules' => 'required|matches[user_password]' + ), + 'user_language' => array( + 'field' => 'user_language', + 'label' => trans('language'), + 'rules' => 'required' + ), + 'user_company' => array( + 'field' => 'user_company' + ), + 'user_address_1' => array( + 'field' => 'user_address_1' + ), + 'user_address_2' => array( + 'field' => 'user_address_2' + ), + 'user_city' => array( + 'field' => 'user_city' + ), + 'user_state' => array( + 'field' => 'user_state' + ), + 'user_zip' => array( + 'field' => 'user_zip' + ), + 'user_country' => array( + 'field' => 'user_country', + 'label' => trans('country'), + ), + 'user_phone' => array( + 'field' => 'user_phone' + ), + 'user_fax' => array( + 'field' => 'user_fax' + ), + 'user_mobile' => array( + 'field' => 'user_mobile' + ), + 'user_web' => array( + 'field' => 'user_web' + ), + 'user_vat_id' => array( + 'field' => 'user_vat_id' + ), + 'user_tax_code' => array( + 'field' => 'user_tax_code' + ), + 'user_subscribernumber' => array( + 'field' => 'user_subscribernumber' + ), + 'user_iban' => array( + 'field' => 'user_iban' + ), + # SUMEX + 'user_gln' => array( + 'field' => 'user_gln' + ), + 'user_rcc' => array( + 'field' => 'user_rcc' + ) + ); + } + + /** + * @return array + */ + public function validation_rules_existing() + { + return array( + 'user_type' => array( + 'field' => 'user_type', + 'label' => trans('user_type'), + 'rules' => 'required' + ), + 'user_email' => array( + 'field' => 'user_email', + 'label' => trans('email'), + 'rules' => 'required|callback_validate_email' + ), + 'user_name' => array( + 'field' => 'user_name', + 'label' => trans('name'), + 'rules' => 'required' + ), + 'user_language' => array( + 'field' => 'user_language', + 'label' => trans('language'), + 'rules' => 'required' + ), + 'user_company' => array( + 'field' => 'user_company' + ), + 'user_address_1' => array( + 'field' => 'user_address_1' + ), + 'user_address_2' => array( + 'field' => 'user_address_2' + ), + 'user_city' => array( + 'field' => 'user_city' + ), + 'user_state' => array( + 'field' => 'user_state' + ), + 'user_zip' => array( + 'field' => 'user_zip' + ), + 'user_country' => array( + 'field' => 'user_country', + 'label' => trans('country'), + ), + 'user_phone' => array( + 'field' => 'user_phone' + ), + 'user_fax' => array( + 'field' => 'user_fax' + ), + 'user_mobile' => array( + 'field' => 'user_mobile' + ), + 'user_web' => array( + 'field' => 'user_web' + ), + 'user_vat_id' => array( + 'field' => 'user_vat_id' + ), + 'user_tax_code' => array( + 'field' => 'user_tax_code' + ), + 'user_subscribernumber' => array( + 'field' => 'user_subscribernumber' + ), + 'user_iban' => array( + 'field' => 'user_iban' + ), + # SUMEX + 'user_gln' => array( + 'field' => 'user_gln' + ), + 'user_rcc' => array( + 'field' => 'user_rcc' + ) + ); + } + + /** + * @return array + */ + public function validation_rules_change_password() + { + return array( + 'user_password' => array( + 'field' => 'user_password', + 'label' => trans('password'), + 'rules' => 'required' + ), + 'user_passwordv' => array( + 'field' => 'user_passwordv', + 'label' => trans('verify_password'), + 'rules' => 'required|matches[user_password]' + ) + ); + } + + /** + * @param string $str + * @return bool + */ + public function validate_email($str) + { + return filter_var($str, FILTER_VALIDATE_EMAIL) ? true : false; + } + + /** + * @return array + */ + public function db_array() + { + $db_array = parent::db_array(); + + if (isset($db_array['user_password'])) { + unset($db_array['user_passwordv']); + + $this->load->library('crypt'); + + $user_psalt = $this->crypt->salt(); + + $db_array['user_psalt'] = $user_psalt; + $db_array['user_password'] = $this->crypt->generate_password($db_array['user_password'], $user_psalt); + } + + return $db_array; + } + + /** + * @param $user_id + * @param $password + */ + public function save_change_password($user_id, $password) + { + $this->load->library('crypt'); + + $user_psalt = $this->crypt->salt(); + $user_password = $this->crypt->generate_password($password, $user_psalt); + + $db_array = array( + 'user_psalt' => $user_psalt, + 'user_password' => $user_password + ); + + $this->db->where('user_id', $user_id); + $this->db->update('ip_users', $db_array); + + $this->session->set_flashdata('alert_success', 'Password Successfully Changed'); + } + + /** + * @param null $id + * @param null $db_array + * @return int|null + */ + public function save($id = null, $db_array = null) + { + $id = parent::save($id, $db_array); + + if ($user_clients = $this->session->userdata('user_clients')) { + $this->load->model('users/mdl_user_clients'); + + foreach ($user_clients as $user_client) { + $this->mdl_user_clients->save(null, array('user_id' => $id, 'client_id' => $user_client)); + } + + $this->session->unset_userdata('user_clients'); + } + + return $id; + } + + /** + * @param int $id + */ + public function delete($id) + { + parent::delete($id); + + $this->load->helper('orphan'); + delete_orphans(); + } + +} diff --git a/application/modules/users/views/form.php b/application/modules/users/views/form.php new file mode 100644 index 0000000..f7a9e2c --- /dev/null +++ b/application/modules/users/views/form.php @@ -0,0 +1,383 @@ +controller->view_data["custom_values"]; +?> + + +
    + + + +
    +

    + layout->load_view('layout/header_buttons'); ?> +
    + +
    +
    +
    + + layout->load_view('layout/alerts'); ?> + +
    + +
    +
    + +
    +
    + + +
    + +
    + + +
    + +
    + + +
    + + +
    + + +
    + +
    + + +
    + +
    + + + +
    + + +
    + + +
    + +
    + + +
    +
    + +
    + +
    +
    +
    + +
    +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + + + + custom_field_location != 2) { + continue; + } ?> + mdl_users, + $custom_field, + $cv + ); + ?> + +
    + +
    + +
    +
    + +
    +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + + + + custom_field_location != 3) { + continue; + } ?> + mdl_users, + $custom_field, + $cv + ); + ?> + +
    + +
    + + mdl_settings->setting('sumex') == '1'): ?> + +
    +
    + +
    +
    + + +
    + +
    + + +
    +
    + +
    + + + +
    + +
    + +
    +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + + + + custom_field_location != 4) { + continue; + } ?> + mdl_users, + $custom_field, + $cv + ); + ?> + +
    + +
    + +
    +
    + +
    + controller->view_data["custom_values"]; + foreach ($custom_fields as $custom_field) { + if ($custom_field->custom_field_location != 0) { + continue; + } + print_field( + $this->mdl_users, + $custom_field, + $cv + ); + } ?> +
    + +
    + + +
    + +
    + +
    +
    +
    + +
    diff --git a/application/modules/users/views/form_change_password.php b/application/modules/users/views/form_change_password.php new file mode 100644 index 0000000..83301d5 --- /dev/null +++ b/application/modules/users/views/form_change_password.php @@ -0,0 +1,57 @@ + + +
    + + + +
    +

    + layout->load_view('layout/header_buttons'); ?> +
    + +
    + +
    +
    + + layout->load_view('layout/alerts'); ?> + +
    +
    + +
    + +
    +
    + + +
    +
    + + +
    +
    + +
    + + +
    +
    + +
    + +
    +
    + +
    + +
    diff --git a/application/modules/users/views/index.php b/application/modules/users/views/index.php new file mode 100644 index 0000000..56781ca --- /dev/null +++ b/application/modules/users/views/index.php @@ -0,0 +1,74 @@ +
    +

    + +
    + + + +
    + +
    + +
    + +
    + +
    + + layout->load_view('layout/alerts'); ?> + +
    + + + + + + + + + + + + + + + + + + + + + + +
    user_name); ?>user_type]; ?>user_email; ?> +
    + user_type == 2) : ?> + + + + + + + + +
    +
    +
    + +
    diff --git a/application/modules/users/views/modal_user_client.php b/application/modules/users/views/modal_user_client.php new file mode 100644 index 0000000..f2fd484 --- /dev/null +++ b/application/modules/users/views/modal_user_client.php @@ -0,0 +1,62 @@ + + + diff --git a/application/modules/welcome/controllers/Welcome.php b/application/modules/welcome/controllers/Welcome.php new file mode 100644 index 0000000..b693d35 --- /dev/null +++ b/application/modules/welcome/controllers/Welcome.php @@ -0,0 +1,24 @@ +load->helper('url'); + + $this->load->view('welcome'); + } +} diff --git a/application/modules/welcome/views/welcome.php b/application/modules/welcome/views/welcome.php new file mode 100644 index 0000000..3377554 --- /dev/null +++ b/application/modules/welcome/views/welcome.php @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + InvoicePlane + + + + + + + + + + + +
    + +
    + +

    + Please install InvoicePlane.
    + Bitte installiere InvoicePlane.
    + S'il vous plaît installer InvoicePlane
    + Por favor, instale InvoicePlane
    +

    + + +
    + +
    + + + \ No newline at end of file diff --git a/application/third_party/MX/Base.php b/application/third_party/MX/Base.php new file mode 100644 index 0000000..c1b856b --- /dev/null +++ b/application/third_party/MX/Base.php @@ -0,0 +1,61 @@ +is_loaded, TRUE)) return $this->item($file); + + $_module OR $_module = CI::$APP->router->fetch_module(); + list($path, $file) = Modules::find($file, $_module, 'config/'); + + if ($path === FALSE) { + parent::load($file, $use_sections, $fail_gracefully); + return $this->item($file); + } + + if ($config = Modules::load_file($file, $path, 'config')) { + /* reference to the config array */ + $current_config =& $this->config; + + if ($use_sections === TRUE) { + if (isset($current_config[$file])) { + $current_config[$file] = array_merge($current_config[$file], $config); + } else { + $current_config[$file] = $config; + } + + } else { + $current_config = array_merge($current_config, $config); + } + + $this->is_loaded[] = $file; + unset($config); + return $this->item($file); + } + } +} \ No newline at end of file diff --git a/application/third_party/MX/Controller.php b/application/third_party/MX/Controller.php new file mode 100644 index 0000000..8285602 --- /dev/null +++ b/application/third_party/MX/Controller.php @@ -0,0 +1,61 @@ +config->item('controller_suffix'), '', get_class($this)); + log_message('debug', $class . " MX_Controller Initialized"); + Modules::$registry[strtolower($class)] = $this; + + /* copy a loader instance and initialize */ + $this->load = clone load_class('Loader'); + $this->load->initialize($this); + + /* autoload module items */ + $this->load->_autoloader($this->autoload); + } + + public function __get($class) + { + return CI::$APP->$class; + } +} \ No newline at end of file diff --git a/application/third_party/MX/Lang.php b/application/third_party/MX/Lang.php new file mode 100644 index 0000000..f9983c9 --- /dev/null +++ b/application/third_party/MX/Lang.php @@ -0,0 +1,68 @@ +load($_lang); + return $this->language; + } + + $deft_lang = CI::$APP->config->item('language'); + $idiom = ($lang == '') ? $deft_lang : $lang; + + if (in_array($langfile . '_lang' . EXT, $this->is_loaded, TRUE)) + return $this->language; + + $_module OR $_module = CI::$APP->router->fetch_module(); + list($path, $_langfile) = Modules::find($langfile . '_lang', $_module, 'language/' . $idiom . '/'); + + if ($path === FALSE) { + if ($lang = parent::load($langfile, $lang, $return, $add_suffix, $alt_path)) return $lang; + + } else { + if ($lang = Modules::load_file($_langfile, $path, 'lang')) { + if ($return) return $lang; + $this->language = array_merge($this->language, $lang); + $this->is_loaded[] = $langfile . '_lang' . EXT; + unset($lang); + } + } + + return $this->language; + } +} \ No newline at end of file diff --git a/application/third_party/MX/Loader.php b/application/third_party/MX/Loader.php new file mode 100644 index 0000000..e2d9919 --- /dev/null +++ b/application/third_party/MX/Loader.php @@ -0,0 +1,435 @@ +_module = CI::$APP->router->fetch_module(); + + if ($controller instanceof MX_Controller) { + /* reference to the module controller */ + $this->controller = $controller; + + /* references to ci loader variables */ + foreach (get_class_vars('CI_Loader') as $var => $val) { + if ($var != '_ci_ob_level') { + $this->$var =& CI::$APP->load->$var; + } + } + } else { + parent::initialize(); + + /* autoload module items */ + $this->_autoloader(array()); + } + + /* add this module path to the loader variables */ + $this->_add_module_paths($this->_module); + } + + /** Autoload module items **/ + public function _autoloader($autoload) + { + $path = FALSE; + + if ($this->_module) { + list($path, $file) = Modules::find('constants', $this->_module, 'config/'); + + /* module constants file */ + if ($path != FALSE) { + include_once $path . $file . EXT; + } + + list($path, $file) = Modules::find('autoload', $this->_module, 'config/'); + + /* module autoload file */ + if ($path != FALSE) { + $autoload = array_merge(Modules::load_file($file, $path, 'autoload'), $autoload); + } + } + + /* nothing to do */ + if (count($autoload) == 0) return; + + /* autoload package paths */ + if (isset($autoload['packages'])) { + foreach ($autoload['packages'] as $package_path) { + $this->add_package_path($package_path); + } + } + + /* autoload config */ + if (isset($autoload['config'])) { + foreach ($autoload['config'] as $config) { + $this->config($config); + } + } + + /* autoload helpers, plugins, languages */ + foreach (array('helper', 'plugin', 'language') as $type) { + if (isset($autoload[$type])) { + foreach ($autoload[$type] as $item) { + $this->$type($item); + } + } + } + + // Autoload drivers + if (isset($autoload['drivers'])) { + foreach ($autoload['drivers'] as $item => $alias) { + (is_int($item)) ? $this->driver($alias) : $this->driver($item, $alias); + } + } + + /* autoload database & libraries */ + if (isset($autoload['libraries'])) { + if (in_array('database', $autoload['libraries'])) { + /* autoload database */ + if (!$db = CI::$APP->config->item('database')) { + $this->database(); + $autoload['libraries'] = array_diff($autoload['libraries'], array('database')); + } + } + + /* autoload libraries */ + foreach ($autoload['libraries'] as $library => $alias) { + (is_int($library)) ? $this->library($alias) : $this->library($library, NULL, $alias); + } + } + + /* autoload models */ + if (isset($autoload['model'])) { + foreach ($autoload['model'] as $model => $alias) { + (is_int($model)) ? $this->model($alias) : $this->model($model, $alias); + } + } + + /* autoload module controllers */ + if (isset($autoload['modules'])) { + foreach ($autoload['modules'] as $controller) { + ($controller != $this->_module) && $this->module($controller); + } + } + } + + /** Load a module config file **/ + public function config($file, $use_sections = FALSE, $fail_gracefully = FALSE) + { + return CI::$APP->config->load($file, $use_sections, $fail_gracefully, $this->_module); + } + + /** Load the database drivers **/ + public function database($params = '', $return = FALSE, $query_builder = NULL) + { + if ($return === FALSE && $query_builder === NULL && + isset(CI::$APP->db) && is_object(CI::$APP->db) && !empty(CI::$APP->db->conn_id) + ) { + return FALSE; + } + + require_once BASEPATH . 'database/DB' . EXT; + + if ($return === TRUE) return DB($params, $query_builder); + + CI::$APP->db = DB($params, $query_builder); + + return $this; + } + + /** Load a module library **/ + public function library($library, $params = NULL, $object_name = NULL) + { + if (is_array($library)) return $this->libraries($library); + + $class = strtolower(basename($library)); + + if (isset($this->_ci_classes[$class]) && $_alias = $this->_ci_classes[$class]) + return $this; + + ($_alias = strtolower($object_name)) OR $_alias = $class; + + list($path, $_library) = Modules::find($library, $this->_module, 'libraries/'); + + /* load library config file as params */ + if ($params == NULL) { + list($path2, $file) = Modules::find($_alias, $this->_module, 'config/'); + ($path2) && $params = Modules::load_file($file, $path2, 'config'); + } + + if ($path === FALSE) { + $this->_ci_load_library($library, $params, $object_name); + } else { + Modules::load_file($_library, $path); + + $library = ucfirst($_library); + CI::$APP->$_alias = new $library($params); + + $this->_ci_classes[$class] = $_alias; + } + return $this; + } + + /** Load an array of libraries **/ + public function libraries($libraries) + { + foreach ($libraries as $library => $alias) { + (is_int($library)) ? $this->library($alias) : $this->library($library, NULL, $alias); + } + return $this; + } + + /** Load a module model **/ + public function model($model, $object_name = NULL, $connect = FALSE) + { + if (is_array($model)) return $this->models($model); + + ($_alias = $object_name) OR $_alias = basename($model); + + if (in_array($_alias, $this->_ci_models, TRUE)) + return $this; + + /* check module */ + list($path, $_model) = Modules::find(strtolower($model), $this->_module, 'models/'); + + if ($path == FALSE) { + /* check application & packages */ + parent::model($model, $object_name, $connect); + } else { + class_exists('CI_Model', FALSE) OR load_class('Model', 'core'); + + if ($connect !== FALSE && !class_exists('CI_DB', FALSE)) { + if ($connect === TRUE) $connect = ''; + $this->database($connect, FALSE, TRUE); + } + + Modules::load_file($_model, $path); + + $model = ucfirst($_model); + CI::$APP->$_alias = new $model(); + + $this->_ci_models[] = $_alias; + } + return $this; + } + + /** Load an array of models **/ + public function models($models) + { + foreach ($models as $model => $alias) { + (is_int($model)) ? $this->model($alias) : $this->model($model, $alias); + } + return $this; + } + + /** Load a module controller **/ + public function module($module, $params = NULL) + { + if (is_array($module)) return $this->modules($module); + + $_alias = strtolower(basename($module)); + CI::$APP->$_alias = Modules::load(array($module => $params)); + return $this; + } + + /** Load an array of controllers **/ + public function modules($modules) + { + foreach ($modules as $_module) $this->module($_module); + return $this; + } + + /** Add a module path loader variables **/ + public function _add_module_paths($module = '') + { + if (empty($module)) return; + + foreach (Modules::$locations as $location => $offset) { + /* only add a module path if it exists */ + if (is_dir($module_path = $location . $module . '/') && !in_array($module_path, $this->_ci_model_paths)) { + array_unshift($this->_ci_model_paths, $module_path); + } + } + } + + /** Load a module helper **/ + public function helper($helper = array()) + { + if (is_array($helper)) return $this->helpers($helper); + + if (isset($this->_ci_helpers[$helper])) return; + + list($path, $_helper) = Modules::find($helper . '_helper', $this->_module, 'helpers/'); + + if ($path === FALSE) return parent::helper($helper); + + Modules::load_file($_helper, $path); + $this->_ci_helpers[$_helper] = TRUE; + return $this; + } + + /** Load an array of helpers **/ + public function helpers($helpers = array()) + { + foreach ($helpers as $_helper) $this->helper($_helper); + return $this; + } + + public function languages($languages) + { + foreach ($languages as $_language) $this->language($_language); + return $this; + } + + /** Load a module language file **/ + public function language($langfile, $idiom = '', $return = FALSE, $add_suffix = TRUE, $alt_path = '') + { + CI::$APP->lang->load($langfile, $idiom, $return, $add_suffix, $alt_path, $this->_module); + return $this; + } + + /** Load a module plugin **/ + public function plugin($plugin) + { + if (is_array($plugin)) return $this->plugins($plugin); + + if (isset($this->_ci_plugins[$plugin])) + return $this; + + list($path, $_plugin) = Modules::find($plugin . '_pi', $this->_module, 'plugins/'); + + if ($path === FALSE && !is_file($_plugin = APPPATH . 'plugins/' . $_plugin . EXT)) { + show_error("Unable to locate the plugin file: {$_plugin}"); + } + + Modules::load_file($_plugin, $path); + $this->_ci_plugins[$plugin] = TRUE; + return $this; + } + + /** Load an array of plugins **/ + public function plugins($plugins) + { + foreach ($plugins as $_plugin) $this->plugin($_plugin); + return $this; + } + + /** Load a module view **/ + public function view($view, $vars = array(), $return = FALSE) + { + list($path, $_view) = Modules::find($view, $this->_module, 'views/'); + + if ($path != FALSE) { + $this->_ci_view_paths = array($path => TRUE) + $this->_ci_view_paths; + $view = $_view; + } + + return $this->_ci_load(array('_ci_view' => $view, '_ci_vars' => $this->_ci_object_to_array($vars), '_ci_return' => $return)); + } + + public function _ci_load($_ci_data) + { + extract($_ci_data); + + if (isset($_ci_view)) { + $_ci_path = ''; + + /* add file extension if not provided */ + $_ci_file = (pathinfo($_ci_view, PATHINFO_EXTENSION)) ? $_ci_view : $_ci_view . EXT; + + foreach ($this->_ci_view_paths as $path => $cascade) { + if (file_exists($view = $path . $_ci_file)) { + $_ci_path = $view; + break; + } + if (!$cascade) break; + } + } elseif (isset($_ci_path)) { + + $_ci_file = basename($_ci_path); + if (!file_exists($_ci_path)) $_ci_path = ''; + } + + if (empty($_ci_path)) + show_error('Unable to load the requested file: ' . $_ci_file); + + if (isset($_ci_vars)) + $this->_ci_cached_vars = array_merge($this->_ci_cached_vars, (array)$_ci_vars); + + extract($this->_ci_cached_vars); + + ob_start(); + + if ((bool)@ini_get('short_open_tag') === FALSE && CI::$APP->config->item('rewrite_short_tags') == TRUE) { + echo eval('?>' . preg_replace("/;*\s*\?>/", "; ?>", str_replace(' $this->_ci_ob_level + 1) { + ob_end_flush(); + } else { + CI::$APP->output->append_output(ob_get_clean()); + } + } + + protected function _ci_object_to_array($object) + { + return is_object($object) ? get_object_vars($object) : $object; + } + + public function __get($class) + { + return (isset($this->controller)) ? $this->controller->$class : CI::$APP->$class; + } + + protected function &_ci_get_component($component) + { + return CI::$APP->$component; + } +} + +/** load the CI class for Modular Separation **/ +(class_exists('CI', FALSE)) OR require dirname(__FILE__) . '/Ci.php'; \ No newline at end of file diff --git a/application/third_party/MX/Modules.php b/application/third_party/MX/Modules.php new file mode 100644 index 0000000..117dacb --- /dev/null +++ b/application/third_party/MX/Modules.php @@ -0,0 +1,221 @@ +item('modules_locations')) OR Modules::$locations = array( + APPPATH . 'modules/' => '../modules/', +); + +/* PHP5 spl_autoload */ +spl_autoload_register('Modules::autoload'); + +/** + * Modular Extensions - HMVC + * + * Adapted from the CodeIgniter Core Classes + * @link http://codeigniter.com + * + * Description: + * This library provides functions to load and instantiate controllers + * and module controllers allowing use of modules and the HMVC design pattern. + * + * Install this file as application/third_party/MX/Modules.php + * + * @copyright Copyright (c) 2015 Wiredesignz + * @version 5.5 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + **/ +class Modules +{ + public static $routes, $registry, $locations; + + /** + * Run a module controller method + * Output from module is buffered and returned. + **/ + public static function run($module) + { + $method = 'index'; + + if (($pos = strrpos($module, '/')) != FALSE) { + $method = substr($module, $pos + 1); + $module = substr($module, 0, $pos); + } + + if ($class = self::load($module)) { + if (method_exists($class, $method)) { + ob_start(); + $args = func_get_args(); + $output = call_user_func_array(array($class, $method), array_slice($args, 1)); + $buffer = ob_get_clean(); + return ($output !== NULL) ? $output : $buffer; + } + } + + log_message('error', "Module controller failed to run: {$module}/{$method}"); + } + + /** Load a module controller **/ + public static function load($module) + { + (is_array($module)) ? list($module, $params) = each($module) : $params = NULL; + + /* get the requested controller class name */ + $alias = strtolower(basename($module)); + + /* create or return an existing controller from the registry */ + if (!isset(self::$registry[$alias])) { + /* find the controller */ + list($class) = CI::$APP->router->locate(explode('/', $module)); + + /* controller cannot be located */ + if (empty($class)) return; + + /* set the module directory */ + $path = APPPATH . 'controllers/' . CI::$APP->router->directory; + + /* load the controller class */ + $class = $class . CI::$APP->config->item('controller_suffix'); + self::load_file(ucfirst($class), $path); + + /* create and register the new controller */ + $controller = ucfirst($class); + self::$registry[$alias] = new $controller($params); + } + + return self::$registry[$alias]; + } + + /** Load a module file **/ + public static function load_file($file, $path, $type = 'other', $result = TRUE) + { + $file = str_replace(EXT, '', $file); + $location = $path . $file . EXT; + + if ($type === 'other') { + if (class_exists($file, FALSE)) { + log_message('debug', "File already loaded: {$location}"); + return $result; + } + include_once $location; + } else { + /* load config or language array */ + include $location; + + if (!isset($$type) OR !is_array($$type)) + show_error("{$location} does not contain a valid {$type} array"); + + $result = $$type; + } + log_message('debug', "File loaded: {$location}"); + return $result; + } + + /** Library base class autoload **/ + public static function autoload($class) + { + /* don't autoload CI_ prefixed classes or those using the config subclass_prefix */ + if (strstr($class, 'CI_') OR strstr($class, config_item('subclass_prefix'))) return; + + /* autoload Modular Extensions MX core classes */ + if (strstr($class, 'MX_')) { + if (is_file($location = dirname(__FILE__) . '/' . substr($class, 3) . EXT)) { + include_once $location; + return; + } + show_error('Failed to load MX core class: ' . $class); + } + + /* autoload core classes */ + if (is_file($location = APPPATH . 'core/' . ucfirst($class) . EXT)) { + include_once $location; + return; + } + + /* autoload library classes */ + if (is_file($location = APPPATH . 'libraries/' . ucfirst($class) . EXT)) { + include_once $location; + return; + } + } + + /** Parse module routes **/ + public static function parse_routes($module, $uri) + { + /* load the route file */ + if (!isset(self::$routes[$module])) { + if (list($path) = self::find('routes', $module, 'config/')) { + $path && self::$routes[$module] = self::load_file('routes', $path, 'route'); + } + } + + if (!isset(self::$routes[$module])) return; + + /* parse module routes */ + foreach (self::$routes[$module] as $key => $val) { + $key = str_replace(array(':any', ':num'), array('.+', '[0-9]+'), $key); + + if (preg_match('#^' . $key . '$#', $uri)) { + if (strpos($val, '$') !== FALSE AND strpos($key, '(') !== FALSE) { + $val = preg_replace('#^' . $key . '$#', $val, $uri); + } + return explode('/', $module . '/' . $val); + } + } + } + + /** + * Find a file + * Scans for files located within modules directories. + * Also scans application directories for models, plugins and views. + * Generates fatal error if file not found. + **/ + public static function find($file, $module, $base) + { + $segments = explode('/', $file); + + $file = array_pop($segments); + $file_ext = (pathinfo($file, PATHINFO_EXTENSION)) ? $file : $file . EXT; + + $path = ltrim(implode('/', $segments) . '/', '/'); + $module ? $modules[$module] = $path : $modules = array(); + + if (!empty($segments)) { + $modules[array_shift($segments)] = ltrim(implode('/', $segments) . '/', '/'); + } + + foreach (Modules::$locations as $location => $offset) { + foreach ($modules as $module => $subpath) { + $fullpath = $location . $module . '/' . $base . $subpath; + + if ($base == 'libraries/' OR $base == 'models/') { + if (is_file($fullpath . ucfirst($file_ext))) return array($fullpath, ucfirst($file)); + } else + /* load non-class files */ + if (is_file($fullpath . $file_ext)) return array($fullpath, $file); + } + } + + return array(FALSE, $file); + } +} \ No newline at end of file diff --git a/application/third_party/MX/Router.php b/application/third_party/MX/Router.php new file mode 100644 index 0000000..9081b67 --- /dev/null +++ b/application/third_party/MX/Router.php @@ -0,0 +1,219 @@ +module; + } + + protected function _set_request($segments = array()) + { + if ($this->translate_uri_dashes === TRUE) { + foreach (range(0, 2) as $v) { + isset($segments[$v]) && $segments[$v] = str_replace('-', '_', $segments[$v]); + } + } + + $segments = $this->locate($segments); + + if ($this->located == -1) { + $this->_set_404override_controller(); + return; + } + + if (empty($segments)) { + $this->_set_default_controller(); + return; + } + + $this->set_class($segments[0]); + + if (isset($segments[1])) { + $this->set_method($segments[1]); + } else { + $segments[1] = 'index'; + } + + array_unshift($segments, NULL); + unset($segments[0]); + $this->uri->rsegments = $segments; + } + + /** Locate the controller **/ + public function locate($segments) + { + $this->located = 0; + $ext = $this->config->item('controller_suffix') . EXT; + + /* use module route if available */ + if (isset($segments[0]) && $routes = Modules::parse_routes($segments[0], implode('/', $segments))) { + $segments = $routes; + } + + /* get the segments array elements */ + list($module, $directory, $controller) = array_pad($segments, 3, NULL); + + /* check modules */ + foreach (Modules::$locations as $location => $offset) { + /* module exists? */ + if (is_dir($source = $location . $module . '/controllers/')) { + $this->module = $module; + $this->directory = $offset . $module . '/controllers/'; + + /* module sub-controller exists? */ + if ($directory) { + /* module sub-directory exists? */ + if (is_dir($source . $directory . '/')) { + $source .= $directory . '/'; + $this->directory .= $directory . '/'; + + /* module sub-directory controller exists? */ + if ($controller) { + if (is_file($source . ucfirst($controller) . $ext)) { + $this->located = 3; + return array_slice($segments, 2); + } else $this->located = -1; + } + } else + if (is_file($source . ucfirst($directory) . $ext)) { + $this->located = 2; + return array_slice($segments, 1); + } else $this->located = -1; + } + + /* module controller exists? */ + if (is_file($source . ucfirst($module) . $ext)) { + $this->located = 1; + return $segments; + } + } + } + + if (!empty($this->directory)) return; + + /* application sub-directory controller exists? */ + if ($directory) { + if (is_file(APPPATH . 'controllers/' . $module . '/' . ucfirst($directory) . $ext)) { + $this->directory = $module . '/'; + return array_slice($segments, 1); + } + + /* application sub-sub-directory controller exists? */ + if ($controller) { + if (is_file(APPPATH . 'controllers/' . $module . '/' . $directory . '/' . ucfirst($controller) . $ext)) { + $this->directory = $module . '/' . $directory . '/'; + return array_slice($segments, 2); + } + } + } + + /* application controllers sub-directory exists? */ + if (is_dir(APPPATH . 'controllers/' . $module . '/')) { + $this->directory = $module . '/'; + return array_slice($segments, 1); + } + + /* application controller exists? */ + if (is_file(APPPATH . 'controllers/' . ucfirst($module) . $ext)) { + return $segments; + } + + $this->located = -1; + } + + protected function _set_404override_controller() + { + $this->_set_module_path($this->routes['404_override']); + } + + protected function _set_module_path(&$_route) + { + if (!empty($_route)) { + // Are module/directory/controller/method segments being specified? + $sgs = sscanf($_route, '%[^/]/%[^/]/%[^/]/%s', $module, $directory, $class, $method); + + // set the module/controller directory location if found + if ($this->locate(array($module, $directory, $class))) { + //reset to class/method + switch ($sgs) { + case 1: + $_route = $module . '/index'; + break; + case 2: + $_route = ($this->located < 2) ? $module . '/' . $directory : $directory . '/index'; + break; + case 3: + $_route = ($this->located == 2) ? $directory . '/' . $class : $class . '/index'; + break; + case 4: + $_route = ($this->located == 3) ? $class . '/' . $method : $method . '/index'; + break; + } + } + } + } + + /* set module path */ + + protected function _set_default_controller() + { + if (empty($this->directory)) { + /* set the default controller module path */ + $this->_set_module_path($this->default_controller); + } + + parent::_set_default_controller(); + + if (empty($this->class)) { + $this->_set_404override_controller(); + } + } + + public function set_class($class) + { + $suffix = $this->config->item('controller_suffix'); + if (strpos($class, $suffix) === FALSE) { + $class .= $suffix; + } + parent::set_class($class); + } +} \ No newline at end of file diff --git a/application/third_party/index.html b/application/third_party/index.html new file mode 100644 index 0000000..04e928c --- /dev/null +++ b/application/third_party/index.html @@ -0,0 +1,10 @@ + + + 403 Forbidden + + + +

    Directory access is forbidden.

    + + + \ No newline at end of file diff --git a/application/views/emails/passwordreset.php b/application/views/emails/passwordreset.php new file mode 100644 index 0000000..317337d --- /dev/null +++ b/application/views/emails/passwordreset.php @@ -0,0 +1,21 @@ + +
    +

    +

    +
    diff --git a/application/views/errors/cli/error_404.php b/application/views/errors/cli/error_404.php new file mode 100644 index 0000000..8d8b42f --- /dev/null +++ b/application/views/errors/cli/error_404.php @@ -0,0 +1,8 @@ + + +An uncaught Exception was encountered + +Type: +Message: +Filename: getFile(), "\n"; ?> +Line Number: getLine(); ?> + + + + Backtrace: + getTrace() as $error): ?> + + File: + Line: + Function: + + + + diff --git a/application/views/errors/cli/error_general.php b/application/views/errors/cli/error_general.php new file mode 100644 index 0000000..8d8b42f --- /dev/null +++ b/application/views/errors/cli/error_general.php @@ -0,0 +1,8 @@ + + +A PHP Error was encountered + +Severity: +Message: +Filename: +Line Number: + + + + Backtrace: + + + File: + Line: + Function: + + + + diff --git a/application/views/errors/cli/index.html b/application/views/errors/cli/index.html new file mode 100644 index 0000000..69df4e1 --- /dev/null +++ b/application/views/errors/cli/index.html @@ -0,0 +1,11 @@ + + + + 403 Forbidden + + + +

    Directory access is forbidden.

    + + + diff --git a/application/views/errors/html/error_404.php b/application/views/errors/html/error_404.php new file mode 100644 index 0000000..4295899 --- /dev/null +++ b/application/views/errors/html/error_404.php @@ -0,0 +1,42 @@ + + + + + + InvoicePlane - <?php echo $heading; ?> + + + +

    +

    + + diff --git a/application/views/errors/html/error_db.php b/application/views/errors/html/error_db.php new file mode 100644 index 0000000..4295899 --- /dev/null +++ b/application/views/errors/html/error_db.php @@ -0,0 +1,42 @@ + + + + + + InvoicePlane - <?php echo $heading; ?> + + + +

    +

    + + diff --git a/application/views/errors/html/error_exception.php b/application/views/errors/html/error_exception.php new file mode 100644 index 0000000..ae128aa --- /dev/null +++ b/application/views/errors/html/error_exception.php @@ -0,0 +1,32 @@ + + +
    + +

    An uncaught Exception was encountered

    + +

    Type:

    +

    Message:

    +

    Filename: getFile(); ?>

    +

    Line Number: getLine(); ?>

    + + + +

    Backtrace:

    + getTrace() as $error): ?> + + + +

    + File:
    + Line:
    + Function: +

    + + + + + + +
    diff --git a/application/views/errors/html/error_general.php b/application/views/errors/html/error_general.php new file mode 100644 index 0000000..4295899 --- /dev/null +++ b/application/views/errors/html/error_general.php @@ -0,0 +1,42 @@ + + + + + + InvoicePlane - <?php echo $heading; ?> + + + +

    +

    + + diff --git a/application/views/errors/html/error_php.php b/application/views/errors/html/error_php.php new file mode 100644 index 0000000..818cbe1 --- /dev/null +++ b/application/views/errors/html/error_php.php @@ -0,0 +1,33 @@ + + +
    + +

    A PHP Error was encountered

    + +

    Severity:

    +

    Message:

    +

    Filename:

    +

    Line Number:

    + + + +

    Backtrace:

    + + + + +

    + File:
    + Line:
    + Function: +

    + + + + + + + +
    diff --git a/application/views/errors/html/index.html b/application/views/errors/html/index.html new file mode 100644 index 0000000..69df4e1 --- /dev/null +++ b/application/views/errors/html/index.html @@ -0,0 +1,11 @@ + + + + 403 Forbidden + + + +

    Directory access is forbidden.

    + + + diff --git a/application/views/errors/index.html b/application/views/errors/index.html new file mode 100644 index 0000000..69df4e1 --- /dev/null +++ b/application/views/errors/index.html @@ -0,0 +1,11 @@ + + + + 403 Forbidden + + + +

    Directory access is forbidden.

    + + + diff --git a/application/views/index.html b/application/views/index.html new file mode 100644 index 0000000..04e928c --- /dev/null +++ b/application/views/index.html @@ -0,0 +1,10 @@ + + + 403 Forbidden + + + +

    Directory access is forbidden.

    + + + \ No newline at end of file diff --git a/application/views/invoice_templates/pdf/.gitignore b/application/views/invoice_templates/pdf/.gitignore new file mode 100644 index 0000000..1879cea --- /dev/null +++ b/application/views/invoice_templates/pdf/.gitignore @@ -0,0 +1,5 @@ +* +!InvoicePlane.php +!InvoicePlane - overdue.php +!InvoicePlane - paid.php +!.gitignore diff --git a/application/views/invoice_templates/pdf/InvoicePlane - overdue.php b/application/views/invoice_templates/pdf/InvoicePlane - overdue.php new file mode 100644 index 0000000..4758b75 --- /dev/null +++ b/application/views/invoice_templates/pdf/InvoicePlane - overdue.php @@ -0,0 +1,261 @@ + + + + + <?php _trans('invoice'); ?> + + + + +
    + + + +
    +
    + +
    + client_vat_id) { + echo '
    ' . trans('vat_id_short') . ': ' . $invoice->client_vat_id . '
    '; + } + if ($invoice->client_tax_code) { + echo '
    ' . trans('tax_code_short') . ': ' . $invoice->client_tax_code . '
    '; + } + if ($invoice->client_address_1) { + echo '
    ' . htmlsc($invoice->client_address_1) . '
    '; + } + if ($invoice->client_address_2) { + echo '
    ' . htmlsc($invoice->client_address_2) . '
    '; + } + if ($invoice->client_city || $invoice->client_state || $invoice->client_zip) { + echo '
    '; + if ($invoice->client_city) { + echo htmlsc($invoice->client_city) . ' '; + } + if ($invoice->client_state) { + echo htmlsc($invoice->client_state) . ' '; + } + if ($invoice->client_zip) { + echo htmlsc($invoice->client_zip); + } + echo '
    '; + } + if ($invoice->client_country) { + echo '
    ' . get_country_name(trans('cldr'), $invoice->client_country) . '
    '; + } + + echo '
    '; + + if ($invoice->client_phone) { + echo '
    ' . trans('phone_abbr') . ': ' . htmlsc($invoice->client_phone) . '
    '; + } ?> + +
    +
    +
    user_name); ?>
    + user_vat_id) { + echo '
    ' . trans('vat_id_short') . ': ' . $invoice->user_vat_id . '
    '; + } + if ($invoice->user_tax_code) { + echo '
    ' . trans('tax_code_short') . ': ' . $invoice->user_tax_code . '
    '; + } + if ($invoice->user_address_1) { + echo '
    ' . htmlsc($invoice->user_address_1) . '
    '; + } + if ($invoice->user_address_2) { + echo '
    ' . htmlsc($invoice->user_address_2) . '
    '; + } + if ($invoice->user_city || $invoice->user_state || $invoice->user_zip) { + echo '
    '; + if ($invoice->user_city) { + echo htmlsc($invoice->user_city) . ' '; + } + if ($invoice->user_state) { + echo htmlsc($invoice->user_state) . ' '; + } + if ($invoice->user_zip) { + echo htmlsc($invoice->user_zip); + } + echo '
    '; + } + if ($invoice->user_country) { + echo '
    ' . get_country_name(trans('cldr'), $invoice->user_country) . '
    '; + } + + echo '
    '; + + if ($invoice->user_phone) { + echo '
    ' . trans('phone_abbr') . ': ' . htmlsc($invoice->user_phone) . '
    '; + } + if ($invoice->user_fax) { + echo '
    ' . trans('fax_abbr') . ': ' . htmlsc($invoice->user_fax) . '
    '; + } + ?> +
    + +
    + +
    + +
    + + + + + + + + + + + + + + + + + + + +
    invoice_date_created, true); ?>
    invoice_date_due, true); ?>
    invoice_balance); ?>
    payment_method_name); ?>
    +
    + +

    invoice_number; ?>

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + invoice_item_tax_total > 0) { ?> + + + + + + + + + + + + + + invoice_discount_percent != '0.00') : ?> + + + + + + invoice_discount_amount != '0.00') : ?> + + + + + + + + + + + + + + + + + + + +
    item_name); ?>item_description)); ?> + item_quantity); ?> + item_product_unit) : ?> +
    + item_product_unit); ?> + +
    + item_price); ?> + + item_discount); ?> + + item_total); ?> +
    class="text-right"> + + invoice_item_subtotal); ?>
    class="text-right"> + + + invoice_item_tax_total); ?> +
    class="text-right"> + invoice_tax_rate_name) . ' (' . format_amount($invoice_tax_rate->invoice_tax_rate_percent) . '%)'; ?> + + invoice_tax_rate_amount); ?> +
    class="text-right"> + + + invoice_discount_percent); ?>% +
    class="text-right"> + + + invoice_discount_amount); ?> +
    class="text-right"> + + + invoice_total); ?> +
    class="text-right"> + + + invoice_paid); ?> +
    class="text-right"> + + + invoice_balance); ?> +
    + +
    + +
    + invoice_terms) : ?> +
    +
    + invoice_terms)); ?> +
    + +
    + + + diff --git a/application/views/invoice_templates/pdf/InvoicePlane - paid.php b/application/views/invoice_templates/pdf/InvoicePlane - paid.php new file mode 100644 index 0000000..f54f828 --- /dev/null +++ b/application/views/invoice_templates/pdf/InvoicePlane - paid.php @@ -0,0 +1,261 @@ + + + + + <?php _trans('invoice'); ?> + + + + +
    + + + +
    +
    + +
    + client_vat_id) { + echo '
    ' . trans('vat_id_short') . ': ' . $invoice->client_vat_id . '
    '; + } + if ($invoice->client_tax_code) { + echo '
    ' . trans('tax_code_short') . ': ' . $invoice->client_tax_code . '
    '; + } + if ($invoice->client_address_1) { + echo '
    ' . htmlsc($invoice->client_address_1) . '
    '; + } + if ($invoice->client_address_2) { + echo '
    ' . htmlsc($invoice->client_address_2) . '
    '; + } + if ($invoice->client_city || $invoice->client_state || $invoice->client_zip) { + echo '
    '; + if ($invoice->client_city) { + echo htmlsc($invoice->client_city) . ' '; + } + if ($invoice->client_state) { + echo htmlsc($invoice->client_state) . ' '; + } + if ($invoice->client_zip) { + echo htmlsc($invoice->client_zip); + } + echo '
    '; + } + if ($invoice->client_country) { + echo '
    ' . get_country_name(trans('cldr'), $invoice->client_country) . '
    '; + } + + echo '
    '; + + if ($invoice->client_phone) { + echo '
    ' . trans('phone_abbr') . ': ' . htmlsc($invoice->client_phone) . '
    '; + } ?> + +
    +
    +
    user_name); ?>
    + user_vat_id) { + echo '
    ' . trans('vat_id_short') . ': ' . $invoice->user_vat_id . '
    '; + } + if ($invoice->user_tax_code) { + echo '
    ' . trans('tax_code_short') . ': ' . $invoice->user_tax_code . '
    '; + } + if ($invoice->user_address_1) { + echo '
    ' . htmlsc($invoice->user_address_1) . '
    '; + } + if ($invoice->user_address_2) { + echo '
    ' . htmlsc($invoice->user_address_2) . '
    '; + } + if ($invoice->user_city || $invoice->user_state || $invoice->user_zip) { + echo '
    '; + if ($invoice->user_city) { + echo htmlsc($invoice->user_city) . ' '; + } + if ($invoice->user_state) { + echo htmlsc($invoice->user_state) . ' '; + } + if ($invoice->user_zip) { + echo htmlsc($invoice->user_zip); + } + echo '
    '; + } + if ($invoice->user_country) { + echo '
    ' . get_country_name(trans('cldr'), $invoice->user_country) . '
    '; + } + + echo '
    '; + + if ($invoice->user_phone) { + echo '
    ' . trans('phone_abbr') . ': ' . htmlsc($invoice->user_phone) . '
    '; + } + if ($invoice->user_fax) { + echo '
    ' . trans('fax_abbr') . ': ' . htmlsc($invoice->user_fax) . '
    '; + } + ?> +
    + +
    + +
    + +
    + + + + + + + + + + + + + + + + + + + +
    invoice_date_created, true); ?>
    invoice_date_due, true); ?>
    invoice_balance); ?>
    payment_method_name); ?>
    +
    + +

    invoice_number; ?>

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + invoice_item_tax_total > 0) { ?> + + + + + + + + + + + + + + invoice_discount_percent != '0.00') : ?> + + + + + + invoice_discount_amount != '0.00') : ?> + + + + + + + + + + + + + + + + + + + +
    item_name); ?>item_description)); ?> + item_quantity); ?> + item_product_unit) : ?> +
    + item_product_unit); ?> + +
    + item_price); ?> + + item_discount); ?> + + item_total); ?> +
    class="text-right"> + + invoice_item_subtotal); ?>
    class="text-right"> + + + invoice_item_tax_total); ?> +
    class="text-right"> + invoice_tax_rate_name) . ' (' . format_amount($invoice_tax_rate->invoice_tax_rate_percent) . '%)'; ?> + + invoice_tax_rate_amount); ?> +
    class="text-right"> + + + invoice_discount_percent); ?>% +
    class="text-right"> + + + invoice_discount_amount); ?> +
    class="text-right"> + + + invoice_total); ?> +
    class="text-right"> + + + invoice_paid); ?> +
    class="text-right"> + + + invoice_balance); ?> +
    + +
    + +
    + invoice_terms) : ?> +
    +
    + invoice_terms)); ?> +
    + +
    + + + diff --git a/application/views/invoice_templates/pdf/InvoicePlane.php b/application/views/invoice_templates/pdf/InvoicePlane.php new file mode 100644 index 0000000..72ba378 --- /dev/null +++ b/application/views/invoice_templates/pdf/InvoicePlane.php @@ -0,0 +1,427 @@ + + + + + <?php _trans('invoice'); ?> + + + + + '', '1' => 'One', '2' => 'Two', + '3' => 'Three', '4' => 'Four', '5' => 'Five', '6' => 'Six', + '7' => 'Seven', '8' => 'Eight', '9' => 'Nine', + '10' => 'Ten', '11' => 'Eleven', '12' => 'Twelve', + '13' => 'Thirteen', '14' => 'Fourteen', + '15' => 'Fifteen', '16' => 'Sixteen', '17' => 'Seventeen', + '18' => 'Eighteen', '19' =>'Nineteen', '20' => 'Twenty', + '30' => 'Thirty', '40' => 'Forty', '50' => 'Fifty', + '60' => 'Sixty', '70' => 'Seventy', + '80' => 'Eighty', '90' => 'Ninety'); + $digits = array('', 'Hundred', 'Thousand', 'Lakh', 'Crore'); + while ($i < $digits_1) { + $divider = ($i == 2) ? 10 : 100; + $number = floor($no % $divider); + $no = floor($no / $divider); + $i += ($divider == 10) ? 1 : 2; + if ($number) { + $plural = (($counter = count($str)) && $number > 9) ? 's' : null; + $hundred = ($counter == 1 && $str[0]) ? ' and ' : null; + $str [] = ($number < 21) ? $words[$number] . + " " . $digits[$counter] . $plural . " " . $hundred + : + $words[floor($number / 10) * 10] + . " " . $words[$number % 10] . " " + . $digits[$counter] . $plural . " " . $hundred; + } else $str[] = null; + } + $str = array_reverse($str); + $result = implode('', $str); + + $points = ($point) ? + " " . $words[$point / 10] . " " . + $words[$point = $point % 10] : ''; + +if($ShowPaise=='0'){ + +$amountInWords = "Rupees " . $result." Only"; +} +else{ + +$amountInWords = "Rupees " . $result ." Paise ". $points." Only"; +} + + + return $amountInWords; + } +?> +
    +

    INVOICE

    + + + + + + +

    user_name); ?>

    +user_address_1 || $invoice->user_address_2 ) { + echo '
    ' ; + if ($invoice->user_address_1) { + echo htmlsc($invoice->user_address_1) . ''; + echo ','; + + } + if ($invoice->user_address_2) { + echo htmlsc($invoice->user_address_2) . ''; + echo ','; + + } + echo '
    '; + } + /* if ($invoice->user_address_2) { + echo '
    ' . htmlsc($invoice->user_address_2) . '
    '; + } */ + + if ($invoice->user_city || $invoice->user_state || $invoice->user_zip ) { + echo '
    '; + if ($invoice->user_city) { + echo htmlsc($invoice->user_city) . ' '; + echo ','; + } + + if ($invoice->user_state) { + echo htmlsc($invoice->user_state) . ' '; + echo ','; + } + if ($invoice->user_zip) { + echo htmlsc($invoice->user_zip); + echo ','; + } + if ($invoice->user_country) { + echo get_country_name(trans('cldr'), $invoice->user_country) ; + echo '.'; + } + echo '
    '; + } + if ($invoice->user_phone || $invoice->user_email) { + echo '
    '; + if ($invoice->user_phone) { + + echo trans('Phone') . ': ' . htmlsc($invoice->user_phone); + echo ','; + } + echo '
    '; + echo '
    '; + if ($invoice->user_mobile) { + + echo trans('Mobile') . ': ' . htmlsc($invoice->user_mobile); + echo ','; + } + echo '
    '; + echo '
    '; + if ($invoice->user_email) { + + echo trans('Email') . ': ' . htmlsc($invoice->user_email); + + } + + echo '
    '; + } ?> + ' . trans('GSTIN') . ': ' . htmlsc($custom_fields['user']['GSTIN']) . '';?> +
       ORIGINAL FOR RECIPIENT
       DUPLICATE FOR TRANSPORTER
       TRIPLICATE FOR SUPPLIER
    +
    +
    + + + + + + +
    + ' . trans(' Invoice Number') . ':'; ?> invoice_number ; '
    ' ?> + ' . trans(' Invoice Date') . ':'; ?> invoice_date_created , true). ''; ?> + ' . trans(' State ') . ': '; ?> user_state ; ''?> + ' . trans(' State Code') . ':'; ?> '?> + +
    +
    + ' . trans(' Transport Mode') . ':'; ?> ' ?> + ' . trans(' Vehicle Number') . ':'; ?> ' ?> + ' . trans(' Date of Supply ') . ': '; ?> format('d-m-Y'); + echo $displaySupplyDate; '
    '?> + ' . trans(' Place of Supply') . ':'; ?> ' ?> +
    Details of Receiver | Billed ToDetails of Consignee | Shipping To
    + ' . htmlsc(format_client($invoice)) . ''; ?> +
    + + client_address_1) { + echo '
    ' . htmlsc($invoice->client_address_1) . '
    '; + } + if ($invoice->client_address_2) { + echo '
    ' . htmlsc($invoice->client_address_2) . '
    '; + } + if ($invoice->client_city || $invoice->client_state || $invoice->client_zip) { + echo '
    '; + + if ($invoice->client_city) { + echo htmlsc($invoice->client_city); echo ','; + }if ($invoice->client_state) { + echo htmlsc($invoice->client_state);echo ','; + }if ($invoice->client_zip) { + echo htmlsc($invoice->client_zip); + } + echo '
    '; + } + + + ?> + format('d-m-y'); + echo '
    ' . trans(' PO No / Date') . ': ' . htmlsc($custom_fields['invoice']['Purchase Order No']) . ' / ' . htmlsc($displayPurchaseorderDate) .'
    ';?> + ' . trans('GSTIN') . ': ' . htmlsc($custom_fields['client']['GSTIN']) .'
    ';?> + ' . trans('State :') . htmlsc($invoice->client_state) .'          '. trans('State Code :') . htmlsc($custom_fields['client']['State code']). '';?> + + +
    + ' . htmlsc(format_client($invoice)) . ''; ?> +
    + + ' . htmlsc($custom_fields['invoice']['Shipping Address']) . '
    '; } else { ?> + + client_address_1) { + echo '
    ' . htmlsc($invoice->client_address_1) . '
    '; + } + if ($invoice->client_address_2) { + echo '
    ' . htmlsc($invoice->client_address_2) . '
    '; + } + if ($invoice->client_city || $invoice->client_state || $invoice->client_zip) { + echo '
    '; + + if ($invoice->client_city) { + echo htmlsc($invoice->client_city);echo ','; + }if ($invoice->client_state) { + echo htmlsc($invoice->client_state);echo ','; + }if ($invoice->client_zip) { + echo htmlsc($invoice->client_zip); + } + echo '
    '; + } + } + ?> + + format('d-m-y'); + echo '
    ' . trans(' PO No / Date') . ': ' . htmlsc($custom_fields['invoice']['Purchase Order No']) . ' / ' . htmlsc($displayPurchaseorderDate) .'
    ';?> + ' . trans('GSTIN') . ': ' . htmlsc($custom_fields['client']['GSTIN']) .'';?> + ' . trans('State :') . htmlsc($invoice->client_state) .'          '. trans('State Code :') . htmlsc($custom_fields['client']['State code']). '';?> + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    item_name); ?>product_sku); ?> + + item_product_unit) : ?> + + item_product_unit); ?> + + + item_quantity); ?> + + item_price); ?> + + item_quantity * $item->item_price); + echo format_currency($amount);?> + + Cgst_item_tax_rate_percent); ?> + + Cgst_item_tax_rate_amount); ?> + + Sgst_item_tax_rate_percent); ?> + + Sgst_item_tax_rate_amount); ?> + + Igst_item_tax_rate_percent); ?> + + Igst_item_tax_rate_amount); ?> + + item_total - $amount); + $totalCGST = $totalCGST+$item->Cgst_item_tax_rate_amount ; + $totalSGST = $totalSGST+$item->Sgst_item_tax_rate_amount ; + $totalIGST = $totalIGST+$item->Igst_item_tax_rate_amount ; + ?> +
        TOTALinvoice_item_subtotal); ?>    + invoice_item_tax_total); + $invoiceTotalAmount=$invoice->invoice_total; + $invoiceTotalAmountInWords=convertNumber($invoiceTotalAmount); + ?> +
    +

    TOTAL AMOUNT IN WORDS:  

    + +
    invoice_item_subtotal); ?>
    Add :CGST
    Add :SGST
           Bank Details Add :IGST
    +
      +
    • Bank Name
    • +
    • Bank Account Number
    • +
    • Bank Branch IFSC
    • +
    +
    +

    +

    +

    +
    invoice_item_tax_total); ?>
    + invoice_total); ?> +
    + invoice_terms) : ?> +
    +
    + invoice_terms)); ?> +
    + +
    + +
    For user_name); ?>
    +




    +
    Authorized Signatory
    + +
    Declaration: We Declare that this invoice shows the actual price of the goods described and that all particulars are true and correct
    + + +
    + + + \ No newline at end of file diff --git a/application/views/invoice_templates/public/.gitignore b/application/views/invoice_templates/public/.gitignore new file mode 100644 index 0000000..8a8e758 --- /dev/null +++ b/application/views/invoice_templates/public/.gitignore @@ -0,0 +1,3 @@ +* +!InvoicePlane_Web.php +!.gitignore diff --git a/application/views/invoice_templates/public/InvoicePlane_Web.php b/application/views/invoice_templates/public/InvoicePlane_Web.php new file mode 100644 index 0000000..a251a35 --- /dev/null +++ b/application/views/invoice_templates/public/InvoicePlane_Web.php @@ -0,0 +1,295 @@ + + + + + + + + <?php echo get_setting('custom_title', 'InvoicePlane', true); ?> + - <?php echo trans('invoice'); ?> <?php echo $invoice->invoice_number; ?> + + + + + + + + + +
    +
    + +
    + +

     invoice_number; ?>

    + +
    + sumex_id == NULL) : ?> + + + + + + + invoice_balance > 0) { ?> + + + + +
    + +
    + +
    + + layout->load_view('layout/alerts'); ?> + +
    + +
    '; + } + ?> + +
    +
    + +

    user_name); ?>

    +

    user_vat_id) { + echo lang("vat_id_short") . ": " . $invoice->user_vat_id . '
    '; + } ?> + user_tax_code) { + echo lang("tax_code_short") . ": " . $invoice->user_tax_code . '
    '; + } ?> + user_address_1) { + echo htmlsc($invoice->user_address_1) . '
    '; + } ?> + user_address_2) { + echo htmlsc($invoice->user_address_2) . '
    '; + } ?> + user_city) { + echo htmlsc($invoice->user_city) . ' '; + } ?> + user_state) { + echo htmlsc($invoice->user_state) . ' '; + } ?> + user_zip) { + echo htmlsc($invoice->user_zip) . '
    '; + } ?> + user_phone) { ?>: user_phone); ?> +
    + user_fax) { ?>: user_fax); ?> +

    + +
    +
    +
    + +

    +

    client_vat_id) { + echo lang("vat_id_short") . ": " . $invoice->client_vat_id . '
    '; + } ?> + client_tax_code) { + echo lang("tax_code_short") . ": " . $invoice->client_tax_code . '
    '; + } ?> + client_address_1) { + echo htmlsc($invoice->client_address_1) . '
    '; + } ?> + client_address_2) { + echo htmlsc($invoice->client_address_2) . '
    '; + } ?> + client_city) { + echo htmlsc($invoice->client_city) . ' '; + } ?> + client_state) { + echo htmlsc($invoice->client_state) . ' '; + } ?> + client_zip) { + echo htmlsc($invoice->client_zip) . '
    '; + } ?> + client_phone) { + echo trans('phone_abbr') . ': ' . htmlsc($invoice->client_phone); ?> +
    + +

    + +
    + + + + + + + + + + + + + + + + + + + + + + +
    invoice_date_created); ?>
    + invoice_date_due); ?> +
    invoice_balance); ?>
    payment_method_name); ?>
    + +
    +
    + +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + invoice_item_tax_total > 0) { ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    item_name); ?>item_description)); ?> + item_quantity); ?> + item_product_unit) : ?> +
    + item_product_unit); ?> + +
    item_price); ?>item_discount); ?>item_subtotal); ?>
    :invoice_item_subtotal); ?>
    invoice_item_tax_total); ?>
    + invoice_tax_rate_name) . ' ' . format_amount($invoice_tax_rate->invoice_tax_rate_percent); ?> + % + invoice_tax_rate_amount); ?>
    : + invoice_discount_percent > 0) { + echo format_amount($invoice->invoice_discount_percent) . ' %'; + } else { + echo format_amount($invoice->invoice_discount_amount); + } + ?> +
    :invoice_total); ?>
    invoice_paid) ?>
    + invoice_balance) ?> +
    +
    + + invoice_balance == 0) { + echo ''; + } ?> + '; + } ?> + +
    + +
    + +
    + + invoice_terms) { ?> +
    +

    +

    invoice_terms)); ?>

    +
    + + + 0) { ?> +
    +

    +
    + + + + + + + +
    + + + +
    +
    +
    + + +
    + +
    +
    +
    + + + diff --git a/application/views/quote_templates/pdf/.gitignore b/application/views/quote_templates/pdf/.gitignore new file mode 100644 index 0000000..193ab4c --- /dev/null +++ b/application/views/quote_templates/pdf/.gitignore @@ -0,0 +1,3 @@ +* +!InvoicePlane.php +!.gitignore diff --git a/application/views/quote_templates/pdf/InvoicePlane.php b/application/views/quote_templates/pdf/InvoicePlane.php new file mode 100644 index 0000000..3a03706 --- /dev/null +++ b/application/views/quote_templates/pdf/InvoicePlane.php @@ -0,0 +1,241 @@ + + + + + <?php _trans('quote'); ?> + + + + +
    + + + +
    +
    + client_name); ?> +
    + client_vat_id) { + echo '
    ' . trans('vat_id_short') . ': ' . $quote->client_vat_id . '
    '; + } + if ($quote->client_tax_code) { + echo '
    ' . trans('tax_code_short') . ': ' . $quote->client_tax_code . '
    '; + } + if ($quote->client_address_1) { + echo '
    ' . htmlsc($quote->client_address_1) . '
    '; + } + if ($quote->client_address_2) { + echo '
    ' . htmlsc($quote->client_address_2) . '
    '; + } + if ($quote->client_city || $quote->client_state || $quote->client_zip) { + echo '
    '; + if ($quote->client_city) { + echo htmlsc($quote->client_city) . ' '; + } + if ($quote->client_state) { + echo htmlsc($quote->client_state) . ' '; + } + if ($quote->client_zip) { + echo htmlsc($quote->client_zip); + } + echo '
    '; + } + if ($quote->client_state) { + echo '
    ' . htmlsc($quote->client_state) . '
    '; + } + if ($quote->client_country) { + echo '
    ' . get_country_name(trans('cldr'), $quote->client_country) . '
    '; + } + + echo '
    '; + + if ($quote->client_phone) { + echo '
    ' . trans('phone_abbr') . ': ' . htmlsc($quote->client_phone) . '
    '; + } ?> + +
    +
    +
    user_name); ?>
    + user_vat_id) { + echo '
    ' . trans('vat_id_short') . ': ' . $quote->user_vat_id . '
    '; + } + if ($quote->user_tax_code) { + echo '
    ' . trans('tax_code_short') . ': ' . $quote->user_tax_code . '
    '; + } + if ($quote->user_address_1) { + echo '
    ' . htmlsc($quote->user_address_1) . '
    '; + } + if ($quote->user_address_2) { + echo '
    ' . htmlsc($quote->user_address_2) . '
    '; + } + if ($quote->user_city || $quote->user_state || $quote->user_zip) { + echo '
    '; + if ($quote->user_city) { + echo htmlsc($quote->user_city) . ' '; + } + if ($quote->user_state) { + echo htmlsc($quote->user_state) . ' '; + } + if ($quote->user_zip) { + echo htmlsc($quote->user_zip); + } + echo '
    '; + } + if ($quote->user_country) { + echo '
    ' . get_country_name(trans('cldr'), $quote->user_country) . '
    '; + } + + echo '
    '; + + if ($quote->user_phone) { + echo '
    ' . trans('phone_abbr') . ': ' . htmlsc($quote->user_phone) . '
    '; + } + if ($quote->user_fax) { + echo '
    ' . trans('fax_abbr') . ': ' . htmlsc($quote->user_fax) . '
    '; + } + ?> +
    + +
    + +
    + +
    + + + + + + + + + + + + + +
    quote_date_created, true); ?>
    quote_date_expires, true); ?>
    quote_total); ?>
    +
    + +

    quote_number; ?>

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + quote_item_tax_total > 0) { ?> + + + + + + + + + + + + + + quote_discount_percent != '0.00') : ?> + + + + + + quote_discount_amount != '0.00') : ?> + + + + + + + + + + + +
    item_name); ?>item_description)); ?> + item_quantity); ?> + item_product_unit) : ?> +
    + item_product_unit); ?> + +
    + item_price); ?> + + item_discount); ?> + + item_total); ?> +
    + class="text-right">quote_item_subtotal); ?>
    class="text-right"> + + + quote_item_tax_total); ?> +
    class="text-right"> + quote_tax_rate_name . ' (' . format_amount($quote_tax_rate->quote_tax_rate_percent) . '%)'; ?> + + quote_tax_rate_amount); ?> +
    class="text-right"> + + + quote_discount_percent); ?>% +
    class="text-right"> + + + quote_discount_amount); ?> +
    class="text-right"> + + + quote_total); ?> +
    + +
    + +
    + notes) : ?> +
    +
    + notes)); ?> +
    + +
    + + + diff --git a/application/views/quote_templates/public/.gitignore b/application/views/quote_templates/public/.gitignore new file mode 100644 index 0000000..8a8e758 --- /dev/null +++ b/application/views/quote_templates/public/.gitignore @@ -0,0 +1,3 @@ +* +!InvoicePlane_Web.php +!.gitignore diff --git a/application/views/quote_templates/public/InvoicePlane_Web.php b/application/views/quote_templates/public/InvoicePlane_Web.php new file mode 100644 index 0000000..caec92e --- /dev/null +++ b/application/views/quote_templates/public/InvoicePlane_Web.php @@ -0,0 +1,272 @@ + + + + + + + + + <?php echo get_setting('custom_title', 'InvoicePlane', true); ?> + - <?php echo trans('quote'); ?> <?php echo $quote->quote_number; ?> + + + + + + + + + + +
    + +
    + +
    + +

    quote_number; ?>

    + +
    + quote_status_id, array(2, 3))) : ?> + + + + + + + + + + +
    + +
    + +
    + + +
    + +
    + '; + } ?> + +
    + +
    '; + } + ?> + +
    +
    + +

    user_name); ?>

    +

    user_vat_id) { + echo lang("vat_id_short") . ": " . $quote->user_vat_id . '
    '; + } ?> + user_tax_code) { + echo lang("tax_code_short") . ": " . $quote->user_tax_code . '
    '; + } ?> + user_address_1) { + echo htmlsc($quote->user_address_1) . '
    '; + } ?> + user_address_2) { + echo htmlsc($quote->user_address_2) . '
    '; + } ?> + user_city) { + echo htmlsc($quote->user_city) . ' '; + } ?> + user_state) { + echo htmlsc($quote->user_state) . ' '; + } ?> + user_zip) { + echo htmlsc($quote->user_zip) . '
    '; + } ?> + user_phone) { ?>: user_phone); ?> +
    + user_fax) { ?>: user_fax); ?> +

    + +
    +
    +
    + +

    client_name); ?>

    +

    client_vat_id) { + echo lang("vat_id_short") . ": " . $quote->client_vat_id . '
    '; + } ?> + client_tax_code) { + echo lang("tax_code_short") . ": " . $quote->client_tax_code . '
    '; + } ?> + client_address_1) { + echo htmlsc($quote->client_address_1) . '
    '; + } ?> + client_address_2) { + echo htmlsc($quote->client_address_2) . '
    '; + } ?> + client_city) { + echo htmlsc($quote->client_city) . ' '; + } ?> + client_state) { + echo htmlsc($quote->client_state) . ' '; + } ?> + client_zip) { + echo htmlsc($quote->client_zip) . '
    '; + } ?> + client_phone) { + echo trans('phone_abbr') . ': ' . htmlsc($quote->client_phone); ?> +
    + +

    + +
    + + + + + + + + + + + + + + + + +
    quote_date_created); ?>
    + quote_date_expires); ?> +
    quote_total); ?>
    + +
    +
    + +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + quote_item_tax_total > 0) { ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    item_name); ?>item_description)); ?> + item_quantity); ?> + item_product_unit) : ?> +
    + item_product_unit); ?> + +
    item_price); ?>item_discount); ?>item_total); ?>
    :quote_item_subtotal); ?>
    quote_item_tax_total); ?>
    + quote_tax_rate_name . ' ' . format_amount($quote_tax_rate->quote_tax_rate_percent); ?> + % + quote_tax_rate_amount); ?>
    : + quote_discount_percent > 0) { + echo format_amount($quote->quote_discount_percent) . ' %'; + } else { + echo format_amount($quote->quote_discount_amount); + } + ?> +
    quote_total) ?>
    +
    + +
    + + notes) { ?> +
    +

    +

    notes)); ?>

    +
    + + + 0) { ?> +
    +

    +
    + + + + + + + +
    + + + +
    +
    +
    + + +
    + +
    +
    +
    +
    + + + diff --git a/application/views/reports/invoice_aging.php b/application/views/reports/invoice_aging.php new file mode 100644 index 0000000..f4c883f --- /dev/null +++ b/application/views/reports/invoice_aging.php @@ -0,0 +1,31 @@ + + + + <?php echo trans('invoice_aging'); ?> + + + + +

    + + + + + + + + + + + + + + + + + + +
    range_1); ?>range_2); ?>range_3); ?>total_balance); ?>
    + + + diff --git a/application/views/reports/payment_history.php b/application/views/reports/payment_history.php new file mode 100644 index 0000000..906a613 --- /dev/null +++ b/application/views/reports/payment_history.php @@ -0,0 +1,50 @@ + + + + <?php echo trans('payment_history'); ?> + + + + +

    +
    + +

    + + + + + + + + + + + + + + + + + + + + + + + + + +
    payment_date, true); ?>invoice_number; ?>payment_method_name); ?>payment_note)); ?>payment_amount); + $sum = $sum + $result->payment_amount; ?>
    + + + diff --git a/application/views/reports/sales_by_client.php b/application/views/reports/sales_by_client.php new file mode 100644 index 0000000..42e7a89 --- /dev/null +++ b/application/views/reports/sales_by_client.php @@ -0,0 +1,34 @@ + + + + <?php echo trans('sales_by_client'); ?> + + + + +

    +
    + +

    + + + + + + + + + + + + + + + + + + +
    invoice_count; ?>sales); ?>sales_with_tax - $result->sales); ?>sales_with_tax); ?>
    + + + diff --git a/application/views/reports/sales_by_year.php b/application/views/reports/sales_by_year.php new file mode 100644 index 0000000..b04fa85 --- /dev/null +++ b/application/views/reports/sales_by_year.php @@ -0,0 +1,121 @@ + + + + <?php echo trans('sales_by_date'); ?> + + + + + +

    + +
    + +

    + + + + + + + + + + + + + + + $value) { + + if ($initial_year == 0) { + $initial_year = intval(substr($index, 11, 4)); + }; + + $aux = intval(substr($index, 11, 4)); + + if ($aux > $final_year) { + $final_year = $aux; + } + + } + } + + if ($contYears == 0 && ($final_year - $initial_year) > 0) { + $numYears = $final_year - $initial_year + 1; + $contYears = 1; + } + + if ($contRows == 0) { + $numRows = $numRows + ($numYears * 4); + $contRows = 1; + } + ?> + + + + + + + + + $value) { + + $quarter = substr($index, 8, 2); + $year = substr($index, 11, 4); + + if (preg_match($pattern, $index)) { + ?> + + + + + + + + + + + + + + +
    +
    +
    VAT_ID; ?>Name); ?>total_payment); ?>
      0) { + echo format_currency($value); + } ?>
    +
    +
    + + + diff --git a/assets/.gitignore b/assets/.gitignore new file mode 100644 index 0000000..12cb7e1 --- /dev/null +++ b/assets/.gitignore @@ -0,0 +1,12 @@ +* +!.gitignore + +# Core +!core +!core/**/* + +# Base themes +!invoiceplane +!invoiceplane/**/* +!invoiceplane_blue +!invoiceplane_blue/**/* diff --git a/assets/core/css/custom-pdf.css b/assets/core/css/custom-pdf.css new file mode 100644 index 0000000..da4d0ef --- /dev/null +++ b/assets/core/css/custom-pdf.css @@ -0,0 +1,8 @@ +/* ============================================================================= + InvoicePlane + Custom Stylesheet + + All changes made in this file will override the default styles in PDFs. + ========================================================================== */ + + \ No newline at end of file diff --git a/assets/core/css/custom.css b/assets/core/css/custom.css new file mode 100644 index 0000000..6757b85 --- /dev/null +++ b/assets/core/css/custom.css @@ -0,0 +1,6 @@ +/* ============================================================================= + InvoicePlane + Custom Stylesheet + + All changes made in this file will override the default styles. + ========================================================================== */ \ No newline at end of file diff --git a/assets/core/fonts/.gitignore b/assets/core/fonts/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/assets/core/fonts/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/assets/core/img/favicon.png b/assets/core/img/favicon.png new file mode 100644 index 0000000..d825bd4 Binary files /dev/null and b/assets/core/img/favicon.png differ diff --git a/assets/core/img/file-icons/default.svg b/assets/core/img/file-icons/default.svg new file mode 100644 index 0000000..12bd9c4 --- /dev/null +++ b/assets/core/img/file-icons/default.svg @@ -0,0 +1 @@ +default_Tavola disegno 1FILE \ No newline at end of file diff --git a/assets/core/img/file-icons/file-audio.svg b/assets/core/img/file-icons/file-audio.svg new file mode 100644 index 0000000..da3b7d2 --- /dev/null +++ b/assets/core/img/file-icons/file-audio.svg @@ -0,0 +1 @@ +audio_Tavola disegno 1AUDIO FILE \ No newline at end of file diff --git a/assets/core/img/file-icons/file-document.svg b/assets/core/img/file-icons/file-document.svg new file mode 100644 index 0000000..313a08a --- /dev/null +++ b/assets/core/img/file-icons/file-document.svg @@ -0,0 +1 @@ +document_Tavola disegno 1DOCUMENT \ No newline at end of file diff --git a/assets/core/img/file-icons/file-pdf.svg b/assets/core/img/file-icons/file-pdf.svg new file mode 100644 index 0000000..cc7cfea --- /dev/null +++ b/assets/core/img/file-icons/file-pdf.svg @@ -0,0 +1 @@ +pdf_Tavola disegno 1PDF \ No newline at end of file diff --git a/assets/core/img/file-icons/file-presentation.svg b/assets/core/img/file-icons/file-presentation.svg new file mode 100644 index 0000000..044b871 --- /dev/null +++ b/assets/core/img/file-icons/file-presentation.svg @@ -0,0 +1 @@ +spreadsheet_Tavola disegno 1PRESENTATION \ No newline at end of file diff --git a/assets/core/img/file-icons/file-spreadsheet.svg b/assets/core/img/file-icons/file-spreadsheet.svg new file mode 100644 index 0000000..b52056f --- /dev/null +++ b/assets/core/img/file-icons/file-spreadsheet.svg @@ -0,0 +1 @@ +spreadsheet_Tavola disegno 1SPREADSHEET \ No newline at end of file diff --git a/assets/core/img/logo_200x100.png b/assets/core/img/logo_200x100.png new file mode 100644 index 0000000..567c6cf Binary files /dev/null and b/assets/core/img/logo_200x100.png differ diff --git a/assets/core/img/logo_400x200.png b/assets/core/img/logo_400x200.png new file mode 100644 index 0000000..0c04851 Binary files /dev/null and b/assets/core/img/logo_400x200.png differ diff --git a/assets/core/img/overdue.png b/assets/core/img/overdue.png new file mode 100644 index 0000000..3cd73d5 Binary files /dev/null and b/assets/core/img/overdue.png differ diff --git a/assets/core/img/overdue.svg b/assets/core/img/overdue.svg new file mode 100644 index 0000000..a93f1ea --- /dev/null +++ b/assets/core/img/overdue.svg @@ -0,0 +1 @@ +overdueOVERDUEOVERDUE \ No newline at end of file diff --git a/assets/core/img/overdue@2x.png b/assets/core/img/overdue@2x.png new file mode 100644 index 0000000..fbf3861 Binary files /dev/null and b/assets/core/img/overdue@2x.png differ diff --git a/assets/core/img/paid.png b/assets/core/img/paid.png new file mode 100644 index 0000000..15af955 Binary files /dev/null and b/assets/core/img/paid.png differ diff --git a/assets/core/img/paid.svg b/assets/core/img/paid.svg new file mode 100644 index 0000000..66aada5 --- /dev/null +++ b/assets/core/img/paid.svg @@ -0,0 +1 @@ +11Tavola disegno 1 \ No newline at end of file diff --git a/assets/core/img/paid@2x.png b/assets/core/img/paid@2x.png new file mode 100644 index 0000000..6abfc18 Binary files /dev/null and b/assets/core/img/paid@2x.png differ diff --git a/assets/core/js/.gitignore b/assets/core/js/.gitignore new file mode 100644 index 0000000..aa82c0f --- /dev/null +++ b/assets/core/js/.gitignore @@ -0,0 +1,5 @@ +* +!locales +!scripts.js +!jquery-ui.js +!.gitignore diff --git a/assets/core/js/jquery-ui.js b/assets/core/js/jquery-ui.js new file mode 100644 index 0000000..6536c0a --- /dev/null +++ b/assets/core/js/jquery-ui.js @@ -0,0 +1,6741 @@ +/*! jQuery UI - v1.12.1 - 2017-02-16 +* http://jqueryui.com +* Includes: widget.js, position.js, data.js, disable-selection.js, focusable.js, form-reset-mixin.js, jquery-1-7.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/draggable.js, widgets/droppable.js, widgets/resizable.js, widgets/selectable.js, widgets/sortable.js, widgets/mouse.js +* Copyright jQuery Foundation and other contributors; Licensed MIT */ + +(function( factory ) { + if ( typeof define === "function" && define.amd ) { + + // AMD. Register as an anonymous module. + define([ "jquery" ], factory ); + } else { + + // Browser globals + factory( jQuery ); + } +}(function( $ ) { + +$.ui = $.ui || {}; + +var version = $.ui.version = "1.12.1"; + + +/*! + * jQuery UI Widget 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Widget +//>>group: Core +//>>description: Provides a factory for creating stateful widgets with a common API. +//>>docs: http://api.jqueryui.com/jQuery.widget/ +//>>demos: http://jqueryui.com/widget/ + + + +var widgetUuid = 0; +var widgetSlice = Array.prototype.slice; + +$.cleanData = ( function( orig ) { + return function( elems ) { + var events, elem, i; + for ( i = 0; ( elem = elems[ i ] ) != null; i++ ) { + try { + + // Only trigger remove when necessary to save time + events = $._data( elem, "events" ); + if ( events && events.remove ) { + $( elem ).triggerHandler( "remove" ); + } + + // Http://bugs.jquery.com/ticket/8235 + } catch ( e ) {} + } + orig( elems ); + }; +} )( $.cleanData ); + +$.widget = function( name, base, prototype ) { + var existingConstructor, constructor, basePrototype; + + // ProxiedPrototype allows the provided prototype to remain unmodified + // so that it can be used as a mixin for multiple widgets (#8876) + var proxiedPrototype = {}; + + var namespace = name.split( "." )[ 0 ]; + name = name.split( "." )[ 1 ]; + var fullName = namespace + "-" + name; + + if ( !prototype ) { + prototype = base; + base = $.Widget; + } + + if ( $.isArray( prototype ) ) { + prototype = $.extend.apply( null, [ {} ].concat( prototype ) ); + } + + // Create selector for plugin + $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) { + return !!$.data( elem, fullName ); + }; + + $[ namespace ] = $[ namespace ] || {}; + existingConstructor = $[ namespace ][ name ]; + constructor = $[ namespace ][ name ] = function( options, element ) { + + // Allow instantiation without "new" keyword + if ( !this._createWidget ) { + return new constructor( options, element ); + } + + // Allow instantiation without initializing for simple inheritance + // must use "new" keyword (the code above always passes args) + if ( arguments.length ) { + this._createWidget( options, element ); + } + }; + + // Extend with the existing constructor to carry over any static properties + $.extend( constructor, existingConstructor, { + version: prototype.version, + + // Copy the object used to create the prototype in case we need to + // redefine the widget later + _proto: $.extend( {}, prototype ), + + // Track widgets that inherit from this widget in case this widget is + // redefined after a widget inherits from it + _childConstructors: [] + } ); + + basePrototype = new base(); + + // We need to make the options hash a property directly on the new instance + // otherwise we'll modify the options hash on the prototype that we're + // inheriting from + basePrototype.options = $.widget.extend( {}, basePrototype.options ); + $.each( prototype, function( prop, value ) { + if ( !$.isFunction( value ) ) { + proxiedPrototype[ prop ] = value; + return; + } + proxiedPrototype[ prop ] = ( function() { + function _super() { + return base.prototype[ prop ].apply( this, arguments ); + } + + function _superApply( args ) { + return base.prototype[ prop ].apply( this, args ); + } + + return function() { + var __super = this._super; + var __superApply = this._superApply; + var returnValue; + + this._super = _super; + this._superApply = _superApply; + + returnValue = value.apply( this, arguments ); + + this._super = __super; + this._superApply = __superApply; + + return returnValue; + }; + } )(); + } ); + constructor.prototype = $.widget.extend( basePrototype, { + + // TODO: remove support for widgetEventPrefix + // always use the name + a colon as the prefix, e.g., draggable:start + // don't prefix for widgets that aren't DOM-based + widgetEventPrefix: existingConstructor ? ( basePrototype.widgetEventPrefix || name ) : name + }, proxiedPrototype, { + constructor: constructor, + namespace: namespace, + widgetName: name, + widgetFullName: fullName + } ); + + // If this widget is being redefined then we need to find all widgets that + // are inheriting from it and redefine all of them so that they inherit from + // the new version of this widget. We're essentially trying to replace one + // level in the prototype chain. + if ( existingConstructor ) { + $.each( existingConstructor._childConstructors, function( i, child ) { + var childPrototype = child.prototype; + + // Redefine the child widget using the same prototype that was + // originally used, but inherit from the new version of the base + $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, + child._proto ); + } ); + + // Remove the list of existing child constructors from the old constructor + // so the old child constructors can be garbage collected + delete existingConstructor._childConstructors; + } else { + base._childConstructors.push( constructor ); + } + + $.widget.bridge( name, constructor ); + + return constructor; +}; + +$.widget.extend = function( target ) { + var input = widgetSlice.call( arguments, 1 ); + var inputIndex = 0; + var inputLength = input.length; + var key; + var value; + + for ( ; inputIndex < inputLength; inputIndex++ ) { + for ( key in input[ inputIndex ] ) { + value = input[ inputIndex ][ key ]; + if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) { + + // Clone objects + if ( $.isPlainObject( value ) ) { + target[ key ] = $.isPlainObject( target[ key ] ) ? + $.widget.extend( {}, target[ key ], value ) : + + // Don't extend strings, arrays, etc. with objects + $.widget.extend( {}, value ); + + // Copy everything else by reference + } else { + target[ key ] = value; + } + } + } + } + return target; +}; + +$.widget.bridge = function( name, object ) { + var fullName = object.prototype.widgetFullName || name; + $.fn[ name ] = function( options ) { + var isMethodCall = typeof options === "string"; + var args = widgetSlice.call( arguments, 1 ); + var returnValue = this; + + if ( isMethodCall ) { + + // If this is an empty collection, we need to have the instance method + // return undefined instead of the jQuery instance + if ( !this.length && options === "instance" ) { + returnValue = undefined; + } else { + this.each( function() { + var methodValue; + var instance = $.data( this, fullName ); + + if ( options === "instance" ) { + returnValue = instance; + return false; + } + + if ( !instance ) { + return $.error( "cannot call methods on " + name + + " prior to initialization; " + + "attempted to call method '" + options + "'" ); + } + + if ( !$.isFunction( instance[ options ] ) || options.charAt( 0 ) === "_" ) { + return $.error( "no such method '" + options + "' for " + name + + " widget instance" ); + } + + methodValue = instance[ options ].apply( instance, args ); + + if ( methodValue !== instance && methodValue !== undefined ) { + returnValue = methodValue && methodValue.jquery ? + returnValue.pushStack( methodValue.get() ) : + methodValue; + return false; + } + } ); + } + } else { + + // Allow multiple hashes to be passed on init + if ( args.length ) { + options = $.widget.extend.apply( null, [ options ].concat( args ) ); + } + + this.each( function() { + var instance = $.data( this, fullName ); + if ( instance ) { + instance.option( options || {} ); + if ( instance._init ) { + instance._init(); + } + } else { + $.data( this, fullName, new object( options, this ) ); + } + } ); + } + + return returnValue; + }; +}; + +$.Widget = function( /* options, element */ ) {}; +$.Widget._childConstructors = []; + +$.Widget.prototype = { + widgetName: "widget", + widgetEventPrefix: "", + defaultElement: "
    ", + + options: { + classes: {}, + disabled: false, + + // Callbacks + create: null + }, + + _createWidget: function( options, element ) { + element = $( element || this.defaultElement || this )[ 0 ]; + this.element = $( element ); + this.uuid = widgetUuid++; + this.eventNamespace = "." + this.widgetName + this.uuid; + + this.bindings = $(); + this.hoverable = $(); + this.focusable = $(); + this.classesElementLookup = {}; + + if ( element !== this ) { + $.data( element, this.widgetFullName, this ); + this._on( true, this.element, { + remove: function( event ) { + if ( event.target === element ) { + this.destroy(); + } + } + } ); + this.document = $( element.style ? + + // Element within the document + element.ownerDocument : + + // Element is window or document + element.document || element ); + this.window = $( this.document[ 0 ].defaultView || this.document[ 0 ].parentWindow ); + } + + this.options = $.widget.extend( {}, + this.options, + this._getCreateOptions(), + options ); + + this._create(); + + if ( this.options.disabled ) { + this._setOptionDisabled( this.options.disabled ); + } + + this._trigger( "create", null, this._getCreateEventData() ); + this._init(); + }, + + _getCreateOptions: function() { + return {}; + }, + + _getCreateEventData: $.noop, + + _create: $.noop, + + _init: $.noop, + + destroy: function() { + var that = this; + + this._destroy(); + $.each( this.classesElementLookup, function( key, value ) { + that._removeClass( value, key ); + } ); + + // We can probably remove the unbind calls in 2.0 + // all event bindings should go through this._on() + this.element + .off( this.eventNamespace ) + .removeData( this.widgetFullName ); + this.widget() + .off( this.eventNamespace ) + .removeAttr( "aria-disabled" ); + + // Clean up events and states + this.bindings.off( this.eventNamespace ); + }, + + _destroy: $.noop, + + widget: function() { + return this.element; + }, + + option: function( key, value ) { + var options = key; + var parts; + var curOption; + var i; + + if ( arguments.length === 0 ) { + + // Don't return a reference to the internal hash + return $.widget.extend( {}, this.options ); + } + + if ( typeof key === "string" ) { + + // Handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } } + options = {}; + parts = key.split( "." ); + key = parts.shift(); + if ( parts.length ) { + curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] ); + for ( i = 0; i < parts.length - 1; i++ ) { + curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {}; + curOption = curOption[ parts[ i ] ]; + } + key = parts.pop(); + if ( arguments.length === 1 ) { + return curOption[ key ] === undefined ? null : curOption[ key ]; + } + curOption[ key ] = value; + } else { + if ( arguments.length === 1 ) { + return this.options[ key ] === undefined ? null : this.options[ key ]; + } + options[ key ] = value; + } + } + + this._setOptions( options ); + + return this; + }, + + _setOptions: function( options ) { + var key; + + for ( key in options ) { + this._setOption( key, options[ key ] ); + } + + return this; + }, + + _setOption: function( key, value ) { + if ( key === "classes" ) { + this._setOptionClasses( value ); + } + + this.options[ key ] = value; + + if ( key === "disabled" ) { + this._setOptionDisabled( value ); + } + + return this; + }, + + _setOptionClasses: function( value ) { + var classKey, elements, currentElements; + + for ( classKey in value ) { + currentElements = this.classesElementLookup[ classKey ]; + if ( value[ classKey ] === this.options.classes[ classKey ] || + !currentElements || + !currentElements.length ) { + continue; + } + + // We are doing this to create a new jQuery object because the _removeClass() call + // on the next line is going to destroy the reference to the current elements being + // tracked. We need to save a copy of this collection so that we can add the new classes + // below. + elements = $( currentElements.get() ); + this._removeClass( currentElements, classKey ); + + // We don't use _addClass() here, because that uses this.options.classes + // for generating the string of classes. We want to use the value passed in from + // _setOption(), this is the new value of the classes option which was passed to + // _setOption(). We pass this value directly to _classes(). + elements.addClass( this._classes( { + element: elements, + keys: classKey, + classes: value, + add: true + } ) ); + } + }, + + _setOptionDisabled: function( value ) { + this._toggleClass( this.widget(), this.widgetFullName + "-disabled", null, !!value ); + + // If the widget is becoming disabled, then nothing is interactive + if ( value ) { + this._removeClass( this.hoverable, null, "ui-state-hover" ); + this._removeClass( this.focusable, null, "ui-state-focus" ); + } + }, + + enable: function() { + return this._setOptions( { disabled: false } ); + }, + + disable: function() { + return this._setOptions( { disabled: true } ); + }, + + _classes: function( options ) { + var full = []; + var that = this; + + options = $.extend( { + element: this.element, + classes: this.options.classes || {} + }, options ); + + function processClassString( classes, checkOption ) { + var current, i; + for ( i = 0; i < classes.length; i++ ) { + current = that.classesElementLookup[ classes[ i ] ] || $(); + if ( options.add ) { + current = $( $.unique( current.get().concat( options.element.get() ) ) ); + } else { + current = $( current.not( options.element ).get() ); + } + that.classesElementLookup[ classes[ i ] ] = current; + full.push( classes[ i ] ); + if ( checkOption && options.classes[ classes[ i ] ] ) { + full.push( options.classes[ classes[ i ] ] ); + } + } + } + + this._on( options.element, { + "remove": "_untrackClassesElement" + } ); + + if ( options.keys ) { + processClassString( options.keys.match( /\S+/g ) || [], true ); + } + if ( options.extra ) { + processClassString( options.extra.match( /\S+/g ) || [] ); + } + + return full.join( " " ); + }, + + _untrackClassesElement: function( event ) { + var that = this; + $.each( that.classesElementLookup, function( key, value ) { + if ( $.inArray( event.target, value ) !== -1 ) { + that.classesElementLookup[ key ] = $( value.not( event.target ).get() ); + } + } ); + }, + + _removeClass: function( element, keys, extra ) { + return this._toggleClass( element, keys, extra, false ); + }, + + _addClass: function( element, keys, extra ) { + return this._toggleClass( element, keys, extra, true ); + }, + + _toggleClass: function( element, keys, extra, add ) { + add = ( typeof add === "boolean" ) ? add : extra; + var shift = ( typeof element === "string" || element === null ), + options = { + extra: shift ? keys : extra, + keys: shift ? element : keys, + element: shift ? this.element : element, + add: add + }; + options.element.toggleClass( this._classes( options ), add ); + return this; + }, + + _on: function( suppressDisabledCheck, element, handlers ) { + var delegateElement; + var instance = this; + + // No suppressDisabledCheck flag, shuffle arguments + if ( typeof suppressDisabledCheck !== "boolean" ) { + handlers = element; + element = suppressDisabledCheck; + suppressDisabledCheck = false; + } + + // No element argument, shuffle and use this.element + if ( !handlers ) { + handlers = element; + element = this.element; + delegateElement = this.widget(); + } else { + element = delegateElement = $( element ); + this.bindings = this.bindings.add( element ); + } + + $.each( handlers, function( event, handler ) { + function handlerProxy() { + + // Allow widgets to customize the disabled handling + // - disabled as an array instead of boolean + // - disabled class as method for disabling individual parts + if ( !suppressDisabledCheck && + ( instance.options.disabled === true || + $( this ).hasClass( "ui-state-disabled" ) ) ) { + return; + } + return ( typeof handler === "string" ? instance[ handler ] : handler ) + .apply( instance, arguments ); + } + + // Copy the guid so direct unbinding works + if ( typeof handler !== "string" ) { + handlerProxy.guid = handler.guid = + handler.guid || handlerProxy.guid || $.guid++; + } + + var match = event.match( /^([\w:-]*)\s*(.*)$/ ); + var eventName = match[ 1 ] + instance.eventNamespace; + var selector = match[ 2 ]; + + if ( selector ) { + delegateElement.on( eventName, selector, handlerProxy ); + } else { + element.on( eventName, handlerProxy ); + } + } ); + }, + + _off: function( element, eventName ) { + eventName = ( eventName || "" ).split( " " ).join( this.eventNamespace + " " ) + + this.eventNamespace; + element.off( eventName ).off( eventName ); + + // Clear the stack to avoid memory leaks (#10056) + this.bindings = $( this.bindings.not( element ).get() ); + this.focusable = $( this.focusable.not( element ).get() ); + this.hoverable = $( this.hoverable.not( element ).get() ); + }, + + _delay: function( handler, delay ) { + function handlerProxy() { + return ( typeof handler === "string" ? instance[ handler ] : handler ) + .apply( instance, arguments ); + } + var instance = this; + return setTimeout( handlerProxy, delay || 0 ); + }, + + _hoverable: function( element ) { + this.hoverable = this.hoverable.add( element ); + this._on( element, { + mouseenter: function( event ) { + this._addClass( $( event.currentTarget ), null, "ui-state-hover" ); + }, + mouseleave: function( event ) { + this._removeClass( $( event.currentTarget ), null, "ui-state-hover" ); + } + } ); + }, + + _focusable: function( element ) { + this.focusable = this.focusable.add( element ); + this._on( element, { + focusin: function( event ) { + this._addClass( $( event.currentTarget ), null, "ui-state-focus" ); + }, + focusout: function( event ) { + this._removeClass( $( event.currentTarget ), null, "ui-state-focus" ); + } + } ); + }, + + _trigger: function( type, event, data ) { + var prop, orig; + var callback = this.options[ type ]; + + data = data || {}; + event = $.Event( event ); + event.type = ( type === this.widgetEventPrefix ? + type : + this.widgetEventPrefix + type ).toLowerCase(); + + // The original event may come from any element + // so we need to reset the target on the new event + event.target = this.element[ 0 ]; + + // Copy original event properties over to the new event + orig = event.originalEvent; + if ( orig ) { + for ( prop in orig ) { + if ( !( prop in event ) ) { + event[ prop ] = orig[ prop ]; + } + } + } + + this.element.trigger( event, data ); + return !( $.isFunction( callback ) && + callback.apply( this.element[ 0 ], [ event ].concat( data ) ) === false || + event.isDefaultPrevented() ); + } +}; + +$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { + $.Widget.prototype[ "_" + method ] = function( element, options, callback ) { + if ( typeof options === "string" ) { + options = { effect: options }; + } + + var hasOptions; + var effectName = !options ? + method : + options === true || typeof options === "number" ? + defaultEffect : + options.effect || defaultEffect; + + options = options || {}; + if ( typeof options === "number" ) { + options = { duration: options }; + } + + hasOptions = !$.isEmptyObject( options ); + options.complete = callback; + + if ( options.delay ) { + element.delay( options.delay ); + } + + if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) { + element[ method ]( options ); + } else if ( effectName !== method && element[ effectName ] ) { + element[ effectName ]( options.duration, options.easing, callback ); + } else { + element.queue( function( next ) { + $( this )[ method ](); + if ( callback ) { + callback.call( element[ 0 ] ); + } + next(); + } ); + } + }; +} ); + +var widget = $.widget; + + +/*! + * jQuery UI Position 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/position/ + */ + +//>>label: Position +//>>group: Core +//>>description: Positions elements relative to other elements. +//>>docs: http://api.jqueryui.com/position/ +//>>demos: http://jqueryui.com/position/ + + +( function() { +var cachedScrollbarWidth, + max = Math.max, + abs = Math.abs, + rhorizontal = /left|center|right/, + rvertical = /top|center|bottom/, + roffset = /[\+\-]\d+(\.[\d]+)?%?/, + rposition = /^\w+/, + rpercent = /%$/, + _position = $.fn.position; + +function getOffsets( offsets, width, height ) { + return [ + parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ), + parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 ) + ]; +} + +function parseCss( element, property ) { + return parseInt( $.css( element, property ), 10 ) || 0; +} + +function getDimensions( elem ) { + var raw = elem[ 0 ]; + if ( raw.nodeType === 9 ) { + return { + width: elem.width(), + height: elem.height(), + offset: { top: 0, left: 0 } + }; + } + if ( $.isWindow( raw ) ) { + return { + width: elem.width(), + height: elem.height(), + offset: { top: elem.scrollTop(), left: elem.scrollLeft() } + }; + } + if ( raw.preventDefault ) { + return { + width: 0, + height: 0, + offset: { top: raw.pageY, left: raw.pageX } + }; + } + return { + width: elem.outerWidth(), + height: elem.outerHeight(), + offset: elem.offset() + }; +} + +$.position = { + scrollbarWidth: function() { + if ( cachedScrollbarWidth !== undefined ) { + return cachedScrollbarWidth; + } + var w1, w2, + div = $( "
    " + + "
    " ), + innerDiv = div.children()[ 0 ]; + + $( "body" ).append( div ); + w1 = innerDiv.offsetWidth; + div.css( "overflow", "scroll" ); + + w2 = innerDiv.offsetWidth; + + if ( w1 === w2 ) { + w2 = div[ 0 ].clientWidth; + } + + div.remove(); + + return ( cachedScrollbarWidth = w1 - w2 ); + }, + getScrollInfo: function( within ) { + var overflowX = within.isWindow || within.isDocument ? "" : + within.element.css( "overflow-x" ), + overflowY = within.isWindow || within.isDocument ? "" : + within.element.css( "overflow-y" ), + hasOverflowX = overflowX === "scroll" || + ( overflowX === "auto" && within.width < within.element[ 0 ].scrollWidth ), + hasOverflowY = overflowY === "scroll" || + ( overflowY === "auto" && within.height < within.element[ 0 ].scrollHeight ); + return { + width: hasOverflowY ? $.position.scrollbarWidth() : 0, + height: hasOverflowX ? $.position.scrollbarWidth() : 0 + }; + }, + getWithinInfo: function( element ) { + var withinElement = $( element || window ), + isWindow = $.isWindow( withinElement[ 0 ] ), + isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9, + hasOffset = !isWindow && !isDocument; + return { + element: withinElement, + isWindow: isWindow, + isDocument: isDocument, + offset: hasOffset ? $( element ).offset() : { left: 0, top: 0 }, + scrollLeft: withinElement.scrollLeft(), + scrollTop: withinElement.scrollTop(), + width: withinElement.outerWidth(), + height: withinElement.outerHeight() + }; + } +}; + +$.fn.position = function( options ) { + if ( !options || !options.of ) { + return _position.apply( this, arguments ); + } + + // Make a copy, we don't want to modify arguments + options = $.extend( {}, options ); + + var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions, + target = $( options.of ), + within = $.position.getWithinInfo( options.within ), + scrollInfo = $.position.getScrollInfo( within ), + collision = ( options.collision || "flip" ).split( " " ), + offsets = {}; + + dimensions = getDimensions( target ); + if ( target[ 0 ].preventDefault ) { + + // Force left top to allow flipping + options.at = "left top"; + } + targetWidth = dimensions.width; + targetHeight = dimensions.height; + targetOffset = dimensions.offset; + + // Clone to reuse original targetOffset later + basePosition = $.extend( {}, targetOffset ); + + // Force my and at to have valid horizontal and vertical positions + // if a value is missing or invalid, it will be converted to center + $.each( [ "my", "at" ], function() { + var pos = ( options[ this ] || "" ).split( " " ), + horizontalOffset, + verticalOffset; + + if ( pos.length === 1 ) { + pos = rhorizontal.test( pos[ 0 ] ) ? + pos.concat( [ "center" ] ) : + rvertical.test( pos[ 0 ] ) ? + [ "center" ].concat( pos ) : + [ "center", "center" ]; + } + pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center"; + pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center"; + + // Calculate offsets + horizontalOffset = roffset.exec( pos[ 0 ] ); + verticalOffset = roffset.exec( pos[ 1 ] ); + offsets[ this ] = [ + horizontalOffset ? horizontalOffset[ 0 ] : 0, + verticalOffset ? verticalOffset[ 0 ] : 0 + ]; + + // Reduce to just the positions without the offsets + options[ this ] = [ + rposition.exec( pos[ 0 ] )[ 0 ], + rposition.exec( pos[ 1 ] )[ 0 ] + ]; + } ); + + // Normalize collision option + if ( collision.length === 1 ) { + collision[ 1 ] = collision[ 0 ]; + } + + if ( options.at[ 0 ] === "right" ) { + basePosition.left += targetWidth; + } else if ( options.at[ 0 ] === "center" ) { + basePosition.left += targetWidth / 2; + } + + if ( options.at[ 1 ] === "bottom" ) { + basePosition.top += targetHeight; + } else if ( options.at[ 1 ] === "center" ) { + basePosition.top += targetHeight / 2; + } + + atOffset = getOffsets( offsets.at, targetWidth, targetHeight ); + basePosition.left += atOffset[ 0 ]; + basePosition.top += atOffset[ 1 ]; + + return this.each( function() { + var collisionPosition, using, + elem = $( this ), + elemWidth = elem.outerWidth(), + elemHeight = elem.outerHeight(), + marginLeft = parseCss( this, "marginLeft" ), + marginTop = parseCss( this, "marginTop" ), + collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + + scrollInfo.width, + collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + + scrollInfo.height, + position = $.extend( {}, basePosition ), + myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() ); + + if ( options.my[ 0 ] === "right" ) { + position.left -= elemWidth; + } else if ( options.my[ 0 ] === "center" ) { + position.left -= elemWidth / 2; + } + + if ( options.my[ 1 ] === "bottom" ) { + position.top -= elemHeight; + } else if ( options.my[ 1 ] === "center" ) { + position.top -= elemHeight / 2; + } + + position.left += myOffset[ 0 ]; + position.top += myOffset[ 1 ]; + + collisionPosition = { + marginLeft: marginLeft, + marginTop: marginTop + }; + + $.each( [ "left", "top" ], function( i, dir ) { + if ( $.ui.position[ collision[ i ] ] ) { + $.ui.position[ collision[ i ] ][ dir ]( position, { + targetWidth: targetWidth, + targetHeight: targetHeight, + elemWidth: elemWidth, + elemHeight: elemHeight, + collisionPosition: collisionPosition, + collisionWidth: collisionWidth, + collisionHeight: collisionHeight, + offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ], + my: options.my, + at: options.at, + within: within, + elem: elem + } ); + } + } ); + + if ( options.using ) { + + // Adds feedback as second argument to using callback, if present + using = function( props ) { + var left = targetOffset.left - position.left, + right = left + targetWidth - elemWidth, + top = targetOffset.top - position.top, + bottom = top + targetHeight - elemHeight, + feedback = { + target: { + element: target, + left: targetOffset.left, + top: targetOffset.top, + width: targetWidth, + height: targetHeight + }, + element: { + element: elem, + left: position.left, + top: position.top, + width: elemWidth, + height: elemHeight + }, + horizontal: right < 0 ? "left" : left > 0 ? "right" : "center", + vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle" + }; + if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) { + feedback.horizontal = "center"; + } + if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) { + feedback.vertical = "middle"; + } + if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) { + feedback.important = "horizontal"; + } else { + feedback.important = "vertical"; + } + options.using.call( this, props, feedback ); + }; + } + + elem.offset( $.extend( position, { using: using } ) ); + } ); +}; + +$.ui.position = { + fit: { + left: function( position, data ) { + var within = data.within, + withinOffset = within.isWindow ? within.scrollLeft : within.offset.left, + outerWidth = within.width, + collisionPosLeft = position.left - data.collisionPosition.marginLeft, + overLeft = withinOffset - collisionPosLeft, + overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset, + newOverRight; + + // Element is wider than within + if ( data.collisionWidth > outerWidth ) { + + // Element is initially over the left side of within + if ( overLeft > 0 && overRight <= 0 ) { + newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - + withinOffset; + position.left += overLeft - newOverRight; + + // Element is initially over right side of within + } else if ( overRight > 0 && overLeft <= 0 ) { + position.left = withinOffset; + + // Element is initially over both left and right sides of within + } else { + if ( overLeft > overRight ) { + position.left = withinOffset + outerWidth - data.collisionWidth; + } else { + position.left = withinOffset; + } + } + + // Too far left -> align with left edge + } else if ( overLeft > 0 ) { + position.left += overLeft; + + // Too far right -> align with right edge + } else if ( overRight > 0 ) { + position.left -= overRight; + + // Adjust based on position and margin + } else { + position.left = max( position.left - collisionPosLeft, position.left ); + } + }, + top: function( position, data ) { + var within = data.within, + withinOffset = within.isWindow ? within.scrollTop : within.offset.top, + outerHeight = data.within.height, + collisionPosTop = position.top - data.collisionPosition.marginTop, + overTop = withinOffset - collisionPosTop, + overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset, + newOverBottom; + + // Element is taller than within + if ( data.collisionHeight > outerHeight ) { + + // Element is initially over the top of within + if ( overTop > 0 && overBottom <= 0 ) { + newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - + withinOffset; + position.top += overTop - newOverBottom; + + // Element is initially over bottom of within + } else if ( overBottom > 0 && overTop <= 0 ) { + position.top = withinOffset; + + // Element is initially over both top and bottom of within + } else { + if ( overTop > overBottom ) { + position.top = withinOffset + outerHeight - data.collisionHeight; + } else { + position.top = withinOffset; + } + } + + // Too far up -> align with top + } else if ( overTop > 0 ) { + position.top += overTop; + + // Too far down -> align with bottom edge + } else if ( overBottom > 0 ) { + position.top -= overBottom; + + // Adjust based on position and margin + } else { + position.top = max( position.top - collisionPosTop, position.top ); + } + } + }, + flip: { + left: function( position, data ) { + var within = data.within, + withinOffset = within.offset.left + within.scrollLeft, + outerWidth = within.width, + offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left, + collisionPosLeft = position.left - data.collisionPosition.marginLeft, + overLeft = collisionPosLeft - offsetLeft, + overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft, + myOffset = data.my[ 0 ] === "left" ? + -data.elemWidth : + data.my[ 0 ] === "right" ? + data.elemWidth : + 0, + atOffset = data.at[ 0 ] === "left" ? + data.targetWidth : + data.at[ 0 ] === "right" ? + -data.targetWidth : + 0, + offset = -2 * data.offset[ 0 ], + newOverRight, + newOverLeft; + + if ( overLeft < 0 ) { + newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - + outerWidth - withinOffset; + if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) { + position.left += myOffset + atOffset + offset; + } + } else if ( overRight > 0 ) { + newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + + atOffset + offset - offsetLeft; + if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) { + position.left += myOffset + atOffset + offset; + } + } + }, + top: function( position, data ) { + var within = data.within, + withinOffset = within.offset.top + within.scrollTop, + outerHeight = within.height, + offsetTop = within.isWindow ? within.scrollTop : within.offset.top, + collisionPosTop = position.top - data.collisionPosition.marginTop, + overTop = collisionPosTop - offsetTop, + overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop, + top = data.my[ 1 ] === "top", + myOffset = top ? + -data.elemHeight : + data.my[ 1 ] === "bottom" ? + data.elemHeight : + 0, + atOffset = data.at[ 1 ] === "top" ? + data.targetHeight : + data.at[ 1 ] === "bottom" ? + -data.targetHeight : + 0, + offset = -2 * data.offset[ 1 ], + newOverTop, + newOverBottom; + if ( overTop < 0 ) { + newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - + outerHeight - withinOffset; + if ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) { + position.top += myOffset + atOffset + offset; + } + } else if ( overBottom > 0 ) { + newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + + offset - offsetTop; + if ( newOverTop > 0 || abs( newOverTop ) < overBottom ) { + position.top += myOffset + atOffset + offset; + } + } + } + }, + flipfit: { + left: function() { + $.ui.position.flip.left.apply( this, arguments ); + $.ui.position.fit.left.apply( this, arguments ); + }, + top: function() { + $.ui.position.flip.top.apply( this, arguments ); + $.ui.position.fit.top.apply( this, arguments ); + } + } +}; + +} )(); + +var position = $.ui.position; + + +/*! + * jQuery UI :data 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: :data Selector +//>>group: Core +//>>description: Selects elements which have data stored under the specified key. +//>>docs: http://api.jqueryui.com/data-selector/ + + +var data = $.extend( $.expr[ ":" ], { + data: $.expr.createPseudo ? + $.expr.createPseudo( function( dataName ) { + return function( elem ) { + return !!$.data( elem, dataName ); + }; + } ) : + + // Support: jQuery <1.8 + function( elem, i, match ) { + return !!$.data( elem, match[ 3 ] ); + } +} ); + +/*! + * jQuery UI Disable Selection 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: disableSelection +//>>group: Core +//>>description: Disable selection of text content within the set of matched elements. +//>>docs: http://api.jqueryui.com/disableSelection/ + +// This file is deprecated + + +var disableSelection = $.fn.extend( { + disableSelection: ( function() { + var eventType = "onselectstart" in document.createElement( "div" ) ? + "selectstart" : + "mousedown"; + + return function() { + return this.on( eventType + ".ui-disableSelection", function( event ) { + event.preventDefault(); + } ); + }; + } )(), + + enableSelection: function() { + return this.off( ".ui-disableSelection" ); + } +} ); + + +/*! + * jQuery UI Focusable 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: :focusable Selector +//>>group: Core +//>>description: Selects elements which can be focused. +//>>docs: http://api.jqueryui.com/focusable-selector/ + + + +// Selectors +$.ui.focusable = function( element, hasTabindex ) { + var map, mapName, img, focusableIfVisible, fieldset, + nodeName = element.nodeName.toLowerCase(); + + if ( "area" === nodeName ) { + map = element.parentNode; + mapName = map.name; + if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) { + return false; + } + img = $( "img[usemap='#" + mapName + "']" ); + return img.length > 0 && img.is( ":visible" ); + } + + if ( /^(input|select|textarea|button|object)$/.test( nodeName ) ) { + focusableIfVisible = !element.disabled; + + if ( focusableIfVisible ) { + + // Form controls within a disabled fieldset are disabled. + // However, controls within the fieldset's legend do not get disabled. + // Since controls generally aren't placed inside legends, we skip + // this portion of the check. + fieldset = $( element ).closest( "fieldset" )[ 0 ]; + if ( fieldset ) { + focusableIfVisible = !fieldset.disabled; + } + } + } else if ( "a" === nodeName ) { + focusableIfVisible = element.href || hasTabindex; + } else { + focusableIfVisible = hasTabindex; + } + + return focusableIfVisible && $( element ).is( ":visible" ) && visible( $( element ) ); +}; + +// Support: IE 8 only +// IE 8 doesn't resolve inherit to visible/hidden for computed values +function visible( element ) { + var visibility = element.css( "visibility" ); + while ( visibility === "inherit" ) { + element = element.parent(); + visibility = element.css( "visibility" ); + } + return visibility !== "hidden"; +} + +$.extend( $.expr[ ":" ], { + focusable: function( element ) { + return $.ui.focusable( element, $.attr( element, "tabindex" ) != null ); + } +} ); + +var focusable = $.ui.focusable; + + + + +// Support: IE8 Only +// IE8 does not support the form attribute and when it is supplied. It overwrites the form prop +// with a string, so we need to find the proper form. +var form = $.fn.form = function() { + return typeof this[ 0 ].form === "string" ? this.closest( "form" ) : $( this[ 0 ].form ); +}; + + +/*! + * jQuery UI Form Reset Mixin 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Form Reset Mixin +//>>group: Core +//>>description: Refresh input widgets when their form is reset +//>>docs: http://api.jqueryui.com/form-reset-mixin/ + + + +var formResetMixin = $.ui.formResetMixin = { + _formResetHandler: function() { + var form = $( this ); + + // Wait for the form reset to actually happen before refreshing + setTimeout( function() { + var instances = form.data( "ui-form-reset-instances" ); + $.each( instances, function() { + this.refresh(); + } ); + } ); + }, + + _bindFormResetHandler: function() { + this.form = this.element.form(); + if ( !this.form.length ) { + return; + } + + var instances = this.form.data( "ui-form-reset-instances" ) || []; + if ( !instances.length ) { + + // We don't use _on() here because we use a single event handler per form + this.form.on( "reset.ui-form-reset", this._formResetHandler ); + } + instances.push( this ); + this.form.data( "ui-form-reset-instances", instances ); + }, + + _unbindFormResetHandler: function() { + if ( !this.form.length ) { + return; + } + + var instances = this.form.data( "ui-form-reset-instances" ); + instances.splice( $.inArray( this, instances ), 1 ); + if ( instances.length ) { + this.form.data( "ui-form-reset-instances", instances ); + } else { + this.form + .removeData( "ui-form-reset-instances" ) + .off( "reset.ui-form-reset" ); + } + } +}; + + +/*! + * jQuery UI Support for jQuery core 1.7.x 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + */ + +//>>label: jQuery 1.7 Support +//>>group: Core +//>>description: Support version 1.7.x of jQuery core + + + +// Support: jQuery 1.7 only +// Not a great way to check versions, but since we only support 1.7+ and only +// need to detect <1.8, this is a simple check that should suffice. Checking +// for "1.7." would be a bit safer, but the version string is 1.7, not 1.7.0 +// and we'll never reach 1.70.0 (if we do, we certainly won't be supporting +// 1.7 anymore). See #11197 for why we're not using feature detection. +if ( $.fn.jquery.substring( 0, 3 ) === "1.7" ) { + + // Setters for .innerWidth(), .innerHeight(), .outerWidth(), .outerHeight() + // Unlike jQuery Core 1.8+, these only support numeric values to set the + // dimensions in pixels + $.each( [ "Width", "Height" ], function( i, name ) { + var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ], + type = name.toLowerCase(), + orig = { + innerWidth: $.fn.innerWidth, + innerHeight: $.fn.innerHeight, + outerWidth: $.fn.outerWidth, + outerHeight: $.fn.outerHeight + }; + + function reduce( elem, size, border, margin ) { + $.each( side, function() { + size -= parseFloat( $.css( elem, "padding" + this ) ) || 0; + if ( border ) { + size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0; + } + if ( margin ) { + size -= parseFloat( $.css( elem, "margin" + this ) ) || 0; + } + } ); + return size; + } + + $.fn[ "inner" + name ] = function( size ) { + if ( size === undefined ) { + return orig[ "inner" + name ].call( this ); + } + + return this.each( function() { + $( this ).css( type, reduce( this, size ) + "px" ); + } ); + }; + + $.fn[ "outer" + name ] = function( size, margin ) { + if ( typeof size !== "number" ) { + return orig[ "outer" + name ].call( this, size ); + } + + return this.each( function() { + $( this ).css( type, reduce( this, size, true, margin ) + "px" ); + } ); + }; + } ); + + $.fn.addBack = function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter( selector ) + ); + }; +} + +; +/*! + * jQuery UI Keycode 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Keycode +//>>group: Core +//>>description: Provide keycodes as keynames +//>>docs: http://api.jqueryui.com/jQuery.ui.keyCode/ + + +var keycode = $.ui.keyCode = { + BACKSPACE: 8, + COMMA: 188, + DELETE: 46, + DOWN: 40, + END: 35, + ENTER: 13, + ESCAPE: 27, + HOME: 36, + LEFT: 37, + PAGE_DOWN: 34, + PAGE_UP: 33, + PERIOD: 190, + RIGHT: 39, + SPACE: 32, + TAB: 9, + UP: 38 +}; + + + + +// Internal use only +var escapeSelector = $.ui.escapeSelector = ( function() { + var selectorEscape = /([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g; + return function( selector ) { + return selector.replace( selectorEscape, "\\$1" ); + }; +} )(); + + +/*! + * jQuery UI Labels 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: labels +//>>group: Core +//>>description: Find all the labels associated with a given input +//>>docs: http://api.jqueryui.com/labels/ + + + +var labels = $.fn.labels = function() { + var ancestor, selector, id, labels, ancestors; + + // Check control.labels first + if ( this[ 0 ].labels && this[ 0 ].labels.length ) { + return this.pushStack( this[ 0 ].labels ); + } + + // Support: IE <= 11, FF <= 37, Android <= 2.3 only + // Above browsers do not support control.labels. Everything below is to support them + // as well as document fragments. control.labels does not work on document fragments + labels = this.eq( 0 ).parents( "label" ); + + // Look for the label based on the id + id = this.attr( "id" ); + if ( id ) { + + // We don't search against the document in case the element + // is disconnected from the DOM + ancestor = this.eq( 0 ).parents().last(); + + // Get a full set of top level ancestors + ancestors = ancestor.add( ancestor.length ? ancestor.siblings() : this.siblings() ); + + // Create a selector for the label based on the id + selector = "label[for='" + $.ui.escapeSelector( id ) + "']"; + + labels = labels.add( ancestors.find( selector ).addBack( selector ) ); + + } + + // Return whatever we have found for labels + return this.pushStack( labels ); +}; + + +/*! + * jQuery UI Scroll Parent 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: scrollParent +//>>group: Core +//>>description: Get the closest ancestor element that is scrollable. +//>>docs: http://api.jqueryui.com/scrollParent/ + + + +var scrollParent = $.fn.scrollParent = function( includeHidden ) { + var position = this.css( "position" ), + excludeStaticParent = position === "absolute", + overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/, + scrollParent = this.parents().filter( function() { + var parent = $( this ); + if ( excludeStaticParent && parent.css( "position" ) === "static" ) { + return false; + } + return overflowRegex.test( parent.css( "overflow" ) + parent.css( "overflow-y" ) + + parent.css( "overflow-x" ) ); + } ).eq( 0 ); + + return position === "fixed" || !scrollParent.length ? + $( this[ 0 ].ownerDocument || document ) : + scrollParent; +}; + + +/*! + * jQuery UI Tabbable 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: :tabbable Selector +//>>group: Core +//>>description: Selects elements which can be tabbed to. +//>>docs: http://api.jqueryui.com/tabbable-selector/ + + + +var tabbable = $.extend( $.expr[ ":" ], { + tabbable: function( element ) { + var tabIndex = $.attr( element, "tabindex" ), + hasTabindex = tabIndex != null; + return ( !hasTabindex || tabIndex >= 0 ) && $.ui.focusable( element, hasTabindex ); + } +} ); + + +/*! + * jQuery UI Unique ID 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: uniqueId +//>>group: Core +//>>description: Functions to generate and remove uniqueId's +//>>docs: http://api.jqueryui.com/uniqueId/ + + + +var uniqueId = $.fn.extend( { + uniqueId: ( function() { + var uuid = 0; + + return function() { + return this.each( function() { + if ( !this.id ) { + this.id = "ui-id-" + ( ++uuid ); + } + } ); + }; + } )(), + + removeUniqueId: function() { + return this.each( function() { + if ( /^ui-id-\d+$/.test( this.id ) ) { + $( this ).removeAttr( "id" ); + } + } ); + } +} ); + + + + +// This file is deprecated +var ie = $.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() ); + +/*! + * jQuery UI Mouse 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Mouse +//>>group: Widgets +//>>description: Abstracts mouse-based interactions to assist in creating certain widgets. +//>>docs: http://api.jqueryui.com/mouse/ + + + +var mouseHandled = false; +$( document ).on( "mouseup", function() { + mouseHandled = false; +} ); + +var widgetsMouse = $.widget( "ui.mouse", { + version: "1.12.1", + options: { + cancel: "input, textarea, button, select, option", + distance: 1, + delay: 0 + }, + _mouseInit: function() { + var that = this; + + this.element + .on( "mousedown." + this.widgetName, function( event ) { + return that._mouseDown( event ); + } ) + .on( "click." + this.widgetName, function( event ) { + if ( true === $.data( event.target, that.widgetName + ".preventClickEvent" ) ) { + $.removeData( event.target, that.widgetName + ".preventClickEvent" ); + event.stopImmediatePropagation(); + return false; + } + } ); + + this.started = false; + }, + + // TODO: make sure destroying one instance of mouse doesn't mess with + // other instances of mouse + _mouseDestroy: function() { + this.element.off( "." + this.widgetName ); + if ( this._mouseMoveDelegate ) { + this.document + .off( "mousemove." + this.widgetName, this._mouseMoveDelegate ) + .off( "mouseup." + this.widgetName, this._mouseUpDelegate ); + } + }, + + _mouseDown: function( event ) { + + // don't let more than one widget handle mouseStart + if ( mouseHandled ) { + return; + } + + this._mouseMoved = false; + + // We may have missed mouseup (out of window) + ( this._mouseStarted && this._mouseUp( event ) ); + + this._mouseDownEvent = event; + + var that = this, + btnIsLeft = ( event.which === 1 ), + + // event.target.nodeName works around a bug in IE 8 with + // disabled inputs (#7620) + elIsCancel = ( typeof this.options.cancel === "string" && event.target.nodeName ? + $( event.target ).closest( this.options.cancel ).length : false ); + if ( !btnIsLeft || elIsCancel || !this._mouseCapture( event ) ) { + return true; + } + + this.mouseDelayMet = !this.options.delay; + if ( !this.mouseDelayMet ) { + this._mouseDelayTimer = setTimeout( function() { + that.mouseDelayMet = true; + }, this.options.delay ); + } + + if ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) { + this._mouseStarted = ( this._mouseStart( event ) !== false ); + if ( !this._mouseStarted ) { + event.preventDefault(); + return true; + } + } + + // Click event may never have fired (Gecko & Opera) + if ( true === $.data( event.target, this.widgetName + ".preventClickEvent" ) ) { + $.removeData( event.target, this.widgetName + ".preventClickEvent" ); + } + + // These delegates are required to keep context + this._mouseMoveDelegate = function( event ) { + return that._mouseMove( event ); + }; + this._mouseUpDelegate = function( event ) { + return that._mouseUp( event ); + }; + + this.document + .on( "mousemove." + this.widgetName, this._mouseMoveDelegate ) + .on( "mouseup." + this.widgetName, this._mouseUpDelegate ); + + event.preventDefault(); + + mouseHandled = true; + return true; + }, + + _mouseMove: function( event ) { + + // Only check for mouseups outside the document if you've moved inside the document + // at least once. This prevents the firing of mouseup in the case of IE<9, which will + // fire a mousemove event if content is placed under the cursor. See #7778 + // Support: IE <9 + if ( this._mouseMoved ) { + + // IE mouseup check - mouseup happened when mouse was out of window + if ( $.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && + !event.button ) { + return this._mouseUp( event ); + + // Iframe mouseup check - mouseup occurred in another document + } else if ( !event.which ) { + + // Support: Safari <=8 - 9 + // Safari sets which to 0 if you press any of the following keys + // during a drag (#14461) + if ( event.originalEvent.altKey || event.originalEvent.ctrlKey || + event.originalEvent.metaKey || event.originalEvent.shiftKey ) { + this.ignoreMissingWhich = true; + } else if ( !this.ignoreMissingWhich ) { + return this._mouseUp( event ); + } + } + } + + if ( event.which || event.button ) { + this._mouseMoved = true; + } + + if ( this._mouseStarted ) { + this._mouseDrag( event ); + return event.preventDefault(); + } + + if ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) { + this._mouseStarted = + ( this._mouseStart( this._mouseDownEvent, event ) !== false ); + ( this._mouseStarted ? this._mouseDrag( event ) : this._mouseUp( event ) ); + } + + return !this._mouseStarted; + }, + + _mouseUp: function( event ) { + this.document + .off( "mousemove." + this.widgetName, this._mouseMoveDelegate ) + .off( "mouseup." + this.widgetName, this._mouseUpDelegate ); + + if ( this._mouseStarted ) { + this._mouseStarted = false; + + if ( event.target === this._mouseDownEvent.target ) { + $.data( event.target, this.widgetName + ".preventClickEvent", true ); + } + + this._mouseStop( event ); + } + + if ( this._mouseDelayTimer ) { + clearTimeout( this._mouseDelayTimer ); + delete this._mouseDelayTimer; + } + + this.ignoreMissingWhich = false; + mouseHandled = false; + event.preventDefault(); + }, + + _mouseDistanceMet: function( event ) { + return ( Math.max( + Math.abs( this._mouseDownEvent.pageX - event.pageX ), + Math.abs( this._mouseDownEvent.pageY - event.pageY ) + ) >= this.options.distance + ); + }, + + _mouseDelayMet: function( /* event */ ) { + return this.mouseDelayMet; + }, + + // These are placeholder methods, to be overriden by extending plugin + _mouseStart: function( /* event */ ) {}, + _mouseDrag: function( /* event */ ) {}, + _mouseStop: function( /* event */ ) {}, + _mouseCapture: function( /* event */ ) { return true; } +} ); + + + + +// $.ui.plugin is deprecated. Use $.widget() extensions instead. +var plugin = $.ui.plugin = { + add: function( module, option, set ) { + var i, + proto = $.ui[ module ].prototype; + for ( i in set ) { + proto.plugins[ i ] = proto.plugins[ i ] || []; + proto.plugins[ i ].push( [ option, set[ i ] ] ); + } + }, + call: function( instance, name, args, allowDisconnected ) { + var i, + set = instance.plugins[ name ]; + + if ( !set ) { + return; + } + + if ( !allowDisconnected && ( !instance.element[ 0 ].parentNode || + instance.element[ 0 ].parentNode.nodeType === 11 ) ) { + return; + } + + for ( i = 0; i < set.length; i++ ) { + if ( instance.options[ set[ i ][ 0 ] ] ) { + set[ i ][ 1 ].apply( instance.element, args ); + } + } + } +}; + + + +var safeActiveElement = $.ui.safeActiveElement = function( document ) { + var activeElement; + + // Support: IE 9 only + // IE9 throws an "Unspecified error" accessing document.activeElement from an