diff --git a/.codeclimate.yml b/.codeclimate.yml index 2447a597a..6c2241653 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -60,3 +60,7 @@ exclude_patterns: - "e107_handlers/phpthumb/**/*" - "e107_handlers/xmlrpc/**/*" - "e107_web/**/*" +- "e107_tests/tests/**/*" +# Ignore symlinks that are allowed to be broken due to local configurations +- "e107_tests/lib/ci/salt/pillars/config.sls" +- "e107_tests/lib/ci/salt/pillars/config-local.sls" diff --git a/CONTRIBUTING.md b/.github/CONTRIBUTING.md similarity index 69% rename from CONTRIBUTING.md rename to .github/CONTRIBUTING.md index 933e1e6df..ef1430e22 100644 --- a/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -1,27 +1,76 @@ -# e107 v2 +# Contributing to e107 [![Join the chat at https://gitter.im/e107inc/e107](https://badges.gitter.im/e107inc/e107.svg)](https://gitter.im/e107inc/e107?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -## How to contribute +_Firstly, thank you for taking the time to contribute to e107!_ -Contributing to e107 is quite easy if you keep in mind the following tips, to avoid some pitfalls. +By following these guidelines, you can help us make e107 even better. -### The big picture +## Getting Started -1. You need to install git on your local computer to be able to work with github! -2. Create a fork of e107 by clicking on the "Fork" button on the top right corner of the project page. -3. Once the forking process has finished, click on the green "Clone or download" and copy the shown url. -4. Clone your fork to your local computer by running the `git clone [The previously copied url]` command. -5. Make sure, your copy "knows" from the original repo by running the following command `git remote add upstream https://github.com/e107inc/e107.git` -6. Create a new branch for each issue you tackle by running `git checkout [branch name e.g. fix_IssueNr]` -7. Work on your fix and add the changed file to your commit by running `git add [changed file]` -8. Commit your work by running `git commit -m [message]` e.g. for a message: "Fixes #5432 added new method to solve this" -9. Push your commit to the remote repo (your online fork) by running `git push -u origin [branch name]` -10. Do NOT forget to switch the branch back to master by running `git checkout master`! -11. Now the fix is online at Github and you can now create the push request by clicking on "Compare & pull request" on YOUR forks project page. Enter some more details to the pull request to explain what you have done and click on "Create pull request" -12. Congratulation! You have created your first pull request! +### The Big Picture + +1. You need to install [Git](https://git-scm.com/) on your local computer to be able to push and pull code to and from GitHub! +2. Create a fork of e107 by clicking on the "Fork" button on the top right corner of [the project page](https://github.com/e107inc/e107/). +3. Once the forking process has finished, click on the green "Clone or download" and copy the URL shown. +4. Clone your fork to your local computer by running the following command: + ``` + git clone [the previously copied url] + ``` +5. Make sure your copy "knows" from the original repo by running: + ``` + git remote add upstream https://github.com/e107inc/e107.git + ``` +6. Create a new branch for each [issue](https://github.com/e107inc/e107/issues) you tackle by running: + ``` + git checkout [branch name, e.g. fix-IssueNumber] + ``` +7. Work on your fix and add changed files to your commit by running: + ``` + # One changed file + git add [changed file] + + # All changed files + git add -A + ``` +8. Commit your work by running: + ``` + git commit + ``` + For the commit message, add a summary of important information such as why the proposed approach was chosen or a brief description of the bug you are resolving. + + **Example:** + + First line: + ``` + This line is a brief summary of your change + ``` + + Starting from the third line: + ``` + Please provide at least a couple sentences describing the + change. If necessary, please summarize decisions such as + why the proposed approach was chosen or what bug you are + attempting to solve. + + Fixes: #5432 + ``` +9. Push your commit to the origin repo (your online fork) by running: + ``` + git push -u origin [branch name] + ``` +10. Do **not** forget to switch the branch back to master by running: + ``` + git checkout master + ``` +11. Once the commit is on GitHub, you can create a pull request to get the changes merged into the original project by clicking on "Compare & pull request" on _your_ fork's project page. + + Fill out the pull request checklist and then click on "Create pull request". +12. Congratulations! A project maintainer will review your contribution. The maintainer may: + * approve and merge your changes, which means your contribution will be added to e107! + * provide feedback if your changes need improvement. -### More in detail +### More Details ##### Make sure ... diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.md b/.github/ISSUE_TEMPLATE/BUG_REPORT.md new file mode 100644 index 000000000..dd84ea782 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.md @@ -0,0 +1,38 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Browser [e.g. stock browser, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md new file mode 100644 index 000000000..bbcbbe7d6 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..267bb3e52 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,33 @@ + + + + +### Motivation and Context + + + +### Description + + +### How Has This Been Tested? + + + + + +### Types of Changes + +- [ ] Bug fix (non-breaking change which fixes an issue) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Performance enhancement (non-breaking change which improves efficiency) +- [ ] Code cleanup (non-breaking change which makes code smaller or more readable) +- [ ] Breaking change (fix or feature that would cause existing functionality to change) +- [ ] Documentation (a change to man pages or other documentation) + +### Checklist + + +- [ ] My code adheres to the e107 [code style standard](https://github.com/e107inc/e107/wiki/e107-Coding-Standard). +- [ ] I have read the [**contributing** document](https://github.com/e107inc/e107/blob/master/.github/CONTRIBUTING.md). +- [ ] I have added [tests](https://github.com/e107inc/e107/tree/master/e107_tests) to cover my changes. +- [ ] All new and existing tests pass. \ No newline at end of file diff --git a/.github/codecov.yml b/.github/codecov.yml new file mode 100644 index 000000000..b0d8b5e23 --- /dev/null +++ b/.github/codecov.yml @@ -0,0 +1,10 @@ +ignore: + - "e107_tests/**/*" + +comment: + layout: "reach, diff, flags, files" + behavior: default + require_changes: false + require_base: false + require_head: true + after_n_builds: 1 \ No newline at end of file diff --git a/.github/workflows/test-unit.yml b/.github/workflows/test-unit.yml new file mode 100644 index 000000000..19a02fbe5 --- /dev/null +++ b/.github/workflows/test-unit.yml @@ -0,0 +1,126 @@ +name: Unit Tests + +on: + push: + pull_request: + +env: + MYSQL_DATABASE: app + MYSQL_ROOT_PASSWORD: 'Database Password for Continuous Integration' + CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} + +jobs: + test: + strategy: + fail-fast: false + matrix: + interpreter: + - image: php:5.6 + - image: php:7.1 + - image: php:7.2 + - image: php:7.3 + - image: php:7.4 + db: + - image: mysql:5.5 + - image: mysql:5.6 + - image: mysql:5.7 + - image: mariadb:10.4 + runs-on: ubuntu-latest + container: + image: ${{ matrix.interpreter.image }} + services: + db: + image: ${{ matrix.db.image }} + env: + MYSQL_ROOT_PASSWORD: 'Database Password for Continuous Integration' + MYSQL_DATABASE: 'app' + options: >- + --health-cmd "mysqladmin ping" + --health-interval 10s + --health-timeout 5s + --health-retries 5 + + steps: + - uses: actions/checkout@v1 + + - name: Update operating system software repository + run: apt-get update + + - name: Install operating system dependencies + run: apt-get install -y git zip libzip-dev + + - name: PECL zip + run: docker-php-ext-install zip + + - name: PECL xdebug + run: | + if [ $(php -r 'printf(version_compare(PHP_VERSION, "7.0.0", ">=") ? 1 : 0);') = '1' ] + then + pecl install xdebug + else + pecl install xdebug-2.5.5 + fi + docker-php-ext-enable xdebug + + - name: Install PHP pdo_mysql extension + run: docker-php-ext-install pdo_mysql + + - name: Install Composer + run: curl -sSL https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer + + - name: Install dependencies + run: composer install --prefer-dist --no-progress --no-suggest + working-directory: ./e107_tests/ + + - name: Download Git submodule dependencies + run: git submodule update --init --recursive --remote + + - name: Install the CI test configuration file + run: cp ./e107_tests/lib/ci/config.ci.yml ./e107_tests/config.yml + + - name: Download Code Climate test reporter + run: | + curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter + chmod +x ./cc-test-reporter + working-directory: ./e107_tests/vendor/bin/ + continue-on-error: true + + - name: Code Climate report before build + run: ./e107_tests/vendor/bin/cc-test-reporter before-build + continue-on-error: true + + - name: Run unit tests + run: | + if [ $(php -r 'printf(extension_loaded("xdebug") ? 1 : 0);') = '1' ] + then + php ./vendor/bin/codecept run unit --steps --debug --coverage --coverage-xml #--coverage-html + else + echo "Warning: xdebug not available; skipping coverage..." + php ./vendor/bin/codecept run unit --steps --debug + fi + working-directory: ./e107_tests/ + + - name: Send code coverage report to Code Climate + run: | + ./e107_tests/vendor/bin/cc-test-reporter format-coverage \ + --input-type clover \ + --output ./e107_tests/tests/_output/coverage/codeclimate.json \ + ./e107_tests/tests/_output/coverage.xml + ./e107_tests/vendor/bin/cc-test-reporter upload-coverage \ + --input ./e107_tests/tests/_output/coverage/codeclimate.json + continue-on-error: true + + - name: Send code coverage report to Codecov + uses: codecov/codecov-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + file: ./e107_tests/tests/_output/coverage.xml + flags: unit-tests + name: ${{ matrix.interpreter.image }}-${{ matrix.db.image }} + continue-on-error: true + + - name: Upload test output + uses: actions/upload-artifact@v1 + with: + name: tests_output + path: ./e107_tests/tests/_output/ diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..3863860f6 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "e107_tests/lib/cpaneluapi"] + path = e107_tests/lib/cpaneluapi + url = https://github.com/N1ghteyes/cpanel-UAPI-php-class.git + branch = master diff --git a/README.md b/README.md index 06e2f3859..fd2d2864d 100644 --- a/README.md +++ b/README.md @@ -1,78 +1,105 @@ -## e107 [Content Management System][1] (CMS) - v2 +[![e107 Content Management System](e107_images/logoHD.png)](https://e107.org) +================= -[![Join the chat at https://gitter.im/e107inc/e107](https://badges.gitter.im/e107inc/e107.svg)](https://gitter.im/e107inc/e107?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +[![GitHub release](https://img.shields.io/github/v/release/e107inc/e107?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAQAAAD9CzEMAAAAAmJLR0QA/4ePzL8AAAAJcEhZcwAALiMAAC4jAXilP3YAAAAHdElNRQfjDBwRCAhY3Q3XAAAAGXRFWHRDb21tZW50AENyZWF0ZWQgd2l0aCBHSU1QV4EOFwAAA8hJREFUWMOtlltMVFcUhhcDGC+YalXSpI1Kqtg0jMVLTS9p0tcahkTb+GRi65MvfRWN+tL60kuqsU+mxtLYpIQOIBYhNJZYQY2RFrVoNWICioYWOpFhBqQw8/kwnH32Ppe5Mftp5uy1/3+t/19n7SOS5eIFDtNHhAh3OUaFFHaxkX709Q/bCwlfxRDONcXOwmXvhgeYZEch4IM+8ADP5l0FVTwyIPvoIVmwKlziHKJEhI+IG17sKJQ4dWqn1kGxM7/sH3rDi4gQYnJeQhFk0B9+ropY3lVQlS57H6Gyr8JlbZ1vZCgPu/2tzaKKzEIRdIhzIGNCtTnY7cp+f1aShhLxrN7u7Kz1rmI4s92ZreV9vqaDVo6w0V3F9Xgsnd2ugewQh5do0XanOU6JGTESOh8b87M7k7WUc801Sc9QbEb11jZORbyEcmXvEIe1XPcc1s2UmZGXa8PxUd3u7SJCGX+mhV/HPbV3m085wBP1v91N0RT/V79YVwufZIC/q/Z6KBcRoVq7IzpYYp64GDIovhQaNfjPHfCvavDdrPTsuPMsNU9d2hWeVh11Q7isQqO8nCb7FcZepfaV0e6s4vf+H629/4QuzZQtBvzfXtmr/QqDQvPi5tKuR03WzrBwQpPoakplR/Ye8CIi3Wu4rQk1R0HgwpkGG/FX4W3D5KuUu+BfVFm/wYfs4k2KUv9b12pVdLBEJFn6W/1POt5uEeG4QXGRzdxxZ882OpkGIMEl3k09barQqmhjVeP37TpWE6UiQjGn1KNZOrnvtpYaJow0YtR4VNGZaBu2Y1pYbJUe4DuAqUTvOS28W4Of9Piu86LoSDYr+IV6TxRxkjB1mjg9Spwadb2P8RVfMKKq2K0o7HOdyYP0adkbjXnTM3tr1j9OtTEbVAPP8rGi+EudbWU5pd4XzojL2pAGX6294RZFUqPo9xsfzrH9iwZviTPMZscQsShmLIoLq+kBznqIox3cwj7127b2CZtckTZFwqIYWMRe52RKc5Wr7B8S9Iyw3+QEe3L9dNym+n6IrSzwiapUbTHNe7kRtCn4Kk7Sa80oLaLk5waaWc+NuchjuRFsZRAYIhj/FoArJgWB0R/CAA1UcgtoYVmuIlXTxWvs08agfeGUUG91NEd5hW/Sdk4akhVE3cOcAPXa01nWSL6LMk4b8+cPPuAdwsazc/Y4z4eiSJu0XsscaXlRzE1aH/jFMv/lS3F23tnbQj07NU6UKBEiTDDOU6ZaWCSFWwT+PzoQf8Ad7jHA4Ez0dEHhU2vm9dhBGmgc+4y3sj/1HPOcQpNXqqPqAAAAAElFTkSuQmCC)](https://github.com/e107inc/e107/releases) +[![GitHub Workflow "Unit Tests" Status](https://img.shields.io/github/workflow/status/e107inc/e107/Unit%20Tests?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAOCAQAAABnEe8CAAAAAnNCSVQICFXsRgQAAAAJcEhZcwAAA3cAAAN3Aa+SYCgAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAABG0lEQVQoFW3By0pUARgA4H8O05AQZWjkImjprr0LL7guJ3VcidAmkFZBi0AHDyNCtu4FeoF6hbQLw5CiKIX2BLWa0+jshj6P13Tq++KUfjWbDrTtWnUvrnAzjpmU2Vc14aGXdhwaizP6VNyKCFM6qirWNR2qe2ROT+Qk5qWKEeGO36peaxiWKBnx3u3IGVL3NE5Ztqei4breuOCut34ajnO2LfpoJMIDqWKEoucy2+7HX1rKMknkvPHZjF28cyMu01KWSSKn1y/8UVOIq2ypWjcaJzzRNhP/UrNn2lc9kVMwqKQU3fTLLHnlu3GJgiGfPFOIbh7rSE1b09T0xawXPrgW3ZQ1/ZAqm7Dgm5bZ+B99UhtaDmxZMRBdjgBnPOGTaoNcdgAAAABJRU5ErkJggg==)](https://github.com/e107inc/e107/actions) +[![Code coverage](https://img.shields.io/codeclimate/coverage/e107inc/e107?logo=code-climate)](https://codeclimate.com/github/e107inc/e107/test_coverage) +[![Join the chat at https://gitter.im/e107inc/e107](https://img.shields.io/gitter/room/e107inc/e107?logo=gitter&color=ED1965)](https://gitter.im/e107inc/e107?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -### What is e107? -e107 is a free (open-source) content management system which allows you to easily manage and publish your content online. Developers can save time in building websites and powerful online applications. Users can avoid programming completely! Blogs, Websites, Intranets - e107 does it all. +**[e107][1]** is a free and open-source content management system (CMS) which allows you to manage and publish your content online with ease. Developers can save time in building websites and powerful online applications. Users can avoid programming completely! Blogs, websites, intranets – e107 does it all. -### Requirements +## Table of Contents - #### Minimum + * [e107 Content Management System](README.md) + * [Table of Contents](#table-of-contents) + * [Requirements](#requirements) + * [Minimum](#minimum) + * [Recommended](#recommended) + * [Installation](#installation) + * [Standard Installation](#standard-installation) + * [Git Installation (developer version)](#git-installation-developer-version) + * [Reporting Bugs](#reporting-bugs) + * [Contributing to Development](#contributing-to-development) + * [Donations](#donations) + * [Support](#support) + * [License](#license) - * A Web-Server (Apache or Microsoft IIS) running PHP v5.6 or higher and MySQL 4.x or 5.x. - * FTP access to your webserver and an FTP program such as Filezilla - * Username/Password to your MySQL Database +## Requirements - #### Recommended + ### Minimum - * A Linux based Webserver running Apache 2.x, PHP 7.x and MySQL 5.x (LAMP) - * A registered Domain Name - * Access to a Server Control Panel (such as cPanel) + * A web server (Apache or Microsoft IIS) running PHP 5.6 or newer + * MySQL 4.x or newer, or MariaDB + * FTP access to your web server and an FTP client (such as FileZilla) + * Username and password to your MySQL database + + ### Recommended + + * Apache 2.2 or newer on Linux with PHP 7.0 or newer + * MySQL 5.x or newer, or MariaDB + * A registered domain name + * Access to a server control panel (such as cPanel) -### Standard Installation +## Installation -* Unzip/Extract the compressed file onto your server. -* Point your browser to the *http://localhost/YOUR FOLDER/install.php* (depending on your webserver setup) -* Follow the installation wizard +### Standard Installation + +1. [Download e107](https://e107.org/download). +2. Unzip/Extract the compressed file onto your desired web root. + This is often a folder called `public_html`. +3. Point your browser to the `install.php` script (e.g., `https://example.com/subfolder/install.php`) +4. Follow the installation wizard in your browser. ### Git Installation (developer version) -* Run the following commands ( where 'youraccount' is the folder above your public_html folder and xxx:xxx is the default owner for your files - this can be found using FileZilla and FTP) -``` - cd youraccount - git clone https://github.com/e107inc/e107.git public_html - chown -R xxx:xxx public_html -``` -* Point your browser to the *http://localhost/YOUR FOLDER/install.php* (depending on your webserver setup) -* Follow the installation wizard +1. Run the following commands, replacing '~' with your document root (the parent of `public_html`) and xxx:xxx is the intended owner of your e107 files. + ``` + cd ~ + git clone https://github.com/e107inc/e107.git public_html + chown -R xxx:xxx public_html + ``` +2. Point your browser to the `install.php` script (e.g., `https://example.com/subfolder/install.php`) +3. Follow the installation wizard in your browser. -### Reporting Bugs +## Reporting Bugs -Be sure you are using the most recent version prior to reporting an issue. -You may report any bugs or feature requests on GitHub (https://github.com/e107inc/e107/issues) +Be sure you are using the most recent version of e107 prior to reporting an issue. +You may report any bugs and make feature requests [e107's GitHub Issues page](https://github.com/e107inc/e107/issues). -### Pull-Requests +## Contributing to Development -* Please submit 1 pull-request for each Github #issue you may work on. -* Make sure that only the lines you have changed actually show up in a file-comparison (diff) ie. some text-editors alter every line so this should be avoided. -* Make sure you are using rebase on your local .git/config file. -ie. [branch "master"] - rebase = true` -* Here's a small tutorial to give you a start on [CONTRIBUTING](CONTRIBUTING.md) +* Please submit 1 pull request for each GitHub issue you work on. +* Make sure that only the lines you have changed actually show up in a file-comparison (diff). + Some text editors alter every line; this should be avoided. +* It is recommended to configure `git pull` to rebase on the master branch by default to avoid unnecessary merge commits. You can set this up in your copy of the repo's `.git/config` file like so: + ``` + [branch "master"] + rebase = true + ``` +* See the [CONTRIBUTING](.github/CONTRIBUTING.md) document for a tutorial on getting started. -### Donations -If you like e107 and wish to help it to improve - please consider making a small donation. +## Donations +If you like e107 and wish to help it to improve, please consider making a small donation. * Bitcoin address: 18C7W2YvkzSjvPoW1y46PjkTdCr9UzC3F7 -* Paypal: donate (at) e107.org +* PayPal: donate (at) e107.org -### Support -* http://e107help.org +## Support +* https://e107help.org -### License +## License -* e107 is released under the terms and conditions of the GNU General Public License (http://www.gnu.org/licenses/gpl.txt) +e107 is released under the terms and conditions of the GNU General Public License (http://www.gnu.org/licenses/gpl.txt) - [1]: http://e107.org - [2]: http://www.e107.org + [1]: https://e107.org \ No newline at end of file diff --git a/e107_handlers/e_db_interface.php b/e107_handlers/e_db_interface.php index cef4b249f..01ebd58ec 100644 --- a/e107_handlers/e_db_interface.php +++ b/e107_handlers/e_db_interface.php @@ -352,6 +352,11 @@ function backup($table='*', $file='', $options=null); + /** + * TODO: Document this method + */ + public function resetTableList(); + /** * Return a filtered list of DB tables. * @@ -386,6 +391,18 @@ + /** + * XXX: e_db_pdo and e_db_mysql have differing implementations of this method. + * @param string $oldtable + * @param string $newtable + * @param bool $drop + * @param bool $data + * @return bool|int|PDOStatement|resource + */ + public function copyTable($oldtable, $newtable, $drop = false, $data = false); + + + /** * Drop/delete table and all it's data * @param string $table name without the prefix diff --git a/e107_handlers/e_db_legacy_trait.php b/e107_handlers/e_db_legacy_trait.php index f0634c6c0..aa599cec7 100644 --- a/e107_handlers/e_db_legacy_trait.php +++ b/e107_handlers/e_db_legacy_trait.php @@ -38,11 +38,6 @@ public function db_Fetch($type = null) { - if (defined('e_LEGACY_MODE') && !is_int($type)) - { - return $this->fetch('both'); - } - return $this->fetch($type); } diff --git a/e107_handlers/e_db_pdo_class.php b/e107_handlers/e_db_pdo_class.php index 38fda0c5d..a24072773 100644 --- a/e107_handlers/e_db_pdo_class.php +++ b/e107_handlers/e_db_pdo_class.php @@ -2295,44 +2295,56 @@ class e_db_pdo implements e_db return false; } - if($fields === '*') - { - $fields = $this->db_FieldList($table); - $unique = $this->_getUnique($table); + for ($retries = 0; $retries < 3; $retries ++) { + list($fieldList, $fieldList2) = $this->generateCopyRowFieldLists($table, $fields); - $flds = array(); - // randomize fields that must be unique. - foreach($fields as $fld) - { - if(isset($unique[$fld])) - { - $flds[] = $unique[$fld] === 'PRIMARY' ? 0 : "'rand-".rand(0,999)."'"; // keep it short. - continue; - } - - $flds[] = $fld; + if (empty($fieldList)) { + $this->mysqlLastErrText = "copyRow \$fields list was empty"; + return false; } - $fieldList = implode(",", $fields); - $fieldList2 = implode(",", $flds); + $beforeLastInsertId = $this->lastInsertId(); + $query = "INSERT INTO " . $this->mySQLPrefix . $table . + "(" . $fieldList . ") SELECT " . + $fieldList2 . + " FROM " . $this->mySQLPrefix . $table . + " WHERE " . $args; + $id = $this->gen($query); + $lastInsertId = $this->lastInsertId(); + if ($beforeLastInsertId !== $lastInsertId) break; } - else - { - $fieldList = $fields; - $fieldList2 = $fieldList; - } - - if(empty($fieldList)) - { - $this->mysqlLastErrText = "copyRow \$fields list was empty"; - return false; - } - - $id = $this->gen("INSERT INTO ".$this->mySQLPrefix.$table."(".$fieldList.") SELECT ".$fieldList2." FROM ".$this->mySQLPrefix.$table." WHERE ".$args); - $lastInsertId = $this->lastInsertId(); return ($id && $lastInsertId) ? $lastInsertId : false; + } + /** + * Determine before and after fields for a table + * @param $table string Table name, without the prefix + * @param $fields string Field list in query format (i.e. separated by commas) or all of them ("*") + * @return array Index 0 is before and index 1 is after + */ + private function generateCopyRowFieldLists($table, $fields) + { + if ($fields !== '*') return array($fields, $fields); + + $fieldList = $this->db_FieldList($table); + $unique = $this->_getUnique($table); + + $flds = array(); + // randomize fields that must be unique. + foreach ($fieldList as $fld) { + if (isset($unique[$fld])) { + $flds[] = $unique[$fld] === 'PRIMARY' ? 0 : + "'rand-" . e107::getUserSession()->generateRandomString('***********') . "'"; + continue; + } + + $flds[] = $fld; + } + + $fieldList = implode(",", $fieldList); + $fieldList2 = implode(",", $flds); + return array($fieldList, $fieldList2); } @@ -2796,7 +2808,7 @@ class e_db_pdo implements e_db { // debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS,2); $this->connect($this->mySQLserver, $this->mySQLuser, $this->mySQLpassword); - $this->database($this->mySQLdefaultdb); + $this->database($this->mySQLdefaultdb, $this->mySQLPrefix); //$this->mySQLaccess = e107::getDb()->get_mySQLaccess(); } } diff --git a/e107_handlers/e_parse_class.php b/e107_handlers/e_parse_class.php index 0f1cdcbff..dd8a93748 100644 --- a/e107_handlers/e_parse_class.php +++ b/e107_handlers/e_parse_class.php @@ -3830,7 +3830,7 @@ class e_parser */ function init() { - $this->domObj = new DOMDocument(); + $this->domObj = new DOMDocument('1.0', 'utf-8'); if(defined('FONTAWESOME')) { @@ -5265,12 +5265,14 @@ return; { if(empty($html)){ return ''; } - $html = str_replace(' ', '@nbsp;', $html); // prevent replacement of   with spaces. - + $html = str_replace(' ', '{E_PARSER_CLEAN_HTML_NON_BREAKING_SPACE}', $html); // prevent replacement of   with spaces. + // Workaround for https://bugs.php.net/bug.php?id=76285 + // Part 1 of 2 + $html = str_replace("\n", "{E_PARSER_CLEAN_HTML_LINE_BREAK}", $html); if(strpos($html, "'; + $html = ''.$html.''; } else // Full HTML page. { @@ -5297,24 +5299,16 @@ return; // Set it up for processing. - // libxml_use_internal_errors(true); // hides errors. $doc = $this->domObj; libxml_use_internal_errors(true); - // @$doc->loadHTML($html); if(function_exists('mb_convert_encoding')) { $html = mb_convert_encoding($html, 'HTML-ENTITIES', "UTF-8"); } - @$doc->loadHTML($html); + @$doc->loadHTML($html, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); - // $doc->encoding = 'UTF-8'; - - // $doc->resolveExternals = true; - - // $tmp = $doc->getElementsByTagName('*'); - - $this->nodesToConvert = array(); // required. + $this->nodesToConvert = array(); // required. $this->nodesToDelete = array(); // required. $this->removedList = array(); @@ -5483,20 +5477,19 @@ return; } */ - $cleaned = $doc->saveHTML($doc->documentElement); // $doc->documentElement fixes utf-8/entities issue. @see http://stackoverflow.com/questions/8218230/php-domdocument-loadhtml-not-encoding-utf-8-correctly - - $cleaned = str_replace('@nbsp;', ' ', $cleaned); // prevent replacement of   with spaces. - convert back. + $cleaned = $doc->saveHTML($doc->documentElement); // $doc->documentElement fixes utf-8/entities issue. @see http://stackoverflow.com/questions/8218230/php-domdocument-loadhtml-not-encoding-utf-8-correctly + // Workaround for https://bugs.php.net/bug.php?id=76285 + // Part 2 of 2 + $cleaned = str_replace("\n", "", $cleaned); + $cleaned = str_replace("{E_PARSER_CLEAN_HTML_LINE_BREAK}", "\n", $cleaned); + $cleaned = str_replace('{E_PARSER_CLEAN_HTML_NON_BREAKING_SPACE}', ' ', $cleaned); // prevent replacement of   with spaces. - convert back. $cleaned = str_replace('{{{','{', $cleaned); // convert shortcode temporary triple-curly braces back to entities. - $cleaned = str_replace('}}}','}', $cleaned); // convert shortcode temporary triple-curly braces back to entities. + $cleaned = str_replace('}}}','}', $cleaned); // convert shortcode temporary triple-curly braces back to entities. - $cleaned = str_replace(array('','','','','','',''),'',$cleaned); // filter out tags. + $cleaned = str_replace(array('',''),'', $cleaned); // filter out tags. - - - // $cleaned = html_entity_decode($cleaned, ENT_QUOTES, 'UTF-8'); - return trim($cleaned); } diff --git a/e107_handlers/file_class.php b/e107_handlers/file_class.php index b9c889832..a4ac7e58d 100644 --- a/e107_handlers/file_class.php +++ b/e107_handlers/file_class.php @@ -1664,10 +1664,16 @@ class e_file } - - - - public function unzipGithubArchive($url='core') + /** + * Download and extract a zipped copy of e107 + * @param string $url "core" to download the e107 core from Git master or + * a custom download URL + * @param string $destination_path The e107 root where the downloaded archive should be extracted, + * with a directory separator at the end + * @return array|bool FALSE on failure; + * An array of successful and failed path extractions + */ + public function unzipGithubArchive($url='core', $destination_path = e_BASE) { switch($url) @@ -1675,8 +1681,21 @@ class e_file case "core": $localfile = 'e107-master.zip'; $remotefile = 'https://codeload.github.com/e107inc/e107/zip/master'; - $excludes = array('e107-master/install.php','e107-master/favicon.ico'); - $excludeMatch = false; + $excludes = array( + 'e107-master/.codeclimate.yml', + 'e107-master/.editorconfig', + 'e107-master/.gitignore', + 'e107-master/.gitmodules', + 'e107-master/CONTRIBUTING.md', # moved to ./.github/CONTRIBUTING.md + 'e107-master/LICENSE', + 'e107-master/README.md', + 'e107-master/install.php', + 'e107-master/favicon.ico', + ); + $excludeMatch = array( + '/.github/', + '/e107_tests/', + ); break; // language. @@ -1712,18 +1731,18 @@ class e_file $excludes[] = $zipBase; $newFolders = array( - $zipBase.'/e107_admin/' => e_BASE.e107::getFolder('ADMIN'), - $zipBase.'/e107_core/' => e_BASE.e107::getFolder('CORE'), - $zipBase.'/e107_docs/' => e_BASE.e107::getFolder('DOCS'), - $zipBase.'/e107_handlers/' => e_BASE.e107::getFolder('HANDLERS'), - $zipBase.'/e107_images/' => e_BASE.e107::getFolder('IMAGES'), - $zipBase.'/e107_languages/' => e_BASE.e107::getFolder('LANGUAGES'), - $zipBase.'/e107_media/' => e_BASE.e107::getFolder('MEDIA'), - $zipBase.'/e107_plugins/' => e_BASE.e107::getFolder('PLUGINS'), - $zipBase.'/e107_system/' => e_BASE.e107::getFolder('SYSTEM'), - $zipBase.'/e107_themes/' => e_BASE.e107::getFolder('THEMES'), - $zipBase.'/e107_web/' => e_BASE.e107::getFolder('WEB'), - $zipBase.'/' => e_BASE + $zipBase.'/e107_admin/' => $destination_path.e107::getFolder('ADMIN'), + $zipBase.'/e107_core/' => $destination_path.e107::getFolder('CORE'), + $zipBase.'/e107_docs/' => $destination_path.e107::getFolder('DOCS'), + $zipBase.'/e107_handlers/' => $destination_path.e107::getFolder('HANDLERS'), + $zipBase.'/e107_images/' => $destination_path.e107::getFolder('IMAGES'), + $zipBase.'/e107_languages/' => $destination_path.e107::getFolder('LANGUAGES'), + $zipBase.'/e107_media/' => $destination_path.e107::getFolder('MEDIA'), + $zipBase.'/e107_plugins/' => $destination_path.e107::getFolder('PLUGINS'), + $zipBase.'/e107_system/' => $destination_path.e107::getFolder('SYSTEM'), + $zipBase.'/e107_themes/' => $destination_path.e107::getFolder('THEMES'), + $zipBase.'/e107_web/' => $destination_path.e107::getFolder('WEB'), + $zipBase.'/' => $destination_path ); $srch = array_keys($newFolders); @@ -1734,35 +1753,28 @@ class e_file $error = array(); $success = array(); - // $skipped = array(); + $skipped = array(); foreach($unarc as $k=>$v) { - if($this->matchFound($v['stored_filename'],$excludeMatch)) - { - continue; - } - - if(in_array($v['stored_filename'],$excludes)) + if($this->matchFound($v['stored_filename'],$excludeMatch) || + in_array($v['stored_filename'],$excludes)) { + $skipped[] = $v['stored_filename']; continue; } $oldPath = $v['filename']; $newPath = str_replace($srch,$repl, $v['stored_filename']); -/* - $success[] = $newPath; - continue;*/ - if($v['folder'] ==1 && is_dir($newPath)) { // $skipped[] = $newPath. " (already exists)"; continue; } - + mkdir(dirname($newPath), 0755, true); if(!rename($oldPath,$newPath)) { $error[] = $newPath; @@ -1774,9 +1786,7 @@ class e_file } - - return array('success'=>$success, 'error'=>$error); - + return array('success'=>$success, 'error'=>$error, 'skipped'=>$skipped); } diff --git a/e107_handlers/mysql_class.php b/e107_handlers/mysql_class.php index 527e300fb..5de917a5b 100644 --- a/e107_handlers/mysql_class.php +++ b/e107_handlers/mysql_class.php @@ -65,7 +65,7 @@ $db_ConnectionID = NULL; // Stores ID for the first DB connection used - which s -class e_db_mysql +class e_db_mysql implements e_db { // TODO switch to protected vars where needed public $mySQLserver; @@ -488,7 +488,7 @@ class e_db_mysql if ($debug == 'now') { - echo "
** $query

\n"; + $this->dbg->log($query); } if ($debug !== FALSE || strstr($_SERVER['QUERY_STRING'], 'showsql')) { @@ -2607,6 +2607,13 @@ class e_db_mysql $this->mySQLtableList = array(); $this->mySQLtableListLanguage = array(); } + /** + * @inheritDoc + */ + public function resetTableList() + { + return $this->db_ResetTableList(); + } /** * Legacy Alias of tables @@ -2751,6 +2758,13 @@ class e_db_mysql return $result; } + /** + * @inheritDoc + */ + public function copyTable($oldtable, $newtable, $drop = false, $data = false) { + return $this->db_CopyTable($oldtable, $newtable, $drop, $data); + } + @@ -3243,6 +3257,30 @@ class e_db_mysql return $this->mySQLaccess; } + /** + * @inheritDoc + */ + public function setLanguage($lang) + { + $this->mySQLlanguage = $lang; + } + + /** + * @inheritDoc + */ + public function getLanguage() + { + return $this->mySQLlanguage; + } + + /** + * @inheritDoc + */ + public function dropTable($table) + { + $name = $this->mySQLPrefix.strtolower($table); + return $this->gen("DROP TABLE IF EXISTS ".$name); + } } /** diff --git a/e107_tests/.gitignore b/e107_tests/.gitignore new file mode 100644 index 000000000..f6cfde8cc --- /dev/null +++ b/e107_tests/.gitignore @@ -0,0 +1,13 @@ +/config.yml +/config.local.yml +/tests/_output/* +/tests/_support/_generated/* +composer.phar +composer.lock +/vendor/**/* + +error_log + +*.swp +*.swo +.idea diff --git a/e107_tests/.htaccess b/e107_tests/.htaccess new file mode 100644 index 000000000..c8ee4c577 --- /dev/null +++ b/e107_tests/.htaccess @@ -0,0 +1,2 @@ +# Prevent anyone from browsing this folder on Apache HTTP Server +Deny from all diff --git a/e107_tests/README.md b/e107_tests/README.md new file mode 100644 index 000000000..2060e4cf0 --- /dev/null +++ b/e107_tests/README.md @@ -0,0 +1,331 @@ +e107 Test Suites +=== + +## Quickstart + +1. Check out this repository: + ```sh + # SSH option + git clone git@github.com:e107inc/e107.git + + # HTTPS option + git clone https://github.com/e107inc/e107.git + ``` +2. Change your current working directory into your copy of the tests: + ```sh + cd e107/e107_tests + ``` +3. Configure the testing environment by copying [`config.sample.yml`](config.sample.yml) into `config.yml` at the root level of this repository and then editing `config.yml`. The `db` section needs to be configured for all tests while acceptance tests can be configured with one of the following deployment options: + + * [**Local**](#local) + + *Use if:* You develop the app locally and have a LAMP/WAMP stack that is configured to serve the app at a local path + + * [**SFTP**](#sftp) + + *Use if:* You regularly upload the app over SFTP (perhaps in some setup with Vagrant) and have a remote LAMP stack that serves the app + + * [**cPanel**](#cpanel) + + *Use if:* You have a cPanel account whose main domain is reachable and want to run tests without a staging environment + + * [**Manual**](#manual) + + *Use if:* You are not able to set up any of the other options + +4. On PHP 5.6 or newer, install dependencies with [Composer](https://getcomposer.org/): + ```sh + php -d allow_url_fopen=On $(which composer) update + ``` +5. Update all submodules: + ```sh + git submodule update --init --recursive --remote + ``` +6. Run tests: + + * **All tests:** + ```sh + ./vendor/bin/codecept run + ``` + * **All tests and details:** + ```sh + php -d allow_url_fopen=On -d display_errors=On ./vendor/bin/codecept run --step --debug + ``` + * **All tests with code coverage report:** + ```sh + /opt/cpanel/ea-php72/root/usr/bin/php -d zend_extension=/opt/alt/php72/usr/lib64/php/modules/xdebug.so -d allow_url_fopen=On ./vendor/bin/codecept run --coverage --coverage-xml --coverage-html + ``` + > **Note:** This command is specific to cPanel EasyApache PHP 7.2 and CloudLinux PHP Selector. See the "Code Coverage" section below for details. + * **Unit tests:** + ```sh + ./vendor/bin/codecept run unit + ``` + * **Functional tests:** + ```sh + ./vendor/bin/codecept run functional + ``` + * **Acceptance tests:** + ```sh + ./vendor/bin/codecept run acceptance + ``` + +## Deployment + +With varying levels of configuration, this test harness can run reproducible tests on different environments. + +The default configuration is in [`config.sample.yml`](config.sample.yml). Each configuration item can be overridden in a non-version-controlled `config.yml` that you create or copy from [`config.sample.yml`](config.sample.yml). (It is optionally possible to override both configuration files with a `config.local.yml`.) + +In the config file, there are some base settings: + +* `app_path` – The path, relative or absolute, to the app intended to be tested. The deployers use the app at this path to set up the tests. +* `deployer` – Which deployer is to be used to set up tests. See the sections below for configuration instructions for the respective deployers. + +Each deployer needs one or more of the following sections to be configured: + +* `hosting` – The credentials to log in to an all-in-one hosting control panel +* `url` – The URL that acceptance tests will access +* `db` – Database credentials and populator settings +* `fs` – File transfer credentials if the app is hosted at a remote location + +Details on how to configure these sections can be found in [`config.sample.yml`](config.sample.yml) or further down this README. + +Here is a table of which sections need to be configured for which deployers: + +| Deployer (`deployer`) | Hosting platform (`hosting`) required? | URL (`url`) required? | Database (`db`) required? | Files (`fs`) required? | +| --- |:---:|:---:|:---:|:---:| +| Local (`local`) | no | yes | yes | no | +| SFTP (`sftp`) | no | yes | yes | yes | +| cPanel (`cpanel`) | yes | no | no | no | +| Manual (`none`) | no | no | yes | no | + +### Local + +#### Requirements + +* **Local testing environment** – The app's files must be served from the same system as this test harness. +* **Local web server** – A web server with PHP must serve the app from the same local path as the app's files. +* **MySQL/MariaDB database** – The web server and test harness must be able to access a MySQL or MariaDB database, not necessarily a local one. + +#### Configuration + +To set up locally deployed tests, copy the file called [`config.sample.yml`](config.sample.yml) in the root folder of this repository to a new file called `config.yml` (or create a new file called `config.yml`), open `config.yml`, and input the following configuration information: + +```yaml +# Path (absolute or relative) to the app intended to be tested +# Absolute path begins with "/"; relative path does not begin with "/" +app_path: '../' + +# Which deployer to use to set up tests +deployer: 'local' + +# URL (with trailing slash) at which the app can be reached for acceptance tests +url: 'http://set-this-to-your-acceptance-test-url.local/' + +# Only MySQL/MariaDB is supported +db: + + # Hostname or IP address; use 'localhost' for a local server + host: 'set-this-to-your-test-database-hostname.local' + + # Port number of the server + port: '3306' + + # Database name; must exist already + dbname: 'e107' + + # Username; must exist already + user: 'root' + + # Password; set to blank string for no password + password: '' +``` + +### SFTP + +#### Requirements + +* **Remote SSH server** – This is where the app's files would be sent. The SSH account needs shell access and the `rsync` command. +* **`rsync`** – Both the client and server need the `rsync` command. +* **`sshpass`** – The client needs the `sshpass` command only if password authentication is being used (the `fs.password` field in `config.yml`). +* **Private key file to authenticate** – Only needed if the SSH account is authenticated by private key (`fs.privkey_path` in `config.yml` is set to the path of the private key). `fs.privkey_path` can be left blank if the SSH client configuration already has an identity file set for the remote SSH account. +* **Web server** – A web server with PHP must serve the app from the uploaded destination. +* **MySQL/MariaDB database** – The web server and the test harness must be able to access a MySQL or MariaDB database. + +#### Configuration + +To set up SFTP-deployed tests, copy the file called [`config.sample.yml`](config.sample.yml) in the root folder of this repository to a new file called `config.yml` (or create a new file called `config.yml`), open `config.yml`, and input the following configuration information: + +```yaml +# Path (absolute or relative) to the app intended to be tested +# Absolute path begins with "/"; relative path does not begin with "/" +app_path: '../' + +# Which deployer to use to set up tests +deployer: 'sftp' + +# URL (with trailing slash) at which the app can be reached for acceptance tests +url: 'http://set-this-to-your-acceptance-test-url.local/' + +# Only MySQL/MariaDB is supported +db: + + # Hostname or IP address; use 'localhost' for a local server + host: 'set-this-to-your-test-database-hostname.local' + + # Port number of the server + port: '3306' + + # Database name; must exist already + dbname: 'e107' + + # Username; must exist already + user: 'root' + + # Password; set to blank string for no password + password: '' + +# Configure this section for deployers that need file upload configuration +fs: + + # Hostname or IP address to the remote destination + host: '' + + # Port number of the file transfer server + port: '22' + + # Username used for the file transfer + user: '' + + # Path to the private key of the user. Takes precedence over "fs.password" + privkey_path: '' + + # Password of the file transfer user. Ignored if "fs.privkey_path" is specified + password: '' + + # Absolute path to where the remote web server serves "url" + path: '' +``` + +### cPanel + +#### Requirements + +* **cPanel user account** – It is recommended to use a cPanel account dedicated to testing for isolation, but the test suite runs on most typical accounts and tries not to interfere with existing data. +* **Resolvable main domain** – The cPanel account's main domain must be resolvable to the machine running the test suite. This usually means that the domain must resolve on the Internet. +* **MariaDB database quota** – Each run of the test suite creates one new MariaDB database and deletes it after executing the suite. +* **Enough free disk space** – The test suite archives a copy of the app and uploads it to the cPanel account for cPanel to extract. The app, its archive form, and test resources may grow in the future, so the more free disk space, the better. +* **Enough free inodes** – The app and test resources will take up at least a few thousand inodes and may need more in the future, so the more free inodes, the better. + +#### Limitations + +* **PHP version cannot be set** – The test suite currently does not have the ability to set custom versions of PHP for the target app directory. If the cPanel host supports multiple versions of PHP (e.g. EasyApache 4 MultiPHP, CloudLinux alt-php), they will have to be configured manually to test different PHP versions. +* **MariaDB username character limit** – cPanel MariaDB usernames are limited to 47 characters in length, and test runs are expected to use 18 plus the length of your cPanel username plus 1. +* **MariaDB database character limit** – cPanel MariaDB databases are limited to 64 characters in length, and test runs are expected to use 18 plus the length of your cPanel username plus 4. (cPanel double-counts underscores (`_`) and the deployer uses 2 underscores, so the visible character count is 2 less than what cPanel counts.) +* **MariaDB remote access host `%` is preserved on crash** – The deployer adds a cPanel Remote MySQL® access host, `%`, but will forget to remove it if the test run is uncleanly aborted. Subsequent runs will not touch the `%` remote access host because the deployer would not be sure if it added `%`. +* **cPanel max POST size** – The cPanel PHP maximum POST request size can be as low as 55MiB on some hosts. If the app's archive form exceeds this size, the upload will fail. This limit can be adjusted in the hosting provider's server-wide WHM settings. + +#### Configuration + +To set up the deployment of tests to a cPanel account, copy the file called [`config.sample.yml`](config.sample.yml) in the root folder of this repository to a new file called `config.yml` (or create a new file called `config.yml`), open `config.yml`, and input the following configuration information: + +```yaml +# Path (absolute or relative) to the app intended to be tested +# Absolute path begins with "/"; relative path does not begin with "/" +app_path: '../' + +# Which deployer to use to set up tests +deployer: 'cpanel' + +# Configure this section for fully automated test deployments to a hosting control panel +hosting: + + # Control panel domain without the port number + hostname: '' + + # Control panel account username + username: '' + + # Control panel account password + password: '' +``` + +### Manual + +#### Requirements + +* **MySQL/MariaDB database** – The test harness must be able to access a MySQL or MariaDB database because the database currently cannot be abstracted away in test code. +* **Web server** – To run acceptance tests, a web server with PHP is needed. + +#### Limitations + +* **Acceptance tests cannot be deployed automatically** – In this manual testing mode, the app deployed for acceptance tests must be reset manually before each test. Running the entire suite at once is likely to cause failures that would not occur with an automated test deployer. + +#### Configuration + +To turn off automated acceptance test deployments, copy the file called [`config.sample.yml`](config.sample.yml) in the root folder of this repository to a new file called `config.yml` (or create a new file called `config.yml`), open `config.yml`, and input the following configuration information: + +```yaml +# Path (absolute or relative) to the app intended to be tested +# Absolute path begins with "/"; relative path does not begin with "/" +app_path: '../' + +# Which deployer to use to set up tests +deployer: 'none' + +# URL (with trailing slash) at which the app can be reached for acceptance tests +url: 'http://set-this-to-your-acceptance-test-url.local/' + +# Only MySQL/MariaDB is supported +db: + + # Hostname or IP address; use 'localhost' for a local server + host: 'set-this-to-your-test-database-hostname.local' + + # Port number of the server + port: '3306' + + # Database name; must exist already + dbname: 'e107' + + # Username; must exist already + user: 'root' + + # Password; set to blank string for no password + password: '' + + # If set to true, the database populator will populate the database with the dump specified in the "dump_path" key + # If set to false, the test database needs to be set up separately + # Affects all tests and modes of deployment + populate: true + + # Path (absolute or relative) to the database dump of a testable installation of the app + # Absolute path begins with "/"; relative path does not begin with "/" + dump_path: 'tests/_data/e107_v2.1.9.sample.sql' +``` + +## Code Coverage + +You can generate code coverage reports for all PHP files in the app. Code coverage is enabled for local tests (unit and functional tests) but disabled for remote tests (acceptance tests) by default. + +The reports may take minutes to be generated. + +### Requirements + +* **[Xdebug](https://xdebug.org/)** – You'll have to figure out the best way to [install Xdebug](https://xdebug.org/docs/install) in your environment. + +### Sample Commands + +These commands run all tests and generate a code coverage report in HTML format and [Clover](https://bitbucket.org/atlassian/clover) XML format: + +* Using [cPanel EasyApache 4](https://documentation.cpanel.net/display/EA4/PHP+Home) with PHP 7.2 and Xdebug from [CloudLinux PHP Selector](https://docs.cloudlinux.com/php_selector.html): + ```sh + /opt/cpanel/ea-php72/root/usr/bin/php -d zend_extension=/opt/alt/php72/usr/lib64/php/modules/xdebug.so -d allow_url_fopen=On ./vendor/bin/codecept run --coverage --coverage-xml --coverage-html + ``` +* Using the Xdebug module that you installed with PECL: + ```sh + php zend_extension=/usr/local/php/modules/xdebug.so -d allow_url_fopen=On ./vendor/bin/codecept run --coverage --coverage-xml --coverage-html + ``` + +### Output + +The generated coverage reports are stored in `./tests/_output/` relative to the tests root folder. \ No newline at end of file diff --git a/e107_tests/codeception.yml b/e107_tests/codeception.yml new file mode 100644 index 000000000..9331cb6cd --- /dev/null +++ b/e107_tests/codeception.yml @@ -0,0 +1,32 @@ +paths: + tests: tests + output: tests/_output + data: tests/_data + support: tests/_support + envs: tests/_envs +actor_suffix: Tester +bootstrap: _bootstrap.php +coverage: + enabled: true + include: + - '%app_path%/*.php' + - '%app_path%/e107_admin/**/*.php' + - '%app_path%/e107_core/**/*.php' + - '%app_path%/e107_handlers/**/*.php' + - '%app_path%/e107_images/**/*.php' + - '%app_path%/e107_plugins/**/*.php' + - '%app_path%/e107_themes/**/*.php' + - '%app_path%/e107_web/**/*.php' +params: + - lib/config.php +extensions: + enabled: + - Codeception\Extension\RunFailed +modules: + enabled: + - \Helper\DelayedDb: + dsn: 'mysql:host=%db.host%;port=%db.port%;dbname=%db.dbname%' + user: '%db.user%' + password: '%db.password%' + populate: '%db.populate%' + dump: '%db.dump_path%' diff --git a/e107_tests/composer.json b/e107_tests/composer.json new file mode 100644 index 000000000..e5f767b04 --- /dev/null +++ b/e107_tests/composer.json @@ -0,0 +1,12 @@ +{ + "name": "e107inc/e107-test", + "description": "Test harness for e107", + "license": "GPL-3.0-or-later", + "require-dev": { + "twig/twig": ">=1.28", + "codeception/codeception": "^4.0", + "codeception/module-asserts": "^1.1", + "codeception/module-db": "^1.0", + "codeception/module-phpbrowser": "^1.0" + } +} diff --git a/e107_tests/config.sample.yml b/e107_tests/config.sample.yml new file mode 100644 index 000000000..6e817d19a --- /dev/null +++ b/e107_tests/config.sample.yml @@ -0,0 +1,83 @@ +--- + +# Path (absolute or relative) to the app intended to be tested +# Absolute path begins with "/"; relative path does not begin with "/" +app_path: '../' + +# Which deployer to use to set up tests. Options: +# +# 'none' +# Dummy deployer that does nothing. Tests that depend on a deployer will fail. +# 'local' +# Use this if the acceptance test web server directly serves files from "app_path". +# Configure the "url" and "db" sections. +# 'sftp' +# Deploys the files in "app_path" to an SFTP account. +# Configure the "url", "db", and "fs" sections. +# 'cpanel' +# Deploys the files in "app_path" to a cPanel account's main domain. +# Configure the "hosting" section. +deployer: 'local' + +# Configure this section for fully automated test deployments to a hosting control panel +hosting: + + # Control panel domain without the port number + hostname: '' + + # Control panel account username + username: '' + + # Control panel account password + password: '' + +# URL (with trailing slash) at which the app can be reached for acceptance tests +url: 'http://set-this-to-your-acceptance-test-url.local/' + +# Only MySQL/MariaDB is supported +db: + + # Hostname or IP address; use 'localhost' for a local server + host: 'set-this-to-your-test-database-hostname.local' + + # Port number of the server + port: '3306' + + # Database name; must exist already + dbname: 'e107' + + # Username; must exist already + user: 'root' + + # Password; set to blank string for no password + password: '' + + # If set to true, the database populator will populate the database with the dump specified in the "dump_path" key + # If set to false, the test database needs to be set up separately + # Affects all tests and modes of deployment + populate: true + + # Path (absolute or relative) to the database dump of a testable installation of the app + # Absolute path begins with "/"; relative path does not begin with "/" + dump_path: 'tests/_data/e107_v2.1.9.sample.sql' + +# Configure this section for deployers that need file upload configuration +fs: + + # Hostname or IP address to the remote destination + host: '' + + # Port number of the file transfer server + port: '22' + + # Username used for the file transfer + user: '' + + # Path to the private key of the user. Takes precedence over "fs.password" + privkey_path: '' + + # Password of the file transfer user. Ignored if "fs.privkey_path" is specified + password: '' + + # Absolute path to where the remote web server serves "url" + path: '' diff --git a/e107_tests/index.html b/e107_tests/index.html new file mode 100644 index 000000000..e69de29bb diff --git a/e107_tests/lib/PriorityCallbacks.php b/e107_tests/lib/PriorityCallbacks.php new file mode 100644 index 000000000..a66c78e3b --- /dev/null +++ b/e107_tests/lib/PriorityCallbacks.php @@ -0,0 +1,46 @@ +shutdown_functions as $shutdown_function) + { + call_user_func($shutdown_function); + } + } + + public function register_shutdown_function($callable) + { + $this->shutdown_functions[] = $callable; + } + + private function __clone() {} + + private function __sleep() {} + + private function __wakeup() {} +} + +PriorityCallbacks::instance(); \ No newline at end of file diff --git a/e107_tests/lib/ci/config.ci.yml b/e107_tests/lib/ci/config.ci.yml new file mode 100644 index 000000000..dd25927a2 --- /dev/null +++ b/e107_tests/lib/ci/config.ci.yml @@ -0,0 +1,10 @@ +--- +deployer: 'local' +url: 'http://set-this-to-your-acceptance-test-url.local/' +db: + host: 'db' + dbname: 'app' + user: 'root' + password: 'Database Password for Continuous Integration' + populate: true + dump_path: 'tests/_data/e107_v2.1.9.sample.sql' diff --git a/e107_tests/lib/ci/salt/.gitignore b/e107_tests/lib/ci/salt/.gitignore new file mode 100644 index 000000000..60923f931 --- /dev/null +++ b/e107_tests/lib/ci/salt/.gitignore @@ -0,0 +1,4 @@ +roster +cache/ +logs/ +var/ diff --git a/e107_tests/lib/ci/salt/README.md b/e107_tests/lib/ci/salt/README.md new file mode 100644 index 000000000..3fc8d162b --- /dev/null +++ b/e107_tests/lib/ci/salt/README.md @@ -0,0 +1,58 @@ +# e107 Local Test Container Setup + +1. Launch a development container: + + ``` + lxc launch -s local images:ubuntu/focal e107-dev + ``` + +2. Push your public SSH key: + + ``` + lxc file push --uid 0 --gid 0 -pv ~/.ssh/id_rsa.pub e107-dev/root/.ssh/authorized_keys + ``` + +3. Install OpenSSH Server: + + ``` + lxc exec e107-dev -- apt install -y openssh-server + ``` + +4. Note the IP of the container: + + ``` + E107_DEV_HOST=$(lxc exec e107-dev -- hostname -I | cut -d' ' -f1) + ``` + +5. Generate the [Salt SSH](https://docs.saltstack.com/en/latest/topics/ssh/) [roster](https://docs.saltstack.com/en/latest/topics/ssh/roster.html): + + ``` + echo "e107-dev: $E107_DEV_HOST" | tee roster + ``` + +6. Configure `e107_tests/config.yml` based on `e107_tests/config.sample.yml` (from the root of this repository). + + For all tests: + + > Set `db.dbname`, `db.user`, and `db.password` to what you want the container configuration to have. + > + > Set `db.host` to the value of `$E107_DEV_HOST`. + + For acceptance tests: + + > Set `deployer` to `sftp`. + > + > Set `fs.host` to the value of `$E107_DEV_HOST`. + > + > Set `fs.user` to `www-data`. + > + > Set `fs.password` to any password you want the user to have. + > + > Set `fs.path` to `/var/www/html/e107/`. + > + > Set `url` to the output of `echo "http://$E107_DEV_HOST/e107/"` + +7. Apply the container configuration: + ``` + salt-ssh 'e107-dev' --state-output=changes state.apply e107-dev + ``` \ No newline at end of file diff --git a/e107_tests/lib/ci/salt/Saltfile b/e107_tests/lib/ci/salt/Saltfile new file mode 100644 index 000000000..3309324cf --- /dev/null +++ b/e107_tests/lib/ci/salt/Saltfile @@ -0,0 +1,4 @@ +salt-ssh: + roster_file: roster + config_dir: . + ssh_log_file: logs/salt-ssh diff --git a/e107_tests/lib/ci/salt/master b/e107_tests/lib/ci/salt/master new file mode 100644 index 000000000..c4da4f0e0 --- /dev/null +++ b/e107_tests/lib/ci/salt/master @@ -0,0 +1,15 @@ +root_dir: ./ + +file_roots: + base: + - states/ + +pillar_roots: + base: + - pillars/ + +log_file: logs/master + +cachedir: cache/ + +file_ignore_glob: [] diff --git a/e107_tests/lib/ci/salt/pillars/config-local.sls b/e107_tests/lib/ci/salt/pillars/config-local.sls new file mode 120000 index 000000000..a56149aa2 --- /dev/null +++ b/e107_tests/lib/ci/salt/pillars/config-local.sls @@ -0,0 +1 @@ +../../../../config.local.yml \ No newline at end of file diff --git a/e107_tests/lib/ci/salt/pillars/config-sample.sls b/e107_tests/lib/ci/salt/pillars/config-sample.sls new file mode 120000 index 000000000..aea216abc --- /dev/null +++ b/e107_tests/lib/ci/salt/pillars/config-sample.sls @@ -0,0 +1 @@ +../../../../config.sample.yml \ No newline at end of file diff --git a/e107_tests/lib/ci/salt/pillars/config.sls b/e107_tests/lib/ci/salt/pillars/config.sls new file mode 120000 index 000000000..0ecb7253d --- /dev/null +++ b/e107_tests/lib/ci/salt/pillars/config.sls @@ -0,0 +1 @@ +../../../../config.yml \ No newline at end of file diff --git a/e107_tests/lib/ci/salt/pillars/top.sls b/e107_tests/lib/ci/salt/pillars/top.sls new file mode 100644 index 000000000..3616e4ad9 --- /dev/null +++ b/e107_tests/lib/ci/salt/pillars/top.sls @@ -0,0 +1,5 @@ +base: + e107-dev: + - config-sample + - config + - config-local diff --git a/e107_tests/lib/ci/salt/roster b/e107_tests/lib/ci/salt/roster new file mode 100644 index 000000000..725b6ac56 --- /dev/null +++ b/e107_tests/lib/ci/salt/roster @@ -0,0 +1 @@ +e107-dev: e107-dev.lxc diff --git a/e107_tests/lib/ci/salt/states/e107-dev.sls b/e107_tests/lib/ci/salt/states/e107-dev.sls new file mode 100644 index 000000000..fd2180195 --- /dev/null +++ b/e107_tests/lib/ci/salt/states/e107-dev.sls @@ -0,0 +1,71 @@ +Install LAMP stack: + pkg.installed: + - pkgs: + - mariadb-server + - python3-mysqldb + - php + - libapache2-mod-php + - php-mysql + - php-xml + - php-curl + - php-gd + - php-mbstring + +MySQL server configuration file: + file.managed: + - name: /etc/mysql/mariadb.conf.d/99-overrides.cnf + - source: salt://files/etc/mysql/mariadb.conf.d/99-overrides.cnf + - user: root + - group: root + - mode: 0644 + - template: jinja + +Start and enable MySQL server daemon: + service.running: + - name: mysql + - enable: True + - watch: + - file: /etc/mysql/mariadb.conf.d/99-overrides.cnf + +Create MySQL user: + mysql_user.present: + - name: {{ salt['pillar.get']('db:user') }} + - host: '%' + - password: {{ salt['pillar.get']('db:password') }} + - allow_passwordless: True + - unix_socket: False + +Create MySQL database: + mysql_database.present: + - name: {{ salt['pillar.get']('db:dbname') }} + +Create MySQL grants: + mysql_grants.present: + - grant: ALL PRIVILEGES + - database: {{ salt['pillar.get']('db:dbname') }}.* + - user: {{ salt['pillar.get']('db:user') }} + - host: '%' + +Start and enable the web server: + service.running: + - name: apache2 + - enable: True + - watch: + - pkg: Install LAMP stack + +Configure Apache user: + user.present: + - name: {{ salt['pillar.get']('fs:user') }} + - password: {{ salt['pillar.get']('fs:password') }} + - hash_password: True + - shell: /bin/bash + +Ensure docroot has the correct permissions: + file.directory: + - name: {{ salt['pillar.get']('fs:path') }} + - user: {{ salt['pillar.get']('fs:user') }} + - group: {{ salt['pillar.get']('fs:user') }} + - recurse: + - user + - group + - makedirs: True diff --git a/e107_tests/lib/ci/salt/states/files/etc/mysql/mariadb.conf.d/99-overrides.cnf b/e107_tests/lib/ci/salt/states/files/etc/mysql/mariadb.conf.d/99-overrides.cnf new file mode 100644 index 000000000..f759a4963 --- /dev/null +++ b/e107_tests/lib/ci/salt/states/files/etc/mysql/mariadb.conf.d/99-overrides.cnf @@ -0,0 +1,2 @@ +[mysqld] +bind-address = 0.0.0.0 diff --git a/e107_tests/lib/config.php b/e107_tests/lib/config.php new file mode 100644 index 000000000..3933179e3 --- /dev/null +++ b/e107_tests/lib/config.php @@ -0,0 +1,18 @@ +params = $params; + } + + protected static function println($text = '') + { + codecept_debug($text); + + //echo("${text}\n"); + + //$prefix = debug_backtrace()[1]['function']; + //echo("[\033[1m${prefix}\033[0m] ${text}\n"); + } + + protected $components = array(); + + /** + * @param array $components + */ + public function setComponents($components) + { + $this->components = $components; + } + + public function unlinkAppFile($relative_path) + { + throw new \PHPUnit\Framework\SkippedTestError("Test wants \"$relative_path\" to be deleted from the app, ". + "but the configured deployer ".get_class($this)." is not capable of doing that."); + } + + /** + * Methods not implemented + * + * @param $method_name + * @param $arguments + * @return null + */ + public function __call($method_name, $arguments) + { + throw new BadMethodCallException(get_class($this)."::$method_name is not implemented"); + } +} \ No newline at end of file diff --git a/e107_tests/lib/deployers/DeployerFactory.php b/e107_tests/lib/deployers/DeployerFactory.php new file mode 100644 index 000000000..0e8afa157 --- /dev/null +++ b/e107_tests/lib/deployers/DeployerFactory.php @@ -0,0 +1,42 @@ +components)) + { + $this->start_fs(); + } + } + + private function getFsParams() + { + return $this->params['fs']; + } + + private function generateSshpassPrefix() + { + if (empty($this->getFsParam('privkey_path')) && + !empty($this->getFsParam('password'))) + { + return 'sshpass -p '.escapeshellarg($this->getFsParam('password')).' '; + } + return ''; + } + + private function getFsParam($key) + { + return $this->getFsParams()[$key]; + } + + private function generateRsyncRemoteShell() + { + $prefix = 'ssh -p '.escapeshellarg($this->getFsParam('port')); + if (!empty($this->getFsParam('privkey_path'))) + return $prefix.' -i ' . escapeshellarg($this->getFsParam('privkey_path')); + else + return $prefix; + } + + private static function runCommand($command, &$stdout = null, &$stderr = null) + { + $descriptorSpec = [ + 1 => ['pipe', 'w'], + 2 => ['pipe', 'w'], + ]; + $pipes = []; + self::println("Running this command…:"); + self::println($command); + $resource = proc_open($command, $descriptorSpec, $pipes, APP_PATH); + $stdout = stream_get_contents($pipes[1]); + $stderr = stream_get_contents($pipes[2]); + self::println("---------- stdout ----------"); + self::println(trim($stdout)); + self::println("---------- stderr ----------"); + self::println(trim($stderr)); + self::println("----------------------------"); + foreach ($pipes as $pipe) + { + fclose($pipe); + } + return proc_close($resource); + } + + public function stop() + { + self::println("=== SFTP Deployer – Tear Down ==="); + } + + public function unlinkAppFile($relative_path) + { + self::println("Deleting file \"$relative_path\" from deployed test location…"); + $fs_params = $this->getFsParams(); + $command = $this->generateSshpassPrefix(). + $this->generateRsyncRemoteShell(). + " ".escapeshellarg("{$fs_params['user']}@{$fs_params['host']}"). + " ".escapeshellarg("rm -v " . escapeshellarg(rtrim($fs_params['path'], '/')."/$relative_path")); + $retcode = self::runCommand($command); + if ($retcode === 0) + { + self::println("Deleted file \"$relative_path\" from deployed test location"); + } + else + { + self::println("No such file to delete: \"$relative_path\""); + } + } + + private function start_fs() + { + $fs_params = $this->getFsParams(); + $fs_params['path'] = rtrim($fs_params['path'], '/') . '/'; + $command = $this->generateSshpassPrefix() . + 'rsync -e ' . + escapeshellarg($this->generateRsyncRemoteShell()) . + ' --delete -avzHXShs ' . + escapeshellarg(rtrim(APP_PATH, '/') . '/') . ' ' . + escapeshellarg("{$fs_params['user']}@{$fs_params['host']}:{$fs_params['path']}"); + $retcode = self::runCommand($command); + if ($retcode !== 0) { + throw new Exception("SFTP deployment failed. Run with --debug to see stdout and stderr."); + } + } +} \ No newline at end of file diff --git a/e107_tests/lib/deployers/cPanelDeployer.php b/e107_tests/lib/deployers/cPanelDeployer.php new file mode 100644 index 000000000..94b58dee2 --- /dev/null +++ b/e107_tests/lib/deployers/cPanelDeployer.php @@ -0,0 +1,374 @@ +credentials = $params['hosting']; + } + + public function start() + { + self::println(); + self::println("=== cPanel Deployer – Bring Up ==="); + $creds = $this->credentials; + if (!$creds['hostname'] || + !$creds['username'] || + !$creds['password']) + { + throw new Exception("Cannot deploy cPanel environment because credentials are missing."); + } + + $this->prepare(); + + foreach ($this->components as $component) + { + $method = "prepare_{$component}"; + if (!method_exists($this, $method)) + { + throw new Exception("Unsupported component \"{$component}\" requested."); + } + } + foreach ($this->components as $component) + { + $method = "prepare_{$component}"; + $this->$method(); + } + } + + private function prepare() + { + $username = &$this->credentials['username']; + $password = &$this->credentials['password']; + $hostname = &$this->credentials['hostname']; + + $this->run_id = $run_id = uniqid(self::TEST_PREFIX); + + self::println("Test run ID: ".$this->run_id); + + $this->cPanel = $cPanel = new cpanelAPI($username, $password, $hostname); + + self::println("Connecting to cPanel at \"{$hostname}\" with username \"{$username}\"…"); + + $domains_data = $cPanel->uapi->DomainInfo->domains_data(); + if (!$domains_data) + { + throw new Exception("Cannot connect to cPanel at \"{$hostname}\" with username \"{$username}\" and password \"{$password}\""); + } + $userdata = $domains_data->{'data'}; + $this->homedir = $userdata->{'main_domain'}->{'homedir'}; + $this->docroot = $userdata->{'main_domain'}->{'documentroot'}; + $this->domain = $userdata->{'main_domain'}->{'domain'}; + + self::println("Obtained home directory from cPanel: " . $this->homedir); + self::println("Obtained document root from cPanel: " . $this->docroot); + self::println("Obtained domain name from cPanel: " . $this->domain); + + $acceptance_tests = self::get_active_acceptance_tests($cPanel, $this->homedir); + + self::println("Adding this test (".$this->run_id.") to registered tests list…"); + $run_time = microtime(true); + array_push($acceptance_tests, + ['id' => $run_id, + 'time' => $run_time + ]); + + self::write_acceptance_tests($cPanel, $this->homedir, $acceptance_tests); + + $valid_acceptance_test_ids = self::get_acceptance_test_ids($acceptance_tests); + self::println("Current unexpired tests: [".implode(", ", $valid_acceptance_test_ids)."]"); + + self::prune_inactive_acceptance_test_resources($cPanel, $valid_acceptance_test_ids); + } + + private static function get_active_acceptance_tests($cPanel, $homedir) + { + self::println("Retrieving existing registered tests from cPanel account…"); + $acceptance_tests = []; + $acceptance_tests_apiresponse = $cPanel->uapi->Fileman->get_file_content(['dir' => $homedir, 'file' => 'acceptance_tests.status.txt']); + if (!is_null($acceptance_tests_apiresponse->{'data'})) + { + $acceptance_tests_raw = $acceptance_tests_apiresponse->{'data'}->{'content'}; + $acceptance_tests = (array) json_decode($acceptance_tests_raw, true); + self::prune_acceptance_tests($acceptance_tests); + } + return $acceptance_tests; + } + + private static function prune_acceptance_tests(array &$list, $id_to_remove = null) + { + foreach ($list as $key => $item) + { + $time = $item['time']; + if ($item['id'] === $id_to_remove || $time <= strtotime("now - 10 seconds")) + { + unset($list[$key]); + } + } + $list = array_values($list); + return $list; + } + + private static function write_acceptance_tests($cPanel, $homedir, $acceptance_tests) + { + $acceptance_tests_json = json_encode($acceptance_tests, JSON_PRETTY_PRINT); + + self::println("Saving registered tests list to cPanel account…"); + $cPanel->uapi->Fileman->save_file_content(['dir' => $homedir, 'file' => 'acceptance_tests.status.txt', 'content' => $acceptance_tests_json]); + } + + private static function get_acceptance_test_ids(array $list) + { + $ids = []; + foreach ($list as $item) + { + $ids[] = $item['id']; + } + return $ids; + } + + private static function prune_inactive_acceptance_test_resources($cPanel, $valid_acceptance_test_ids) + { + self::println("Pruning expired tests…"); + $listdbs = $cPanel->api2->MysqlFE->listdbs()->{'cpanelresult'}->{'data'}; + self::prune_mysql_databases($listdbs, $valid_acceptance_test_ids, $cPanel); + + $listdbusers = $cPanel->api2->MysqlFE->listusers()->{'cpanelresult'}->{'data'}; + self::prune_mysql_users($listdbusers, $valid_acceptance_test_ids, $cPanel); + + $target_files_apiresponse = $cPanel->uapi->Fileman->list_files(['dir' => self::TARGET_RELPATH]); + $target_files = $target_files_apiresponse->{'data'}; + foreach ($target_files as $target_file) + { + $questionable_filename = $target_file->{'file'}; + if (substr($questionable_filename, 0, strlen(self::TEST_PREFIX)) === self::TEST_PREFIX && + !in_array($questionable_filename, $valid_acceptance_test_ids)) + { + self::println("Deleting expired test folder \"".self::TARGET_RELPATH.$questionable_filename."\"…"); + $cPanel->api2->Fileman->fileop(['op' => 'unlink', 'sourcefiles' => self::TARGET_RELPATH.$questionable_filename]); + } + } + } + + private static function prune_mysql_databases($dbs, $ids, $cPanel) + { + $prefix = $cPanel->user."_".self::TEST_PREFIX; + foreach ($dbs as $db) + { + $db = (array) $db; + if (substr($db['db'], 0, strlen($prefix)) !== $prefix) + continue; + $questionable_db = substr($db['db'], strlen($prefix)); + if (!in_array($questionable_db, $ids)) + { + self::println("Deleting expired MySQL database \"".$db['db']."\"…"); + $cPanel->uapi->Mysql->delete_database(['name' => $db['db']]); + } + } + } + + private static function prune_mysql_users($users, $ids, $cPanel) + { + $prefix = $cPanel->user."_".self::TEST_PREFIX; + foreach ($users as $user) + { + $user = (array) $user; + if (substr($user['user'], 0, strlen($prefix)) !== $prefix) + continue; + $questionable_user = substr($user['user'], strlen($prefix)); + if (!in_array($questionable_user, $ids)) + { + self::println("Deleting expired MySQL user \"".$user['user']."\"…"); + $cPanel->uapi->Mysql->delete_user(['name' => $user['user']]); + } + } + } + + public function stop() + { + self::println("=== cPanel Deployer – Tear Down ==="); + $cPanel = $this->cPanel; + $acceptance_tests = self::get_active_acceptance_tests($cPanel, $this->homedir); + self::println("Removing this test (".$this->run_id.") from registered tests list…"); + self::prune_acceptance_tests($acceptance_tests, $this->run_id); + self::write_acceptance_tests($cPanel, $this->homedir, $acceptance_tests); + + $valid_acceptance_test_ids = self::get_acceptance_test_ids($acceptance_tests); + self::println("Current unexpired tests: [".implode(", ", $valid_acceptance_test_ids)."]"); + self::prune_inactive_acceptance_test_resources($cPanel, $valid_acceptance_test_ids); + + if (!$this->skip_mysql_remote_hosts) + { + self::clean_mysql_remote_hosts($cPanel); + } + } + + private static function clean_mysql_remote_hosts($cPanel) + { + $remote_hosts = $cPanel->api2->MysqlFE->gethosts()->{'cpanelresult'}->{'data'}; + if (in_array('%', $remote_hosts, true)) + { + self::println("Removing cPanel MySQL remote host '%'…"); + $cPanel->uapi->Mysql->delete_host(['host' => '%']); + } + } + + public function reconfigure_db($module) + { + $db = $module->getDbModule(); + $Db_config = $db->_getConfig(); + $Db_config['dsn'] = $this->getDsn(); + $Db_config['user'] = $this->getDbUsername(); + $Db_config['password'] = $this->getDbPassword(); + $db->_reconfigure($Db_config); + // Next line is used to make connection available to any code after this point + //$this->getModule('\Helper\DelayedDb')->_delayedInitialize(); + } + + private function getDsn() + { + $hostname = $this->credentials['hostname']; + $db_id = $this->getDbName(); + return "mysql:host={$hostname};dbname={$db_id}"; + } + + private function getDbName() + { + return $this->db_id; + } + + private function getDbUsername() + { + return $this->db_id; + } + + private function getDbPassword() + { + return $this->run_id; + } + + public function reconfigure_fs($module) + { + $url = $this->getUrl(); + $browser = $module->getBrowserModule(); + $browser->_reconfigure(array('url' => $url)); + } + + private function getUrl() + { + return "http://".$this->domain."/".$this->run_id."/"; + } + + public function unlinkAppFile($relative_path) + { + self::println("Deleting file \"$relative_path\" from deployed test location…"); + $this->cPanel->api2->Fileman->fileop(['op' => 'unlink', + 'sourcefiles' => self::TARGET_RELPATH.$this->run_id."/".$relative_path]); + } + + private function prepare_db() + { + $cPanel = $this->cPanel; + $username = &$this->credentials['username']; + $run_id = &$this->run_id; + $this->db_id = $db_id = "{$username}_{$run_id}"; + + self::println("Ensuring that MySQL users allow any remote access hosts (%)…"); + $remote_hosts = $cPanel->api2->MysqlFE->gethosts()->{'cpanelresult'}->{'data'}; + if (!in_array('%', $remote_hosts, true)) + { + $cPanel->uapi->Mysql->add_host(['host' => '%']); + register_shutdown_function(function() use ($cPanel) + { + self::clean_mysql_remote_hosts($cPanel); + }); + } + else + { + $this->skip_mysql_remote_hosts = true; + } + + self::println("Creating new MySQL database \"{$db_id}\"…"); + $cPanel->uapi->Mysql->create_database(['name' => $db_id]); + + self::println("Creating new MySQL user \"{$db_id}\" with password \"{$run_id}\"…"); + $cPanel->uapi->Mysql->create_user(['name' => $db_id, 'password' => $run_id]); + self::println("Granting ALL PRIVILEGES to MySQL user \"{$db_id}\"…"); + $cPanel->uapi->Mysql->set_privileges_on_database(['user' => $db_id, + 'database' => $db_id, + 'privileges' => 'ALL PRIVILEGES' + ]); + } + + private function prepare_fs() + { + $cPanel = $this->cPanel; + $app_archive = self::archive_app(APP_PATH, $this->run_id); + $app_archive_path = stream_get_meta_data($app_archive)['uri']; + $app_archive_name = basename($app_archive_path); + self::println("Sending archive to cPanel server…"); + $cPanel->uapi->post->Fileman + ->upload_files(['dir' => self::TARGET_RELPATH, + 'file-1' => new CURLFile($app_archive_path) + ]); + self::println("Extracting archive on cPanel server…"); + $cPanel->api2->Fileman + ->fileop(['op' => 'extract', + 'sourcefiles' => self::TARGET_RELPATH.$app_archive_name, + 'destfiles' => '.' + ]); + self::println("Deleting archive from cPanel server…"); + $cPanel->api2->Fileman + ->fileop(['op' => 'unlink', + 'sourcefiles' => self::TARGET_RELPATH.$app_archive_name + ]); + } + + private static function archive_app($path, $prefix = '') + { + $tmp_file = tmpfile(); + $tmp_file_path = stream_get_meta_data($tmp_file)['uri']; + self::println("Touched temporary archive file; path: ".$tmp_file_path); + $archive = new ZipArchive(); + $archive->open($tmp_file_path, ZipArchive::OVERWRITE); + $i = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path)); + self::println("Adding app to temporary archive…"); + $path = realpath($path); + /** + * @var $file_info SplFileInfo + */ + foreach ($i as $file_info) + { + $realpath = $file_info->getRealPath(); + if (substr($realpath, 0, strlen($path)) === $path) + $relpath = substr($realpath, strlen($path)); + if (substr($relpath, -3) === "/.." || + substr($relpath, -2) === "/." || + !file_exists($realpath) || + !is_file($realpath) || + empty($relpath)) continue; + $relpath = $prefix . $relpath; + $archive->addFile($realpath, $relpath); + $archive->setExternalAttributesName($relpath, ZipArchive::OPSYS_UNIX, fileperms($realpath) << 16); + } + $archive->close(); + + return $tmp_file; + } +} diff --git a/e107_tests/lib/preparers/E107Preparer.php b/e107_tests/lib/preparers/E107Preparer.php new file mode 100644 index 000000000..b736e6a10 --- /dev/null +++ b/e107_tests/lib/preparers/E107Preparer.php @@ -0,0 +1,66 @@ +deleteHashDirs(); + } + + public function rollback() + { + return $this->deleteHashDirs(); + } + + protected function deleteHashDirs() + { + $system = APP_PATH."/e107_system/".self::TEST_HASH; + $this->deleteDir($system); + + $media = APP_PATH."/e107_media/".self::TEST_HASH; + $this->deleteDir($media); + + if(is_dir($system)) + { + throw new Exception(get_class() . " couldn't delete ".$system); + } + + } + + private function deleteDir($dirPath) + { + codecept_debug(get_class() . ' is deleting '.escapeshellarg($dirPath).'…'); + + if(!is_dir($dirPath)) + { + // echo ($dirPath . "must be a directory"); + return null; + } + + if(substr($dirPath, strlen($dirPath) - 1, 1) != '/') + { + $dirPath .= '/'; + } + + $files = glob($dirPath . '*', GLOB_MARK); + + foreach($files as $file) + { + if(is_dir($file)) + { + $this->deleteDir($file); + } + else + { + unlink($file); + } + } + + if(is_dir($dirPath)) + { + rmdir($dirPath); + } + } +} diff --git a/e107_tests/lib/preparers/GitPreparer.php b/e107_tests/lib/preparers/GitPreparer.php new file mode 100644 index 000000000..6c7b761fa --- /dev/null +++ b/e107_tests/lib/preparers/GitPreparer.php @@ -0,0 +1,139 @@ +debug('Snapshot requested'); + return $this->setVcsInProgress(); + } + + public function rollback() + { + $this->debug('Rollback requested'); + return $this->unsetVcsInProgress(); + } + + protected function setVcsInProgress() + { + // Cleanup in case of a fatal error + PriorityCallbacks::instance()->register_shutdown_function([$this, 'rollback']); + + if ($this->isVcsInProgress()) + { + $this->debug('Git repo shows test in progress. Probably crashed test.'); + $this->unsetVcsInProgress(); + } + + $this->debug('Setting test locks in Git…'); + + touch(self::TEST_IN_PROGRESS_FILE); + $this->runCommand('git add -f '.escapeshellarg(self::TEST_IN_PROGRESS_FILE)); + $this->runCommand('git add -A -f'); + + $commit_command = 'git -c user.name="Test Run" -c user.email="testrun@example.com" commit -a --no-gpg-sign ' . + "-m '".self::TEST_IN_PROGRESS."! If test crashed, run `git log -1` for instructions' " . + "-m 'Running the test again after fixing the crash will clear this commit\nand any related stashes.' " . + "-m 'Alternatively, run these commands to restore the repository to its\npre-test state:' "; + $unsetVcsInProgress_commands = [ + 'git reset --hard HEAD', + 'git clean -fdx', + 'git reset --mixed HEAD^', + 'rm -fv '.escapeshellarg(self::TEST_IN_PROGRESS) + ]; + foreach($unsetVcsInProgress_commands as $command) + { + $commit_command .= "-m ".escapeshellarg($command)." "; + } + + $stdout = ''; + $stderr = ''; + $rc = $this->runCommand($commit_command, $stdout, $stderr); + if ($rc !== 0) + { + @unlink(self::TEST_IN_PROGRESS_FILE); + $this->debug('Error taking snapshot with Git!'); + $this->debug('========== STDOUT =========='); + $this->debug($stdout); + $this->debug('========== STDERR =========='); + $this->debug($stderr); + throw new Exception("Error taking snapshot with Git!"); + } + } + + protected function isVcsInProgress($case = '') + { + $in_progress = []; + + $in_progress['file'] = file_exists(self::TEST_IN_PROGRESS_FILE); + + $stdout = ''; + $this->runCommand('git log -1 --pretty=%B', $stdout); + $in_progress['commit'] = strpos($stdout, self::TEST_IN_PROGRESS) !== false; + + $stdout = ''; + $this->runCommand('git stash list', $stdout); + $in_progress['stash'] = strpos($stdout, self::TEST_IN_PROGRESS) !== false; + + if(!empty($case)) return $in_progress[$case]; + return in_array(true, $in_progress); + } + + /** + * @param string $command The command to run + * @param string $stdout Reference to the STDOUT output as a string + * @param string $stderr Reference to the STDERR output as a string + * @return int Return code of the command that was run + */ + protected function runCommand($command, &$stdout = "", &$stderr = "") + { + $descriptorspec = [ + 1 => ['pipe', 'w'], + 2 => ['pipe', 'w'], + ]; + $pipes = []; + $resource = proc_open($command, $descriptorspec, $pipes, APP_PATH); + $stdout .= stream_get_contents($pipes[1]); + $stderr .= stream_get_contents($pipes[2]); + foreach ($pipes as $pipe) + { + fclose($pipe); + } + return proc_close($resource); + } + + protected function unsetVcsInProgress() + { + if (!$this->isVcsInProgress()) + { + $this->debug('No test locks found'); + return; + } + + $this->debug('Rolling back Git repo to pre-test state…'); + $this->runCommand('git reset --hard HEAD'); + $this->runCommand('git clean -fdx'); + + while ($this->isVcsInProgress('commit')) + { + $this->debug('Going back one commit…'); + $this->runCommand('git reset --mixed HEAD^'); + } + + while ($this->isVcsInProgress('stash')) + { + $this->debug('Popping top of stash…'); + $this->runCommand('git stash pop'); + } + + @unlink(self::TEST_IN_PROGRESS_FILE); + } + + protected function debug($message) + { + codecept_debug(get_class() . ': ' . $message); + } +} diff --git a/e107_tests/lib/preparers/Preparer.php b/e107_tests/lib/preparers/Preparer.php new file mode 100644 index 000000000..81f7f8ffb --- /dev/null +++ b/e107_tests/lib/preparers/Preparer.php @@ -0,0 +1,7 @@ + + + + + + tests + + + + + + \ No newline at end of file diff --git a/e107_tests/tests/_bootstrap.php b/e107_tests/tests/_bootstrap.php new file mode 100644 index 000000000..f2f572678 --- /dev/null +++ b/e107_tests/tests/_bootstrap.php @@ -0,0 +1,18 @@ +mcpeace."); +define("MAW_THEME_2", "maw"); + +?> \ No newline at end of file diff --git a/e107_tests/tests/_data/basic-light/languages/index.html b/e107_tests/tests/_data/basic-light/languages/index.html new file mode 100644 index 000000000..e69de29bb diff --git a/e107_tests/tests/_data/basic-light/maw/css/fonts/glyphicons-halflings-regular.eot b/e107_tests/tests/_data/basic-light/maw/css/fonts/glyphicons-halflings-regular.eot new file mode 100644 index 000000000..b93a4953f Binary files /dev/null and b/e107_tests/tests/_data/basic-light/maw/css/fonts/glyphicons-halflings-regular.eot differ diff --git a/e107_tests/tests/_data/basic-light/maw/css/fonts/glyphicons-halflings-regular.svg b/e107_tests/tests/_data/basic-light/maw/css/fonts/glyphicons-halflings-regular.svg new file mode 100644 index 000000000..94fb5490a --- /dev/null +++ b/e107_tests/tests/_data/basic-light/maw/css/fonts/glyphicons-halflings-regular.svg @@ -0,0 +1,288 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/e107_tests/tests/_data/basic-light/maw/css/fonts/glyphicons-halflings-regular.ttf b/e107_tests/tests/_data/basic-light/maw/css/fonts/glyphicons-halflings-regular.ttf new file mode 100644 index 000000000..1413fc609 Binary files /dev/null and b/e107_tests/tests/_data/basic-light/maw/css/fonts/glyphicons-halflings-regular.ttf differ diff --git a/e107_tests/tests/_data/basic-light/maw/css/fonts/glyphicons-halflings-regular.woff b/e107_tests/tests/_data/basic-light/maw/css/fonts/glyphicons-halflings-regular.woff new file mode 100644 index 000000000..9e612858f Binary files /dev/null and b/e107_tests/tests/_data/basic-light/maw/css/fonts/glyphicons-halflings-regular.woff differ diff --git a/e107_tests/tests/_data/basic-light/maw/css/fonts/glyphicons-halflings-regular.woff2 b/e107_tests/tests/_data/basic-light/maw/css/fonts/glyphicons-halflings-regular.woff2 new file mode 100644 index 000000000..64539b54c Binary files /dev/null and b/e107_tests/tests/_data/basic-light/maw/css/fonts/glyphicons-halflings-regular.woff2 differ diff --git a/e107_tests/tests/_data/basic-light/maw/css/ie10-viewport-bug-workaround.css b/e107_tests/tests/_data/basic-light/maw/css/ie10-viewport-bug-workaround.css new file mode 100644 index 000000000..8b3803b48 --- /dev/null +++ b/e107_tests/tests/_data/basic-light/maw/css/ie10-viewport-bug-workaround.css @@ -0,0 +1,15 @@ +/*! + * IE10 viewport hack for Surface/desktop Windows 8 bug + * Copyright 2014-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ + +/* + * See the Getting Started docs for more information: + * http://getbootstrap.com/getting-started/#support-ie10-width + */ +@-webkit-viewport { width: device-width; } +@-moz-viewport { width: device-width; } +@-ms-viewport { width: device-width; } +@-o-viewport { width: device-width; } +@viewport { width: device-width; } diff --git a/e107_tests/tests/_data/basic-light/maw/css/index.html b/e107_tests/tests/_data/basic-light/maw/css/index.html new file mode 100644 index 000000000..e69de29bb diff --git a/e107_tests/tests/_data/basic-light/maw/css/theme.min.css b/e107_tests/tests/_data/basic-light/maw/css/theme.min.css new file mode 100644 index 000000000..9f0202b37 --- /dev/null +++ b/e107_tests/tests/_data/basic-light/maw/css/theme.min.css @@ -0,0 +1,1466 @@ +@import url(https://fonts.googleapis.com/css?family=Roboto:400,700); +body,figure{margin:0} +.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.pre-scrollable{max-height:340px} +html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;font-size:10px;-webkit-tap-highlight-color:transparent} +article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block} +audio,canvas,progress,video{display:inline-block;vertical-align:baseline} +audio:not([controls]){display:none;height:0} +[hidden],template{display:none} +a{background-color:transparent} +a:active,a:hover{outline:0} +b,optgroup,strong{font-weight:700} +dfn{font-style:italic} +h1{margin:.67em 0} +mark{background:#ff0;color:#000} +sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline} +sup{top:-.5em} +sub{bottom:-.25em} +img{border:0;vertical-align:middle} +svg:not(:root){overflow:hidden} +hr{box-sizing:content-box;height:0} +pre,textarea{overflow:auto} +code,kbd,pre,samp{font-size:1em} +button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0} +button{overflow:visible} +button,select{text-transform:none} +button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer} +button[disabled],html input[disabled]{cursor:default} +button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0} +input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0} +input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto} +input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none} +table{border-collapse:collapse;border-spacing:0} +td,th{padding:0} +@media print{blockquote,img,pre,tr{page-break-inside:avoid} +*,:after,:before{background:0 0!important;color:#000!important;box-shadow:none!important;text-shadow:none!important} +a,a:visited{text-decoration:none} +a[href]:after{content:" (" attr(href) ")"} +abbr[title]:after{content:" (" attr(title) ")"} +a[href^="javascript:"]:after,a[href^="#"]:after{content:""} +blockquote,pre{border:1px solid #999} +thead{display:table-header-group} +img{max-width:100%!important} +h2,h3,p{orphans:3;widows:3} +h2,h3{page-break-after:avoid} +.navbar{display:none} +.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important} +.label{border:1px solid #000} +.table{border-collapse:collapse!important} +.table td,.table th{background-color:#fff!important;color:#333} +.table-bordered td,.table-bordered th{border:1px solid #ddd!important} +} +.img-thumbnail,body{background-color:#f1f1f1} +.btn,.btn-danger.active,.btn-danger:active,.btn-default.active,.btn-default:active,.btn-info.active,.btn-info:active,.btn-primary.active,.btn-primary:active,.btn-success.active,.btn-success:active,.btn-warning.active,.btn-warning:active,.btn.active,.btn:active,.form-control,.navbar-toggle,.open>.dropdown-toggle.btn-danger,.open>.dropdown-toggle.btn-default,.open>.dropdown-toggle.btn-info,.open>.dropdown-toggle.btn-primary,.open>.dropdown-toggle.btn-success,.open>.dropdown-toggle.btn-warning{background-image:none} +@font-face{font-family:'Glyphicons Halflings';src:url(fonts/glyphicons-halflings-regular.eot);src:url(fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(fonts/glyphicons-halflings-regular.woff) format('woff'),url(fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')} +.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale} +.glyphicon-asterisk:before{content:"\2a"} +.glyphicon-plus:before{content:"\2b"} +.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"} +.glyphicon-minus:before{content:"\2212"} +.glyphicon-cloud:before{content:"\2601"} +.glyphicon-envelope:before{content:"\2709"} +.glyphicon-pencil:before{content:"\270f"} +.glyphicon-glass:before{content:"\e001"} +.glyphicon-music:before{content:"\e002"} +.glyphicon-search:before{content:"\e003"} +.glyphicon-heart:before{content:"\e005"} +.glyphicon-star:before{content:"\e006"} +.glyphicon-star-empty:before{content:"\e007"} +.glyphicon-user:before{content:"\e008"} +.glyphicon-film:before{content:"\e009"} +.glyphicon-th-large:before{content:"\e010"} +.glyphicon-th:before{content:"\e011"} +.glyphicon-th-list:before{content:"\e012"} +.glyphicon-ok:before{content:"\e013"} +.glyphicon-remove:before{content:"\e014"} +.glyphicon-zoom-in:before{content:"\e015"} +.glyphicon-zoom-out:before{content:"\e016"} +.glyphicon-off:before{content:"\e017"} +.glyphicon-signal:before{content:"\e018"} +.glyphicon-cog:before{content:"\e019"} +.glyphicon-trash:before{content:"\e020"} +.glyphicon-home:before{content:"\e021"} +.glyphicon-file:before{content:"\e022"} +.glyphicon-time:before{content:"\e023"} +.glyphicon-road:before{content:"\e024"} +.glyphicon-download-alt:before{content:"\e025"} +.glyphicon-download:before{content:"\e026"} +.glyphicon-upload:before{content:"\e027"} +.glyphicon-inbox:before{content:"\e028"} +.glyphicon-play-circle:before{content:"\e029"} +.glyphicon-repeat:before{content:"\e030"} +.glyphicon-refresh:before{content:"\e031"} +.glyphicon-list-alt:before{content:"\e032"} +.glyphicon-lock:before{content:"\e033"} +.glyphicon-flag:before{content:"\e034"} +.glyphicon-headphones:before{content:"\e035"} +.glyphicon-volume-off:before{content:"\e036"} +.glyphicon-volume-down:before{content:"\e037"} +.glyphicon-volume-up:before{content:"\e038"} +.glyphicon-qrcode:before{content:"\e039"} +.glyphicon-barcode:before{content:"\e040"} +.glyphicon-tag:before{content:"\e041"} +.glyphicon-tags:before{content:"\e042"} +.glyphicon-book:before{content:"\e043"} +.glyphicon-bookmark:before{content:"\e044"} +.glyphicon-print:before{content:"\e045"} +.glyphicon-camera:before{content:"\e046"} +.glyphicon-font:before{content:"\e047"} +.glyphicon-bold:before{content:"\e048"} +.glyphicon-italic:before{content:"\e049"} +.glyphicon-text-height:before{content:"\e050"} +.glyphicon-text-width:before{content:"\e051"} +.glyphicon-align-left:before{content:"\e052"} +.glyphicon-align-center:before{content:"\e053"} +.glyphicon-align-right:before{content:"\e054"} +.glyphicon-align-justify:before{content:"\e055"} +.glyphicon-list:before{content:"\e056"} +.glyphicon-indent-left:before{content:"\e057"} +.glyphicon-indent-right:before{content:"\e058"} +.glyphicon-facetime-video:before{content:"\e059"} +.glyphicon-picture:before{content:"\e060"} +.glyphicon-map-marker:before{content:"\e062"} +.glyphicon-adjust:before{content:"\e063"} +.glyphicon-tint:before{content:"\e064"} +.glyphicon-edit:before{content:"\e065"} +.glyphicon-share:before{content:"\e066"} +.glyphicon-check:before{content:"\e067"} +.glyphicon-move:before{content:"\e068"} +.glyphicon-step-backward:before{content:"\e069"} +.glyphicon-fast-backward:before{content:"\e070"} +.glyphicon-backward:before{content:"\e071"} +.glyphicon-play:before{content:"\e072"} +.glyphicon-pause:before{content:"\e073"} +.glyphicon-stop:before{content:"\e074"} +.glyphicon-forward:before{content:"\e075"} +.glyphicon-fast-forward:before{content:"\e076"} +.glyphicon-step-forward:before{content:"\e077"} +.glyphicon-eject:before{content:"\e078"} +.glyphicon-chevron-left:before{content:"\e079"} +.glyphicon-chevron-right:before{content:"\e080"} +.glyphicon-plus-sign:before{content:"\e081"} +.glyphicon-minus-sign:before{content:"\e082"} +.glyphicon-remove-sign:before{content:"\e083"} +.glyphicon-ok-sign:before{content:"\e084"} +.glyphicon-question-sign:before{content:"\e085"} +.glyphicon-info-sign:before{content:"\e086"} +.glyphicon-screenshot:before{content:"\e087"} +.glyphicon-remove-circle:before{content:"\e088"} +.glyphicon-ok-circle:before{content:"\e089"} +.glyphicon-ban-circle:before{content:"\e090"} +.glyphicon-arrow-left:before{content:"\e091"} +.glyphicon-arrow-right:before{content:"\e092"} +.glyphicon-arrow-up:before{content:"\e093"} +.glyphicon-arrow-down:before{content:"\e094"} +.glyphicon-share-alt:before{content:"\e095"} +.glyphicon-resize-full:before{content:"\e096"} +.glyphicon-resize-small:before{content:"\e097"} +.glyphicon-exclamation-sign:before{content:"\e101"} +.glyphicon-gift:before{content:"\e102"} +.glyphicon-leaf:before{content:"\e103"} +.glyphicon-fire:before{content:"\e104"} +.glyphicon-eye-open:before{content:"\e105"} +.glyphicon-eye-close:before{content:"\e106"} +.glyphicon-warning-sign:before{content:"\e107"} +.glyphicon-plane:before{content:"\e108"} +.glyphicon-calendar:before{content:"\e109"} +.glyphicon-random:before{content:"\e110"} +.glyphicon-comment:before{content:"\e111"} +.glyphicon-magnet:before{content:"\e112"} +.glyphicon-chevron-up:before{content:"\e113"} +.glyphicon-chevron-down:before{content:"\e114"} +.glyphicon-retweet:before{content:"\e115"} +.glyphicon-shopping-cart:before{content:"\e116"} +.glyphicon-folder-close:before{content:"\e117"} +.glyphicon-folder-open:before{content:"\e118"} +.glyphicon-resize-vertical:before{content:"\e119"} +.glyphicon-resize-horizontal:before{content:"\e120"} +.glyphicon-hdd:before{content:"\e121"} +.glyphicon-bullhorn:before{content:"\e122"} +.glyphicon-bell:before{content:"\e123"} +.glyphicon-certificate:before{content:"\e124"} +.glyphicon-thumbs-up:before{content:"\e125"} +.glyphicon-thumbs-down:before{content:"\e126"} +.glyphicon-hand-right:before{content:"\e127"} +.glyphicon-hand-left:before{content:"\e128"} +.glyphicon-hand-up:before{content:"\e129"} +.glyphicon-hand-down:before{content:"\e130"} +.glyphicon-circle-arrow-right:before{content:"\e131"} +.glyphicon-circle-arrow-left:before{content:"\e132"} +.glyphicon-circle-arrow-up:before{content:"\e133"} +.glyphicon-circle-arrow-down:before{content:"\e134"} +.glyphicon-globe:before{content:"\e135"} +.glyphicon-wrench:before{content:"\e136"} +.glyphicon-tasks:before{content:"\e137"} +.glyphicon-filter:before{content:"\e138"} +.glyphicon-briefcase:before{content:"\e139"} +.glyphicon-fullscreen:before{content:"\e140"} +.glyphicon-dashboard:before{content:"\e141"} +.glyphicon-paperclip:before{content:"\e142"} +.glyphicon-heart-empty:before{content:"\e143"} +.glyphicon-link:before{content:"\e144"} +.glyphicon-phone:before{content:"\e145"} +.glyphicon-pushpin:before{content:"\e146"} +.glyphicon-usd:before{content:"\e148"} +.glyphicon-gbp:before{content:"\e149"} +.glyphicon-sort:before{content:"\e150"} +.glyphicon-sort-by-alphabet:before{content:"\e151"} +.glyphicon-sort-by-alphabet-alt:before{content:"\e152"} +.glyphicon-sort-by-order:before{content:"\e153"} +.glyphicon-sort-by-order-alt:before{content:"\e154"} +.glyphicon-sort-by-attributes:before{content:"\e155"} +.glyphicon-sort-by-attributes-alt:before{content:"\e156"} +.glyphicon-unchecked:before{content:"\e157"} +.glyphicon-expand:before{content:"\e158"} +.glyphicon-collapse-down:before{content:"\e159"} +.glyphicon-collapse-up:before{content:"\e160"} +.glyphicon-log-in:before{content:"\e161"} +.glyphicon-flash:before{content:"\e162"} +.glyphicon-log-out:before{content:"\e163"} +.glyphicon-new-window:before{content:"\e164"} +.glyphicon-record:before{content:"\e165"} +.glyphicon-save:before{content:"\e166"} +.glyphicon-open:before{content:"\e167"} +.glyphicon-saved:before{content:"\e168"} +.glyphicon-import:before{content:"\e169"} +.glyphicon-export:before{content:"\e170"} +.glyphicon-send:before{content:"\e171"} +.glyphicon-floppy-disk:before{content:"\e172"} +.glyphicon-floppy-saved:before{content:"\e173"} +.glyphicon-floppy-remove:before{content:"\e174"} +.glyphicon-floppy-save:before{content:"\e175"} +.glyphicon-floppy-open:before{content:"\e176"} +.glyphicon-credit-card:before{content:"\e177"} +.glyphicon-transfer:before{content:"\e178"} +.glyphicon-cutlery:before{content:"\e179"} +.glyphicon-header:before{content:"\e180"} +.glyphicon-compressed:before{content:"\e181"} +.glyphicon-earphone:before{content:"\e182"} +.glyphicon-phone-alt:before{content:"\e183"} +.glyphicon-tower:before{content:"\e184"} +.glyphicon-stats:before{content:"\e185"} +.glyphicon-sd-video:before{content:"\e186"} +.glyphicon-hd-video:before{content:"\e187"} +.glyphicon-subtitles:before{content:"\e188"} +.glyphicon-sound-stereo:before{content:"\e189"} +.glyphicon-sound-dolby:before{content:"\e190"} +.glyphicon-sound-5-1:before{content:"\e191"} +.glyphicon-sound-6-1:before{content:"\e192"} +.glyphicon-sound-7-1:before{content:"\e193"} +.glyphicon-copyright-mark:before{content:"\e194"} +.glyphicon-registration-mark:before{content:"\e195"} +.glyphicon-cloud-download:before{content:"\e197"} +.glyphicon-cloud-upload:before{content:"\e198"} +.glyphicon-tree-conifer:before{content:"\e199"} +.glyphicon-tree-deciduous:before{content:"\e200"} +.glyphicon-cd:before{content:"\e201"} +.glyphicon-save-file:before{content:"\e202"} +.glyphicon-open-file:before{content:"\e203"} +.glyphicon-level-up:before{content:"\e204"} +.glyphicon-copy:before{content:"\e205"} +.glyphicon-paste:before{content:"\e206"} +.glyphicon-alert:before{content:"\e209"} +.glyphicon-equalizer:before{content:"\e210"} +.glyphicon-king:before{content:"\e211"} +.glyphicon-queen:before{content:"\e212"} +.glyphicon-pawn:before{content:"\e213"} +.glyphicon-bishop:before{content:"\e214"} +.glyphicon-knight:before{content:"\e215"} +.glyphicon-baby-formula:before{content:"\e216"} +.glyphicon-tent:before{content:"\26fa"} +.glyphicon-blackboard:before{content:"\e218"} +.glyphicon-bed:before{content:"\e219"} +.glyphicon-apple:before{content:"\f8ff"} +.glyphicon-erase:before{content:"\e221"} +.glyphicon-hourglass:before{content:"\231b"} +.glyphicon-lamp:before{content:"\e223"} +.glyphicon-duplicate:before{content:"\e224"} +.glyphicon-piggy-bank:before{content:"\e225"} +.glyphicon-scissors:before{content:"\e226"} +.glyphicon-bitcoin:before,.glyphicon-btc:before,.glyphicon-xbt:before{content:"\e227"} +.glyphicon-jpy:before,.glyphicon-yen:before{content:"\00a5"} +.glyphicon-rub:before,.glyphicon-ruble:before{content:"\20bd"} +.glyphicon-scale:before{content:"\e230"} +.glyphicon-ice-lolly:before{content:"\e231"} +.glyphicon-ice-lolly-tasted:before{content:"\e232"} +.glyphicon-education:before{content:"\e233"} +.glyphicon-option-horizontal:before{content:"\e234"} +.glyphicon-option-vertical:before{content:"\e235"} +.glyphicon-menu-hamburger:before{content:"\e236"} +.glyphicon-modal-window:before{content:"\e237"} +.glyphicon-oil:before{content:"\e238"} +.glyphicon-grain:before{content:"\e239"} +.glyphicon-sunglasses:before{content:"\e240"} +.glyphicon-text-size:before{content:"\e241"} +.glyphicon-text-color:before{content:"\e242"} +.glyphicon-text-background:before{content:"\e243"} +.glyphicon-object-align-top:before{content:"\e244"} +.glyphicon-object-align-bottom:before{content:"\e245"} +.glyphicon-object-align-horizontal:before{content:"\e246"} +.glyphicon-object-align-left:before{content:"\e247"} +.glyphicon-object-align-vertical:before{content:"\e248"} +.glyphicon-object-align-right:before{content:"\e249"} +.glyphicon-triangle-right:before{content:"\e250"} +.glyphicon-triangle-left:before{content:"\e251"} +.glyphicon-triangle-bottom:before{content:"\e252"} +.glyphicon-triangle-top:before{content:"\e253"} +.glyphicon-console:before{content:"\e254"} +.glyphicon-superscript:before{content:"\e255"} +.glyphicon-subscript:before{content:"\e256"} +.glyphicon-menu-left:before{content:"\e257"} +.glyphicon-menu-right:before{content:"\e258"} +.glyphicon-menu-down:before{content:"\e259"} +.glyphicon-menu-up:before{content:"\e260"} +*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box} +body{font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333} +button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit} +a{color:#2a9fd6;text-decoration:none} +a:focus,a:hover{color:#1d7097;text-decoration:none} +a:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px} +.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto} +.img-rounded{border-radius:6px} +.img-thumbnail{padding:4px;line-height:1.42857143;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out;display:inline-block;max-width:100%;height:auto} +.img-circle{border-radius:50%} +hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee} +.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0} +.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto} +[role=button]{cursor:pointer} +.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:#333} +.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777} +.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px} +.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%} +.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px} +.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%} +.h1,h1{font-size:36px} +.h2,h2{font-size:30px} +.h3,h3{font-size:24px} +.h4,h4{font-size:18px} +.h5,h5{font-size:14px} +.h6,h6{font-size:12px} +p{margin:0 0 10px} +.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4} +address,blockquote .small,blockquote footer,blockquote small,dd,dt,pre{line-height:1.42857143} +dt,kbd kbd,label{font-weight:700} +@media (min-width:768px){.lead{font-size:21px} +} +.small,small{font-size:85%} +.mark,mark{background-color:#f80;padding:.2em} +.list-inline,.list-unstyled{list-style:none;padding-left:0} +.text-left{text-align:left} +.text-right{text-align:right} +.text-center{text-align:center} +.text-justify{text-align:justify} +.text-nowrap{white-space:nowrap} +.text-lowercase{text-transform:lowercase} +.text-uppercase{text-transform:uppercase} +.text-capitalize{text-transform:capitalize} +.text-muted{color:#777} +.text-primary{color:#2a9fd6} +a.text-primary:focus,a.text-primary:hover{color:#2180ac} +a.text-success:focus,a.text-success:hover{color:#2b542c} +a.text-info:focus,a.text-info:hover{color:#245269} +a.text-warning:focus,a.text-warning:hover{color:#66512c} +a.text-danger:focus,a.text-danger:hover{color:#843534} +.bg-primary{color:#fff;background-color:#2a9fd6} +a.bg-primary:focus,a.bg-primary:hover{background-color:#2180ac} +.bg-success{background-color:#77b300} +a.bg-success:focus,a.bg-success:hover{background-color:#558000} +.bg-info{background-color:#93c} +a.bg-info:focus,a.bg-info:hover{background-color:#7a29a3} +.bg-warning{background-color:#f80} +a.bg-warning:focus,a.bg-warning:hover{background-color:#cc6d00} +.bg-danger{background-color:#c00} +a.bg-danger:focus,a.bg-danger:hover{background-color:#900} +pre code,table{background-color:transparent} +.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee} +dl,ol,ul{margin-top:0} +ol,ul{margin-bottom:10px} +ol ol,ol ul,ul ol,ul ul{margin-bottom:0} +.list-inline{margin-left:-5px} +.list-inline>li{display:inline-block;padding-left:5px;padding-right:5px} +dl{margin-bottom:20px} +dd{margin-left:0} +@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap} +.dl-horizontal dd{margin-left:180px} +} +abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777} +.initialism{font-size:90%;text-transform:uppercase} +blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee} +blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0} +blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;color:#777} +blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'} +.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0;text-align:right} +caption,th{text-align:left} +code,kbd{padding:2px 4px;font-size:90%} +.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''} +.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'} +address{margin-bottom:20px;font-style:normal} +code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace} +code{color:#c7254e;background-color:#f9f2f4;border-radius:4px} +kbd{color:#333;background-color:#fff;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)} +kbd kbd{padding:0;font-size:100%;box-shadow:none} +pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;word-break:break-all;word-wrap:break-word;color:#333;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px} +.container,.container-fluid{margin-right:auto;margin-left:auto} +pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;border-radius:0} +.container,.container-fluid{padding-left:15px;padding-right:15px} +.pre-scrollable{overflow-y:scroll} +@media (min-width:768px){.container{width:750px} +} +@media (min-width:992px){.container{width:970px} +} +@media (min-width:1200px){.container{width:1170px} +} +.row{margin-left:-15px;margin-right:-15px} +.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-left:15px;padding-right:15px} +.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left} +.col-xs-12{width:100%} +.col-xs-11{width:91.66666667%} +.col-xs-10{width:83.33333333%} +.col-xs-9{width:75%} +.col-xs-8{width:66.66666667%} +.col-xs-7{width:58.33333333%} +.col-xs-6{width:50%} +.col-xs-5{width:41.66666667%} +.col-xs-4{width:33.33333333%} +.col-xs-3{width:25%} +.col-xs-2{width:16.66666667%} +.col-xs-1{width:8.33333333%} +.col-xs-pull-12{right:100%} +.col-xs-pull-11{right:91.66666667%} +.col-xs-pull-10{right:83.33333333%} +.col-xs-pull-9{right:75%} +.col-xs-pull-8{right:66.66666667%} +.col-xs-pull-7{right:58.33333333%} +.col-xs-pull-6{right:50%} +.col-xs-pull-5{right:41.66666667%} +.col-xs-pull-4{right:33.33333333%} +.col-xs-pull-3{right:25%} +.col-xs-pull-2{right:16.66666667%} +.col-xs-pull-1{right:8.33333333%} +.col-xs-pull-0{right:auto} +.col-xs-push-12{left:100%} +.col-xs-push-11{left:91.66666667%} +.col-xs-push-10{left:83.33333333%} +.col-xs-push-9{left:75%} +.col-xs-push-8{left:66.66666667%} +.col-xs-push-7{left:58.33333333%} +.col-xs-push-6{left:50%} +.col-xs-push-5{left:41.66666667%} +.col-xs-push-4{left:33.33333333%} +.col-xs-push-3{left:25%} +.col-xs-push-2{left:16.66666667%} +.col-xs-push-1{left:8.33333333%} +.col-xs-push-0{left:auto} +.col-xs-offset-12{margin-left:100%} +.col-xs-offset-11{margin-left:91.66666667%} +.col-xs-offset-10{margin-left:83.33333333%} +.col-xs-offset-9{margin-left:75%} +.col-xs-offset-8{margin-left:66.66666667%} +.col-xs-offset-7{margin-left:58.33333333%} +.col-xs-offset-6{margin-left:50%} +.col-xs-offset-5{margin-left:41.66666667%} +.col-xs-offset-4{margin-left:33.33333333%} +.col-xs-offset-3{margin-left:25%} +.col-xs-offset-2{margin-left:16.66666667%} +.col-xs-offset-1{margin-left:8.33333333%} +.col-xs-offset-0{margin-left:0} +@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left} +.col-sm-12{width:100%} +.col-sm-11{width:91.66666667%} +.col-sm-10{width:83.33333333%} +.col-sm-9{width:75%} +.col-sm-8{width:66.66666667%} +.col-sm-7{width:58.33333333%} +.col-sm-6{width:50%} +.col-sm-5{width:41.66666667%} +.col-sm-4{width:33.33333333%} +.col-sm-3{width:25%} +.col-sm-2{width:16.66666667%} +.col-sm-1{width:8.33333333%} +.col-sm-pull-12{right:100%} +.col-sm-pull-11{right:91.66666667%} +.col-sm-pull-10{right:83.33333333%} +.col-sm-pull-9{right:75%} +.col-sm-pull-8{right:66.66666667%} +.col-sm-pull-7{right:58.33333333%} +.col-sm-pull-6{right:50%} +.col-sm-pull-5{right:41.66666667%} +.col-sm-pull-4{right:33.33333333%} +.col-sm-pull-3{right:25%} +.col-sm-pull-2{right:16.66666667%} +.col-sm-pull-1{right:8.33333333%} +.col-sm-pull-0{right:auto} +.col-sm-push-12{left:100%} +.col-sm-push-11{left:91.66666667%} +.col-sm-push-10{left:83.33333333%} +.col-sm-push-9{left:75%} +.col-sm-push-8{left:66.66666667%} +.col-sm-push-7{left:58.33333333%} +.col-sm-push-6{left:50%} +.col-sm-push-5{left:41.66666667%} +.col-sm-push-4{left:33.33333333%} +.col-sm-push-3{left:25%} +.col-sm-push-2{left:16.66666667%} +.col-sm-push-1{left:8.33333333%} +.col-sm-push-0{left:auto} +.col-sm-offset-12{margin-left:100%} +.col-sm-offset-11{margin-left:91.66666667%} +.col-sm-offset-10{margin-left:83.33333333%} +.col-sm-offset-9{margin-left:75%} +.col-sm-offset-8{margin-left:66.66666667%} +.col-sm-offset-7{margin-left:58.33333333%} +.col-sm-offset-6{margin-left:50%} +.col-sm-offset-5{margin-left:41.66666667%} +.col-sm-offset-4{margin-left:33.33333333%} +.col-sm-offset-3{margin-left:25%} +.col-sm-offset-2{margin-left:16.66666667%} +.col-sm-offset-1{margin-left:8.33333333%} +.col-sm-offset-0{margin-left:0} +} +@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left} +.col-md-12{width:100%} +.col-md-11{width:91.66666667%} +.col-md-10{width:83.33333333%} +.col-md-9{width:75%} +.col-md-8{width:66.66666667%} +.col-md-7{width:58.33333333%} +.col-md-6{width:50%} +.col-md-5{width:41.66666667%} +.col-md-4{width:33.33333333%} +.col-md-3{width:25%} +.col-md-2{width:16.66666667%} +.col-md-1{width:8.33333333%} +.col-md-pull-12{right:100%} +.col-md-pull-11{right:91.66666667%} +.col-md-pull-10{right:83.33333333%} +.col-md-pull-9{right:75%} +.col-md-pull-8{right:66.66666667%} +.col-md-pull-7{right:58.33333333%} +.col-md-pull-6{right:50%} +.col-md-pull-5{right:41.66666667%} +.col-md-pull-4{right:33.33333333%} +.col-md-pull-3{right:25%} +.col-md-pull-2{right:16.66666667%} +.col-md-pull-1{right:8.33333333%} +.col-md-pull-0{right:auto} +.col-md-push-12{left:100%} +.col-md-push-11{left:91.66666667%} +.col-md-push-10{left:83.33333333%} +.col-md-push-9{left:75%} +.col-md-push-8{left:66.66666667%} +.col-md-push-7{left:58.33333333%} +.col-md-push-6{left:50%} +.col-md-push-5{left:41.66666667%} +.col-md-push-4{left:33.33333333%} +.col-md-push-3{left:25%} +.col-md-push-2{left:16.66666667%} +.col-md-push-1{left:8.33333333%} +.col-md-push-0{left:auto} +.col-md-offset-12{margin-left:100%} +.col-md-offset-11{margin-left:91.66666667%} +.col-md-offset-10{margin-left:83.33333333%} +.col-md-offset-9{margin-left:75%} +.col-md-offset-8{margin-left:66.66666667%} +.col-md-offset-7{margin-left:58.33333333%} +.col-md-offset-6{margin-left:50%} +.col-md-offset-5{margin-left:41.66666667%} +.col-md-offset-4{margin-left:33.33333333%} +.col-md-offset-3{margin-left:25%} +.col-md-offset-2{margin-left:16.66666667%} +.col-md-offset-1{margin-left:8.33333333%} +.col-md-offset-0{margin-left:0} +} +@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left} +.col-lg-12{width:100%} +.col-lg-11{width:91.66666667%} +.col-lg-10{width:83.33333333%} +.col-lg-9{width:75%} +.col-lg-8{width:66.66666667%} +.col-lg-7{width:58.33333333%} +.col-lg-6{width:50%} +.col-lg-5{width:41.66666667%} +.col-lg-4{width:33.33333333%} +.col-lg-3{width:25%} +.col-lg-2{width:16.66666667%} +.col-lg-1{width:8.33333333%} +.col-lg-pull-12{right:100%} +.col-lg-pull-11{right:91.66666667%} +.col-lg-pull-10{right:83.33333333%} +.col-lg-pull-9{right:75%} +.col-lg-pull-8{right:66.66666667%} +.col-lg-pull-7{right:58.33333333%} +.col-lg-pull-6{right:50%} +.col-lg-pull-5{right:41.66666667%} +.col-lg-pull-4{right:33.33333333%} +.col-lg-pull-3{right:25%} +.col-lg-pull-2{right:16.66666667%} +.col-lg-pull-1{right:8.33333333%} +.col-lg-pull-0{right:auto} +.col-lg-push-12{left:100%} +.col-lg-push-11{left:91.66666667%} +.col-lg-push-10{left:83.33333333%} +.col-lg-push-9{left:75%} +.col-lg-push-8{left:66.66666667%} +.col-lg-push-7{left:58.33333333%} +.col-lg-push-6{left:50%} +.col-lg-push-5{left:41.66666667%} +.col-lg-push-4{left:33.33333333%} +.col-lg-push-3{left:25%} +.col-lg-push-2{left:16.66666667%} +.col-lg-push-1{left:8.33333333%} +.col-lg-push-0{left:auto} +.col-lg-offset-12{margin-left:100%} +.col-lg-offset-11{margin-left:91.66666667%} +.col-lg-offset-10{margin-left:83.33333333%} +.col-lg-offset-9{margin-left:75%} +.col-lg-offset-8{margin-left:66.66666667%} +.col-lg-offset-7{margin-left:58.33333333%} +.col-lg-offset-6{margin-left:50%} +.col-lg-offset-5{margin-left:41.66666667%} +.col-lg-offset-4{margin-left:33.33333333%} +.col-lg-offset-3{margin-left:25%} +.col-lg-offset-2{margin-left:16.66666667%} +.col-lg-offset-1{margin-left:8.33333333%} +.col-lg-offset-0{margin-left:0} +} +caption{padding-top:8px;padding-bottom:8px;color:#777} +.table{width:100%;max-width:100%;margin-bottom:20px;} +.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd} +.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd} +.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0} +.table>tbody+tbody{border-top:2px solid #ddd} +.table .table{background-color:#f1f1f1} +.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px} +.table-bordered,.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd} +.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px} +.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9} +.table-hover>tbody>tr:hover,.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5;color:#333} +table col[class*=col-]{position:static;float:none;display:table-column} +table td[class*=col-],table th[class*=col-]{position:static;float:none;display:table-cell} +.btn-group>.btn-group,.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group,.dropdown-menu{float:left} +.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8;color: #777;} +.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#77b300} +.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#669a00} +.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#93c} +.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#8a2eb8} +.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#f80} +.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#e67a00} +.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#c00} +.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#b30000} +.table-responsive{overflow-x:auto;min-height:.01%} +@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd} +.table-responsive>.table{margin-bottom:0} +.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap} +.table-responsive>.table-bordered{border:0} +.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0} +.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0} +.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0} +} +fieldset,legend{padding:0;border:0} +fieldset{margin:0;min-width:0} +legend{display:block;width:100%;margin-bottom:20px;font-size:21px;line-height:inherit;border-bottom:1px solid #e5e5e5} +label{display:inline-block;max-width:100%;margin-bottom:5px} +input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:none} +input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal} +.form-control,output{display:block;font-size:14px;line-height:1.42857143;color:#555} +input[type=file]{display:block} +input[type=range]{display:block;width:100%} +select[multiple],select[size]{height:auto} +input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px} +output{padding-top:7px} +.form-control{width:100%;height:34px;padding:6px 12px;background-color:#f0f0f0;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s} +.form-control:focus{border-color:#2a9fd6;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(42,159,214,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(42,159,214,.6)} +.form-control::-moz-placeholder{color:#999;opacity:1} +.form-control:-ms-input-placeholder{color:#999} +.form-control::-webkit-input-placeholder{color:#999} +.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1} +.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed} +textarea.form-control{height:auto} +@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=time].form-control,input[type=datetime-local].form-control,input[type=month].form-control{line-height:34px} +.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px} +.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px} +} +.form-group{margin-bottom:15px} +.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px} +.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer} +.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-left:-20px;margin-top:4px\9} +.checkbox+.checkbox,.radio+.radio{margin-top:-5px} +.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:400;cursor:pointer} +.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px} +.checkbox-inline.disabled,.checkbox.disabled label,.radio-inline.disabled,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio label,fieldset[disabled] .radio-inline,fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed} +.form-control-static{padding-top:7px;padding-bottom:7px;margin-bottom:0;min-height:34px} +.form-control-static.input-lg,.form-control-static.input-sm{padding-left:0;padding-right:0} +.form-group-sm .form-control,.input-sm{font-size:12px;padding:5px 10px;border-radius:3px} +.input-sm{height:30px;line-height:1.5} +select.input-sm{height:30px;line-height:30px} +select[multiple].input-sm,textarea.input-sm{height:auto} +.form-group-sm .form-control{height:30px;line-height:1.5} +.form-group-sm select.form-control{height:30px;line-height:30px} +.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto} +.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5} +.form-group-lg .form-control,.input-lg{font-size:18px;padding:10px 16px;border-radius:6px} +.input-lg{height:46px;line-height:1.3333333} +select.input-lg{height:46px;line-height:46px} +select[multiple].input-lg,textarea.input-lg{height:auto} +.form-group-lg .form-control{height:46px;line-height:1.3333333} +.form-group-lg select.form-control{height:46px;line-height:46px} +.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto} +.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333} +.has-feedback{position:relative} +.has-feedback .form-control{padding-right:42.5px} +.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none} +.collapsing,.dropdown,.dropup{position:relative} +.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px} +.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px} +.has-success .form-control{-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)} +.has-success .form-control:focus{-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168} +.has-success .input-group-addon{color:#3c763d;background-color:#77b300} +.has-warning .form-control{-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)} +.has-warning .form-control:focus{-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b} +.has-warning .input-group-addon{color:#8a6d3b;background-color:#f80} +.has-error .form-control{-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)} +.has-error .form-control:focus{-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483} +.has-error .input-group-addon{color:#a94442;background-color:#c00} +.has-feedback label~.form-control-feedback{top:25px} +.has-feedback label.sr-only~.form-control-feedback{top:0} +.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373} +@media (min-width:768px){.form-inline .form-control-static,.form-inline .form-group{display:inline-block} +.form-inline .control-label,.form-inline .form-group{margin-bottom:0;vertical-align:middle} +.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle} +.form-inline .input-group{display:inline-table;vertical-align:middle} +.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto} +.form-inline .input-group>.form-control{width:100%} +.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle} +.form-inline .checkbox label,.form-inline .radio label{padding-left:0} +.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0} +.form-inline .has-feedback .form-control-feedback{top:0} +} +.btn-block,input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%} +.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{margin-top:0;margin-bottom:0;padding-top:7px} +.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px} +.form-horizontal .form-group{margin-left:-15px;margin-right:-15px} +.form-horizontal .has-feedback .form-control-feedback{right:15px} +@media (min-width:768px){.form-horizontal .control-label{text-align:right;margin-bottom:0;padding-top:7px} +.form-horizontal .form-group-lg .control-label{padding-top:14.33px;font-size:18px} +.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px} +} +.btn{display:inline-block;margin-bottom:0;font-weight:400;text-align:center;vertical-align:middle;touch-action:manipulation;cursor:pointer;border:1px solid transparent;white-space:nowrap;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none} +.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px} +.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none} +.btn.active,.btn:active{outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)} +.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none} +a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none} +.btn-default{color:#333;background-color:#fff;border-color:#ccc} +.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c} +.btn-default.active,.btn-default:active,.btn-default:hover,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad} +.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c} +.btn-default.disabled,.btn-default.disabled.active,.btn-default.disabled.focus,.btn-default.disabled:active,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled],.btn-default[disabled].active,.btn-default[disabled].focus,.btn-default[disabled]:active,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default.active,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc} +.btn-default .badge{color:#fff;background-color:#333} +.btn-primary{color:#fff;background-color:#2a9fd6;border-color:#258fc1} +.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#2180ac;border-color:#114056} +.btn-primary.active,.btn-primary:active,.btn-primary:hover,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#2180ac;border-color:#1b698e} +.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#1b698e;border-color:#114056} +.btn-primary.disabled,.btn-primary.disabled.active,.btn-primary.disabled.focus,.btn-primary.disabled:active,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled],.btn-primary[disabled].active,.btn-primary[disabled].focus,.btn-primary[disabled]:active,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-primary.active,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:active,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#2a9fd6;border-color:#258fc1} +.btn-primary .badge{color:#2a9fd6;background-color:#fff} +.btn-success{color:#fff;background-color:#77b300;border-color:#669a00} +.btn-success.focus,.btn-success:focus{color:#fff;background-color:#558000;border-color:#111a00} +.btn-success.active,.btn-success:active,.btn-success:hover,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#558000;border-color:#3d5c00} +.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#3d5c00;border-color:#111a00} +.btn-success.disabled,.btn-success.disabled.active,.btn-success.disabled.focus,.btn-success.disabled:active,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled],.btn-success[disabled].active,.btn-success[disabled].focus,.btn-success[disabled]:active,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success,fieldset[disabled] .btn-success.active,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:active,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#77b300;border-color:#669a00} +.btn-success .badge{color:#77b300;background-color:#fff} +.btn-info{color:#fff;background-color:#93c;border-color:#8a2eb8} +.btn-info.focus,.btn-info:focus{color:#fff;background-color:#7a29a3;border-color:#3d1452} +.btn-info.active,.btn-info:active,.btn-info:hover,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#7a29a3;border-color:#652287} +.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#652287;border-color:#3d1452} +.btn-info.disabled,.btn-info.disabled.active,.btn-info.disabled.focus,.btn-info.disabled:active,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled],.btn-info[disabled].active,.btn-info[disabled].focus,.btn-info[disabled]:active,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info,fieldset[disabled] .btn-info.active,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:active,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#93c;border-color:#8a2eb8} +.btn-info .badge{color:#93c;background-color:#fff} +.btn-warning{color:#fff;background-color:#f80;border-color:#e67a00} +.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#cc6d00;border-color:#663600} +.btn-warning.active,.btn-warning:active,.btn-warning:hover,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#cc6d00;border-color:#a85a00} +.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#a85a00;border-color:#663600} +.btn-warning.disabled,.btn-warning.disabled.active,.btn-warning.disabled.focus,.btn-warning.disabled:active,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled],.btn-warning[disabled].active,.btn-warning[disabled].focus,.btn-warning[disabled]:active,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-warning.active,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:active,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f80;border-color:#e67a00} +.btn-warning .badge{color:#f80;background-color:#fff} +.btn-danger{color:#fff;background-color:#c00;border-color:#b30000} +.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#900;border-color:#300} +.btn-danger.active,.btn-danger:active,.btn-danger:hover,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#900;border-color:#750000} +.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#750000;border-color:#300} +.btn-danger.disabled,.btn-danger.disabled.active,.btn-danger.disabled.focus,.btn-danger.disabled:active,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled],.btn-danger[disabled].active,.btn-danger[disabled].focus,.btn-danger[disabled]:active,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger,fieldset[disabled] .btn-danger.active,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:active,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#c00;border-color:#b30000} +.btn-danger .badge{color:#c00;background-color:#fff} +.btn-link{color:#2a9fd6;font-weight:400;border-radius:0} +.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none} +.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent} +.btn-link:focus,.btn-link:hover{color:#1d7097;text-decoration:none;background-color:transparent} +.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none} +.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px} +.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px} +.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px} +.btn-block{display:block} +.btn-block+.btn-block{margin-top:5px} +.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear} +.fade.in{opacity:1} +.collapse{display:none} +.collapse.in{display:block} +tr.collapse.in{display:table-row} +tbody.collapse.in{display:table-row-group} +.collapsing{height:0;overflow:hidden;-webkit-transition-property:height,visibility;transition-property:height,visibility;-webkit-transition-duration:.35s;transition-duration:.35s;-webkit-transition-timing-function:ease;transition-timing-function:ease} +.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\9;border-right:4px solid transparent;border-left:4px solid transparent} +.dropdown-toggle:focus{outline:0} +.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;font-size:14px;text-align:left;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175);background-clip:padding-box} +.btn-group-vertical>.btn:not(:first-child):not(:last-child),.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn,.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0} +.dropdown-header,.dropdown-menu>li>a{white-space:nowrap;padding:3px 20px;line-height:1.42857143} +.dropdown-menu-right,.dropdown-menu.pull-right{left:auto;right:0} +.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5} +.dropdown-menu>li>a{display:block;clear:both;font-weight:400;color:#333} +.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{text-decoration:none;color:#fff;background-color:#2a9fd6} +.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;outline:0;background-color:#2a9fd6} +.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777} +.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);cursor:not-allowed} +.open>.dropdown-menu{display:block} +.open>a{outline:0} +.dropdown-menu-left{left:0;right:auto} +.dropdown-header{display:block;font-size:12px;color:#777} +.dropdown-backdrop{position:fixed;left:0;right:0;bottom:0;top:0;z-index:990} +.nav-justified>.dropdown .dropdown-menu,.nav-tabs.nav-justified>.dropdown .dropdown-menu{left:auto;top:auto} +.pull-right>.dropdown-menu{right:0;left:auto} +.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9;content:""} +.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px} +@media (min-width:768px){.navbar-right .dropdown-menu{left:auto;right:0} +.navbar-right .dropdown-menu-left{left:0;right:auto} +} +.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle} +.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left} +.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2} +.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px} +.btn-toolbar{margin-left:-5px} +.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px} +.btn .caret,.btn-group>.btn:first-child{margin-left:0} +.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0} +.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0} +.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-top-right-radius:0} +.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0} +.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0} +.btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px} +.btn-group>.btn-lg+.dropdown-toggle{padding-left:12px;padding-right:12px} +.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)} +.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none} +.btn-lg .caret{border-width:5px 5px 0} +.dropup .btn-lg .caret{border-width:0 5px 5px} +.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%} +.btn-group-vertical>.btn-group>.btn{float:none} +.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0} +.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0} +.btn-group-vertical>.btn:last-child:not(:first-child){border-bottom-left-radius:4px;border-top-right-radius:0;border-top-left-radius:0} +.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0} +.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0} +.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-right-radius:0;border-top-left-radius:0} +.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate} +.btn-group-justified>.btn,.btn-group-justified>.btn-group{float:none;display:table-cell;width:1%} +.btn-group-justified>.btn-group .btn{width:100%} +.btn-group-justified>.btn-group .dropdown-menu{left:auto} +[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none} +.input-group{position:relative;display:table;border-collapse:separate} +.input-group[class*=col-]{float:none;padding-left:0;padding-right:0} +.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0} +.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px} +select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px} +select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto} +.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px} +select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px} +select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto} +.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell} +.nav>li,.nav>li>a{position:relative;display:block} +.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0} +.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle} +.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;border:1px solid #ccc;border-radius:4px} +.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px} +.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px} +.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0} +.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0} +.input-group-addon:first-child{border-right:0} +.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-bottom-left-radius:0;border-top-left-radius:0} +.input-group-addon:last-child{border-left:0} +.input-group-btn{position:relative;font-size:0;white-space:nowrap} +.input-group-btn>.btn{position:relative} +.input-group-btn>.btn+.btn{margin-left:-1px} +.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2} +.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px} +.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px} +.nav{margin-bottom:0;padding-left:0;list-style:none} +.nav>li>a{padding:10px 15px} +.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee} +.nav>li.disabled>a{color:#777} +.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;background-color:transparent;cursor:not-allowed} +.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#2a9fd6} +.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5} +.nav>li>a>img{max-width:none} +.nav-tabs{border-bottom:1px solid #ddd} +.nav-tabs>li{float:left;margin-bottom:-1px} +.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0} +.nav-tabs>li>a:hover{border-color:#eee #eee #ddd} +.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;background-color:#f1f1f1;border:1px solid #ddd;border-bottom-color:transparent;cursor:default} +.nav-tabs.nav-justified{width:100%;border-bottom:0} +.nav-tabs.nav-justified>li{float:none} +.nav-tabs.nav-justified>li>a{text-align:center;margin-bottom:5px;margin-right:0;border-radius:4px} +.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd} +@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%} +.nav-tabs.nav-justified>li>a{margin-bottom:0;border-bottom:1px solid #ddd;border-radius:4px 4px 0 0} +.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#f1f1f1} +} +.nav-pills>li{float:left} +.nav-justified>li,.nav-stacked>li{float:none} +.nav-pills>li>a{border-radius:4px} +.nav-pills>li+li{margin-left:2px} +.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#2a9fd6} +.nav-stacked>li+li{margin-top:2px;margin-left:0} +.nav-justified{width:100%} +.nav-justified>li>a{text-align:center;margin-bottom:5px} +.nav-tabs-justified{border-bottom:0} +.nav-tabs-justified>li>a{margin-right:0;border-radius:4px} +.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd} +@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%} +.nav-justified>li>a{margin-bottom:0} +.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0} +.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#f1f1f1} +} +.tab-content>.tab-pane{display:none} +.tab-content>.active{display:block} +.nav-tabs .dropdown-menu{margin-top:-1px;border-top-right-radius:0;border-top-left-radius:0} +.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent} +.navbar-collapse{overflow-x:visible;padding-right:15px;padding-left:15px;border-top:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,.1);-webkit-overflow-scrolling:touch} +.navbar-collapse.in{overflow-y:auto} +@media (min-width:768px){.navbar{border-radius:4px} +.navbar-header{float:left} +.navbar-collapse{width:auto;border-top:0;box-shadow:none} +.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important} +.navbar-collapse.in{overflow-y:visible} +.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-left:0;padding-right:0} +} +.embed-responsive,.modal,.modal-open,.progress{overflow:hidden} +@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px} +} +.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px} +.navbar-static-top{z-index:1000;border-width:0 0 1px} +.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030} +.navbar-fixed-top{top:0;border-width:0 0 1px} +.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0} +.navbar-brand{float:left;padding:15px;font-size:18px;line-height:20px;height:50px} +.navbar-brand:focus,.navbar-brand:hover{text-decoration:none} +.navbar-brand>img{display:block} +@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0} +.navbar-fixed-bottom,.navbar-fixed-top,.navbar-static-top{border-radius:0} +.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px} +} +.navbar-toggle{position:relative;float:right;margin-right:15px;padding:9px 10px;margin-top:8px;margin-bottom:8px;background-color:transparent;border:1px solid transparent;border-radius:4px} +.navbar-toggle:focus{outline:0} +.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px} +.navbar-toggle .icon-bar+.icon-bar{margin-top:4px} +.navbar-nav{margin:7.5px -15px} +.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px} +@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none} +.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px} +.navbar-nav .open .dropdown-menu>li>a{line-height:20px} +.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none} +} +.progress-bar-striped,.progress-striped .progress-bar,.progress-striped .progress-bar-danger,.progress-striped .progress-bar-info,.progress-striped .progress-bar-success,.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)} +@media (min-width:768px){.navbar-toggle{display:none} +.navbar-nav{float:left;margin:0} +.navbar-nav>li{float:left} +.navbar-nav>li>a{padding-top:15px;padding-bottom:15px} +} +.navbar-form{padding:10px 15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);margin:8px -15px} +@media (min-width:768px){.navbar-form .form-control-static,.navbar-form .form-group{display:inline-block} +.navbar-form .control-label,.navbar-form .form-group{margin-bottom:0;vertical-align:middle} +.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle} +.navbar-form .input-group{display:inline-table;vertical-align:middle} +.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto} +.navbar-form .input-group>.form-control{width:100%} +.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle} +.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0} +.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0} +.navbar-form .has-feedback .form-control-feedback{top:0} +} +.btn .badge,.btn .label{position:relative;top:-1px} +.breadcrumb>li,.pagination{display:inline-block} +@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px} +.navbar-form .form-group:last-child{margin-bottom:0} +} +@media (min-width:768px){.navbar-form{width:auto;border:0;margin-left:0;margin-right:0;padding-top:0;padding-bottom:0;-webkit-box-shadow:none;box-shadow:none} +} +.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-right-radius:0;border-top-left-radius:0} +.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-radius:4px 4px 0 0} +.navbar-btn{margin-top:8px;margin-bottom:8px} +.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px} +.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px} +.navbar-text{margin-top:15px;margin-bottom:15px} +@media (min-width:768px){.navbar-text{float:left;margin-left:15px;margin-right:15px} +.navbar-left{float:left!important} +.navbar-right{float:right!important;margin-right:-15px} +.navbar-right~.navbar-right{margin-right:0} +} +.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7} +.navbar-default .navbar-brand{color:#000} +.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent} +.navbar-default .navbar-nav>li>a,.navbar-default .navbar-text{color:#2a9fd6} +.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#fff;background-color:#2a9fd6} +.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#fff;background-color:#2a9fd6} +.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent} +.navbar-default .navbar-toggle{border-color:#2a9fd6} +.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#2a9fd6} +.navbar-default .navbar-toggle .icon-bar{background-color:#2a9fd6} +.navbar-default .navbar-toggle:hover .icon-bar, .navbar-default .navbar-toggle:focus .icon-bar{background-color:#fff} +.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7} +.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{background-color:#2a9fd6;color:#fff} +@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777} +.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent} +.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7} +.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent} +} +.navbar-default .navbar-link{color:#777} +.navbar-default .navbar-link:hover{color:#333} +.navbar-default .btn-link{color:#777} +.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333} +.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc} +.navbar-inverse{background-color:#2A9FD6;border-color:#258fc1} +.navbar-inverse .navbar-brand{color:#fff} +.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent} +.navbar-inverse .navbar-nav>li>a,.navbar-inverse .navbar-text{color:#fff} +.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent} +.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#258fc1} +.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent} +.navbar-inverse .navbar-toggle{border-color:#333} +.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333} +.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff} +.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010} +.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{background-color:#258fc1;color:#fff} +@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#258fc1} +.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#258fc1} +.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d} +.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent} +.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808} +.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent} +} +.navbar-inverse .navbar-link{color:#9d9d9d} +.navbar-inverse .navbar-link:hover{color:#fff} +.navbar-inverse .btn-link{color:#9d9d9d} +.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff} +.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444} +.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px} +.breadcrumb>li+li:before{content:"/\00a0";padding:0 5px;color:#ccc} +.breadcrumb>.active{color:#777} +.pagination{padding-left:0;margin:20px 0;border-radius:4px} +.pager li,.pagination>li{display:inline} +.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;line-height:1.42857143;text-decoration:none;color:#2a9fd6;background-color:#fff;border:1px solid #ddd;margin-left:-1px} +.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-bottom-left-radius:4px;border-top-left-radius:4px} +.pagination>li:last-child>a,.pagination>li:last-child>span{border-bottom-right-radius:4px;border-top-right-radius:4px} +.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:3;color:#1d7097;background-color:#eee;border-color:#ddd} +.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:2;color:#fff;background-color:#2a9fd6;border-color:#2a9fd6;cursor:default} +.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;background-color:#fff;border-color:#ddd;cursor:not-allowed} +.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333} +.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-bottom-left-radius:6px;border-top-left-radius:6px} +.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-bottom-right-radius:6px;border-top-right-radius:6px} +.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5} +.badge,.label{text-align:center;font-weight:700;line-height:1;white-space:nowrap} +.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-bottom-left-radius:3px;border-top-left-radius:3px} +.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-bottom-right-radius:3px;border-top-right-radius:3px} +.pager{padding-left:0;margin:20px 0;list-style:none;text-align:center} +.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px} +.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee} +.pager .next>a,.pager .next>span{float:right} +.pager .previous>a,.pager .previous>span{float:left} +.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;background-color:#fff;cursor:not-allowed} +.label{display:inline;padding:.2em .6em .3em;font-size:75%;color:#fff;vertical-align:baseline;border-radius:.25em} +a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer} +.label:empty{display:none} +.label-default{background-color:#777} +.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e} +.label-primary{background-color:#2a9fd6} +.label-primary[href]:focus,.label-primary[href]:hover{background-color:#2180ac} +.label-success{background-color:#77b300} +.label-success[href]:focus,.label-success[href]:hover{background-color:#558000} +.label-info{background-color:#93c} +.label-info[href]:focus,.label-info[href]:hover{background-color:#7a29a3} +.label-warning{background-color:#f80} +.label-warning[href]:focus,.label-warning[href]:hover{background-color:#cc6d00} +.label-danger{background-color:#c00} +.label-danger[href]:focus,.label-danger[href]:hover{background-color:#900} +.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;color:#fff;vertical-align:middle;background-color:#777;border-radius:10px} +.badge:empty{display:none} +.media-object,.thumbnail{display:block} +.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px} +a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer} +.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#2a9fd6;background-color:#fff} +.list-group-item>.badge{float:right} +.list-group-item>.badge+.badge{margin-right:5px} +.nav-pills>li>a>.badge{margin-left:3px} +.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;color:inherit;background-color:#eee} +.jumbotron .h1,.jumbotron h1{color:#333} +.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200} +.alert .alert-link,.close{font-weight:700} +.alert,.thumbnail{margin-bottom:20px} +.jumbotron>hr{border-top-color:#d5d5d5} +.container .jumbotron,.container-fluid .jumbotron{border-radius:6px} +.jumbotron .container{max-width:100%} +@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px} +.container .jumbotron,.container-fluid .jumbotron{padding-left:60px;padding-right:60px} +.jumbotron .h1,.jumbotron h1{font-size:63px} +} +.thumbnail{padding:4px;line-height:1.42857143;background-color:#f1f1f1;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out} +.thumbnail a>img,.thumbnail>img{margin-left:auto;margin-right:auto} +.thumbnail .caption{padding:9px;color:#333} +.alert{padding:15px;border:1px solid transparent;border-radius:4px} +.alert h4{margin-top:0;color:inherit} +.alert>p,.alert>ul{margin-bottom:0} +.alert>p+p{margin-top:5px} +.alert-dismissable,.alert-dismissible{padding-right:35px} +.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit} +.modal,.modal-backdrop{right:0;bottom:0;left:0} +.alert-success{background-color:#77b300;border-color:#809a00;color:#fff} +.alert-success hr{border-top-color:#6a8000} +.alert-success .alert-link{color:#e6e6e6} +.alert-info{background-color:#93c;border-color:#6e2caf;color:#fff} +.alert-info hr{border-top-color:#61279b} +.alert-info .alert-link{color:#e6e6e6} +.alert-warning{background-color:#f80;border-color:#e65400;color:#fff} +.alert-warning hr{border-top-color:#cc4b00} +.alert-warning .alert-link{color:#e6e6e6} +.alert-danger{background-color:#c00;border-color:#b3001e;color:#fff} +.alert-danger hr{border-top-color:#99001a} +.alert-danger .alert-link{color:#e6e6e6} +@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0} +to{background-position:0 0} +} +@keyframes progress-bar-stripes{from{background-position:40px 0} +to{background-position:0 0} +} +.progress{height:20px;margin-bottom:20px;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)} +.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#2a9fd6;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease} +.progress-bar-striped,.progress-striped .progress-bar{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:40px 40px} +.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite} +.progress-bar-success{background-color:#77b300} +.progress-striped .progress-bar-success{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)} +.progress-bar-info{background-color:#93c} +.progress-striped .progress-bar-info{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)} +.progress-bar-warning{background-color:#f80} +.progress-striped .progress-bar-warning{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)} +.progress-bar-danger{background-color:#c00} +.progress-striped .progress-bar-danger{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)} +.media{margin-top:15px} +.media:first-child{margin-top:0} +.media,.media-body{zoom:1;overflow:hidden} +.media-body{width:10000px} +.media-object.img-thumbnail{max-width:none} +.media-right,.media>.pull-right{padding-left:10px} +.media-left,.media>.pull-left{padding-right:10px} +.media-body,.media-left,.media-right{display:table-cell;vertical-align:top} +.media-middle{vertical-align:middle} +.media-bottom{vertical-align:bottom} +.media-heading{margin-top:0;margin-bottom:5px} +.media-list{padding-left:0;list-style:none} +.list-group{margin-bottom:20px;padding-left:0} +.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd} +.list-group-item:first-child{border-top-right-radius:4px;border-top-left-radius:4px} +.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px} +a.list-group-item,button.list-group-item{color:#555} +a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333} +a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{text-decoration:none;color:#555;background-color:#f5f5f5} +button.list-group-item{width:100%;text-align:left} +.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{background-color:#eee;color:#777;cursor:not-allowed} +.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit} +.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777} +.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#2a9fd6;border-color:#2a9fd6} +.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit} +.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#d5ecf7} +.list-group-item-success{color:#3c763d;background-color:#77b300} +a.list-group-item-success,button.list-group-item-success{color:#3c763d} +a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit} +a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#669a00} +a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d} +.list-group-item-info{color:#31708f;background-color:#93c} +a.list-group-item-info,button.list-group-item-info{color:#31708f} +a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit} +a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#8a2eb8} +a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f} +.list-group-item-warning{color:#8a6d3b;background-color:#f80} +a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b} +a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit} +a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#e67a00} +a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b} +.list-group-item-danger{color:#a94442;background-color:#c00} +a.list-group-item-danger,button.list-group-item-danger{color:#a94442} +a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit} +a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#b30000} +a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442} +.panel-heading>.dropdown .dropdown-toggle,.panel-title,.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit} +.list-group-item-heading{margin-top:0;margin-bottom:5px} +.list-group-item-text{margin-bottom:0;line-height:1.3} +.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)} +.panel-title,.panel>.list-group,.panel>.panel-collapse>.list-group,.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0} +.panel-body{padding:15px} +.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-right-radius:3px;border-top-left-radius:3px} +.panel-group .panel-heading,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0} +.panel-title{margin-top:0;font-size:16px} +.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px} +.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0} +.panel>.table-responsive:last-child>.table:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px} +.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-right-radius:3px;border-top-left-radius:3px} +.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px} +.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-right-radius:0;border-top-left-radius:0} +.panel>.table-responsive:first-child>.table:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-right-radius:3px;border-top-left-radius:3px} +.list-group+.panel-footer,.panel-heading+.list-group .list-group-item:first-child{border-top-width:0} +.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-left:15px;padding-right:15px} +.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px} +.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px} +.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px} +.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px} +.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd} +.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0} +.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0} +.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0} +.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0} +.panel>.table-responsive{border:0;margin-bottom:0} +.panel-group{margin-bottom:20px} +.panel-group .panel{margin-bottom:0;border-radius:4px} +.panel-group .panel+.panel{margin-top:5px} +.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd} +.panel-group .panel-footer{border-top:0} +.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd} +.panel-default{border-color:#ddd} +.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd} +.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd} +.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333} +.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd} +.panel-primary{border-color:#2a9fd6} +.panel-primary>.panel-heading{color:#fff;background-color:#2a9fd6;border-color:#2a9fd6} +.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#2a9fd6} +.panel-primary>.panel-heading .badge{color:#2a9fd6;background-color:#fff} +.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#2a9fd6} +.panel-success{border-color:#809a00} +.panel-success>.panel-heading{color:#fff;background-color:#77b300;border-color:#809a00} +.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#809a00} +.panel-success>.panel-heading .badge{color:#77b300;background-color:#fff} +.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#809a00} +.panel-info{border-color:#6e2caf} +.panel-info>.panel-heading{color:#fff;background-color:#93c;border-color:#6e2caf} +.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#6e2caf} +.panel-info>.panel-heading .badge{color:#93c;background-color:#fff} +.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#6e2caf} +.panel-warning{border-color:#e65400} +.panel-warning>.panel-heading{color:#fff;background-color:#f80;border-color:#e65400} +.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#e65400} +.panel-warning>.panel-heading .badge{color:#f80;background-color:#fff} +.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#e65400} +.panel-danger{border-color:#b3001e} +.panel-danger>.panel-heading{color:#fff;background-color:#c00;border-color:#b3001e} +.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#b3001e} +.panel-danger>.panel-heading .badge{color:#c00;background-color:#fff} +.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#b3001e} +.embed-responsive{position:relative;display:block;height:0;padding:0} +.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;left:0;bottom:0;height:100%;width:100%;border:0} +.embed-responsive-16by9{padding-bottom:56.25%} +.embed-responsive-4by3{padding-bottom:75%} +.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)} +.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)} +.well-lg{padding:24px;border-radius:6px} +.well-sm{padding:9px;border-radius:3px} +.close{float:right;font-size:21px;line-height:1;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20)} +.popover,.tooltip{text-decoration:none;font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;font-style:normal;font-weight:400;letter-spacing:normal;line-break:auto;line-height:1.42857143;text-shadow:none;text-transform:none;white-space:normal;word-break:normal;word-spacing:normal;word-wrap:normal} +.close:focus,.close:hover{text-decoration:none;cursor:pointer;filter:alpha(opacity=50)} +button.close{padding:0;cursor:pointer;background:0 0;border:0;-webkit-appearance:none} +.modal-content,.popover{background-clip:padding-box} +.modal{display:none;position:fixed;top:0;z-index:1050;-webkit-overflow-scrolling:touch;outline:0} +.modal.fade .modal-dialog{-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%);-webkit-transition:-webkit-transform .3s ease-out;-moz-transition:-moz-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out} +.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)} +.modal-open .modal{overflow-x:hidden;overflow-y:auto} +.modal-dialog{position:relative;width:auto;margin:10px} +.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5);outline:0} +.modal-backdrop{position:fixed;top:0;z-index:1040;background-color:#000} +.modal-backdrop.fade{opacity:0;filter:alpha(opacity=0)} +.modal-backdrop.in{opacity:.5;filter:alpha(opacity=50)} +.modal-header{padding:15px;border-bottom:1px solid #e5e5e5;min-height:16.43px} +.tooltip.bottom .tooltip-arrow,.tooltip.bottom-left .tooltip-arrow,.tooltip.bottom-right .tooltip-arrow{top:0;border-width:0 5px 5px;border-bottom-color:#000} +.modal-header .close{margin-top:-2px} +.modal-title{margin:0;line-height:1.42857143} +.modal-body{position:relative;padding:15px} +.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5} +.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0} +.modal-footer .btn-group .btn+.btn{margin-left:-1px} +.modal-footer .btn-block+.btn-block{margin-left:0} +.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll} +@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto} +.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)} +.modal-sm{width:300px} +} +.tooltip.top-left .tooltip-arrow,.tooltip.top-right .tooltip-arrow{bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000} +@media (min-width:992px){.modal-lg{width:900px} +} +.tooltip{position:absolute;z-index:1070;display:block;text-align:left;text-align:start;font-size:12px;opacity:0;filter:alpha(opacity=0)} +.tooltip.in{opacity:.9;filter:alpha(opacity=90)} +.tooltip.top{margin-top:-3px;padding:5px 0} +.tooltip.right{margin-left:3px;padding:0 5px} +.tooltip.bottom{margin-top:3px;padding:5px 0} +.tooltip.left{margin-left:-3px;padding:0 5px} +.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px} +.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid} +.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000} +.tooltip.top-left .tooltip-arrow{right:5px} +.tooltip.top-right .tooltip-arrow{left:5px} +.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000} +.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000} +.tooltip.bottom .tooltip-arrow{left:50%;margin-left:-5px} +.tooltip.bottom-left .tooltip-arrow{right:5px;margin-top:-5px} +.tooltip.bottom-right .tooltip-arrow{left:5px;margin-top:-5px} +.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;text-align:left;text-align:start;font-size:14px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2)} +.carousel-caption,.carousel-control{color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.6)} +.popover.top{margin-top:-10px} +.popover.right{margin-left:10px} +.popover.bottom{margin-top:10px} +.popover.left{margin-left:-10px} +.popover-title{margin:0;padding:8px 14px;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0} +.popover-content{padding:9px 14px} +.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid} +.carousel,.carousel-inner{position:relative} +.popover>.arrow{border-width:11px} +.popover>.arrow:after{border-width:10px;content:""} +.popover.top>.arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0,0,0,.25);bottom:-11px} +.popover.top>.arrow:after{content:" ";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#fff} +.popover.left>.arrow:after,.popover.right>.arrow:after{content:" ";bottom:-10px} +.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999;border-right-color:rgba(0,0,0,.25)} +.popover.right>.arrow:after{left:1px;border-left-width:0;border-right-color:#fff} +.popover.bottom>.arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25);top:-11px} +.popover.bottom>.arrow:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff} +.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)} +.popover.left>.arrow:after{right:1px;border-right-width:0;border-left-color:#fff} +.carousel-inner{overflow:hidden;width:100%} +.carousel-inner>.item{display:none;position:relative;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left} +.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1} +@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-moz-transition:-moz-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;-moz-perspective:1000px;perspective:1000px} +.carousel-inner>.item.active.right,.carousel-inner>.item.next{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);left:0} +.carousel-inner>.item.active.left,.carousel-inner>.item.prev{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);left:0} +.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);left:0} +} +.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block} +.carousel-inner>.active{left:0} +.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%} +.carousel-inner>.next{left:100%} +.carousel-inner>.prev{left:-100%} +.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0} +.carousel-inner>.active.left{left:-100%} +.carousel-inner>.active.right{left:100%} +.carousel-control{position:absolute;top:0;left:0;bottom:0;width:15%;opacity:.5;filter:alpha(opacity=50);font-size:20px;text-align:center} +.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1)} +.carousel-control.right{left:auto;right:0;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1)} +.carousel-control:focus,.carousel-control:hover{outline:0;color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)} +.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;margin-top:-10px;z-index:5;display:inline-block} +.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px} +.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px} +.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;line-height:1;font-family:serif} +.carousel-control .icon-prev:before{content:'\2039'} +.carousel-control .icon-next:before{content:'\203a'} +.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;margin-left:-30%;padding-left:0;list-style:none;text-align:center} +.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;border:1px solid #fff;border-radius:10px;cursor:pointer;background-color:#000\9;background-color:transparent} +.carousel-indicators .active{margin:0;width:12px;height:12px;background-color:#fff} +.table-responsive>.table,.text-hide{background-color:transparent} +.carousel-caption{position:absolute;left:15%;right:15%;bottom:20px;z-index:10;padding-top:20px;padding-bottom:20px;text-align:center} +.carousel-caption .btn,.text-hide{text-shadow:none} +@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-15px;font-size:30px} +.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-15px} +.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-15px} +.carousel-caption{left:20%;right:20%;padding-bottom:30px} +.carousel-indicators{bottom:20px} +} +.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{content:" ";display:table} +.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both} +.center-block{display:block;margin-left:auto;margin-right:auto} +.pull-right{float:right!important} +.pull-left{float:left!important} +.hide{display:none!important} +.show{display:block!important} +.hidden,.visible-lg,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important} +.invisible{visibility:hidden} +.text-hide{font:0/0 a;color:transparent;border:0} +.affix{position:fixed} +@-ms-viewport{width:device-width} +@media (max-width:767px){.visible-xs{display:block!important} +table.visible-xs{display:table!important} +tr.visible-xs{display:table-row!important} +td.visible-xs,th.visible-xs{display:table-cell!important} +.visible-xs-block{display:block!important} +.visible-xs-inline{display:inline!important} +.visible-xs-inline-block{display:inline-block!important} +} +@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important} +table.visible-sm{display:table!important} +tr.visible-sm{display:table-row!important} +td.visible-sm,th.visible-sm{display:table-cell!important} +.visible-sm-block{display:block!important} +.visible-sm-inline{display:inline!important} +.visible-sm-inline-block{display:inline-block!important} +} +@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important} +table.visible-md{display:table!important} +tr.visible-md{display:table-row!important} +td.visible-md,th.visible-md{display:table-cell!important} +.visible-md-block{display:block!important} +.visible-md-inline{display:inline!important} +.visible-md-inline-block{display:inline-block!important} +} +@media (min-width:1200px){.visible-lg{display:block!important} +table.visible-lg{display:table!important} +tr.visible-lg{display:table-row!important} +td.visible-lg,th.visible-lg{display:table-cell!important} +.visible-lg-block{display:block!important} +.visible-lg-inline{display:inline!important} +.visible-lg-inline-block{display:inline-block!important} +} +@media (max-width:767px){.hidden-xs{display:none!important} +} +@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important} +} +@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important} +} +@media (min-width:1200px){.hidden-lg{display:none!important} +} +.visible-print{display:none!important} +@media print{.visible-print{display:block!important} +table.visible-print{display:table!important} +tr.visible-print{display:table-row!important} +td.visible-print,th.visible-print{display:table-cell!important} +} +.visible-print-block{display:none!important} +@media print{.visible-print-block{display:block!important} +} +.visible-print-inline{display:none!important} +@media print{.visible-print-inline{display:inline!important} +} +.visible-print-inline-block{display:none!important} +@media print{.visible-print-inline-block{display:inline-block!important} +.hidden-print{display:none!important} +} +.text-primary,.text-primary:hover{color:#2a9fd6} +.text-success,.text-success:hover{color:#77b300} +.text-danger,.text-danger:hover{color:#c00} +.text-warning,.text-warning:hover{color:#f80} +.text-info,.text-info:hover{color:#93c} +.bg-danger,.bg-info,.bg-success,.bg-warning{color:#fff} +.table a:not(.btn),table a:not(.btn){color:#333;text-decoration:none} +.table .dropdown-menu a,table .dropdown-menu a{text-decoration:none} +.table .text-muted,table .text-muted{color:#777} +.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .form-control-feedback,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#f80} +.has-warning .form-control,.has-warning .form-control:focus,.has-warning .input-group-addon{border-color:#f80} +.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .form-control-feedback,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#c00} +.has-error .form-control,.has-error .form-control:focus,.has-error .input-group-addon{border-color:#c00} +.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .form-control-feedback,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#77b300} +.breadcrumb a,.close,.close:focus,.close:hover,.jumbotron h1,.jumbotron h2,.jumbotron h3,.jumbotron h4,.jumbotron h5,.jumbotron h6,.nav-pills a,.nav-tabs a,.pager a,legend{color:#333} +.has-success .form-control,.has-success .form-control:focus,.has-success .input-group-addon{border-color:#77b300} +.input-group-addon{background-color:#fff} +.alert .alert-link,.alert a{color:#fff;text-decoration:none} +.alert .close,.close{text-decoration:none} +.close{opacity:.4} +.close:focus,.close:hover{opacity:1} +a.list-group-item.active,a.list-group-item.active:focus,a.list-group-item.active:hover,a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#ddd} +a.list-group-item-success.active{background-color:#77b300} +a.list-group-item-success.active:focus,a.list-group-item-success.active:hover{background-color:#669a00} +a.list-group-item-warning.active{background-color:#f80} +a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover{background-color:#e67a00} +a.list-group-item-danger.active{background-color:#c00} +a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover{background-color:#b30000} \ No newline at end of file diff --git a/e107_tests/tests/_data/basic-light/maw/index.html b/e107_tests/tests/_data/basic-light/maw/index.html new file mode 100644 index 000000000..e69de29bb diff --git a/e107_tests/tests/_data/basic-light/maw/js/ie10-viewport-bug-workaround.js b/e107_tests/tests/_data/basic-light/maw/js/ie10-viewport-bug-workaround.js new file mode 100644 index 000000000..7f53b6145 --- /dev/null +++ b/e107_tests/tests/_data/basic-light/maw/js/ie10-viewport-bug-workaround.js @@ -0,0 +1,22 @@ +/*! + * IE10 viewport hack for Surface/desktop Windows 8 bug + * Copyright 2014 Twitter, Inc. + * Licensed under the Creative Commons Attribution 3.0 Unported License. For + * details, see http://creativecommons.org/licenses/by/3.0/. + */ + +// See the Getting Started docs for more information: +// http://getbootstrap.com/getting-started/#support-ie10-width + +(function () { + 'use strict'; + if (navigator.userAgent.match(/IEMobile\/10\.0/)) { + var msViewportStyle = document.createElement('style') + msViewportStyle.appendChild( + document.createTextNode( + '@-ms-viewport{width:auto!important}' + ) + ) + document.querySelector('head').appendChild(msViewportStyle) + } +})(); diff --git a/e107_tests/tests/_data/basic-light/maw/js/index.html b/e107_tests/tests/_data/basic-light/maw/js/index.html new file mode 100644 index 000000000..e69de29bb diff --git a/e107_tests/tests/_data/basic-light/preview.jpg b/e107_tests/tests/_data/basic-light/preview.jpg new file mode 100644 index 000000000..f29699e21 Binary files /dev/null and b/e107_tests/tests/_data/basic-light/preview.jpg differ diff --git a/e107_tests/tests/_data/basic-light/style.css b/e107_tests/tests/_data/basic-light/style.css new file mode 100644 index 000000000..4c0f7fe36 --- /dev/null +++ b/e107_tests/tests/_data/basic-light/style.css @@ -0,0 +1,204 @@ +@import url(http://fonts.googleapis.com/css?family=Geo); +/* CUSTOMIZE THE NAVBAR +-------------------------------------------------- */ + +body { + font-size: 16px; +} +.navbar-wrapper { + position: absolute; + top: 0; + right: 0; + left: 0; + z-index: 20; +} +.navbar-wrapper > .container { + padding-right: 0; + padding-left: 0; +} +.navbar-wrapper .navbar { + padding-right: 15px; + padding-left: 15px; +} +.navbar-wrapper .navbar .container { + width: auto; +} + +/* CUSTOMIZE THE CAROUSEL +-------------------------------------------------- */ + +.carousel { + margin-bottom: 30px; + overflow: hidden; + width: 100%; +} +.carousel-inner, +.carousel .item { + overflow: hidden; +} +.carousel-caption { + z-index: 10; +} +.carousel-inner > .item > .slader-img { + position: relative; + width: 100%; +} +.carousel-indicators li { + border: 2px solid #2a9fd6; +} +.carousel-indicators li:hover, +.carousel-indicators li.active { + background-color: #2a9fd6; +} +.carousel-control { + color: #2a9fd6!important; +} +/* CONTENT +-------------------------------------------------- */ + +ul.nav-list { + border-top: 1px solid #ddd; +} +ul.nav-list li { + border-top: 1px solid #ddd; +} +ul.nav-list li a:hover { + background: #eee; +} +.menus.panel, +.article.panel, +.view-item.panel { + padding: 15px; +} +.header { + background: #3f51b5; + height: 95px; + margin-bottom: 30px; + display: block; +} +.n-img { + padding-left: 0; +} +.article .info, +.view-item .info { + font-size: 12px; + padding: 10px; + background: #ddd; +} +.article .options { + text-align: center; +} +.view-item .article-body, +.news-images-1 .col-md-6, +.news-images-2 .col-md-6{ + margin-bottom: 30px; +} +.comment-box-left { + margin-bottom: 15px; +} +#comment { + margin-bottom: 5px; +} +.menus.other_news .othernews-block { + margin-bottom: 0; +} +.menus .blogcalendar-block { + margin-bottom: 0; +} +.footer-right { + text-align: center; + padding-bottom: 30px; + font-size: 12px; +} +.menus .text ul:not(.media-list) { + list-style: inside; + padding-left: 0; +} +.list-unstyled li, +.dropdown-menu li{ + list-style: none; +} +.menus-caption { + margin-bottom: 15px; + color: #2A9FD6; +} +#copyright { + font-family: 'Geo', sans-serif; + background-color: rgba(100, 100, 100, 0.2); + padding: 2px 5px; + color: #aaa; + -webkit-border-radius: 3px; + border-radius: 3px; + text-decoration: none; + letter-spacing: -0.5px; +} +#copyright:hover { + background-color: #444; + color: #fff; +} +/* FORUM +-------------------------------------*/ +#forum-viewtopic li.forum-viewtopic-post { border-top:1px solid #ddd; padding:15px 10px } +#forum-viewtopic li.forum-viewtopic-post:nth-child(odd) { background: #f1f1f1 } +#forum, #forum-stats, #forum-rules { min-height: 0px; } +.forum-thread-text { + background: rgba(33,150,243,0.06); + border: 1px solid #ddd; + padding: 10px; +} +.label.label-info { + overflow: hidden; + display: table; + margin: 5px auto; + text-align: center; + padding: 0 10px; + line-height: 2; +} +.label.label-info.smalltext { + display: block; + padding: 0 2px; +} +.label-info:after { + content: ''; + display: block; + clear: both; + visibility: hidden; +} + +/* RESPONSIVE CSS +-------------------------------------------------- */ + +@media (max-width: 992px) { +.n-img { + padding-right: 0; + margin-bottom: 20px; +} + +} + +@media (min-width: 768px) { + /* Navbar positioning foo */ + .navbar-wrapper { + margin-top: 20px; + } + .navbar-wrapper .container { + padding-right: 15px; + padding-left: 15px; + } + .navbar-wrapper .navbar { + padding-right: 0; + padding-left: 0; + } + .navbar-wrapper .navbar { + border-radius: 4px; + } + +} + + +@media (max-width: 768px) { +.carousel { + margin-top: 50px; +} + +} diff --git a/e107_tests/tests/_data/basic-light/templates/index.html b/e107_tests/tests/_data/basic-light/templates/index.html new file mode 100644 index 000000000..e69de29bb diff --git a/e107_tests/tests/_data/basic-light/templates/news/news_menu_template.php b/e107_tests/tests/_data/basic-light/templates/news/news_menu_template.php new file mode 100644 index 000000000..6dc8da5cc --- /dev/null +++ b/e107_tests/tests/_data/basic-light/templates/news/news_menu_template.php @@ -0,0 +1,95 @@ +'; +$NEWS_MENU_TEMPLATE['category']['end'] = ''; +$NEWS_MENU_TEMPLATE['category']['item'] = ' +
  • {NEWS_CATEGORY_TITLE} {NEWS_CATEGORY_NEWS_COUNT}
  • +'; + +$NEWS_MENU_WRAPPER['category']['NEWS_CATEGORY_NEWS_COUNT'] = "({---})"; // Wrap brackets around the news count when value is returned. +//$NEWS_MENU_TEMPLATE['category']['separator'] = '
    '; + + + + + + +// months menu +$NEWS_MENU_TEMPLATE['months']['start'] = ''; +$NEWS_MENU_TEMPLATE['months']['item'] = ' +
  • {month} ({count})
  • +'; +//$NEWS_MENU_TEMPLATE['months']['separator'] = '
    '; + + + + + + +// latest menu +$NEWS_MENU_TEMPLATE['latest']['start'] = ''; // Example: $NEWS_MENU_TEMPLATE['latest']['end'] '
    {currentTotal} from {total}'; +$NEWS_MENU_TEMPLATE['latest']['item'] = '
  • {NEWSTITLE} {NEWSCOMMENTCOUNT}
  • '; + +$NEWS_MENU_WRAPPER['latest']['NEWSCOMMENTCOUNT'] = "({---})"; + + + + + +// Other News Menu. +$NEWS_MENU_TEMPLATE['other']['caption'] = TD_MENU_L1; +$NEWS_MENU_TEMPLATE['other']['start'] = ""; + + + + + + + + +// Other News Menu. 2 + +$NEWS_MENU_TEMPLATE['other2']['caption'] = TD_MENU_L2; +$NEWS_MENU_TEMPLATE['other2']['start'] = ""; + + + + + + + +//$NEWS_MENU_TEMPLATE['latest']['separator'] = '
    '; // Shouldn't be needed. diff --git a/e107_tests/tests/_data/basic-light/templates/news/news_template.php b/e107_tests/tests/_data/basic-light/templates/news/news_template.php new file mode 100644 index 000000000..5426d9d51 --- /dev/null +++ b/e107_tests/tests/_data/basic-light/templates/news/news_template.php @@ -0,0 +1,192 @@ +'; +//$NEWS_MENU_TEMPLATE['list']['end'] = ''; + +$NEWS_MENU_TEMPLATE['list']['start'] = '
    '; +$NEWS_MENU_TEMPLATE['list']['end'] = '
    '; + + +// XXX The ListStyle template offers a listed summary of items with a minimum of 10 items per page. +// As displayed by news.php?cat.1 OR news.php?all +// {NEWSBODY} should not appear in the LISTSTYLE as it is NOT the same as what would appear on news.php (no query) + +// Template/CSS to be reviewed for best bootstrap implementation +$NEWS_TEMPLATE['list']['caption'] = '{NEWSCATEGORY}'; +$NEWS_TEMPLATE['list']['start'] = '{SETIMAGE: w=400&h=350&crop=1}'; +$NEWS_TEMPLATE['list']['end'] = ''; +$NEWS_TEMPLATE['list']['item'] = ' + +
    +
    +
    + {NEWSTHUMBNAIL=placeholder} +
    +
    +
    +

    {NEWSTITLELINK}

    +

    + {NEWSSUMMARY} +

    +

    + '.LAN_READ_MORE.' +

    +
    +
    + +'; + + + + + + +//$NEWS_MENU_TEMPLATE['list']['separator'] = '
    '; + + + +// XXX As displayed by news.php (no query) or news.php?list.1.1 (ie. regular view of a particular category) +//XXX TODO GEt this looking good in the default Bootstrap theme. +/* +$NEWS_TEMPLATE['default']['item'] = ' + {SETIMAGE: w=400} +
    +

    {NEWSTITLE}

    + + {NEWSDATE=short} by {NEWSAUTHOR} + + +
    + {NEWSIMAGE} + {NEWSBODY} + {EXTENDED} +
    +
    + {NEWSCATEGORY} {NEWSTAGS} {NEWSCOMMENTS} {EMAILICON} {PRINTICON} {PDFICON} {ADMINOPTIONS} +
    +
    +'; +*/ + +$NEWS_TEMPLATE['default']['item'] = ' +
    + {SETIMAGE: w=800} +

    {NEWSTITLELINK}

    +

    by {NEWSAUTHOR}

    +
    +
    {NEWSCOMMENTLINK: glyph=comments&class=btn btn-default}{PRINTICON: class=btn btn-default}{PDFICON}{SOCIALSHARE}{ADMINOPTIONS: class=btn btn-default}
    +
    +
    +
    +
    {GLYPH=time} {NEWSDATE=short}
    +
    {GLYPH=tags}  {NEWSTAGS}   {GLYPH=folder-open}  {NEWSCATEGORY}
    +
    +
    +
    +
    + {NEWSIMAGE: item=1} +
    +

    + {NEWSBODY} +

    +
    +
    +'; + + + +###### Default view item (temporary) ###### +//$NEWS_MENU_TEMPLATE['view']['start'] = ''; + +// As displayed by news.php?extend.1 + +$NEWS_TEMPLATE['view']['item'] = ' +{SETIMAGE: w=800} +
    +

    {NEWSTITLELINK}

    +

    by {NEWSAUTHOR}

    +
    +
    +
    {GLYPH=time} {NEWSDATE=short}
    +
    {GLYPH=tags}  {NEWSTAGS}   {GLYPH=folder-open}  {NEWSCATEGORY}
    +
    +
    +
    +
    + {NEWSIMAGE: item=1} + {NEWSVIDEO: item=1} +
    +

    {NEWSSUMMARY}

    + {NEWSBODY=body} +
    + {SETIMAGE: w=800} +
    +
    + {NEWSIMAGE: item=2} + {NEWSVIDEO: item=2} +
    +
    + {NEWSIMAGE: item=3} + {NEWSVIDEO: item=3} +
    +
    +

    + {NEWSBODY=extended} +

    +
    +
    + {NEWSIMAGE: item=4} + {NEWSVIDEO: item=4} +
    +
    + {NEWSIMAGE: item=5} + {NEWSVIDEO: item=5} +
    +
    +
    +
    +
    {PRINTICON: class=btn btn-default}{ADMINOPTIONS: class=btn btn-default}{SOCIALSHARE}
    +
    + +
    + {NEWSRELATED} +
    + {NEWSNAVLINK} +'; +//$NEWS_MENU_TEMPLATE['view']['separator'] = '
    '; + + +###### news_categories.sc +$NEWS_TEMPLATE['category']['body'] = ' +
    + {NEWSCATICON} {NEWSCATEGORY} +
    + {NEWSCAT_ITEM} +
    +'; + +$NEWS_TEMPLATE['category']['item'] = ' +
    + + + + +
    • + + {NEWSTITLELINK} +
    +
    +
    +'; \ No newline at end of file diff --git a/e107_tests/tests/_data/basic-light/theme.php b/e107_tests/tests/_data/basic-light/theme.php new file mode 100644 index 000000000..4c3b394ca --- /dev/null +++ b/e107_tests/tests/_data/basic-light/theme.php @@ -0,0 +1,309 @@ +',''); +e107::js('url','https://oss.maxcdn.com/respond/1.4.2/respond.min.js','','2','',''); +e107::js('url','https://cdnjs.cloudflare.com/ajax/libs/jquery-migrate/1.4.1/jquery-migrate.min.js', 'jquery', 2); +e107::js('url','https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js', 'jquery', 2); +// Options +define("THEME_DISCLAIMER", "
    ".MAW_THEME_1.""); +define("USER_WIDTH", "width:100%"); +define ("NEXTPREV_NOSTYLE", "TRUE"); +define("IMODE", "light"); + +$LAYOUT['default'] = ' + + +
    +
    +
    + {---} +
    +
    + {MENU=1} +
    +
    +
    +
    + {MENU=2} +
    +
    + {MENU=3} +
    +
    + {MENU=4} +
    +
    +
    + + +
    +
    +'; + +$LAYOUT['default-home'] = ' + + +
    +
    +
    + {MENU=2} +
    +
    + {MENU=3} +
    +
    + {MENU=4} +
    +
    +
    +
    + {---} +
    +
    + {MENU=1} +
    +
    +
    + + +
    +
    +'; + +$LAYOUT['simple-page'] = ' + +
    +
    +
    +
    + {---} +
    +
    + {MENU=1} +
    +
    +
    +
    + {MENU=2} +
    +
    + {MENU=3} +
    +
    + {MENU=4} +
    +
    +
    + + +
    +
    +'; + +$LAYOUT['wide-page'] = ' + +
    +
    +
    +
    + {---} +
    +
    +
    + + +
    +
    +'; +// News Categories Menu +define('NEWSCAT_COLS',false); +// Othernew + Othernus2 +define('OTHERNEWS_COLS',false); // no tables, only divs. +define('OTHERNEWS_LIMIT', 10); // Limit to 5. +define('OTHERNEWS2_COLS',false); // no tables, only divs. +define('OTHERNEWS2_LIMIT', 5); // Limit to 5. +// Comments +define('COMMENTLINK', e107::getParser()->toGlyph('fa-comment')); +define('COMMENTOFFSTRING', ''); +// Personal Messages Menu +define("PM_INBOX_ICON", ""); +define("PM_OUTBOX_ICON", ""); +define("BULLET", e107::getParser()->toGlyph('fa-check')); +// Table style +function tablestyle($caption, $text, $mode){ + global $style; + switch ($style) { + case "no-caption": + echo "\n"; + break; + default: + echo "\n"; + break; + } + } +?> \ No newline at end of file diff --git a/e107_tests/tests/_data/basic-light/theme.xml b/e107_tests/tests/_data/basic-light/theme.xml new file mode 100644 index 000000000..26854bf02 --- /dev/null +++ b/e107_tests/tests/_data/basic-light/theme.xml @@ -0,0 +1,28 @@ + + + + Basic Bootstrap 3 Theme + Basic Bootstrap 3 theme for e107 v.2 + generic + mcpeace + HTML5, CSS3 + + preview_frontend.png + + + bootstrap + light + + + + + FRONTPAGE + + + news.php?extend page.php? contact.php /download /gallery /chatbox_menu /pm /log + + + /forum /blogcalendar_menu /calendar_menu + + + \ No newline at end of file diff --git a/e107_tests/tests/_data/basic-light/theme_config.php b/e107_tests/tests/_data/basic-light/theme_config.php new file mode 100644 index 000000000..6e80984de --- /dev/null +++ b/e107_tests/tests/_data/basic-light/theme_config.php @@ -0,0 +1,93 @@ +set('sitetheme_pref', $theme_pref); + return $pref->dataHasChanged(); + } + + + function config() + { + + return $var; + } + + + function help() + { + $text = ' +
    +
    +

    BASIC LIGHT

    +
    e107 Bootstrap 3 Theme v.1 - March 2016 - for e107 v.2.
    +
    +
    +
    +
    +

    License

    +

    The MIT License (MIT)
    + + Copyright (c) 2013 Thomas Park
    + +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.

    +
    +
    +

    Installation

    +

    Very Important: before to upload the theme, download and install latest e107 v.2 from: https://github.com/e107inc/e107 +
    Extract the theme from zip archive. If you use Winrar click on "Extract here". In the theme folder you must have files and folders like theme.php, theme.xml ... and folders like images, linguages ... +
    After latest e107 v.2 installation, uplod the theme folder on your server in "e107_themes" folder via FTP. If the theme do not works, you have a corupted file, so upload again the theme.

    +
    +
    +
    +
    +

    Theme Javascript Framework

    +

    The theme use jQuery but it is not loaded by the theme. To load it you need to go in Admin Area > Preferences > Javascript Faramework and set JQUERY (local) to AUTO and PROTOTYPE (local) to DISABLED.

    +
    +
    +

    Theme Compatibility

    +

    This theme is compatible with e107 v.2 and up and was tested in IE10+11, FF and Chrome latest versions. The theme use HTML5, CSS3, jQuery and is not working OK in old browsers with not support for HTML5 and CSS3 or javascript.

    +

    For more IE compatibility you can add in Admin Area > Meta Tags this meta tag: +

    + <meta http-equiv="X-UA-Compatible" content="IE=edge"></meta> +

    +
    +
    +

    Premium and Custom Themes

    +

    If you want more complex themes or an unique looking theme for your site please visit Man at Work website where you can buy the best Premium Themes or you can order your best Custom Unique Theme for e107.

    +
    +
    +
    + '; + + return $text; + + } +} +?> \ No newline at end of file diff --git a/e107_tests/tests/_data/e107_config.php.sample b/e107_tests/tests/_data/e107_config.php.sample new file mode 100644 index 000000000..c991716ac --- /dev/null +++ b/e107_tests/tests/_data/e107_config.php.sample @@ -0,0 +1,39 @@ + '000000test'); + +define('e_MOD_REWRITE',true); diff --git a/e107_tests/tests/_data/e107_v2.1.9.sample.sql b/e107_tests/tests/_data/e107_v2.1.9.sample.sql new file mode 100644 index 000000000..be40a1622 --- /dev/null +++ b/e107_tests/tests/_data/e107_v2.1.9.sample.sql @@ -0,0 +1,1079 @@ +-- MySQL dump 10.13 Distrib 5.7.23, for Linux (x86_64) +-- +-- Host: localhost Database: e107 +-- ------------------------------------------------------ +-- Server version 5.7.23-0ubuntu0.18.04.1 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `e107_admin_log` +-- + +DROP TABLE IF EXISTS `e107_admin_log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `e107_admin_log` ( + `dblog_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `dblog_datestamp` int(10) unsigned NOT NULL DEFAULT '0', + `dblog_microtime` int(10) unsigned NOT NULL DEFAULT '0', + `dblog_type` tinyint(3) NOT NULL DEFAULT '0', + `dblog_eventcode` varchar(10) NOT NULL DEFAULT '', + `dblog_user_id` int(10) unsigned NOT NULL DEFAULT '0', + `dblog_ip` varchar(45) NOT NULL DEFAULT '', + `dblog_title` varchar(255) NOT NULL DEFAULT '', + `dblog_remarks` text NOT NULL, + PRIMARY KEY (`dblog_id`), + KEY `dblog_datestamp` (`dblog_datestamp`) +) ENGINE=MyISAM AUTO_INCREMENT=55 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `e107_admin_log` +-- + +LOCK TABLES `e107_admin_log` WRITE; +/*!40000 ALTER TABLE `e107_admin_log` DISABLE KEYS */; +INSERT INTO `e107_admin_log` VALUES (1,1541074252,555210,0,'PREFS_01',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','LAN_AL_PREFS_01','Your settings have been saved - Success'),(2,1541074252,565796,0,'PREFS_01',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','LAN_AL_PREFS_01','Your settings have been saved - Success'),(3,1541074252,566524,0,'PREFS_01',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','LAN_AL_PREFS_01','Your settings have been saved - Success'),(4,1541074252,567373,0,'SEARCH_04',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','LAN_AL_SEARCH_04','Your settings have been saved - Success'),(5,1541074252,568279,0,'NOTIFY_01',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','LAN_AL_NOTIFY_01','Your settings have been saved - Success'),(6,1541074252,599711,0,'ADMIN',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','Updated Plugins table','Added LAN_PLUGIN_POLL_NAME to the plugin table.'),(7,1541074252,601115,0,'ADMIN',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','Updated Plugins table','Added LAN_PLUGIN_TRACKBACK_NAME to the plugin table.'),(8,1541074252,602616,0,'ADMIN',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','Updated Plugins table','Added LAN_PLUGIN_LINKWORDS_NAME to the plugin table.'),(9,1541074252,604448,0,'ADMIN',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','Updated Plugins table','Added LAN_PLUGIN__BLANK_NAME to the plugin table.'),(10,1541074252,606360,0,'ADMIN',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','Updated Plugins table','Added LAN_PLUGIN_IMPORT_NAME to the plugin table.'),(11,1541074252,608113,0,'ADMIN',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','Updated Plugins table','Added LAN_PLUGIN_PM_NAME to the plugin table.'),(12,1541074252,609659,0,'ADMIN',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','Updated Plugins table','Added Pages to the plugin table.'),(13,1541074252,611017,0,'ADMIN',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','Updated Plugins table','Added LAN_PLUGIN_BANNER_NAME to the plugin table.'),(14,1541074252,612445,0,'ADMIN',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','Updated Plugins table','Added LAN_PLUGIN_RSS_NAME to the plugin table.'),(15,1541074252,614354,0,'ADMIN',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','Updated Plugins table','Added TinyMce4 to the plugin table.'),(16,1541074252,615712,0,'ADMIN',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','Updated Plugins table','Added LAN_PLUGIN_TAGCLOUD_NAME to the plugin table.'),(17,1541074252,616844,0,'ADMIN',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','Updated Plugins table','Added LAN_PLUGIN_USER_NAME to the plugin table.'),(18,1541074252,618130,0,'ADMIN',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','Updated Plugins table','Added Metaweblog to the plugin table.'),(19,1541074252,619306,0,'ADMIN',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','Updated Plugins table','Added Contact to the plugin table.'),(20,1541074252,623737,0,'ADMIN',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','Updated Plugins table','Added New Forum Posts to the plugin table.'),(21,1541074252,626429,0,'ADMIN',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','Updated Plugins table','Added LAN_PLUGIN_FORUM_NAME to the plugin table.'),(22,1541074252,628420,0,'ADMIN',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','Updated Plugins table','Added LAN_PLUGIN_SOCIAL_NAME to the plugin table.'),(23,1541074252,629952,0,'ADMIN',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','Updated Plugins table','Added News to the plugin table.'),(24,1541074252,631344,0,'ADMIN',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','Updated Plugins table','Added LAN_PLUGIN_CHATBOX_MENU_NAME to the plugin table.'),(25,1541074252,634103,0,'ADMIN',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','Updated Plugins table','Added LAN_PLUGIN_LOG_NAME to the plugin table.'),(26,1541074252,636552,0,'ADMIN',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','Updated Plugins table','Added LAN_PLUGIN_GALLERY_TITLE to the plugin table.'),(27,1541074252,638279,0,'ADMIN',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','Updated Plugins table','Added LAN_PLUGIN_FEATUREBOX_NAME to the plugin table.'),(28,1541074252,639551,0,'ADMIN',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','Updated Plugins table','Added Siteinfo to the plugin table.'),(29,1541074252,640889,0,'ADMIN',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','Updated Plugins table','Added LAN_PLUGIN_NEWSLETTER_NAME to the plugin table.'),(30,1541074252,642447,0,'ADMIN',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','Updated Plugins table','Added LAN_ALT_65 to the plugin table.'),(31,1541074252,643919,0,'ADMIN',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','Updated Plugins table','Added LAN_PLUGIN_GSITEMAP_NAME to the plugin table.'),(32,1541074252,646030,0,'ADMIN',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','Updated Plugins table','Added LAN_PLUGIN_DOWNLOAD_NAME to the plugin table.'),(33,1541074252,647646,0,'ADMIN',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','Updated Plugins table','Added LAN_PLUGIN_NEWSFEEDS_NAME to the plugin table.'),(34,1541074252,649443,0,'ADMIN',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','Updated Plugins table','Added LAN_PLUGIN_LIST_NEW_NAME to the plugin table.'),(35,1541074252,651221,0,'ADMIN',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','Updated Plugins table','Added LAN_PLUGIN_FAQS_NAME to the plugin table.'),(36,1541074252,654225,0,'PREFS_01',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','LAN_AL_PREFS_01','Deprecated call to getPluginRecord() using integer.Array[!br!]([!br!] [1] =&gt; Array[!br!] ([!br!] [file] =&gt; /var/www/html/e107/e107_handlers/plugin_class.php[!br!] [line] =&gt; 4066[!br!] [function] =&gt; install[!br!] [class] =&gt; e107plugin[!br!] [type] =&gt; -&gt;[!br!] )[!br!][!br!] [2] =&gt; Array[!br!] ([!br!] [file] =&gt; /var/www/html/e107/install.php[!br!] [line] =&gt; 1745[!br!] [function] =&gt; install_plugin[!br!] [class] =&gt; e107plugin[!br!] [type] =&gt; -&gt;[!br!] )[!br!][!br!])[!br!][!br!]Your settings have been saved - Success'),(37,1541074252,675455,0,'PREFS_01',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','LAN_AL_PREFS_01','Your settings have been saved - Success'),(38,1541074252,702893,0,'PREFS_01',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','LAN_AL_PREFS_01','Your settings have been saved - Success'),(39,1541074252,705740,0,'PREFS_01',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','LAN_AL_PREFS_01','Your settings have been saved - Success'),(40,1541074252,724963,0,'PREFS_01',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','LAN_AL_PREFS_01','Deprecated call to getPluginRecord() using integer.Array[!br!]([!br!] [1] =&gt; Array[!br!] ([!br!] [file] =&gt; /var/www/html/e107/e107_handlers/plugin_class.php[!br!] [line] =&gt; 4066[!br!] [function] =&gt; install[!br!] [class] =&gt; e107plugin[!br!] [type] =&gt; -&gt;[!br!] )[!br!][!br!] [2] =&gt; Array[!br!] ([!br!] [file] =&gt; /var/www/html/e107/install.php[!br!] [line] =&gt; 1745[!br!] [function] =&gt; install_plugin[!br!] [class] =&gt; e107plugin[!br!] [type] =&gt; -&gt;[!br!] )[!br!][!br!])[!br!][!br!]Your settings have been saved - Success'),(41,1541074252,726661,0,'PREFS_01',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','LAN_AL_PREFS_01','Your settings have been saved - Success'),(42,1541074252,739332,0,'PREFS_01',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','LAN_AL_PREFS_01','Your settings have been saved - Success'),(43,1541074252,742076,0,'PREFS_01',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','LAN_AL_PREFS_01','Your settings have been saved - Success'),(44,1541074252,750782,0,'PREFS_01',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','LAN_AL_PREFS_01','Deprecated call to getPluginRecord() using integer.Array[!br!]([!br!] [1] =&gt; Array[!br!] ([!br!] [file] =&gt; /var/www/html/e107/e107_handlers/plugin_class.php[!br!] [line] =&gt; 4066[!br!] [function] =&gt; install[!br!] [class] =&gt; e107plugin[!br!] [type] =&gt; -&gt;[!br!] )[!br!][!br!] [2] =&gt; Array[!br!] ([!br!] [file] =&gt; /var/www/html/e107/install.php[!br!] [line] =&gt; 1745[!br!] [function] =&gt; install_plugin[!br!] [class] =&gt; e107plugin[!br!] [type] =&gt; -&gt;[!br!] )[!br!][!br!])[!br!][!br!]Your settings have been saved - Success'),(45,1541074252,780600,0,'PREFS_01',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','LAN_AL_PREFS_01','Your settings have been saved - Success'),(46,1541074252,805937,0,'PREFS_01',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','LAN_AL_PREFS_01','Deprecated call to getPluginRecord() using integer.Array[!br!]([!br!] [1] =&gt; Array[!br!] ([!br!] [file] =&gt; /var/www/html/e107/e107_handlers/plugin_class.php[!br!] [line] =&gt; 4066[!br!] [function] =&gt; install[!br!] [class] =&gt; e107plugin[!br!] [type] =&gt; -&gt;[!br!] )[!br!][!br!] [2] =&gt; Array[!br!] ([!br!] [file] =&gt; /var/www/html/e107/install.php[!br!] [line] =&gt; 1745[!br!] [function] =&gt; install_plugin[!br!] [class] =&gt; e107plugin[!br!] [type] =&gt; -&gt;[!br!] )[!br!][!br!])[!br!][!br!]Your settings have been saved - Success'),(47,1541074252,823997,0,'PREFS_01',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','LAN_AL_PREFS_01','Your settings have been saved - Success'),(48,1541074252,842367,0,'PREFS_01',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','LAN_AL_PREFS_01','Deprecated call to getPluginRecord() using integer.Array[!br!]([!br!] [1] =&gt; Array[!br!] ([!br!] [file] =&gt; /var/www/html/e107/e107_handlers/plugin_class.php[!br!] [line] =&gt; 4066[!br!] [function] =&gt; install[!br!] [class] =&gt; e107plugin[!br!] [type] =&gt; -&gt;[!br!] )[!br!][!br!] [2] =&gt; Array[!br!] ([!br!] [file] =&gt; /var/www/html/e107/install.php[!br!] [line] =&gt; 1745[!br!] [function] =&gt; install_plugin[!br!] [class] =&gt; e107plugin[!br!] [type] =&gt; -&gt;[!br!] )[!br!][!br!])[!br!][!br!]Your settings have been saved - Success'),(49,1541074252,857898,0,'PREFS_01',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','LAN_AL_PREFS_01','Your settings have been saved - Success'),(50,1541074252,872489,0,'PREFS_01',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','LAN_AL_PREFS_01','Your settings have been saved - Success'),(51,1541074252,922644,0,'PREFS_01',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','LAN_AL_PREFS_01','Your settings have been saved - Success'),(52,1541074252,925513,0,'PREFS_01',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','LAN_AL_PREFS_01','Your settings have been saved - Success'),(53,1541074252,941265,0,'PREFS_01',1,'0000:0000:0000:0000:0000:ffff:0a40:e501','LAN_AL_PREFS_01','Your settings have been saved - Success'),(54,1541074256,31129,0,'PREFS_01',0,'0000:0000:0000:0000:0000:ffff:0a40:e501','LAN_AL_PREFS_01','LAN_SETSAVED - Success[!br!]Array[!br!]([!br!] [0] => Array[!br!] ([!br!] [file] => /var/www/html/e107/e107_handlers/online_class.php[!br!] [line] => 389[!br!] [function] => save[!br!] [class] => e_pref[!br!] [type] => ->[!br!] [args] => Array[!br!] ([!br!] [0] => [!br!] [1] => 1[!br!] [2] => [!br!] )[!br!][!br!] )[!br!][!br!] [1] => Array[!br!] ([!br!] [file] => /var/www/html/e107/class2.php[!br!] [line] => 2043[!br!] [function] => goOnline[!br!] [class] => e_online[!br!] [type] => ->[!br!] [args] => Array[!br!] ([!br!] [0] => 1[!br!] [1] => 1[!br!] )[!br!][!br!] )[!br!][!br!])[!br!]'); +/*!40000 ALTER TABLE `e107_admin_log` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `e107_audit_log` +-- + +DROP TABLE IF EXISTS `e107_audit_log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `e107_audit_log` ( + `dblog_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `dblog_datestamp` int(10) unsigned NOT NULL DEFAULT '0', + `dblog_microtime` int(10) unsigned NOT NULL DEFAULT '0', + `dblog_eventcode` varchar(10) NOT NULL DEFAULT '', + `dblog_user_id` int(10) unsigned NOT NULL DEFAULT '0', + `dblog_user_name` varchar(100) NOT NULL DEFAULT '', + `dblog_ip` varchar(45) NOT NULL DEFAULT '', + `dblog_title` varchar(255) NOT NULL DEFAULT '', + `dblog_remarks` text NOT NULL, + PRIMARY KEY (`dblog_id`), + KEY `dblog_datestamp` (`dblog_datestamp`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `e107_audit_log` +-- + +LOCK TABLES `e107_audit_log` WRITE; +/*!40000 ALTER TABLE `e107_audit_log` DISABLE KEYS */; +/*!40000 ALTER TABLE `e107_audit_log` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `e107_banlist` +-- + +DROP TABLE IF EXISTS `e107_banlist`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `e107_banlist` ( + `banlist_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `banlist_ip` varchar(100) NOT NULL DEFAULT '', + `banlist_bantype` tinyint(3) NOT NULL DEFAULT '0', + `banlist_datestamp` int(10) unsigned NOT NULL DEFAULT '0', + `banlist_banexpires` int(10) unsigned NOT NULL DEFAULT '0', + `banlist_admin` smallint(5) unsigned NOT NULL DEFAULT '0', + `banlist_reason` tinytext NOT NULL, + `banlist_notes` tinytext NOT NULL, + PRIMARY KEY (`banlist_id`), + KEY `banlist_ip` (`banlist_ip`), + KEY `banlist_datestamp` (`banlist_datestamp`), + KEY `banlist_banexpires` (`banlist_banexpires`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `e107_banlist` +-- + +LOCK TABLES `e107_banlist` WRITE; +/*!40000 ALTER TABLE `e107_banlist` DISABLE KEYS */; +/*!40000 ALTER TABLE `e107_banlist` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `e107_comments` +-- + +DROP TABLE IF EXISTS `e107_comments`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `e107_comments` ( + `comment_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `comment_pid` int(10) unsigned NOT NULL DEFAULT '0', + `comment_item_id` int(10) unsigned NOT NULL DEFAULT '0', + `comment_subject` varchar(100) NOT NULL DEFAULT '', + `comment_author_id` int(10) unsigned NOT NULL DEFAULT '0', + `comment_author_name` varchar(100) NOT NULL DEFAULT '', + `comment_author_email` varchar(200) NOT NULL DEFAULT '', + `comment_datestamp` int(10) unsigned NOT NULL DEFAULT '0', + `comment_comment` text NOT NULL, + `comment_blocked` tinyint(3) unsigned NOT NULL DEFAULT '0', + `comment_ip` varchar(45) NOT NULL DEFAULT '', + `comment_type` varchar(20) NOT NULL DEFAULT '0', + `comment_lock` tinyint(1) unsigned NOT NULL DEFAULT '0', + `comment_share` tinyint(1) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`comment_id`), + KEY `comment_blocked` (`comment_blocked`), + KEY `comment_author_id` (`comment_author_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `e107_comments` +-- + +LOCK TABLES `e107_comments` WRITE; +/*!40000 ALTER TABLE `e107_comments` DISABLE KEYS */; +/*!40000 ALTER TABLE `e107_comments` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `e107_core` +-- + +DROP TABLE IF EXISTS `e107_core`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `e107_core` ( + `e107_name` varchar(100) NOT NULL DEFAULT '', + `e107_value` text NOT NULL, + PRIMARY KEY (`e107_name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `e107_core` +-- + +LOCK TABLES `e107_core` WRITE; +/*!40000 ALTER TABLE `e107_core` DISABLE KEYS */; +INSERT INTO `e107_core` VALUES ('SitePrefs','array (\n \'admin_alerts_ok\' => \'1\',\n \'admin_alerts_uniquemenu\' => \'0\',\n \'admin_separate_plugins\' => \'0\',\n \'admincode\' => \'0\',\n \'admincss\' => \'css/bootstrap-dark.min.css\',\n \'adminlanguage\' => \'\',\n \'adminpwordchange\' => \'0\',\n \'adminstyle\' => \'flexpanel\',\n \'admintheme\' => \'bootstrap3\',\n \'allowCommentEdit\' => \'0\',\n \'allowEmailLogin\' => \'2\',\n \'anon_post\' => \'0\',\n \'antiflood1\' => \'1\',\n \'antiflood_timeout\' => \'10\',\n \'auth_method\' => \'\',\n \'autoban\' => \'1\',\n \'autologinpostsignup\' => \'1\',\n \'ban_date_format\' => \'%H:%M %d-%m-%y\',\n \'ban_max_online_access\' => \'100,200\',\n \'ban_retrigger\' => \'0\',\n \'cachestatus\' => \'\',\n \'check_updates\' => \'1\',\n \'comments_disabled\' => \'0\',\n \'comments_emoticons\' => \'0\',\n \'comments_engine\' => \'e107\',\n \'comments_icon\' => \'0\',\n \'comments_moderate\' => \'247\',\n \'comments_sort\' => \'desc\',\n \'compress_output\' => \'0\',\n \'contact_emailcopy\' => \'0\',\n \'contact_visibility\' => \'0\',\n \'contact_filter\' => \'\',\n \'cookie_name\' => \'e107_cookie\',\n \'core-infopanel-default\' => \n array (\n 0 => \'e-administrator\',\n 1 => \'e-cpage\',\n 2 => \'e-filemanager\',\n 3 => \'e-frontpage\',\n 4 => \'e-image\',\n 5 => \'e-mailout\',\n 6 => \'e-menus\',\n 7 => \'e-meta\',\n 8 => \'e-newspost\',\n 9 => \'e-plugin\',\n 10 => \'e-prefs\',\n 11 => \'e-links\',\n 12 => \'e-theme\',\n 13 => \'e-userclass2\',\n 14 => \'e-users\',\n 15 => \'e-wmessage\',\n ),\n \'db_updates\' => \n array (\n ),\n \'developer\' => \'0\',\n \'disable_emailcheck\' => \'0\',\n \'disallowMultiLogin\' => \'0\',\n \'display_memory_usage\' => \'0\',\n \'displayname_class\' => \'255\',\n \'displayname_maxlength\' => \'20\',\n \'displayrendertime\' => \'0\',\n \'displaysql\' => \'0\',\n \'displaythemeinfo\' => \'1\',\n \'download_email\' => \'0\',\n \'e_admin_list\' => \n array (\n \'social\' => \'social\',\n ),\n \'e_comment_list\' => \n array (\n \'social\' => \'social\',\n ),\n \'e_event_list\' => \n array (\n \'news\' => \'news\',\n \'social\' => \'social\',\n ),\n \'e_featurebox_list\' => \n array (\n \'news\' => \'news\',\n ),\n \'e_footer_list\' => \n array (\n \'tinymce4\' => \'tinymce4\',\n ),\n \'e_header_list\' => \n array (\n \'featurebox\' => \'featurebox\',\n \'gallery\' => \'gallery\',\n \'news\' => \'news\',\n \'tinymce4\' => \'tinymce4\',\n ),\n \'e_jslib_cdn\' => \'1\',\n \'e_jslib_cdn_provider\' => \'jsdelivr\',\n \'e_jslib_browser_cache\' => \'0\',\n \'e_jslib_nobcache\' => \'1\',\n \'e_jslib_nocache\' => \'1\',\n \'e_jslib_gzip\' => \'1\',\n \'e_jslib_nocombine\' => \'1\',\n \'e_jslib_core\' => \n array (\n \'prototype\' => \'none\',\n \'jquery\' => \'all\',\n ),\n \'e_jslib_plugin\' => \n array (\n ),\n \'e_jslib_theme\' => \n array (\n ),\n \'e_meta_list\' => \n array (\n \'rss_menu\' => \'rss_menu\',\n ),\n \'e_module_list\' => \n array (\n \'social\' => \'social\',\n ),\n \'e_related_list\' => \n array (\n \'news\' => \'news\',\n \'page\' => \'page\',\n ),\n \'e_rss_list\' => \n array (\n \'featurebox\' => \'featurebox\',\n \'news\' => \'news\',\n ),\n \'e_search_list\' => \n array (\n \'news\' => \'news\',\n \'page\' => \'page\',\n ),\n \'e_shortcode_list\' => \n array (\n \'featurebox\' => \'featurebox\',\n \'gallery\' => \'gallery\',\n \'page\' => \'page\',\n \'siteinfo\' => \'siteinfo\',\n \'social\' => \'social\',\n ),\n \'shortcode_list\' => \n array (\n ),\n \'e_sitelink_list\' => \n array (\n \'news\' => \'news\',\n \'page\' => \'page\',\n ),\n \'e_sql_list\' => \n array (\n \'featurebox\' => \'featurebox_sql\',\n \'rss_menu\' => \'rss_sql\',\n ),\n \'e_url_list\' => \n array (\n \'gallery\' => \'gallery\',\n \'news\' => \'news\',\n \'rss_menu\' => \'rss_menu\',\n ),\n \'email_text\' => \'\',\n \'emotepack\' => \'default\',\n \'enable_rdns\' => \'0\',\n \'enable_rdns_on_ban\' => \'0\',\n \'failed_login_limit\' => \'10\',\n \'filter_script\' => \'1\',\n \'flood_hits\' => \'100\',\n \'flood_protect\' => \'1\',\n \'flood_time\' => \'30\',\n \'flood_timeout\' => \'5\',\n \'forumdate\' => \'%a %b %d %Y, %I:%M%p\',\n \'fpwcode\' => \'0\',\n \'frontpage\' => \n array (\n 0 => \'index.php\',\n ),\n \'frontpage_force\' => \n array (\n 0 => \'\',\n ),\n \'gdpr_privacypolicy\' => \'\',\n \'gdpr_termsandconditions\' => \'\',\n \'html_abuse\' => \'1\',\n \'im_height\' => \'80\',\n \'im_path\' => \'/usr/X11R6/bin/\',\n \'im_width\' => \'80\',\n \'image_post\' => \'1\',\n \'image_post_class\' => \'0\',\n \'image_preload\' => \'0\',\n \'img_import_resize\' => \'1200x800\',\n \'inline_editing\' => \'255\',\n \'inputdate\' => \'%A, %d %b, %Y\',\n \'inputtime\' => \'%I:%M %p\',\n \'install_date\' => 1541074252,\n \'link_replace\' => \'0\',\n \'link_text\' => \'\',\n \'linkpage_screentip\' => \'0\',\n \'links_new_window\' => \'1\',\n \'log_page_accesses\' => \'0\',\n \'log_refertype\' => \'1\',\n \'logcode\' => \'0\',\n \'loginname_maxlength\' => \'30\',\n \'longdate\' => \'%A %d %B %Y - %H:%M:%S\',\n \'mail_pause\' => \'3\',\n \'mail_bounce\' => \'none\',\n \'mail_pausetime\' => \'4\',\n \'mail_sendstyle\' => \'texthtml\',\n \'mail_workpertick\' => \'5\',\n \'mailer\' => \'php\',\n \'bulkmailer\' => \'smtp\',\n \'main_wordwrap\' => \'\',\n \'maintainance_flag\' => \'0\',\n \'make_clickable\' => \'0\',\n \'memberlist_access\' => \'253\',\n \'membersonly_enabled\' => \'0\',\n \'membersonly_exceptions\' => \n array (\n 0 => \'\',\n ),\n \'menu_wordwrap\' => \'0\',\n \'menuconfig_list\' => \n array (\n \'login_menu\' => \n array (\n \'name\' => \'Login\',\n \'link\' => \'login_menu/config.php\',\n ),\n \'news\' => \n array (\n \'name\' => \'Newsmonths\',\n \'link\' => \'blogcalendar_menu/config.php\',\n ),\n ),\n \'membersonly_redirect\' => \'login\',\n \'meta_tag\' => \'\',\n \'multilanguage\' => \'0\',\n \'nbr_cols\' => \'1\',\n \'nested_comments\' => \'1\',\n \'news_cats\' => \'\',\n \'news_default_template\' => \'default\',\n \'news_list_limit\' => \'10\',\n \'news_newdateheader\' => \'0\',\n \'newsposts\' => \'10\',\n \'newsposts_archive\' => \'0\',\n \'newsposts_archive_title\' => \'\',\n \'noLanguageSubs\' => \'0\',\n \'null\' => \'\',\n \'old_np\' => \'0\',\n \'pageCookieExpire\' => \'84600\',\n \'passwordEncoding\' => 3,\n \'password_CHAP\' => \'0\',\n \'plug_installed\' => \n array (\n \'news\' => \'1.0\',\n \'page\' => \'1.0\',\n \'siteinfo\' => \'1.0\',\n \'social\' => \'1.0\',\n \'tinymce4\' => \'1.0\',\n \'rss_menu\' => \'1.3\',\n \'contact\' => \'1.0\',\n \'user\' => \'1.0\',\n \'featurebox\' => \'1.1\',\n \'gallery\' => \'1.1\',\n ),\n \'post_html\' => \'254\',\n \'post_script\' => \'254\',\n \'predefinedLoginName\' => \'\',\n \'profanity_filter\' => \'0\',\n \'profanity_replace\' => \'[censored]\',\n \'profanity_words\' => \'\',\n \'redirectsiteurl\' => \'0\',\n \'replyto_email\' => \'e107inc@gmail.com\',\n \'replyto_name\' => \'e107\',\n \'resize_method\' => \'gd2\',\n \'resize_dimensions\' => \n array (\n \'news-image\' => \n array (\n \'w\' => \'300\',\n \'h\' => \'300\',\n ),\n \'news-bbcode\' => \n array (\n \'w\' => \'300\',\n \'h\' => \'300\',\n ),\n \'page-bbcode\' => \n array (\n \'w\' => \'300\',\n \'h\' => \'300\',\n ),\n ),\n \'search_highlight\' => \'1\',\n \'search_restrict\' => \'0\',\n \'session_lifetime\' => \'86400\',\n \'shortdate\' => \'%d %b %Y : %H:%M\',\n \'signcode\' => \'0\',\n \'signup_disallow_text\' => \'\',\n \'signup_maxip\' => \'3\',\n \'signup_option_class\' => \'0\',\n \'signup_option_customtitle\' => \'0\',\n \'signup_option_email_confirm\' => \'0\',\n \'signup_option_hideemail\' => \'0\',\n \'signup_option_image\' => \'0\',\n \'signup_option_password\' => \'2\',\n \'signup_option_realname\' => \'0\',\n \'signup_option_signature\' => \'0\',\n \'signup_pass_len\' => \'6\',\n \'signup_text\' => \'\',\n \'signup_text_after\' => \'\',\n \'siteadmin\' => \'e107\',\n \'siteadminemail\' => \'e107inc@gmail.com\',\n \'sitebutton\' => \'{e_IMAGE}button.png\',\n \'sitecontactinfo\' => \'[b]My Company[/b]\n13 My Address St.\nCity, State, Country\n[b]Phone:[/b] 555-555-5555\n[b]Email:[/b] sales@mydomain.com\',\n \'sitecontacts\' => \'255\',\n \'sitedescription\' => \'\',\n \'sitedisclaimer\' => \'\',\n \'sitelang_init\' => \'English\',\n \'sitelanguage\' => \'English\',\n \'sitelogo\' => \'\',\n \'sitename\' => \'e107\',\n \'sitetag\' => \'e107 Website System\',\n \'sitetheme\' => \'bootstrap3\',\n \'sitetheme_custompages\' => \n array (\n \'jumbotron_home\' => \n array (\n 0 => \'FRONTPAGE\',\n ),\n \'jumbotron_full\' => \n array (\n 0 => \'forum\',\n ),\n \'jumbotron_sidebar_right\' => \n array (\n 0 => \'/news\',\n ),\n ),\n \'sitetheme_deflayout\' => \'jumbotron_sidebar_right\',\n \'sitetheme_layouts\' => \n array (\n \'jumbotron_home\' => \n array (\n \'@attributes\' => \n array (\n \'title\' => \'Jumbotron (home)\',\n \'default\' => \'false\',\n ),\n \'custompages\' => \'FRONTPAGE\',\n ),\n \'modern_business_home\' => \n array (\n \'@attributes\' => \n array (\n \'title\' => \'Modern Business: Home page carousel with fixed custom-menus\',\n ),\n \'@value\' => \'\',\n ),\n \'jumbotron_full\' => \n array (\n \'@attributes\' => \n array (\n \'title\' => \'Jumbotron (full-width)\',\n ),\n \'custompages\' => \'forum\',\n ),\n \'jumbotron_sidebar_right\' => \n array (\n \'@attributes\' => \n array (\n \'title\' => \'Jumbotron (sidebar-right)\',\n \'default\' => \'true\',\n ),\n \'custompages\' => \'/news\',\n \'menuPresets\' => \n array (\n \'area\' => \n array (\n 0 => \n array (\n \'@attributes\' => \n array (\n \'id\' => \'1\',\n ),\n \'menu\' => \n array (\n 0 => \n array (\n \'@attributes\' => \n array (\n \'name\' => \'search\',\n ),\n \'@value\' => \'\',\n ),\n 1 => \n array (\n \'@attributes\' => \n array (\n \'name\' => \'news_categories\',\n ),\n \'@value\' => \'\',\n ),\n 2 => \n array (\n \'@attributes\' => \n array (\n \'name\' => \'other_news\',\n ),\n \'@value\' => \'\',\n ),\n 3 => \n array (\n \'@attributes\' => \n array (\n \'name\' => \'other_news2\',\n ),\n \'@value\' => \'\',\n ),\n 4 => \n array (\n \'@attributes\' => \n array (\n \'name\' => \'blogcalendar\',\n ),\n \'@value\' => \'\',\n ),\n ),\n ),\n ),\n ),\n ),\n ),\n \'sitetheme_pref\' => \'\',\n \'siteurl\' => \'https://localhost/e107/\',\n \'smiley_activate\' => \'1\',\n \'smtp_server\' => \'\',\n \'smtp_username\' => \'\',\n \'smtp_password\' => \'\',\n \'smtp_options\' => \'\',\n \'smtp_port\' => \'25\',\n \'social_login_active\' => \'0\',\n \'social_login\' => \'array()\',\n \'ssl_enabled\' => \'0\',\n \'subnews_attach\' => \'253\',\n \'subnews_class\' => \'253\',\n \'subnews_htmlarea\' => \'0\',\n \'subnews_resize\' => \'\',\n \'themecss\' => \'style.css\',\n \'thumbnail_quality\' => \'75\',\n \'timezone\' => \'UTC\',\n \'track_online\' => \'1\',\n \'ue_upgrade\' => \'1\',\n \'upload_class\' => \'255\',\n \'upload_enabled\' => \'0\',\n \'upload_maxfilesize\' => \'2M\',\n \'url_aliases\' => \n array (\n ),\n \'url_config\' => \n array (\n \'index\' => \'core\',\n \'news\' => \'core\',\n \'page\' => \'core\',\n \'search\' => \'core\',\n \'system\' => \'core\',\n \'user\' => \'core\',\n \'gallery\' => \'plugin\',\n ),\n \'url_profiles\' => \n array (\n ),\n \'url_disable_pathinfo\' => \'1\',\n \'url_error_redirect\' => \'0\',\n \'url_locations\' => \n array (\n \'index\' => \n array (\n 0 => \'core\',\n ),\n \'news\' => \n array (\n 0 => \'core\',\n 1 => \'core/sef_full\',\n 2 => \'core/sef\',\n 3 => \'core/sef_noid\',\n ),\n \'page\' => \n array (\n 0 => \'core\',\n 1 => \'core/sef\',\n 2 => \'core/sef_noid\',\n 3 => \'core/sef_chapters\',\n ),\n \'search\' => \n array (\n 0 => \'core\',\n 1 => \'core/rewrite\',\n ),\n \'system\' => \n array (\n 0 => \'core\',\n 1 => \'core/rewrite\',\n ),\n \'user\' => \n array (\n 0 => \'core\',\n 1 => \'core/rewrite\',\n ),\n \'gallery\' => \n array (\n 0 => \'plugin\',\n 1 => \'plugin/rewrite\',\n ),\n ),\n \'url_main_module\' => \'\',\n \'url_modules\' => \n array (\n \'core\' => \n array (\n 0 => \'index\',\n 1 => \'news\',\n 2 => \'page\',\n 3 => \'search\',\n 4 => \'system\',\n 5 => \'user\',\n ),\n \'plugin\' => \n array (\n 0 => \'gallery\',\n ),\n \'override\' => \n array (\n ),\n ),\n \'url_sef_translate\' => \'dashl\',\n \'useGeshi\' => \'0\',\n \'use_coppa\' => \'1\',\n \'user_new_period\' => \'3\',\n \'user_reg\' => \'1\',\n \'user_reg_secureveri\' => \'1\',\n \'user_reg_veri\' => \'1\',\n \'user_tracking\' => \'cookie\',\n \'version\' => \'2.1.7\',\n \'wm_enclose\' => \'1\',\n \'wmessage_sc\' => \'0\',\n \'wysiwyg\' => \'1\',\n \'xup_enabled\' => \'1\',\n \'xurl\' => \n array (\n \'facebook\' => \'#\',\n \'twitter\' => \'#\',\n \'youtube\' => \'#\',\n \'google\' => \'#\',\n \'linkedin\' => \'\',\n \'github\' => \'\',\n \'flickr\' => \'\',\n \'instagram\' => \'\',\n \'pinterest\' => \'\',\n \'vimeo\' => \'\',\n ),\n \'xmlfeed_languagepacks\' => \'http://www.e107.org/themeupdate.php\',\n \'xmlfeed_security\' => \'http://www.e107.org/themeupdate.php\',\n \'lan_global_list\' => \n array (\n \'featurebox\' => \'featurebox\',\n \'gallery\' => \'gallery\',\n \'rss_menu\' => \'rss_menu\',\n \'social\' => \'social\',\n ),\n \'fb_active\' => \'1\',\n \'bbcode_list\' => \n array (\n ),\n \'shortcode_legacy_list\' => \n array (\n \'newforumposts_main\' => \n array (\n \'newforumposts\' => 255,\n ),\n ),\n \'e_menu_list\' => \n array (\n \'news\' => \'news\',\n \'page\' => \'page\',\n ),\n \'e_gsitemap_list\' => \n array (\n \'news\' => \'news\',\n ),\n \'e_dashboard_list\' => \n array (\n \'user\' => \'user\',\n ),\n \'e_mailout_list\' => \n array (\n \'user\' => \'user\',\n ),\n \'e_user_list\' => \n array (\n \'user\' => \'user\',\n ),\n \'e_library_list\' => \n array (\n \'gallery\' => \'gallery\',\n ),\n \'sitetheme_glyphicons\' => \n array (\n ),\n \'sitetheme_version\' => \'1.0\',\n)'),('emote_','array (\n \'alien!png\' => \'!alien\',\n \'amazed!png\' => \'!amazed\',\n \'angry!png\' => \'!grr !angry\',\n \'biglaugh!png\' => \'!lol\',\n \'cheesey!png\' => \':D :oD :-D\',\n \'confused!png\' => \':? :o? :-?\',\n \'cry!png\' => \'&| &-| &o| :(( !cry\',\n \'dead!png\' => \'x) xo) x-) x( xo( x-(\',\n \'dodge!png\' => \'!dodge\',\n \'frown!png\' => \':( :o( :-(\',\n \'gah!png\' => \':@ :o@ :o@\',\n \'grin!png\' => \':D :oD :-D\',\n \'heart!png\' => \'!heart\',\n \'idea!png\' => \':! :o! :-!\',\n \'ill!png\' => \'!ill\',\n \'mad!png\' => \'~:( ~:o( ~:-(\',\n \'mistrust!png\' => \'!mistrust\',\n \'neutral!png\' => \':| :o| :-|\',\n \'question!png\' => \'?!\',\n \'rolleyes!png\' => \'B) Bo) B-)\',\n \'sad!png\' => \'!sad\',\n \'shades!png\' => \'8) 8o) 8-)\',\n \'shy!png\' => \'!shy\',\n \'smile!png\' => \':) :o) :-)\',\n \'special!png\' => \'%-6\',\n \'suprised!png\' => \':O :oO :-O\',\n \'tongue!png\' => \':p :op :-p :P :oP :-P\',\n \'wink!png\' => \';) ;o) ;-)\',\n)'),('menu_pref','array (\n \'clock_caption\' => \'Date / Time\',\n \'comment_caption\' => \'Latest Comments\',\n \'comment_characters\' => \'50\',\n \'comment_display\' => \'10\',\n \'comment_postfix\' => \'[more ...]\',\n \'comment_title\' => \'0\',\n \'forum_no_characters\' => \'20\',\n \'forum_postfix\' => \'[more ...]\',\n \'forum_show_topics\' => \'1\',\n \'newforumposts_caption\' => \'Latest Forum Posts\',\n \'newforumposts_characters\' => \'50\',\n \'newforumposts_display\' => \'10\',\n \'newforumposts_postfix\' => \'[more ...]\',\n \'newforumposts_title\' => \'0\',\n \'update_menu\' => \'Update menu Settings\',\n)'),('search_prefs','array (\n \'comments_handlers\' => \n array (\n \'news\' => \n array (\n \'id\' => 0,\n \'dir\' => \'core\',\n \'class\' => \'0\',\n ),\n \'download\' => \n array (\n \'id\' => 2,\n \'dir\' => \'core\',\n \'class\' => \'0\',\n ),\n ),\n \'core_handlers\' => \n array (\n \'comments\' => \n array (\n \'class\' => \'0\',\n \'pre_title\' => \'1\',\n \'pre_title_alt\' => \'\',\n \'chars\' => \'150\',\n \'results\' => \'10\',\n \'order\' => \'2\',\n ),\n \'users\' => \n array (\n \'class\' => \'0\',\n \'pre_title\' => \'1\',\n \'pre_title_alt\' => \'\',\n \'chars\' => \'150\',\n \'results\' => \'10\',\n \'order\' => \'3\',\n ),\n ),\n \'google\' => \'0\',\n \'multisearch\' => \'1\',\n \'mysql_sort\' => \'1\',\n \'php_limit\' => \'\',\n \'relevance\' => \'0\',\n \'selector\' => \'2\',\n \'time_restrict\' => \'0\',\n \'time_secs\' => \'60\',\n \'user_select\' => \'1\',\n)'),('notify_prefs','array (\n \'event\' => \n array (\n \'login\' => \n array (\n \'class\' => \'255\',\n \'email\' => \'\',\n \'include\' => \'\',\n \'legacy\' => \'0\',\n ),\n \'logout\' => \n array (\n \'class\' => \'255\',\n \'email\' => \'\',\n \'include\' => \'\',\n \'legacy\' => \'0\',\n ),\n \'user_signup_submitted\' => \n array (\n \'class\' => \'255\',\n \'email\' => \'\',\n \'include\' => \'\',\n \'legacy\' => \'0\',\n ),\n \'user_signup_activated\' => \n array (\n \'class\' => \'255\',\n \'email\' => \'\',\n \'include\' => \'\',\n \'legacy\' => \'0\',\n ),\n \'user_ban_flood\' => \n array (\n \'class\' => \'255\',\n \'email\' => \'\',\n \'include\' => \'\',\n \'legacy\' => \'0\',\n ),\n \'user_news_submit\' => \n array (\n \'class\' => \'255\',\n \'email\' => \'\',\n \'include\' => \'\',\n \'legacy\' => \'0\',\n ),\n \'admin_news_created\' => \n array (\n \'class\' => \'255\',\n \'email\' => \'\',\n \'include\' => \'\',\n \'legacy\' => \'0\',\n ),\n \'admin_news_updated\' => \n array (\n \'class\' => \'255\',\n \'email\' => \'\',\n \'include\' => \'\',\n \'legacy\' => \'0\',\n ),\n \'admin_news_deleted\' => \n array (\n \'class\' => \'255\',\n \'email\' => \'\',\n \'include\' => \'\',\n \'legacy\' => \'0\',\n ),\n \'user_xup_login\' => \n array (\n \'class\' => \'255\',\n \'include\' => \'\',\n \'legacy\' => \'0\',\n ),\n \'user_xup_signup\' => \n array (\n \'class\' => \'255\',\n \'include\' => \'\',\n \'legacy\' => \'0\',\n ),\n \'user_ban_failed_login\' => \n array (\n \'class\' => \'255\',\n \'include\' => \'\',\n \'legacy\' => \'0\',\n ),\n \'user_profile_display\' => \n array (\n \'class\' => \'255\',\n \'include\' => \'\',\n \'legacy\' => \'0\',\n ),\n \'admin_password_update\' => \n array (\n \'class\' => \'255\',\n \'include\' => \'\',\n \'legacy\' => \'0\',\n ),\n \'admin_user_created\' => \n array (\n \'class\' => \'255\',\n \'include\' => \'\',\n \'legacy\' => \'0\',\n ),\n \'admin_user_activated\' => \n array (\n \'class\' => \'255\',\n \'include\' => \'\',\n \'legacy\' => \'0\',\n ),\n \'admin_news_notify\' => \n array (\n \'class\' => \'255\',\n \'include\' => \'\',\n \'legacy\' => \'0\',\n ),\n \'maildone\' => \n array (\n \'class\' => \'255\',\n \'include\' => \'\',\n \'legacy\' => \'0\',\n ),\n \'user_file_upload\' => \n array (\n \'class\' => \'255\',\n \'include\' => \'\',\n \'legacy\' => \'0\',\n ),\n ),\n)'),('SitePrefs_Backup','array (\n \'admin_alerts_ok\' => \'1\',\n \'admin_alerts_uniquemenu\' => \'0\',\n \'admin_separate_plugins\' => \'0\',\n \'admincode\' => \'0\',\n \'admincss\' => \'admin_dark.css\',\n \'adminlanguage\' => \'\',\n \'adminpwordchange\' => \'0\',\n \'adminstyle\' => \'flexpanel\',\n \'admintheme\' => \'bootstrap3\',\n \'allowCommentEdit\' => \'0\',\n \'allowEmailLogin\' => \'2\',\n \'anon_post\' => \'0\',\n \'antiflood1\' => \'1\',\n \'antiflood_timeout\' => \'10\',\n \'auth_method\' => \'\',\n \'autoban\' => \'1\',\n \'autologinpostsignup\' => \'1\',\n \'ban_date_format\' => \'%H:%M %d-%m-%y\',\n \'ban_max_online_access\' => \'100,200\',\n \'ban_retrigger\' => \'0\',\n \'cachestatus\' => \'\',\n \'check_updates\' => \'1\',\n \'comments_disabled\' => \'0\',\n \'comments_emoticons\' => \'0\',\n \'comments_engine\' => \'e107\',\n \'comments_icon\' => \'0\',\n \'comments_moderate\' => \'247\',\n \'comments_sort\' => \'desc\',\n \'compress_output\' => \'0\',\n \'contact_emailcopy\' => \'0\',\n \'contact_visibility\' => \'0\',\n \'contact_filter\' => \'\',\n \'cookie_name\' => \'e107cookie\',\n \'core-infopanel-default\' => \n array (\n 0 => \'e-administrator\',\n 1 => \'e-cpage\',\n 2 => \'e-filemanager\',\n 3 => \'e-frontpage\',\n 4 => \'e-image\',\n 5 => \'e-mailout\',\n 6 => \'e-menus\',\n 7 => \'e-meta\',\n 8 => \'e-newspost\',\n 9 => \'e-plugin\',\n 10 => \'e-prefs\',\n 11 => \'e-links\',\n 12 => \'e-theme\',\n 13 => \'e-userclass2\',\n 14 => \'e-users\',\n 15 => \'e-wmessage\',\n ),\n \'db_updates\' => \n array (\n ),\n \'developer\' => \'0\',\n \'disable_emailcheck\' => \'0\',\n \'disallowMultiLogin\' => \'0\',\n \'display_memory_usage\' => \'0\',\n \'displayname_class\' => \'255\',\n \'displayname_maxlength\' => \'20\',\n \'displayrendertime\' => \'0\',\n \'displaysql\' => \'0\',\n \'displaythemeinfo\' => \'1\',\n \'download_email\' => \'0\',\n \'e_admin_list\' => \n array (\n \'social\' => \'social\',\n ),\n \'e_comment_list\' => \n array (\n \'social\' => \'social\',\n ),\n \'e_event_list\' => \n array (\n \'news\' => \'news\',\n \'social\' => \'social\',\n ),\n \'e_featurebox_list\' => \n array (\n \'news\' => \'news\',\n ),\n \'e_footer_list\' => \n array (\n \'tinymce4\' => \'tinymce4\',\n ),\n \'e_header_list\' => \n array (\n \'featurebox\' => \'featurebox\',\n \'gallery\' => \'gallery\',\n \'news\' => \'news\',\n \'tinymce4\' => \'tinymce4\',\n ),\n \'e_jslib_cdn\' => \'1\',\n \'e_jslib_cdn_provider\' => \'jsdelivr\',\n \'e_jslib_browser_cache\' => \'0\',\n \'e_jslib_nobcache\' => \'1\',\n \'e_jslib_nocache\' => \'1\',\n \'e_jslib_gzip\' => \'1\',\n \'e_jslib_nocombine\' => \'1\',\n \'e_jslib_core\' => \n array (\n \'prototype\' => \'none\',\n \'jquery\' => \'all\',\n ),\n \'e_jslib_plugin\' => \n array (\n ),\n \'e_jslib_theme\' => \n array (\n ),\n \'e_meta_list\' => \n array (\n \'rss_menu\' => \'rss_menu\',\n ),\n \'e_module_list\' => \n array (\n \'social\' => \'social\',\n ),\n \'e_related_list\' => \n array (\n \'news\' => \'news\',\n \'page\' => \'page\',\n ),\n \'e_rss_list\' => \n array (\n \'featurebox\' => \'featurebox\',\n \'news\' => \'news\',\n ),\n \'e_search_list\' => \n array (\n \'news\' => \'news\',\n \'page\' => \'page\',\n ),\n \'e_shortcode_list\' => \n array (\n \'featurebox\' => \'featurebox\',\n \'gallery\' => \'gallery\',\n \'page\' => \'page\',\n \'siteinfo\' => \'siteinfo\',\n \'social\' => \'social\',\n ),\n \'shortcode_list\' => \n array (\n ),\n \'e_sitelink_list\' => \n array (\n \'news\' => \'news\',\n \'page\' => \'page\',\n ),\n \'e_sql_list\' => \n array (\n \'featurebox\' => \'featurebox_sql\',\n \'rss_menu\' => \'rss_sql\',\n ),\n \'e_url_list\' => \n array (\n \'gallery\' => \'gallery\',\n \'news\' => \'news\',\n \'rss_menu\' => \'rss_menu\',\n ),\n \'email_text\' => \'\',\n \'emotepack\' => \'default\',\n \'enable_rdns\' => \'0\',\n \'enable_rdns_on_ban\' => \'0\',\n \'failed_login_limit\' => \'10\',\n \'filter_script\' => \'1\',\n \'flood_hits\' => \'100\',\n \'flood_protect\' => \'1\',\n \'flood_time\' => \'30\',\n \'flood_timeout\' => \'5\',\n \'forumdate\' => \'%a %b %d %Y, %I:%M%p\',\n \'fpwcode\' => \'0\',\n \'frontpage\' => \n array (\n 0 => \'index.php\',\n ),\n \'frontpage_force\' => \n array (\n 0 => \'\',\n ),\n \'gdpr_privacypolicy\' => \'\',\n \'gdpr_termsandconditions\' => \'\',\n \'html_abuse\' => \'1\',\n \'im_height\' => \'80\',\n \'im_path\' => \'/usr/X11R6/bin/\',\n \'im_width\' => \'80\',\n \'image_post\' => \'1\',\n \'image_post_class\' => \'0\',\n \'image_preload\' => \'0\',\n \'img_import_resize\' => \'1200x800\',\n \'inline_editing\' => \'255\',\n \'inputdate\' => \'%A, %d %b, %Y\',\n \'inputtime\' => \'%I:%M %p\',\n \'install_date\' => \'1251664949\',\n \'link_replace\' => \'0\',\n \'link_text\' => \'\',\n \'linkpage_screentip\' => \'0\',\n \'links_new_window\' => \'1\',\n \'log_page_accesses\' => \'0\',\n \'log_refertype\' => \'1\',\n \'logcode\' => \'0\',\n \'loginname_maxlength\' => \'30\',\n \'longdate\' => \'%A %d %B %Y - %H:%M:%S\',\n \'mail_pause\' => \'3\',\n \'mail_bounce\' => \'none\',\n \'mail_pausetime\' => \'4\',\n \'mail_sendstyle\' => \'texthtml\',\n \'mail_workpertick\' => \'5\',\n \'mailer\' => \'php\',\n \'bulkmailer\' => \'smtp\',\n \'main_wordwrap\' => \'\',\n \'maintainance_flag\' => \'0\',\n \'make_clickable\' => \'0\',\n \'memberlist_access\' => \'253\',\n \'membersonly_enabled\' => \'0\',\n \'membersonly_exceptions\' => \n array (\n 0 => \'\',\n ),\n \'menu_wordwrap\' => \'0\',\n \'menuconfig_list\' => \n array (\n \'login_menu\' => \n array (\n \'name\' => \'Login\',\n \'link\' => \'login_menu/config.php\',\n ),\n \'news\' => \n array (\n \'name\' => \'Newsmonths\',\n \'link\' => \'blogcalendar_menu/config.php\',\n ),\n ),\n \'membersonly_redirect\' => \'login\',\n \'meta_tag\' => \'\',\n \'multilanguage\' => \'0\',\n \'nbr_cols\' => \'1\',\n \'nested_comments\' => \'1\',\n \'news_cats\' => \'\',\n \'news_default_template\' => \'default\',\n \'news_list_limit\' => \'10\',\n \'news_newdateheader\' => \'0\',\n \'newsposts\' => \'10\',\n \'newsposts_archive\' => \'0\',\n \'newsposts_archive_title\' => \'\',\n \'noLanguageSubs\' => \'0\',\n \'null\' => \'\',\n \'old_np\' => \'0\',\n \'pageCookieExpire\' => \'84600\',\n \'passwordEncoding\' => \'0\',\n \'password_CHAP\' => \'0\',\n \'plug_installed\' => \n array (\n \'news\' => \'1.0\',\n \'page\' => \'1.0\',\n \'siteinfo\' => \'1.0\',\n \'social\' => \'1.0\',\n \'tinymce4\' => \'1.0\',\n \'rss_menu\' => \'1.3\',\n \'contact\' => \'1.0\',\n \'user\' => \'1.0\',\n \'featurebox\' => \'1.1\',\n \'gallery\' => \'1.1\',\n ),\n \'post_html\' => \'254\',\n \'post_script\' => \'254\',\n \'predefinedLoginName\' => \'\',\n \'profanity_filter\' => \'0\',\n \'profanity_replace\' => \'[censored]\',\n \'profanity_words\' => \'\',\n \'redirectsiteurl\' => \'0\',\n \'replyto_email\' => \'registration@yoursite.com\',\n \'replyto_name\' => \'e107 Website System\',\n \'resize_method\' => \'gd2\',\n \'resize_dimensions\' => \n array (\n \'news-image\' => \n array (\n \'w\' => \'300\',\n \'h\' => \'300\',\n ),\n \'news-bbcode\' => \n array (\n \'w\' => \'300\',\n \'h\' => \'300\',\n ),\n \'page-bbcode\' => \n array (\n \'w\' => \'300\',\n \'h\' => \'300\',\n ),\n ),\n \'search_highlight\' => \'1\',\n \'search_restrict\' => \'0\',\n \'session_lifetime\' => \'86400\',\n \'shortdate\' => \'%d %b %Y : %H:%M\',\n \'signcode\' => \'0\',\n \'signup_disallow_text\' => \'\',\n \'signup_maxip\' => \'3\',\n \'signup_option_class\' => \'0\',\n \'signup_option_customtitle\' => \'0\',\n \'signup_option_email_confirm\' => \'0\',\n \'signup_option_hideemail\' => \'0\',\n \'signup_option_image\' => \'0\',\n \'signup_option_password\' => \'2\',\n \'signup_option_realname\' => \'0\',\n \'signup_option_signature\' => \'0\',\n \'signup_pass_len\' => \'6\',\n \'signup_text\' => \'\',\n \'signup_text_after\' => \'\',\n \'siteadmin\' => \'admin\',\n \'siteadminemail\' => \'user@yoursite.com\',\n \'sitebutton\' => \'{e_IMAGE}button.png\',\n \'sitecontactinfo\' => \'[b]My Company[/b]\n13 My Address St.\nCity, State, Country\n[b]Phone:[/b] 555-555-5555\n[b]Email:[/b] sales@mydomain.com\',\n \'sitecontacts\' => \'255\',\n \'sitedescription\' => \'\',\n \'sitedisclaimer\' => \'Copyright Info. All Rights Reserved\',\n \'sitelang_init\' => \'English\',\n \'sitelanguage\' => \'English\',\n \'sitelogo\' => \'\',\n \'sitename\' => \'My Website\',\n \'sitetag\' => \'e107 Website System\',\n \'sitetheme\' => \'bootstrap3\',\n \'sitetheme_custompages\' => \n array (\n \'jumbotron_home\' => \n array (\n 0 => \'FRONTPAGE\',\n ),\n \'jumbotron_full\' => \n array (\n 0 => \'forum\',\n ),\n \'jumbotron_sidebar_right\' => \n array (\n 0 => \'/news\',\n ),\n ),\n \'sitetheme_deflayout\' => \'jumbotron_sidebar_right\',\n \'sitetheme_layouts\' => \n array (\n \'jumbotron_home\' => \n array (\n \'@attributes\' => \n array (\n \'title\' => \'Jumbotron (home)\',\n \'default\' => \'false\',\n ),\n \'custompages\' => \'FRONTPAGE\',\n ),\n \'modern_business_home\' => \n array (\n \'@attributes\' => \n array (\n \'title\' => \'Modern Business: Home page carousel with fixed custom-menus\',\n ),\n \'@value\' => \'\',\n ),\n \'jumbotron_full\' => \n array (\n \'@attributes\' => \n array (\n \'title\' => \'Jumbotron (full-width)\',\n ),\n \'custompages\' => \'forum\',\n ),\n \'jumbotron_sidebar_right\' => \n array (\n \'@attributes\' => \n array (\n \'title\' => \'Jumbotron (sidebar-right)\',\n \'default\' => \'true\',\n ),\n \'custompages\' => \'/news\',\n \'menuPresets\' => \n array (\n \'area\' => \n array (\n 0 => \n array (\n \'@attributes\' => \n array (\n \'id\' => \'1\',\n ),\n \'menu\' => \n array (\n 0 => \n array (\n \'@attributes\' => \n array (\n \'name\' => \'search\',\n ),\n \'@value\' => \'\',\n ),\n 1 => \n array (\n \'@attributes\' => \n array (\n \'name\' => \'news_categories\',\n ),\n \'@value\' => \'\',\n ),\n 2 => \n array (\n \'@attributes\' => \n array (\n \'name\' => \'other_news\',\n ),\n \'@value\' => \'\',\n ),\n 3 => \n array (\n \'@attributes\' => \n array (\n \'name\' => \'other_news2\',\n ),\n \'@value\' => \'\',\n ),\n 4 => \n array (\n \'@attributes\' => \n array (\n \'name\' => \'blogcalendar\',\n ),\n \'@value\' => \'\',\n ),\n ),\n ),\n ),\n ),\n ),\n ),\n \'sitetheme_pref\' => \'\',\n \'siteurl\' => \'/\',\n \'smiley_activate\' => \'1\',\n \'smtp_server\' => \'\',\n \'smtp_username\' => \'\',\n \'smtp_password\' => \'\',\n \'smtp_options\' => \'\',\n \'smtp_port\' => \'25\',\n \'social_login_active\' => \'0\',\n \'social_login\' => \'array()\',\n \'ssl_enabled\' => \'0\',\n \'subnews_attach\' => \'253\',\n \'subnews_class\' => \'253\',\n \'subnews_htmlarea\' => \'0\',\n \'subnews_resize\' => \'\',\n \'themecss\' => \'style.css\',\n \'thumbnail_quality\' => \'75\',\n \'timezone\' => \'UTC\',\n \'track_online\' => \'1\',\n \'ue_upgrade\' => \'1\',\n \'upload_class\' => \'255\',\n \'upload_enabled\' => \'0\',\n \'upload_maxfilesize\' => \'2M\',\n \'url_aliases\' => \n array (\n ),\n \'url_config\' => \n array (\n \'index\' => \'core\',\n \'news\' => \'core\',\n \'page\' => \'core\',\n \'search\' => \'core\',\n \'system\' => \'core\',\n \'user\' => \'core\',\n ),\n \'url_profiles\' => \n array (\n ),\n \'url_disable_pathinfo\' => \'1\',\n \'url_error_redirect\' => \'0\',\n \'url_locations\' => \n array (\n \'index\' => \n array (\n 0 => \'core\',\n ),\n \'news\' => \n array (\n 0 => \'core\',\n 1 => \'core/sef_full\',\n 2 => \'core/sef_noid\',\n 3 => \'core/sef\',\n ),\n \'page\' => \n array (\n 0 => \'core\',\n 1 => \'core/sef_chapters\',\n 2 => \'core/sef_noid\',\n 3 => \'core/sef\',\n ),\n \'search\' => \n array (\n 0 => \'core\',\n 1 => \'core/rewrite\',\n ),\n \'system\' => \n array (\n 0 => \'core\',\n 1 => \'core/rewrite\',\n ),\n \'user\' => \n array (\n 0 => \'core\',\n 1 => \'core/rewrite\',\n ),\n ),\n \'url_main_module\' => \'\',\n \'url_modules\' => \n array (\n \'core\' => \n array (\n 0 => \'index\',\n 1 => \'news\',\n 2 => \'page\',\n 3 => \'search\',\n 4 => \'system\',\n 5 => \'user\',\n ),\n \'plugin\' => \n array (\n 0 => \'gallery\',\n ),\n \'override\' => \n array (\n ),\n ),\n \'url_sef_translate\' => \'dashl\',\n \'useGeshi\' => \'0\',\n \'use_coppa\' => \'1\',\n \'user_new_period\' => \'3\',\n \'user_reg\' => \'1\',\n \'user_reg_secureveri\' => \'1\',\n \'user_reg_veri\' => \'1\',\n \'user_tracking\' => \'cookie\',\n \'version\' => \'2.1.7\',\n \'wm_enclose\' => \'1\',\n \'wmessage_sc\' => \'0\',\n \'wysiwyg\' => \'1\',\n \'xup_enabled\' => \'1\',\n \'xurl\' => \n array (\n \'facebook\' => \'#\',\n \'twitter\' => \'#\',\n \'youtube\' => \'#\',\n \'google\' => \'#\',\n \'linkedin\' => \'\',\n \'github\' => \'\',\n \'flickr\' => \'\',\n \'instagram\' => \'\',\n \'pinterest\' => \'\',\n \'vimeo\' => \'\',\n ),\n \'xmlfeed_languagepacks\' => \'http://www.e107.org/themeupdate.php\',\n \'xmlfeed_security\' => \'http://www.e107.org/themeupdate.php\',\n \'lan_global_list\' => \n array (\n \'featurebox\' => \'featurebox\',\n \'gallery\' => \'gallery\',\n \'rss_menu\' => \'rss_menu\',\n \'social\' => \'social\',\n ),\n \'fb_active\' => \'1\',\n \'bbcode_list\' => \n array (\n ),\n \'shortcode_legacy_list\' => \n array (\n \'newforumposts_main\' => \n array (\n \'newforumposts\' => 255,\n ),\n ),\n \'e_menu_list\' => \n array (\n \'news\' => \'news\',\n \'page\' => \'page\',\n ),\n \'e_gsitemap_list\' => \n array (\n \'news\' => \'news\',\n ),\n \'e_dashboard_list\' => \n array (\n \'user\' => \'user\',\n ),\n \'e_mailout_list\' => \n array (\n \'user\' => \'user\',\n ),\n \'e_user_list\' => \n array (\n \'user\' => \'user\',\n ),\n \'e_library_list\' => \n array (\n \'gallery\' => \'gallery\',\n ),\n \'sitetheme_glyphicons\' => \n array (\n ),\n \'sitetheme_version\' => \'1.0\',\n)'),('plugin_featurebox','array (\n \'menu_category\' => \'bootstrap3_carousel\',\n)'),('plugin_gallery','array (\n \'popup_w\' => \'800\',\n \'popup_h\' => \'800\',\n \'slideshow_category\' => \'1\',\n \'slideshow_duration\' => \'1000\',\n \'slideshow_auto\' => \'1\',\n \'slideshow_freq\' => \'4000\',\n \'slideshow_effect\' => \'scrollHorz\',\n \'perpage\' => \'12\',\n \'orderby\' => \'media_id DESC\',\n \'pp_global\' => \'0\',\n \'pp_hook\' => \'data-gal\',\n \'pp_animation_speed\' => \'fast\',\n \'pp_slideshow\' => \'5000\',\n \'pp_autoplay_slideshow\' => \'0\',\n \'pp_opacity\' => \'0.80\',\n \'pp_show_title\' => \'1\',\n \'pp_allow_resize\' => \'1\',\n \'pp_default_width\' => \'500\',\n \'pp_default_height\' => \'344\',\n \'pp_counter_separator_label\' => \'/\',\n \'pp_theme\' => \'pp_default\',\n \'pp_horizontal_padding\' => \'20\',\n \'pp_hideflash\' => \'0\',\n \'pp_wmode\' => \'opaque\',\n \'pp_autoplay\' => \'1\',\n \'pp_modal\' => \'0\',\n \'pp_deeplinking\' => \'0\',\n \'pp_overlay_gallery\' => \'0\',\n \'pp_keyboard_shortcuts\' => \'1\',\n \'pp_ie6_fallback\' => \'1\',\n)'),('plugin_tinymce4','array (\n \'paste_as_text\' => \'0\',\n \'browser_spellcheck\' => \'1\',\n \'visualblocks\' => \'1\',\n \'code_highlight_class\' => \'prettyprint linenums\',\n)'),('theme_bootstrap3','array (\n \'branding\' => \'sitename\',\n \'nav_alignment\' => \'right\',\n \'usernav_placement\' => \'top\',\n)'),('history_prefs','array (\n \'most_members_online\' => 0,\n \'most_guests_online\' => 1,\n \'most_online_datestamp\' => 1541074256,\n)'); +/*!40000 ALTER TABLE `e107_core` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `e107_core_media` +-- + +DROP TABLE IF EXISTS `e107_core_media`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `e107_core_media` ( + `media_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `media_type` varchar(50) NOT NULL DEFAULT '', + `media_name` varchar(255) NOT NULL DEFAULT '', + `media_caption` varchar(255) NOT NULL DEFAULT '', + `media_description` varchar(255) NOT NULL DEFAULT '', + `media_category` varchar(255) NOT NULL DEFAULT '', + `media_datestamp` int(10) unsigned NOT NULL DEFAULT '0', + `media_author` int(10) unsigned NOT NULL DEFAULT '0', + `media_url` varchar(255) NOT NULL DEFAULT '', + `media_size` int(20) unsigned NOT NULL DEFAULT '0', + `media_dimensions` varchar(25) NOT NULL DEFAULT '', + `media_userclass` varchar(255) NOT NULL DEFAULT '', + `media_usedby` text NOT NULL, + `media_tags` text NOT NULL, + PRIMARY KEY (`media_id`), + UNIQUE KEY `media_url` (`media_url`) +) ENGINE=MyISAM AUTO_INCREMENT=24 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `e107_core_media` +-- + +LOCK TABLES `e107_core_media` WRITE; +/*!40000 ALTER TABLE `e107_core_media` DISABLE KEYS */; +INSERT INTO `e107_core_media` VALUES (1,'image/png','featurebox_16.png','featurebox_16.png','','_icon_16',1541058115,1,'{e_PLUGIN}featurebox/images/featurebox_16.png',774,'16 x 16','0','',''),(2,'image/png','featurebox_32.png','featurebox_32.png','','_icon_32',1541058115,1,'{e_PLUGIN}featurebox/images/featurebox_32.png',1857,'32 x 32','0','',''),(3,'image/jpeg','butterfly.jpg','butterfly.jpg','','gallery_image',1541058115,1,'{e_PLUGIN}gallery/images/butterfly.jpg',238490,'1500 x 1000','0','',''),(4,'image/jpeg','lake-and-forest.jpg','lake-and-forest.jpg','','gallery_image',1541058115,1,'{e_PLUGIN}gallery/images/lake-and-forest.jpg',317718,'1000 x 1500','0','',''),(5,'image/jpeg','horse.jpg','horse.jpg','','gallery_image',1541058115,1,'{e_PLUGIN}gallery/images/horse.jpg',335810,'1500 x 1000','0','',''),(6,'image/png','gallery_16.png','gallery_16.png','','_icon_16',1541058115,1,'{e_PLUGIN}gallery/images/gallery_16.png',1075,'16 x 16','0','',''),(7,'image/png','gallery_32.png','gallery_32.png','','_icon_32',1541058115,1,'{e_PLUGIN}gallery/images/gallery_32.png',2770,'32 x 32','0','',''),(8,'image/png','rss_16.png','rss_16.png','','_icon_16',1541058115,1,'{e_PLUGIN}rss_menu/images/rss_16.png',898,'16 x 16','0','',''),(9,'image/png','rss_32.png','rss_32.png','','_icon_32',1541058115,1,'{e_PLUGIN}rss_menu/images/rss_32.png',2486,'32 x 32','0','',''),(10,'image/png','icon_16.png','icon_16.png','','_icon_16',1541058115,1,'{e_PLUGIN}tinymce4/images/icon_16.png',859,'16 x 16','0','',''),(11,'image/png','icon_32.png','icon_32.png','','_icon_32',1541058115,1,'{e_PLUGIN}tinymce4/images/icon_32.png',2441,'32 x 32','0','',''),(12,'image/png','icon_16.png','icon_16.png','','_icon_16',1541058115,1,'{e_PLUGIN}social/images/icon_16.png',1748,'16 x 16','0','',''),(13,'image/png','icon_32.png','icon_32.png','','_icon_32',1541058115,1,'{e_PLUGIN}social/images/icon_32.png',2446,'32 x 32','0','',''),(14,'image/svg+xml','fontello.svg','fontello.svg','','_icon_svg',1541058115,1,'{e_PLUGIN}social/font/fontello.svg',23886,'','0','',''),(15,'image/png','e107_adminlogo.png','e107_adminlogo.png','','_common_image',1541058115,1,'{e_THEME}bootstrap3/images/e107_adminlogo.png',3285,'81 x 32','0','',''),(16,'image/png','preview_frontend.png','preview_frontend.png','','_common_image',1541058115,1,'{e_THEME}bootstrap3/preview_frontend.png',55212,'1920 x 1080','0','',''),(17,'image/png','adminicons_32.png','adminicons_32.png','','_common_image',1541058115,1,'{e_THEME}bootstrap3/images/adminicons_32.png',246973,'2030 x 69','0','',''),(18,'image/jpeg','admin_kadmin.jpg','admin_kadmin.jpg','','_common_image',1541058115,1,'{e_THEME}bootstrap3/images/admin_kadmin.jpg',71649,'1920 x 1080','0','',''),(19,'image/png','adminicons_16.png','adminicons_16.png','','_common_image',1541058115,1,'{e_THEME}bootstrap3/images/adminicons_16.png',100581,'1675 x 16','0','',''),(20,'image/jpeg','admin_corporate.jpg','admin_corporate.jpg','','_common_image',1541058115,1,'{e_THEME}bootstrap3/images/admin_corporate.jpg',87830,'1920 x 1080','0','',''),(21,'image/jpeg','admin_bootstrap-dark.jpg','admin_bootstrap-dark.jpg','','_common_image',1541058115,1,'{e_THEME}bootstrap3/images/admin_bootstrap-dark.jpg',87681,'1920 x 1080','0','',''),(22,'image/png','browsers.png','browsers.png','','_common_image',1541058115,1,'{e_THEME}bootstrap3/images/browsers.png',46233,'517 x 32','0','',''),(23,'image/jpeg','admin_superhero.jpg','admin_superhero.jpg','','_common_image',1541058115,1,'{e_THEME}bootstrap3/images/admin_superhero.jpg',74108,'1920 x 1080','0','',''); +/*!40000 ALTER TABLE `e107_core_media` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `e107_core_media_cat` +-- + +DROP TABLE IF EXISTS `e107_core_media_cat`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `e107_core_media_cat` ( + `media_cat_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `media_cat_owner` varchar(255) NOT NULL DEFAULT '', + `media_cat_category` varchar(255) NOT NULL DEFAULT '', + `media_cat_title` text NOT NULL, + `media_cat_sef` varchar(255) NOT NULL DEFAULT '', + `media_cat_diz` text NOT NULL, + `media_cat_class` int(5) DEFAULT '0', + `media_cat_image` varchar(255) NOT NULL DEFAULT '', + `media_cat_order` int(3) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`media_cat_id`), + UNIQUE KEY `media_cat_category` (`media_cat_category`) +) ENGINE=MyISAM AUTO_INCREMENT=18 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `e107_core_media_cat` +-- + +LOCK TABLES `e107_core_media_cat` WRITE; +/*!40000 ALTER TABLE `e107_core_media_cat` DISABLE KEYS */; +INSERT INTO `e107_core_media_cat` VALUES (1,'_common','_common_image','(Common Images)','','Media in this category will be available in all areas of admin.',253,'',0),(2,'_common','_common_file','(Common Files)','','Media in this category will be available in all areas of admin.',253,'',0),(3,'_common','_common_video','(Common Videos)','','Media in this category will be available in all areas of admin.',253,'',0),(4,'_common','_common_audio','(Common Audio)','','Media in this category will be available in all areas of admin.',253,'',0),(5,'news','news','News','','Will be available in the news area.',253,'',1),(6,'page','page','Custom Pages','','Will be available in the custom pages area of admin.',253,'',0),(7,'download','download_image','Download Images','','',253,'',0),(8,'download','download_thumb','Download Thumbnails','','',253,'',0),(9,'download','download_file','Download Files','','',253,'',0),(10,'news','news_thumb','News Thumbnails (Legacy)','','Legacy news thumbnails.',253,'',1),(11,'_icon','_icon_16','Icons 16px','','Available where icons are used in admin.',253,'',0),(12,'_icon','_icon_32','Icons 32px','','Available where icons are used in admin.',253,'',0),(13,'_icon','_icon_48','Icons 48px','','Available where icons are used in admin.',253,'',0),(14,'_icon','_icon_64','Icons 64px','','Available where icons are used in admin.',253,'',0),(15,'_icon','_icon_svg','Icons SVG','','Available where icons are used in admin.',253,'',0),(16,'featurebox','featurebox_image','Featurebox','','',253,'',0),(17,'gallery','gallery_image','Gallery 1','gallery-1','',0,'{e_PLUGIN}gallery/images/butterfly.jpg',0); +/*!40000 ALTER TABLE `e107_core_media_cat` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `e107_cron` +-- + +DROP TABLE IF EXISTS `e107_cron`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `e107_cron` ( + `cron_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `cron_name` varchar(50) NOT NULL, + `cron_category` varchar(20) NOT NULL, + `cron_description` varchar(255) NOT NULL, + `cron_function` varchar(50) NOT NULL, + `cron_tab` varchar(255) NOT NULL, + `cron_lastrun` int(13) unsigned NOT NULL, + `cron_active` int(1) unsigned NOT NULL, + PRIMARY KEY (`cron_id`), + UNIQUE KEY `cron_function` (`cron_function`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `e107_cron` +-- + +LOCK TABLES `e107_cron` WRITE; +/*!40000 ALTER TABLE `e107_cron` DISABLE KEYS */; +/*!40000 ALTER TABLE `e107_cron` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `e107_dblog` +-- + +DROP TABLE IF EXISTS `e107_dblog`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `e107_dblog` ( + `dblog_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `dblog_datestamp` int(10) unsigned NOT NULL DEFAULT '0', + `dblog_microtime` int(10) unsigned NOT NULL DEFAULT '0', + `dblog_type` tinyint(3) NOT NULL DEFAULT '0', + `dblog_eventcode` varchar(10) NOT NULL DEFAULT '', + `dblog_user_id` int(10) unsigned NOT NULL DEFAULT '0', + `dblog_user_name` varchar(100) NOT NULL DEFAULT '', + `dblog_ip` varchar(45) NOT NULL DEFAULT '', + `dblog_caller` varchar(255) NOT NULL DEFAULT '', + `dblog_title` varchar(255) NOT NULL DEFAULT '', + `dblog_remarks` text NOT NULL, + PRIMARY KEY (`dblog_id`), + KEY `dblog_datestamp` (`dblog_datestamp`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `e107_dblog` +-- + +LOCK TABLES `e107_dblog` WRITE; +/*!40000 ALTER TABLE `e107_dblog` DISABLE KEYS */; +/*!40000 ALTER TABLE `e107_dblog` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `e107_featurebox` +-- + +DROP TABLE IF EXISTS `e107_featurebox`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `e107_featurebox` ( + `fb_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `fb_title` varchar(200) NOT NULL DEFAULT '', + `fb_text` text NOT NULL, + `fb_mode` tinyint(3) unsigned NOT NULL DEFAULT '0', + `fb_class` smallint(5) NOT NULL DEFAULT '0', + `fb_rendertype` tinyint(1) unsigned NOT NULL DEFAULT '0', + `fb_template` varchar(50) NOT NULL DEFAULT '', + `fb_order` tinyint(3) unsigned NOT NULL DEFAULT '0', + `fb_image` varchar(255) NOT NULL DEFAULT '', + `fb_imageurl` text NOT NULL, + `fb_category` tinyint(3) unsigned NOT NULL, + PRIMARY KEY (`fb_id`), + KEY `fb_category` (`fb_category`) +) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `e107_featurebox` +-- + +LOCK TABLES `e107_featurebox` WRITE; +/*!40000 ALTER TABLE `e107_featurebox` DISABLE KEYS */; +INSERT INTO `e107_featurebox` VALUES (4,'Slide 1','Default Message - this is the default',0,0,0,'bootstrap_carousel_default',3,'','',1),(6,'Slide 2','Suspendisse ac dui purus. Cras eleifend, velit sed dapibus pharetra, elit dolor mattis tellus, ac luctus nisi massa at ligula. Ut sagittis, neque consequat elementum convallis, lorem nulla molestie arcu, eu rutrum velit quam at metus! Nullam eu eleifend magna. Praesent eget leo felis, vel euismod nibh. Morbi sem eros, pellentesque eu scelerisque id, pretium id enim. Mauris aliquet molestie dui vel ultricies. Etiam consequat quam sed tellus facilisis sollicitudin. Vivamus malesuada iaculis metus.\n ',0,0,0,'bootstrap_carousel_left',4,'','',1),(10,'Slide 3','Suspendisse ac dui purus. Cras eleifend, velit sed dapibus pharetra, elit dolor mattis tellus, ac luctus nisi massa at ligula. Ut sagittis, neque consequat elementum convallis, lorem nulla molestie arcu, eu rutrum velit quam at metus! Nullam eu eleifend magna. Praesent eget leo felis, vel euismod nibh. Morbi sem eros, pellentesque eu scelerisque id, pretium id enim. Mauris aliquet molestie dui vel ultricies. Etiam consequat quam sed tellus facilisis sollicitudin. Vivamus malesuada iaculis metus.\n ',0,0,0,'bootstrap_carousel_right',4,'','',1); +/*!40000 ALTER TABLE `e107_featurebox` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `e107_featurebox_category` +-- + +DROP TABLE IF EXISTS `e107_featurebox_category`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `e107_featurebox_category` ( + `fb_category_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, + `fb_category_title` varchar(200) NOT NULL DEFAULT '', + `fb_category_icon` varchar(255) NOT NULL DEFAULT '', + `fb_category_template` varchar(50) NOT NULL DEFAULT 'default', + `fb_category_random` tinyint(1) unsigned NOT NULL DEFAULT '0', + `fb_category_class` smallint(5) NOT NULL DEFAULT '0', + `fb_category_limit` tinyint(3) unsigned NOT NULL DEFAULT '1', + `fb_category_parms` text NOT NULL, + PRIMARY KEY (`fb_category_id`), + UNIQUE KEY `fb_category_template` (`fb_category_template`) +) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `e107_featurebox_category` +-- + +LOCK TABLES `e107_featurebox_category` WRITE; +/*!40000 ALTER TABLE `e107_featurebox_category` DISABLE KEYS */; +INSERT INTO `e107_featurebox_category` VALUES (1,'Unassigned','','bootstrap3_carousel',0,0,0,''),(2,'Carousel','','bootstrap_tabs',0,0,0,''),(3,'Tabs','','unassigned',0,255,0,''); +/*!40000 ALTER TABLE `e107_featurebox_category` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `e107_generic` +-- + +DROP TABLE IF EXISTS `e107_generic`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `e107_generic` ( + `gen_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `gen_type` varchar(80) NOT NULL DEFAULT '', + `gen_datestamp` int(10) unsigned NOT NULL DEFAULT '0', + `gen_user_id` int(10) unsigned NOT NULL DEFAULT '0', + `gen_ip` varchar(80) NOT NULL DEFAULT '', + `gen_intdata` int(10) unsigned NOT NULL DEFAULT '0', + `gen_chardata` text NOT NULL, + PRIMARY KEY (`gen_id`), + KEY `gen_type` (`gen_type`) +) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `e107_generic` +-- + +LOCK TABLES `e107_generic` WRITE; +/*!40000 ALTER TABLE `e107_generic` DISABLE KEYS */; +INSERT INTO `e107_generic` VALUES (1,'wmessage',1145848343,1,'Hello World!',0,'[html]This is a twitter bootstrap template for a simple marketing or informational website. The only difference is that e107 is managing the content. ie. The text you are reading is the "Welcome Message" and the items below are "News Items". Visit the admin-area to modify.

    Go to Admin area
    [/html]'); +/*!40000 ALTER TABLE `e107_generic` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `e107_links` +-- + +DROP TABLE IF EXISTS `e107_links`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `e107_links` ( + `link_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `link_name` varchar(100) NOT NULL DEFAULT '', + `link_url` varchar(200) NOT NULL DEFAULT '', + `link_description` text NOT NULL, + `link_button` varchar(100) NOT NULL DEFAULT '', + `link_category` tinyint(3) unsigned NOT NULL DEFAULT '0', + `link_order` int(10) unsigned NOT NULL DEFAULT '0', + `link_parent` int(10) unsigned NOT NULL DEFAULT '0', + `link_open` tinyint(1) unsigned NOT NULL DEFAULT '0', + `link_class` varchar(255) NOT NULL DEFAULT '0', + `link_function` varchar(100) NOT NULL DEFAULT '', + `link_sefurl` varchar(255) NOT NULL, + `link_owner` varchar(50) NOT NULL DEFAULT '', + PRIMARY KEY (`link_id`) +) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `e107_links` +-- + +LOCK TABLES `e107_links` WRITE; +/*!40000 ALTER TABLE `e107_links` DISABLE KEYS */; +INSERT INTO `e107_links` VALUES (1,'Home','index.php','','',1,0,0,0,'0','','',''),(3,'Members','user.php','','icon-user.glyph',2,3,0,0,'0','','',''),(4,'Submit News','submitnews.php','','icon-upload.glyph',2,4,0,0,'253','','',''),(5,'Contact Us','contact.php','','',1,5,0,0,'0','','',''),(6,'News','news.php','','',1,1,0,0,'0','','index','news'),(7,'Content','page.php','','',1,2,0,0,'0','','',''),(8,'Article 1','page.php?id=1','','',1,0,7,0,'0','','',''),(9,'Article 2','page.php?id=2','','',1,1,7,0,'0','','',''),(10,'Article 3','page.php?id=3','','',1,2,7,0,'0','','',''),(11,'Gallery','{e_PLUGIN}gallery/gallery.php','','',1,10,0,0,'0','','index','gallery'); +/*!40000 ALTER TABLE `e107_links` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `e107_mail_content` +-- + +DROP TABLE IF EXISTS `e107_mail_content`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `e107_mail_content` ( + `mail_source_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `mail_content_status` tinyint(1) unsigned NOT NULL DEFAULT '0', + `mail_total_count` int(10) unsigned NOT NULL DEFAULT '0', + `mail_togo_count` int(10) unsigned NOT NULL DEFAULT '0', + `mail_sent_count` int(10) unsigned NOT NULL DEFAULT '0', + `mail_fail_count` int(10) unsigned NOT NULL DEFAULT '0', + `mail_bounce_count` int(10) unsigned NOT NULL DEFAULT '0', + `mail_start_send` int(10) unsigned NOT NULL DEFAULT '0', + `mail_end_send` int(10) unsigned NOT NULL DEFAULT '0', + `mail_create_date` int(10) unsigned NOT NULL DEFAULT '0', + `mail_creator` int(10) unsigned NOT NULL DEFAULT '0', + `mail_create_app` varchar(20) NOT NULL DEFAULT '', + `mail_e107_priority` tinyint(1) unsigned NOT NULL DEFAULT '0', + `mail_notify_complete` tinyint(1) unsigned NOT NULL DEFAULT '0', + `mail_last_date` int(10) unsigned NOT NULL DEFAULT '0', + `mail_title` varchar(100) NOT NULL DEFAULT '', + `mail_subject` varchar(100) NOT NULL DEFAULT '', + `mail_body` text, + `mail_body_templated` text, + `mail_other` text, + `mail_media` text, + PRIMARY KEY (`mail_source_id`), + KEY `mail_content_status` (`mail_content_status`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `e107_mail_content` +-- + +LOCK TABLES `e107_mail_content` WRITE; +/*!40000 ALTER TABLE `e107_mail_content` DISABLE KEYS */; +/*!40000 ALTER TABLE `e107_mail_content` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `e107_mail_recipients` +-- + +DROP TABLE IF EXISTS `e107_mail_recipients`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `e107_mail_recipients` ( + `mail_target_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `mail_recipient_id` int(10) unsigned NOT NULL DEFAULT '0', + `mail_recipient_email` varchar(80) NOT NULL DEFAULT '', + `mail_recipient_name` varchar(80) NOT NULL DEFAULT '', + `mail_status` tinyint(1) unsigned NOT NULL DEFAULT '0', + `mail_detail_id` int(10) unsigned NOT NULL DEFAULT '0', + `mail_send_date` int(10) unsigned NOT NULL DEFAULT '0', + `mail_target_info` text, + PRIMARY KEY (`mail_target_id`), + KEY `mail_status` (`mail_status`), + KEY `mail_detail_id` (`mail_detail_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `e107_mail_recipients` +-- + +LOCK TABLES `e107_mail_recipients` WRITE; +/*!40000 ALTER TABLE `e107_mail_recipients` DISABLE KEYS */; +/*!40000 ALTER TABLE `e107_mail_recipients` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `e107_menus` +-- + +DROP TABLE IF EXISTS `e107_menus`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `e107_menus` ( + `menu_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `menu_name` varchar(100) NOT NULL DEFAULT '', + `menu_location` tinyint(3) unsigned NOT NULL DEFAULT '0', + `menu_order` tinyint(3) unsigned NOT NULL DEFAULT '0', + `menu_class` varchar(255) NOT NULL DEFAULT '0', + `menu_pages` text NOT NULL, + `menu_path` varchar(100) NOT NULL DEFAULT '', + `menu_layout` varchar(100) NOT NULL DEFAULT '', + `menu_parms` text NOT NULL, + PRIMARY KEY (`menu_id`) +) ENGINE=MyISAM AUTO_INCREMENT=38 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `e107_menus` +-- + +LOCK TABLES `e107_menus` WRITE; +/*!40000 ALTER TABLE `e107_menus` DISABLE KEYS */; +INSERT INTO `e107_menus` VALUES (1,'login_menu',1,1,'0','','login_menu/','',''),(2,'online_menu',0,0,'0','','online/','',''),(3,'blogcalendar_menu',0,0,'0','','blogcalendar_menu/','',''),(5,'search_menu',0,0,'0','','search_menu/','',''),(6,'counter_menu',0,0,'0','','siteinfo/','',''),(7,'userlanguage_menu',0,0,'0','','user/','',''),(8,'compliance_menu',0,0,'0','','siteinfo/','',''),(9,'other_news_menu',0,0,'0','','news/','',''),(10,'clock_menu',0,0,'0','','clock_menu/','',''),(11,'other_news2_menu',0,0,'0','','news/','',''),(12,'comment_menu',0,0,'0','','comment_menu/','',''),(13,'lastseen_menu',0,0,'0','','online/','',''),(14,'news_months_menu',1,2,'0','','news/','',''),(15,'admin_menu',0,0,'0','','admin_menu/','',''),(16,'news_categories_menu',0,0,'0','','news/','',''),(17,'latestnews_menu',0,0,'0','','news/','',''),(18,'usertheme_menu',0,0,'0','','user/','',''),(19,'powered_by_menu',0,0,'0','','siteinfo/','',''),(20,'sitebutton_menu',0,0,'0','','siteinfo/','',''),(21,'news_carousel_menu',0,0,'0','','news/','',''),(22,'chapter_menu',0,0,'0','','page/','',''),(23,'page_menu',0,0,'0','','page/','',''),(24,'page_navigation_menu',0,0,'0','','page/','',''),(25,'featurebox_menu',0,0,'0','0','featurebox/','',''),(26,'slideshow_menu',0,0,'0','0','gallery/','',''),(27,'rss_menu',0,0,'0','0','rss_menu/','',''),(28,'fb_like_menu',0,0,'0','0','social/','',''),(29,'twitter_menu',0,0,'0','0','social/','',''),(30,'jumbotron-menu-2',0,0,'0','','2','',''),(31,'jumbotron-menu-3',0,0,'0','','3','',''),(32,'feature-menu-1',0,0,'0','','4','',''),(33,'feature-menu-2',0,0,'0','','5','',''),(34,'feature-menu-3',0,0,'0','','6','',''),(35,'jumbotron-menu-1',2,1,'','','1','jumbotron_home',''),(36,'jumbotron-menu-2',3,1,'','','2','jumbotron_home',''),(37,'jumbotron-menu-3',4,1,'','','3','jumbotron_home',''); +/*!40000 ALTER TABLE `e107_menus` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `e107_news` +-- + +DROP TABLE IF EXISTS `e107_news`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `e107_news` ( + `news_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `news_title` varchar(255) NOT NULL DEFAULT '', + `news_sef` varchar(200) NOT NULL DEFAULT '', + `news_body` longtext NOT NULL, + `news_extended` longtext NOT NULL, + `news_meta_keywords` varchar(255) NOT NULL DEFAULT '', + `news_meta_description` text NOT NULL, + `news_datestamp` int(10) unsigned NOT NULL DEFAULT '0', + `news_author` int(10) unsigned NOT NULL DEFAULT '0', + `news_category` tinyint(3) unsigned NOT NULL DEFAULT '0', + `news_allow_comments` tinyint(3) unsigned NOT NULL DEFAULT '0', + `news_start` int(10) unsigned NOT NULL DEFAULT '0', + `news_end` int(10) unsigned NOT NULL DEFAULT '0', + `news_class` varchar(255) NOT NULL DEFAULT '0', + `news_render_type` varchar(20) NOT NULL DEFAULT '0', + `news_comment_total` int(10) unsigned NOT NULL DEFAULT '0', + `news_summary` text NOT NULL, + `news_thumbnail` text NOT NULL, + `news_sticky` tinyint(3) unsigned NOT NULL DEFAULT '0', + `news_template` varchar(50) DEFAULT NULL, + PRIMARY KEY (`news_id`), + KEY `news_category` (`news_category`), + KEY `news_start_end` (`news_start`,`news_end`), + KEY `news_datestamp` (`news_datestamp`), + KEY `news_sticky` (`news_sticky`), + KEY `news_render_type` (`news_render_type`), + KEY `news_class` (`news_class`) +) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `e107_news` +-- + +LOCK TABLES `e107_news` WRITE; +/*!40000 ALTER TABLE `e107_news` DISABLE KEYS */; +INSERT INTO `e107_news` VALUES (1,'Welcome to e107','welcome-to-e107','[html]

    Lorem ipsum dolor sit amet, no meis semper dicunt est, petentium eloquentiam quo ne. At vero facer eam. Ex nam altera oportere, nisl natum prima id pro. Rebum augue dissentiet eum te, vel veniam eirmod option ea, at eos velit repudiare. Ius sumo dicit adolescens id, an cum efficiantur concludaturque.

    Summo sensibus cum ne, et duo torquatos conceptam. No aeque elitr constituam qui. Nostro corpora nec no, diam verterem tincidunt has et. Altera accumsan urbanitas pro eu, ei assum voluptaria sed. Eam tibique nominavi consequuntur an.

    Ei perfecto delicata usu, quo eius noster blandit te. Eu doctus volumus pri. Meis argumentum an nam, eos odio prima autem an. Te complectitur intellegebat pro, ius id alterum maiestatis. Ea facer accusata sed, ex illum antiopam quo.

    Altera putent pri ad, in phaedrum dissentiunt per. Te eum everti dolores. Ut mea vero autem viderer, mel brute harum senserit id. Minim senserit eloquentiam duo in, sit ei justo graece petentium. Sea id homero oporteat invenire.

    Pri semper dolorum ad. Cu eius repudiare eos. Eum in eleifend necessitatibus. Ne has mutat intellegebat.

    [/html]','[html]

    Lorem ipsum is a pseudo-Latin text used in web design, typography, layout, and printing in place of English to emphasise design elements over content. It's also called placeholder (or filler) text. It's a convenient tool for mock-ups. It helps to outline the visual elements of a document or presentation, eg typography, font, or layout. Lorem ipsum is mostly a part of a Latin text by the classical author and philosopher Cicero. Its words and letters have been changed by addition or removal, so to deliberately render its content nonsensical; it's not genuine, correct, or comprehensible Latin anymore.

    \n

    While lorem ipsum's still resembles classical Latin, it actually has no meaning whatsoever. As Cicero's text doesn't contain the letters K, W, or Z, alien to latin, these, and others are often inserted randomly to mimic the  typographic appearence of European languages, as are digraphs not to be found in the original.

    [/html]','welcome,new website','Description for Facebook and search engines.',1454367600,1,1,0,0,0,'0','0',0,'Summary of the news item','',0,NULL); +/*!40000 ALTER TABLE `e107_news` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `e107_news_category` +-- + +DROP TABLE IF EXISTS `e107_news_category`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `e107_news_category` ( + `category_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, + `category_name` varchar(200) NOT NULL DEFAULT '', + `category_sef` varchar(200) NOT NULL DEFAULT '', + `category_meta_description` text NOT NULL, + `category_meta_keywords` varchar(255) NOT NULL DEFAULT '', + `category_manager` tinyint(3) unsigned NOT NULL DEFAULT '254', + `category_icon` varchar(250) NOT NULL DEFAULT '', + `category_order` tinyint(3) unsigned NOT NULL DEFAULT '0', + `category_template` varchar(50) DEFAULT NULL, + PRIMARY KEY (`category_id`), + KEY `category_order` (`category_order`) +) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `e107_news_category` +-- + +LOCK TABLES `e107_news_category` WRITE; +/*!40000 ALTER TABLE `e107_news_category` DISABLE KEYS */; +INSERT INTO `e107_news_category` VALUES (1,'Misc','misc','','',254,'news_16.png',0,NULL); +/*!40000 ALTER TABLE `e107_news_category` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `e107_online` +-- + +DROP TABLE IF EXISTS `e107_online`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `e107_online` ( + `online_timestamp` int(10) unsigned NOT NULL DEFAULT '0', + `online_flag` tinyint(3) unsigned NOT NULL DEFAULT '0', + `online_user_id` varchar(100) NOT NULL DEFAULT '', + `online_ip` varchar(45) NOT NULL DEFAULT '', + `online_location` text NOT NULL, + `online_pagecount` tinyint(3) unsigned NOT NULL DEFAULT '0', + `online_active` int(10) unsigned NOT NULL DEFAULT '0', + `online_agent` varchar(255) NOT NULL DEFAULT '', + `online_language` varchar(2) NOT NULL DEFAULT '', + KEY `online_ip` (`online_ip`), + KEY `online_ip_user_id` (`online_ip`,`online_user_id`), + KEY `online_timestamp` (`online_timestamp`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `e107_online` +-- + +LOCK TABLES `e107_online` WRITE; +/*!40000 ALTER TABLE `e107_online` DISABLE KEYS */; +INSERT INTO `e107_online` VALUES (1541074256,0,'0','0000:0000:0000:0000:0000:ffff:0a40:e501','/e107/index.php',1,0,'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:63.0) Gecko/20100101 Firefox/63.0','en'); +/*!40000 ALTER TABLE `e107_online` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `e107_page` +-- + +DROP TABLE IF EXISTS `e107_page`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `e107_page` ( + `page_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `page_title` varchar(250) NOT NULL DEFAULT '', + `page_sef` varchar(250) NOT NULL DEFAULT '', + `page_chapter` int(10) unsigned NOT NULL DEFAULT '0', + `page_metakeys` varchar(250) NOT NULL DEFAULT '', + `page_metadscr` mediumtext, + `page_text` mediumtext, + `page_author` int(10) unsigned NOT NULL DEFAULT '0', + `page_datestamp` int(10) unsigned NOT NULL DEFAULT '0', + `page_rating_flag` tinyint(1) unsigned NOT NULL DEFAULT '0', + `page_comment_flag` tinyint(1) unsigned NOT NULL DEFAULT '0', + `page_password` varchar(50) NOT NULL DEFAULT '', + `page_class` varchar(250) NOT NULL DEFAULT '0', + `page_ip_restrict` text, + `page_template` varchar(50) NOT NULL DEFAULT '', + `page_order` int(4) unsigned NOT NULL DEFAULT '9999', + `page_fields` mediumtext, + `menu_name` varchar(50) NOT NULL DEFAULT '', + `menu_title` varchar(250) NOT NULL DEFAULT '', + `menu_text` mediumtext, + `menu_image` varchar(250) NOT NULL DEFAULT '', + `menu_icon` varchar(250) NOT NULL DEFAULT '', + `menu_template` varchar(50) NOT NULL DEFAULT '', + `menu_class` varchar(250) NOT NULL DEFAULT '0', + `menu_button_url` varchar(250) NOT NULL DEFAULT '', + `menu_button_text` varchar(250) NOT NULL DEFAULT '', + PRIMARY KEY (`page_id`) +) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `e107_page` +-- + +LOCK TABLES `e107_page` WRITE; +/*!40000 ALTER TABLE `e107_page` DISABLE KEYS */; +INSERT INTO `e107_page` VALUES (1,'Article 1','article-1',2,'','','Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec libero ipsum; imperdiet at risus non, dictum sagittis odio! Nulla facilisi. Pellentesque adipiscing facilisis pharetra. Morbi imperdiet augue in ligula luctus, et iaculis est porttitor. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. In ultricies vitae nisi ut porttitor. Curabitur lectus tellus, feugiat a elit vel, gravida iaculis dui. Nulla vulputate turpis dui, ac faucibus enim dignissim non. Ut non tellus suscipit, scelerisque orci sed, scelerisque sapien. Aenean convallis sodales nulla in porttitor. In pretium ante sapien, a tempor eros blandit nec.\n\n Nulla non est nibh? Fusce lacinia quam adipiscing magna posuere dapibus. Sed mollis condimentum rhoncus. Morbi sollicitudin tellus a ligula luctus, ac varius arcu ullamcorper. Mauris in aliquet tellus, nec porttitor dui. Quisque interdum euismod mi sed bibendum. Vivamus non odio quis quam lacinia rhoncus in nec nibh. Integer vitae turpis condimentum, laoreet diam nec viverra fusce.',1,1371420000,1,1,'','0','','default',9999,'','jumbotron-menu-1','Heading 1','Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus auctor egestas condimentum. Suspendisse placerat nunc orci, a ultrices tortor eleifend in. Vestibulum tincidunt fringilla malesuada? Phasellus dolor risus, aliquam eu odio quis, mattis cursus magna. Integer ut blandit purus; vitae posuere ante. Vivamus sapien nisl, pulvinar vel turpis a, malesuada vehicula lorem! Curabitur magna justo; laoreet at congue sit amet, tincidunt sit amet erat. Integer vehicula eros quis odio tincidunt, nec dapibus sem molestie. Cras sed viverra eros. Nulla ut lectus tellus.','','','button','0','',''),(2,'Article 2','article-2',2,'','','Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam a nunc eget nulla rutrum fringilla sed vel nisl. Suspendisse at erat a neque pulvinar sodales. Etiam dictum erat erat. Pellentesque dictum convallis massa, eu varius sapien gravida a. Suspendisse auctor, mi a tempor tincidunt, lorem felis gravida libero, nec mattis eros felis eu neque. Etiam vel sagittis ipsum. Morbi at libero accumsan mauris tincidunt adipiscing sed vitae mauris. Aenean suscipit consectetur dignissim. Aliquam ornare diam vitae libero suscipit eget facilisis nisl ultrices? Curabitur luctus turpis ac lorem iaculis id interdum massa blandit! Curabitur placerat massa at neque accumsan porta. Nulla sed tortor id sapien dapibus auctor at eget mi. Sed ultrices lacinia viverra.Mauris in purus mauris. Nulla facilisi. Suspendisse dui enim, dapibus sed accumsan non, gravida eget nulla. Praesent ullamcorper, est ac viverra congue, nisl lacus imperdiet sem, et laoreet velit mauris sed leo. Donec erat mi, luctus quis suscipit pretium, luctus sed orci. Proin eu ultricies sem. Nam mollis turpis non erat fermentum congue.Nullam adipiscing, purus et varius blandit, arcu nisi pretium urna, a euismod eros eros quis turpis! Aliquam quis mi turpis, in varius neque. Aliquam erat volutpat. Vestibulum venenatis ipsum dapibus ante dictum egestas. Pellentesque eget nisi ligula, id accumsan eros. Aenean vitae felis vitae sapien mattis pellentesque non nec dolor. Nulla facilisi.Quisque in tortor turpis, sed venenatis nunc. Nunc tellus elit, suscipit et accumsan ac, mollis et risus. Phasellus consectetur sapien in felis semper non tempor tortor mollis. Ut id leo vel magna rhoncus aliquet. Nunc eget sollicitudin felis. Vestibulum tempor, justo et congue dignissim, augue ipsum malesuada libero, id suscipit felis mi vitae erat. Etiam suscipit lacinia sapien, ac gravida nisi lobortis non. Suspendisse dictum risus in est egestas egestas. Aenean et nisi sed odio sollicitudin placerat vel ut magna. Nulla facilisi. Proin condimentum ultricies vulputate. Morbi dapibus elit a tellus elementum congue! In vitae aliquet leo. Proin tempus tincidunt magna, sit amet malesuada ipsum ornare sed. Sed lorem augue, aliquam sit amet hendrerit sed; venenatis in massa. Sed iaculis amet.',1,1366149600,0,0,'','0','','default',9999,'','jumbotron-menu-2','Heading 2','Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus auctor egestas condimentum. Suspendisse placerat nunc orci, a ultrices tortor eleifend in. Vestibulum tincidunt fringilla malesuada? Phasellus dolor risus, aliquam eu odio quis, mattis cursus magna. Integer ut blandit purus; vitae posuere ante. Vivamus sapien nisl, pulvinar vel turpis a, malesuada vehicula lorem! Curabitur magna justo; laoreet at congue sit amet, tincidunt sit amet erat. Integer vehicula eros quis odio tincidunt, nec dapibus sem molestie. Cras sed viverra eros. Nulla ut lectus tellus.','','','button','0','',''),(3,'Article 3','article-3',2,'','','Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum porttitor a justo ut tristique. Nam molestie sem at leo lobortis, vel luctus ligula tempus. Sed sagittis rutrum lectus vel suscipit. Sed in ligula vitae massa sagittis adipiscing vitae vel sem. Fusce nec rhoncus purus. Aenean mollis magna tellus; non consequat leo feugiat eu. Donec mauris velit, euismod nec facilisis quis, hendrerit nec lorem. Aliquam et lorem sed enim tempus sodales. Vestibulum ut enim adipiscing ipsum semper eleifend in in dolor. Fusce tempor risus velit, in fringilla tellus faucibus eget. Maecenas aliquet nunc nec nulla auctor, sed tristique est pellentesque. Maecenas tristique blandit dolor, nec egestas ligula aliquam eu.\n\nMorbi porta leo iaculis, hendrerit lorem interdum, porta dui. Integer tempor convallis quam, eget tempus neque blandit sit amet. Quisque dictum libero elit, ut vehicula lectus accumsan a. Nam laoreet vulputate massa vel viverra. Sed tempus blandit sapien, in viverra urna aliquet quis. Aliquam erat volutpat. Nulla accumsan posuere.',1,1336600800,0,0,'','0','','default',9999,'','jumbotron-menu-3','Heading 3','Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus auctor egestas condimentum. Suspendisse placerat nunc orci, a ultrices tortor eleifend in. Vestibulum tincidunt fringilla malesuada? Phasellus dolor risus, aliquam eu odio quis, mattis cursus magna. Integer ut blandit purus; vitae posuere ante. Vivamus sapien nisl, pulvinar vel turpis a, malesuada vehicula lorem! Curabitur magna justo; laoreet at congue sit amet, tincidunt sit amet erat. Integer vehicula eros quis odio tincidunt, nec dapibus sem molestie. Cras sed viverra eros. Nulla ut lectus tellus.','','','button','0','',''),(5,'Feature 1','feature-1',2,'','','Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum porttitor a justo ut tristique. Nam molestie sem at leo lobortis, vel luctus ligula tempus. Sed sagittis rutrum lectus vel suscipit. Sed in ligula vitae massa sagittis adipiscing vitae vel sem. Fusce nec rhoncus purus. Aenean mollis magna tellus; non consequat leo feugiat eu. Donec mauris velit, euismod nec facilisis quis, hendrerit nec lorem. Aliquam et lorem sed enim tempus sodales. Vestibulum ut enim adipiscing ipsum semper eleifend in in dolor. Fusce tempor risus velit, in fringilla tellus faucibus eget. Maecenas aliquet nunc nec nulla auctor, sed tristique est pellentesque. Maecenas tristique blandit dolor, nec egestas ligula aliquam eu.\n\nMorbi porta leo iaculis, hendrerit lorem interdum, porta dui. Integer tempor convallis quam, eget tempus neque blandit sit amet. Quisque dictum libero elit, ut vehicula lectus accumsan a. Nam laoreet vulputate massa vel viverra. Sed tempus blandit sapien, in viverra urna aliquet quis. Aliquam erat volutpat. Nulla accumsan posuere.',1,1344549600,0,0,'','0','','default',9999,'','feature-menu-1','Modern Business Feature Menu 1','Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla iaculis odio sit amet mi consequat varius. Nullam fringilla sodales lacus id mollis. Morbi fermentum turpis quis orci scelerisque, non pellentesque dolor sodales. Nullam luctus ut tellus quis ullamcorper! Suspendisse convallis tortor nec semper condimentum. Proin adipiscing adipiscing elit, ut posuere mauris consequat sed. Maecenas ultrices nisi tortor, sed vehicula urna auctor euismod?','','','2-column_1:1_text-left','0','',''),(6,'Feature 2','feature-2',2,'','','Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum porttitor a justo ut tristique. Nam molestie sem at leo lobortis, vel luctus ligula tempus. Sed sagittis rutrum lectus vel suscipit. Sed in ligula vitae massa sagittis adipiscing vitae vel sem. Fusce nec rhoncus purus. Aenean mollis magna tellus; non consequat leo feugiat eu. Donec mauris velit, euismod nec facilisis quis, hendrerit nec lorem. Aliquam et lorem sed enim tempus sodales. Vestibulum ut enim adipiscing ipsum semper eleifend in in dolor. Fusce tempor risus velit, in fringilla tellus faucibus eget. Maecenas aliquet nunc nec nulla auctor, sed tristique est pellentesque. Maecenas tristique blandit dolor, nec egestas ligula aliquam eu.\n\nMorbi porta leo iaculis, hendrerit lorem interdum, porta dui. Integer tempor convallis quam, eget tempus neque blandit sit amet. Quisque dictum libero elit, ut vehicula lectus accumsan a. Nam laoreet vulputate massa vel viverra. Sed tempus blandit sapien, in viverra urna aliquet quis. Aliquam erat volutpat. Nulla accumsan posuere.',1,1347228000,0,0,'','0','','default',9999,'','feature-menu-2','Modern Business Feature Menu 2','Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla iaculis odio sit amet mi consequat varius. Nullam fringilla sodales lacus id mollis. Morbi fermentum turpis quis orci scelerisque, non pellentesque dolor sodales. Nullam luctus ut tellus quis ullamcorper! Suspendisse convallis tortor nec semper condimentum. Proin adipiscing adipiscing elit, ut posuere mauris consequat sed. Maecenas ultrices nisi tortor, sed vehicula urna auctor euismod?','','','2-column_1:1_text-right','0','',''),(7,'Feature 3','feature-3',2,'','','Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum porttitor a justo ut tristique. Nam molestie sem at leo lobortis, vel luctus ligula tempus. Sed sagittis rutrum lectus vel suscipit. Sed in ligula vitae massa sagittis adipiscing vitae vel sem. Fusce nec rhoncus purus. Aenean mollis magna tellus; non consequat leo feugiat eu. Donec mauris velit, euismod nec facilisis quis, hendrerit nec lorem. Aliquam et lorem sed enim tempus sodales. Vestibulum ut enim adipiscing ipsum semper eleifend in in dolor. Fusce tempor risus velit, in fringilla tellus faucibus eget. Maecenas aliquet nunc nec nulla auctor, sed tristique est pellentesque. Maecenas tristique blandit dolor, nec egestas ligula aliquam eu.\n\nMorbi porta leo iaculis, hendrerit lorem interdum, porta dui. Integer tempor convallis quam, eget tempus neque blandit sit amet. Quisque dictum libero elit, ut vehicula lectus accumsan a. Nam laoreet vulputate massa vel viverra. Sed tempus blandit sapien, in viverra urna aliquet quis. Aliquam erat volutpat. Nulla accumsan posuere.',1,1349820000,0,0,'','0','','default',9999,'','feature-menu-3',''Modern Business' is a ready-to-use, Bootstrap 3 updated, multi-purpose HTML theme!','For more templates and more page options that you can integrate into this website template, visit Start Bootstrap!','','','2-column_2:1_text-left','0','',''),(4,'Article 4','article-4',3,'','','[html]

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum porttitor a justo ut tristique. Nam molestie sem at leo lobortis, vel luctus ligula tempus. Sed sagittis rutrum lectus vel suscipit. Sed in ligula vitae massa sagittis adipiscing vitae vel sem. Fusce nec rhoncus purus. Aenean mollis magna tellus; non consequat leo feugiat eu. Donec mauris velit, euismod nec facilisis quis, hendrerit nec lorem. Aliquam et lorem sed enim tempus sodales. Vestibulum ut enim adipiscing ipsum semper eleifend in in dolor. Fusce tempor risus velit, in fringilla tellus faucibus eget. Maecenas aliquet nunc nec nulla auctor, sed tristique est pellentesque. Maecenas tristique blandit dolor, nec egestas ligula aliquam eu. Morbi porta leo iaculis, hendrerit lorem interdum, porta dui. Integer tempor convallis quam, eget tempus neque blandit sit amet. Quisque dictum libero elit, ut vehicula lectus accumsan a. Nam laoreet vulputate massa vel viverra. Sed tempus blandit sapien, in viverra urna aliquet quis. Aliquam erat volutpat. Nulla accumsan posuere.

    [/html]',1,1535407200,0,0,'','0','','customfields',9999,'{\n \"mybbarea\": \"[html]

    Some Rich<\\/strong> Text<\\/em><\\/p>[\\/html]\",\n \"myboolean\": \"0\",\n \"mycheckbox\": \"1\",\n \"mycountry\": \"us\",\n \"mydatestamp\": \"1534978508\",\n \"mydropdown\": \"blue\",\n \"myemail\": \"myemail@somewhere.com\",\n \"myfile\": \"\",\n \"myicon\": \"{e_IMAGE}e107_icon_32.png\",\n \"myimage\": \"{e_PLUGIN}gallery\\/images\\/butterfly.jpg\",\n \"mylanguage\": \"en\",\n \"mynumber\": \"16\",\n \"myprogressbar\": \"6\\/10\",\n \"mytags\": \"keyword1,keyword2\",\n \"mytext\": \"Some Text\",\n \"myurl\": \"https:\\/\\/e107.org\",\n \"myvideo\": \"6ZfuNTqbHE8.youtube\"\n}','jumbotron-menu-4','Heading 4','[html]

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus auctor egestas condimentum. Suspendisse placerat nunc orci, a ultrices tortor eleifend in. Vestibulum tincidunt fringilla malesuada? Phasellus dolor risus, aliquam eu odio quis, mattis cursus magna. Integer ut blandit purus; vitae posuere ante. Vivamus sapien nisl, pulvinar vel turpis a, malesuada vehicula lorem! Curabitur magna justo; laoreet at congue sit amet, tincidunt sit amet erat. Integer vehicula eros quis odio tincidunt, nec dapibus sem molestie. Cras sed viverra eros. Nulla ut lectus tellus.

    [/html]','','','button','0','',''); +/*!40000 ALTER TABLE `e107_page` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `e107_page_chapters` +-- + +DROP TABLE IF EXISTS `e107_page_chapters`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `e107_page_chapters` ( + `chapter_id` int(4) unsigned NOT NULL AUTO_INCREMENT, + `chapter_parent` int(4) unsigned NOT NULL DEFAULT '0', + `chapter_name` varchar(200) NOT NULL DEFAULT '', + `chapter_sef` varchar(200) NOT NULL DEFAULT '', + `chapter_meta_description` text NOT NULL, + `chapter_meta_keywords` varchar(255) NOT NULL DEFAULT '', + `chapter_manager` tinyint(3) unsigned NOT NULL DEFAULT '254', + `chapter_icon` varchar(250) NOT NULL DEFAULT '', + `chapter_image` varchar(250) NOT NULL DEFAULT '', + `chapter_order` int(6) unsigned NOT NULL DEFAULT '0', + `chapter_template` varchar(50) NOT NULL DEFAULT '', + `chapter_visibility` tinyint(3) unsigned NOT NULL DEFAULT '0', + `chapter_fields` mediumtext, + PRIMARY KEY (`chapter_id`), + KEY `chapter_order` (`chapter_order`) +) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `e107_page_chapters` +-- + +LOCK TABLES `e107_page_chapters` WRITE; +/*!40000 ALTER TABLE `e107_page_chapters` DISABLE KEYS */; +INSERT INTO `e107_page_chapters` VALUES (1,0,'General','general','Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec et tempor odio. Quisque volutpat lorem nec lectus congue suscipit. In hac habitasse platea dictumst. Etiam odio nisi, egestas vitae amet.','',254,'','',0,'',0,''),(2,1,'Chapter 1','chapter-1','Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ut nunc ac neque egestas ullamcorper. In convallis semper hendrerit. Etiam non dolor nisl, varius facilisis dui. Nunc egestas massa nunc.','',254,'','',1,'',0,''),(3,1,'Custom Fields','customfields','Chapter containing custom fields','',254,'','',2,'default',0,'{\n \"__tabs__\": {\n \"additional\": \"Custom Fields\"\n },\n \"mybbarea\": {\n \"title\": \"Rich Text\",\n \"type\": \"bbarea\",\n \"writeParms\": \"\",\n \"help\": \"\"\n },\n \"myboolean\": {\n \"title\": \"Boolean\",\n \"type\": \"boolean\",\n \"writeParms\": \"\",\n \"help\": \"\"\n },\n \"mycheckbox\": {\n \"title\": \"Checkbox\",\n \"type\": \"checkbox\",\n \"writeParms\": \"\",\n \"help\": \"\"\n },\n \"mycountry\": {\n \"title\": \"Country\",\n \"type\": \"country\",\n \"writeParms\": \"\",\n \"help\": \"\"\n },\n \"mydatestamp\": {\n \"title\": \"Date\",\n \"type\": \"datestamp\",\n \"writeParms\": \"{ \\\"format\\\": \\\"yyyy-mm-dd\\\" }\",\n \"help\": \"\"\n },\n \"mydropdown\": {\n \"title\": \"Selection\",\n \"type\": \"dropdown\",\n \"writeParms\": \"{ \\\"optArray\\\": { \\\"blue\\\": \\\"Blue\\\", \\\"green\\\": \\\"Green\\\", \\\"red\\\": \\\"Red\\\" }, \\\"default\\\": \\\"blank\\\" }\",\n \"help\": \"\"\n },\n \"myemail\": {\n \"title\": \"Email\",\n \"type\": \"email\",\n \"writeParms\": \"\",\n \"help\": \"\"\n },\n \"myfile\": {\n \"title\": \"File\",\n \"type\": \"file\",\n \"writeParms\": \"\",\n \"help\": \"\"\n },\n \"myicon\": {\n \"title\": \"Icon\",\n \"type\": \"icon\",\n \"writeParms\": \"\",\n \"help\": \"\"\n },\n \"myimage\": {\n \"title\": \"Image\",\n \"type\": \"image\",\n \"writeParms\": \"\",\n \"help\": \"\"\n },\n \"mylanguage\": {\n \"title\": \"Language\",\n \"type\": \"language\",\n \"writeParms\": \"\",\n \"help\": \"\"\n },\n \"mynumber\": {\n \"title\": \"Number\",\n \"type\": \"number\",\n \"writeParms\": \"\",\n \"help\": \"\"\n },\n \"myprogressbar\": {\n \"title\": \"Progress\",\n \"type\": \"progressbar\",\n \"writeParms\": \"\",\n \"help\": \"\"\n },\n \"mytags\": {\n \"title\": \"Tags\",\n \"type\": \"tags\",\n \"writeParms\": \"\",\n \"help\": \"\"\n },\n \"mytext\": {\n \"title\": \"Text\",\n \"type\": \"text\",\n \"writeParms\": \"\",\n \"help\": \"\"\n },\n \"myurl\": {\n \"title\": \"URL\",\n \"type\": \"url\",\n \"writeParms\": \"\",\n \"help\": \"\"\n },\n \"myvideo\": {\n \"title\": \"Video\",\n \"type\": \"video\",\n \"writeParms\": \"\",\n \"help\": \"\"\n }\n}'); +/*!40000 ALTER TABLE `e107_page_chapters` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `e107_plugin` +-- + +DROP TABLE IF EXISTS `e107_plugin`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `e107_plugin` ( + `plugin_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `plugin_name` varchar(100) NOT NULL DEFAULT '', + `plugin_version` varchar(10) NOT NULL DEFAULT '', + `plugin_path` varchar(100) NOT NULL DEFAULT '', + `plugin_installflag` tinyint(1) unsigned NOT NULL DEFAULT '0', + `plugin_addons` text NOT NULL, + `plugin_category` varchar(100) NOT NULL DEFAULT '', + PRIMARY KEY (`plugin_id`), + UNIQUE KEY `plugin_path` (`plugin_path`) +) ENGINE=MyISAM AUTO_INCREMENT=31 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `e107_plugin` +-- + +LOCK TABLES `e107_plugin` WRITE; +/*!40000 ALTER TABLE `e107_plugin` DISABLE KEYS */; +INSERT INTO `e107_plugin` VALUES (1,'LAN_PLUGIN_POLL_NAME','2.0','poll',0,'poll_sql','content'),(2,'LAN_PLUGIN_TRACKBACK_NAME','1.1','trackback',0,'e_admin,e_meta,trackback_sql','misc'),(3,'LAN_PLUGIN_LINKWORDS_NAME','1.1','linkwords',0,'e_header,e_tohtml,linkwords_sql','content'),(4,'LAN_PLUGIN__BLANK_NAME','2.0','_blank',0,'e_admin,e_cron,e_notify,e_frontpage,e_menu,e_search,e_shortcode,e_event,e_dashboard,e_header,e_url,e_sitelink,e_parse,e_related,e_rss,e_user,e_library,blank_sql','misc'),(5,'LAN_PLUGIN_IMPORT_NAME','1.0','import',0,'','tools'),(6,'LAN_PLUGIN_PM_NAME','3.0','pm',0,'e_cron,e_shortcode,e_url,pm_sql','users'),(7,'Pages','1.0','page',1,'e_menu,e_search,e_shortcode,e_sitelink,e_related','menu'),(8,'LAN_PLUGIN_BANNER_NAME','1.0','banner',0,'e_menu,e_shortcode,banner_sql','content'),(9,'LAN_PLUGIN_RSS_NAME','1.3','rss_menu',1,'e_meta,e_url,rss_sql','misc'),(10,'TinyMce4','1.0','tinymce4',1,'e_header,e_footer','misc'),(11,'LAN_PLUGIN_TAGCLOUD_NAME','1.3','tagcloud',0,'e_menu,e_header','misc'),(12,'LAN_PLUGIN_USER_NAME','1.0','user',1,'e_dashboard,e_mailout,e_user','misc'),(13,'Metaweblog','1.0','metaweblog',0,'e_header','tools'),(14,'Contact','1.0','contact',1,'','menu'),(15,'New Forum Posts','1','newforumposts_main',0,'newforumposts.sc','misc'),(16,'LAN_PLUGIN_FORUM_NAME','2.1','forum',0,'e_notify,e_linkgen,e_list,e_meta,e_emailprint,e_frontpage,e_menu,e_search,e_event,e_dashboard,e_url,e_rss,e_user,e_gsitemap,forum_sql','content'),(17,'LAN_PLUGIN_SOCIAL_NAME','1.0','social',1,'e_admin,e_shortcode,e_module,e_event,e_comment','settings'),(18,'News','1.0','news',1,'e_menu,e_search,e_event,e_header,e_url,e_sitelink,e_featurebox,e_related,e_rss,e_gsitemap','menu'),(19,'LAN_PLUGIN_CHATBOX_MENU_NAME','1.0','chatbox_menu',0,'e_notify,e_list,e_search,e_dashboard,e_header,e_rss,e_user,chatbox_sql','content'),(20,'LAN_PLUGIN_LOG_NAME','2.1','log',0,'e_meta,e_shortcode,e_url,log_sql','misc'),(21,'LAN_PLUGIN_GALLERY_TITLE','1.1','gallery',1,'e_shortcode,e_header,e_url,e_library','content'),(22,'LAN_PLUGIN_FEATUREBOX_NAME','1.1','featurebox',1,'e_shortcode,e_header,e_rss,featurebox_sql','content'),(23,'Siteinfo','1.0','siteinfo',1,'e_shortcode','menu'),(24,'LAN_PLUGIN_NEWSLETTER_NAME','1.1','newsletter',0,'e_mailout,newsletter_sql','content'),(25,'LAN_ALT_65','0.4','alt_auth',0,'alt_auth_sql','users'),(26,'LAN_PLUGIN_GSITEMAP_NAME','1.0','gsitemap',0,'e_cron,e_module,e_url,gsitemap_sql','misc'),(27,'LAN_PLUGIN_DOWNLOAD_NAME','1.2','download',0,'e_cron,e_list,e_frontpage,e_search,e_tagwords,e_url,e_sitelink,e_rss,e_upload,e_gsitemap,download_sql','content'),(28,'LAN_PLUGIN_NEWSFEEDS_NAME','2.0','newsfeed',0,'e_frontpage,e_url,newsfeed_sql','content'),(29,'LAN_PLUGIN_LIST_NEW_NAME','1.0.1','list_new',0,'','content'),(30,'LAN_PLUGIN_FAQS_NAME','1.1','faqs',0,'e_cron,e_meta,e_search,e_url,e_sitelink,faqs_sql','content'); +/*!40000 ALTER TABLE `e107_plugin` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `e107_rate` +-- + +DROP TABLE IF EXISTS `e107_rate`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `e107_rate` ( + `rate_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `rate_table` varchar(100) NOT NULL DEFAULT '', + `rate_itemid` int(10) unsigned NOT NULL DEFAULT '0', + `rate_rating` int(10) unsigned NOT NULL DEFAULT '0', + `rate_votes` int(10) unsigned NOT NULL DEFAULT '0', + `rate_voters` text NOT NULL, + `rate_up` int(10) unsigned NOT NULL DEFAULT '0', + `rate_down` int(10) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`rate_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `e107_rate` +-- + +LOCK TABLES `e107_rate` WRITE; +/*!40000 ALTER TABLE `e107_rate` DISABLE KEYS */; +/*!40000 ALTER TABLE `e107_rate` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `e107_rss` +-- + +DROP TABLE IF EXISTS `e107_rss`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `e107_rss` ( + `rss_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `rss_name` varchar(255) NOT NULL DEFAULT '', + `rss_url` text NOT NULL, + `rss_topicid` varchar(255) NOT NULL DEFAULT '', + `rss_path` varchar(255) NOT NULL DEFAULT '', + `rss_text` longtext NOT NULL, + `rss_datestamp` int(10) unsigned NOT NULL DEFAULT '0', + `rss_class` tinyint(1) unsigned NOT NULL DEFAULT '0', + `rss_limit` tinyint(3) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`rss_id`), + KEY `rss_name` (`rss_name`) +) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `e107_rss` +-- + +LOCK TABLES `e107_rss` WRITE; +/*!40000 ALTER TABLE `e107_rss` DISABLE KEYS */; +INSERT INTO `e107_rss` VALUES (1,'News','news','0','0','The rss feed of the news',1456448477,0,10); +/*!40000 ALTER TABLE `e107_rss` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `e107_submitnews` +-- + +DROP TABLE IF EXISTS `e107_submitnews`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `e107_submitnews` ( + `submitnews_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `submitnews_name` varchar(100) NOT NULL DEFAULT '', + `submitnews_email` varchar(100) NOT NULL DEFAULT '', + `submitnews_user` int(10) unsigned NOT NULL DEFAULT '0', + `submitnews_title` varchar(200) NOT NULL DEFAULT '', + `submitnews_category` tinyint(3) unsigned NOT NULL DEFAULT '0', + `submitnews_item` text NOT NULL, + `submitnews_datestamp` int(10) unsigned NOT NULL DEFAULT '0', + `submitnews_ip` varchar(45) NOT NULL DEFAULT '', + `submitnews_auth` tinyint(3) unsigned NOT NULL DEFAULT '0', + `submitnews_file` text NOT NULL, + `submitnews_keywords` varchar(255) NOT NULL DEFAULT '', + `submitnews_description` text, + `submitnews_summary` text, + `submitnews_media` text, + PRIMARY KEY (`submitnews_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `e107_submitnews` +-- + +LOCK TABLES `e107_submitnews` WRITE; +/*!40000 ALTER TABLE `e107_submitnews` DISABLE KEYS */; +/*!40000 ALTER TABLE `e107_submitnews` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `e107_tmp` +-- + +DROP TABLE IF EXISTS `e107_tmp`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `e107_tmp` ( + `tmp_ip` varchar(45) NOT NULL DEFAULT '', + `tmp_time` int(10) unsigned NOT NULL DEFAULT '0', + `tmp_info` text NOT NULL, + KEY `tmp_ip` (`tmp_ip`), + KEY `tmp_time` (`tmp_time`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `e107_tmp` +-- + +LOCK TABLES `e107_tmp` WRITE; +/*!40000 ALTER TABLE `e107_tmp` DISABLE KEYS */; +/*!40000 ALTER TABLE `e107_tmp` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `e107_upload` +-- + +DROP TABLE IF EXISTS `e107_upload`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `e107_upload` ( + `upload_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `upload_poster` varchar(100) NOT NULL DEFAULT '', + `upload_email` varchar(100) NOT NULL DEFAULT '', + `upload_website` varchar(100) NOT NULL DEFAULT '', + `upload_datestamp` int(10) unsigned NOT NULL DEFAULT '0', + `upload_name` varchar(100) NOT NULL DEFAULT '', + `upload_version` varchar(10) NOT NULL DEFAULT '', + `upload_file` varchar(180) NOT NULL DEFAULT '', + `upload_ss` varchar(100) NOT NULL DEFAULT '', + `upload_description` text NOT NULL, + `upload_demo` varchar(100) NOT NULL DEFAULT '', + `upload_filesize` int(10) unsigned NOT NULL DEFAULT '0', + `upload_active` tinyint(3) unsigned NOT NULL DEFAULT '0', + `upload_category` tinyint(3) unsigned NOT NULL DEFAULT '0', + `upload_owner` varchar(50) NOT NULL DEFAULT '', + PRIMARY KEY (`upload_id`), + KEY `upload_active` (`upload_active`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `e107_upload` +-- + +LOCK TABLES `e107_upload` WRITE; +/*!40000 ALTER TABLE `e107_upload` DISABLE KEYS */; +/*!40000 ALTER TABLE `e107_upload` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `e107_user` +-- + +DROP TABLE IF EXISTS `e107_user`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `e107_user` ( + `user_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `user_name` varchar(100) NOT NULL DEFAULT '', + `user_loginname` varchar(100) NOT NULL DEFAULT '', + `user_customtitle` varchar(100) NOT NULL DEFAULT '', + `user_password` varchar(255) NOT NULL DEFAULT '', + `user_sess` varchar(100) NOT NULL DEFAULT '', + `user_email` varchar(100) NOT NULL DEFAULT '', + `user_signature` text NOT NULL, + `user_image` varchar(255) NOT NULL DEFAULT '', + `user_hideemail` tinyint(3) unsigned NOT NULL DEFAULT '0', + `user_join` int(10) unsigned NOT NULL DEFAULT '0', + `user_lastvisit` int(10) unsigned NOT NULL DEFAULT '0', + `user_currentvisit` int(10) unsigned NOT NULL DEFAULT '0', + `user_lastpost` int(10) unsigned NOT NULL DEFAULT '0', + `user_chats` int(10) unsigned NOT NULL DEFAULT '0', + `user_comments` int(10) unsigned NOT NULL DEFAULT '0', + `user_ip` varchar(45) NOT NULL DEFAULT '', + `user_ban` tinyint(3) unsigned NOT NULL DEFAULT '0', + `user_prefs` text NOT NULL, + `user_visits` int(10) unsigned NOT NULL DEFAULT '0', + `user_admin` tinyint(3) unsigned NOT NULL DEFAULT '0', + `user_login` varchar(100) NOT NULL DEFAULT '', + `user_class` text NOT NULL, + `user_perms` text NOT NULL, + `user_realm` text NOT NULL, + `user_pwchange` int(10) unsigned NOT NULL DEFAULT '0', + `user_xup` text, + PRIMARY KEY (`user_id`), + UNIQUE KEY `user_name` (`user_name`), + UNIQUE KEY `user_loginname` (`user_loginname`), + KEY `join_ban_index` (`user_join`,`user_ban`) +) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `e107_user` +-- + +LOCK TABLES `e107_user` WRITE; +/*!40000 ALTER TABLE `e107_user` DISABLE KEYS */; +INSERT INTO `e107_user` VALUES (1,'e107','e107','','$2y$10$9I/WNzNKiwhwGAugF3kKPeLB8R8gCGUjd9T1rGrHsP46//koUS84.','','e107inc@gmail.com','','',0,1541074253,0,0,0,0,0,'10.64.229.1',0,'',0,1,'','4,5','0','',1541074253,''); +/*!40000 ALTER TABLE `e107_user` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `e107_user_extended` +-- + +DROP TABLE IF EXISTS `e107_user_extended`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `e107_user_extended` ( + `user_extended_id` int(10) unsigned NOT NULL DEFAULT '0', + `user_hidden_fields` text, + PRIMARY KEY (`user_extended_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `e107_user_extended` +-- + +LOCK TABLES `e107_user_extended` WRITE; +/*!40000 ALTER TABLE `e107_user_extended` DISABLE KEYS */; +INSERT INTO `e107_user_extended` VALUES (1,NULL); +/*!40000 ALTER TABLE `e107_user_extended` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `e107_user_extended_struct` +-- + +DROP TABLE IF EXISTS `e107_user_extended_struct`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `e107_user_extended_struct` ( + `user_extended_struct_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `user_extended_struct_name` varchar(255) NOT NULL DEFAULT '', + `user_extended_struct_text` varchar(255) NOT NULL DEFAULT '', + `user_extended_struct_type` tinyint(3) unsigned NOT NULL DEFAULT '0', + `user_extended_struct_parms` varchar(255) NOT NULL DEFAULT '', + `user_extended_struct_values` text NOT NULL, + `user_extended_struct_default` varchar(255) NOT NULL DEFAULT '', + `user_extended_struct_read` tinyint(3) unsigned NOT NULL DEFAULT '0', + `user_extended_struct_write` tinyint(3) unsigned NOT NULL DEFAULT '0', + `user_extended_struct_required` tinyint(3) unsigned NOT NULL DEFAULT '0', + `user_extended_struct_signup` tinyint(3) unsigned NOT NULL DEFAULT '0', + `user_extended_struct_applicable` tinyint(3) unsigned NOT NULL DEFAULT '0', + `user_extended_struct_order` int(10) unsigned NOT NULL DEFAULT '0', + `user_extended_struct_parent` int(10) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`user_extended_struct_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `e107_user_extended_struct` +-- + +LOCK TABLES `e107_user_extended_struct` WRITE; +/*!40000 ALTER TABLE `e107_user_extended_struct` DISABLE KEYS */; +/*!40000 ALTER TABLE `e107_user_extended_struct` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `e107_userclass_classes` +-- + +DROP TABLE IF EXISTS `e107_userclass_classes`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `e107_userclass_classes` ( + `userclass_id` smallint(5) unsigned NOT NULL DEFAULT '0', + `userclass_name` varchar(100) NOT NULL DEFAULT '', + `userclass_description` varchar(250) NOT NULL DEFAULT '', + `userclass_editclass` smallint(5) unsigned NOT NULL DEFAULT '0', + `userclass_parent` smallint(5) unsigned NOT NULL DEFAULT '0', + `userclass_accum` varchar(250) NOT NULL DEFAULT '', + `userclass_visibility` smallint(5) NOT NULL DEFAULT '0', + `userclass_type` tinyint(1) unsigned NOT NULL DEFAULT '0', + `userclass_icon` varchar(250) NOT NULL DEFAULT '', + `userclass_perms` text NOT NULL, + PRIMARY KEY (`userclass_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `e107_userclass_classes` +-- + +LOCK TABLES `e107_userclass_classes` WRITE; +/*!40000 ALTER TABLE `e107_userclass_classes` DISABLE KEYS */; +INSERT INTO `e107_userclass_classes` VALUES (2,'CONTACT PEOPLE','Example contact person class',254,0,'0,2',0,0,'',''),(3,'NEWSLETTER','Subscribe to Newsletter',0,255,'3',0,0,'',''),(253,'Members','Registered and logged in members',250,0,'0,253',253,0,'',''),(246,'Search Bots','Identified search bots',250,0,'0,246',254,0,'',''),(254,'Admin','Site Administrators',250,0,'0,254',253,0,'',''),(248,'Forum Moderators','Moderators for Forums and other areas',250,0,'0,248',253,0,'',''),(249,'Admins and Mods','Anyone able to administer something, moderate forums etc',250,0,'0,249',253,0,'',''),(1,'PRIVATEMENU','Grants access to private menu items',254,0,'0,1',0,0,'',''),(247,'New Users','Recently joined users',250,0,'0,247',254,0,'',''),(250,'Main Admin','Main site Administrators',250,0,'0,250',253,0,'',''),(0,'Everyone (public)','Fixed class',250,0,'0',0,0,'',''),(252,'Guests','Fixed class',250,0,'0,252',0,0,'',''),(255,'No One (inactive)','Fixed class',250,0,'255',0,0,'',''),(251,'Read Only','Fixed class',250,0,'0,251',0,0,'',''),(4,'TestImage1','Used for testing userclass image (FA icon)',254,255,'4',254,0,'fa-fire-extinguisher.glyph',''),(5,'TestImage2','Used for testing userclass image (PNG icon)',254,255,'5',254,0,'{e_PLUGIN}tinymce4/images/icon_32.png',''); +/*!40000 ALTER TABLE `e107_userclass_classes` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2018-11-01 12:11:31 diff --git a/e107_tests/tests/_data/eml/bounced_01.eml b/e107_tests/tests/_data/eml/bounced_01.eml new file mode 100644 index 000000000..002779d2c --- /dev/null +++ b/e107_tests/tests/_data/eml/bounced_01.eml @@ -0,0 +1,37 @@ +Return-path: +Received: from e107 by secure.awscloudservices.net with local (Exim 4.91) + (envelope-from ) + id 1hG9qV-0002Ux-RO + for bounce-newsletter@e107.org; Mon, 15 Apr 2019 15:12:59 -0700 +To: Bounce handler +Subject: Test Bounce +X-PHP-Script: www.e107.org/e107_admin/mailout.php for 98.160.237.154 +X-PHP-Originating-Script: 1010:class.phpmailer.php +Date: Mon, 15 Apr 2019 16:12:59 -0600 +From: "e107.org" +Message-ID: +X-Mailer: PHPMailer 5.2.27 (https://github.com/PHPMailer/PHPMailer) +X-e107-id: 99999999 +X-Bounce-Test: true +MIME-Version: 1.0 +Content-Type: multipart/alternative; + boundary="b1_b32e962004f61de78186edcc7a1c7e2e" +Content-Transfer-Encoding: 8bit + +This is a multi-part message in MIME format. + +--b1_b32e962004f61de78186edcc7a1c7e2e +Content-Type: text/plain; charset=us-ascii + +Test Bounce Email address + + +--b1_b32e962004f61de78186edcc7a1c7e2e +Content-Type: text/html; charset=us-ascii + +Test Bounce Email address + + + +--b1_b32e962004f61de78186edcc7a1c7e2e-- + diff --git a/e107_tests/tests/_data/icon_64.png b/e107_tests/tests/_data/icon_64.png new file mode 100644 index 000000000..4c86b4cd5 Binary files /dev/null and b/e107_tests/tests/_data/icon_64.png differ diff --git a/e107_tests/tests/_data/testcore/calendar_template.php b/e107_tests/tests/_data/testcore/calendar_template.php new file mode 100644 index 000000000..36ae5f7a0 --- /dev/null +++ b/e107_tests/tests/_data/testcore/calendar_template.php @@ -0,0 +1,269 @@ +"; +$sc_style['PREV_MONTH']['post'] = ""; + +$sc_style['CURRENT_MONTH']['pre'] = ""; +$sc_style['CURRENT_MONTH']['post'] = ""; + +$sc_style['NEXT_MONTH']['pre'] = ""; +$sc_style['NEXT_MONTH']['post'] = ""; + +$sc_style['PREV_YEAR']['pre'] = ""; +$sc_style['PREV_YEAR']['post'] = ""; + +$sc_style['MONTH_LIST']['pre'] = ""; +$sc_style['MONTH_LIST']['post'] = ""; + +$sc_style['NEXT_YEAR']['pre'] = ""; +$sc_style['NEXT_YEAR']['post'] = ""; + +// + +$CALENDAR_TIME_TABLE = " +
    + + + + +\n + + + + +\n +
    {PREV_MONTH}{CURRENT_MONTH}{NEXT_MONTH}
    {PREV_YEAR}{MONTH_LIST}{NEXT_YEAR}
    "; + + + +// NAVIGATION BUTTONS ------------------------------------------------------------ +//$sc_style['NAV_LINKCURRENTMONTH']['pre'] = ""; +//$sc_style['NAV_LINKCURRENTMONTH']['post'] = ""; +$sc_style['NAV_LINKCURRENTMONTH']['pre'] = ""; +$sc_style['NAV_LINKCURRENTMONTH']['post'] = ""; + +$CALENDAR_NAVIGATION_TABLE = " +
    +
    + + + +\n +
    {NAV_CATEGORIES} {NAV_BUT_ALLEVENTS} {NAV_BUT_VIEWCAT} {NAV_BUT_ENTEREVENT} {NAV_BUT_SUBSCRIPTION} {NAV_LINKCURRENTMONTH}
    +
    +
    "; + + + +// EVENT LIST ------------------------------------------------------------ +$sc_style['EVENTLIST_CAPTION']['pre'] = ""; +$sc_style['EVENTLIST_CAPTION']['post'] = ":

    \n"; + +$EVENT_EVENTLIST_TABLE_START = "{EVENTLIST_CAPTION}"; +$EVENT_EVENTLIST_TABLE_END = "
    "; + + + +// EVENT ARCHIVE ------------------------------------------------------------ +$sc_style['EVENTARCHIVE_CAPTION']['pre'] = ""; +$sc_style['EVENTARCHIVE_CAPTION']['post'] = "\n"; + +$EVENT_ARCHIVE_TABLE_START = "
    {EVENTARCHIVE_CAPTION}"; +$EVENT_ARCHIVE_TABLE = " + + + +\n"; +//
    {EVENTARCHIVE_DETAILS} +$EVENT_ARCHIVE_TABLE_EMPTY = "\n"; +$EVENT_ARCHIVE_TABLE_END = "
    {EVENT_RECENT_ICON}{EVENTARCHIVE_DATE}{EVENTARCHIVE_HEADING}
    {EVENTARCHIVE_EMPTY}
    "; + + + +// EVENT SHOW EVENT ------------------------------------------------------------ +$EVENT_EVENT_TABLE_START = ""; +$EVENT_EVENT_TABLE_END = "
    "; + +$sc_style['EVENT_HEADING_DATE']['pre'] = ""; +$sc_style['EVENT_HEADING_DATE']['post'] = ""; + +$sc_style['EVENT_DETAILS']['pre'] = ""; +$sc_style['EVENT_DETAILS']['post'] = "\n"; + +$sc_style['EVENT_LOCATION']['pre'] = "".EC_LAN_32." "; +$sc_style['EVENT_LOCATION']['post'] = ""; + +$sc_style['EVENT_AUTHOR']['pre'] = "".EC_LAN_31." "; +$sc_style['EVENT_AUTHOR']['post'] = " "; + +$sc_style['EVENT_CONTACT']['pre'] = "".EC_LAN_33." "; +$sc_style['EVENT_CONTACT']['post'] = " "; + +$sc_style['EVENT_THREAD']['pre'] = ""; +$sc_style['EVENT_THREAD']['post'] = "\n"; + +$sc_style['EVENT_CATEGORY']['pre'] = "".EC_LAN_30." "; +$sc_style['EVENT_CATEGORY']['post'] = " "; + +$sc_style['EVENT_DATE_START']['pre'] = (isset($thisevent['event_allday']) && $thisevent['event_allday']) ? "".EC_LAN_68." " : "".EC_LAN_29." "; +$sc_style['EVENT_DATE_START']['post'] = ""; + +$sc_style['EVENT_TIME_START']['pre'] = EC_LAN_144; +$sc_style['EVENT_TIME_START']['post'] = ""; + +$sc_style['EVENT_DATE_END']['pre'] = "".EC_LAN_69." "; +$sc_style['EVENT_DATE_END']['post'] = ""; + +$sc_style['EVENT_TIME_END']['pre'] = EC_LAN_144; +$sc_style['EVENT_TIME_END']['post'] = ""; + +$EVENT_EVENT_TABLE = " + + +
    {EVENT_RECENT_ICON}{EVENT_CAT_ICON}{EVENT_HEADING_DATE}{EVENT_TIME_START} - {EVENT_TITLE}
    +
    + + + \n + + {EVENT_DETAILS} + {EVENT_THREAD} +
    {EVENT_AUTHOR} {EVENT_CAT_ICON} {EVENT_CATEGORY} {EVENT_CONTACT} {EVENT_OPTIONS}
    {EVENT_DATE_START}{EVENT_TIME_START} {EVENT_DATE_END}{EVENT_TIME_END}
    {EVENT_LOCATION}
    +
    + +\n +"; + + +// CALENDAR SHOW EVENT ------------------------------------------------------------ +$sc_style['CALENDAR_CALENDAR_RECENT_ICON']['pre'] = ""; +$sc_style['CALENDAR_CALENDAR_RECENT_ICON']['post'] = ""; +$CALENDAR_SHOWEVENT = "{CALENDAR_CALENDAR_RECENT_ICON}\n
    {SHOWEVENT_IMAGE}{SHOWEVENT_INDICAT}{SHOWEVENT_HEADING}
    "; + + + +// CALENDAR CALENDAR ------------------------------------------------------------ +$CALENDAR_CALENDAR_START = " +
    +"; + +$CALENDAR_CALENDAR_END = " +\n
    "; + +$CALENDAR_CALENDAR_DAY_NON = ""; + +//header row +$CALENDAR_CALENDAR_HEADER_START = ""; +$CALENDAR_CALENDAR_HEADER = "{CALENDAR_CALENDAR_HEADER_DAY}"; +$CALENDAR_CALENDAR_HEADER_END = "\n"; + + +$CALENDAR_CALENDAR_WEEKSWITCH = "\n"; + +//today +$CALENDAR_CALENDAR_DAY_TODAY = " + +{CALENDAR_CALENDAR_DAY_TODAY_HEADING}"; + +//day has events +$CALENDAR_CALENDAR_DAY_EVENT = " + +{CALENDAR_CALENDAR_DAY_EVENT_HEADING}"; + +// no events and not today +$CALENDAR_CALENDAR_DAY_EMPTY = " + +{CALENDAR_CALENDAR_DAY_EMPTY_HEADING}"; + +$CALENDAR_CALENDAR_DAY_END = ""; + +//==================================================================== +// Calendar menu templates +$CALENDAR_MENU_START = "
    "; +$CALENDAR_MENU_TABLE_START = ""; + +$CALENDAR_MENU_END = "
    "; + +// Blank cells at beginning and end +$CALENDAR_MENU_DAY_NON = "
    "; + +//header row +$CALENDAR_MENU_HEADER_START = "\n"; +$CALENDAR_MENU_HEADER_FRONT = ""; +$CALENDAR_MENU_HEADER_BACK = ""; +$CALENDAR_MENU_HEADER_END = "\n"; + + +$CALENDAR_MENU_WEEKSWITCH = "\n"; + +// Start and end CSS for date cells - six cases to decode, determined by array index: +// 1 - Today, no events +// 2 - Some other day, no events (or no icon defined) +// 3 - Today with events (and icon defined) +// 4 - Some other day with events (and icon defined) +// 5 - today with events, one or more of which has recently been added/updated (and icon defined) +// 6 - Some other day with events, one or more of which has recently been added/updated (and icon defined) + +//today, no events +$CALENDAR_MENU_DAY_START['1'] = ""; + +// no events and not today +$CALENDAR_MENU_DAY_START['2'] = ""; + +//day has events - same whether its today or not +$CALENDAR_MENU_DAY_START['3'] = ""; +$CALENDAR_MENU_DAY_START['4'] = ""; +// day has events, one which is recently added/updated +$CALENDAR_MENU_DAY_START['5'] = ""; +$CALENDAR_MENU_DAY_START['6'] = ""; +// Example highlight using background colour: +//$CALENDAR_MENU_DAY_START['5'] = ""; +//$CALENDAR_MENU_DAY_START['6'] = ""; + +$CALENDAR_MENU_DAY_END['1'] = ""; +$CALENDAR_MENU_DAY_END['2'] = ""; +$CALENDAR_MENU_DAY_END['3'] = ""; +$CALENDAR_MENU_DAY_END['4'] = ""; +$CALENDAR_MENU_DAY_END['5'] = ""; +$CALENDAR_MENU_DAY_END['6'] = ""; + +//============================================================================ +// Next event menu template +$sc_style['NEXT_EVENT_TIME']['pre'] = EC_LAN_144; +$sc_style['NEXT_EVENT_TIME']['post'] = ""; +// Following are original styles +//$sc_style['NEXT_EVENT_ICON']['pre'] = " \ No newline at end of file diff --git a/e107_tests/tests/_data/testcore/comment_menu_template.php b/e107_tests/tests/_data/testcore/comment_menu_template.php new file mode 100644 index 000000000..0d63db2a2 --- /dev/null +++ b/e107_tests/tests/_data/testcore/comment_menu_template.php @@ -0,0 +1,38 @@ +"; +$sc_style['CM_AUTHOR']['post'] = ""; + +$sc_style['CM_DATESTAMP']['pre'] = " ".CM_L11." "; +$sc_style['CM_DATESTAMP']['post'] = ""; + +$sc_style['CM_COMMENT']['pre'] = ""; +$sc_style['CM_COMMENT']['post'] = "

    "; + +if (!isset($COMMENT_MENU_TEMPLATE)){ + $COMMENT_MENU_TEMPLATE = " + {CM_ICON} {CM_URL_PRE}{CM_TYPE} {CM_HEADING}{CM_URL_POST}
    + {CM_AUTHOR}

    + "; +} +?> \ No newline at end of file diff --git a/e107_tests/tests/_data/testcore/favicon.ico b/e107_tests/tests/_data/testcore/favicon.ico new file mode 100644 index 000000000..083a83b69 Binary files /dev/null and b/e107_tests/tests/_data/testcore/favicon.ico differ diff --git a/e107_tests/tests/_data/testcore/forum/admin.png b/e107_tests/tests/_data/testcore/forum/admin.png new file mode 100644 index 000000000..b873a6de9 Binary files /dev/null and b/e107_tests/tests/_data/testcore/forum/admin.png differ diff --git a/e107_tests/tests/_data/testcore/forum/index.html b/e107_tests/tests/_data/testcore/forum/index.html new file mode 100644 index 000000000..e69de29bb diff --git a/e107_tests/tests/_data/testcore/forum/main_admin.png b/e107_tests/tests/_data/testcore/forum/main_admin.png new file mode 100644 index 000000000..da98c9335 Binary files /dev/null and b/e107_tests/tests/_data/testcore/forum/main_admin.png differ diff --git a/e107_tests/tests/_data/testcore/forum/moderator.png b/e107_tests/tests/_data/testcore/forum/moderator.png new file mode 100644 index 000000000..3f7e29872 Binary files /dev/null and b/e107_tests/tests/_data/testcore/forum/moderator.png differ diff --git a/e107_tests/tests/_data/testcore/forum/newthread.png b/e107_tests/tests/_data/testcore/forum/newthread.png new file mode 100644 index 000000000..3d3687c1c Binary files /dev/null and b/e107_tests/tests/_data/testcore/forum/newthread.png differ diff --git a/e107_tests/tests/_data/testcore/forum/reply.png b/e107_tests/tests/_data/testcore/forum/reply.png new file mode 100644 index 000000000..85b6e02c7 Binary files /dev/null and b/e107_tests/tests/_data/testcore/forum/reply.png differ diff --git a/e107_tests/tests/_data/testcore/fs_custom.sc b/e107_tests/tests/_data/testcore/fs_custom.sc new file mode 100644 index 000000000..f1d923457 --- /dev/null +++ b/e107_tests/tests/_data/testcore/fs_custom.sc @@ -0,0 +1,146 @@ +/* +* Copyright (C) 2006-2009 Corllete ltd (clabteam.com), Released under Creative Common license - http://creativecommons.org/licenses/by-nc/3.0/ +* Download and update at http://www.free-source.net/ +* $Id: +* +*/ + +global $tp,$pref; +$ret = ""; +$custom_query = explode('+', $parm); + +global $use_imagecode, $sec_img; +$use_imagecode = ($pref['logcode'] && extension_loaded('gd')); +if($use_imagecode) { +include_once(e_HANDLER.'secure_img_handler.php'); + $sec_img = new secure_image; + $fs_sec_code_img = ' +
    +
    + '.$sec_img->r_image().' +
    +
    + + +
    +
    + '; +} +$err = ''; + +if (LOGINMESSAGE != '') { + $err = ' + +
    + '; +} + +switch($custom_query[0]) +{ + case "login": + case "login noprofile": + include_lan(e_PLUGIN."login_menu/languages/".e_LANGUAGE.".php"); + + + if(ADMIN == TRUE) + { + $fs_admin = ' + '.LOGIN_MENU_L11.'  | + '; + } + if($custom_query[0] != "login noprofile") + { + $fs_profile = ' + '.LOGIN_MENU_L13.'  | + '; + } + $fs_settings = ' + '.LOGIN_MENU_L12.'  | + '; + $fs_logout = ' + '.LOGIN_MENU_L8.' + '; + + if (USER == TRUE){ + $ret .= ' +

    '.LOGIN_MENU_L5.' '.USERNAME.'

    +
    + '.$fs_admin.' + '.$fs_profile.' + '.$fs_settings.' + '.$fs_logout.' + '; + } else { + if($pref['user_reg']) + { + $fs_signup = ' + + '; + } + if ($pref['user_tracking'] == "cookie") + { + $fs_autologin = "".LOGIN_MENU_L6."  \n"; + } + + if (!$pref['auth_method'] || $pref['auth_method'] == 'e107') + { + $fs_pw = "".LOGIN_MENU_L4.""; + } + + $user_txt = str_replace(':','',LOGIN_MENU_L1); + $pass_txt = str_replace(':','',LOGIN_MENU_L2); + + $ret .= ' +
    +
    +
    + Close +
    +
    +
    + '.$err.' +
    +
    '.$user_txt.'
    +
    +
    '.$pass_txt.'
    +
    +
    +
    + +
    +
    +
    + +
    + + '.$fs_sec_code_img.' +
    + '.$fs_autologin.' +
    +
    + + + +
    +
    +
    + + +
    '.$fs_pw.'
    +
    +
    +
    + +
    +
    +
    + '; + + } + return $ret; + break; + +} diff --git a/e107_tests/tests/_data/testcore/fs_functions.php b/e107_tests/tests/_data/testcore/fs_functions.php new file mode 100644 index 000000000..6b4eab39b --- /dev/null +++ b/e107_tests/tests/_data/testcore/fs_functions.php @@ -0,0 +1,313 @@ +replaceConstants($link,TRUE); + $tmp = explode("?",$link); + $link_qry = (isset($tmp[1])) ? $tmp[1] : ""; + $link_slf = (isset($tmp[0])) ? $tmp[0] : ""; + $link_pge = basename($link_slf); + $link_match = strpos(e_SELF,$tmp[0]); + + if(e_MENU == "debug" && getperms('0')) { + echo "
    link= ".$link; + echo "
    link_q= ".$link_qry; + echo "
    url= ".e_PAGE; + echo "
    url_query= ".e_QUERY."
    "; + } + +// ----------- highlight overriding - set the link matching in the page itself. + + if(defined("HILITE")) { + if(strpos($link,HILITE)) { + return TRUE; + } + } + + +// --------------- highlighting for 'HOME'. ---------------- + global $pref; + list($fp,$fp_q) = explode("?",$pref['frontpage']['all']."?"); + if(strpos(e_SELF,"/".$pref['frontpage']['all'])!== FALSE && $fp_q == $tmp[1] && $link == e_HTTP."index.php"){ + + return TRUE; + } + +// --------------- highlighting for plugins. ---------------- + if(stristr($link, $PLUGINS_DIRECTORY) !== FALSE && stristr($link, "custompages") === FALSE){ + + if($link_qry) + { // plugin links with queries + $subq = explode("?",$link); + if(strpos(e_SELF,$subq[0]) && e_QUERY == $subq[1]){ + return TRUE; + }else{ + return FALSE; + } + } + else + { // plugin links without queries + $link = str_replace("../", "", $link); + if(stristr(dirname(e_SELF), dirname($link)) !== FALSE){ + return TRUE; + } + } + return FALSE; + } + +// --------------- highlight for news items.---------------- +// eg. news.php, news.php?list.1 or news.php?cat.2 etc + if(substr(basename($link),0,8) == "news.php") + { + + if (strpos($link, "news.php?") !== FALSE && strpos(e_SELF,"/news.php")!==FALSE) { + + $lnk = explode(".",$link_qry); // link queries. + $qry = explode(".",e_QUERY); // current page queries. + + if($qry[0] == "item") + { + return ($qry[2] == $lnk[1]) ? TRUE : FALSE; + } + + if($qry[0] == "all" && $lnk[0] == "all") + { + return TRUE; + } + + if($lnk[0] == $qry[0] && $lnk[1] == $qry[1]) + { + return TRUE; + } + + if($qry[1] == "list" && $lnk[0] == "list" && $lnk[1] == $qry[2]) + { + return TRUE; + } + + } + elseif (!e_QUERY && e_PAGE == "news.php") + { + + return TRUE; + } + return FALSE; + + } +// --------------- highlight for Custom Pages.---------------- +// eg. page.php?1 + + if (strpos($link, "page.php?") !== FALSE && strpos(e_SELF,"/page.php")) { + list($custom,$page) = explode(".",$link_qry); + list($q_custom,$q_page) = explode(".",e_QUERY); + if($custom == $q_custom){ + return TRUE; + }else{ + return FALSE; + } + } + +// --------------- highlight default ---------------- + if(strpos($link, "?") !== FALSE){ + + $thelink = str_replace("../", "", $link); + if((strpos(e_SELF,$thelink) !== false) && (strpos(e_QUERY,$link_qry) !== false)){ + return true; + } + } + if(!preg_match("/all|item|cat|list/", e_QUERY) && (strpos(e_SELF, str_replace("../", "",$link)) !== false)){ + return true; + } + + if((!$link_qry && !e_QUERY) && (strpos(e_SELF,$link) !== FALSE)){ + return TRUE; + } + + if(($link_slf == e_SELF && !link_qry) || (e_QUERY && strpos(e_SELF."?".e_QUERY,$link)!== FALSE) ){ + return TRUE; + } + + return FALSE; +} +// ---------------------------------------------------- + +function adnav_cat($cat_title, $cat_link, $cat_id=FALSE, $cat_open=FALSE) { + global $tp; + + $cat_link = (strpos($cat_link, '://') === FALSE && strpos($cat_link, 'mailto:') !== 0 ? e_HTTP.$cat_link : $cat_link); + + if ($cat_open == 4 || $cat_open == 5){ + $dimen = ($cat_open == 4) ? "600,400" : "800,600"; + $href = " href=\"javascript:open_window('".$cat_link."',".$dimen.")\""; + } else { + $href = "href='".$cat_link."'"; + } + + $text = "toHTML($cat_title,"","defs, no_hook").""; + } else { + $text .= ">".$tp->toHTML($cat_title,"","defs, no_hook").""; + } + + return $text; +} + +function render_sub($linklist, $id) { + $text = ""; + foreach ($linklist['sub_'.$id] as $sub) { + + // Filter title for backwards compatibility ----> + if(substr($sub['link_name'],0,8) == "submenu.") { + $tmp = explode(".",$sub['link_name']); + $subname = $tmp[2]; + } else { + $subname = $sub['link_name']; + } + + if (isset($linklist['sub_'.$sub['link_id']])) { // Has Children. + $sub_ids[] = $sub['link_id']; + + $text .= " +
  • ".adnav_main($subname, $sub['link_url'], $sub['link_id'],$sub['link_open']); + + $text .= " +
      "; + + $temp = $linklist['sub_'.$sub['link_id']]; + foreach ($temp as $bla) { + if (isset($linklist['sub_'.$bla['link_id']])) { + $text .= " +
    • ".adnav_main($bla['link_name'], $bla['link_url'], $bla['link_id'], $bla['link_open']); + $text .= " +
        "; + $text .= render_sub($linklist, $bla['link_id']); + $text .= " +
    • "; + } else { + $text .= " +
    • ".adnav_main($bla['link_name'], $bla['link_url'], null, $bla['link_open']).'
    • '; + } + } + + $text .= " +
    "; + $text .= " +
  • "; + } else { + $text .= " +
  • ".adnav_main($subname, $sub['link_url'], null, $sub['link_open'])."
  • "; + } + } + + return $text; +} + +function adnav_main($cat_title, $cat_link, $cat_id=FALSE, $cat_open=FALSE) { + global $tp; + + $cat_link = (strpos($cat_link, '://') === FALSE) ? e_HTTP.$cat_link : $cat_link; + $cat_link = $tp->replaceConstants($cat_link,TRUE); + + if ($cat_open == 4 || $cat_open == 5){ + $dimen = ($cat_open == 4) ? "600,400" : "800,600"; + $href = " href=\"javascript:open_window('".$cat_link."',".$dimen.")\""; + } else { + $href = "href='".$cat_link."'"; + } + + $text = "toHTML($cat_title,"","defs, no_hook").""; + + return $text; +} + +$text .= " + + "; + +$text .= ' + +'; +?> \ No newline at end of file diff --git a/e107_tests/tests/_data/testcore/fs_login.sc b/e107_tests/tests/_data/testcore/fs_login.sc new file mode 100644 index 000000000..e9d0cfceb --- /dev/null +++ b/e107_tests/tests/_data/testcore/fs_login.sc @@ -0,0 +1,59 @@ +global $pref; +if(!USER){ + $loginsc = ' + + '; + return $loginsc; +} + + +if (USER == TRUE || ADMIN == TRUE) { + $loginsc = ' +
    + + '.LAN_THEME_23.'  '.USERNAME.' + + '; + + $loginsc .= ' + '; + if (ADMIN == TRUE) { + $loginsc .= ' + + + + + '.LAN_THEME_28.' + + + +
    + '; + + $loginsc .= ' + '; + return $loginsc; + + +} \ No newline at end of file diff --git a/e107_tests/tests/_data/testcore/fs_sitelinks.sc b/e107_tests/tests/_data/testcore/fs_sitelinks.sc new file mode 100644 index 000000000..fe020ca9b --- /dev/null +++ b/e107_tests/tests/_data/testcore/fs_sitelinks.sc @@ -0,0 +1,3 @@ +include_once(THEME.'fs_functions.php'); + +return $text; diff --git a/e107_tests/tests/_data/testcore/images/admin_nav_bkg.png b/e107_tests/tests/_data/testcore/images/admin_nav_bkg.png new file mode 100644 index 000000000..dc531a45b Binary files /dev/null and b/e107_tests/tests/_data/testcore/images/admin_nav_bkg.png differ diff --git a/e107_tests/tests/_data/testcore/images/adminbg.png b/e107_tests/tests/_data/testcore/images/adminbg.png new file mode 100644 index 000000000..33fdde77d Binary files /dev/null and b/e107_tests/tests/_data/testcore/images/adminbg.png differ diff --git a/e107_tests/tests/_data/testcore/images/adminnavbg.png b/e107_tests/tests/_data/testcore/images/adminnavbg.png new file mode 100644 index 000000000..dd2f462b5 Binary files /dev/null and b/e107_tests/tests/_data/testcore/images/adminnavbg.png differ diff --git a/e107_tests/tests/_data/testcore/images/admintopbg.png b/e107_tests/tests/_data/testcore/images/admintopbg.png new file mode 100644 index 000000000..a70e005fc Binary files /dev/null and b/e107_tests/tests/_data/testcore/images/admintopbg.png differ diff --git a/e107_tests/tests/_data/testcore/images/bottom_xhtml.png b/e107_tests/tests/_data/testcore/images/bottom_xhtml.png new file mode 100644 index 000000000..8e57fa7d3 Binary files /dev/null and b/e107_tests/tests/_data/testcore/images/bottom_xhtml.png differ diff --git a/e107_tests/tests/_data/testcore/images/bullet.png b/e107_tests/tests/_data/testcore/images/bullet.png new file mode 100644 index 000000000..0ee60d67b Binary files /dev/null and b/e107_tests/tests/_data/testcore/images/bullet.png differ diff --git a/e107_tests/tests/_data/testcore/images/bullet2.gif b/e107_tests/tests/_data/testcore/images/bullet2.gif new file mode 100644 index 000000000..a28f5ee66 Binary files /dev/null and b/e107_tests/tests/_data/testcore/images/bullet2.gif differ diff --git a/e107_tests/tests/_data/testcore/images/contentbg.png b/e107_tests/tests/_data/testcore/images/contentbg.png new file mode 100644 index 000000000..7123fee27 Binary files /dev/null and b/e107_tests/tests/_data/testcore/images/contentbg.png differ diff --git a/e107_tests/tests/_data/testcore/images/e_adminlogo.png b/e107_tests/tests/_data/testcore/images/e_adminlogo.png new file mode 100644 index 000000000..42d8ed6a9 Binary files /dev/null and b/e107_tests/tests/_data/testcore/images/e_adminlogo.png differ diff --git a/e107_tests/tests/_data/testcore/images/e_logo.png b/e107_tests/tests/_data/testcore/images/e_logo.png new file mode 100644 index 000000000..819c76a9f Binary files /dev/null and b/e107_tests/tests/_data/testcore/images/e_logo.png differ diff --git a/e107_tests/tests/_data/testcore/images/e_logo_small.png b/e107_tests/tests/_data/testcore/images/e_logo_small.png new file mode 100644 index 000000000..a1d306b37 Binary files /dev/null and b/e107_tests/tests/_data/testcore/images/e_logo_small.png differ diff --git a/e107_tests/tests/_data/testcore/images/file.png b/e107_tests/tests/_data/testcore/images/file.png new file mode 100644 index 000000000..5ec7adef4 Binary files /dev/null and b/e107_tests/tests/_data/testcore/images/file.png differ diff --git a/e107_tests/tests/_data/testcore/images/footerbor.png b/e107_tests/tests/_data/testcore/images/footerbor.png new file mode 100644 index 000000000..71c9cb42e Binary files /dev/null and b/e107_tests/tests/_data/testcore/images/footerbor.png differ diff --git a/e107_tests/tests/_data/testcore/images/headerbg.png b/e107_tests/tests/_data/testcore/images/headerbg.png new file mode 100644 index 000000000..97587426f Binary files /dev/null and b/e107_tests/tests/_data/testcore/images/headerbg.png differ diff --git a/e107_tests/tests/_data/testcore/images/index.html b/e107_tests/tests/_data/testcore/images/index.html new file mode 100644 index 000000000..e69de29bb diff --git a/e107_tests/tests/_data/testcore/images/login_logo.png b/e107_tests/tests/_data/testcore/images/login_logo.png new file mode 100644 index 000000000..819c76a9f Binary files /dev/null and b/e107_tests/tests/_data/testcore/images/login_logo.png differ diff --git a/e107_tests/tests/_data/testcore/images/mail.png b/e107_tests/tests/_data/testcore/images/mail.png new file mode 100644 index 000000000..a126ac536 Binary files /dev/null and b/e107_tests/tests/_data/testcore/images/mail.png differ diff --git a/e107_tests/tests/_data/testcore/images/mainbg.png b/e107_tests/tests/_data/testcore/images/mainbg.png new file mode 100644 index 000000000..c184e5589 Binary files /dev/null and b/e107_tests/tests/_data/testcore/images/mainbg.png differ diff --git a/e107_tests/tests/_data/testcore/images/nav_hover.png b/e107_tests/tests/_data/testcore/images/nav_hover.png new file mode 100644 index 000000000..aa45ce839 Binary files /dev/null and b/e107_tests/tests/_data/testcore/images/nav_hover.png differ diff --git a/e107_tests/tests/_data/testcore/images/nav_sep.png b/e107_tests/tests/_data/testcore/images/nav_sep.png new file mode 100644 index 000000000..c412bffbc Binary files /dev/null and b/e107_tests/tests/_data/testcore/images/nav_sep.png differ diff --git a/e107_tests/tests/_data/testcore/images/navbg.png b/e107_tests/tests/_data/testcore/images/navbg.png new file mode 100644 index 000000000..8029098af Binary files /dev/null and b/e107_tests/tests/_data/testcore/images/navbg.png differ diff --git a/e107_tests/tests/_data/testcore/images/newsedit.png b/e107_tests/tests/_data/testcore/images/newsedit.png new file mode 100644 index 000000000..bd871f7b0 Binary files /dev/null and b/e107_tests/tests/_data/testcore/images/newsedit.png differ diff --git a/e107_tests/tests/_data/testcore/images/pdf.png b/e107_tests/tests/_data/testcore/images/pdf.png new file mode 100644 index 000000000..4a522252f Binary files /dev/null and b/e107_tests/tests/_data/testcore/images/pdf.png differ diff --git a/e107_tests/tests/_data/testcore/images/print.png b/e107_tests/tests/_data/testcore/images/print.png new file mode 100644 index 000000000..62f944822 Binary files /dev/null and b/e107_tests/tests/_data/testcore/images/print.png differ diff --git a/e107_tests/tests/_data/testcore/images/regl.png b/e107_tests/tests/_data/testcore/images/regl.png new file mode 100644 index 000000000..2ea161355 Binary files /dev/null and b/e107_tests/tests/_data/testcore/images/regl.png differ diff --git a/e107_tests/tests/_data/testcore/images/regm.png b/e107_tests/tests/_data/testcore/images/regm.png new file mode 100644 index 000000000..5339b032d Binary files /dev/null and b/e107_tests/tests/_data/testcore/images/regm.png differ diff --git a/e107_tests/tests/_data/testcore/images/regr.png b/e107_tests/tests/_data/testcore/images/regr.png new file mode 100644 index 000000000..9a986c1e3 Binary files /dev/null and b/e107_tests/tests/_data/testcore/images/regr.png differ diff --git a/e107_tests/tests/_data/testcore/images/rightbox_title_bg.png b/e107_tests/tests/_data/testcore/images/rightbox_title_bg.png new file mode 100644 index 000000000..7f86e7eaf Binary files /dev/null and b/e107_tests/tests/_data/testcore/images/rightbox_title_bg.png differ diff --git a/e107_tests/tests/_data/testcore/images/search-icon.png b/e107_tests/tests/_data/testcore/images/search-icon.png new file mode 100644 index 000000000..34c60a87a Binary files /dev/null and b/e107_tests/tests/_data/testcore/images/search-icon.png differ diff --git a/e107_tests/tests/_data/testcore/images/titlebg.png b/e107_tests/tests/_data/testcore/images/titlebg.png new file mode 100644 index 000000000..348008ae5 Binary files /dev/null and b/e107_tests/tests/_data/testcore/images/titlebg.png differ diff --git a/e107_tests/tests/_data/testcore/index.html b/e107_tests/tests/_data/testcore/index.html new file mode 100644 index 000000000..e69de29bb diff --git a/e107_tests/tests/_data/testcore/js/index.html b/e107_tests/tests/_data/testcore/js/index.html new file mode 100644 index 000000000..e69de29bb diff --git a/e107_tests/tests/_data/testcore/js/menu.js b/e107_tests/tests/_data/testcore/js/menu.js new file mode 100644 index 000000000..03f698a69 --- /dev/null +++ b/e107_tests/tests/_data/testcore/js/menu.js @@ -0,0 +1,25 @@ +sfHover = function() { + var sfEls = document.getElementById("nav").getElementsByTagName("LI"); + for (var i=0; ie107 Inc.'); +define('LAN_THEME_2', 'Comments: '); +define('LAN_THEME_3', 'Comments are turned off for this item'); +define('LAN_THEME_4', 'Read the full story'); +define('LAN_THEME_5', 'Trackbacks: '); +define('LAN_THEME_8', 'in'); +define('LAN_THEME_9', 'by'); +define("LAN_THEME_11", "Latest news"); +define("LAN_THEME_12", "E-mail to a friend"); +define("LAN_THEME_13", "Create PDF file"); +define("LAN_THEME_14", "Print"); +define("LAN_THEME_15", "Edit"); +define('LAN_THEME_17', 'Login'); +define('LAN_THEME_18', 'Username'); +define('LAN_THEME_19', 'Password'); +define('LAN_THEME_20', 'Register'); +define('LAN_THEME_21', 'Login'); +define('LAN_THEME_22', 'Forgot password?'); +define('LAN_THEME_23', 'Welcome'); +define('LAN_THEME_24', 'Admin'); +define('LAN_THEME_26', 'Settings'); +define('LAN_THEME_27', 'Profile'); +define('LAN_THEME_28', 'Logout'); +define('LAN_THEME_29', 'List new'); +define('LAN_THEME_SING', 'Login'); +define('LAN_THEME_REG', 'Register'); +define("LAN_SEARCH", "Search"); +define("LAN_SEARCH_SUB", "Go"); +define('LAN_THEME_SHARE', 'Share this'); +define('LAN_THEME_VER', 'e107 v.'); +define("CM_L13", "by"); +?> \ No newline at end of file diff --git a/e107_tests/tests/_data/testcore/languages/index.html b/e107_tests/tests/_data/testcore/languages/index.html new file mode 100644 index 000000000..e69de29bb diff --git a/e107_tests/tests/_data/testcore/login_template.php b/e107_tests/tests/_data/testcore/login_template.php new file mode 100644 index 000000000..e67d545cd --- /dev/null +++ b/e107_tests/tests/_data/testcore/login_template.php @@ -0,0 +1,94 @@ +
    +
    + ".(file_exists(THEME."images/login_logo.png") ? "" : "" ); +} + +// ##### LOGIN TABLE ----------------------------------------------------------------------------- +if(!isset($LOGIN_TABLE)) +{ + $LOGIN_TABLE = ''; + if($LOGIN_TABLE_LOGINMESSAGE != '') + { + $LOGIN_TABLE .= "
    {LOGIN_TABLE_LOGINMESSAGE}
    "; + } + if (!isset($LOGIN_TABLE_SECIMG_SECIMG)) + { + $LOGIN_TABLE_SECIMG_SECIMG = FALSE; + } + $LOGIN_TABLE .= " +
    + ".$rs -> form_open("post", e_SELF)." + + + + + + + + + + + + + + "; + if($LOGIN_TABLE_SECIMG_SECIMG){ + $LOGIN_TABLE .= " + + + + "; + } + + $LOGIN_TABLE .= " + + + +
    + ".LAN_LOGIN_4." +
    + ".LAN_LOGIN_1." + + {LOGIN_TABLE_USERNAME} + + ".(file_exists(THEME."images/password.png") ? "" : "" )." +
    + ".LAN_LOGIN_2." + + {LOGIN_TABLE_PASSWORD} +
    + {LOGIN_TABLE_SECIMG_LAN} + + {LOGIN_TABLE_SECIMG_HIDDEN} {LOGIN_TABLE_SECIMG_SECIMG} {LOGIN_TABLE_SECIMG_TEXTBOC} +
    + {LOGIN_TABLE_AUTOLOGIN}{LOGIN_TABLE_AUTOLOGIN_LAN}

    {LOGIN_TABLE_SUBMIT} +
    ". + $rs -> form_close()."
    "; +} +// ##### ------------------------------------------------------------------------------------------ + +// ##### LOGIN TABLE FOOTER ----------------------------------------------------------------------- +if(!isset($LOGIN_TABLE_FOOTER)) +{ + $LOGIN_TABLE_FOOTER = " +
    +

    + {LOGIN_TABLE_FOOTER_USERREG}   ".LAN_LOGIN_12." +
    +
    +
    + "; +} +// ##### ------------------------------------------------------------------------------------------ + + +?> \ No newline at end of file diff --git a/e107_tests/tests/_data/testcore/preview.jpg b/e107_tests/tests/_data/testcore/preview.jpg new file mode 100644 index 000000000..7ffebcc5b Binary files /dev/null and b/e107_tests/tests/_data/testcore/preview.jpg differ diff --git a/e107_tests/tests/_data/testcore/source/admin_mainadmin_moderator.png b/e107_tests/tests/_data/testcore/source/admin_mainadmin_moderator.png new file mode 100644 index 000000000..86021181d Binary files /dev/null and b/e107_tests/tests/_data/testcore/source/admin_mainadmin_moderator.png differ diff --git a/e107_tests/tests/_data/testcore/source/forum_images.png b/e107_tests/tests/_data/testcore/source/forum_images.png new file mode 100644 index 000000000..b49990a42 Binary files /dev/null and b/e107_tests/tests/_data/testcore/source/forum_images.png differ diff --git a/e107_tests/tests/_data/testcore/source/index.html b/e107_tests/tests/_data/testcore/source/index.html new file mode 100644 index 000000000..e69de29bb diff --git a/e107_tests/tests/_data/testcore/source/reply_new_thread.png b/e107_tests/tests/_data/testcore/source/reply_new_thread.png new file mode 100644 index 000000000..817aa6160 Binary files /dev/null and b/e107_tests/tests/_data/testcore/source/reply_new_thread.png differ diff --git a/e107_tests/tests/_data/testcore/style.css b/e107_tests/tests/_data/testcore/style.css new file mode 100644 index 000000000..df903ed4b --- /dev/null +++ b/e107_tests/tests/_data/testcore/style.css @@ -0,0 +1,1315 @@ +/* CLEAR CSS */ +html, body { width: 100%;} +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, font, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +b, u, i, center, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td { +margin: 0; +padding: 0; +border: 0; +} +ol, ul { list-style: none; } +h1, h2, h3, h4, h5, h6 {line-height: normal; } +body { +line-height: 1; +} +ol, ul { +list-style: none; +} +select { +padding: 0px 20px ; +max-width: 180px; +} + +option { +padding: 0px 20px ; +} +checkbox, label { +margin: 0px 5px ; +} +input[type="checkbox"], input[type="radio"] { +margin: 0px 5px 0px 0px ; +padding: 5px 5px ; +} +blockquote, q { +quotes: none; +} +blockquote:before, blockquote:after, +q:before, q:after { +content: ''; +content: none; +} +:focus { +outline: 0px; +} +ins { +text-decoration: none; +} +del { +text-decoration: line-through; +} +table { +border-collapse: collapse; +border-spacing: 0px; +} +.clear { +clear:both; +} +.clearfix:after { +clear:both; +content:' '; +display:block; +font-size:0px; +line-height:0px; +visibility:hidden; +width:0px; +height:0px; +} +.clearfix { +display:inline-block; +} +* html .clearfix{height:1%;} +* .clearfix{display:block;} +* { margin: 0px; padding: 0px; } +/* E107 CORE CSS */ +.tbox { +color: #111111; +background-color: #FFFFFF; +border:1px solid #B5B5B7; +font-size: 14px; +font-weight: normal; +padding: 5px 10px; +margin: 5px 5px ; +-webkit-border-radius: 3px; +-moz-border-radius: 3px; +border-radius: 3px; +} +.tbox:focus { +background-color: #EEEEEE; +border:1px solid #B5B5B7; +} +.button, .button:focus { +text-align: center; +background-color: #FFFFFF; +border: 1px #B5B5B7 solid; +padding: 5px 10px ; +margin: 5px 0px ; +font-weight: bold; +-moz-border-radius: 3px; +border-radius: 3px; +-webkit-border-radius: 3px; +cursor:hand; +cursor:pointer; +} +.button:hover { +color: #3399CC; +border: 1px #EEEEEE solid; +-moz-border-radius: 3px; +border-radius: 3px; +-webkit-border-radius: 3px; +} +#submitnews_item { +width: 90%; +} +.tbox.chatbox { +width: 90%; +padding : 2px; +color: #111111; +background-color: #EEEEEE; +border:1px solid #B5B5B7; +margin: 10px auto; +-webkit-border-radius: 3px; +-moz-border-radius: 3px; +border-radius: 3px; +-webkit-border-radius: 3px; +} +.tbox.chatbox:focus { +background-color: #FFFFFF; +border:1px solid #EEEEEE; +} +.tbox.signature { +width: 350px; +color: #111111; +background-color: #FFFFFF; +border:1px solid #B5B5B7; +font-size: 14px; +font-weight: normal; +padding: 5px 10px; +margin: 5px 5px ; +-moz-border-radius: 3px; +border-radius: 3px; +-webkit-border-radius: 3px; +} +.tbox.signature:focus { +background-color: #EEEEEE; +border:1px solid #B5B5B7; +} +.npdropdown { +width: auto; +margin: 0px 0px; +padding: 2px; +height: auto; +text-align: left; +} +.tbox.comment.subject { +width: 98%; +background-color: transparent; +border: 0px none; +padding: 2px; +margin-top: 3px; +} +#comment.tbox.comment { +width: 98%; +padding : 2px; +color: #111111; +background-color: #FFFFFF; +border:1px solid #B5B5B7; +} +#comment.tbox.comment:focus { +background-color: #EEEEEE; +border:1px solid #B5B5B7; +} +#contactForm textarea.tbox { +width: auto; +padding : 2px; +color: #111111; +background-color: #FFFFFF; +border:1px solid #B5B5B7; +} +#contactForm textarea.tbox:focus { +background-color: #EEEEEE; +border:1px solid #B5B5B7; +} +input.input-text, textarea.tbox { +width: auto; +padding : 5px; +color: #111111; +background-color: #FFFFFF; +border:1px solid #B5B5B7; +} +input.input-text:focus, textarea.tbox:focus { +background-color: #EEEEEE; +border:1px solid #B5B5B7; +} +input#helpb.helpbox { +float: left; +margin-top: 2px; +margin-bottom: 2px; +background-color: transparent; +border: 0px none; +font-size: 80%; +color: #111111; +text-align: left; +} +#commentform .helpbox{ +width: 98%; +border-collapse: collapse; +padding: 1px; +} +.helpbox { +width: 98%; +background-color: transparent; +border: 0px none; +border-collapse: collapse; +padding: 3px; +} +.indent { +color: #111111; +background-color: #EEEEEE; +border:1px solid #B5B5B7; +padding: 5px 15px; +font-size: 90%; +margin: 10px 10px 5px 15px; +font-style: italic; +} +.nextprev{ +border: 0px none; +background-color: transparent; +border-collapse: collapse; +padding: 15px; +margin: 5px 0px ; +text-align: left; +width: auto; +font-size: 13px; +font-weight: bold; +} +.nextprev_link { +background-color: #3399CC; +border:1px solid #3399CC; +-moz-border-radius: 3px; +-webkit-border-radius: 3px; +border-radius: 3px; +color:#FFFFFF; +margin:0px; +padding:2px 6px; +text-decoration: none; +} +.nextprev_link:hover { +background-color: #EEEEEE; +color:#3399CC; +text-decoration: none; +} +.nextprev_current { +background-color: transparent; +border:1px solid transparent; +color:#333333; +margin:0px; +padding:2px 6px; +text-decoration: none; +} +.smalltext { +font-size: 12px; +font-weight: normal; +} +.smallblacktext { +font-size: 12px; +font-weight: bold; +} +.defaulttext, .caption, .bodytable, .mediumtext { +font-size: 13px; +font-weight: normal; +} +.fborder { +background-color: transparent; +border: 0px none; +padding: 3px; +margin-top: 3px; +text-align: left; +} +.forumheader { +background-color: #F9F9F9; +border-bottom:1px solid #B5B5B7; +padding: 8px 3px; +font-weight: bold; +vertical-align: middle; +text-align: left; +} +.nforumcaption{ +background-color: transparent; +border-bottom:1px solid #B5B5B7; +padding: 3px; +font-size: 110%; +text-align: left; +} +.finfobar{ +background-color: transparent; +border-bottom:1px solid #B5B5B7; +padding: 3px; +font-size: 100%; +text-align: left; +} +.forumheader2{ +background-color: transparent; +border-bottom:1px solid #B5B5B7; +padding: 3px; +font-size: 99%; +text-align: left; +} +.forumheader3{ +background-color: transparent; +border-bottom:1px solid #B5B5B7; +padding: 10px 3px; +font-size: 99%; +text-align: left; +} +.forumborder { +background-color: transparent; +border-bottom:1px solid #B5B5B7; +vertical-align: top; +text-align: left; +} +.fcaption { +background-color: transparent; +border-bottom:1px solid #B5B5B7; +border-collapse: collapse; +border: 0px none; +vertical-align: top; +font-size: 13px; +text-align: left; +font-weight: bold; +line-height: 40px; +padding: 0px 10px ; +} +.fcaption a { +text-decoration: none; +} +.fcaption a:hover { +text-decoration: underline; +} +/* THEME CSS */ +body { +background: #FFFFFF url(images/mainbg.png) repeat-x 0px 0px; +font: 12px/16px Arial,Helvetica,sans-serif; +color : #333333; +} +h1 { +font: normal 35px Arial,Helvetica,sans-serif; +} +h2 { +font: normal 22px Arial,Helvetica,sans-serif; +} +h3 { +font: normal 18px Arial,Helvetica,sans-serif; +} +h4 { +font: normal 16px Arial,Helvetica,sans-serif; +} +a { +color: #3399CC; +text-decoration: none; +cursor:hand; +cursor:pointer; +} +a:hover { +color: #333333; +text-decoration: none; +} +img { +border: 0px; +} +.mr10 { +margin-right: 10px; +} +.mr20 { +margin-right: 20px; +} +.ml20 { +margin-left: 20px; +} +.wrapper { +width: 1000px; +margin: 0px auto ; +} +.wrapper_full { +width: 95%; +margin: 0px auto ; +} +/* HEADER CSS */ +.headerbg { +background: transparent url(images/headerbg.png) repeat-x 0px 0px; +width: 100%; +height: 186px;; +} +.headertop { +height: 135px; +width: 100%; +} +.sitelogo { +width: 500px; +float: left; +margin: 20px 0px 0px 0px; +} +.banner { +width: 490px; +float: right; +text-align: right; +margin: 20px 0px 0px 0px; +} +.headerbottom { +height: 50px; +width: 100% +} +/* LOGIN CSS */ +.fs_login { +width: 500px; +float: left; +height: 50px; +} +.fs_c_login { +height: 50px; +width: 200px; +} +.singin { +float: left; +padding: 20px 0px 0px 20px; +} +.singin a { +color: #3399CC; +text-decoration: underline; +font-weight: bold; +font-size: 14px; +} +.singin a:hover { +text-decoration: none; +} +.register { +color: #FFFFFF; +font-weight: bold; +width: 100px; +float: right; +padding-top: 10px; +font-size: 14px; +} +.regr { +width: 6px; +height: 31px; +background: transparent url(images/regr.png) no-repeat 0px 0px; +float: right; +} +.regl { +width: 6px; +height: 31px; +background: transparent url(images/regl.png) no-repeat 0px 0px; +float: left; +} +.regm { +height: 31px; +margin: 0px 6px ; +text-align: center; +background: transparent url(images/regm.png) repeat-x 0px 0px; +} +.register_text { +padding: 8px 0px 0px 0px; +} +.register a { +color: #FFFFFF; +text-decoration: none; +} +.fs_c_login2 { +padding: 10px 0px ; +width: 600px; +} +span.logout { +color: #FFFFFF; +font-weight: bold; +width: 100px; +font-size: 14px; +padding: 5px 20px ; +text-align: center; +background: transparent url(images/regm.png) repeat-x 0px 0px; +-moz-border-radius: 3px; +-webkit-border-radius: 3px; +border-radius: 3px; +} +span.logm { +height: 31px; +} +span.logout a { +color: #FFFFFF; +text-decoration: none; +} +.username { +float: left; +} +.userpass { +float: right; +} +.tbox.fs_username { +width: 180px; +padding: 5px 10px ; +font-size: 12px; +color: #333333; +background-color: #F0F0F0; +border: 0px none; +} +.tbox.fs_username:focus { +background-color: #FFFFFF; +} +.tbox.fs_userpass { +width: 180px; +padding: 5px 10px ; +font-size: 12px; +color: #333333; +background-color: #F0F0F0; +border: 0px none; +} +.tbox.fs_userpass:focus { +background-color: #FFFFFF; +} +.userlogin { +padding: 2px 10px ; +} +.fs_login_links { +padding: 5px 0px 0px 20px; +} +.fs_welcome { +font-weight: bold; +padding: 0px 0px 5px 20px; +} +.fs_login_links_b { +padding: 0px 10px 0px 10px ; +} +/* SEARCH BOX CSS */ +.sitesearch { +width: 300px; +text-align: right; +float: right; +margin-right: 20px; +margin-top: 4px; +} +.search-form { +width: 200px; +padding: 5px 10px ; +font-size: 12px; +color: #333333; +background-color: #F0F0F0; +border: 0px none; +-moz-border-radius: 3px; +-webkit-border-radius: 3px; +border-radius: 3px; +} +.search-form:focus { +background-color: #FFFFFF; +border: 1px #F0F0F0 solid; +} +.search-submit { +background: url(images/search-icon.png) no-repeat 0px 0px; +padding: 5px 5px ; +height: 24px; +width: 24px; +border: 0px none; +color: #FFFFFF; +font-weight: bold; +cursor:pointer; +} +/* NAVIGATION CONTENT CSS */ +.navigation { +width: 100%; +margin: 0px auto ; +height: 62px; +background: url(images/navbg.png) repeat-x 0px 0px; +} +#nav li.fs-linkSep { +background: url(images/nav_sep.png) no-repeat 0px 50%; +width: 2px; +height: 62px; +} +#nav a { +padding: 0px; +margin: 0px; +list-style: none; +} +#nav ul { +padding: 0px 0px; +margin: 0px; +list-style: none; +cursor: pointer; +} +#nav li { +float: left; +font-size: 18px; +font-weight: normal; +} +#nav li a { +color: #656565; +text-shadow: 2px 2px 2px #B5B5B7; +margin: 0px 10px; +padding: 20px 20px 10px 20px ; +display: block; +text-decoration: none; +} +#nav li#active a { +display: block; +text-decoration: none; +color:#3399CB; +background: url(images/nav_hover.png) no-repeat 0px 100%; +} +#nav li a:hover, +#nav li.sfhover a, +#nav li:hover a { +display: block; +text-decoration: none; +color:#3399CB; +} +#nav li#active, +#nav li.sfhover, +#nav li:hover { +cursor: pointer; +} +#nav li.sub-sfhover, +#nav li.sub:hover { +cursor: pointer; +} +#nav li.sub-sfhover a, +#nav li.sub-sfhover a:hover, +#nav li.sub:hover a, +#nav li.sub:hover a:hover { +} +#nav li#active a, +#nav li a:hover, +#nav li.sfhover a, +#nav li:hover a { +display: block; +text-decoration: none; +} +#nav li#active, +#nav li.sfhover, +#nav li:hover { +cursor: pointer; +} +#nav li.sub-sfhover, +#nav li.sub:hover { +cursor: pointer; +} +/* LEVEL 2 */ +#nav li li a { +margin-left: 0px; +display: block; +padding: 0px; +float: none; +padding-left: 15px; +width: 180px; +width/* */:/**/165px; +width: /**/165px; +color: #000000; +font-size: 14px; +font-weight: normal; +border-bottom: 1px #B5B5B7 solid; +} +#nav li li a:hover { +background-color: #B5B5B7; +color: #656565; +border-bottom: 1px #B5B5B7 solid; +} +#nav li ul { /* second-level lists */ +position: absolute; +z-index: 1000; +width: 180px; +left: -999em; /* using left instead of display to hide menus because display: none isn't read by screen readers */ +background-color: #F6F8F8; +color: #656565; +line-height: 32px; +} +#nav li:hover ul, +#nav li.sfhover ul, +#nav li.sub-sfhover ul { +background-image: none; +background-repeat: no-repeat; +background-position: 0px 100%; +} +#nav li.sub-sfhover ul.sub, +#nav li.sub:hover ul.sub { +margin-left: 0px; +padding-bottom: 0px; +} +#nav li ul ul { /* third-and-above-level lists */ +margin: -28px 0px 0px 180px; +} +#nav ul.sub li, +#nav ul.sub li a, +#nav ul.sub li a:hover, +#nav ul.sub li:hover, +#nav ul.sub li:hover a, +#nav ul.sub li.sfhover a, +#nav ul.sub li:hover a:hover, +#nav ul.sub li.sfhover a:hover, +#nav li.sub ul.sub a +{ background-image: none; } +#nav li#active ul.sub li, +#nav li#active ul.sub li a, +#nav li#active ul.sub li a:hover, +#nav li#active ul.sub li:hover, +#nav li#active ul.sub li:hover a, +#nav li#active ul.sub li.sfhover a, +#nav li#active ul.sub li:hover a:hover, +#nav li#active ul.sub li.sfhover a:hover, +#nav li.sub ul.sub a +{ background-image: none; } +#nav li:hover ul ul, +#nav li:hover ul ul ul, +#nav li:hover ul ul ul ul, +#nav li.sfhover ul ul, +#nav li.sfhover ul ul ul, +#nav li.sfhover ul ul ul ul, +#nav li.sub-sfhover ul ul, +#nav li.sub-sfhover ul ul ul, +#nav li.sub-sfhover ul ul ul ul { +left: -999em; +} +#nav li:hover ul, +#nav li li:hover ul, +#nav li li li:hover ul, +#nav li li li li:hover ul, +#nav li.sfhover ul, +#nav li li.sfhover ul, +#nav li li li.sfhover ul, +#nav li li li li.sfhover ul, +#nav li.sub-sfhover ul, +#nav li.sub-sfhover li.sfhover ul, +#nav li.sub-sfhover li li.sfhover ul, +#nav li.sub-sfhover li li li.sfhover ul { /* lists nested under hovered list items */ +left: auto; +} +#nav a.sub { +} +#nav a.sub:hover { +} +/* MAIN CONTENT CSS */ +.maincontent { +background: #FFFFFF url(images/contentbg.png) repeat-x 0px 0px; +margin: 0px auto ; +width: 100%; +padding: 20px 0px ; +} +.topcontent { +margin: 0px 20px 30px 20px; +} +.topcontent_entry { +font-size: 14px; +line-height: 18px; +color: #626262; +background-color: #FFFFFF; +margin-bottom: 30px; +padding: 20px 20px; +border-bottom: 3px #EEEEEE solid; +} +.topcontent_entry img { +float: left; +margin: 0px 20px 10px 0px; +} +.topcontent_entry table { +width: 90%; +margin: 0px auto ; +} +.maincontentall { +background: #FFFFFF url(images/contentbg.png) repeat-x 0px 0px; +margin: 0px auto ; +width: 100%; +padding: 20px 0px ; +} +.topcontentall { +margin: 0px 20px 30px 20px; +background-color: #FFFFFF; +padding: 20px 20px ; +} +/* FULL SITE SIDE CSS */ +.fullside { +margin: 20px 20px ; +padding: 20px 0px ; +background-color: #FFFFFF; +} +.fullcontent { +padding: 0px 20px ; +} +.fullcontent_title { +background: url(images/rightbox_title_bg.png) no-repeat 0px 100%; +font-size: 16px; +font-weight: bold; +padding-bottom: 10px; +margin-bottom: 10px; +text-shadow: 2px 2px 2px #B5B5B7; +} +.fullcontent_entry table { +width: 90%; +margin: 0px auto ; +} +.maincontentwrap { +background-color: #FFFFFF; +width: 920px; +margin: 0px auto ; +padding: 20px 20px ; +} +/* RIGHT SITE SIDE CSS */ +.rightcolall { +float: right; +width: 300px; +font-size: 13px; +} +.rightcol { +float: right; +width: 300px; +font-size: 13px; +margin-top: 63px; +} +.rightbox { +margin-bottom: 30px; +margin-top: 30px; +} +.rightbox_title { +background: url(images/rightbox_title_bg.png) no-repeat 0px 100%; +font-size: 16px; +font-weight: bold; +padding-bottom: 10px; +margin-left: 30px; +margin-bottom: 10px; +text-shadow: 2px 2px 2px #B5B5B7; +} +.rightbox_text { +padding: 0px 0px; +} +.rightbox_text table { +width: 90%; +margin: 0px auto ; +} +.title_clean { +font-size: 16px; +font-weight: bold; +padding-bottom: 10px; +margin-bottom: 10px; +text-shadow: 2px 2px 2px #B5B5B7; +} +/* MENU CSS */ +.bottmomenusbox { +margin-bottom: 30px; +} +.bottmomenus_title { +background: url(images/rightbox_title_bg.png) no-repeat 0px 100%; +font-size: 16px; +font-weight: bold; +padding-bottom: 10px; +margin-bottom: 10px; +text-shadow: 2px 2px 2px #B5B5B7; +} +.bottmomenus_text { +padding: 0px 0px; +} +.bottmomenus_text table { +width: 90%; +margin: 0px auto ; +} +/* LEFT SITE SIDE CSS */ +.leftcol { +width: 600px; +float: left; +font-size: 13px; +} +.leftbox { +margin-bottom: 30px; +} +.leftbox_title_bg { +background: #EBECEC url(images/titlebg.png) repeat 0px 100%; +min-height: 45px; +margin-bottom: 10px; +} +.leftbox_title { +padding: 10px 20px ; +font-size: 18px; +text-shadow: 2px 2px 2px #B5B5B7; +} +.leftbox_text table { +width: 90%; +margin: 0px auto ; +} +/* NEWSSTYLE CSS */ +.news_title_cat { +color: #333333; +font-weight: bold; +font-size: 14px; +text-align: left; +border-bottom: 1px #F1F1F1 solid; +} +.news_title_cat a { +color: #333333; +} +.news_title_cat a:hover { +color: #3399CC; +text-decoration: none; +} +.news_item_cat a { +color: #3399CC; +text-decoration: none; +} +.news_item_cat a:hover { +color: #333333; +text-decoration: none; +} +.news_icons { +font-size: 10px; +vertical-align: middle; +padding: 0px 2px 15px 0px; +} +.newsbox { +margin-bottom: 30px; +} +.meta { +width: 100%; +padding: 5px 0px 10px 0px; +} +.author { +padding: 0px 10px ; +text-align: right; +} +.news_comments { +vertical-align: middle; +height: 24px; +} +.fsnewsbbody { +padding: 5px 0px 10px 0px; +} +.news_image { +float: left; +margin: 0px 10px 5px 0px; +} +.metabottom { +width: 100%; +height: 24px; +vertical-align: middle; +} +.metaicons { +height: 24px; +text-align: right; +float: right; +vertical-align: middle; +} +.readmore { +font-weight: bold; +} +.readmore a { +color: #333333; +text-decoration: underline; +} +.readmore a:hover { +color: #333333; +text-decoration: none; +} +/* MENU=2 MENU=3 MENU=4 CSS */ +.bottmomenus { +width: 960px; +margin: 30px auto ; +} +.bmenul { +width: 300px; +float: left; +} +.bmenur { +width: 300px; +float: right; +} +.bmenum { +width: auto; +margin: 0px 330px ; +} +/* FOOTER */ +.footerbor { +background: url(images/footerbor.png) repeat-x 0px 0px; +width: 90%; +margin: 30px auto 0px auto ; +height: 3px; +} +.footerborfull { +background: url(images/footerbor.png) repeat-x 0px 0px; +width: 95%; +margin: 30px auto 0px auto ; +height: 3px; +} +.footer { +width: 100%; +margin: 30px 0px ; +} +.footer a { +text-decoration: none; +} +.fmenul { +float: left; +width: 300px; +} +.fmenur { +float: right; +text-align: center; +width: 300px; +color: #656565; +} +.fmenum { +text-align: center; +margin: 0px 310px; +width: auto; +color: #3399CC; +font-weight: bold; +font-size: 14px; +} +.footerlinks { +width: auto; +margin: 20px 20px ; +text-align: center; +} +.footerlinks a { +color: #656565; +text-decoration: none; +} +.footerlinks a:hover { +color: #333333; +text-decoration: none; +} +/* SITELINKS=flat:2 CSS */ +.styledmenu { +width: 100%; +margin-bottom: 30px; +} +.styledmenu ul { +list-style-type: none; +margin: 0px; +padding: 0px; +} +.styledmenu ul li { +padding-bottom: 2px; +margin: 0px; +} +.styledmenu ul li a { +color: #333333; +background-color: #F0F0F0; +display: block; +padding: 5px 0px; +line-height: 17px; +padding-left: 8px; +text-decoration: none; +} +.styledmenu ul li a:hover { +color: #111111; +background-color: #F9F9F9; +font-weight: bold; +} +.styledmenu ul li.current a { +color: #111111; +background-color: #FFFFFF; +font-weight: bold; +} + +.installe { + color:#FF5C5C; background-color:#FFCECE; border:1px solid #FF5C5C; padding:10px;margin:20px; +} +/* ADMIN CSS +.admin_header { +width: 100%; +margin: 0px auto 0px auto ; +height: 70px; +color: #FFFFFF; +background: #2C5C81 url(images/admintopbg.png) repeat-x 0px 0px; +} +.admin_header a { +color: #FFFFFF; +text-decoration: none; +} +.admin_header a:hover { +color: #70C3EC; +text-decoration: none; +} +.admin_header_left { +float: left; +margin: 10px 20px 0px 20px ; +} +.admin_header_right { +float: right; +text-align: right; +margin: 10px 20px 0px 20px ; +} +.admin_sitenav { +text-align: right; +margin: 5px 0px 0px 0px; +} +.admin_main_col { +width: 100%; +background-color: #EDEDED; +margin: 0px auto 10px auto; +padding: 0px 0px 20px 0px; +border-bottom: 1px #B5B5B7 solid; +} +.admin_main_col a { +color: #000; +text-decoration: none; +} +.admin_main_col a:hover { +color: #333333; +text-decoration: none; +} +.admin_main_col .button, .admin_main_col .button:focus { +background-color: #EDEDED; +border: 1px #B5B5B7 solid; +padding: 5px 10px ; +margin: 5px 0px ; +font-weight: bold; +cursor:hand; +cursor:pointer; +} + +.link_button { +padding: 5px 5px ; +border-bottom: 1px #B5B5B7 solid; +} +.link_button a { +color: #000000; +text-decoration: none; +} +.link_button a:hover { +color: #666666; +text-decoration: none; +} +.admin_main_col .helpbox { +background-color: transparent; +border: 0px none ! important; +} +.admin_main_col .tbox { +padding: 5px 10px; +margin: 5px 5px ; +width: 90%; +} +.admin_main_col textarea.tbox { +padding: 5px 10px; +margin: 5px 5px ; +width: 90% ! important; +} +.admin_main_col input.tbox { +padding: 5px 10px; +margin: 15px 5px ; +width: auto; +} +.admin_main_col select.tbox { +padding: 5px 10px; +margin: 15px 5px ; +max-width: 180px; +} +.admin_main_col .nextprev{ +border: 0px none; +background-color: transparent; +border-collapse: collapse; +padding: 15px; +margin: 15px 0px ; +text-align: left; +width: auto; +font-size: 13px; +font-weight: bold; +} +.admin_main_col .nextprev_link { +background-color: #EDEDED; +border:1px solid #B5B5B7; +-moz-border-radius: 2px; +-webkit-border-radius: 2px; +border-radius: 3px; +color:#000000; +margin:0px; +padding:2px 6px; +text-decoration: none; +} +.admin_main_col .nextprev_link:hover { +background-color: #FFFFFF; +color:#333333; +text-decoration: none; +} +.admin_main_col .nextprev_current { +background-color: transparent; +border:1px solid transparent; +color:#333333; +margin:0px; +padding:2px 6px; +text-decoration: none; +} +.admin_sitenav a { +padding: 0px 0px 0px 10px ; +} +.admin_left_col { +padding: 20px 19px; +vertical-align: top; +} +.admin_right_col { +padding: 20px 19px; +} +.admin_mid_col { +background-color: #f5f5f5; +padding: 20px 20px ; +} +.admin_mid_col_one { +width: 76%; +float: right; +} +.admin_left_col_one { +float: left; +width: 20%; +padding-left: 20px; +vertical-align: top; +} +.admin_main_nav_bg { +background-color: #0A3452; +background: #02243F url(images/adminnavbg.png) repeat-x 0px 0px; +padding: 15px 0px 0px 0px ; +height: 35px; +} +.admin_main_nav { +width: 98%; +margin: 0px auto 0px auto ; +} +div.menuBar, +div.menuBar a.menuButton, div.menuButton, div.menuButton_over, +div.menu, +div.menu a.menuItem { +font-family: arial, sans-serif; +font-size: 16px; +font-style: normal; +font-weight: normal; +color: #FFFFFF; +} +div.menuBar { +border-bottom: 0px solid #000; +} +div.emenuBar { +background-color: #F7F9FA; +border-top: 0px none #ffffff; +border-bottom: 0px solid #000; +text-align: left; +} +div.menuBar a.menuButton, div.menuButton, div.menuButton_over { +background-color: transparent; +color: #FFFFFF; +cursor: default; +left: 0px; +margin: 0px 0px; +padding: 5px 24px 5px 22px; +position: relative; +text-decoration: none; +top: 0px; +z-index: 100; +cursor:hand; +cursor:pointer; +} +div.menuBar a.menuButton:hover, div.menuButton:hover, div.menuButton_over { +color: #70C3EC; +} +div.menuBar a.menuButtonActive, div.menuButtonActive, div.menuButtonActive:hover, +div.menuBar a.menuButtonActive:hover { +color: #70C3EC; +} +div.menu { +background-color: #FCFDFF; +border: #B5B5B7 1px solid; +left: 0px; +padding: 1px 1px 1px 1px; +position: absolute; +top: 0px; +visibility: hidden; +z-index: 101; +} +div.menu a.menuItem { +color: #000000; +cursor:hand; +cursor:pointer; +font-size: 13px; +display: block; +padding: 5px 41px 5px 0px; +text-decoration: none; +white-space: nowrap; +} +div.menu a.menuItem:hover, div.menu a.menuItemHighlight { +background-color: #B5B5B7; +color: #000000; +} +div.menu a.menuItem span.menuItemBuffer { +padding: 8px 5px 8px 8px; +color: #ffffff; +} +div.menu a.menuItem:hover span.menuItemBuffer { +color: #000000; +} +div.menu a.menuItem span.menuItemText { +padding: 0px 0px 0px 3px; +} +div.menu a.menuItem span.menuItemArrow { +margin-right: -.75em; +} +div.menu div.menuItemSep { +border-top: 1px solid #a5a5a5; +border-bottom: 1px solid #ffffff; +margin: 4px 2px; +} +.menuItem .header a { +border-bottom: 1px solid #b3b3b3; +} +.td { +padding: 10px 5px ; +} +.forumheader4, .forumheader5 { +padding: 10px 5px ; +} + */ \ No newline at end of file diff --git a/e107_tests/tests/_data/testcore/theme.php b/e107_tests/tests/_data/testcore/theme.php new file mode 100644 index 000000000..f70aaa1d8 --- /dev/null +++ b/e107_tests/tests/_data/testcore/theme.php @@ -0,0 +1,559 @@ +'); +define("FS_START_SEPARATOR", FALSE); +define("FS_END_SEPARATOR", FALSE); +define("ADLINK_COLS",5); +$register_sc[]='FS_SITELINKS'; +$register_sc[]='FS_LOGIN'; +$register_sc[]='ADMIN_ALT_NAV'; + +function theme_head() { + return ' + + + + '; +} +// [layout] +$layout = '_default'; +$HEADER = ' +
    +
    +
    + + +
    +
    + +
    + {SEARCH} +
    +
    +
    + +
    +
    +
    + {SETSTYLE=flatlinks} + {LINKSTYLE=flatlinks} + {SITELINKS=flat:2} + {SETSTYLE=bottmomenus} + {MENU=1} +
    +
    + {MENU=5} +'; +$FOOTER = ' + {MENU=6} +
    +
    +
    +
    +
    +
    + {MENU=2} +
    +
    + {MENU=4} +
    +
    + {MENU=3} +
    +
    +
    +
    + + +
    +'; + +$CUSTOMHEADER = array(); + +$CUSTOMHEADER['HOME'] = ' +
    +
    +
    + + +
    +
    + +
    + {SEARCH} +
    +
    +
    + +
    +
    + {SETSTYLE=wm} + {WMESSAGE} + +'; +$CUSTOMFOOTER['HOME'] = ' + +
    +
    +
    +
    +
    + {SETSTYLE=bottmomenus} + {MENU=2} +
    +
    + {MENU=4} +
    +
    + {MENU=3} +
    +
    +
    +
    + + +
    +'; +$CUSTOMPAGES['HOME'] = SITEURL.'index.php'; +$CUSTOMHEADER['FULL'] = ' +
    +
    +
    + + +
    +
    + +
    + {SEARCH} +
    +
    +
    + +
    +
    + {SETSTYLE=full} +'; +$CUSTOMFOOTER['FULL'] = ' +
    +
    +
    +
    + + +
    +'; +$CUSTOMPAGES['FULL'] = 'forum/ '; +// [tablestyle] +function tablestyle($caption, $text, $mode=''){ + global $style; + + if($mode == 'admin_update') + { + echo ' + + '.$caption.' + + + '; + return; + } + +switch ($style) { + + case 'wm': + echo ' +
    + '.$text.' +
    + '; + break; + case 'flatlinks': + echo ' +
    +
    + '.$text.' +
    +
    + '; + break; + case 'full': + echo ' +
    +
    + '.$caption.' +
    +
    + '.$text.' +
    +
    + '; + break; + case 'rightcol': + echo ' +
    +
    + '.$caption.' +
    +
    + '.$text.' +
    +
    + '; + break; + case 'leftcol': + echo ' +
    +
    +
    + '.$caption.' +
    +
    +
    + '.$text.' +
    +
    + '; + break; + case 'bottmomenus': + echo ' +
    +
    + '.$caption.' +
    +
    + '.$text.' +
    +
    + '; + break; + default: + echo ' +
    +
    + '.$caption.' +
    +
    + '.$text.' +
    +
    + '; + break; + } +} +define('THEME_DISCLAIMER', '
    '.LAN_THEME_1.''); +define('ICONSTYLE', 'float: left; border:0'); +define('COMMENTLINK', LAN_THEME_2); +define('COMMENTOFFSTRING', LAN_THEME_3); +define('PRE_EXTENDEDSTRING', '
    '); +define('EXTENDEDSTRING', LAN_THEME_4); +define('POST_EXTENDEDSTRING', '
    '); +define('TRACKBACKSTRING', LAN_THEME_5); +define('TRACKBACKBEFORESTRING', ' :: '); +define('ICONMAIL', 'mail.png'); +define('ICONPRINT', 'print.png'); +define('ICONPRINTPDF', 'pdf.png'); +define("NEWSCAT_AMOUNT",10); +$sc_style["NEWSIMAGE"]["pre"] = '
    '; +$sc_style["NEWSIMAGE"]["post"] = '
    '; +$sc_style["NEWSCOMMENTS"]["pre"] = '
    '; +$sc_style["NEWSCOMMENTS"]["post"] = '
    '; +//[newsstlyle] +$NEWSSTYLE = ' +
    +
    +
    +
    + {NEWSTITLE} +
    +
    +
    +
    + {NEWSDATE=short}  '.LAN_THEME_9.' {NEWSAUTHOR} +
    +
    +
    + {NEWSIMAGE} + {NEWSBODY} {EXTENDED} +
    +
    +
    +
    + {EMAILICON} {PRINTICON} {PDFICON} {ADMINOPTIONS} +
    + {NEWSCOMMENTS} +
    +
    +
    + '; +$NEWSLISTSTYLE = ' +
    +
    +
    +
    + {NEWSTITLE} +
    +
    +
    +
    + {NEWSDATE=short}  '.LAN_THEME_9.' {NEWSAUTHOR} +
    +
    +
    + {NEWSIMAGE} + {NEWSBODY} {EXTENDED} +
    +
    +
    +
    + {EMAILICON} {PRINTICON} {PDFICON} {ADMINOPTIONS} +
    + {NEWSCOMMENTS} +
    +
    +
    +'; +$NEWSARCHIVE =' +
    + + + + +
    +
    {ARCHIVE_BULLET} {ARCHIVE_LINK} '.LAN_THEME_9.' {ARCHIVE_AUTHOR} - {ARCHIVE_DATESTAMP} '.LAN_THEME_8.' {ARCHIVE_CATEGORY}
    +
    +
    +'; +//Render news categories on the bottom of the page +$NEWSCAT = ' + + + + + + + +
    +
    + {NEWSCATEGORY} +
    +
    + + + + +
    +
    +'; +//Loop for news items in category +$NEWSCAT_ITEM = ' +
    +   {NEWSTITLELINK} +
    +'; +// linkstyle +// http://wiki.e107.org/?title=Styling_Individual_Sitelink_Menus +function linkstyle($np_linkstyle) { +// Common to all styles (for this theme) +// Common sublink settings +// NOTE: *any* settings can be customized for sublinks by using +// 'sub' as a prefix for the setting name. Plus, there's 'subindent' +// $linkstyleset['sublinkclass'] = 'mysublink2; +// $linkstyleset['subindent'] = ' '; +// Now for some per-style setup + switch ($np_linkstyle) + { + case 'toplinks': + $linkstyleset['linkdisplay'] = 1; + $linkstyleset['prelink'] = ""; + $linkstyleset['linkstart'] = "
  • "; + $linkstyleset['linkend'] = "
  • "; + $linkstyleset['linkstart_hilite'] = "
  • "; + $linkstyleset['linkclass_hilite'] = ""; + $linkstyleset['linkseparator'] = ""; + break; + case 'bottom': + $linkstyleset['linkdisplay'] = 1; + $linkstyleset['prelink'] = ""; + $linkstyleset['postlink'] = ""; + $linkstyleset['linkstart'] = ""; + $linkstyleset['linkend'] = ""; + $linkstyleset['linkstart_hilite'] = ""; + $linkstyleset['linkclass_hilite'] = ""; + $linkstyleset['linkseparator'] = "  "; + break; + case 'flatlinks': + $linkstyleset['linkdisplay'] = 2; + $linkstyleset['prelink'] = '
      '; + $linkstyleset['postlink'] = '
    '; + $linkstyleset['linkstart'] = '
  • '; + $linkstyleset['linkend'] = '
  • '; + $linkstyleset['linkstart_hilite'] = "
  • "; + $linkstyleset['linkclass_hilite'] = "current"; + break; + default: // if no LINKSTYLE defined + $linkstyleset['linkdisplay'] = 1; + define('PRELINK', ''); + define('POSTLINK', ''); + define('LINKSTART', ' '); + define('LINKSTART_HILITE', ' '); + define('LINKEND', '
    '); + define('LINKALIGN', 'left'); + } +return $linkstyleset; +} + define('BULLET', 'bullet.png'); +// Chatbox post style +$CHATBOXSTYLE = "
    {USERNAME} {TIMEDATE}
    {MESSAGE}
    "; +// Comment post style +$sc_style["REPLY"]["pre"] = ''; +$sc_style["REPLY"]["post"] = ''; +$sc_style["COMMENTEDIT"]["pre"] = ''; +$sc_style["COMMENTEDIT"]["post"] = ''; +$sc_style["JOINED"]["post"] = '
    '; +$sc_style["LOCATION"]["post"] = '
    '; +$sc_style["RATING"]["post"] = '

    '; +$sc_style["COMMENT"]["post"] = "
    "; +$COMMENTSTYLE = ' +
    + + + + + {REPLY} + + + + +{COMMENTEDIT} +
    + '.LAN_THEME_9.' {USERNAME} '.LAN_THEME_8.' {TIMEDATE} +
    +
    + {AVATAR} +
    + + {JOINED}{COMMENTS}{LOCATION}{IPADDRESS} + +
    + {COMMENT} +
    +
    +'; +// Chatbox post style +$CHATBOXSTYLE = "
    {USERNAME} {TIMEDATE}
    {MESSAGE}
    "; +$SEARCH_SHORTCODE = ' +
    + + +
    +'; +?> \ No newline at end of file diff --git a/e107_tests/tests/_data/testcore/usersettings_template.php b/e107_tests/tests/_data/testcore/usersettings_template.php new file mode 100644 index 000000000..668f44298 --- /dev/null +++ b/e107_tests/tests/_data/testcore/usersettings_template.php @@ -0,0 +1,213 @@ + +".LAN_CUSTOMTITLE.": + +"; +$sc_style['CUSTOMTITLE']['post'] = ""; + +$sc_style['PASSWORD1']['pre'] = " + + ".LAN_152."
    ".LAN_401." + +"; + +$sc_style['PASSWORD2']['pre'] = " + + + + + ".LAN_153."
    ".LAN_401." + +"; +$sc_style['PASSWORD2']['post'] = " + + +"; + +$sc_style['PASSWORD_LEN']['pre'] = "
    (".LAN_SIGNUP_1." "; +$sc_style['PASSWORD_LEN']['post'] = " ".LAN_SIGNUP_2.")"; + +$sc_style['USERCLASSES']['pre'] = " +".LAN_USET_5.":".req($pref['signup_option_class'])." +
    ".LAN_USET_6." + +"; +$sc_style['USERCLASSES']['post'] = ""; + +$sc_style['AVATAR_UPLOAD']['pre'] = " +".LAN_415."
    + +"; +$sc_style['AVATAR_UPLOAD']['post'] = ""; + +$sc_style['PHOTO_UPLOAD']['pre'] = " + +".LAN_425." + + + +".LAN_414."
    ".LAN_426." + +"; +$sc_style['PHOTO_UPLOAD']['post'] = ""; + + +$sc_style['SIGNATURE']['pre'] = " ".LAN_USET_8." + + ".LAN_120.req($pref['signup_option_signature'])." + "; + + +$sc_style['SIGNATURE']['post'] = "
    "; + +$sc_style['SIGNATURE_HELP']['pre'] = ""; +$sc_style['SIGNATURE_HELP']['post'] = " "; + + +$sc_style['XUP']['pre'] = " + +".LAN_435." + + +".LAN_433."
    ".LAN_434." + +"; +$sc_style['XUP']['post'] = ""; + +$USER_EXTENDED_CAT = "{CATNAME}"; +$USEREXTENDED_FIELD = " + + +{FIELDNAME} + + +{FIELDVAL} {HIDEFIELD} + + +"; +$REQUIRED_FIELD = "{FIELDNAME} *"; + +$USERSETTINGS_EDIT = " +
    + + + + + + + + + + + + + + + + + + + + + + {CUSTOMTITLE} + + {PASSWORD1} + {PASSWORD_LEN} + {PASSWORD2} + + + + + + + + + + + + {USERCLASSES} + {USEREXTENDED_ALL} + + + {SIGNATURE=cols=58&rows=4} + {SIGNATURE_HELP} + + + + + + + + + + + + + + + + + + + + + + + + + + {AVATAR_UPLOAD} + {PHOTO_UPLOAD} + {XUP} + + + + +
    ".LAN_418."
    ".LAN_7."
    ".LAN_8."
    + {USERNAME} +
    ".LAN_9."
    ".LAN_10."
    + {LOGINNAME} +
    ".LAN_308.req($pref['signup_option_realname'])." + {REALNAME} +
    ".LAN_112.req(!$pref['disable_emailcheck'])." + {EMAIL} +
    ".LAN_113."
    ".LAN_114."
    + {HIDEEMAIL=radio} + +
    ".LAN_122.req($pref['signup_option_timezone'])." + {TIMEZONE} +
    ".LAN_420."
    ".LAN_404.($pref['im_width'] || $pref['im_height'] ? "
    ".($pref['im_width'] ? MAX_AVWIDTH.$pref['im_width']." pixels. " : "").($pref['im_height'] ? MAX_AVHEIGHT.$pref['im_height']." pixels." : "") : "")."
    ".LAN_422.req($pref['signup_option_image'])."
    ".LAN_423."
    + {AVATAR_REMOTE} +
    ".LAN_421."
    ".LAN_424."
    + {AVATAR_CHOOSE} +
    +
    + "; + + +?> \ No newline at end of file diff --git a/e107_tests/tests/_data/testkubrick/images/01_linkbg1.gif b/e107_tests/tests/_data/testkubrick/images/01_linkbg1.gif new file mode 100644 index 000000000..d971439c2 Binary files /dev/null and b/e107_tests/tests/_data/testkubrick/images/01_linkbg1.gif differ diff --git a/e107_tests/tests/_data/testkubrick/images/01_linkbg2.gif b/e107_tests/tests/_data/testkubrick/images/01_linkbg2.gif new file mode 100644 index 000000000..c7f875075 Binary files /dev/null and b/e107_tests/tests/_data/testkubrick/images/01_linkbg2.gif differ diff --git a/e107_tests/tests/_data/testkubrick/images/bar.jpg b/e107_tests/tests/_data/testkubrick/images/bar.jpg new file mode 100644 index 000000000..09b4da58f Binary files /dev/null and b/e107_tests/tests/_data/testkubrick/images/bar.jpg differ diff --git a/e107_tests/tests/_data/testkubrick/images/bullet2.gif b/e107_tests/tests/_data/testkubrick/images/bullet2.gif new file mode 100644 index 000000000..cb7cb2b9c Binary files /dev/null and b/e107_tests/tests/_data/testkubrick/images/bullet2.gif differ diff --git a/e107_tests/tests/_data/testkubrick/images/kubrickbg.jpg b/e107_tests/tests/_data/testkubrick/images/kubrickbg.jpg new file mode 100644 index 000000000..ca66cdc27 Binary files /dev/null and b/e107_tests/tests/_data/testkubrick/images/kubrickbg.jpg differ diff --git a/e107_tests/tests/_data/testkubrick/images/kubrickbgcolor.jpg b/e107_tests/tests/_data/testkubrick/images/kubrickbgcolor.jpg new file mode 100644 index 000000000..b6875ba48 Binary files /dev/null and b/e107_tests/tests/_data/testkubrick/images/kubrickbgcolor.jpg differ diff --git a/e107_tests/tests/_data/testkubrick/images/kubrickbgwide.jpg b/e107_tests/tests/_data/testkubrick/images/kubrickbgwide.jpg new file mode 100644 index 000000000..c8d04ed80 Binary files /dev/null and b/e107_tests/tests/_data/testkubrick/images/kubrickbgwide.jpg differ diff --git a/e107_tests/tests/_data/testkubrick/images/kubrickfooter.jpg b/e107_tests/tests/_data/testkubrick/images/kubrickfooter.jpg new file mode 100644 index 000000000..d47c7a645 Binary files /dev/null and b/e107_tests/tests/_data/testkubrick/images/kubrickfooter.jpg differ diff --git a/e107_tests/tests/_data/testkubrick/images/kubrickheader.jpg b/e107_tests/tests/_data/testkubrick/images/kubrickheader.jpg new file mode 100644 index 000000000..806b363e6 Binary files /dev/null and b/e107_tests/tests/_data/testkubrick/images/kubrickheader.jpg differ diff --git a/e107_tests/tests/_data/testkubrick/images/tileage.jpg b/e107_tests/tests/_data/testkubrick/images/tileage.jpg new file mode 100644 index 000000000..7985fffdd Binary files /dev/null and b/e107_tests/tests/_data/testkubrick/images/tileage.jpg differ diff --git a/e107_tests/tests/_data/testkubrick/index.html b/e107_tests/tests/_data/testkubrick/index.html new file mode 100644 index 000000000..e69de29bb diff --git a/e107_tests/tests/_data/testkubrick/languages/English.php b/e107_tests/tests/_data/testkubrick/languages/English.php new file mode 100644 index 000000000..48d7dad67 --- /dev/null +++ b/e107_tests/tests/_data/testkubrick/languages/English.php @@ -0,0 +1,29 @@ +jalist & Que, Based on original theme by Michael Heilemann (http://binarybonsai.com/kubrick/. )."); +define("LAN_THEME_2", "Comments are turned off for this item"); +define("LAN_THEME_3", "comment: "); +define("LAN_THEME_4", "Read the rest ..."); +define("LAN_THEME_5", "Trackbacks: "); +define('LAN_THEME_6', 'on'); +define('LAN_THEME_7', 'by'); + + +?> \ No newline at end of file diff --git a/e107_tests/tests/_data/testkubrick/preview.jpg b/e107_tests/tests/_data/testkubrick/preview.jpg new file mode 100644 index 000000000..161e88d39 Binary files /dev/null and b/e107_tests/tests/_data/testkubrick/preview.jpg differ diff --git a/e107_tests/tests/_data/testkubrick/style.css b/e107_tests/tests/_data/testkubrick/style.css new file mode 100644 index 000000000..32946ba68 --- /dev/null +++ b/e107_tests/tests/_data/testkubrick/style.css @@ -0,0 +1,463 @@ +/* + Kubrick v1.2.5 for e107 + http://binarybonsai.com/kubrick/ + This theme was designed and built by Michael Heilemann, + whose blog you will find at http://binarybonsai.com/ + The CSS, XHTML and design is released under GPL: + http://www.opensource.org/licenses/gpl-license.php + Maintainer: William Moffett [Que~] +*/ + +/* BEGIN TYPOGRAPHY & COLORS */ +body { + margin: 0; + padding: 0; + font-size: 62.5%; /* Resets 1em to 10px */ + font-family: 'Lucida Grande', Verdana, Arial, Sans-Serif; + color: #333; + text-align: center; + background:#d5d6d7 url("images/kubrickbgcolor.jpg"); +} + +a { + color: #06c; + text-decoration: none; +} + +a:hover { + color: #147; + text-decoration: none; +} + +h1 { + font-size: 4em; +} + +h2 { + font-size: 1.6em; + color: #333; +} + +h3 { + font-size: 1.3em; +} + +h1, h2, h3 { + font-family: 'Trebuchet MS', 'Lucida Grande', Verdana, Arial, Sans-Serif; + font-weight: bold; +} + +td { + background: none; + font-family: tahoma, verdana, arial, helvetica, sans-serif; + font-size: 10px; + font-style: normal; + color:#5d6e75; + padding: 0px; + text-align:left; +} + +acronym, abbr, span.caps { + cursor: help; + } + +acronym, abbr { + border-bottom: 1px dashed #999; + } + +blockquote { + margin: 15px 30px 0 10px; + padding-left: 20px; + border-left: 5px solid #ddd; + } + +blockquote cite { + margin: 5px 0 0; + display: block; + } + +hr { + display: none; + } + +a img { + border: none; + } + +.linkspage_button{ + border:0px; +} + +.hidden{ + display:none; +} + +/* BEGIN LAYOUT */ + +#page { + margin: 20px auto; + padding: 0; + width: 760px; + border: 1px solid #959596; + text-align: left; + background:white url("images/kubrickbg.jpg") repeat-y top; border: none; +} + +#page2 { + margin: 20px auto; + padding: 0; + width: 760px; + border: 1px solid #959596; + text-align: left; + background:white url("images/kubrickbgwide.jpg") repeat-y top; border: none; +} + +#header { + position:relative; + padding: 0; + margin: 0 auto; + height: 200px; + width: 100%; + background: #73a0c5 url("images/kubrickheader.jpg") no-repeat bottom center; +} + +#header h1{ + position:absolute; + top:50px; + left:0px; + width: 100%; + padding: 0; + margin: 0 auto; + font-size: 4em; + text-align: center; +} + +#header h1 a, #header h1 a:hover{ + color:white; +} + +#header h2 { + position:absolute; + top:100px; + left:0px; + width: 100%; + padding: 0; + margin: 0 auto; + font-size: 1.2em; + text-align: center; + color: #ffffff; +} + +/* UL NAVIGATION ADDED BY QUE~ */ + +#navigation{ + font-size: 11px; + width: 694px; + height: 22px; + position: absolute; + top: 178px; + left: 13px; + list-style: none; +} + +#navigation li{ + background: none; + display: inline; +} + +/* END UL NAVIGATION */ + +#content { + margin-top:22px; + font-size: 1.2em +} + +#sidebar{ + +} + +#sidebar { + margin:22px 0px 0px 545px; + padding: 20px 0 10px 0; + width: 190px; + font: 1em 'Lucida Grande', Verdana, Arial, Sans-Serif; +} + +.narrowcolumn { + float: left; + padding: 0 0 20px 45px; + margin: 0px 0 0; + width: 450px; +} + +.widecolumn { + padding: 10px 0 10px 0; + margin: 5px 0 0 5px; + width: 700px; + margin-left: auto; + margin-right: auto; +} + +.narrowcolumn .entry, .widecolumn .entry { + line-height: 1.4em; +} + +.widecolumn { + line-height: 1.6em; +} + +#footer { + padding: 0; + margin: 0 auto; + width: 760px; + clear: both; + background:transparent url("images/kubrickfooter.jpg") bottom left no-repeat; +} + +#footer p { + margin: 0; + padding: 10px 0; + text-align: center; +} + +/* END LAYOUT */ + + +/* BEGIN E107 CORE CLASSES MAINTAINER QUE~ */ + +.button{ + font-family: tahoma, verdana, arial, helvetica, sans-serif; + font-size: 10px; + text-align:center; +} + +.tbox.chatbox { + width: 80%; + margin-left: auto; + margin-right: auto; +} + +.spacer { + padding: 2px 0 2px 0; +} + + +.indent{ + padding:4px; + border: 1px solid #06c; +} + +.smalltext { + font: 1em 'Lucida Grande', Verdana, Arial, Sans-Serif; +} + +.mediumtext { + font: 12px 'Lucida Grande', Verdana, Arial, Sans-Serif; +} + +.tbox{ + background-color: #F4F7FA; + border: #5e5d63 1px solid; + color: #000000; + font: 10px verdana, tahoma, arial, helvetica, sans-serif; +} + +.helpbox { + border: 0px; + background-color: transparent; + color:#000; + font: 9px tahoma, verdana, arial, helvetica, sans-serif; +} + +.fborder { + border: #ededed 1px solid; + background-color: #fff; + +} + +.forumheader{ + background-color: #EBEFF2; + font-family: verdana, tahoma, arial, helvetica, sans-serif; + font-size: 11px; + color:#000; + padding: 4px; + border: 1px solid #ededed; +} + +.forumheader2{ + background-color: #fff; + font-family: verdana, tahoma, arial, helvetica, sans-serif; + font-size: 10px; + color:#000; + padding: 4px; + border: #ededed 1px solid; +} + +.forumheader3{ + background-color: #fff; + font: 9px verdana, tahoma, arial, helvetica, sans-serif; + color:#000; + padding: 4px; + border: #ededed 1px solid; + +} + +.forumborder{ + border: #000080 1px solid; + background-color: transparent; +} + +.fcaption { + height:35px; + border: #ededed 1px solid; + padding: 2px 0 2px 8px; + background-color: #68ADE5; + font: 12px verdana, tahoma, arial, helvetica, sans-serif; + color:#fff; + font-weight:bold; + background-image: url("images/tileage.jpg"); + +} +.fcaption a{ + padding-right:4px; + color:#fff; + +} + +/* "Daisy, Daisy, give me your answer do. I'm half crazy all for the love of you. + It won't be a stylish marriage, I can't afford a carriage. + But you'll look sweet upon the seat of a bicycle built for two." */ + + +/* START NAVIGATION */ + +/* THIS PART IS FOR THE NAVIGATION LINKS */ +.nav1 a:link, .nav1 a:visited, .nav2 a:link, .nav2 a:visited, .nav3 a:link, .nav3 a:visited, .nav4 a:link, .nav4 a:visited, .nav5 a:link, .nav5 a:visited, .nav6 a:link, .nav6 a:visited, .nav7 a:link, .nav7 a:visited, .nav8 a:link, .nav8 a:visited{ + color: #4E4E4E; + width: 80px; + height: 20px; + line-height: 20px; + background: url(images/01_linkbg2.gif) top repeat-y; + padding: 0; + text-align:center; +} + +.nav1_onpage a:link, .nav1_onpage a:visited, .nav2_onpage a:link, .nav2_onpage a:visited, .nav3_onpage a:link, .nav3_onpage a:visited, .nav4_onpage a:link, .nav4_onpage a:visited, .nav5_onpage a:link, .nav5_onpage a:visited, .nav6_onpage a:link, .nav6_onpage a:visited, .nav7_onpage a:link, .nav7_onpage a:visited, .nav8_onpage a:link, .nav8_onpage a:visited{ + color: #4E4E4E; + width: 80px; + height: 20px; + line-height: 20px; + background: url(images/01_linkbg2.gif) top repeat-y; + padding: 0; + text-align:center; +} + +.nav1 a:link, .nav1 a:visited, .nav1_onpage a:link, .nav1_onpage a:visited{ + position: absolute; + top: 2px; + left: 14px; +} + +.nav2 a:link, .nav2 a:visited, .nav2_onpage a:link, .nav2_onpage a:visited{ + position: absolute; + top: 2px; + left: 96px; +} +.nav3 a:link, .nav3 a:visited, .nav3_onpage a:link, .nav3_onpage a:visited{ + position: absolute; + top: 2px; + left: 178px; +} + +.nav4 a:link, .nav4 a:visited, .nav4_onpage a:link, .nav4_onpage a:visited{ + position: absolute; + top: 2px; + left: 260px; +} + +.nav5 a:link, .nav5 a:visited, .nav5_onpage a:link, .nav5_onpage a:visited{ + position: absolute; + top: 2px; + left: 342px; +} + +.nav6 a:link, .nav6 a:visited, .nav6_onpage a:link, .nav6_onpage a:visited{ + position: absolute; + top: 2px; + left: 424px; +} + +.nav7 a:link, .nav7 a:visited, .nav7_onpage a:link, .nav7_onpage a:visited{ + position: absolute; + top: 2px; + left: 506px; +} + +.nav8 a:link, .nav8 a:visited, .nav8_onpage a:link, .nav8_onpage a:visited{ + position: absolute; + top: 2px; + left: 588px; +} + +/* HOVER EFFECTS */ + +.nav1 a:hover, .nav1 a:active, +.nav2 a:hover, .nav2 a:active, +.nav3 a:hover, .nav3 a:active, +.nav4 a:hover, .nav4 a:active, +.nav5 a:hover, .nav5 a:active, +.nav6 a:hover, .nav6 a:active, +.nav7 a:hover, .nav7 a:active, +.nav8 a:hover, .nav8 a:active{ + background: url(images/01_linkbg1.gif) top repeat-y; + margin: 1px 0 0 0; +} + +/* USE A DIFFERENT COLOR WHEN USER IS ON THAT PAGE */ + +.nav1_onpage a:link, .nav1_onpage a:visited, +.nav2_onpage a:link, .nav2_onpage a:visited, +.nav3_onpage a:link, .nav3_onpage a:visited, +.nav4_onpage a:link, .nav4_onpage a:visited, +.nav5_onpage a:link, .nav5_onpage a:visited, +.nav6_onpage a:link, .nav6_onpage a:visited, +.nav7_onpage a:link, .nav7_onpage a:visited, +.nav8_onpage a:link, .nav8_onpage a:visited{ + background: url(images/01_linkbg1.gif) top repeat-y; +} + +/* END NAVIGATION */ + +/* NICETITLE ADDED BY QUE~*/ + +.nicetitle { + font-weight: bold; + color: #3C3C3C; + text-align: left; + position: absolute; + left: 0; + top: 0; + width: 35em; + z-index: 20; + max-width: 60%; +} +.nicetitle-content{ + overflow: hidden; + background: white; + border: 1px solid #333; + padding: 7px; + opacity: 0.9; +} +.nicetitle p{ + margin: 0; + line-height: 120%; +} +.nicetitle p.destination { + font-weight: normal; + font-size: 10px; + color: #5E7743; +} +div.nicetitle p span.accesskey { + color: #FF7200; +} + diff --git a/e107_tests/tests/_data/testkubrick/theme.js b/e107_tests/tests/_data/testkubrick/theme.js new file mode 100644 index 000000000..a96349038 --- /dev/null +++ b/e107_tests/tests/_data/testkubrick/theme.js @@ -0,0 +1,348 @@ +// from http://www.kryogenix.org +// by Scott Andrew - http://scottandrew.com +// add an eventlistener to browsers that can do it somehow. +function addEvent(obj, evType, fn) + { + if (obj.addEventListener) + { + obj.addEventListener(evType, fn, false); + return true; + } + else if (obj.attachEvent) + { + var r = obj.attachEvent('on'+evType, fn); + return r; + } + else + { + return false; + } + } + + +// Force IE not to show alternate text as tooltip +function noAltTooltip() + { + images = document.getElementsByTagName('img'); + for (var i = 0; i < images.length; i++) + { + var title = images[i].getAttribute('title'); + var alt = images[i].getAttribute('alt'); + if ((document.all) && (alt) && (!title)) + { + images[i].setAttribute('title', ''); + } + } + } + +// Nice Titles + +// original code by Stuart Langridge 2003-11 +// with additions to the code by other good people +// http://www.kryogenix.org/code/browser/nicetitle/ +// thank you, sir + +// modified by Peter Janes 2003-03-25 +// http://peterjanes.ca/blog/archives/2003/03/25/nicetitles-for-ins-and-del +// added in ins and del tags + +// modified by Dunstan Orchard 2003-11-18 +// http://1976design.com/blog/ +// added in accesskey information +// tried ever-so-hard, but couldn't work out how to do what Ethan did + +// final genius touch by by Ethan Marcotte 2003-11-18 +// http://www.sidesh0w.com/ +// worked out how to delay showing the popups to make them more like the browser's own + +// set the namespace +var XHTMLNS = 'http://www.w3.org/1999/xhtml'; +var CURRENT_NICE_TITLE; + +// browser sniff +var browser = new Browser(); + +// determine browser and version. +function Browser() + { + var ua, s, i; + + this.isIE = false; + this.isNS = false; + this.version = null; + + ua = navigator.userAgent; + + s = 'MSIE'; + if ((i = ua.indexOf(s)) >= 0) + { + this.isIE = true; + this.version = parseFloat(ua.substr(i + s.length)); + return; + } + + s = 'Netscape6/'; + if ((i = ua.indexOf(s)) >= 0) + { + this.isNS = true; + this.version = parseFloat(ua.substr(i + s.length)); + return; + } + + // treat any other 'Gecko' browser as NS 6.1. + s = 'Gecko'; + if ((i = ua.indexOf(s)) >= 0) + { + this.isNS = true; + this.version = 6.1; + return; + } + } + +// 2003-11-19 sidesh0w +// set delay vars to emulate normal hover delay +var delay; +var interval = 0.60; + +// this function runs on window load +// it runs through all the links on the page as starts listening for actions +function makeNiceTitles() + { + if (!document.createElement || !document.getElementsByTagName) return; + if (!document.createElementNS) + { + document.createElementNS = function(ns, elt) + { + return document.createElement(elt); + } + } + + // do regular links + if (!document.links) + { + document.links = document.getElementsByTagName('a'); + } + for (var ti=0; ti STD_WIDTH) + { + w = h_pixels; + } + else if ((STD_WIDTH>t_pixels) && (t_pixels>h_pixels)) + { + w = t_pixels; + } + else if ((STD_WIDTH>t_pixels) && (h_pixels>t_pixels)) + { + w = h_pixels; + } + else + { + w = STD_WIDTH; + } + + d.style.width = w + 'px'; + + mpos = findPosition(lnk); + mx = mpos[0]; + my = mpos[1]; + + d.style.left = (mx+15) + 'px'; + d.style.top = (my+35) + 'px'; + + if (window.innerWidth && ((mx+w) > window.innerWidth)) + { + d.style.left = (window.innerWidth - w - 25) + 'px'; + } + if (document.body.scrollWidth && ((mx+w) > document.body.scrollWidth)) + { + d.style.left = (document.body.scrollWidth - w - 25) + 'px'; + } + + document.getElementsByTagName('body')[0].appendChild(d); + + CURRENT_NICE_TITLE = d; + } + +function hideNiceTitle(e) + { + // 2003-11-19 sidesh0w + // clearTimeout + if (delay) clearTimeout(delay); + if (!document.getElementsByTagName) return; + if (CURRENT_NICE_TITLE) + { + document.getElementsByTagName('body')[0].removeChild(CURRENT_NICE_TITLE); + CURRENT_NICE_TITLE = null; + } + } +addEvent(window, "load", noAltTooltip); +addEvent(window, "load", makeNiceTitles); + diff --git a/e107_tests/tests/_data/testkubrick/theme.php b/e107_tests/tests/_data/testkubrick/theme.php new file mode 100644 index 000000000..d88b4ebf2 --- /dev/null +++ b/e107_tests/tests/_data/testkubrick/theme.php @@ -0,0 +1,147 @@ +This theme is intended for minimilist blog sites."; +define("STANDARDS_MODE", TRUE); +$xhtmlcompliant = TRUE; +$csscompliant = TRUE; +define("IMODE", "lite"); +define("THEME_DISCLAIMER", "
    ".LAN_THEME_1.""); + +if(!defined("e_THEME")){ exit; } + +$register_sc[]= "UL"; // register shortcode ul.sc for inclusion. + +// [layout] + +$layout = "_default"; + +$HEADER = "
    + +
    "; + +$FOOTER = " +
    + +
    + +
    +"; + +$CUSTOMHEADER = "
    + +
    "; + + +$CUSTOMFOOTER = " +
    +
    + +
    +"; + +$CUSTOMPAGES = "forum.php forum_post.php forum_viewforum.php forum_viewtopic.php user.php submitnews.php download.php links.php stats.php usersettings.php signup.php"; + +$NEWSSTYLE = " +

    {NEWSTITLE}

    +".LAN_THEME_6." {NEWSDATE} | ".LAN_THEME_7." {NEWSAUTHOR} +
    +{NEWSBODY} +{EXTENDED} +
    +
    +{NEWSCOMMENTS}{TRACKBACK} +
    +
    "; +define("ICONSTYLE", "float: left; border:0"); +define("COMMENTLINK", LAN_THEME_3); +define("COMMENTOFFSTRING", LAN_THEME_2); +define("PRE_EXTENDEDSTRING", "

    [ "); +define("EXTENDEDSTRING", LAN_THEME_4); +define("POST_EXTENDEDSTRING", " ]
    "); +define("TRACKBACKSTRING", LAN_THEME_5); +define("TRACKBACKBEFORESTRING", " | "); + + +// [linkstyle] + +define('PRELINK', ""); +define('POSTLINK', ""); +define('LINKSTART', ""); +define('LINKEND', ""); +define('LINKDISPLAY', 1); +define('LINKALIGN', "left"); +define('LINKCLASS', ""); + +// [tablestyle] + +function tablestyle($caption, $text, $mode) +{ + echo "

    $caption

    \n
    $text

    \n"; +} + +$COMMENTSTYLE = " + + + + + +
    {USERNAME}
    {TIMEDATE}
    {AVATAR}{REPLY}
    {COMMENT} {COMMENTEDIT}
    "; + + +$CHATBOXSTYLE = " + +{USERNAME} +
    +{MESSAGE} +
    +
    "; + +?> \ No newline at end of file diff --git a/e107_tests/tests/_data/testkubrick/ul.sc b/e107_tests/tests/_data/testkubrick/ul.sc new file mode 100644 index 000000000..99536f0df --- /dev/null +++ b/e107_tests/tests/_data/testkubrick/ul.sc @@ -0,0 +1,43 @@ +global $sql, $link_class, $page,$tp; + +$sql -> db_Select('links', '*', "link_category = 1 and link_parent =0 and link_class IN (".USERCLASS_LIST.") ORDER BY link_order ASC"); +//$ulmenu = PRELINK."
      "; // Leaf +$ulmenu = "\n".POSTLINK; // Leaf +$ulmenu .= "
    "; // Kubrick +return $ulmenu; \ No newline at end of file diff --git a/e107_tests/tests/_data/unserializeTest.log b/e107_tests/tests/_data/unserializeTest.log new file mode 100644 index 000000000..529f423d8 --- /dev/null +++ b/e107_tests/tests/_data/unserializeTest.log @@ -0,0 +1,3 @@ +array ( + \'email_password\' => \'$2y$10$mZs/7TJDQDS9PelsmcWZNO7Fs7hSezS1J9/wdmLRPNuFOIzjKY4Wq\', +) \ No newline at end of file diff --git a/e107_tests/tests/_data/unserializeTest2.log b/e107_tests/tests/_data/unserializeTest2.log new file mode 100644 index 000000000..d4b950e54 --- /dev/null +++ b/e107_tests/tests/_data/unserializeTest2.log @@ -0,0 +1,24 @@ +array ( +'e_url_list' => + array ( + 'contact' => 'contact', + 'faqs' => 'faqs', + 'news' => 'news', + 'orders' => 'orders', + 'vstore' => 'vstore', + ), + 'lw_page_visibility' => '', + 'lw_ajax_enable' => '', + 'lw_context_visibility' => 'array ( + \'OLDDEFAULT\' => \'\', + \'TITLE\' => \'\', + \'SUMMARY\' => 1, + \'BODY\' => 1, + \'DESCRIPTION\'=> 1, + \'USER_TITLE\' => \'\', + \'USER_BODY\' => 1, + \'LINKTEXT\' => \'\', + \'RAWTEXT\' => \'\' + )', + 'e_tohtml_list' => '', +) \ No newline at end of file diff --git a/e107_tests/tests/_support/AcceptanceTester.php b/e107_tests/tests/_support/AcceptanceTester.php new file mode 100644 index 000000000..4c7dcbb6d --- /dev/null +++ b/e107_tests/tests/_support/AcceptanceTester.php @@ -0,0 +1,26 @@ +deployer->unlinkAppFile("e107_config.php"); + } +} diff --git a/e107_tests/tests/_support/Helper/Base.php b/e107_tests/tests/_support/Helper/Base.php new file mode 100644 index 000000000..8a29a54a7 --- /dev/null +++ b/e107_tests/tests/_support/Helper/Base.php @@ -0,0 +1,64 @@ +getModule('\Helper\DelayedDb'); + } + + public function getBrowserModule() + { + return $this->getModule('PhpBrowser'); + } + + public function _beforeSuite($settings = array()) + { + $this->deployer = \DeployerFactory::create(); + $this->deployer->setComponents($this->deployer_components); + + $this->deployer->start(); + $this->_callbackDeployerStarted(); + + foreach ($this->getModules() as $module) + { + if (!$module instanceof $this) + { + $module->_beforeSuite(); + } + } + } + + public function _afterSuite() + { + $this->deployer->stop(); + } + + protected function _callbackDeployerStarted() + { + foreach ($this->deployer_components as $component) + { + $method = "reconfigure_${component}"; + if (method_exists($this->deployer, $method)) + { + $this->deployer->$method($this); + } + } + } + + public function _before(\Codeception\TestCase $test = null) + { + $this->_callbackDeployerStarted(); + } +} diff --git a/e107_tests/tests/_support/Helper/DelayedDb.php b/e107_tests/tests/_support/Helper/DelayedDb.php new file mode 100644 index 000000000..242c852b9 --- /dev/null +++ b/e107_tests/tests/_support/Helper/DelayedDb.php @@ -0,0 +1,54 @@ +config['dsn'], $matches); + if (!$matched) + { + return false; + } + + return $matches[1]; + } + + public function _getDbName() + { + $matches = []; + $matched = preg_match('~dbname=([^;]+)~s', $this->config['dsn'], $matches); + if (!$matched) + { + return false; + } + + return $matches[1]; + } + + public function _getDbUsername() + { + return $this->config['user']; + } + + public function _getDbPassword() + { + return $this->config['password']; + } +} diff --git a/e107_tests/tests/_support/Helper/E107Base.php b/e107_tests/tests/_support/Helper/E107Base.php new file mode 100644 index 000000000..3db26f372 --- /dev/null +++ b/e107_tests/tests/_support/Helper/E107Base.php @@ -0,0 +1,83 @@ +preparer = PreparerFactory::create(); + } + + public function _beforeSuite($settings = array()) + { + $this->backupLocalE107Config(); + $this->preparer->snapshot(); + parent::_beforeSuite($settings); + $this->writeLocalE107Config(); + } + + protected function backupLocalE107Config() + { + if(file_exists(self::APP_PATH_E107_CONFIG)) + { + rename(self::APP_PATH_E107_CONFIG, APP_PATH.'/e107_config.php.bak'); + } + } + + protected function writeLocalE107Config() + { + $twig_loader = new ArrayLoader([ + 'e107_config.php' => file_get_contents(codecept_data_dir()."/e107_config.php.sample") + ]); + $twig = new Environment($twig_loader); + + $db = $this->getModule('\Helper\DelayedDb'); + + $e107_config = []; + $e107_config['mySQLserver'] = $db->_getDbHostname(); + $e107_config['mySQLuser'] = $db->_getDbUsername(); + $e107_config['mySQLpassword'] = $db->_getDbPassword(); + $e107_config['mySQLdefaultdb'] = $db->_getDbName(); + $e107_config['mySQLprefix'] = self::E107_MYSQL_PREFIX; + + $e107_config_contents = $twig->render('e107_config.php', $e107_config); + file_put_contents(self::APP_PATH_E107_CONFIG, $e107_config_contents); + } + + public function _afterSuite() + { + parent::_afterSuite(); + $this->revokeLocalE107Config(); + $this->preparer->rollback(); + $this->restoreLocalE107Config(); + } + + protected function revokeLocalE107Config() + { + if (file_exists(self::APP_PATH_E107_CONFIG)) + unlink(self::APP_PATH_E107_CONFIG); + } + + protected function restoreLocalE107Config() + { + if(file_exists(APP_PATH."/e107_config.php.bak")) + { + rename(APP_PATH.'/e107_config.php.bak', self::APP_PATH_E107_CONFIG); + } + } + +} diff --git a/e107_tests/tests/_support/Helper/Functional.php b/e107_tests/tests/_support/Helper/Functional.php new file mode 100644 index 000000000..d62999ec6 --- /dev/null +++ b/e107_tests/tests/_support/Helper/Functional.php @@ -0,0 +1,10 @@ +unlinkE107ConfigFromTestEnvironment(); + $this->dropAllDbTables($I); + } + + public function _after(AcceptanceTester $I) + { + } + + // tests + public function installWelcomePageContainsExpectedContent(AcceptanceTester $I) + { + $I->amOnPage('/install.php'); + $I->see("e107 Installation :: Step 1"); + $I->see("Language Selection"); + } + + public function installDefault(AcceptanceTester $I) + { + $I->wantTo("Install e107 with default settings"); + $this->installe107($I); + $this->checkAdminButtonWelcomeMessage($I); + $this->testNoUpdatesRequired($I); + $this->checkTinyMceIsInstalled($I); + + } + + public function installBootstrap3(AcceptanceTester $I) + { + $I->wantTo("Install e107 with bootstrap3"); + $this->installe107($I, array('sitetheme'=>'bootstrap3')); + $this->checkAdminButtonWelcomeMessage($I); + $this->testNoUpdatesRequired($I); + $this->checkTinyMceIsInstalled($I); + + // Check install.xml Custom Fields in Page table. + $I->amOnPage('/page.php?id=4'); + $I->see("22 Aug 2018"); + $I->see("United States"); + $I->see("Blue"); + + } + + public function installLandingZero(AcceptanceTester $I) + { + $I->wantTo("Install e107 with landingzero"); + $this->installe107($I, array('sitetheme'=>'landingzero')); + $this->checkAdminButtonWelcomeMessage($I); + $this->testNoUpdatesRequired($I); + $this->checkTinyMceIsInstalled($I); + + } + + private function installe107(AcceptanceTester $I, $params = array()) + { + // Step 1 + + $I->amOnPage('/install.php'); + $I->selectOption("language", 'English'); + $I->click('start'); + + // Step 2 + + $I->see("MySQL Server Details", 'h3'); + + $db = $I->getDbModule(); + + $I->fillField('server', $db->_getDbHostname()); + $I->fillField('name', $db->_getDbUsername()); + $I->fillField('password', $db->_getDbPassword()); + $I->fillField('db', $db->_getDbName()); + + $I->uncheckOption('createdb'); + $I->click('submit'); + + // Step 3 + + $I->see("MySQL Connection Verification", 'h3'); + $I->see("Connection to the MySQL server established and verified"); + $I->see("Found existing database"); + + $I->click('submit'); + + // Step 4 + + $I->see("PHP and MySQL Versions Check / File Permissions Check"); + + try + { + $I->see('You might have an existing installation'); //XXX Triggered if e107_config.php is not empty + } + catch (Exception $e) + { + $I->dontSee('You might have an existing installation'); + } + + $I->click('continue_install'); + + // Step 5 + + $I->see("Administration", 'h3'); + + $I->fillField('u_name', 'admin'); + $I->fillField('d_name', 'admin'); + $I->fillField('pass1', 'admin'); + $I->fillField('pass2', 'admin'); + $I->fillField('email', 'admin@admin.com'); + + $I->click('submit'); + + // Step 6 + + $I->see("Website Preferences", 'h3'); + $I->fillField('sitename', 'Test Site'); + + if(!empty($params['sitetheme'])) + { + $I->selectOption('sitetheme', $params['sitetheme']); + } + + $I->click('submit'); + + // Step 7 + + $I->see("Install Confirmation", 'h3'); + + $I->click('submit'); + + // Step 8 + + $I->see("Installation Complete", 'h3'); + + + $I->amOnPage('/index.php'); + + if(!empty($params['sitetheme'])) + { + $I->seeInSource('e107_themes/'.$params['sitetheme']); + } + + } + + private function loginToAdmin(AcceptanceTester $I) + { + $I->amOnPage('/e107_admin/admin.php'); + $I->fillField('authname', 'admin'); + $I->fillField('authpass', 'admin'); + $I->click('authsubmit'); + $I->dontSeeInSource('Unauthorized access!'); + } + + private function testNoUpdatesRequired(AcceptanceTester $I) + { + // first Login + $this->loginToAdmin($I); + + $I->amOnPage('/e107_admin/e107_update.php?[debug=basic+]'); + $I->wantTo("Check there are no updates required after install"); + + $I->dontSee("Update", 'button span'); + } + + + private function checkTinyMceIsInstalled(AcceptanceTester $I) + { + $I->amOnPage('/e107_admin/admin.php'); + $I->seeInSource('TinyMce4'); + $I->amOnPage('/e107_plugins/tinymce4/admin_config.php'); + $I->see("Paste as text by default"); + } + + + private function checkAdminButtonWelcomeMessage(AcceptanceTester $I) + { + $I->seeInSource('btn-large " href="e107_admin/admin.php">Go to Admin area'); + + } + + /** + * @param AcceptanceTester $I + */ + private function dropAllDbTables(AcceptanceTester $I) + { + $db = $I->getDbModule(); + $db->_cleanup(); + } + +} diff --git a/e107_tests/tests/acceptance/0001_AdminLoginCest.php b/e107_tests/tests/acceptance/0001_AdminLoginCest.php new file mode 100644 index 000000000..04c45da50 --- /dev/null +++ b/e107_tests/tests/acceptance/0001_AdminLoginCest.php @@ -0,0 +1,123 @@ +wantTo("Test the admin area login process"); + + $this->e107Login($I); + + $I->dontSeeInSource('Unauthorized access!'); + + $I->see("Latest"); + + $I->see("Status"); + + } + + + private function e107Login(AcceptanceTester $I) + { + $I->amOnPage('/e107_admin/admin.php'); + $I->see("Admin Area"); + $I->see("login"); + + $I->fillField('authname', 'admin'); + $I->fillField('authpass', 'admin'); + + $I->click('authsubmit'); + + $I->see("Admin's Control Panel"); + + + + + } + + + public function testAdminURLS(AcceptanceTester $I) + { + + $this->e107Login($I); + + $urls = array( + 'admin.php?[debug=basic+]', + 'cache.php', + 'emoticon.php', + 'frontpage.php', + 'frontpage.php?mode=create', + 'language.php', + 'language.php?mode=main&action=db', + 'language.php?mode=main&action=tools', + 'language.php?mode=main&action=deprecated', + 'meta.php', + 'prefs.php', + 'search.php', + 'search.php?settings', + 'links.php', + 'links.php?mode=main&action=create', + 'links.php?mode=main&action=prefs', + 'links.php?mode=main&action=tools', + 'eurl.php', + 'eurl.php?mode=main&action=alias', + 'eurl.php?mode=main&action=simple', + 'eurl.php?mode=main&action=settings', + 'updateadmin.php', + 'administrator.php', + 'banlist.php', + 'banlist.php?mode=main&action=create', + 'banlist.php?mode=white&action=list', + 'banlist.php?mode=white&action=create', + 'banlist.php?mode=failed&action=list', + 'banlist.php?mode=main&action=transfer', + 'banlist.php?mode=main&action=times', + 'banlist.php?mode=main&action=options', + 'users_extended.php', + 'users_extended.php?mode=main&action=add', + 'users_extended.php?mode=main&action=create', + 'users_extended.php?mode=cat&action=list', + 'users_extended.php?mode=cat&action=create', + 'mailout.php', + 'mailout.php?mode=main&action=create', + 'mailout.php?mode=recipients&action=list', + 'mailout.php?mode=pending&action=list', + 'mailout.php?mode=held&action=list', + 'mailout.php?mode=sent&action=list', + 'mailout.php?mode=prefs&action=prefs', + 'mailout.php?mode=maint&action=maint', + 'mailout.php?mode=main&action=templates', + 'userclass2.php', + 'userclass2.php?mode=main&action=create', + 'userclass2.php?mode=main&action=initial', + 'userclass2.php?mode=main&action=options', + 'users.php', + 'users.php?mode=main&action=add', + 'users.php?mode=main&action=prefs', + 'users.php?mode=ranks&action=list', + 'users.php?mode=main&action=maintenance' + ); + + foreach($urls as $url) + { + $I->amOnPage('/e107_admin/'.$url); + + $I->dontSee("syntax error"); + $I->dontSee("Fatal error"); + } + + } + + +} diff --git a/e107_tests/tests/acceptance/0002_UserSignupCest.php b/e107_tests/tests/acceptance/0002_UserSignupCest.php new file mode 100644 index 000000000..c9473f186 --- /dev/null +++ b/e107_tests/tests/acceptance/0002_UserSignupCest.php @@ -0,0 +1,57 @@ +amOnPage('/login.php'); + $I->fillField('username', 'admin'); + $I->fillField('userpass', 'admin'); + + $I->click('userlogin'); + + $I->see("You are seeing this message because you are currently logged in as the Main Admin"); + + + // Go to signup page. + $I->amOnPage('/signup.php'); + $I->wantTo("Test user signup process"); + + $I->selectOption('coppa',1); + $I->click('newver'); + + + $I->see("You are currently logged in as Main Admin"); + $I->checkOption('simulation'); + + // Fill the form + $I->fillField('loginname', 'user1'); + $I->fillField('email', 'user1@domain.com'); + $I->fillField('password1', 'Password1234'); + $I->fillField('password2', 'Password1234'); + + $I->click('register'); + + $I->dontSee('Unauthorized access!'); + + } + + + + + + // "Admin Approval Pending" + //TODO signup under difference conditions (different prefs).. ie. admin approval required etc. + +} diff --git a/e107_tests/tests/acceptance/0010_ThumbCest.php b/e107_tests/tests/acceptance/0010_ThumbCest.php new file mode 100644 index 000000000..34826dca8 --- /dev/null +++ b/e107_tests/tests/acceptance/0010_ThumbCest.php @@ -0,0 +1,26 @@ +amOnPage('/thumb.php?src=e_PLUGIN%2Fgallery%2Fimages%2Fbutterfly.jpg&w=220&h=190'); + + $I->seeResponseCodeIs(200); + + + } + + +} diff --git a/e107_tests/tests/acceptance/_bootstrap.php b/e107_tests/tests/acceptance/_bootstrap.php new file mode 100644 index 000000000..b3d9bbc7f --- /dev/null +++ b/e107_tests/tests/acceptance/_bootstrap.php @@ -0,0 +1 @@ +assertTrue($res); + } + + public function testVerifyE_SYSTEM_BASE() + { + $res = true; + + if(!defined('e_SYSTEM')) + { + $res = false; + } + elseif(!defined('e_SYSTEM_BASE')) + { + $res = false; + } + elseif(e_SYSTEM_BASE === e_SYSTEM) + { + $res = false; + } + + $this->assertTrue($res); + } + + public function testVerifyE_MEDIA_BASE() + { + $res = true; + + if(!defined('e_MEDIA')) + { + $res = false; + } + elseif(!defined('e_MEDIA_BASE')) + { + $res = false; + } + elseif(e_MEDIA_BASE === e_MEDIA) + { + $res = false; + } + + $this->assertTrue($res); + } + + public function testVerifyE107_INIT() + { + $res = true; + + if(!defined('e107_INIT')) + { + $res = false; + } + + $this->assertTrue($res); + } + + + public function testVerifyUSERCLASS_LIST() + { + $res = true; + + if(!defined('USERCLASS_LIST')) + { + $res = false; + } + + $this->assertTrue($res); + } + + + public function testVerifye_ROOT() + { + $res = true; + + if(!defined('e_ROOT')) + { + $res = false; + } + + $this->assertTrue($res); + + + } + } diff --git a/e107_tests/tests/unit/PathsTest.php b/e107_tests/tests/unit/PathsTest.php new file mode 100644 index 000000000..f4c7c91b2 --- /dev/null +++ b/e107_tests/tests/unit/PathsTest.php @@ -0,0 +1,22 @@ +assertTrue($res); + + } + } diff --git a/e107_tests/tests/unit/TreeModelTest.php b/e107_tests/tests/unit/TreeModelTest.php new file mode 100644 index 000000000..1fce4cf4b --- /dev/null +++ b/e107_tests/tests/unit/TreeModelTest.php @@ -0,0 +1,477 @@ +getMethod('arrayToTree'); + $method->setAccessible(true); + $this->tree = $method->invoke(null, $this->sample_rows, $this->sample_key, $this->sample_parent_key); + } + + protected function _after() + { + } + + // tests + public function testTreeIsAnArray() + { + $this->assertTrue(is_array($this->tree)); + } + + public function testTreeRootNodeIsTheOnlyRootNode() + { + $this->assertEquals(count($this->tree), 1); + } + + public function testTreeRootNodeHasCorrectKeyValuePair() + { + $key = $this->sample_key; + $this->assertArrayHasKey($key, $this->tree[0]); + $this->assertEquals($this->tree[0][$key], 0); + } + + public function testTreeRootNodeHasChildren() + { + $this->assertArrayHasKey('_children', $this->tree[0]); + $this->assertTrue(is_array($this->tree[0]['_children'])); + } + + public function testTreeParentsAreAssignedCorrectly() + { + $key = $this->sample_key; + $parent_key = $this->sample_parent_key; + $l0_id = $this->tree[1][$key]; + $l1_id = $this->tree[1]['_children'][0][$key]; + $l1_parent = $this->tree[1]['_children'][0][$parent_key]; + $l2_id = $this->tree[1]['_children'][0]['_children'][0][$key]; + $l2_parent = $this->tree[1]['_children'][0]['_children'][0][$parent_key]; + + $this->assertEquals($l0_id, $l1_parent); + $this->assertEquals($l1_id, $l2_parent); + } + + public function testTreeValuesAreFlattenedInExpectedOrder() + { + $class = new \ReflectionClass('e_tree_model'); + + $method = $class->getMethod('flattenTree'); + $method->setAccessible(true); + $rows = $method->invoke(null, $this->tree, 'link_order', 1); + + $expected = ['General', 'Home', 'Downloads', 'Members', 'Online Users', + 'Site Stats', 'Submit News', 'Newsfeeds', 'About Us', + 'Contact Us', 'Nodes', 'Main Website', 'My Deltik', + 'x10Deltik', 'Deltik Docs', 'Legacy Deltik Products', + 'Deltik Minecraft Server', 'Register']; + + foreach($expected as $key => $value) + { + $this->assertEquals($value, $rows[$key]['link_name']); + } + + $this->assertEquals(count($expected), count($rows)); + } + + public function testPrepareSimulatedPaginationProcessesCountOnly() + { + $tree_model = $this->make('e_tree_model'); + $tree_model->setParam('db_query', 'ORDER BY n.news_sticky DESC, n.news_datestamp DESC LIMIT 4'); + + $class = new \ReflectionClass(get_class($tree_model)); + $method = $class->getMethod('prepareSimulatedPagination'); + $method->setAccessible(true); + $method->invoke($tree_model); + + $this->assertEquals('ORDER BY n.news_sticky DESC, n.news_datestamp DESC', trim($tree_model->getParam('db_query'))); + $this->assertEquals('4', $tree_model->getParam('db_limit_count')); + $this->assertEmpty($tree_model->getParam('db_limit_offset')); + } + + public function testPrepareSimulatedPaginationProcessesOffsetAndCount() + { + $tree_model = $this->make('e_tree_model'); + $tree_model->setParam('db_query', 'ORDER BY n.news_sticky DESC, n.news_datestamp DESC LIMIT 79,163'); + + $class = new \ReflectionClass(get_class($tree_model)); + $method = $class->getMethod('prepareSimulatedPagination'); + $method->setAccessible(true); + $method->invoke($tree_model); + + $this->assertEquals('ORDER BY n.news_sticky DESC, n.news_datestamp DESC', trim($tree_model->getParam('db_query'))); + $this->assertEquals('163', $tree_model->getParam('db_limit_count')); + $this->assertEquals('79', $tree_model->getParam('db_limit_offset')); + } + + public function testMultiFieldCompareWithSortFieldsReturnsExpectedValues() + { + $tree_model = $this->make('e_tree_model'); + $class = new \ReflectionClass(get_class($tree_model)); + $method = $class->getMethod('multiFieldCmp'); + $method->setAccessible(true); + + $row1 = array( + 'field1' => '0', + 'field2' => '-1', + ); + $row2 = array( + 'field1' => '0', + 'field2' => '1', + ); + $sort_fields = ['field1', 'field2']; + + $result = $method->invoke(null, $row1, $row2, $sort_fields, 1); + $this->assertEquals(-1, $result); + + $row1['field2'] = 1; + $result = $method->invoke(null, $row1, $row2, $sort_fields, 1); + $this->assertEquals(0, $result); + + $row1['field2'] = 2; + $result = $method->invoke(null, $row1, $row2, $sort_fields, 1); + $this->assertEquals(1, $result); + + $row1['field1'] = -1; + $result = $method->invoke(null, $row1, $row2, $sort_fields, 1); + $this->assertEquals(-1, $result); + + $row1['field1'] = 1; + $result = $method->invoke(null, $row1, $row2, $sort_fields, 1); + $this->assertEquals(1, $result); + } + + public function testMultiFieldCompareWithSortFieldReturnsExpectedValues() + { + $tree_model = $this->make('e_tree_model'); + $class = new \ReflectionClass(get_class($tree_model)); + $method = $class->getMethod('multiFieldCmp'); + $method->setAccessible(true); + + $row1 = array( + 'field1' => '0', + 'field2' => '-1', + ); + $row2 = array( + 'field1' => '0', + 'field2' => '1', + ); + $sort_field = 'field1'; + + $result = $method->invoke(null, $row1, $row2, $sort_field, 1); + $this->assertEquals(0, $result); + + $row1['field1'] = -1; + $result = $method->invoke(null, $row1, $row2, $sort_field, 1); + $this->assertEquals(-1, $result); + + $row1['field1'] = 1; + $result = $method->invoke(null, $row1, $row2, $sort_field, 1); + $this->assertEquals(1, $result); + + $row1['field2'] = 1337; + $this->assertEquals(1, $result); + } + + protected $sample_rows = + array( + 0 => + array ( + 'link_id' => '1', + 'link_name' => 'General', + 'link_url' => '/index.php', + 'link_description' => '', + 'link_button' => '{e_IMAGE}icons/icon2.png', + 'link_category' => '1', + 'link_order' => '1', + 'link_parent' => '0', + 'link_open' => '0', + 'link_class' => '0', + 'link_function' => '', + 'link_sefurl' => '', + 'link_owner' => '', + ), + 1 => + array ( + 'link_id' => '99', + 'link_name' => 'Nodes', + 'link_url' => '', + 'link_description' => '', + 'link_button' => 'icon14.png', + 'link_category' => '1', + 'link_order' => '2', + 'link_parent' => '0', + 'link_open' => '0', + 'link_class' => '0', + 'link_function' => '', + 'link_sefurl' => '', + 'link_owner' => '', + ), + 2 => + array ( + 'link_id' => '8', + 'link_name' => 'Register', + 'link_url' => '/signup.php', + 'link_description' => '', + 'link_button' => '{e_IMAGE}icons/deltik-favicon.png', + 'link_category' => '1', + 'link_order' => '3', + 'link_parent' => '0', + 'link_open' => '0', + 'link_class' => '252', + 'link_function' => '', + 'link_sefurl' => '', + 'link_owner' => '', + ), + 3 => + array ( + 'link_id' => '6', + 'link_name' => 'Home', + 'link_url' => '/index.php', + 'link_description' => '', + 'link_button' => '{e_IMAGE}icons/icon18.png', + 'link_category' => '1', + 'link_order' => '1', + 'link_parent' => '1', + 'link_open' => '0', + 'link_class' => '0', + 'link_function' => '', + 'link_sefurl' => '', + 'link_owner' => '', + ), + 4 => + array ( + 'link_id' => '18', + 'link_name' => 'About Us', + 'link_url' => '/page.php?4', + 'link_description' => '', + 'link_button' => '{e_IMAGE}icons/deltik-favicon.png', + 'link_category' => '1', + 'link_order' => '8', + 'link_parent' => '1', + 'link_open' => '0', + 'link_class' => '0', + 'link_function' => '', + 'link_sefurl' => '', + 'link_owner' => '', + ), + 5 => + array ( + 'link_id' => '17', + 'link_name' => 'Newsfeeds', + 'link_url' => '/{e_PLUGIN}newsfeed/newsfeed.php', + 'link_description' => '', + 'link_button' => '{e_IMAGE}icons/html.png', + 'link_category' => '1', + 'link_order' => '7', + 'link_parent' => '1', + 'link_open' => '0', + 'link_class' => '0', + 'link_function' => '', + 'link_sefurl' => '', + 'link_owner' => '', + ), + 6 => + array ( + 'link_id' => '4', + 'link_name' => 'Submit News', + 'link_url' => '/submitnews.php', + 'link_description' => '', + 'link_button' => '{e_IMAGE}icons/icon26.png', + 'link_category' => '1', + 'link_order' => '6', + 'link_parent' => '1', + 'link_open' => '0', + 'link_class' => '0', + 'link_function' => '', + 'link_sefurl' => '', + 'link_owner' => '', + ), + 7 => + array ( + 'link_id' => '16', + 'link_name' => 'Site Stats', + 'link_url' => '/{e_PLUGIN}log/stats.php?1', + 'link_description' => '', + 'link_button' => '{e_IMAGE}icons/icon11.png', + 'link_category' => '1', + 'link_order' => '5', + 'link_parent' => '1', + 'link_open' => '0', + 'link_class' => '0', + 'link_function' => '', + 'link_sefurl' => '', + 'link_owner' => '', + ), + 8 => + array ( + 'link_id' => '7', + 'link_name' => 'Online Users', + 'link_url' => '/online.php', + 'link_description' => '', + 'link_button' => '{e_IMAGE}icons/icon22.png', + 'link_category' => '1', + 'link_order' => '4', + 'link_parent' => '1', + 'link_open' => '0', + 'link_class' => '0', + 'link_function' => '', + 'link_sefurl' => '', + 'link_owner' => '', + ), + 9 => + array ( + 'link_id' => '2', + 'link_name' => 'Downloads', + 'link_url' => '/download.php', + 'link_description' => '', + 'link_button' => '{e_IMAGE}icons/download_32.png', + 'link_category' => '1', + 'link_order' => '2', + 'link_parent' => '1', + 'link_open' => '0', + 'link_class' => '0', + 'link_function' => '', + 'link_sefurl' => '', + 'link_owner' => '', + ), + 10 => + array ( + 'link_id' => '3', + 'link_name' => 'Members', + 'link_url' => '/user.php', + 'link_description' => '', + 'link_button' => '{e_IMAGE}icons/icon20.png', + 'link_category' => '1', + 'link_order' => '3', + 'link_parent' => '1', + 'link_open' => '0', + 'link_class' => '0', + 'link_function' => '', + 'link_sefurl' => '', + 'link_owner' => '', + ), + 11 => + array ( + 'link_id' => '5', + 'link_name' => 'Contact Us', + 'link_url' => '/contact.php', + 'link_description' => '', + 'link_button' => '{e_IMAGE}icons/icon19.png', + 'link_category' => '1', + 'link_order' => '9', + 'link_parent' => '1', + 'link_open' => '0', + 'link_class' => '0', + 'link_function' => '', + 'link_sefurl' => '', + 'link_owner' => '', + ), + 12 => + array ( + 'link_id' => '12', + 'link_name' => 'x10Deltik', + 'link_url' => 'https://x10.deltik.org/', + 'link_description' => 'Deltik Additional Resources Website', + 'link_button' => 'deltik_x10-favicon.png', + 'link_category' => '1', + 'link_order' => '3', + 'link_parent' => '99', + 'link_open' => '0', + 'link_class' => '255', + 'link_function' => '', + 'link_sefurl' => '', + 'link_owner' => '', + ), + 13 => + array ( + 'link_id' => '15', + 'link_name' => 'Deltik Docs', + 'link_url' => 'https://man.deltik.org/', + 'link_description' => 'Manual Pages of Deltik', + 'link_button' => 'deltik_docs-favicon.png', + 'link_category' => '1', + 'link_order' => '4', + 'link_parent' => '99', + 'link_open' => '0', + 'link_class' => '255', + 'link_function' => '', + 'link_sefurl' => '', + 'link_owner' => '', + ), + 14 => + array ( + 'link_id' => '14', + 'link_name' => 'Legacy Deltik Products', + 'link_url' => 'https://products.deltik.org/', + 'link_description' => 'Legacy Deltik Products', + 'link_button' => 'deltik_products-favicon.png', + 'link_category' => '1', + 'link_order' => '5', + 'link_parent' => '99', + 'link_open' => '0', + 'link_class' => '0', + 'link_function' => '', + 'link_sefurl' => '', + 'link_owner' => '', + ), + 15 => + array ( + 'link_id' => '11', + 'link_name' => 'My Deltik', + 'link_url' => 'https://my.deltik.org/', + 'link_description' => 'User Control Panel for all of Deltik's Features', + 'link_button' => 'deltik_my-favicon.png', + 'link_category' => '1', + 'link_order' => '2', + 'link_parent' => '99', + 'link_open' => '0', + 'link_class' => '255', + 'link_function' => '', + 'link_sefurl' => '', + 'link_owner' => '', + ), + 16 => + array ( + 'link_id' => '13', + 'link_name' => 'Deltik Minecraft Server', + 'link_url' => 'https://mc.deltik.org/', + 'link_description' => 'Deltik Minecraft Server', + 'link_button' => 'deltik_mc-favicon.png', + 'link_category' => '1', + 'link_order' => '6', + 'link_parent' => '99', + 'link_open' => '0', + 'link_class' => '0', + 'link_function' => '', + 'link_sefurl' => '', + 'link_owner' => '', + ), + 17 => + array ( + 'link_id' => '10', + 'link_name' => 'Main Website', + 'link_url' => 'https://www.deltik.org/', + 'link_description' => 'The Official Deltik Website', + 'link_button' => 'deltik-favicon.png', + 'link_category' => '1', + 'link_order' => '1', + 'link_parent' => '99', + 'link_open' => '0', + 'link_class' => '0', + 'link_function' => '', + 'link_sefurl' => '', + 'link_owner' => '', + ), + ); +} diff --git a/e107_tests/tests/unit/UserHandlerTest.php b/e107_tests/tests/unit/UserHandlerTest.php new file mode 100644 index 000000000..80d98e841 --- /dev/null +++ b/e107_tests/tests/unit/UserHandlerTest.php @@ -0,0 +1,155 @@ +usr = $this->make('UserHandler'); + } + catch(Exception $e) + { + $this->assertTrue(false, "Couldn't load UserHandler object"); + } + + } + +/* + public function testCheckPassword() + { + + } + + public function testDeleteExpired() + { + + } + + public function testIsPasswordRequired() + { + + } + + public function testAddCommonClasses() + { + + } + + public function test__construct() + { + + } + + public function testResetPassword() + { + + } + + public function testMakeUserCookie() + { + + } + + public function testUserValidation() + { + + } + + public function testConvertPassword() + { + + } + + public function testHasReadonlyField() + { + + } + + public function testRehashPassword() + { + + } + + public function testNeedEmailPassword() + { + + } + + public function testHashPassword() + { + + } + + public function testCanConvert() + { + + } + + public function testCheckCHAP() + { + + } + + public function testUserClassUpdate() + { + + } + + public function testGetHashType() + { + + } + + public function testGenerateUserLogin() + { + + } + + public function testGenerateRandomString() + { + + } + + public function testGetDefaultHashType() + { + + } + + public function testPasswordAPIExists() + { + + } + + public function testAddNonDefaulted() + { + + } + + public function testGetNiceNames() + { + + } + + public function testUserStatusUpdate() + { + + } + +*/ + + } diff --git a/e107_tests/tests/unit/_bootstrap.php b/e107_tests/tests/unit/_bootstrap.php new file mode 100644 index 000000000..b3d9bbc7f --- /dev/null +++ b/e107_tests/tests/unit/_bootstrap.php @@ -0,0 +1 @@ +ep = $this->make('${TESTED_NAME}'); + } catch(Exception $e) + { + $this->assertTrue(false, "Couldn't load ${TESTED_NAME} object"); + }*/ + + } + + + function testGetPerms() + { + + $result = getperms('N', '0'); + $this->assertTrue($result); + + $result = getperms('N', '0.'); + $this->assertTrue($result); + + $result = getperms('U1|U2', '0.'); + $this->assertTrue($result); + + } + + + + function testCheckClass() + { + + $result = check_class(0, "253,254,250,251,0"); + $this->assertTrue($result); + + $result = check_class(254, "253,254,250,251,0"); + $this->assertTrue($result); + + $result = check_class('0', "253,254,250,251,0"); + $this->assertTrue($result); + + $result = check_class(null, "253,254,250,251,0"); + $this->assertFalse($result); + + $result = check_class(e_UC_NOBODY, "253,254,250,251,0"); + $this->assertFalse($result); + + } + + + + function testCheckEmail() + { + $result = check_email("test@somewhere.com"); // good email. + $this->assertEquals('test@somewhere.com', $result); + + $result = check_email("test@somewherecom"); // Missing . + $this->assertFalse($result); + + $result = check_email("test@somewhere.technology"); // New TLDs + $this->assertEquals('test@somewhere.technology',$result); + + } + + + + + + } diff --git a/e107_tests/tests/unit/core_functionsTest.php b/e107_tests/tests/unit/core_functionsTest.php new file mode 100644 index 000000000..5a167bfa6 --- /dev/null +++ b/e107_tests/tests/unit/core_functionsTest.php @@ -0,0 +1,56 @@ + array ( 0 => '/e107v2/e107_admin/banlist.php', 1 => 'Banlist', 2 => 'Ban visitors' ), + 2 => array ( 0 => '/e107v2/e107_admin/updateadmin.php', 1 => 'Admin password', 2 => 'Change your password' ), + 3 => array ( 0 => '/e107v2/e107_admin/administrator.php', 1 => 'Administrators', 2 => 'Add/delete site administrators' ), + 4 => array ( 0 => '/e107v2/e107_admin/cache.php', 1 => 'Cache', 2 => 'Set cache status') + ); + + $expected = array ( + 0 => array ( 0 => '/e107v2/e107_admin/updateadmin.php', 1 => 'Admin password', 2 => 'Change your password'), + 1 => array ( 0 => '/e107v2/e107_admin/administrator.php', 1 => 'Administrators', 2 => 'Add/delete site administrators'), + 2 => array ( 0 => '/e107v2/e107_admin/banlist.php', 1 => 'Banlist', 2 => 'Ban visitors' ), + 3 => array ( 0 => '/e107v2/e107_admin/cache.php', 1 => 'Cache', 2 => 'Set cache status' ), + ); + + $result = asortbyindex($array,1); + + $this->assertEquals($expected,$result); + + + + + + } + + + + + + + } diff --git a/e107_tests/tests/unit/db_verifyTest.php b/e107_tests/tests/unit/db_verifyTest.php new file mode 100644 index 000000000..cc7d2ad02 --- /dev/null +++ b/e107_tests/tests/unit/db_verifyTest.php @@ -0,0 +1,890 @@ +dbv = $this->make('db_verify'); + } + catch (Exception $e) + { + $this->fail("Couldn't load db_verify object"); + } + + $this->dbv->__construct(); + } + + public function testGetFields() + { + $data = "table_id int(10) unsigned NOT NULL auto_increment, + table_name varchar(100) NOT NULL default '', + table_email varchar(100) NOT NULL default '', + table_user int(10) unsigned NOT NULL default '0', + table_title varchar(200) NOT NULL default '', + table_category tinyint(3) unsigned NOT NULL default '0', + table_json JSON NOT NULL, + table_item text NOT NULL, + table_datestamp int(10) unsigned NOT NULL default '0', + table_ip varchar(45) NOT NULL default '', + table_auth tinyint(3) unsigned NOT NULL default '0', + table_file text NOT NULL, + table_keywords varchar(255) NOT NULL default '', + table_description text, + table_summary text, + table_media text, + PRIMARY KEY (table_id)"; + + $expected = array ( + 'table_id' => + array ( + 'type' => 'INT', + 'value' => '10', + 'attributes' => 'UNSIGNED', + 'null' => 'NOT NULL', + 'default' => 'AUTO_INCREMENT', + ), + 'table_name' => + array ( + 'type' => 'VARCHAR', + 'value' => '100', + 'attributes' => '', + 'null' => 'NOT NULL', + 'default' => 'DEFAULT \'\'', + ), + 'table_email' => + array ( + 'type' => 'VARCHAR', + 'value' => '100', + 'attributes' => '', + 'null' => 'NOT NULL', + 'default' => 'DEFAULT \'\'', + ), + 'table_user' => + array ( + 'type' => 'INT', + 'value' => '10', + 'attributes' => 'UNSIGNED', + 'null' => 'NOT NULL', + 'default' => 'DEFAULT \'0\'', + ), + 'table_title' => + array ( + 'type' => 'VARCHAR', + 'value' => '200', + 'attributes' => '', + 'null' => 'NOT NULL', + 'default' => 'DEFAULT \'\'', + ), + 'table_category' => + array ( + 'type' => 'TINYINT', + 'value' => '3', + 'attributes' => 'UNSIGNED', + 'null' => 'NOT NULL', + 'default' => 'DEFAULT \'0\'', + ), + 'table_json' => + array ( + 'type' => 'JSON', + 'value' => '', + 'attributes' => '', + 'null' => 'NOT NULL', + 'default' => '', + ), + 'table_item' => + array ( + 'type' => 'TEXT', + 'value' => '', + 'attributes' => '', + 'null' => 'NOT NULL', + 'default' => '', + ), + 'table_datestamp' => + array ( + 'type' => 'INT', + 'value' => '10', + 'attributes' => 'UNSIGNED', + 'null' => 'NOT NULL', + 'default' => 'DEFAULT \'0\'', + ), + 'table_ip' => + array ( + 'type' => 'VARCHAR', + 'value' => '45', + 'attributes' => '', + 'null' => 'NOT NULL', + 'default' => 'DEFAULT \'\'', + ), + 'table_auth' => + array ( + 'type' => 'TINYINT', + 'value' => '3', + 'attributes' => 'UNSIGNED', + 'null' => 'NOT NULL', + 'default' => 'DEFAULT \'0\'', + ), + 'table_file' => + array ( + 'type' => 'TEXT', + 'value' => '', + 'attributes' => '', + 'null' => 'NOT NULL', + 'default' => '', + ), + 'table_keywords' => + array ( + 'type' => 'VARCHAR', + 'value' => '255', + 'attributes' => '', + 'null' => 'NOT NULL', + 'default' => 'DEFAULT \'\'', + ), + 'table_description' => + array ( + 'type' => 'TEXT', + 'value' => '', + 'attributes' => '', + 'null' => '', + 'default' => '', + ), + 'table_summary' => + array ( + 'type' => 'TEXT', + 'value' => '', + 'attributes' => '', + 'null' => '', + 'default' => '', + ), + 'table_media' => + array ( + 'type' => 'TEXT', + 'value' => '', + 'attributes' => '', + 'null' => '', + 'default' => '', + ), + ); + + $actual = $this->dbv->getFields($data); + $this->assertEquals($expected,$actual); + + + + } +/* + public function testClearCache() + { + + } + + public function testRenderNotes() + { + + } + + public function testCompareAll() + { + + } + + public function testRenderTableName() + { + + } + + public function testGetId() + { + + } + + public function testGetSqlData() + { + + } +*/ + public function testGetIndex() + { + + $data = "`schedule_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `schedule_cust_id` int(11) NOT NULL, + `schedule_complete` int(1) unsigned NOT NULL DEFAULT 0, + PRIMARY KEY (`schedule_id`), + UNIQUE KEY `schedule_cust_id` (`schedule_cust_id`), + KEY `schedule_invoice_id` (`schedule_invoice_id`)"; + + $expected = array( + 'schedule_id' => + array( + 'type' => 'PRIMARY', + 'keyname' => 'schedule_id', + 'field' => 'schedule_id', + ), + 'schedule_cust_id' => + array( + 'type' => 'UNIQUE', + 'keyname' => 'schedule_cust_id', + 'field' => 'schedule_cust_id', + ), + 'schedule_invoice_id' => + array( + 'type' => '', + 'keyname' => 'schedule_invoice_id', + 'field' => 'schedule_invoice_id', + ), + ); + + + $result = $this->dbv->getIndex($data); + $this->assertEquals($expected,$result); + } + + public function testCompare() + { + + e107::getDb()->gen('ALTER TABLE `#submitnews` CHANGE `submitnews_id` `submitnews_id` INT(10) UNSIGNED NOT NULL;'); + e107::getDb()->gen('ALTER TABLE `#submitnews` DROP INDEX submitnews_id;'); + + define('e_DEBUG', true); + + $this->dbv->__construct(); + + // print_r($this->dbv->sqlFileTables); + + $this->dbv->compare('core'); + $this->dbv->compileResults(); + + + //FIXME + + // print_r($this->dbv->errors); + // print_r($this->dbv->results['submitnews']); + // print_r($this->dbv->indices['submitnews']); + // print_r($this->dbv->results); + } + + + public function testGetFixQuery() + { + + $sqlFileData = "table_id int(10) unsigned NOT NULL auto_increment, + table_name varchar(100) NOT NULL default '', + table_email varchar(100) NOT NULL default '', + table_user int(10) unsigned NOT NULL default '0', + table_title varchar(200) NOT NULL default '', + table_category tinyint(3) unsigned NOT NULL default '0', + table_json JSON NOT NULL, + table_item text NOT NULL, + table_datestamp int(10) unsigned NOT NULL default '0', + table_ip varchar(45) NOT NULL default '', + table_auth tinyint(3) unsigned NOT NULL default '0', + table_file text NOT NULL, + table_keywords varchar(255) NOT NULL default '', + table_description text, + table_summary text, + table_media text, + PRIMARY KEY (table_id) + UNIQUE KEY `table_email` (`table_email`), + KEY `table_user` (`table_user`) + "; + + $actual = $this->dbv->getFixQuery('alter', 'table', 'table_ip', $sqlFileData); + $expected = "ALTER TABLE `e107_table` CHANGE `table_ip` `table_ip` VARCHAR(45) NOT NULL DEFAULT ''"; + $this->assertEquals($expected,$actual); + + + $actual = $this->dbv->getFixQuery('insert', 'table', 'table_auth', $sqlFileData); + $expected = "ALTER TABLE `e107_table` ADD `table_auth` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0' AFTER table_ip"; + $this->assertEquals($expected,$actual); + + $actual = $this->dbv->getFixQuery('insert', 'table', 'table_json', $sqlFileData); + $expected = "ALTER TABLE `e107_table` ADD `table_json` JSON NOT NULL AFTER table_category"; + $this->assertEquals($expected,$actual); + + $actual = $this->dbv->getFixQuery('index', 'table', 'table_email', $sqlFileData); + $expected = 'ALTER TABLE `e107_table` ADD UNIQUE `table_email` (table_email);'; + $this->assertEquals($expected,$actual); + + $actual = $this->dbv->getFixQuery('index', 'table', 'table_user', $sqlFileData); + $expected = 'ALTER TABLE `e107_table` ADD INDEX `table_user` (table_user);'; + $this->assertEquals($expected,$actual); + + $actual = $this->dbv->getFixQuery('create', 'table', 'table_user', $sqlFileData, 'InnoDB'); + $expected = 'CREATE TABLE `e107_table` (table_id int(10) unsigned NOT NULL auto_increment, + table_name varchar(100) NOT NULL default \'\', + table_email varchar(100) NOT NULL default \'\', + table_user int(10) unsigned NOT NULL default \'0\', + table_title varchar(200) NOT NULL default \'\', + table_category tinyint(3) unsigned NOT NULL default \'0\', + table_json JSON NOT NULL, + table_item text NOT NULL, + table_datestamp int(10) unsigned NOT NULL default \'0\', + table_ip varchar(45) NOT NULL default \'\', + table_auth tinyint(3) unsigned NOT NULL default \'0\', + table_file text NOT NULL, + table_keywords varchar(255) NOT NULL default \'\', + table_description text, + table_summary text, + table_media text, + PRIMARY KEY (table_id) + UNIQUE KEY `table_email` (`table_email`), + KEY `table_user` (`table_user`) + ) ENGINE=InnoDB;'; + + $expected = str_replace("\t", "",$expected); + $actual = str_replace("\t", "",$actual); + + $this->assertEquals($expected,$actual); + + // + // echo $actual; + + + } + + public function testToMysql() + { + $tests = array( + 0 => + array ( + 'type' => 'TINYINT', + 'value' => '3', + 'attributes' => 'UNSIGNED', + 'null' => 'NOT NULL', + 'default' => 'DEFAULT \'0\'', + ), + 1 => + array ( + 'type' => 'JSON', + 'value' => '', + 'attributes' => '', + 'null' => 'NOT NULL', + 'default' => '', + ), + ); + + + $expected = array( + "TINYINT(3) UNSIGNED NOT NULL DEFAULT '0'", + "JSON NOT NULL", + ); + + + foreach($tests as $k=>$data) + { + $result = $this->dbv->toMysql($data); + $this->assertEquals($expected[$k], $result); + + } + + } +/* + public function testRunFix() + { + + } + + public function testRenderTableSelect() + { + + } + + public function testVerify() + { + + } + + public function testGetPrevious() + { + + } + + public function testRenderResults() + { + + } + + public function testErrors() + { + + } +*/ + public function testGetSqlFileTables() + { + $tests = array( + + 'missing_index' => + "CREATE TABLE `e107_submitnews` ( + `submitnews_id` int(10) unsigned NOT NULL, + `submitnews_name` varchar(100) NOT NULL DEFAULT '', + `submitnews_email` varchar(100) NOT NULL DEFAULT '', + `submitnews_title` varchar(200) NOT NULL DEFAULT '', + `submitnews_category` tinyint(3) unsigned NOT NULL DEFAULT '0', + `submitnews_item` text NOT NULL, + `submitnews_datestamp` int(10) unsigned NOT NULL DEFAULT '0', + `submitnews_ip` varchar(45) NOT NULL DEFAULT '', + `submitnews_auth` tinyint(3) unsigned NOT NULL DEFAULT '0', + `submitnews_file` text NOT NULL, + `submitnews_keywords` varchar(255) NOT NULL DEFAULT '', + `submitnews_description` text, + `submitnews_summary` text, + `submitnews_media` text, + `submitnews_user` int(10) unsigned NOT NULL DEFAULT '0' + ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", + + + 'user_extended' => + "CREATE TABLE `e107_user_extended` ( + `user_extended_id` int(10) unsigned NOT NULL DEFAULT '0', + `user_hidden_fields` text, + `user_country` varchar(255) DEFAULT NULL, + `user_szulido` date NOT NULL, + `user_tag` varchar(255) DEFAULT 'Tagsága nem él. (((', + `user_jegyzet` text, + `user_homepage` varchar(255) DEFAULT NULL, + `user_tagimappa` varchar(255) DEFAULT NULL, + `user_belepesi` varchar(255) DEFAULT 'Egyeztetés alatt', + `user_timezone` varchar(255) DEFAULT '+0', + PRIMARY KEY (`user_extended_id`) + ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", + + 'banlist' => + "CREATE TABLE `e107_banlist` ( + `banlist_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `banlist_ip` varchar(100) NOT NULL DEFAULT '', + `banlist_bantype` tinyint(3) NOT NULL DEFAULT '0', + `banlist_datestamp` int(10) unsigned NOT NULL DEFAULT '0', + `banlist_banexpires` int(10) unsigned NOT NULL DEFAULT '0', + `banlist_admin` smallint(5) unsigned NOT NULL DEFAULT '0', + `banlist_reason` tinytext NOT NULL, + `banlist_notes` tinytext NOT NULL, + PRIMARY KEY (`banlist_id`), + KEY `banlist_datestamp` (`banlist_datestamp`), + KEY `banlist_banexpires` (`banlist_banexpires`), + KEY `banlist_ip` (`banlist_ip`) + ) ENGINE=MyISAM AUTO_INCREMENT=182 DEFAULT CHARSET=utf8;", + + 'test_json' => + "CREATE TABLE `e107_test_comment` ( + `eml_id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `eml_hash` varchar(20) NOT NULL, + `eml_datestamp` int(11) unsigned NOT NULL, + `eml_json` JSON NOT NULL, + `eml_to` varchar(50) NOT NULL, + PRIMARY KEY (`eml_id`), + UNIQUE KEY `eml_hash` (`eml_hash`) + ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", + + 'test_comment' => + "CREATE TABLE `e107_test_comment` ( + `eml_id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `eml_hash` varchar(20) NOT NULL, + `eml_datestamp` int(11) unsigned NOT NULL, + `eml_from` varchar(50) NOT NULL COMMENT 'This is the from field', + `eml_to` varchar(50) NOT NULL, + PRIMARY KEY (`eml_id`), + UNIQUE KEY `eml_hash` (`eml_hash`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8;", + + 'multiple' => + + "CREATE TABLE e107_plugin ( + plugin_id int(10) unsigned NOT NULL auto_increment, + plugin_name varchar(100) NOT NULL default '', + plugin_version varchar(10) NOT NULL default '', + plugin_path varchar(100) NOT NULL default '', + plugin_installflag tinyint(1) unsigned NOT NULL default '0', + plugin_addons text NOT NULL, + plugin_category varchar(100) NOT NULL default '', + PRIMARY KEY (plugin_id), + UNIQUE KEY plugin_path (plugin_path) + ) ENGINE=MyISAM; + CREATE TABLE e107_rate ( + rate_id int(10) unsigned NOT NULL auto_increment, + rate_table varchar(100) NOT NULL default '', + rate_itemid int(10) unsigned NOT NULL default '0', + rate_rating int(10) unsigned NOT NULL default '0', + rate_votes int(10) unsigned NOT NULL default '0', + rate_voters text NOT NULL, + rate_up int(10) unsigned NOT NULL default '0', + rate_down int(10) unsigned NOT NULL default '0', + PRIMARY KEY (rate_id) + ) ENGINE=MyISAM; + + " + ); + + $expected = array( + + 'missing_index' => array ( + 'tables' => + array ( + 0 => 'submitnews', + ), + 'data' => + array ( + 0 => '`submitnews_id` int(10) unsigned NOT NULL, + `submitnews_name` varchar(100) NOT NULL DEFAULT \'\', + `submitnews_email` varchar(100) NOT NULL DEFAULT \'\', + `submitnews_title` varchar(200) NOT NULL DEFAULT \'\', + `submitnews_category` tinyint(3) unsigned NOT NULL DEFAULT \'0\', + `submitnews_item` text NOT NULL, + `submitnews_datestamp` int(10) unsigned NOT NULL DEFAULT \'0\', + `submitnews_ip` varchar(45) NOT NULL DEFAULT \'\', + `submitnews_auth` tinyint(3) unsigned NOT NULL DEFAULT \'0\', + `submitnews_file` text NOT NULL, + `submitnews_keywords` varchar(255) NOT NULL DEFAULT \'\', + `submitnews_description` text, + `submitnews_summary` text, + `submitnews_media` text, + `submitnews_user` int(10) unsigned NOT NULL DEFAULT \'0\'', + ), + 'engine' => + array ( + 0 => 'MyISAM', + ), + ), + + + 'user_extended' => array ( + 'tables' => + array ( + 0 => 'user_extended', + ), + 'data' => + array ( + 0 => '`user_extended_id` int(10) unsigned NOT NULL DEFAULT \'0\', + `user_hidden_fields` text, + `user_country` varchar(255) DEFAULT NULL, + `user_szulido` date NOT NULL, + `user_tag` varchar(255) DEFAULT \'Tagsága nem él. (((\', + `user_jegyzet` text, + `user_homepage` varchar(255) DEFAULT NULL, + `user_tagimappa` varchar(255) DEFAULT NULL, + `user_belepesi` varchar(255) DEFAULT \'Egyeztetés alatt\', + `user_timezone` varchar(255) DEFAULT \'+0\', + PRIMARY KEY (`user_extended_id`)', + ), + 'engine' => + array ( + 0 => 'MyISAM', + ), + ), + + 'banlist' => array ( + 'tables' => + array ( + 0 => 'banlist', + ), + 'data' => + array ( + 0 => '`banlist_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `banlist_ip` varchar(100) NOT NULL DEFAULT \'\', + `banlist_bantype` tinyint(3) NOT NULL DEFAULT \'0\', + `banlist_datestamp` int(10) unsigned NOT NULL DEFAULT \'0\', + `banlist_banexpires` int(10) unsigned NOT NULL DEFAULT \'0\', + `banlist_admin` smallint(5) unsigned NOT NULL DEFAULT \'0\', + `banlist_reason` tinytext NOT NULL, + `banlist_notes` tinytext NOT NULL, + PRIMARY KEY (`banlist_id`), + KEY `banlist_datestamp` (`banlist_datestamp`), + KEY `banlist_banexpires` (`banlist_banexpires`), + KEY `banlist_ip` (`banlist_ip`)', + ), + 'engine' => + array ( + 0 => 'MyISAM', + ), + ), + + + 'test_json' => array ( + 'tables' => + array ( + 0 => 'test_comment', + ), + 'data' => + array ( + 0 => '`eml_id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `eml_hash` varchar(20) NOT NULL, + `eml_datestamp` int(11) unsigned NOT NULL, + `eml_json` JSON NOT NULL, + `eml_to` varchar(50) NOT NULL, + PRIMARY KEY (`eml_id`), + UNIQUE KEY `eml_hash` (`eml_hash`)', + ), + 'engine' => + array ( + 0 => 'MyISAM', + ), + ), + + 'test_comment' => array ( + 'tables' => + array ( + 0 => 'test_comment', + ), + 'data' => + array ( + 0 => '`eml_id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `eml_hash` varchar(20) NOT NULL, + `eml_datestamp` int(11) unsigned NOT NULL, + `eml_from` varchar(50) NOT NULL COMMENT \'This is the from field\', + `eml_to` varchar(50) NOT NULL, + PRIMARY KEY (`eml_id`), + UNIQUE KEY `eml_hash` (`eml_hash`)', + ), + 'engine' => + array ( + 0 => 'InnoDB', + ), + ), + + 'multiple' => + array ( + 'tables' => + array ( + 0 => 'plugin', + 1 => 'rate', + ), + 'data' => + array ( + 0 => 'plugin_id int(10) unsigned NOT NULL auto_increment, + plugin_name varchar(100) NOT NULL default \'\', + plugin_version varchar(10) NOT NULL default \'\', + plugin_path varchar(100) NOT NULL default \'\', + plugin_installflag tinyint(1) unsigned NOT NULL default \'0\', + plugin_addons text NOT NULL, + plugin_category varchar(100) NOT NULL default \'\', + PRIMARY KEY (plugin_id), + UNIQUE KEY plugin_path (plugin_path)', + 1 => 'rate_id int(10) unsigned NOT NULL auto_increment, + rate_table varchar(100) NOT NULL default \'\', + rate_itemid int(10) unsigned NOT NULL default \'0\', + rate_rating int(10) unsigned NOT NULL default \'0\', + rate_votes int(10) unsigned NOT NULL default \'0\', + rate_voters text NOT NULL, + rate_up int(10) unsigned NOT NULL default \'0\', + rate_down int(10) unsigned NOT NULL default \'0\', + PRIMARY KEY (rate_id)', + ), + 'engine' => + array ( + 0 => 'MyISAM', + 1 => 'MyISAM', + ), + ) + + + + ); + + + foreach($tests as $table => $sql) + { + + $actual = $this->dbv->getSqlFileTables($sql); + + $this->assertEquals($actual['tables'], $expected[$table]['tables'], "Table ".$table." could not be parsed."); + + foreach($expected[$table]['data'] as $k=>$data) + { + $data = str_replace("\t", '', $data); + $this->assertEquals($actual['data'][$k], $data, "Table ".$table."['data'][".$k."] did not match."); + } + + $this->assertEquals($actual['engine'], $expected[$table]['engine']); + + } + + } + + + public function testPrepareResults() + { + + $fileData = array(); + $sqlData = array(); + + $sql = "`schedule_id` int(10) unsigned NOT NULL auto_increment, + `schedule_user_id` int(11) NOT NULL, + `schedule_invoice_id` int(11) NOT NULL, + `schedule_name` varchar(50) NOT NULL default '', + `schedule_location` varchar(50) NOT NULL default '', + `schedule_data` LONGTEXT DEFAULT NULL, + `schedule_results` text NOT NULL, + PRIMARY KEY (`schedule_id`);"; + + $file = "`schedule_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `schedule_user_id` int(11) NOT NULL, + `schedule_invoice_id` int(11) NOT NULL, + `schedule_name` varchar(100) NOT NULL DEFAULT '', + `schedule_location` varchar(50) NOT NULL DEFAULT '', + `schedule_begin_date` int(11) NOT NULL, + `schedule_data` JSON DEFAULT NULL, + `schedule_results` text NOT NULL, + PRIMARY KEY (`schedule_id`), + UNIQUE KEY `schedule_user_id` (`schedule_user_id`), + KEY `schedule_invoice_id` (`schedule_invoice_id`) + "; + + + $fileData['field'] = $this->dbv->getFields($file); + $sqlData['field'] = $this->dbv->getFields($sql); + + $fileData['index'] = $this->dbv->getIndex($file); + $sqlData['index'] = $this->dbv->getIndex($sql); + + + $this->dbv->prepareResults('schedule', 'myplugin', $sqlData, $fileData); + + $resultFields = $this->dbv->getResults('fields'); + $expected = array( + 'schedule' => + array( + 'schedule_id' => + array( + '_status' => 'ok', + ), + 'schedule_user_id' => + array( + '_status' => 'ok', + ), + 'schedule_invoice_id' => + array( + '_status' => 'ok', + ), + 'schedule_name' => + array( + '_status' => 'mismatch', + '_diff' => + array( + 'value' => '100', + ), + '_valid' => + array( + 'type' => 'VARCHAR', + 'value' => '100', + 'attributes' => '', + 'null' => 'NOT NULL', + 'default' => 'DEFAULT \'\'', + ), + '_invalid' => + array( + 'type' => 'VARCHAR', + 'value' => '50', + 'attributes' => '', + 'null' => 'NOT NULL', + 'default' => 'DEFAULT \'\'', + ), + '_file' => 'myplugin', + ), + 'schedule_location' => + array( + '_status' => 'ok', + ), + 'schedule_begin_date' => + array( + '_status' => 'missing_field', + '_valid' => + array( + 'type' => 'INT', + 'value' => '11', + 'attributes' => '', + 'null' => 'NOT NULL', + 'default' => '', + ), + '_file' => 'myplugin', + ), + 'schedule_data' => + array( + '_status' => 'ok', + ), + 'schedule_results' => + array( + '_status' => 'ok', + ), + ), + ); + + + + + $this->assertEquals($expected, $resultFields); + + + $resultIndices = $this->dbv->getResults('indices'); + $expected = array( + 'schedule' => + array( + 'schedule_id' => + array( + '_status' => 'ok', + ), + 'schedule_user_id' => + array( + '_status' => 'missing_index', + '_valid' => + array( + 'type' => 'UNIQUE', + 'keyname' => 'schedule_user_id', + 'field' => 'schedule_user_id', + ), + '_file' => 'myplugin', + ), + 'schedule_invoice_id' => + array( + '_status' => 'missing_index', + '_valid' => + array( + 'type' => '', + 'keyname' => 'schedule_invoice_id', + 'field' => 'schedule_invoice_id', + ), + '_file' => 'myplugin', + ), + ), + ); + + $this->assertEquals($expected, $resultIndices); + + } + + + +/* + public function testFixForm() + { + + } + + public function testRunComparison() + { + + } + + public function testCompileResults() + { + + } + + public function testGetSqlLanguages() + { + + }*/ + } diff --git a/e107_tests/tests/unit/e107/Shims/InternalAlternateTest.php b/e107_tests/tests/unit/e107/Shims/InternalAlternateTest.php new file mode 100644 index 000000000..dd41b7a40 --- /dev/null +++ b/e107_tests/tests/unit/e107/Shims/InternalAlternateTest.php @@ -0,0 +1,31 @@ +testReadfileImplementation(array(InternalShims::class, 'readfile')); + } +} diff --git a/e107_tests/tests/unit/e107/Shims/eShimsTest.php b/e107_tests/tests/unit/e107/Shims/eShimsTest.php new file mode 100644 index 000000000..50970f060 --- /dev/null +++ b/e107_tests/tests/unit/e107/Shims/eShimsTest.php @@ -0,0 +1,37 @@ +testReadfileImplementation(array(\eShims::class, 'readfile')); + } + + public function testReadfileAlt() + { + $this->testReadfileImplementation(array(\eShims::class, 'readfile_alt')); + } + + protected function testReadfileImplementation($implementation) + { + $tmp_handle = tmpfile(); + $tmp_filename = stream_get_meta_data($tmp_handle)['uri']; + $garbage = str_pad('', 16384, 'x'); + fwrite($tmp_handle, $garbage); + ob_start(); + call_user_func($implementation, $tmp_filename); + $output = ob_get_clean(); + fclose($tmp_handle); + $this->assertEquals($garbage, $output); + } +} diff --git a/e107_tests/tests/unit/e107BounceTest.php b/e107_tests/tests/unit/e107BounceTest.php new file mode 100644 index 000000000..f5ce07cea --- /dev/null +++ b/e107_tests/tests/unit/e107BounceTest.php @@ -0,0 +1,72 @@ +bnc = $this->make('e107Bounce'); + } + catch(Exception $e) + { + $this->assertTrue(false, "Couldn't load e107Bounce object"); + } + + } + + public function testProcess() + { + /* FIXME: https://github.com/e107inc/e107/issues/4031 + $path = $icon = codecept_data_dir()."eml/bounced_01.eml"; + + $this->bnc->setSource($path); + $result = $this->bnc->process(false); + $this->assertEquals("99999999", $result); + */ + } + + public function testSetUser_Bounced() + { + + } + + public function test__construct() + { + + } + + public function testGetHeader() + { + + } + + public function testMailRead() + { + + } + + + + + } diff --git a/e107_tests/tests/unit/e107Test.php b/e107_tests/tests/unit/e107Test.php new file mode 100644 index 000000000..7cffabcb7 --- /dev/null +++ b/e107_tests/tests/unit/e107Test.php @@ -0,0 +1,1019 @@ +e107 = e107::getInstance(); + } + catch (Exception $e) + { + $this->fail("Couldn't load e107 object"); + } + + // var_dump($this->e107); + } + + public function testGetInstance() + { + // $this->e107->getInstance(); + //$res = $this->e107::getInstance(); + // $this->assertTrue($res); + } + + public function testInitCore() + { + //$res = null; + include(APP_PATH.'/e107_config.php'); // contains $E107_CONFIG = array('site_path' => '000000test'); + + $e107_paths = compact('ADMIN_DIRECTORY', 'FILES_DIRECTORY', 'IMAGES_DIRECTORY', 'THEMES_DIRECTORY', 'PLUGINS_DIRECTORY', 'HANDLERS_DIRECTORY', 'LANGUAGES_DIRECTORY', 'HELP_DIRECTORY', 'DOWNLOADS_DIRECTORY','UPLOADS_DIRECTORY','SYSTEM_DIRECTORY', 'MEDIA_DIRECTORY','CACHE_DIRECTORY','LOGS_DIRECTORY', 'CORE_DIRECTORY', 'WEB_DIRECTORY'); + $sql_info = compact('mySQLserver', 'mySQLuser', 'mySQLpassword', 'mySQLdefaultdb', 'mySQLprefix', 'mySQLport'); + $res = $this->e107->initCore($e107_paths, e_ROOT, $sql_info, varset($E107_CONFIG, array())); + + $this->assertEquals('000000test', $res->site_path); + + } + +/* + public function testInitInstall() + { + $res = null; + $this->assertTrue($res); + } + + public function testMakeSiteHash() + { + $res = null; + $this->assertTrue($res); + } + + public function testSetDirs() + { + $res = null; + $this->assertTrue($res); + } + + public function testPrepareDirs() + { + $res = null; + $this->assertTrue($res); + } + + public function testDefaultDirs() + { + $res = null; + $this->assertTrue($res); + } + + public function testInitInstallSql() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetRegistry() + { + $res = null; + $this->assertTrue($res); + } + + public function testSetRegistry() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetFolder() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetE107() + { + $res = null; + $this->assertTrue($res); + } + + public function testIsCli() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetMySQLConfig() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetSitePath() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetHandlerPath() + { + $res = null; + $this->assertTrue($res); + } + + public function testAddHandler() + { + $res = null; + $this->assertTrue($res); + } + + public function testIsHandler() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetHandlerOverload() + { + $res = null; + $this->assertTrue($res); + } + + public function testSetHandlerOverload() + { + $res = null; + $this->assertTrue($res); + } + + public function testIsHandlerOverloadable() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetSingleton() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetObject() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetConfig() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetPref() + { + $res = null; + $this->assertTrue($res); + } + + public function testFindPref() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetPlugConfig() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetPlugLan() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetPlugPref() + { + $res = null; + $this->assertTrue($res); + } + + public function testFindPlugPref() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetThemeConfig() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetThemePref() + { + $res = null; + $this->assertTrue($res); + } + + public function testSetThemePref() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetThemeGlyphs() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetParser() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetScParser() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetSecureImg() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetScBatch() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetDb() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetCache() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetBB() + { + $res = null; + $this->assertTrue($res); + }*/ + + public function testGetUserSession() + { + $tmp = e107::getUserSession(); + + $className = get_class($tmp); + + $res = ($className === 'UserHandler'); + + $this->assertTrue($res); + + } +/* + public function testGetSession() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetRedirect() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetRate() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetSitelinks() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetRender() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetEmail() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetBulkEmail() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetEvent() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetArrayStorage() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetMenu() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetTheme() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetUrl() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetFile() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetForm() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetAdminLog() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetLog() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetDateConvert() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetDate() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetDebug() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetNotify() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetOverride() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetLanguage() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetIPHandler() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetXml() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetHybridAuth() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetUserClass() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetSystemUser() + { + $res = null; + $this->assertTrue($res); + } + + public function testUser() + { + $res = null; + $this->assertTrue($res); + } + + public function testSerialize() + { + $res = null; + $this->assertTrue($res); + } + + public function testUnserialize() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetUser() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetModel() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetUserStructure() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetUserExt() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetUserPerms() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetRank() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetPlugin() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetPlug() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetOnline() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetChart() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetComment() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetCustomFields() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetMedia() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetNav() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetMessage() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetAjax() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetLibrary() + { + $res = null; + $this->assertTrue($res); + } + + public function testLibrary() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetJs() + { + $res = null; + $this->assertTrue($res); + } + + public function testSet() + { + $res = null; + $this->assertTrue($res); + } + + public function testJs() + { + $res = null; + $this->assertTrue($res); + } + + public function testLink() + { + $res = null; + $this->assertTrue($res); + } + + public function testCss() + { + $res = null; + $this->assertTrue($res); + } + + public function testDebug() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetJshelper() + { + $res = null; + $this->assertTrue($res); + } + + public function testMeta() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetAdminUI() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetAddon() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetAddonConfig() + { + $res = null; + $this->assertTrue($res); + } + + public function testCallMethod() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetUrlConfig() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetThemeInfo() + { + $res = null; + $this->assertTrue($res); + } + + public function testCoreTemplatePath() + { + $res = null; + $this->assertTrue($res); + } + + public function testTemplatePath() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetCoreTemplate() + { + $res = null; + $this->assertTrue($res); + } +*/ + /** + * This test checks getTemplate() use on loading between the core download plugin template and the _blank theme download template + */ + public function testGetTemplate() + { + + e107::getConfig()->set('sitetheme', '_blank'); + + $template = e107::getTemplate('download', null, null); // theme override is enabled by default. + $this->assertEquals('{DOWNLOAD_BREADCRUMB} Custom', $template['header']); // ie. should be from _blank theme download template (override of plugin). + $footer = is_null($template['footer']); // theme overrides everything, since merge is not enabled. theme does not contain 'footer'. + $this->assertTrue($footer); + + $template = e107::getTemplate('download', null, null, false); // theme override is disabled. + $this->assertEquals("{DOWNLOAD_BREADCRUMB}", $template['header']); // ie. should be from plugin template, not theme. + $this->assertEquals('', $template['footer']); // main plugin template is active, since override is false. 'footer' is set. + + $template = e107::getTemplate('download', null, null, true, true); // theme override is enabled, and theme merge is enabled. + $this->assertEquals("{DOWNLOAD_BREADCRUMB} Custom", $template['header']); //from theme + $this->assertEquals("", $template['footer']); // 'footer' missing from theme, so plugin template used. ie. arrays have been merged. + + $template = e107::getTemplate('download', null, null, false, true); // theme override is disabled, theme merge is enabled. + $this->assertEquals("{DOWNLOAD_BREADCRUMB}", $template['header']); // ie. should be from plugin template, not theme. + // $this->assertEquals("test", $template['other']); // 'test' is missing from plugin template, but merge is enabled. Not an override of plugin template key so merge is okay. + // FIXME above.. + // var_dump($template['other']); + + e107::getConfig()->set('sitetheme', 'bootstrap3'); + + + } +/* + public function testTemplateWrapper() + { + $res = null; + $this->assertTrue($res); + } + + public function testScStyle() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetTemplateInfo() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetLayouts() + { + $res = null; + $this->assertTrue($res); + } + + public function test_getTemplate() + { + $res = null; + $this->assertTrue($res); + } + + public function testIncludeLan() + { + $res = null; + $this->assertTrue($res); + } + + public function testCoreLan() + { + $res = null; + $this->assertTrue($res); + } + + public function testPlugLan() + { + $res = null; + $this->assertTrue($res); + } + + public function testThemeLan() + { + $res = null; + $this->assertTrue($res); + } + + public function testLan() + { + $res = null; + $this->assertTrue($res); + } + + public function testPref() + { + $res = null; + $this->assertTrue($res); + } +*/ + public function testUrl() + { + $obj = $this->e107; + + $result = $obj::url('news','index', array(), array('mode'=>'full')); + + $this->assertEquals("https://localhost/e107/news", $result); + // var_dump(SITEURL); + + + // $this->assertTrue($res); + } +/* + public function testRedirect() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetError() + { + $res = null; + $this->assertTrue($res); + } + + public function testHttpBuildQuery() + { + $res = null; + $this->assertTrue($res); + } + + public function testMinify() + { + $res = null; + $this->assertTrue($res); + } + + public function testWysiwyg() + { + $res = null; + $this->assertTrue($res); + } + + public function testLoadLanFiles() + { + $res = null; + $this->assertTrue($res); + } + + public function testPrepare_request() + { + $res = null; + $this->assertTrue($res); + } +*/ + + public function testBase64DecodeOnAjaxURL() + { + $query = "mode=main&iframe=1&action=info&src=aWQ9ODgzJnVybD1odHRwcyUzQSUyRiUyRmUxMDcub3JnJTJGZTEwN19wbHVnaW5zJTJGYWRkb25zJTJGYWRkb25zLnBocCUzRmlkJTNEODgzJTI2YW1wJTNCbW9kYWwlM0QxJm1vZGU9YWRkb24mcHJpY2U9"; + + $result = base64_decode($query, true); + + $this->assertFalse($result); // correct result is 'false'. + } + + + public function testFilter_request() + { + + // define('e_DEBUG', true); + // $_SERVER['QUEST_STRING'] = "mode=main&iframe=1&action=info&src=aWQ9ODgzJnVybD1odHRwcyUzQSUyRiUyRmUxMDcub3JnJTJGZTEwN19wbHVnaW5zJTJGYWRkb25zJTJGYWRkb25zLnBocCUzRmlkJTNEODgzJTI2YW1wJTNCbW9kYWwlM0QxJm1vZGU9YWRkb24mcHJpY2U9"; + + //$result = $this->e107::filter_request($test,'QUERY_STRING','_SERVER'); + + // $this->e107->prepare_request(); + + // var_dump($_SERVER['QUEST_STRING']); + + + // $res = null; + // $this->assertTrue($res); + } +/* + public function testSet_base_path() + { + $res = null; + $this->assertTrue($res); + } + + public function testSet_constants() + { + $res = null; + $this->assertTrue($res); + } + + public function testGet_override_rel() + { + $res = null; + $this->assertTrue($res); + } + + public function testGet_override_http() + { + $res = null; + $this->assertTrue($res); + } + + public function testSet_paths() + { + $res = null; + $this->assertTrue($res); + } + + public function testFix_windows_paths() + { + $res = null; + $this->assertTrue($res); + } + + public function testSet_urls() + { + $res = null; + $this->assertTrue($res); + } + + public function testSet_urls_deferred() + { + $res = null; + $this->assertTrue($res); + } + + public function testSet_request() + { + $res = null; + $this->assertTrue($res); + } + + public function testCanCache() + { + $res = null; + $this->assertTrue($res); + } + + public function testIsSecure() + { + $res = null; + $this->assertTrue($res); + } + + public function testGetip() + { + $res = null; + $this->assertTrue($res); + } + + public function testIpEncode() + { + $res = null; + $this->assertTrue($res); + } + + public function testIpdecode() + { + $res = null; + $this->assertTrue($res); + } + + public function testGet_host_name() + { + $res = null; + $this->assertTrue($res); + } + + public function testParseMemorySize() + { + $res = null; + $this->assertTrue($res); + } +*/ + public function testIsInstalled() + { + $obj = $this->e107; + + $result = $obj::isInstalled('user'); + + // var_dump($result); + $this->assertTrue($result); + + $result = $obj::isInstalled('news'); + + // var_dump($result); + $this->assertTrue($result); + } +/* + public function testIni_set() + { + $res = null; + $this->assertTrue($res); + } + + public function testAutoload_register() + { + $res = null; + $this->assertTrue($res); + } + + public function testAutoload() + { + $res = null; + $this->assertTrue($res); + } + + public function test__get() + { + $res = null; + $this->assertTrue($res); + } + + public function testDestruct() + { + $res = null; + $this->assertTrue($res); + } + + public function testCoreUpdateAvailable() + { + $res = null; + $this->assertTrue($res); + } + + +*/ + } diff --git a/e107_tests/tests/unit/e107_db_debugTest.php b/e107_tests/tests/unit/e107_db_debugTest.php new file mode 100644 index 000000000..750a55142 --- /dev/null +++ b/e107_tests/tests/unit/e107_db_debugTest.php @@ -0,0 +1,135 @@ +dbg = $this->make('e107_db_debug'); + } + catch(Exception $e) + { + $this->assertTrue(false, "Couldn't load e107_db_debug object"); + } + + } +/* + public function testShowIf() + { + + } + + public function testShow_Log() + { + + } + + public function testShow_Includes() + { + + } + + public function testSave() + { + + } + + public function testShow_DEPRECATED() + { + + }*/ + + public function testLog() + { + $res = $this->dbg->log('hello world'); + $this->assertTrue($res, 'db_debug->log() method returned false.'); + + + $result = $this->dbg->Show_Log(); + $this->assertStringContainsString('e107_db_debugTest->testLog()',$result); + + } +/* + public function testLogCode() + { + + } + + public function testLogDeprecated() + { + + } + + public function test__construct() + { + + } + + public function testE107_db_debug() + { + + } + + public function testShow_SQL_Details() + { + + } + + public function testShow_SC_BB() + { + + } + + public function testShow_All() + { + + } + + public function testCountLabel() + { + + } + + public function testMark_Time() + { + + } + + public function testMark_Query() + { + + } + + public function testShow_Performance() + { + + } + + public function testShow_PATH() + { + + } + + public function testDump() + { + + } +*/ + + + + } diff --git a/e107_tests/tests/unit/e107_user_extendedTest.php b/e107_tests/tests/unit/e107_user_extendedTest.php new file mode 100644 index 000000000..f1fda85fc --- /dev/null +++ b/e107_tests/tests/unit/e107_user_extendedTest.php @@ -0,0 +1,311 @@ +ue = $this->make('e107_user_extended'); + } + catch(Exception $e) + { + $this->assertTrue(false, "Couldn't load e107_user_extended object"); + } + + + + $this->ue->__construct(); + + $this->typeArray = array( + 'text' => EUF_TEXT, + 'radio' => EUF_RADIO, + 'dropdown' => EUF_DROPDOWN, + 'db field' => EUF_DB_FIELD, + 'textarea' => EUF_TEXTAREA, + 'integer' => EUF_INTEGER, + 'date' => EUF_DATE, + 'language' => EUF_LANGUAGE, + 'list' => EUF_PREDEFINED, + 'checkbox' => EUF_CHECKBOX, + 'predefined' => EUF_PREFIELD, // Used in plugin installation routine. + 'addon' => EUF_ADDON, + 'country' => EUF_COUNTRY, + 'richtextarea' => EUF_RICHTEXTAREA, + ); + + + // Add a field of each type. + foreach($this->typeArray as $k=>$v) + { + $this->ue->user_extended_add($k, ucfirst($k), $v ); + } + + $this->ue->init(); + + + } + + public function testGetStructure() + { + $result = $this->ue->getStructure(); + + foreach($this->typeArray as $k=>$v) + { + $key = 'user_'.$k; + $this->assertArrayHasKey($key,$result); + $this->assertEquals($k, $result[$key]['user_extended_struct_name']); + + } + + + + } +/* + public function testGetFieldList() + { + $list = $this->ue->getFieldList(); + + } +*/ + public function testGetFieldType() + { + $result = $this->ue->getFieldType('user_radio'); + + $this->assertEquals(EUF_RADIO,$result); + } +/* + public function testUser_extended_getvalue() + { + + } + + public function testHasPermission() + { + + } +*/ + public function testGetFieldTypes() + { + $result = $this->ue->getFieldTypes(); + + $expected = array ( + 1 => 'Text Box', + 2 => 'Radio Buttons', + 3 => 'Drop-Down Menu', + 4 => 'DB Table Field', + 5 => 'Textarea', + 14 => 'Rich Textarea (WYSIWYG)', + 6 => 'Integer', + 7 => 'Date', + 8 => 'Language', + 9 => 'Predefined list', + 10 => 'Checkboxes', + 13 => 'Country', + ); + + + $this->assertEquals($expected,$result); + + } + + public function testSanitizeAll() + { + $posted = array( + 'user_text' => "Some text", + 'user_radio' => "1", + 'user_dropdown' => "drop-value-1", + 'user_db field' => "extra", + 'user_textarea' => "Some text", + 'user_integer' => "3", + 'user_date' => "2000-01-03", + 'user_language' => "English", + 'user_list' => "list-item", + 'user_checkbox' => "1", + 'user_predefined' => "pre-value", // Used in plugin installation routine. + 'user_addon' => "pre-value", + 'user_country' => "USA", + 'user_richtextarea' => "[html]

    Some text

    [/html]", + + + ); + + $expected = array( + 'user_text' => 'Some text', + 'user_radio' => '1', + 'user_dropdown' => 'drop-value-1', + 'user_db field' => 'extra', + 'user_textarea' => 'Some text', + 'user_integer' => 3, + 'user_date' => '2000-01-03', + 'user_language' => 'English', + 'user_list' => 'list-item', + 'user_checkbox' => '1', + 'user_predefined' => 'pre-value', + 'user_addon' => 'pre-value', + 'user_country' => 'USA', + 'user_richtextarea' => "[html]

    Some text

    [/html]", + ); + + + $result = $this->ue->sanitizeAll($posted); + + $this->assertEquals($expected, $result); + + } +/* + public function testUser_extended_edit() + { + + } + + public function testParse_extended_xml() + { + + } + + public function testGetCategories() + { + + } + + public function testRenderValue() + { + + } + + public function testGetFieldNames() + { + + } + + public function testUser_extended_modify() + { + + } + + public function testUser_extended_remove() + { + + } + + public function testSet() + { + + } + + public function testUser_extended_get_categories() + { + + } + + public function testAddDefaultFields() + { + + } + + public function testUser_extended_get_fields() + { + + } + + public function testUser_extended_type_text() + { + + } + + public function testUser_extended_hide() + { + + } + + public function testAddFieldTypes() + { + + } + + public function testUser_extended_setvalue() + { + + } + + public function testGetFields() + { + + } + + public function testGet() + { + + } + + public function testUser_extended_field_exist() + { + + } + + public function testUser_extended_add() + { + + } + + public function testUser_extended_display_text() + { + + } + + public function testUserExtendedValidateAll() + { + + } + + public function testClear_cache() + { + + } + + public function testUser_extended_reserved() + { + + } + + public function testUser_extended_add_system() + { + + } + + public function testUser_extended_getStruct() + { + + } + + public function testUser_extended_validate_entry() + { + + } + + public function testUser_extended_get_fieldList() + { + + } +*/ + + + + } diff --git a/e107_tests/tests/unit/e107pluginTest.php b/e107_tests/tests/unit/e107pluginTest.php new file mode 100644 index 000000000..e611ffd4f --- /dev/null +++ b/e107_tests/tests/unit/e107pluginTest.php @@ -0,0 +1,548 @@ +ep = $this->make('e107plugin'); + } + catch (Exception $e) + { + $this->assertTrue(false, "Couldn't e107_plugin object"); + } + + + + } + + + public function testGetPluginRecord() + { + $obj = $this->ep; + $result = $obj::getPluginRecord('banner'); + + // print_r($result); + + $this->assertEquals("LAN_PLUGIN_BANNER_NAME", $result['plugin_name']); + + + } + + +/* + + public function testDisplayArray() + { + + } + + public function testExecute_function() + { + + } + + public function testManage_plugin_prefs() + { + + } + + public function testInstall() + { + + } + + public function testGetall() + { + + } + + public function testXmlPrefs() + { + + } + + public function testParse_plugin_php() + { + + } + + public function testRefresh() + { + + } + + public function testUninstall() + { + + } + + public function testRebuildUrlConfig() + { + + } + + public function testManage_icons() + { + + } + + public function testParse_plugin() + { + + } + + public function testManage_comments() + { + + } + + public function testManage_search() + { + + } + + public function testInstall_plugin_xml() + { + + } + + public function testGetAddonsDiz() + { + + } + + public function testUpdate_plugins_table() + { + + } + + public function testXmlBBcodes() + { + + } + + public function testInstall_plugin() + { + + } + + public function testManage_extended_field_sql() + { + + } + + public function testUpdateRequired() + { + + } + + public function testGetCorePlugins() + { + + } + + public function testManage_prefs() + { + + } + + public function testGetPerm() + { + + } + + public function testGetAddonsList() + { + + } +*/ + public function testXmlExtendedFields() + { + // $ret = $this->ep->parse_plugin_xml('_blank'); + // var_export($this->ep->plug_vars); + + $this->ep->plugFolder = 'test'; + + $extendedVars = array ( + 'field' => array ( + 0 => array ( + '@attributes' => array ('name' => 'custom', 'type' => 'EUF_TEXTAREA', 'default' => '0', 'active' => 'true',), + '@value' => '', + ), + 1 => array ( + '@attributes' => array ('name' => 'custom2', 'type' => 'EUF_ADDON', 'data' => 'str', 'default' => '0', 'active' => 'true', 'system' => 'false', 'text' => 'My Label' ), + '@value' => '', + ), + + 2 => array ( + '@attributes' => array ('name' => 'custom3', 'type' => 'EUF_ADDON', 'data' => 'str', 'default' => 'hello', 'active' => 'true', 'system' => 'true', 'text' => 'Another Label' ), + '@value' => '', + ), + ) + ); + + $expected = array ( + 0 => array ( + 'name' => 'plugin_test_custom', + 'attrib' =>array ( 'name' => 'custom', 'type' => 'EUF_TEXTAREA', 'default' => '0', 'active' => 'true', 'deprecate' => NULL, 'system' => true, ), + 'source' => 'plugin_test', + ), + 1 => array ( + 'name' => 'plugin_test_custom2', + 'attrib' =>array ( 'name' => 'custom2', 'type' => 'EUF_ADDON', 'data' => 'str', 'default' => '0', 'active' => 'true', 'system' => false, 'text' => 'My Label', 'deprecate' => NULL, ), + 'source' => 'plugin_test', + ), + 2 => array ( + 'name' => 'plugin_test_custom3', + 'attrib' =>array ( 'name' => 'custom3', 'type' => 'EUF_ADDON', 'data' => 'str', 'default' => 'hello', 'active' => 'true', 'system' => true, 'text' => 'Another Label', 'deprecate' => NULL, ), + 'source' => 'plugin_test', + ), + ); + + + + $result = $this->ep->XmlExtendedFields('test', $extendedVars); + + $this->assertEquals($expected, $result); + + // var_export($result); + + + } +/* + public function testGetAddons() + { + + } + + public function testUe_field_type() + { + + } + + public function testManage_userclass() + { + + } +*/ + public function testXmlSiteLinks() + { + $plugVars = array ( + '@attributes' => + array ( + 'name' => 'Multiple Languages', + 'lan' => '', + 'version' => '1.0.3', + 'date' => '2015-06-04', + 'compatibility' => '2.0', + 'installRequired' => 'true', + ), + 'author' => + array ( + '@attributes' => + array ( + 'name' => 'cameron', + 'url' => 'http://e107.org', + ), + '@value' => '', + ), + 'summary' => + array ( + '@attributes' => + array ( + 'lan' => '', + ), + '@value' => 'Multi-Language tools for e107', + ), + 'description' => + array ( + '@attributes' => + array ( + 'lan' => '', + ), + '@value' => 'Multi-Language tools for e107', + ), + 'keywords' => + array ( + 'word' => + array ( + 0 => 'multilanguage', + 1 => 'sync', + ), + ), + 'category' => 'manage', + 'copyright' => '', + 'adminLinks' => + array ( + 'link' => + array ( + 0 => + array ( + '@attributes' => + array ( + 'url' => 'admin_config.php', + 'description' => '', + 'icon' => 'images/multilan_32.png', + 'iconSmall' => 'images/multilan_16.png', + 'icon128' => 'images/multilan_128.png', + 'primary' => 'true', + ), + '@value' => 'LAN_CONFIGURE', + ), + ), + ), + 'siteLinks' => + array ( + 'link' => + array ( + 0 => + array ( + '@attributes' => + array ( + 'url' => '#', + 'function' => 'language', + 'icon' => '', + 'description' => 'Choose Language', + 'perm' => 'admin', + ), + '@value' => 'LAN_MULTILAN_NAVICON', + ), + ), + ), + 'userClasses' => + array ( + 'class' => + array ( + 0 => + array ( + '@attributes' => + array ( + 'name' => 'TRANSLATE_ME', + 'description' => 'Items requiring translation and the team members who do it.', + ), + '@value' => '', + ), + 1 => + array ( + '@attributes' => + array ( + 'name' => 'REVIEW_ME', + 'description' => 'Items that have been auto-translated and require reivew and the team members who do it.', + ), + '@value' => '', + ), + ), + ), + 'folder' => 'multilan', + 'files' => + array ( + 3 => 'admin_config.php', + 4 => 'bing.class.php', + 5 => 'e_admin.php', + 6 => 'e_footer.php', + 7 => 'e_help.php', + 8 => 'e_meta.php', + 9 => 'e_module.php', + 10 => 'e_shortcode.php', + 11 => 'e_sitelink.php', + 12 => 'images', + 13 => 'multilan.css', + 14 => 'multilan.zip', + 15 => 'plugin.xml', + 16 => 'README.md', + 17 => 'test.php', + ), + 'administration' => + array ( + 'icon' => 'images/multilan_32.png', + 'caption' => '', + 'iconSmall' => 'images/multilan_16.png', + 'configFile' => 'admin_config.php', + ), + ); + + $status = $this->ep->XmlSiteLinks('install', $plugVars); + + $this->assertTrue($status, "Site link insertion failed"); + + $actual = e107::getDb()->retrieve('links', '*', "link_owner = 'multilan' "); + + $expected = array ( + 'link_id' => '12', + 'link_name' => 'LAN_MULTILAN_NAVICON', + 'link_url' => '#', + 'link_description' => '', + 'link_button' => '', + 'link_category' => '1', + 'link_order' => '11', + 'link_parent' => '0', + 'link_open' => '0', + 'link_class' => '254', + 'link_function' => 'multilan::language', + 'link_sefurl' => '', + 'link_owner' => 'multilan', + ); + + $unimportant_keys = ['link_id', 'link_order']; + foreach ($unimportant_keys as $unimportant_key) + { + unset($expected[$unimportant_key]); + unset($actual[$unimportant_key]); + } + + // Filter out cruft from MYSQL_BOTH database output + foreach ($actual as $key => $value) + { + if (is_int($key)) unset($actual[$key]); + } + + $this->assertEquals($expected,$actual); + + $status = $this->ep->XmlSiteLinks('uninstall',$plugVars); + + $this->assertTrue($status); + + $tmp = e107::getDb()->retrieve('links', '*', "link_owner = 'multilan' "); + + $actual = (empty($tmp)) ? true : false; + + $this->assertTrue($actual, "Link still exists after supposed removal"); + + + } +/* + public function testGetIcon() + { + + } + + public function testGetId() + { + + } + + public function testXmlLanguageFileCheck() + { + + } + + public function testSetUe() + { + + } + + public function testManage_tables() + { + + } + + public function testInstall_plugin_php() + { + + } + + public function testXmlMediaCategories() + { + + } + + public function testXmlDependencies() + { + + } + + public function testXmlTables() + { + + } + + public function testXmlUserClasses() + { + + } + + public function testCheckAddon() + { + + } + + public function testManage_notify() + { + + } + + public function testUe_field_type_name() + { + + } + + public function testManage_link() + { + + } + + public function testUe_field_name() + { + + } + + public function testIsUsedByAnotherPlugin() + { + + } + + public function testGetOtherPlugins() + { + + } + + public function testGetLog() + { + + } + + public function testManage_category() + { + + } + + public function testGetinfo() + { + + } + + public function testXmlAdminLinks() + { + + } + + public function testXmlLanguageFiles() + { + + } + + public function testManage_extended_field() + { + + } + + public function testParse_plugin_xml() + { + + }*/ + } diff --git a/e107_tests/tests/unit/e107tableTest.php b/e107_tests/tests/unit/e107tableTest.php new file mode 100644 index 000000000..c1dfa9f18 --- /dev/null +++ b/e107_tests/tests/unit/e107tableTest.php @@ -0,0 +1,101 @@ +ns = $this->make('e107table'); + } + catch(Exception $e) + { + $this->assertTrue(false, "Couldn't load e107table object"); + } + + $this->ns->__construct(); + + } +/* + public function testGetStyle() + { + + } + + public function testSetUniqueId() + { + + } +*/ + + public function testSetGetContent() + { + + $unique = 'news-view-default'; + + $this->ns->setUniqueId($unique); + $this->ns->setContent('title', 'news-title'); + $this->ns->setContent('text', 'news-summary'); + $this->ns->setUniqueId(false); // reset the ID. + + $this->ns->tablerender('caption', 'other', 'default', true); // render a different table. + + $result = $this->ns->setUniqueId($unique)->getContent(); // get content using uniqueId. + $expected = array ( 'title' => 'news-title', 'text' => 'news-summary', ); + $this->assertEquals($expected, $result); + + + $result = $this->ns->getContent('title'); + $this->assertEquals('news-title', $result); + + + } +/* + public function testGetMagicShortcodes() + { + + } + + public function testGetContent() + { + + } + + public function testGetMainCaption() + { + + } + + public function testTablerender() + { + + } + + public function testSetStyle() + { + + } + + public function testGetUniqueId() + { + + } +*/ + + + + } diff --git a/e107_tests/tests/unit/eHelperTest.php b/e107_tests/tests/unit/eHelperTest.php new file mode 100644 index 000000000..aefb54ea5 --- /dev/null +++ b/e107_tests/tests/unit/eHelperTest.php @@ -0,0 +1,147 @@ +hp = $this->make('eHelper'); + } + catch (Exception $e) + { + $this->fail("Couldn't load eHelper object"); + } + + } + +/* + + public function testFormatMetaTitle() + { + + } + + public function testFormatMetaKeys() + { + + } + + public function testGetMemoryUsage() + { + + } + + public function testUnderscore() + { + + } + + public function testFormatMetaDescription() + { + + } + + public function testSecureIdAttr() + { + + } +*/ + public function testTitle2sefFromPlainText() + { + $actual = $this->hp->title2sef('Plain text test'); + $expected = 'plain-text-test'; + + $this->assertEquals($expected, $actual); + } + + public function testTitle2sefFromPlainTextStripSpecialChars() + { + $actual = $this->hp->title2sef('Plain text test with special chars !()+*+#"\'\\'); + $expected = 'plain-text-test-with-special-chars'; + + $this->assertEquals($expected, $actual); + } + + public function testTitle2sefFromBbcodeText() + { + $actual = $this->hp->title2sef('BBCode [b]text[/b] test [img]logo.png[/img]'); + $expected = 'bbcode-text-test'; + + $this->assertEquals($expected, $actual); + } + + public function testTitle2sefFromHtmlText() + { + $actual = $this->hp->title2sef('HTML text test '); + $expected = 'html-text-test'; + + $this->assertEquals($expected, $actual); + } + +/* + public function testCamelize() + { + + } + + public function testScParams() + { + + } + + public function testLabelize() + { + + } + + public function testSecureClassAttr() + { + + } + + public function testSecureStyleAttr() + { + + } + + public function testScDualParams() + { + + } + + public function testDasherize() + { + + } + + public function testParseMemorySize() + { + + } + + public function testBuildAttr() + { + + } + + public function testSecureSef() + { + + }*/ + + + + } diff --git a/e107_tests/tests/unit/e_admin_logTest.php b/e107_tests/tests/unit/e_admin_logTest.php new file mode 100644 index 000000000..73e1be5c5 --- /dev/null +++ b/e107_tests/tests/unit/e_admin_logTest.php @@ -0,0 +1,136 @@ +log = $this->make('e_admin_log'); + } + catch(Exception $e) + { + $this->assertTrue(false, "Couldn't load e_admin_log object"); + } + + } +/* + public function testAddSuccess() + { + + } + + public function testAddDebug() + { + + } + + public function testLogError() + { + + } + + public function testLogSuccess() + { + + } + + public function testUser_audit() + { + + } + + public function testAddArray() + { + + } + + public function testLogMessage() + { + + } + + public function testAddWarning() + { + + } + + public function testPurge_log_events() + { + + } + + public function testE_log_event() + { + + } + + public function testSave() + { + + } + + public function testLogArrayAll() + { + + } + + public function testFlushMessages() + { + + } + + public function testAddError() + { + + } + + public function testClear() + { + + } + + public function testAdd() + { + + } + + public function testToFile() + { + + } + + public function testSetCurrentPlugin() + { + + } + + public function testLogArrayDiffs() + { + + } + + public function testLog_event() + { + + } +*/ + + + + } diff --git a/e107_tests/tests/unit/e_admin_uiTest.php b/e107_tests/tests/unit/e_admin_uiTest.php new file mode 100644 index 000000000..0c2362a7c --- /dev/null +++ b/e107_tests/tests/unit/e_admin_uiTest.php @@ -0,0 +1,294 @@ + array('text'=>"something", 'expected'=>"something"), + + ); + + + foreach($tests as $var) + { + $result = preg_replace('/[^\w\-:.]/', '', $var['text']); // this pattern used in parts of the admin-ui. + $this->assertEquals($var['expected'], $result); + //var_dump($result); + } + + // echo array_flip(get_defined_constants(true)['pcre'])[preg_last_error()]; + + + } + + + + +/* + public function testListEcolumnsTrigger() + { + + } + + public function testBatchTriggered() + { + + } + + public function testListBatchTrigger() + { + + } + + public function testGridBatchTrigger() + { + + } + + public function testHandleCommaBatch() + { + + } + + public function testListDeleteTrigger() + { + + } + + public function testBeforeDelete() + { + + } + + public function testAfterDelete() + { + + } + + public function testListHeader() + { + + } + + public function testListObserver() + { + + } + + public function testGridObserver() + { + + } + + public function testFilterAjaxPage() + { + + } + + public function testInlineAjaxPage() + { + + } + + public function testLogajax() + { + + } + + public function testSortAjaxPage() + { + + } + + public function testListPage() + { + + } + + public function testGridPage() + { + + } + + public function testListAjaxObserver() + { + + } + + public function testGridAjaxObserver() + { + + } + + public function testListAjaxPage() + { + + } + + public function testGridAjaxPage() + { + + } + + public function testEditObserver() + { + + } + + public function testEditCancelTrigger() + { + + } + + public function testEditSubmitTrigger() + { + + } + + public function testEditHeader() + { + + } + + public function testEditPage() + { + + } + + public function testCreateObserver() + { + + } + + public function testCreateCancelTrigger() + { + + } + + public function testCreateSubmitTrigger() + { + + } + + public function testBeforeCreate() + { + + } + + public function testAfterCreate() + { + + } + + public function testOnCreateError() + { + + } + + public function testBeforeUpdate() + { + + } + + public function testAfterUpdate() + { + + } + + public function testOnUpdateError() + { + + } + + public function testAfterCopy() + { + + } + + public function testAfterSort() + { + + } + + public function testRenderHelp() + { + + } + + public function testCreateHeader() + { + + } + + public function testCreatePage() + { + + } + + public function testPrefsSaveTrigger() + { + + } + + public function testPrefsObserver() + { + + } + + public function testPrefsPage() + { + + } + + public function testGetPrimaryName() + { + + } + + public function testGetTableName() + { + + } + + public function testGetValidationRules() + { + + } + + public function testGetDataFields() + { + + } + + public function testSetDropDown() + { + + } + + public function test_setModel() + { + + } + + public function test_setTreeModel() + { + + } + + public function test_setUI() + { + + }*/ + } diff --git a/e107_tests/tests/unit/e_arrayTest.php b/e107_tests/tests/unit/e_arrayTest.php new file mode 100644 index 000000000..64ac30ef5 --- /dev/null +++ b/e107_tests/tests/unit/e_arrayTest.php @@ -0,0 +1,172 @@ +arrObj = $this->make('e_array'); + } + catch (Exception $e) + { + $this->fail("Couldn't load e_array object"); + } + } + + + private function getSitePrefExample() + { + $data = ' +$data = array ( + \'email_password\' => \'$2y$10$IpizFx.gp5USl98SLXwwbeod3SYF3M3raAQX0y01ETexzoutvdyWW\', +); +'; + + + return (string) $data; + } + + + + +/* + public function testLoad() + { + + } +*/ + public function testUnserialize() + { + + $src = codecept_data_dir()."unserializeTest.log"; + $stringFile_0 = file_get_contents($src); + $actual = $this->arrObj->unserialize($stringFile_0); + $this->assertArrayHasKey('email_password', $actual); + + + // Check for legacy (corrupted) link-words preferences. + $src = codecept_data_dir()."unserializeTest2.log"; + $stringFile_1 = file_get_contents($src); + $actual = $this->arrObj->unserialize($stringFile_1); + $this->assertArrayHasKey('lw_context_visibility', $actual); + + + // Buggy value test -------. + $string_1 = "\$data = array( + \'buggy_array\' => \'some value\', + ); + "; + + $actual = $this->arrObj->unserialize($string_1); + $this->assertArrayHasKey('buggy_array', $actual); + + + // var_export format test with slashes ---- + $string_2 = "array(\'var_export\' => \'some value\',)"; + $actual = $this->arrObj->unserialize($string_2); + $this->assertArrayHasKey('var_export', $actual); + + + // var_export format test without slashes ---- + $string_3 = "array('var_export' => 'some value',)"; + $actual = $this->arrObj->unserialize($string_3); + $this->assertArrayHasKey('var_export', $actual); + + + // json value test. + $string_4 = '{ "json": "some value" }'; + $actual = $this->arrObj->unserialize($string_4); + $this->assertArrayHasKey('json', $actual); + + // case linkwords prefs. + $string_5 = "array ( + 'OLDDEFAULT' => '', + 'TITLE' => '', + 'SUMMARY' => 1, + 'BODY' => 1, + 'DESCRIPTION'=> 1, + 'USER_TITLE' => '', + 'USER_BODY' => 1, + 'LINKTEXT' => '', + 'RAWTEXT' => '' + )"; + + $actual = $this->arrObj->unserialize($string_5); + $this->assertArrayHasKey('TITLE', $actual); + + + define('e_DEBUG', true); + // case sitePrefs + // $string_6 = $this->getSitePrefExample(); + // $actual = $this->arrObj->unserialize($string_6); + + + $tests = array( + 0 => array('string' => $this->getSitePrefExample(), + 'expected' => array('email_password' => '$2y$10$IpizFx.gp5USl98SLXwwbeod3SYF3M3raAQX0y01ETexzoutvdyWW' ) + ), + + + + ); + + foreach($tests as $var) + { + $result = $this->arrObj->unserialize($var['string']); + $this->assertEquals($var['expected'], $result); + } + // var_dump($actual); + + } +/* + + public function testStore() + { + + } +*/ + public function testSerialize() + { + + $pref1 = array('hello'=>'world'); + $result1 = $this->arrObj->serialize($pref1); + $expected1 = "array (\n 'hello' => 'world',\n)"; + $this->assertEquals($expected1,$result1); + + $pref2 = array(); + $result2 = $this->arrObj->serialize($pref2); + $expected2 = null; + $this->assertEquals($expected2,$result2); + + + $pref3 = array(); + $result3 = $this->arrObj->serialize($pref3,true); + $expected3 = null; + $this->assertEquals($expected3,$result3); + + + $pref4 = array(); + $result4 = $this->arrObj->serialize($pref4,'json'); + $expected4 = null; + $this->assertEquals($expected4,$result4); + + $pref5 = array('hello'=>'world'); + $result5 = $this->arrObj->serialize($pref5,'json'); + $expected5 = "{\n \"hello\": \"world\"\n}"; + $this->assertEquals($expected5,$result5); + + } + } diff --git a/e107_tests/tests/unit/e_customfieldsTest.php b/e107_tests/tests/unit/e_customfieldsTest.php new file mode 100644 index 000000000..a56615d18 --- /dev/null +++ b/e107_tests/tests/unit/e_customfieldsTest.php @@ -0,0 +1,329 @@ +Rich text.<\/b><\/p>[\/html]", + "boolean": "1", + "checkboxes": "boat,plane", + "country": "ad", + "datestamp": "1484267751", + "dropdown": "red", + "email": "my@email.com", + "file": "{e_MEDIA_FILE}2016-04\/e107_banners.zip", + "icon": "fa-check.glyph", + "language": "fr", + "lanlist": "en", + "number": "0", + "password": "a8f5f167f44f4964e6c998dee827110c", + "tags": "tag1,tag2,tag3", + "textarea": "Plain text", + "url": "http:\/\/something.com", + "user": "1", + "userclass": "0", + "progressbar": "75" + }'; + + protected $posted = array ('__e_customfields_tabs__'=>"My New Tab", 'e-token' => '1dbda78672ac3b1bd8f73f8c158d0291', 'chapter_icon' => '', 'mediameta_chapter_icon' => '', 'chapter_parent' => '1', 'chapter_name' => 'Chapter 1', 'chapter_template' => 'default', 'chapter_meta_description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ut nunc ac neque egestas ullamcorper. In convallis semper hendrerit. Etiam non dolor nisl, varius facilisis dui. Nunc egestas massa nunc.', 'chapter_meta_keywords' => '', 'chapter_sef' => 'chapter-1', 'chapter_manager' => '0', 'chapter_order' => '0', 'chapter_visibility' => '0', 'chapter_fields' => array ( 0 => array ( 'key' => 'image', 'title' => 'Image', 'type' => 'image', 'writeParms' => '', 'help' => '', ), 1 => array ( 'key' => 'video', 'title' => 'Video', 'type' => 'video', 'writeParms' => '', 'help' => 'Youtube', ), 2 => array ( 'key' => 'bbarea', 'title' => 'WYSWIYG', 'type' => 'bbarea', 'writeParms' => '', 'help' => '', ), 3 => array ( 'key' => 'boolean', 'title' => 'Boolean', 'type' => 'boolean', 'writeParms' => '', 'help' => '', ), 4 => array ( 'key' => 'checkboxes', 'title' => 'Checkboxes', 'type' => 'checkboxes', 'writeParms' => '{ "default": "blank", "optArray": { "car": "Car", "boat": "Boat", "plane": "Plane" } }', 'help' => '', ), 5 => array ( 'key' => 'country', 'title' => 'Country', 'type' => 'country', 'writeParms' => '', 'help' => '', ), 6 => array ( 'key' => 'datestamp', 'title' => 'Datestamp', 'type' => 'datestamp', 'writeParms' => '', 'help' => '', ), 7 => array ( 'key' => 'dropdown', 'title' => 'Dropdown', 'type' => 'dropdown', 'writeParms' => '{ "default": "blank", "optArray": { "blue": "Blue", "green": "Green", "red": "Red" } }', 'help' => '', ), 8 => array ( 'key' => 'email', 'title' => 'Email', 'type' => 'email', 'writeParms' => '', 'help' => '', ), 9 => array ( 'key' => 'file', 'title' => 'File', 'type' => 'file', 'writeParms' => '', 'help' => '', ), 10 => array ( 'key' => 'icon', 'title' => 'Icon', 'type' => 'icon', 'writeParms' => '', 'help' => '', ), 11 => array ( 'key' => 'language', 'title' => 'Language', 'type' => 'language', 'writeParms' => '', 'help' => '', ), 12 => array ( 'key' => 'lanlist', 'title' => 'LanList', 'type' => 'lanlist', 'writeParms' => '', 'help' => '', ), 13 => array ( 'key' => 'number', 'title' => 'Number', 'type' => 'number', 'writeParms' => '', 'help' => '', ), 14 => array ( 'key' => 'password', 'title' => 'Password', 'type' => 'password', 'writeParms' => '', 'help' => '', ), 15 => array ( 'key' => 'radio', 'title' => 'Radio', 'type' => 'radio', 'writeParms' => '{ "optArray": { "yes": "Yes", "no": "No", "maybe": "Maybe" } }', 'help' => '', ), 16 => array ( 'key' => 'tags', 'title' => 'Tags', 'type' => 'tags', 'writeParms' => '', 'help' => '', ), 17 => array ( 'key' => 'textarea', 'title' => 'Textarea', 'type' => 'textarea', 'writeParms' => 'size=block-level', 'help' => '', ), 18 => array ( 'key' => 'url', 'title' => 'Url', 'type' => 'url', 'writeParms' => '', 'help' => '', ), 19 => array ( 'key' => 'user', 'title' => 'User', 'type' => 'user', 'writeParms' => '', 'help' => '', ), 20 => array ( 'key' => 'userclass', 'title' => 'Userclass', 'type' => 'userclass', 'writeParms' => '', 'help' => '', ), ), 'etrigger_submit' => 'update', '__after_submit_action' => 'list', 'submit_value' => '2', 'mode' => NULL, ); + + protected function _before() + { + try + { + $this->cf = $this->make('e_customfields'); + } + catch (Exception $e) + { + $this->fail("Couldn't load e_customfields object"); + } + + } + + public function testFieldValues() + { + $this->cf->loadConfig($this->config)->loadData($this->data); + + $data= $this->cf->getData(); + + $titles = array(); + + $titlesExpected = array ( + 0 => 'Image', + 1 => 'Video', + 2 => 'WYSWIYG', + 3 => 'Boolean', + 4 => 'Checkboxes', + 5 => 'Country', + 6 => 'Datestamp', + 7 => 'Dropdown', + 8 => 'Email', + 9 => 'File', + 10 => 'Icon', + 11 => 'Language', + 12 => 'LanList', + 13 => 'Number', + 14 => 'Password', + 15 => 'Tags', + 16 => 'Textarea', + 17 => 'Url', + 18 => 'User', + 19 => 'Userclass', + 20 => 'Progress Bar', + ); + + foreach($data as $ok=>$v) + { + + $titles[] = $this->cf->getFieldTitle($ok); + // echo ($title)."\n"; + $value = $this->cf->getFieldValue($ok); + $valueRaw = $this->cf->getFieldValue($ok, array('mode'=>'raw')); + } + + // check titles. + $this->assertEquals($titlesExpected,$titles); + + //@todo more tests for value and valueRaw. + + + + + + } + + +/* + public function testProcessConfigPost() + { + + } + + public function testGetTabId() + { + + } + + public function testGetFieldTypes() + { + + } + + public function testRenderConfigForm() + { + + } + + public function testGetFieldValue() + { + + } + + public function testSetAdminUIConfig() + { + + } + + public function testSetAdminUIData() + { + + } + + public function testGetFieldTitle() + { + + } + + public function testProcessDataPost() + { + + } + + public function testLoadConfig() + { + + } + + public function testRenderTest() + { + + } + + public function testSetTab() + { + + } + + public function testLoadData() + { + + } + + public function testGetConfig() + { + + } + + public function testGetTabLabel() + { + + } + + public function testGetData() + { + + }*/ + } diff --git a/e107_tests/tests/unit/e_dateTest.php b/e107_tests/tests/unit/e_dateTest.php new file mode 100644 index 000000000..51a15c601 --- /dev/null +++ b/e107_tests/tests/unit/e_dateTest.php @@ -0,0 +1,267 @@ +dateObj = $this->make('e_date'); + } + catch (Exception $e) + { + $this->fail("Couldn't load e_date object"); + } + + } + + + public function testToMask() + { + + $array = array( + + '%Y' => 'yyyy', // jquery-ui docs say 'yy' but yy produces '13' instead of '2013' + '%d' => 'dd', + '%m' => 'mm', + '%B' => 'MM', // Full month name, based on the locale + '%A' => 'DD', // A full textual representation of the day + + '%I' => 'HH', // Two digit representation of the hour in 12-hour format + '%H' => 'hh', // 24 hour format - leading zero + '%y' => 'yy', + '%M' => 'ii', // Two digit representation of the minute + '%S' => 'ss', // Two digit representation of the second + + '%a' => 'D', // An abbreviated textual representation of the day + '%b' => 'M', // Abbreviated month name, based on the locale + '%h' => 'M', // Abbreviated month name, based on the locale (an alias of %b) + + '%l' => 'H', // 12 hour format - no leading zero + + + + '%p' => 'P', // %p UPPER-CASE 'AM' or 'PM' based on the given time + '%P' => 'p', // %P lower-case 'am' or 'pm' based on the given time + + + // '%T' => 'hh:mm:ss', + // '%r' => "hh:mmm:ss TT" // 12 hour format + ); + + + $keys = array_keys($array); + // $values = array_values($array); + + $old = implode(" ",$keys); + + + $new = $this->dateObj->toMask($old); + + $expected = "yyyy dd mm MM DD HH hh yy ii ss D M M H P p"; + $this->assertEquals($expected,$new); + + + $expected = "%Y %d %m %B %A %I %H %y %M %S %a %b %b %l %p %P"; + $actual = $this->dateObj->toMask($new, true); + + $this->assertEquals($expected, $actual); + + + + $unix = strtotime('December 21, 2012 3:45pm'); + $strftime = "%A, %d %b, %Y %I:%M %p"; // expected Friday, 21 Dec, 2012 03:45 PM + $expected = "Friday, 21 Dec, 2012 03:45 PM"; + + // test strtotime mask (default) + $actual = $this->dateObj->convert_date($unix, $strftime); + $this->assertEquals($expected, $actual); + + // test DateTimePicker mask + $datepicker = $this->dateObj->toMask($strftime); + $actual2 = $this->dateObj->convert_date($unix, $datepicker); + $this->assertEquals($expected, $actual2); + + // test DateTime mask + $dateTime= $this->dateObj->toMask($strftime, 'DateTime'); + $d = new DateTime('@'.$unix); + $actual3 = $d->format($dateTime); + $this->assertEquals($expected, $actual3); + + + } + + public function testSupported() + { + $this->dateObj->supported(); // dumps info + } + + public function testIsValidTimezone() + { + // should exists + $result = $this->dateObj->isValidTimezone('Europe/Berlin'); + $this->assertTrue($result); + + // should not exist + $result = $this->dateObj->isValidTimezone('Europe/Bonn'); + $this->assertFalse($result); + } + + public function testBuildDateLocale() + { + $actual = $this->dateObj->buildDateLocale(); + + $this->assertStringContainsString('$.fn.datetimepicker.dates["en"]', $actual); + $this->assertStringContainsString('days: ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],', $actual); + $this->assertStringContainsString('monthsShort: ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],', $actual); + } + + public function testToTime() + { + // This tests fail on my machine. + // strptime substracts a month which results in the wrong time // BUG? + + $actual = $this->dateObj->toTime('2018/05/13', '%Y/%m/%d'); + $expected = mktime(0, 0,0,5, 13, 2018); + $this->assertEquals($expected, $actual); + + $actual = $this->dateObj->toTime('2018/05/13 20:10', '%Y/%m/%d %H:%M'); + $expected = mktime(20, 10,0,5, 13, 2018); + $this->assertEquals($expected, $actual); + } + + public function testDecodeDateTime() + { + $actual = $this->dateObj->decodeDateTime('09122003', 'date', 'dmy', false); + $expected = mktime(0, 0,0,12, 9, 2003); + $this->assertEquals($expected, $actual); + + $actual = $this->dateObj->decodeDateTime('153045', 'time', 'dmy', false); + $expected = mktime(15, 30,45,0, 0, 0); + $this->assertEquals($expected, $actual); + + $actual = $this->dateObj->decodeDateTime('09122003 153045', 'datetime', 'dmy', false); + $expected = mktime(15, 30,45,12, 9, 2003); + $this->assertEquals($expected, $actual); + } + + public function testComputeLapse() + { + $older = mktime(15, 30,45,12, 9, 2002); + $newer = mktime(14, 20,40,12, 11, 2003); + $actual = $this->dateObj->computeLapse($older, $newer, false, true, 'long'); + $expected = '1 year, 1 day, 22 hours, 49 minutes, 55 seconds ago'; + $this->assertEquals($expected, $actual); + + $actual = $this->dateObj->computeLapse($older, $newer, false, true, 'short'); + $expected = '1 year ago'; + $this->assertEquals($expected, $actual); + + $newer = strtotime("+2 weeks"); + $actual = $this->dateObj->computeLapse($newer, time(), false, true, 'short'); + $expected = 'in 2 weeks'; + $this->assertEquals($expected, $actual); + + $actual = $this->dateObj->computeLapse($newer, time(), true, true, 'short'); + $this->assertEquals(array(0=>'2 weeks'), $actual); + + $newer = strtotime("+10 seconds"); + $actual = $this->dateObj->computeLapse($newer, time(), false, true, 'long'); + $this->assertEquals("Just now", $actual); + } + + /** + * + */ + public function testStrptime() + { + + $actual = $this->dateObj->strptime('2018/05/13', '%Y/%m/%d'); + $expected = array( + 'tm_year' => 118, + 'tm_mon' => 4, + 'tm_mday' => 13, + 'tm_sec' => 0, + 'tm_min' => 0, + 'tm_hour' => 0, + 'unparsed' => '', + 'tm_fmon' => 'May', + 'tm_amon' => 'May', + 'tm_wday' => 0, + 'tm_yday' => 132, + ); + $this->assertEquals($expected, $actual); + + $actual = $this->dateObj->strptime('2018/05/13 20:10', '%Y/%m/%d %H:%M'); + $expected = array( + 'tm_year' => 118, + 'tm_mon' => 4, + 'tm_mday' => 13, + 'tm_hour' => 20, + 'tm_min' => 10, + 'tm_sec' => 0, + 'unparsed' => '', + 'tm_amon' => 'May', + 'tm_fmon' => 'May', + 'tm_wday' => 0, + 'tm_yday' => 132, + ); + $this->assertEquals($expected, $actual); + + } + + public function testConvert_date() + { + // will probably fail on windows + $actual = $this->dateObj->convert_date(mktime(12, 45, 03, 2, 5, 2018), 'long'); + $expected = 'Monday 05 February 2018 - 12:45:03'; + $this->assertEquals($expected, $actual); + + $actual = $this->dateObj->convert_date(mktime(12, 45, 03, 2, 5, 2018), 'inputtime'); + $expected = '12:45 PM'; + $this->assertEquals($expected, $actual); + } + + public function testTerms() + { + + $tests = array( + 0 => array('day-shortest', 'We'), + 1 => array('day-short', 'Wed'), + 2 => array('day', 'Wednesday'), + 3 => array('month', 'February'), + 4 => array('month-short', 'Feb'), + ); + + foreach($tests as $var) + { + list($input, $expected) = $var; + $data = $this->dateObj->terms($input); + $this->assertEquals($expected, $data[2]); + } + + } + + + + + + + + } diff --git a/e107_tests/tests/unit/e_db_abstractTest.php b/e107_tests/tests/unit/e_db_abstractTest.php new file mode 100644 index 000000000..3f52ecdfd --- /dev/null +++ b/e107_tests/tests/unit/e_db_abstractTest.php @@ -0,0 +1,1166 @@ +getModule('\Helper\DelayedDb'); + } + catch (Exception $e) + { + $this->fail("Couldn't load eHelper\DelayedDb object"); + } + + $config = array(); + $config['mySQLserver'] = $db->_getDbHostname(); + $config['mySQLuser'] = $db->_getDbUsername(); + $config['mySQLpassword'] = $db->_getDbPassword(); + $config['mySQLdefaultdb'] = $db->_getDbName(); + + $this->dbConfig = $config; + } + + public function testGetPDO() + { + $result = $this->db->getPDO(); + $this->assertTrue($result); + } + + + + + public function testGetMode() + { + $actual = $this->db->getMode(); + $this->assertEquals('NO_ENGINE_SUBSTITUTION', $actual); + } + + public function testDb_Connect() + { + $result = $this->db->db_Connect($this->dbConfig['mySQLserver'], $this->dbConfig['mySQLuser'], $this->dbConfig['mySQLpassword'], $this->dbConfig['mySQLdefaultdb']); + $this->assertTrue($result); + + $result = $this->db->db_Connect($this->dbConfig['mySQLserver'], $this->dbConfig['mySQLuser'], "wrong password", $this->dbConfig['mySQLdefaultdb']); + $this->assertEquals('e1', $result); + + $result = $this->db->db_Connect($this->dbConfig['mySQLserver'], $this->dbConfig['mySQLuser'], $this->dbConfig['mySQLpassword'], "wrong database"); + $this->assertEquals('e2', $result); + } + + public function testGetServerInfo() + { + + $result = $this->db->getServerInfo(); + $this->assertStringNotContainsString('?',$result); + } + + /** + * connect() test. + */ + public function testConnect() + { + $result = $this->db->connect($this->dbConfig['mySQLserver'], $this->dbConfig['mySQLuser'], "wrong Password"); + $this->assertFalse($result); + + $result = $this->db->connect($this->dbConfig['mySQLserver'], $this->dbConfig['mySQLuser'], $this->dbConfig['mySQLpassword']); + $this->assertTrue($result); + + $result = $this->db->connect($this->dbConfig['mySQLserver'].":3306", $this->dbConfig['mySQLuser'], $this->dbConfig['mySQLpassword']); + $this->assertTrue($result); + } + + public function testDatabase() + { + $this->db->connect($this->dbConfig['mySQLserver'], $this->dbConfig['mySQLuser'], $this->dbConfig['mySQLpassword']); + $result = $this->db->database($this->dbConfig['mySQLdefaultdb']); + + $this->assertTrue($result); + + $result = $this->db->database("missing_database"); + $this->assertFalse($result); + + $result = $this->db->database($this->dbConfig['mySQLdefaultdb'], MPREFIX, true); + $this->assertTrue($result); + $this->assertEquals("`".$this->dbConfig["mySQLdefaultdb"]."`.".\Helper\Unit::E107_MYSQL_PREFIX, + $this->db->mySQLPrefix); + } + + public function testDb_Mark_Time() + { + $this->db->debugMode(true); + + $this->db->db_Mark_Time("Testing"); + + $actual = e107::getDebug()->getTimeMarkers(); + + $this->assertTrue(is_array($actual)); + $this->assertEquals('Testing', $actual[1]['What']); + $this->assertArrayHasKey('Index', $actual[1]); + $this->assertArrayHasKey('Time', $actual[1]); + $this->assertArrayHasKey('Memory', $actual[1]); + + $this->db->debugMode(false); + $result = $this->db->db_Mark_Time("Testing"); + $this->assertNull($result); + + + } + + /* public function testMakeTableDef() + { + + $result = $this->db->makeTableDef('userclass_classes'); + + var_export($result); + }*/ + + + public function testDb_IsLang() + { + $result = $this->db->db_IsLang('news', false); + $this->assertEquals('news', $result); + + $this->db->copyTable('news','lan_spanish_news',true, true); + + e107::getConfig()->set('multilanguage',true)->save(); + + $this->db->setLanguage('Spanish'); + $this->db->resetTableList(); // reload the table list so it includes the copied table above. + + $result = $this->db->db_IsLang('news', false); + $this->assertEquals('lan_spanish_news', $result); + + + $result = $this->db->db_IsLang('news', true); + $expected = array ('spanish' => array ('e107_news' => 'e107_lan_spanish_news', ),); + $this->assertEquals($expected, $result); + + $this->db->setLanguage('English'); + + $this->db->dropTable('lan_spanish_news'); + } + + + + public function testDb_Write_log() + { + $log_type = 127; + $remark = 'e_db_abstractTest'; + $query = 'query goes here'; + + $this->db->db_Write_log($log_type, $remark, $query); + + $data = $this->db->retrieve('dblog','dblog_title, dblog_user_id', "dblog_type = ".$log_type. " AND dblog_title = '".$remark ."' "); + + $expected = array ( + 'dblog_title' => 'e_db_abstractTest', + 'dblog_user_id' => '1', + ); + + $this->assertEquals($expected, $data); + } + + + + public function testDb_Query() + { + + + $userp = "3, 'Display Name', 'Username', '', 'password-hash', '', 'email@address.com', '', '', 0, ".time().", 0, 0, 0, 0, 0, '127.0.0.1', 0, '', 0, 1, '', '', '0', '', ".time().", ''"; + $this->db->db_Query("REPLACE INTO ".MPREFIX."user VALUES ({$userp})" ); + + $res = $this->db->db_Query("SELECT user_email FROM ".MPREFIX."user WHERE user_id = 3"); + $result = $res->fetch(); + $this->assertEquals('email@address.com', $result['user_email']); + + // duplicate unique field 'media_cat_category', should return false/error. + $result = $this->db->db_Query("INSERT INTO ".MPREFIX."core_media_cat(media_cat_owner,media_cat_title,media_cat_category,media_cat_sef,media_cat_diz,media_cat_class,media_cat_image,media_cat_order) SELECT media_cat_owner,media_cat_title,media_cat_category,media_cat_sef,media_cat_diz,media_cat_class,media_cat_image,media_cat_order FROM ".MPREFIX."core_media_cat WHERE media_cat_id = 1"); + $err = $this->db->getLastErrorText(); + $this->assertFalse($result, $err); + } + + + public function testRetrieve() + { + $expected = array ('user_id' => '1', 'user_name' => 'e107', ); + $result = $this->db->retrieve('user', 'user_id, user_name', 'user_id = 1'); + $this->assertEquals($expected,$result); + + + $result = $this->db->retrieve('user', 'missing_field, user_name', 'user_id = 1'); + $this->assertEquals(array(),$result); + + $result = $this->db->retrieve('user', 'missing_field', 'user_id = 1'); + $this->assertEmpty($result); + + $this->db->select('user', 'user_id, user_name', 'user_id = 1'); + $result = $this->db->retrieve(null); + $this->assertEquals($expected,$result); + + + $expected = array ( 0 => array ( 'user_id' => '1', 'user_name' => 'e107', ),); + $result = $this->db->retrieve('user', 'user_id, user_name', 'user_id = 1', true); + $this->assertEquals($expected,$result); + + + $result = $this->db->retrieve("SELECT user_id, user_name FROM #user WHERE user_id = 1", true); + $this->assertEquals($expected,$result); + + + $expected = array(); + $result = $this->db->retrieve('missing_table', 'user_id, user_name', 'user_id = 1', true); + $this->assertEquals($expected,$result); + + $this->db->select('plugin'); + $result = $this->db->retrieve(null, null, null, true); + $this->assertArrayHasKey('plugin_name', $result[14]); + + $result = $this->db->retrieve('plugin', '*', null, true); + $this->assertArrayHasKey('plugin_name', $result[14]); + + + $result = $this->db->retrieve('plugin', 'plugin_id, plugin_name, plugin_path', '', true, 'plugin_path'); + $this->assertArrayHasKey('banner', $result); + $this->assertArrayHasKey('plugin_name', $result['banner']); + + // Fetch only mode + $this->db->select('plugin'); + $result = $this->db->retrieve(null, 'plugin_id, plugin_name, plugin_path', '', true, 'plugin_path'); + $this->assertArrayHasKey('banner', $result); + $this->assertArrayHasKey('plugin_name', $result['banner']); + + } + + public function testSelect() + { + + $result = $this->db->select('user', 'user_id, user_name', 'user_id = 1'); + $this->assertEquals(1, $result); + + $result = $this->db->select('user', 'user_id, user_name', 'user_id = 999'); + $this->assertEquals(0, $result); + + $result = $this->db->select('user', 'user_id, user_name', 'WHERE user_id = 1', true); + $this->assertEquals(1, $result); + + } + + public function testDb_Select() + { + $result = $this->db->db_Select('user', 'user_id, user_name', 'user_id = 1'); + $this->assertEquals(1, $result); + + $result = $this->db->db_Select('user', 'user_id, user_name', 'user_id = 999'); + $this->assertEquals(0, $result); + + $result = $this->db->db_Select('user', 'user_id, user_name', 'WHERE user_id = 1', true); + $this->assertEquals(1, $result); + + $result = $this->db->db_Select('user', 'missing_field, user_name', 'WHERE user_id = 1', true); + $this->assertFalse($result); + + + $result = $this->db->db_Select('user', 'user_id', 'WHERE user_id = 1', true, true); // debug enabled + $log = e107::getDebug()->getLog(); + $this->assertEquals(1, $result); + + $found = false; + foreach($log as $val) + { + if($val['Message'] === "SELECT user_id FROM e107_user WHERE user_id = 1") + { + $found = true; + } + } + + $this->assertTrue($found, "Couldn't find debug log message for db_Select() item."); + + } + + + public function testDb_Select_gen() + { + $this->db->db_Select_gen( + "UPDATE `#user` SET user_signature = 'something else' WHERE user_id = 1" + ); + $result = $this->db->db_Select_gen( + "UPDATE `#user` SET user_signature = 'e_db' WHERE user_id = 1" + ); + $this->assertEquals(1,$result); + $result = $this->db->db_Select_gen( + "UPDATE `#user` SET user_signature = 'e_db' WHERE user_id = 1" + ); + $this->assertEquals(0,$result); + + + $qry = "INSERT INTO #core_media_cat(media_cat_owner,media_cat_title,media_cat_sef,media_cat_diz,media_cat_class,media_cat_image,media_cat_order) SELECT media_cat_owner,media_cat_title,media_cat_sef,media_cat_diz,media_cat_class,media_cat_image,media_cat_order FROM #core_media_cat WHERE media_cat_id = 1"; + $this->db->db_Select_gen($qry); + + + $qry = "INSERT INTO #core_media_cat(media_cat_owner,media_cat_title,media_cat_sef,media_cat_diz,media_cat_class,media_cat_image,media_cat_order) SELECT media_cat_owner,media_cat_title,media_cat_sef,media_cat_diz,media_cat_class,media_cat_image,media_cat_order FROM #core_media_cat WHERE media_cat_id = 1"; + $result = $this->db->db_Select_gen($qry); + $this->assertFalse($result); + // $error = $this->db->getLastErrorText(); + + $result = $this->db->db_Query("INSERT INTO ".MPREFIX."core_media_cat(media_cat_owner,media_cat_title,media_cat_category,media_cat_sef,media_cat_diz,media_cat_class,media_cat_image,media_cat_order) SELECT media_cat_owner,media_cat_title,media_cat_category,media_cat_sef,media_cat_diz,media_cat_class,media_cat_image,media_cat_order FROM ".MPREFIX."core_media_cat WHERE media_cat_id = 1"); + $err = $this->db->getLastErrorText(); + $this->assertFalse($result, $err); + + + } + + public function testInsert() + { + // Test 1 + $actual = $this->db->insert('tmp', array('tmp_ip' => '127.0.0.1', 'tmp_time' => '12345435', 'tmp_info' => 'Insert test')); + $this->assertEquals(1, $actual, 'Unable to add record to table #tmp'); + + // Test 2 Verify content + $expected = array( + 'tmp_ip' => '127.0.0.1', + 'tmp_time' => '12345435', + 'tmp_info' => 'Insert test' + ); + $actual = $this->db->retrieve('tmp', '*','tmp_ip = "127.0.0.1" AND tmp_time = 12345435'); + $this->assertEquals($expected, $actual, 'Inserted content doesn\'t match the retrieved content'); + + // Test with auto-update on duplicate key found. + $insert = array( + 'media_cat_category' => '_common_image', // unique key. + 'media_cat_diz' => "modified by e_db_abstractTest->insert test", + '_DUPLICATE_KEY_UPDATE' => true + ); + + $this->db->insert('core_media_cat', $insert); + $actual = $this->db->retrieve('core_media_cat', 'media_cat_diz','media_cat_category = "_common_image" '); + $this->assertEquals("modified by e_db_abstractTest->insert test", $actual); + + } + + + public function testIndex() + { + $result = $this->db->index('plugin', 'plugin_path'); + $this->assertTrue($result); + + } + + public function testLastInsertId() + { + $insert = array( + 'gen_id' => 0, + 'gen_type' => 'whatever', + 'gen_datestamp' => time(), + 'gen_user_id' => 1, + 'gen_ip' => '127.0.0.1', + 'gen_intdata' => '', + 'gen_chardata' => '' + ); + + $this->db->insert('generic', $insert); + $actual = $this->db->lastInsertId(); + $this->assertGreaterThan(0,$actual); + + } + + public function testFoundRows() + { + $this->db->debugMode(false); + $this->db->gen('SELECT SQL_CALC_FOUND_ROWS * FROM `#user` WHERE user_id = 1'); + $row = $this->db->fetch(); + $this->assertArrayHasKey('user_name', $row); + $result = $this->db->foundRows(); + $this->assertEquals(1, $result); + + } + + public function testDb_Rows() + { + $this->db->retrieve('plugin', '*'); + $result = $this->db->db_Rows(); + + $this->assertGreaterThan(10,$result); + + } + + public function testDb_Insert() + { + $actual = $this->db->db_Insert('tmp', array('tmp_ip' => '127.0.0.1', 'tmp_time' => time(), 'tmp_info' => 'test 2')); + $this->assertTrue($actual); +// + $this->db->debugMode(true);// todo causes a hang while testing. (see db_Query() ) + $actual = $this->db->db_Insert('missing_table', array('tmp_ip' => '127.0.0.1', 'tmp_time' => time(), 'tmp_info' => 'test 2')); + $this->assertFalse($actual); + $this->db->debugMode(false); + + } + + public function testReplace() + { + $insert = array( + 'gen_id' => 1, + 'gen_type' => 'whatever', + 'gen_datestamp' => time(), + 'gen_user_id' => 1, + 'gen_ip' => '127.0.0.1', + 'gen_intdata' => '', + 'gen_chardata' => '' + ); + + $result = $this->db->replace('generic', $insert); + + $this->assertNotEmpty($result); + + } + + public function testDb_Replace() + { + $insert = array( + 'gen_id' => 1, + 'gen_type' => 'whatever', + 'gen_datestamp' => time(), + 'gen_user_id' => 1, + 'gen_ip' => '127.0.0.1', + 'gen_intdata' => '', + 'gen_chardata' => '' + ); + + $result = $this->db->db_Replace('generic', $insert); + + $this->assertNotEmpty($result); + } + + public function testUpdate() + { + $db = $this->db; + + $db->delete('tmp'); + + // Test 1 + $expected = $db->update('tmp', array('tmp_ip' => '127.0.0.1', 'tmp_time' => time(), 'tmp_info' => 'Update test 1', 'WHERE' => 'tmp_ip="127.0.0.1"')); + $this->assertEmpty($expected, "Test 1 update() failed (not empty {$expected})"); + + $actual = 1; + // Test 2 + $db->insert('tmp', array('tmp_ip' => '127.0.0.1', 'tmp_time' => time(), 'tmp_info' => 'test 2')); + $expected = $db->update('tmp', array('tmp_ip' => '127.0.0.1', 'tmp_time' => '1234567', 'tmp_info' => 'Update test 2a', 'WHERE' => 'tmp_ip="127.0.0.1"')); + $this->assertEquals($expected, $actual, "Test 2 update() failed ({$actual} != {$expected}"); + + // Test 3 + $expected = $db->update('tmp', 'tmp_ip = "127.0.0.1", tmp_time = tmp_time + 1, tmp_info = "Update test 3" WHERE tmp_ip="127.0.0.1"'); + $this->assertEquals($expected, $actual, "Test 3 update() failed ({$actual} != {$expected}"); + + // Test 4: Verify content + $expected = array( + 'tmp_ip' => '127.0.0.1', + 'tmp_time' => '1234568', + 'tmp_info' => 'Update test 3' + ); + $actual = $this->db->retrieve('tmp', '*','tmp_ip = "127.0.0.1"'); + $this->assertEquals($expected, $actual, 'Test 4: Updated content doesn\'t match the retrieved content'); + + // Test for Error response. + $actual = $this->db->update('tmp', 'tmp_ip = "127.0.0.0 WHERE tmp_ip = "125.123.123.13"'); + $this->assertFalse($actual); + + } + + public function testDb_Update() + { + $this->db->delete('tmp', "tmp_ip = '127.0.0.1'"); + $this->db->insert('tmp', array('tmp_ip' => '127.0.0.1', 'tmp_time' => time(), 'tmp_info' => 'test 2')); + $actual = $this->db->db_Update('tmp', 'tmp_ip = "127.0.0.1", tmp_time = tmp_time + 1, tmp_info = "test 3" WHERE tmp_ip="127.0.0.1"'); + $this->assertEquals(1,$actual); + } + /* + public function test_getTypes() + { + + } + + public function test_getFieldValue() + { + + } + */ + public function testDb_QueryCount() + { + $this->db->select('user', '*'); + $this->db->select('plugin','*'); + + $result = $this->db->db_QueryCount(); + $this->assertGreaterThan(1,$result); + + } + + + public function testGetLastQuery() + { + $this->db->select('user'); + $result = $this->db->getLastQuery(); + $this->assertEquals("SELECT * FROM e107_user", $result); + } + + + public function testDb_UpdateArray() + { + + $array = array( + 'user_comments' => 28, + ); + + $result = $this->db->db_UpdateArray('user', $array, ' WHERE user_id = 1'); + + $this->assertEquals(1,$result); + + $actual = $this->db->retrieve('user', 'user_comments', 'user_id = 1'); + + $expected = '28'; + + $this->assertEquals($expected,$actual); + + $reset = array( + 'user_comments' => 0, + 'WHERE'=> "user_id = 1" + ); + + $this->db->update('user', $reset); + + + } + + public function testTruncate() + { + $this->db->truncate('generic'); + + $count = $this->db->count('generic'); + + $this->assertEquals(0, $count); + + } + + /* + public function testFetch() + { + + } + */ + public function testDb_Fetch() + { + $this->db->select('user', '*', 'user_id = 1'); + $row = $this->db->db_Fetch(); + $this->assertArrayHasKey('user_ip', $row); + + $qry = 'SHOW CREATE TABLE `'.MPREFIX."user`"; + $this->db->gen($qry); + + $row = $this->db->db_Fetch('num'); + $this->assertEquals('e107_user', $row[0]); + + $check = (strpos($row[1], "CREATE TABLE `e107_user`") !== false); + $this->assertTrue($check); + + $this->db->select('user', '*', 'user_id = 1'); + $row = $this->db->db_Fetch(); + $this->assertEquals("e107", $row['user_name']); + $this->assertNull($row[0]); + $this->assertNull($row[1]); + + // legacy tests + $this->db->select('user', '*', 'user_id = 1'); + $row = $this->db->db_Fetch(MYSQL_ASSOC); + $this->assertArrayHasKey('user_ip', $row); + + $qry = 'SHOW CREATE TABLE `'.MPREFIX."user`"; + $this->db->gen($qry); + + $row = $this->db->db_Fetch(MYSQL_NUM); + $this->assertEquals('e107_user', $row[0]); + + $this->db->select('user', '*', 'user_id = 1'); + $row = $this->db->db_Fetch(MYSQL_BOTH); + $this->assertEquals("e107", $row['user_name']); + $this->assertEquals("e107", $row[1]); + + } + + + public function testDb_Count() + { + $count = $this->db->count('user'); + $this->assertGreaterThan(0, $count); + + $result = $this->db->db_Count('user','(*)', 'user_id = 1'); + $this->assertEquals(1,$result); + + $result = $this->db->db_Count('SELECT COUNT(*) FROM '.MPREFIX.'plugin ','generic'); + $this->assertGreaterThan(20, $result); + + $result = $this->db->db_Count('user','(*)', 'user_missing = 1'); + $this->assertFalse($result); + + $result = $this->db->db_Count('SELECT COUNT(*) FROM '.MPREFIX.'missing ','generic'); + $this->assertFalse($result); + } + /* + public function testClose() + { + + } + */ + public function testDb_Close() + { + $this->db->db_Close(); + + } + + public function testDelete() + { + // make sure the table is empty + // table may contain data, so number of deleted records is unknown, + // but should always be >= 0 + $actual = $this->db->delete('tmp'); + $this->assertGreaterThanOrEqual(0, $actual, 'Unable to empty the table.'); + + // Check if the returned value is equal to the number of affected records + $expected = $actual; + $actual = $this->db->rowCount(); + $this->assertEquals($expected, $actual, "Number of deleted records is wrong ({$expected} != {$actual}"); + + // Insert some records + $this->db->insert('tmp', array('tmp_ip' => '127.0.0.1', 'tmp_time' => time(), 'tmp_info' => 'Delete test 1')); + $this->db->insert('tmp', array('tmp_ip' => '127.0.0.2', 'tmp_time' => time(), 'tmp_info' => 'Delete test 2')); + $this->db->insert('tmp', array('tmp_ip' => '127.0.0.3', 'tmp_time' => time(), 'tmp_info' => 'Delete test 3')); + + // Count records + $expected = 3; + $actual = $this->db->count('tmp'); + $this->assertEquals($expected, $actual, "Number of inserted records is wrong ({$expected} != {$actual}"); + + // Delete 1 record + $expected = 1; + $actual = $this->db->delete('tmp', 'tmp_ip="127.0.0.1"'); + $this->assertEquals($expected, $actual, 'Unable to delete 1 records.'); + + // Check if the returned value is equal to the number of affected records + $expected = $actual; + $actual = $this->db->rowCount(); + $this->assertEquals($expected, $actual, "Number of deleted records is wrong ({$expected} != {$actual}"); + + // Delete all remaining (2) records + $expected = 2; + $actual = $this->db->delete('tmp'); + $this->assertEquals($expected, $actual, 'Unable to delete the remaining records.'); + + // Check if the returned value is equal to the number of affected records + $expected = $actual; + $actual = $this->db->rowCount(); + $this->assertEquals($expected, $actual, "Number of deleted records is wrong ({$expected} != {$actual}"); + + // Delete from an table that doesn't exist + $actual = $this->db->delete('tmp_unknown_table'); + $this->assertFalse($actual, 'Trying to delete records from an invalid table should return FALSE!'); + } + + public function testDb_Delete() + { + $expected = $this->db->count('tmp'); + $actual = $this->db->db_Delete('tmp'); + $this->assertEquals($expected, $actual, 'Unable to delete all records.'); + } + + + public function testDb_SetErrorReporting() + { + $this->db->db_SetErrorReporting(false); + // fixme - getErrorReporting. + } + + /* + public function testMl_check() + { + + } + + + */ + public function testDb_getList() + { + $this->db->select('plugin', '*'); + $rows = $this->db->db_getList(); + $this->assertArrayHasKey('plugin_name', $rows[2]); + } + + + public function testMax() + { + $insert = array( + 'gen_id' => 0, + 'gen_type' => 'testMax', + 'gen_datestamp' => time(), + 'gen_user_id' => 333, + 'gen_ip' => '127.0.0.1', + 'gen_intdata' => '', + 'gen_chardata' => '' + ); + + $this->db->insert('generic', $insert); + + + $insert = array( + 'gen_id' => 0, + 'gen_type' => 'testMax', + 'gen_datestamp' => time(), + 'gen_user_id' => 555, + 'gen_ip' => '127.0.0.1', + 'gen_intdata' => '', + 'gen_chardata' => '' + ); + + $this->db->insert('generic', $insert); + + + $result = $this->db->max('generic', 'gen_user_id'); + $this->assertEquals('555', $result); + + $result = $this->db->max('generic', 'gen_user_id'); + $this->assertEquals('555', $result, "gen_ip = '127.0.0.1'"); + + $result = $this->db->max('generic', 'gen_user_id', "gen_ip = '127.0.0.1'"); + $this->assertEquals('555', $result); + + + } + + + /* + public function testSelectTree() + { + + } + + public function testDb_Query_all() + { + + } + */ + public function testDb_FieldList() + { + $result = $this->db->db_FieldList('user'); + $this->assertEquals('user_id', $result[0]); + + $result = $this->db->db_FieldList('user', null, true); + $this->assertEquals('user_id', $result['user_id']); + + $result = $this->db->db_FieldList('missing_table'); + $this->assertFalse($result); + + } + + public function testDb_Field() + { + $result = $this->db->db_Field('plugin', 'plugin_path'); + $this->assertTrue($result); + + $result = $this->db->db_Field('plugin', 2); + $this->assertEquals('plugin_version', $result); + + } + + public function testColumnCount() + { + $this->db->select('user'); + $result = $this->db->columnCount(); + $this->assertEquals(27, $result); + + } + + public function testField() + { + $result = $this->db->field('plugin', 'plugin_path'); + $this->assertTrue($result); + } + + public function testEscape() + { + $result = $this->db->escape(123); + $this->assertEquals(123,$result); + + $result = $this->db->escape("Can't", true); + $this->assertEquals("Can't", $result); + + } + + + + public function testDb_Table_exists() + { + $result = $this->db->db_Table_exists('plugin'); + $this->assertTrue($result); + + $result = $this->db->db_Table_exists('plugin', 'French'); + $this->assertFalse($result); + + $result = $this->db->db_Table_exists('plugin', 'English'); + $this->assertFalse($result); + } + + public function testIsEmpty() + { + $result = $this->db->isEmpty('plugin'); + $this->assertFalse($result); + + $result = $this->db->isEmpty('comments'); + $this->assertTrue($result); + + $result = $this->db->isEmpty(); + $this->assertFalse($result); + + } + + public function testDb_ResetTableList() + { + $this->db->db_ResetTableList(); + } + + public function testDb_TableList() + { + $list = $this->db->db_TableList(); + + $present = in_array('banlist', $list); + $this->assertTrue($present); + + $list = $this->db->db_TableList('nologs'); + $present = in_array('admin_log', $list); + $this->assertFalse($present); + + $list = $this->db->db_TableList('lan'); + $this->assertEmpty($list); + + $list = $this->db->db_TableList('invalid'); + $this->assertEmpty($list); + } + + public function testTables() + { + $list = $this->db->tables(); + + if(empty($list)) + { + $error = $this->db->getLastQuery(); + $this->assertNotEmpty($list,"tables() didn't return a list of database tables.\n".$error); + } + + $present = in_array('banlist', $list); + $this->assertTrue($present); + + $list = $this->db->tables('nologs'); + $present = in_array('admin_log', $list); + $this->assertFalse($present); + + } + + public function testDb_CopyRow() + { + $result = $this->db->db_CopyRow('news', '*', "news_id = 1"); + $this->assertGreaterThan(1,$result); + + $result = $this->db->db_CopyRow('bla'); + $this->assertFalse($result); + + $result = $this->db->db_CopyRow('bla', 'non_exist', "news_id = 1"); + $this->assertFalse($result); + + $result = $this->db->db_CopyRow(null); + $this->assertFalse($result); + + $result = $this->db->db_CopyRow('news', null); + $this->assertFalse($result); + } + + public function testDb_CopyTable() + { + $this->db->db_CopyTable('news', 'news_bak', false, true); + $result = $this->db->retrieve('news_bak', 'news_title', 'news_id = 1'); + + $this->assertEquals('Welcome to e107', $result); + + + $result = $this->db->db_CopyTable('non_exist', 'news_bak', false, true); + $this->assertFalse($result); + + } + + + public function testBackup() + { + $opts = array( + 'gzip' => false, + 'nologs' => false, + 'droptable' => false, + ); + + $result = $this->db->backup('user,core_media_cat', null, $opts); + $uncompressedSize = filesize($result); + + $tmp = file_get_contents($result); + + $this->assertStringNotContainsString("DROP TABLE IF EXISTS `e107_user`;", $tmp); + $this->assertStringContainsString("CREATE TABLE `e107_user` (", $tmp); + $this->assertStringContainsString("INSERT INTO `e107_user` VALUES (1", $tmp); + $this->assertStringContainsString("CREATE TABLE `e107_core_media_cat`", $tmp); + + $result = $this->db->backup('*', null, $opts); + $size = filesize($result); + $this->assertGreaterThan(100000,$size); + + $opts = array( + 'gzip' => true, + 'nologs' => false, + 'droptable' => false, + ); + + $result = $this->db->backup('user,core_media_cat', null, $opts); + $compressedSize = filesize($result); + $this->assertLessThan($uncompressedSize, $compressedSize); + + $result = $this->db->backup('missing_table', null, $opts); + $this->assertFalse($result); + + } + + + public function testGetLanguage() + { + $result = $this->db->getLanguage(); + $this->assertEquals('English', $result); + + $this->db->setLanguage('French'); + $result = $this->db->getLanguage(); + $this->assertEquals('French', $result); + + } + /* + public function testDbError() + { + + } + */ + public function testGetLastErrorNumber() + { + $this->db->select('doesnt_exists'); + $result = $this->db->getLastErrorNumber(); + $this->assertEquals("42S02", $result); + + } + + public function testGetLastErrorText() + { + $this->db->select('doesnt_exists'); + $result = $this->db->getLastErrorText(); + + $actual = (strpos($result,"doesn't exist")!== false ); + + $this->assertTrue($actual); + } + + public function testResetLastError() + { + $this->db->select('doesnt_exists'); + $this->db->resetLastError(); + + $num = $this->db->getLastErrorNumber(); + $this->assertEquals(0, $num); + + } + /* + public function testGetLastQuery() + { + + } + */ + + + public function testGetFieldDefs() + { + $actual = $this->db->getFieldDefs('plugin'); + + $expected = array ( + '_FIELD_TYPES' => + array ( + 'plugin_id' => 'int', + 'plugin_name' => 'escape', + 'plugin_version' => 'escape', + 'plugin_path' => 'escape', + 'plugin_installflag' => 'int', + 'plugin_addons' => 'escape', + 'plugin_category' => 'escape', + ), + '_NOTNULL' => + array ( + 'plugin_id' => '', + 'plugin_addons' => '', + ), + ); + + $this->assertEquals($expected, $actual); + + + //$actual = $this->db->getFieldDefs('userclass_classes'); + //var_dump($actual); + } + + + /** + * @desc Test primary methods against a secondary database instance (ensures mysqlPrefix is working correctly) + */ + public function testSecondaryDatabaseInstance() + { + + try + { + $xql = $this->makeDb(); + } + catch (Exception $e) + { + $this->fail("Couldn't load e_db object"); + } + + $xql->__construct(); + + $config = e107::getMySQLConfig(); + + $database = $config['mySQLdefaultdb']; + $table = 'test'; + $MPREFIX = 'another_prefix_'; + + // use new database + $use = $xql->database($database,$MPREFIX,true); + + if($use === false) + { + $this->fail("Failed to select new database"); + } + + $create = "CREATE TABLE `".$database."`.".$MPREFIX.$table." ( + `test_id` int(4) NOT NULL AUTO_INCREMENT, + `test_var` varchar(255) NOT NULL, + PRIMARY KEY (`test_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8; + "; + + // cleanup + $xql->gen("DROP TABLE IF EXISTS `$database`.{$MPREFIX}{$table}"); + + // create table + if(!$xql->gen($create)) + { + $this->fail("Failed to create table in secondary database"); + } + + if(!$res = $xql->db_FieldList($table)) + { + $err = $xql->getLastErrorText(); + $this->fail("Failed to get field list from secondary database:\n".$err); + + } + + $this->assertEquals('test_id', $res[0]); + + if(!$tabs = $xql->tables()) + { + $err = $xql->getLastQuery(); + $this->fail("Failed to get table list from secondary database:\n".$err); + } + + + // Insert + $arr = array('test_id'=>0, 'test_var'=>'Example insert'); + if(!$xql->insert($table, $arr)) + { + $err = $xql->getLastErrorText(); + $this->fail("Failed to insert into secondary database: ".$err); + } + + // Copy Row. + if(!$copied = $xql->db_CopyRow($table, '*', "test_id = 1")) + { + $err = $xql->getLastErrorText(); + $this->fail("Failed to copy row into secondary database table: ".$err); + } + + + // Select + if(!$xql->select($table,'*','test_id !=0')) + { + $err = $xql->getLastErrorText(); + $this->fail("Failed to select from secondary database: ".$err); + } + + + // fetch + $row = $xql->fetch(); + $this->assertNotEmpty($row['test_var'], "Failed to fetch from secondary database"); + $this->assertEquals('Example insert',$row['test_var'], $xql->getLastErrorText()); + + + // update + $upd = array('test_var' => "Updated insert",'WHERE' => "test_id = 1"); + if(!$xql->update($table,$upd)) + { + $err = $xql->getLastErrorText(); + $this->fail("Failed to update secondary database table: ".$err); + } + + // update (legacy) + $upd2 = $xql->update($table, "test_var = 'Updated legacy' WHERE test_id = 1"); + $this->assertNotEmpty($upd2, "UPDATE (legacy) failed on secondary database table: ".$xql->getLastErrorText()); + + + // primary database retrieve + $username = $this->db->retrieve('user','user_name', 'user_id = 1'); + $this->assertNotEmpty($username, "Lost connection with primary database."); + + + // count + $count = $xql->count($table, "(*)", "test_id = 1"); + $this->assertNotEmpty($count, "COUNT failed on secondary database table: ".$xql->getLastErrorText()); + + // delete + if(!$xql->delete($table, "test_id = 1")) + { + $err = $xql->getLastErrorText(); + $this->fail("Failed to delete secondary database table row: ".$err); + } + + // Truncate & isEmpty + $xql->truncate($table); + $empty = $xql->isEmpty($table); + $this->assertTrue($empty,"isEmpty() or truncate() failed"); + + + + } + +} diff --git a/e107_tests/tests/unit/e_db_mysqlTest.php b/e107_tests/tests/unit/e_db_mysqlTest.php new file mode 100644 index 000000000..441dc10e7 --- /dev/null +++ b/e107_tests/tests/unit/e_db_mysqlTest.php @@ -0,0 +1,47 @@ +make('e_db_mysql'); + } + + protected function _before() + { + require_once(e_HANDLER."mysql_class.php"); + try + { + $this->db = $this->makeDb(); + } + catch (Exception $e) + { + $this->fail("Couldn't load e_db_mysql object"); + } + + + // Simulate PHP 5.6 + define('MYSQL_ASSOC', 1); + define('MYSQL_NUM', 2); + define('MYSQL_BOTH', 3); + $this->db->__construct(); + $this->loadConfig(); + + } + + public function testGetServerInfo() + { + $result = $this->db->getServerInfo(); + // This implementation always returns "?". + $this->assertEquals('?',$result); + } +} diff --git a/e107_tests/tests/unit/e_db_pdoTest.php b/e107_tests/tests/unit/e_db_pdoTest.php new file mode 100644 index 000000000..630d707a6 --- /dev/null +++ b/e107_tests/tests/unit/e_db_pdoTest.php @@ -0,0 +1,170 @@ +make('e_db_pdo'); + } + + protected function _before() + { + require_once(e_HANDLER."e_db_interface.php"); + require_once(e_HANDLER."e_db_legacy_trait.php"); + require_once(e_HANDLER."e_db_pdo_class.php"); + try + { + $this->db = $this->makeDb(); + } + catch (Exception $e) + { + $this->fail("Couldn't load e_db_pdo object"); + } + + $this->db->__construct(); + $this->loadConfig(); + + } + + public function testGetCharSet() + { + $this->db->setCharset(); + $result = $this->db->getCharset(); + + $this->assertEquals('utf8', $result); + } + + /** + * PDO-exclusive feature: Select with argument bindings + * @see e_db_abstractTest::testSelect() + */ + public function testSelectBind() + { + $result = $this->db->select('user', 'user_id, user_name', 'user_id=:id OR user_name=:name ORDER BY user_name', array('id' => 999, 'name'=>'e107')); // bind support. + $this->assertEquals(1, $result); + } + + /** + * PDO-exclusive feature: Query with argument bindings + * @see e_db_abstractTest::testDb_Query() + */ + public function testDb_QueryBind() + { + $query = array ( + 'PREPARE' => 'INSERT INTO '.MPREFIX.'tmp (`tmp_ip`,`tmp_time`,`tmp_info`) VALUES (:tmp_ip, :tmp_time, :tmp_info)', + 'BIND' => + array( + 'tmp_ip' => + array( + 'value' => '127.0.0.1', + 'type' => PDO::PARAM_STR, + ), + 'tmp_time' => + array( + 'value' => 12345435, + 'type' => PDO::PARAM_INT, + ), + 'tmp_info' => + array( + 'value' => 'Insert test', + 'type' => PDO::PARAM_STR, + ), + ), + ); + + + $result = $this->db->db_Query($query, null, 'db_Insert'); + $this->assertGreaterThan(0,$result); + + + + $query = array( + 'PREPARE' => 'SELECT * FROM '.MPREFIX.'user WHERE user_id=:user_id AND user_name=:user_name', + 'EXECUTE' => array( + 'user_id' => 1, + 'user_name' => 'e107' + ) + ); + + + $res = $this->db->db_Query($query, null, 'db_Select'); + $result = $res->fetch(); + $this->assertArrayHasKey('user_password', $result); + } + + /** + * PDO-exclusive feature: Copy row and keep unique keys unique + * @see e_db_abstractTest::testDb_Query() + * @see https://github.com/e107inc/e107/issues/3678 + */ + public function testDb_CopyRowUnique() + { + // test with table that has unique keys. + $result = $this->db->db_CopyRow('core_media_cat', '*', "media_cat_id = 1"); + $qry = $this->db->getLastErrorText(); + $this->assertGreaterThan(1,$result, $qry); + + // test with table that has unique keys. (same row again) - make sure copyRow duplicates it regardless. + $result = $this->db->db_CopyRow('core_media_cat', '*', "media_cat_id = 1"); + $qry = $this->db->getLastErrorText(); + $this->assertGreaterThan(1,$result, $qry); + } + + public function test_Db_CopyRowRNGRetry() + { + $original_user_handler = e107::getRegistry('core/e107/singleton/UserHandler'); + $evil_user_handler = $this->make('UserHandler', [ + 'generateRandomString' => function($pattern = '', $seed = '') + { + static $index = 0; + $mock_values = ['same0000000', 'same0000000', 'different00']; + + return $mock_values[$index ++]; + } + ]); + e107::setRegistry('core/e107/singleton/UserHandler', $evil_user_handler); + + // test with table that has unique keys. + $result = $this->db->db_CopyRow('core_media_cat', '*', "media_cat_id = 1"); + $qry = $this->db->getLastErrorText(); + $this->assertGreaterThan(1,$result, $qry); + + // test with table that has unique keys. (same row again) - make sure copyRow duplicates it regardless. + $result = $this->db->db_CopyRow('core_media_cat', '*', "media_cat_id = 1"); + $qry = $this->db->getLastErrorText(); + $this->assertGreaterThan(1,$result, $qry); + + e107::setRegistry('core/e107/singleton/UserHandler', $original_user_handler); + } + + public function test_Db_CopyRowRNGGiveUp() + { + $original_user_handler = e107::getRegistry('core/e107/singleton/UserHandler'); + $evil_user_handler = $this->make('UserHandler', [ + 'generateRandomString' => function($pattern = '', $seed = '') + { + return 'neverchange'; + } + ]); + e107::setRegistry('core/e107/singleton/UserHandler', $evil_user_handler); + + // test with table that has unique keys. + $result = $this->db->db_CopyRow('core_media_cat', '*', "media_cat_id = 1"); + $result = $this->db->db_CopyRow('core_media_cat', '*', "media_cat_id = 1"); + $qry = $this->db->getLastErrorText(); + $this->assertFalse($result, + "Intentionally broken random number generator should have prevented row copy with unique keys" + ); + + e107::setRegistry('core/e107/singleton/UserHandler', $original_user_handler); + } +} diff --git a/e107_tests/tests/unit/e_fileTest.php b/e107_tests/tests/unit/e_fileTest.php new file mode 100644 index 000000000..a8eadee65 --- /dev/null +++ b/e107_tests/tests/unit/e_fileTest.php @@ -0,0 +1,384 @@ +fl = $this->make('e_file'); + } + catch (Exception $e) + { + $this->fail("Couldn't load e_file object"); + } + + $this->exploitFile = e_TEMP."test_exploit_file.jpg"; + + $content = ""; + + file_put_contents($this->exploitFile,$content); + + $this->filetypesFile = e_SYSTEM."filetypes.xml"; + + $content = ' + + + '; + + file_put_contents($this->filetypesFile, $content); + + } + + protected function _after() + { + unlink($this->exploitFile); + unlink($this->filetypesFile); + } + + + public function testIsClean() + { + + $isCleanTest = array( + array('path'=>$this->exploitFile, 'expected' => false), // suspicious + array('path'=>e_SYSTEM."filetypes.xml", 'expected' => true), // okay + array('path'=>e_PLUGIN."gallery/images/butterfly.jpg", 'expected' => true), // okay + ); + + foreach($isCleanTest as $file) + { + $actual = $this->fl->isClean($file['path'], $file['path']); + $this->assertEquals($file['expected'],$actual, "isClean() failed on {$file['path']} with error code: ".$this->fl->getErrorCode()); + } + + } + + public function testGetAllowedFileTypes() + { + $actual = $this->fl->getAllowedFileTypes(); + + $expected = array ( + 'zip' => 2097152, // 2M in bytes + 'gz' => 2097152, + 'jpg' => 2097152, + 'jpeg' => 2097152, + 'png' => 2097152, + 'gif' => 2097152, + 'xml' => 2097152, + 'pdf' => 2097152, + ); + + $this->assertEquals($expected,$actual); + + } + + public function testIsAllowedType() + { + + $isAllowedTest = array( + array('path'=> 'somefile.bla', 'expected' => false), // suspicious + array('path'=> e_SYSTEM."filetypes.xml", 'expected' => true), // okay + array('path'=> e_PLUGIN."gallery/images/butterfly.jpg", 'expected' => true), // okay + ); + + foreach($isAllowedTest as $file) + { + $actual = $this->fl->isAllowedType($file['path']); + $this->assertEquals($file['expected'],$actual, "isAllowedType() failed on: ".$file['path']); + } + + } + /* + public function testSend() + { + + } + + public function testFile_size_encode() + { + + } + + public function testMkDir() + { + + } + + public function testGetRemoteContent() + { + + } + + public function testDelete() + { + + } + + public function testGetRemoteFile() + { + + } + + public function test_chMod() + { + + } + + public function testIsValidURL() + { + + } + + public function testGet_dirs() + { + + } + + public function testGetErrorMessage() + { + + } + + public function testCopy() + { + + } + + public function testInitCurl() + { + + } + + public function testScandir() + { + + } + + public function testGetFiletypeLimits() + { + + } + */ + public function testFile_size_decode() + { + $arr = array( + '1024' => 1024, + '2kb' => 2048, + '1KB' => 1024, + '1M' => 1048576, + '1G' => 1073741824, + '1Gb' => 1073741824, + '1TB' => 1099511627776, + ); + + foreach($arr as $key => $expected) + { + $actual = $this->fl->file_size_decode($key); + $this->assertEquals($expected,$actual, $key." does not equal ".$expected." bytes"); + } + + } + /* + public function testZip() + { + + } + + public function testSetDefaults() + { + + } + + public function testSetMode() + { + + } + + public function testUnzipArchive() + { + + } + + public function testSetFileFilter() + { + + } + + public function testGetErrorCode() + { + + } + + public function testChmod() + { + + } + + public function testSetFileInfo() + { + + }*/ + + public function testGet_file_info() + { + $path = APP_PATH."/e107_web/lib/font-awesome/4.7.0/fonts/fontawesome-webfont.svg"; + + $ret = $this->fl->get_file_info($path); + + $this->assertEquals('image/svg+xml',$ret['mime']); + + + } + /* + public function testPrepareDirectory() + { + + } + + public function testGetFileExtension() + { + + } + + public function testRmtree() + { + + } + + public function testGet_files() + { + + } + + public function testGetUserDir() + { + + } + + public function testRemoveDir() + { + + } + */ + + public function testUnzipGithubArchive() + { + $prefix = 'e107-master'; + $fake_e107_files = [ + 'desired' => [ + '/index.php', + '/e107_admin/index.html', + '/e107_core/index.html', + '/e107_docs/index.html', + '/e107_handlers/index.html', + '/e107_images/index.html', + '/e107_languages/index.html', + '/e107_media/index.html', + '/e107_plugins/index.html', + '/e107_system/index.html', + '/e107_themes/index.html', + '/e107_web/index.html', + ], + 'undesired' => [ + '/.github/codecov.yml', + '/e107_tests/index.php', + '/.codeclimate.yml', + '/.editorconfig', + '/.gitignore', + '/.gitmodules', + '/CONTRIBUTING.md', + '/LICENSE', + '/README.md', + '/install.php', + '/favicon.ico', + ] + ]; + + $src_dest_map = array( + '/e107_admin/' => '/'.e107::getFolder('ADMIN'), + '/e107_core/' => '/'.e107::getFolder('CORE'), + '/e107_docs/' => '/'.e107::getFolder('DOCS'), + '/e107_handlers/' => '/'.e107::getFolder('HANDLERS'), + '/e107_images/' => '/'.e107::getFolder('IMAGES'), + '/e107_languages/' => '/'.e107::getFolder('LANGUAGES'), + '/e107_media/' => '/'.e107::getFolder('MEDIA'), + '/e107_plugins/' => '/'.e107::getFolder('PLUGINS'), + '/e107_system/' => '/'.e107::getFolder('SYSTEM'), + '/e107_themes/' => '/'.e107::getFolder('THEMES'), + '/e107_web/' => '/'.e107::getFolder('WEB'), + ); + + /** + * @var e_file + */ + $e_file = $this->make('e_file', [ + 'getRemoteFile' => function($remote_url, $local_file, $type='temp') use ($fake_e107_files, $prefix) + { + touch(e_TEMP.$local_file); + $archive = new ZipArchive(); + $archive->open(e_TEMP.$local_file, ZipArchive::OVERWRITE); + array_walk_recursive($fake_e107_files, function($fake_filename) use ($archive, $prefix) + { + $archive->addFromString($prefix.$fake_filename, $fake_filename); + }); + $archive->close(); + } + ]); + $destination = e_TEMP."fake-git-remote-destination/"; + mkdir($destination); + $results = $e_file->unzipGithubArchive('core', $destination); + + $this->assertEmpty($results['error'], "Errors not expected from Git remote update"); + $extraction_mapping = array_flip(e107::getInstance()->e107_dirs); + foreach($fake_e107_files['desired'] as $desired_filename) + { + foreach ($src_dest_map as $src => $dest) + { + $desired_filename = preg_replace("/^".preg_quote($src, '/')."/", $dest, $desired_filename); + } + $this->assertContains(realpath($destination.$desired_filename), $results['success'], + "Desired file did not appear in file system"); + } + foreach($fake_e107_files['undesired'] as $undesired_filename) + { + $this->assertContains($prefix.$undesired_filename, $results['skipped']); + } + } + + /* + public function testGetRootFolder() + { + + } + + public function testGetUploaded() + { + + } + + public function testGitPull() + { + + } + + public function testCleanFileName() + { + + }*/ +} diff --git a/e107_tests/tests/unit/e_formTest.php b/e107_tests/tests/unit/e_formTest.php new file mode 100644 index 000000000..d0c942c6e --- /dev/null +++ b/e107_tests/tests/unit/e_formTest.php @@ -0,0 +1,1109 @@ + array('title'=> "Text 001", 'type' => 'text', 'writeParms'=>array('size'=>'xlarge')), + + // 'text_002' etc.. add other configurations with type='text' in here. + + 'number_001' => array('title'=> "Number 001", 'type' => 'number', 'writeParms'=>array('min'=>0)), + // 'number_002' => array('title'=> "Number 002", 'type' => 'number', 'inline'=>true, 'writeParms'=>array('min'=>0)), + + 'bool_001' => array('title'=> "Bool 001", 'type' => 'bool', 'writeParms'=>array('size'=>'xlarge')), + // 'bool_002' => array('title'=> "Bool 002", 'type' => 'bool', 'inline'=>true, 'writeParms'=>array('size'=>'xlarge')), + + 'dropdown_001' => array('title'=>'Dropdown 001', 'type'=>'dropdown', 'tab'=>1, 'writeParms' => array('optArray'=>array('opt_value_1'=>'Label 1', 'opt_value_2'=>'Label 2')) ), + 'dropdown_002' => array( + 'title' => 'Dropdown 002', + 'type' => 'dropdown', + 'width' => 'auto', + 'readonly' => false, + 'filter' => true, + 'thclass' => 'center', + 'class' => 'center', + 'writeParms' => array( + 'empty' => 0, + 'optArray' => array( + 0 => "Option 0", + 1 => "Option 1", + 2 => "Option 2" + ), + ), + 'readParms' => array( + 'optArray' => array( + 0 => "Option 0", + 1 => "Option 1", + 2 => "Option 2" + ), + ), + 'tab' => 0, + ), + + 'textarea_001' => array('title'=> "Textarea 001", 'type' => 'textarea', 'writeParms'=>array('size'=>'xlarge','rows'=> 5)), + + 'layout_001' => array ( 'title' => 'Layouts 001', 'type' => 'layouts', 'writeParms' => 'plugin=news&id=news_view&merge=1' ), // 'news', 'news_view', 'front' + 'layout_002' => array ( 'title' => 'Layouts 002', 'type' => 'layouts', 'writeParms'=>array('plugin'=>'news', 'id'=>'news_view', 'area'=> 'front', 'merge'=>false)), // 'news', 'news_view', 'front' + + 'image_001' => array('title'=>"Image 001", 'type' => 'image', 'inline'=>false, 'data' => 'str', 'width' => '100px', 'thclass' => 'center', 'class'=>'center', 'readParms'=>'thumb=60&thumb_urlraw=0&thumb_aw=60&legacyPath={e_FILE}downloadimages', 'readonly'=>TRUE, 'batch' => FALSE, 'filter'=>FALSE), + 'image_002' => array('title'=>"Image 002", 'type' => 'image', 'inline'=>false, 'data' => 'str', 'width' => '100px', 'thclass' => 'center', 'class'=>'center', 'readParms'=>'thumb=60&thumb_urlraw=0&thumb_aw=60&legacyPath={e_FILE}downloadimages', 'readonly'=>TRUE, 'batch' => FALSE, 'filter'=>FALSE), + + 'checkboxes_001' => array('title'=>'Checkboxes', 'type'=>'checkboxes', 'writeParms'=>array('optArray'=>array(1=>'Check Opt 1', 2=>'Check Opt 2', 3=>'Check Opt 3', 4=>''))), + 'country_001' => array('title'=>'Country', 'type'=>'country'), + 'country_002' => array('title'=>'Country', 'type'=>'country'), + 'ip_001' => array('title'=>'IP', 'type'=>'ip', 'inline'=>false), + 'templates_001' => array('title'=>'Templates', 'type'=>'templates', 'writeParms'=>array('plugin'=>'forum')), + 'radio_001' => array('title'=>'Radio', 'type'=>'radio', 'writeParms'=>array('optArray'=>array(1=>'Radio Opt 1', 2=>'Radio Opt 2', 3=>'Radio Opt 3'))), + 'tags_001' => array('title'=>'Tags', 'type'=>'tags'), + 'bbarea_001' => array('title'=>'BBarea', 'type'=>'bbarea', 'inline'=>false), + 'icon_001' => array('title'=>'Icon', 'type'=>'icon', 'inline'=>false), + // 'media_001' => array('title'=>'Media', 'type'=>'media', 'inline'=>false), + // 'file_001' => array('title'=>'File', 'type'=>'file', 'inline'=>false), //FIXME + // 'files_001' => array('title'=>'File', 'type'=>'files', 'inline'=>false), //FIXME + 'datestamp_001' => array('title'=>'Datestamp', 'type'=>'datestamp', 'inline'=>false), + 'date_001' => array('title'=>'Date', 'type'=>'date'), + 'userclass_001' => array('title'=>'Userclass', 'type'=>'userclass'), + 'userclasses_001' => array('title'=>'Userclasses', 'type'=>'userclasses'), + 'user_001' => array('title'=>'User', 'type'=>'user'), + 'url_001' => array('title'=>'URL', 'type'=>'url', 'inline'=>false), + 'email_001' => array('title'=>'Email', 'type'=>'email', 'inline'=>false), + 'hidden_001' => array('title'=>'Hidden', 'type'=>'hidden', 'inline'=>false), + // 'method_001' => array('title'=>'Method' , 'type'=>'method', 'inline'=>false), + 'language_001' => array('title'=>'Language' , 'type'=>'language'), + 'userclass_002' => array('title'=>'Userclass', 'type'=>'userclass', 'writeParms'=>array('default'=>255 /* e_UC_NOBODY*/)), + // 'lanlist_001' => array('title'=>'Lanlist' , 'type'=>'lanlist', 'inline'=>false), + + + + ); + + // simulated database/form values. + protected $_values = array( + 'text_001' => 'some text', + + 'number_001' => 555, + 'number_002' => 444, + + 'bool_001' => 1, + 'bool_002' => 1, + + 'dropdown_001' => 'opt_value_2', + 'dropdown_002' => '1,2', + + 'textarea_001' => "the quick brown fox jumps over the lazy dog", + + 'layout_001' => 'default', + 'layout_002' => 'default', + + 'image_001' => '{e_THEME}bootstrap3/images/e107_adminlogo.png', + 'image_002' => 'butterfly.jpg', + + 'checkboxes_001' => '2,3', + 'country_001' => 'au', + 'country_002' => '', + 'ip_001' => '::1', + 'templates_001' => 'mytemplate', + 'radio_001' => 2, + 'tags_001' => 'keyword1,keyword2,keyword3', + 'bbarea_001' => '[html]bold[/html]', + 'icon_001' => '{e_IMAGE}e107_icon_32.png', + // 'media_001' => '', // TODO - saves as json format. + 'file_001' => '{e_MEDIA_FILE}test.zip', + // 'files_001' => '{e_MEDIA_FILE}test.zip', + 'datestamp_001' => 1454367600, + 'date_001' => '2018-08-23', + 'userclass_001' => 0, + 'userclasses_001' => '0,1', + 'user_001' => 1, + 'url_001' => 'https://e107.org', + 'email_001' => 'me@email.com', + 'hidden_001' => 'hidden-value', + 'method_001' => 'custom-value', + 'language_001' => 'fr', + 'userclass_002' => '', + // 'lanlist_001' => 'German', + ); + + + + + protected function _before() + { + try + { + $this->_frm = $this->make('e_form'); + $this->_frm->__construct(); + } + catch (Exception $e) + { + $this->assertTrue(false, "Couldn't load e_form object"); + } + + $legacyDir = APP_PATH."/e107_files/downloadimages/"; + $legacyFile = APP_PATH."/e107_files/downloadimages/butterfly.jpg"; + + + + if(!is_dir($legacyDir)) + { + mkdir($legacyDir, 0775, true); + } + + if(!file_exists($legacyFile)) + { + copy(APP_PATH."/e107_plugins/gallery/images/butterfly.jpg", $legacyFile); + } + + if(!file_exists($legacyFile)) + { + $this->assertTrue(false,"Couldn't copy legacy image 'butterfly.jpg' to e107_files folder"); + } + + } + + protected function _after() + { + unlink(APP_PATH."/e107_files/downloadimages/butterfly.jpg"); + } + + + /* + public function testAddWarning() + { + + } + + public function testOpen() + { + + } + + public function testClose() + { + + } + + public function testCountry() + { + + } +*/ + public function testGetCountry() + { + + $tests = array( + array('value'=>'', 'expected'=>''), + array('value'=>'au', 'expected'=>'Australia') + ); + + foreach($tests as $t) + { + $actual = $this->_frm->getCountry($t['value']); + $this->assertEquals($t['expected'], $actual); + } + + // return array. + $actual = $this->_frm->getCountry(); + $this->assertArrayHasKey('au',$actual); + + + + } +/* + public function testGetRequiredString() + { + + } + + public function testSetRequiredString() + { + + } + + public function testTags() + { + + } + + public function testTabs() + { + + } + + public function testCarousel() + { + + } + + public function testUrl() + { + + } + + public function testText() + { + + } + + public function testNumber() + { + + } + + public function testEmail() + { + + } + + public function testIconpreview() + { + + } + + public function testIconpicker() + { + + } + + public function testAvatarpicker() + { + + } + + public function testImagepicker() + { + + } + + public function testFilepicker() + { + + }*/ + + public function testDatepicker() + { + + date_default_timezone_set('UTC'); + $time = strtotime('January 1st, 2018 1am'); + $actual = $this->_frm->datepicker('date_field',$time,'type=datetime&format=MM, dd, yyyy hh:ii'); + $expected = ""; + + $this->assertEquals($expected, $actual); + + // test timezone change... + date_default_timezone_set('America/Los_Angeles'); + $actual = $this->_frm->datepicker('date_field',$time,'type=datetime&format=MM, dd, yyyy hh:ii'); + $expected = ""; + + $this->assertEquals($expected, $actual); + } + /* + public function testUserlist() + { + + } + + public function testUserpicker() + { + + } + + public function testRate() + { + + } + + public function testLike() + { + + } + + public function testFile() + { + + } + + public function testUpload() + { + + } + + public function testPassword() + { + + } + + public function testPagination() + { + + } +*/ + public function testProgressBar() + { + $tests = array( + 0 => array('value' => '10/20', 'expected' => 'width: 50%'), + 1 => array('value' => '4/5', 'expected' => 'width: 80%'), + 2 => array('value' => '150/300', 'expected' => 'width: 50%'), + 3 => array('value' => '30%', 'expected' => 'width: 30%'), + ); + + foreach($tests as $var) + { + $result = $this->_frm->progressBar('progress', $var['value']); + $this->assertStringContainsString($var['expected'],$result); + } + + } +/* + public function testTextarea() + { + + } + + public function testBbarea() + { + + } +*/ + public function testCheckbox() + { + + $result = $this->_frm->checkbox('name', 2, 2); + $expected = ""; + $this->assertEquals($expected,$result); + + } + + public function testCheckboxes() + { + $opts = array( + 1 => "one", + 2 => "two", + 3 => "three" + ); + + + $result = $this->_frm->checkboxes('name', $opts, array(2=>'two')); + $expected = "
    "; + $this->assertEquals($expected,$result); + + $result = $this->_frm->checkboxes('name', $opts, 2, array('useKeyValues'=> 1)); + $expected = "
    "; + $this->assertEquals($expected,$result); + + $result = $this->_frm->checkboxes('name', $opts, 'two', array('useLabelValues'=> 1)); + $expected= "
    "; + $this->assertEquals($expected,$result); + + } +/* + public function testCheckbox_label() + { + + } + + public function testCheckbox_switch() + { + + } + + public function testCheckbox_toggle() + { + + } + + public function testUc_checkbox() + { + + } + + public function test_uc_checkbox_cb() + { + + } + + public function testUc_label() + { + + } + + public function testRadio() + { + + } + + public function testRadio_switch() + { + + } + + public function testFlipswitch() + { + + } + + public function testLabel() + { + + } + + public function testHelp() + { + + } + + public function testSelect_open() + { + + } + + public function testSelectbox() + { + + } + */ + public function testSelect() + { + $this->_frm->__construct(true); + $options = array('optDisabled'=>array('opt_2')); + $selected = 'opt_3'; + $opt_array = array('opt_1'=>"Option 1", 'opt_2'=>"Option 2", 'opt_3'=>"Option 3"); + $actual = $this->_frm->select('name', $opt_array, $selected, $options); + + $actual = str_replace("\n", "", $actual); + + $expected = ""; + + $this->assertEquals($expected,$actual); + + + // test group opt-array. + + $opt_array = array( + 'GROUP 1' => array ('opt_1'=>"Option 1", 'opt_2'=>"Option 2", 'opt_3'=>"Option 3"), + 'GROUP 2' => array ('opt_4'=>"Option 4", 'opt_5'=>"Option 5", 'opt_6'=>"Option 6"), + ); + + $actual = $this->_frm->select('name', $opt_array, $selected, $options); + $expected = ""; + + $actual = str_replace(array("\n", "\r"), "", $actual); + $expected = str_replace(array("\n", "\r"), "", $expected); + + $this->assertEquals($expected,$actual); + + + } + /* + public function testUserclass() + { + + } + + public function testSearch() + { + + } + */ + + public function testUcSelect() + { + + // 'nobody,public,main,admin,classes,matchclass,member, no-excludes'; // 255, 0, 250, 254, + + $tests = array( + 0 => array('value' => '', 'default'=>null, 'options'=>'nobody,public,main,admin,member,no-excludes', 'expected' => "value='255' selected"), + 1 => array('value' => 0, 'default'=>null, 'options'=>'nobody,public,main,admin,member,no-excludes', 'expected' => "value='0' selected"), + 2 => array('value' => '0', 'default'=>null, 'options'=>'nobody,public,main,admin,member,no-excludes', 'expected' => "value='0' selected"), + 3 => array('value' => null, 'default'=>null, 'options'=>'nobody,public,main,admin,member,no-excludes', 'expected' => "value='255' selected"), + 4 => array('value' => null, 'default'=>254, 'options'=>'nobody,public,main,admin,member,no-excludes', 'expected' => "value='254' selected"), + 5 => array('value' => '', 'default'=>254, 'options'=>'nobody,public,main,admin,member,no-excludes', 'expected' => "value='254' selected"), + ); + + foreach($tests as $var) + { + $result = $this->_frm->uc_select('uc', $var['value'], $var['options'], array('default'=>$var['default'])); + $this->assertStringContainsString($var['expected'],$result); + } + + + + + } + + + + public function testUc_select_single_numeric() + { + $uc_options = 'admin'; + $select_options = array('multiple' => false); + $opt_options = array(); + $actual = $this->_frm->uc_select('uc', 254, $uc_options, $select_options, $opt_options); + $expected = ""; + + $this->assertEquals($expected, $actual); + } + + public function testUc_select_single_string() + { + $uc_options = 'admin'; + $select_options = array('multiple' => false); + $opt_options = array(); + $actual = $this->_frm->uc_select('uc', 'Admin', $uc_options, $select_options, $opt_options); + $expected = ""; + + $this->assertEquals($expected, $actual); + } + + public function testUc_select_multi_numeric() + { + $uc_options = 'member,admin'; + $select_options = array('multiple' => true); + $opt_options = array(); + $actual = $this->_frm->uc_select('uc', '254,253', $uc_options, $select_options, $opt_options); + $expected = ""; + + $this->assertEquals($expected, $actual); + } + + public function testUc_select_multi_string() + { + $uc_options = 'member,admin'; + $select_options = array('multiple' => true); + $opt_options = array(); + $actual = $this->_frm->uc_select('uc', 'Admin,Members', $uc_options, $select_options, $opt_options); + $expected = ""; + + $this->assertEquals($expected, $actual); + } + + public function testUc_select_multi_mixed() + { + $uc_options = 'member,admin'; + $select_options = array('multiple' => true); + $opt_options = array(); + $actual = $this->_frm->uc_select('uc', 'Admin,253', $uc_options, $select_options, $opt_options); + $expected = ""; + + $this->assertEquals($expected, $actual); + } + + /* + public function test_uc_select_cb() + { + + } + + public function testOptgroup_open() + { + + } + */ + public function testOption() + { + $options = array('disabled'=>true); + $actual = $this->_frm->option('name','value', '', $options); + $expected = ""; + + $this->assertEquals($expected, $actual); + + } + /* + public function testOption_multi() + { + + } + + public function testOptgroup_close() + { + + } + + public function testSelect_close() + { + + } + + public function testHidden() + { + + } + + public function testToken() + { + + } + + public function testSubmit() + { + + } + + public function testSubmit_image() + { + + } + + public function testAdmin_trigger() + { + + } + + public function testButton() + { + + } + + public function testBreadcrumb() + { + + } + + public function testInstantEditButton() + { + + } + + public function testAdmin_button() + { + + } + + public function testDefaultButtonClassExists() + { + + } + + public function testGetDefaultButtonClassByAction() + { + + } + + public function testGetNext() + { + + } + + public function testGetCurrent() + { + + } + + public function testResetTabindex() + { + + } + + public function testGet_attributes() + { + + } + + public function test_format_id() + { + + } + + public function testName2id() + { + + } + + public function testFormat_options() + { + + } + + public function test_default_options() + { + + } + + public function testColumnSelector() + { + + } + + public function testColGroup() + { + + } + + public function testThead() + { + + } + + public function testRenderHooks() + { + + } + + public function testRenderRelated() + { + + } + + public function testRenderTableRow() + { + + } + + public function testRenderInline() + { + + } + */ + public function testRenderValue() + { + date_default_timezone_set('America/Los_Angeles'); + + $frm = $this->_frm; + + $expected = array( + 'text_001' => 'some text', + + 'number_001' => 555, + 'number_002' => "444", + + 'bool_001' => ADMIN_TRUE_ICON, + 'bool_002' => "", + + 'dropdown_001' => 'Label 2', + 'dropdown_002' => "", + + 'textarea_001' => "the quick brown fox jumps over the lazy dog", + + 'layout_001' => 'default', + 'layout_002' => 'default', + 'image_001' => "\"e107_adminlogo.png\"", + 'image_002' => "\"butterfly.jpg\"", + + + 'checkboxes_001' => 'Check Opt 2, Check Opt 3', + 'country_001' => 'Australia', + 'country_002' => '', + 'ip_001' => "::1", + 'templates_001' => 'mytemplate', + 'radio_001' => 'Radio Opt 2', + 'tags_001' => 'keyword1, keyword2, keyword3', + 'bbarea_001' => 'bold', + 'icon_001' => "e107_icon_32.png", + 'media_001' => '', + // 'file_001' => '{e_MEDIA_FILE}test.zip', + // 'files_001' => '{e_MEDIA_FILE}test.zip', + 'datestamp_001' => '01 Feb 2016 : 15:00', + 'date_001' => '2018-08-23', + 'userclass_001' => 'Everyone (public)', + 'userclasses_001' => 'Everyone (public)
    PRIVATEMENU', + 'user_001' => 'e107', + 'url_001' => "https://e107.org", + 'email_001' => "me@email.com", + 'hidden_001' => '', + // 'method_001' => 'custom-value', + 'language_001' => 'French', + 'userclass_002' => 'Everyone (public)', + // 'lanlist_001' => 'German', // only works with multiple languages installed. + + + ); + +//Check Opt 2, Check Opt 3 + + foreach($this->_fields as $field=>$att) + { + $value = $this->_values[$field]; + $result = $frm->renderValue($field, $value, $att); + + /* echo "-- ".$field."-- \n"; + print_r($result); + echo "\n\n";*/ + + if(!isset($expected[$field])) + { + $this->expectExceptionMessage('\$expected value for '.$field.' not set in script'); + $this->expectExceptionMessage($result); + } + + $this->assertEquals($expected[$field], $result, 'Mismatch on '.$field); + } + + + } + + public function testRenderValueInline() + { + foreach($this->_fields as $field=>$att) + { + if(isset($this->_fields[$field]['inline'])) + { + continue; + } + + $this->_fields[$field]['inline'] = true; + } + + foreach($this->_fields as $field=>$att) + { + if($att['inline'] !== true) + { + continue; + } + + $value = $this->_values[$field]; + $result = $this->_frm->renderValue($field, $value, $att, 23); + + if(!isset($this->_values[$field])) + { + $this->expectExceptionMessage('\$expected value for \$field not set in script'); + // $this->expectExceptionMessage($result); + } + + $this->assertStringContainsString('data-token',$result,$field." doesn't contain 'data-token'"); + } + + } + + public function testRenderElement() + { + $frm = $this->_frm; + $frm->__construct(true); + + date_default_timezone_set('America/Phoenix'); + + $expected = array( + 'text_001' => "", + + 'number_001' => "", + 'number_002' => "", + + 'bool_001' => " ", + 'bool_002' => " ", + + + 'dropdown_001' => "", + 'dropdown_002' => "", + + + 'textarea_001' => "", + + 'layout_001' => "", + 'layout_002' => "", + + 'image_001' => "\"e107_adminlogo.png\"", + 'image_002' => "\"butterfly.jpg\"", + + 'checkboxes_001' => "
    ", + 'country_001' => "", + 'ip_001' => "", + 'templates_001' => "", + 'radio_001' => " ", + + //todo check tags_001 is correct. + 'tags_001' => "", + + // 'bbarea_001' => 'bold', + // 'icon_001' => "e107_icon_32.png", + // 'media_001' => '', + // 'file_001' => '{e_MEDIA_FILE}test.zip', + // 'files_001' => '{e_MEDIA_FILE}test.zip', + 'datestamp_001' => "", + 'date_001' => "", + 'userclass_001' => "", + 'userclasses_001' => "", + //todo check user_001 is correct + 'user_001' => "", + 'url_001' => "", + 'email_001' => "", + 'hidden_001' => "", + // 'method_001' => 'custom-value', + 'language_001' => "", + // 'lanlist_001' => 'German', // only works with multiple languages installed. + ); + + + + foreach($this->_fields as $field=>$att) + { + $value = $this->_values[$field]; + $result = $frm->renderElement($field, $value, $att); + + $result = str_replace(array("\n", "\r"), "", $result); + + + if(empty($expected[$field])) + { + continue; + // echo $result; + // echo "\n\n"; + // $this->expectExceptionMessage('\$expected value for \$field not set in script'); + // $this->expectExceptionMessage($result); + } + + + + $this->assertEquals($expected[$field], $result); + } + + + } + /* + public function testRenderListForm() + { + + } + + public function testRenderGridForm() + { + + } + + public function testRenderCreateForm() + { + + } + + public function testRenderCreateFieldset() + { + + } + + public function testRenderCreateButtonsBar() + { + + } + + public function testRenderForm() + { + + } + + public function testRenderFieldset() + { + + } + + public function testRenderValueTrigger() + { + + } + + public function testRenderElementTrigger() + { + + }*/ + + public function testInlineTokenGeneratedOnlyOnce() + { + $class = new \ReflectionClass('e_form'); + + $method = $class->getMethod('inlineToken'); + $method->setAccessible(true); + + $results = []; + $results[] = $method->invoke($this->_frm); + $results[] = $method->invoke($this->_frm); + + $this->assertEquals($results[0], $results[1], + "Generated tokens differ. Watch out for performance penalty!"); + } + + + public function testRenderLink() + { + $tests = array( + 0 => array( + 'value' => 'Some text', + 'parms' => array('link'=>'myurl.php', 'target'=>'blank'), + 'expected' => "Some text" + ), + 1 => array( + 'value' => 'Some text', + 'parms' => array('link'=>'myurl.php?id=[id]', 'target'=>'modal'), + 'expected' => "Some text" + ), + 2 => array( + 'value' => 'Some text', + 'parms' => array('link'=>'url_001', 'target'=>'blank'), + 'expected' => "Some text" + ), + 3 => array( + 'value' => 'Some text', + 'parms' => array('link'=>'myurl.php?country=[country_001]', 'target'=>'dialog'), + 'expected' => "Some text" + ), + /* 4 => array( + 'value' => 'Some text', + 'parms' => array('url'=>'rss', 'title'=>'Click Here'), + 'expected' => "Some text" + )*/ + + + ); + + + + try + { + /** @var e_admin_model $model */ + $model = $this->make('e_admin_model'); + } + catch (Exception $e) + { + $this->assertTrue(false, "Couldn't load e_admin_model object"); + } + + $model->setData($this->_values); + + $model->setData('rss_url', 'rss-sefurl'); + $model->setData('rss_topicid', '5'); + + e107::setRegistry('core/adminUI/currentListModel', $model); + e107::setRegistry('core/adminUI/currentPlugin', 'rss_menu'); + + + + foreach($tests as $t) + { + $result = $this->_frm->renderLink($t['value'], $t['parms'], 3); + $this->assertEquals($t['expected'],$result); + } + + + + } + +} diff --git a/e107_tests/tests/unit/e_jsmanagerTest.php b/e107_tests/tests/unit/e_jsmanagerTest.php new file mode 100644 index 000000000..fa4da1f1a --- /dev/null +++ b/e107_tests/tests/unit/e_jsmanagerTest.php @@ -0,0 +1,256 @@ +js = $this->make('e_jsmanager'); + } catch(Exception $e) + { + $this->assertTrue(false, "Couldn't load e_jsmanager object"); + } + + } + +/* + public function testHeaderPlugin() + { + + } + + public function testTryHeaderInline() + { + + } +*/ + public function testIsInAdmin() + { + $result = $this->js->isInAdmin(); + $this->assertFalse($result); + + } + + public function testRequireCoreLib() + { + + } + + public function testSetInAdmin() + { + + } + + public function testCoreCSS() + { + + } + + public function testResetDependency() + { + + } + + public function testJsSettings() + { + + } + + public function testGetInstance() + { + + } + + public function testFooterFile() + { + + } + + public function testSetData() + { + + } + + public function testLibraryCSS() + { + + } + + public function testTryHeaderFile() + { + + } + + public function testThemeCSS() + { + + } + + public function testOtherCSS() + { + + } + + public function testSetLastModfied() + { + + } + + public function testRenderLinks() + { + + } + + public function testThemeLib() + { + + } + + public function testRenderFile() + { + + } + + public function testHeaderCore() + { + + } + + public function testRenderInline() + { + + } + + public function testFooterTheme() + { + + } + + public function testGetData() + { + + } + + public function testRequirePluginLib() + { + + } + + public function testGetCacheId() + { + + } + + public function testHeaderTheme() + { + + } + + public function testInlineCSS() + { + + } + + public function testHeaderFile() + { + + } + + public function testSetDependency() + { + + } + + public function testHeaderInline() + { + + } + + public function testGetLastModfied() + { + + } + + public function testSetCacheId() + { + + } + + public function testGetCurrentTheme() + { + + } + + public function testPluginCSS() + { + + } + + public function testCheckLibDependence() + { + + } + + public function testRenderCached() + { + + } + + public function testGetCurrentLocation() + { + + } + + public function testFooterInline() + { + + } + + public function testAddLibPref() + { + + } + + public function testAddLink() + { + + } + + public function testLibDisabled() + { + + } + + public function testArrayMergeDeepArray() + { + + } + + public function testRenderJs() + { + + } + + public function testRemoveLibPref() + { + + } + + + + } diff --git a/e107_tests/tests/unit/e_marketplaceTest.php b/e107_tests/tests/unit/e_marketplaceTest.php new file mode 100644 index 000000000..0f612b47f --- /dev/null +++ b/e107_tests/tests/unit/e_marketplaceTest.php @@ -0,0 +1,142 @@ +make('e_marketplace_adapter_wsdl', + [ + 'getRemoteFile' => function($remote_url, $local_file, $type='temp') + { + file_put_contents(e_TEMP.$local_file, + /** + * Zip file containing: + * thing/ + * thing/plugin.php + * thing/theme.php + * thing/index.php + * thing/README.md + */ + base64_decode( + <<mp = $this->make('e_marketplace', + [ + 'adapter' => $mock_adapter + ]); + $this->mp->__construct(); + } + catch (Exception $e) + { + $this->assertTrue(false, "Couldn't load e_marketplace object"); + } + } + +/* + public function testRenderLoginForm() + { + + } +*/ + public function testDownload() + { + $path = e_PLUGIN."thing"; + $tempPath = e_TEMP."thing"; + $id = 912; + + if(is_dir($path)) + { + e107::getFile()->removeDir($path); + // rename($path, $path."_old_".time()); + } + + if(is_dir($tempPath)) + { + e107::getFile()->removeDir($tempPath); + // rename($tempPath, $tempPath."_old_".time()); + } + + $status = $this->mp->download($id,'','plugin' ); + + $this->assertTrue($status,"Couldn't download plugin or move to plugin folder."); + + $exists = (is_dir($path) && count(scandir($path)) > 4); + + $this->assertTrue($exists,"plugin folder is missing files."); + + } +/* + public function testGenerateAuthKey() + { + + } + + public function testCall() + { + + } + + public function testGetVersionList() + { + + } + + public function testHasAuthKey() + { + + } + + public function testAdapter() + { + + } + + public function testMakeAuthKey() + { + + } + + public function testSetAuthKey() + { + + } + + public function testGetDownloadModal() + { + + }*/ + } diff --git a/e107_tests/tests/unit/e_mediaTest.php b/e107_tests/tests/unit/e_mediaTest.php new file mode 100644 index 000000000..dedb18e64 --- /dev/null +++ b/e107_tests/tests/unit/e_mediaTest.php @@ -0,0 +1,268 @@ +md = $this->make('e_media'); + } + catch (Exception $e) + { + $this->fail("Couldn't load e_media object"); + } + + } + + + public function testCheckFileExtension() + { + $types = array( + array('path'=>'path-to-file/image.jpg', 'mime' => 'image/jpeg', 'expected'=>'path-to-file/image.jpg'), + array('path'=>'path-to-file/image', 'mime' => 'image/jpeg', 'expected'=>'path-to-file/image.jpg'), + array('path'=>'path-to-file/audio' , 'mime' => 'audio/mpeg', 'expected'=>'path-to-file/audio.mp3'), + array('path'=>'path-to-file/audio.mp3', 'mime' => 'audio/mpeg', 'expected'=>'path-to-file/audio.mp3'), + array('path'=>'path-to-file/image.svg', 'mime' => 'svg+xml', 'expected'=>'path-to-file/image.svg'), + ); + + + foreach($types as $val) + { + $actual = $this->md->checkFileExtension($val['path'],$val['mime']); + + $this->assertEquals($val['expected'],$actual); + //echo ($actual)."\n"; + } + + + + } + + public function testProcessAjaxUpload() + { + + // @todo + + + } + + + +/* + + public function testConvertImageToJpeg() + { + + } + + + + + public function testCheckDupe() + { + + } + + public function testBrowserIndicators() + { + + } + + public function testMediaData() + { + + } + + public function testImport() + { + + } + + public function testBrowserCarouselItem() + { + + } +*/ + public function testImportFile() + { + /* FIXME: https://github.com/e107inc/e107/issues/4033 + $icon = codecept_data_dir()."icon_64.png"; + $dest = e_IMPORT."icon_64.png"; + copy($icon,$dest); + + if(!file_exists($dest)) + { + $this->fail("Couldn't copy icon to ".$dest); + } + + $tests = array( + 0 => array('file'=> 'icon_64.png', 'cat' => '_icon', 'expected'=>"{e_MEDIA_ICON}icon_64.png"), + ); + + foreach($tests as $var) + { + $result = $this->md->importFile($var['file'], $var['cat']); + $this->assertEquals($var['expected'],$result); + } + */ + } +/* + public function testBrowserCarousel() + { + + } + + public function testCountImages() + { + + } + + public function testMediaSelect() + { + + } + + public function testCreateCategory() + { + + } + + public function testGetImages() + { + + } + + public function testRemoveCat() + { + + } + + public function testRemovePath() + { + + } + + public function testCreateUserCategory() + { + + } + + public function testGetFiles() + { + + } + + public function testListIcons() + { + + } +*/ + public function testGetGlyphs() + { + $result = $this->md->getGlyphs('bs3'); + $this->assertEquals('adjust', $result[0]); + $this->assertEquals('zoom-out', $result[198]); + + $result = $this->md->getGlyphs('fab'); + $this->assertTrue(in_array('xbox', $result)); + + $result = $this->md->getGlyphs('fas'); + $this->assertTrue(in_array('check-circle', $result)); + + } +/* + public function testImportIcons() + { + + } + + public function testCreateCategories() + { + + } + + public function testDeleteCategory() + { + + } + + public function testResizeImage() + { + + } + + public function testPreviewTag() + { + + } + + public function testDetectType() + { + + } + + public function testGetVideos() + { + + } + + public function testSaveThumb() + { + + } + + public function testGetAudios() + { + + } + + public function testDebug() + { + + } + + public function testGetCategories() + { + + } + + public function testGetThumb() + { + + } + + public function testDeleteAllCategories() + { + + } + + public function testLog() + { + + } + + public function testGetIcons() + { + + } +*/ + public function testGetPath() + { + $result = $this->md->getPath('image/jpeg'); + // FIXME: This test doesn't do anything? + } + } diff --git a/e107_tests/tests/unit/e_menu_layoutTest.php b/e107_tests/tests/unit/e_menu_layoutTest.php new file mode 100644 index 000000000..e07beabf2 --- /dev/null +++ b/e107_tests/tests/unit/e_menu_layoutTest.php @@ -0,0 +1,175 @@ +copydir($src . $DS . $file, $dst . $DS . $file); + } + else + { + copy($src . $DS . $file, $dst . $DS . $file); + } + } + } + + closedir($dir); + } + + + +/* + public function testMenuSelector() + { + + } + + */ + + + public function testGetLayouts() + { + /* FIXME: https://github.com/e107inc/e107/issues/4030 + $src1 = codecept_data_dir()."testcore"; + $dest1 = e_THEME."testcore"; + + $this->copydir($src1,$dest1); + + $src2 = codecept_data_dir()."testkubrick"; + $dest2 = e_THEME."testkubrick"; + + $this->copydir($src2,$dest2); + + $src3 = codecept_data_dir()."basic-light"; + $dest3 = e_THEME."basic-light"; + + $this->copydir($src3,$dest3); + + $tests = array( + + 'bootstrap3' => array ( + 'templates' => array( // template key and string length + 'jumbotron_home' => 3132, + 'modern_business_home' => 3842, + 'jumbotron_full' => 2239, + 'jumbotron_sidebar_right' => 2973 + ), + 'menus' => array ( + 'jumbotron_home' => array ('1','2','3','4','5','6','7','8','9','10','11','12','13','14','100','101','102','103','104','105','106','107',), + 'modern_business_home' => array ('10','100','101','102','103','104','105','106','107',), + 'jumbotron_full' => array ('1','100','101','102','103','104','105','106','107',), + 'jumbotron_sidebar_right' => array ('1','2','3','4','5','6','7','8','100','101','102','103','104','105','106','107',), + ), + ), + + + 'testkubrick' => array ( + 'templates' => array( + 'legacyCustom' => 267, + 'legacyDefault' => 308 + ), + 'menus' => array( + 'legacyCustom' => array(), + 'legacyDefault' => array('1', '2') + ), + ), + + 'testcore' => array ( + 'templates' => array ( + 'HOME' => 1494, + 'FULL' => 1269, + 'legacyDefault'=> 1654 + ), + 'menus' => array( + 'HOME' => array('2', '3', '4'), + 'FULL' => array(), + 'legacyDefault'=> array('1', '2', '3', '4','5','6') + ), + ), + + 'basic-light' => array( + 'templates' => array( + 'default' => 3274, + 'default-home' => 3274, + 'simple-page' => 1553, + 'wide-page' => 1235 + ), + 'menus' => array( + 'default' => array('1', '2', '3', '4'), + 'default-home' => array('1', '2', '3', '4'), + 'simple-page' => array('1', '2', '3', '4'), + 'wide-page' => array(), + ), + + + ), + ); + + foreach($tests as $theme=>$vars) + { + + $result = e_menu_layout::getLayouts($theme); + + foreach($vars['templates'] as $key=>$length) + { + $content = str_replace(array("\r", "\n"),'',$result['templates'][$key]); + $expectedLength = $length; + $actualLength = strlen($content); + + //var_dump($key. " = ".$actualLength); + + $this->assertEquals($expectedLength, $actualLength, $key. " is different"); + } + + foreach($vars['menus'] as $key=>$arr) + { + $this->assertEquals($arr, $result['menus'][$key], $key." is different"); + } + + + } + + + + */ + } + + + + + } diff --git a/e107_tests/tests/unit/e_onlineTest.php b/e107_tests/tests/unit/e_onlineTest.php new file mode 100644 index 000000000..e2efae2cc --- /dev/null +++ b/e107_tests/tests/unit/e_onlineTest.php @@ -0,0 +1,65 @@ +on = $this->make('e_online'); + $this->on->__construct(); + } + catch (Exception $e) + { + $this->assertTrue(false, "Couldn't load e_online object"); + } + + + + } + + + + + + public function testGoOnline() + { + + $this->on->goOnline(true, true); + + $this->on->goOnline(false, false); + + + // $this->on->goOnline(true, true); + + + + // var_dump($markers); + // var_dump(TOTAL_ONLINE); + } + + public function testIsBot() + { + + } + + public function testGuestList() + { + + } + + public function testUserList() + { + + } + } diff --git a/e107_tests/tests/unit/e_parseTest.php b/e107_tests/tests/unit/e_parseTest.php new file mode 100644 index 000000000..7d3690ed2 --- /dev/null +++ b/e107_tests/tests/unit/e_parseTest.php @@ -0,0 +1,878 @@ +tp = $this->make('e_parse'); + } + catch (Exception $e) + { + $this->assertTrue(false, "Couldn't load e_parser object"); + } + + } +/* + public function testHtmlAbuseFilter() + { + + } + + public function testE_highlight() + { + + }*/ + + public function testToHTML() + { + $src = <<tp->toHTML($src,true); + + $this->assertEquals($expected,$actual, "BBcode parsing failed"); + + + $src = "[center][img]{e_IMAGE}generic/blank_avatar.jpg[/img][/center]"; + + $actual = $this->tp->toHTML($src,true); + + $expected = "
    Blank Avatar
    "; + + $this->assertEquals($expected, $actual, "BBcode parsing failed on [img]"); + + + } +/* + public function testUstrpos() + { + + } + + public function testThumbUrlDecode() + { + + } +*/ + + public function testParseTemplateWithEnabledCoreShortcodes() + { + $needle = '