diff --git a/composer.json b/composer.json
index 80e29763..f55509fc 100644
--- a/composer.json
+++ b/composer.json
@@ -12,6 +12,8 @@
}
],
"require": {
- "guzzlehttp/guzzle": "^6.2"
+ "guzzlehttp/guzzle": "^6.2",
+ "shuchkin/simplexlsx" : "0.8.10",
+ "shuchkin/simplexls" : "0.9.4"
}
}
diff --git a/composer.lock b/composer.lock
index 65e49851..b66349fa 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1,48 +1,52 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
- "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
+ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "c3cd76e7057a1b566e5fc949f660604e",
+ "content-hash": "ae04e84d115e6972febb1ac3d55930ea",
"packages": [
{
"name": "guzzlehttp/guzzle",
- "version": "6.2.2",
+ "version": "6.4.1",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
- "reference": "ebf29dee597f02f09f4d5bbecc68230ea9b08f60"
+ "reference": "0895c932405407fd3a7368b6910c09a24d26db11"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/guzzle/zipball/ebf29dee597f02f09f4d5bbecc68230ea9b08f60",
- "reference": "ebf29dee597f02f09f4d5bbecc68230ea9b08f60",
+ "url": "https://api.github.com/repos/guzzle/guzzle/zipball/0895c932405407fd3a7368b6910c09a24d26db11",
+ "reference": "0895c932405407fd3a7368b6910c09a24d26db11",
"shasum": ""
},
"require": {
+ "ext-json": "*",
"guzzlehttp/promises": "^1.0",
- "guzzlehttp/psr7": "^1.3.1",
+ "guzzlehttp/psr7": "^1.6.1",
"php": ">=5.5"
},
"require-dev": {
"ext-curl": "*",
- "phpunit/phpunit": "^4.0",
- "psr/log": "^1.0"
+ "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0",
+ "psr/log": "^1.1"
+ },
+ "suggest": {
+ "psr/log": "Required for using the Log middleware"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "6.2-dev"
+ "dev-master": "6.3-dev"
}
},
"autoload": {
- "files": [
- "src/functions_include.php"
- ],
"psr-4": {
"GuzzleHttp\\": "src/"
- }
+ },
+ "files": [
+ "src/functions_include.php"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -66,7 +70,7 @@
"rest",
"web service"
],
- "time": "2016-10-08T15:01:37+00:00"
+ "time": "2019-10-23T15:58:00+00:00"
},
{
"name": "guzzlehttp/promises",
@@ -121,32 +125,37 @@
},
{
"name": "guzzlehttp/psr7",
- "version": "1.3.1",
+ "version": "1.6.1",
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
- "reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b"
+ "reference": "239400de7a173fe9901b9ac7c06497751f00727a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/psr7/zipball/5c6447c9df362e8f8093bda8f5d8873fe5c7f65b",
- "reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b",
+ "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a",
+ "reference": "239400de7a173fe9901b9ac7c06497751f00727a",
"shasum": ""
},
"require": {
"php": ">=5.4.0",
- "psr/http-message": "~1.0"
+ "psr/http-message": "~1.0",
+ "ralouphie/getallheaders": "^2.0.5 || ^3.0.0"
},
"provide": {
"psr/http-message-implementation": "1.0"
},
"require-dev": {
- "phpunit/phpunit": "~4.0"
+ "ext-zlib": "*",
+ "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8"
+ },
+ "suggest": {
+ "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.4-dev"
+ "dev-master": "1.6-dev"
}
},
"autoload": {
@@ -166,16 +175,24 @@
"name": "Michael Dowling",
"email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling"
+ },
+ {
+ "name": "Tobias Schultze",
+ "homepage": "https://github.com/Tobion"
}
],
- "description": "PSR-7 message implementation",
+ "description": "PSR-7 message implementation that also provides common utility methods",
"keywords": [
"http",
"message",
+ "psr-7",
+ "request",
+ "response",
"stream",
- "uri"
+ "uri",
+ "url"
],
- "time": "2016-06-24T23:00:38+00:00"
+ "time": "2019-07-01T23:21:34+00:00"
},
{
"name": "psr/http-message",
@@ -226,6 +243,138 @@
"response"
],
"time": "2016-08-06T14:39:51+00:00"
+ },
+ {
+ "name": "ralouphie/getallheaders",
+ "version": "3.0.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/ralouphie/getallheaders.git",
+ "reference": "120b605dfeb996808c31b6477290a714d356e822"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822",
+ "reference": "120b605dfeb996808c31b6477290a714d356e822",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.6"
+ },
+ "require-dev": {
+ "php-coveralls/php-coveralls": "^2.1",
+ "phpunit/phpunit": "^5 || ^6.5"
+ },
+ "type": "library",
+ "autoload": {
+ "files": [
+ "src/getallheaders.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Ralph Khattar",
+ "email": "ralph.khattar@gmail.com"
+ }
+ ],
+ "description": "A polyfill for getallheaders.",
+ "time": "2019-03-08T08:55:37+00:00"
+ },
+ {
+ "name": "shuchkin/simplexls",
+ "version": "0.9.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/shuchkin/simplexls.git",
+ "reference": "3b5a08c8ecc67ba6f35a1bb14d88634b152f5a3a"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/shuchkin/simplexls/zipball/3b5a08c8ecc67ba6f35a1bb14d88634b152f5a3a",
+ "reference": "3b5a08c8ecc67ba6f35a1bb14d88634b152f5a3a",
+ "shasum": ""
+ },
+ "require": {
+ "ext-mbstring": "*"
+ },
+ "type": "library",
+ "autoload": {
+ "classmap": [
+ "src/SimpleXLS.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Sergey Shuchkin (SMSPILOT)",
+ "email": "sergey.shuchkin@gmail.com",
+ "homepage": "http://www.shuchkin.ru/"
+ }
+ ],
+ "description": "Parse and retrieve data from old format Excel XLS files. MS Excel 97 workbooks PHP reader.",
+ "homepage": "https://github.com/shuchkin/simplexls",
+ "keywords": [
+ "backend",
+ "excel",
+ "parser",
+ "php",
+ "xls"
+ ],
+ "time": "2019-02-19T02:25:40+00:00"
+ },
+ {
+ "name": "shuchkin/simplexlsx",
+ "version": "0.8.10",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/shuchkin/simplexlsx.git",
+ "reference": "55cdcb34969951c8df0c3193c3e75553d5a38b37"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/shuchkin/simplexlsx/zipball/55cdcb34969951c8df0c3193c3e75553d5a38b37",
+ "reference": "55cdcb34969951c8df0c3193c3e75553d5a38b37",
+ "shasum": ""
+ },
+ "require": {
+ "ext-libxml": "*",
+ "ext-simplexml": "*",
+ "ext-zlib": "*"
+ },
+ "type": "library",
+ "autoload": {
+ "classmap": [
+ "src/SimpleXLSX.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Sergey Shuchkin (SMSPILOT)",
+ "email": "sergey.shuchkin@gmail.com",
+ "homepage": "http://www.shuchkin.ru/"
+ }
+ ],
+ "description": "Parse and retrieve data from Excel XLSx files. MS Excel 2007 workbooks PHP reader.",
+ "homepage": "https://github.com/shuchkin/simplexlsx",
+ "keywords": [
+ "backend",
+ "excel",
+ "parser",
+ "php",
+ "xlsx"
+ ],
+ "time": "2019-11-06T23:47:40+00:00"
}
],
"packages-dev": [
@@ -283,39 +432,136 @@
],
"time": "2015-06-14T21:17:01+00:00"
},
+ {
+ "name": "phpdocumentor/reflection-common",
+ "version": "1.0.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpDocumentor/ReflectionCommon.git",
+ "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6",
+ "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.5"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^4.6"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "phpDocumentor\\Reflection\\": [
+ "src"
+ ]
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jaap van Otterdijk",
+ "email": "opensource@ijaap.nl"
+ }
+ ],
+ "description": "Common reflection classes used by phpdocumentor to reflect the code structure",
+ "homepage": "http://www.phpdoc.org",
+ "keywords": [
+ "FQSEN",
+ "phpDocumentor",
+ "phpdoc",
+ "reflection",
+ "static analysis"
+ ],
+ "time": "2017-09-11T18:02:19+00:00"
+ },
{
"name": "phpdocumentor/reflection-docblock",
- "version": "2.0.4",
+ "version": "3.3.2",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
- "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8"
+ "reference": "bf329f6c1aadea3299f08ee804682b7c45b326a2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8",
- "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8",
+ "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/bf329f6c1aadea3299f08ee804682b7c45b326a2",
+ "reference": "bf329f6c1aadea3299f08ee804682b7c45b326a2",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": "^5.6 || ^7.0",
+ "phpdocumentor/reflection-common": "^1.0.0",
+ "phpdocumentor/type-resolver": "^0.4.0",
+ "webmozart/assert": "^1.0"
},
"require-dev": {
- "phpunit/phpunit": "~4.0"
+ "mockery/mockery": "^0.9.4",
+ "phpunit/phpunit": "^4.4"
},
- "suggest": {
- "dflydev/markdown": "~1.0",
- "erusev/parsedown": "~1.0"
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "phpDocumentor\\Reflection\\": [
+ "src/"
+ ]
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Mike van Riel",
+ "email": "me@mikevanriel.com"
+ }
+ ],
+ "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
+ "time": "2017-11-10T14:09:06+00:00"
+ },
+ {
+ "name": "phpdocumentor/type-resolver",
+ "version": "0.4.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpDocumentor/TypeResolver.git",
+ "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7",
+ "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.5 || ^7.0",
+ "phpdocumentor/reflection-common": "^1.0"
+ },
+ "require-dev": {
+ "mockery/mockery": "^0.9.4",
+ "phpunit/phpunit": "^5.2||^4.8.24"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0.x-dev"
+ "dev-master": "1.0.x-dev"
}
},
"autoload": {
- "psr-0": {
- "phpDocumentor": [
+ "psr-4": {
+ "phpDocumentor\\Reflection\\": [
"src/"
]
}
@@ -327,42 +573,45 @@
"authors": [
{
"name": "Mike van Riel",
- "email": "mike.vanriel@naenius.com"
+ "email": "me@mikevanriel.com"
}
],
- "time": "2015-02-03T12:10:50+00:00"
+ "time": "2017-07-14T14:27:02+00:00"
},
{
"name": "phpspec/prophecy",
- "version": "v1.5.0",
+ "version": "1.9.0",
"source": {
"type": "git",
"url": "https://github.com/phpspec/prophecy.git",
- "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7"
+ "reference": "f6811d96d97bdf400077a0cc100ae56aa32b9203"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4745ded9307786b730d7a60df5cb5a6c43cf95f7",
- "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7",
+ "url": "https://api.github.com/repos/phpspec/prophecy/zipball/f6811d96d97bdf400077a0cc100ae56aa32b9203",
+ "reference": "f6811d96d97bdf400077a0cc100ae56aa32b9203",
"shasum": ""
},
"require": {
"doctrine/instantiator": "^1.0.2",
- "phpdocumentor/reflection-docblock": "~2.0",
- "sebastian/comparator": "~1.1"
+ "php": "^5.3|^7.0",
+ "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0",
+ "sebastian/comparator": "^1.1|^2.0|^3.0",
+ "sebastian/recursion-context": "^1.0|^2.0|^3.0"
},
"require-dev": {
- "phpspec/phpspec": "~2.0"
+ "phpspec/phpspec": "^2.5|^3.2",
+ "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.4.x-dev"
+ "dev-master": "1.8.x-dev"
}
},
"autoload": {
- "psr-0": {
- "Prophecy\\": "src/"
+ "psr-4": {
+ "Prophecy\\": "src/Prophecy"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -390,7 +639,7 @@
"spy",
"stub"
],
- "time": "2015-08-13T10:07:40+00:00"
+ "time": "2019-10-03T11:07:50+00:00"
},
{
"name": "phpunit/php-code-coverage",
@@ -456,16 +705,16 @@
},
{
"name": "phpunit/php-file-iterator",
- "version": "1.4.1",
+ "version": "1.4.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
- "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0"
+ "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/6150bf2c35d3fc379e50c7602b75caceaa39dbf0",
- "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4",
+ "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4",
"shasum": ""
},
"require": {
@@ -499,7 +748,7 @@
"filesystem",
"iterator"
],
- "time": "2015-06-21T13:08:43+00:00"
+ "time": "2017-11-27T13:52:08+00:00"
},
{
"name": "phpunit/php-text-template",
@@ -544,22 +793,30 @@
},
{
"name": "phpunit/php-timer",
- "version": "1.0.7",
+ "version": "1.0.9",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-timer.git",
- "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b"
+ "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3e82f4e9fc92665fafd9157568e4dcb01d014e5b",
- "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f",
+ "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": "^5.3.3 || ^7.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
},
"type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev"
+ }
+ },
"autoload": {
"classmap": [
"src/"
@@ -581,20 +838,20 @@
"keywords": [
"timer"
],
- "time": "2015-06-21T08:01:12+00:00"
+ "time": "2017-02-26T11:10:40+00:00"
},
{
"name": "phpunit/php-token-stream",
- "version": "1.4.8",
+ "version": "1.4.12",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-token-stream.git",
- "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da"
+ "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da",
- "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/1ce90ba27c42e4e44e6d8458241466380b51fa16",
+ "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16",
"shasum": ""
},
"require": {
@@ -630,20 +887,20 @@
"keywords": [
"tokenizer"
],
- "time": "2015-09-15T10:49:45+00:00"
+ "time": "2017-12-04T08:55:13+00:00"
},
{
"name": "phpunit/phpunit",
- "version": "4.8.19",
+ "version": "4.8.36",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "b2caaf8947aba5e002d42126723e9d69795f32b4"
+ "reference": "46023de9a91eec7dfb06cc56cb4e260017298517"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b2caaf8947aba5e002d42126723e9d69795f32b4",
- "reference": "b2caaf8947aba5e002d42126723e9d69795f32b4",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/46023de9a91eec7dfb06cc56cb4e260017298517",
+ "reference": "46023de9a91eec7dfb06cc56cb4e260017298517",
"shasum": ""
},
"require": {
@@ -657,9 +914,9 @@
"phpunit/php-code-coverage": "~2.1",
"phpunit/php-file-iterator": "~1.4",
"phpunit/php-text-template": "~1.2",
- "phpunit/php-timer": ">=1.0.6",
+ "phpunit/php-timer": "^1.0.6",
"phpunit/phpunit-mock-objects": "~2.3",
- "sebastian/comparator": "~1.1",
+ "sebastian/comparator": "~1.2.2",
"sebastian/diff": "~1.2",
"sebastian/environment": "~1.3",
"sebastian/exporter": "~1.2",
@@ -702,7 +959,7 @@
"testing",
"xunit"
],
- "time": "2015-11-30T08:18:59+00:00"
+ "time": "2017-06-21T08:07:12+00:00"
},
{
"name": "phpunit/phpunit-mock-objects",
@@ -762,22 +1019,22 @@
},
{
"name": "sebastian/comparator",
- "version": "1.2.0",
+ "version": "1.2.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
- "reference": "937efb279bd37a375bcadf584dec0726f84dbf22"
+ "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22",
- "reference": "937efb279bd37a375bcadf584dec0726f84dbf22",
+ "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be",
+ "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"sebastian/diff": "~1.2",
- "sebastian/exporter": "~1.2"
+ "sebastian/exporter": "~1.2 || ~2.0"
},
"require-dev": {
"phpunit/phpunit": "~4.4"
@@ -822,32 +1079,32 @@
"compare",
"equality"
],
- "time": "2015-07-26T15:48:44+00:00"
+ "time": "2017-01-29T09:50:25+00:00"
},
{
"name": "sebastian/diff",
- "version": "1.3.0",
+ "version": "1.4.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
- "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3"
+ "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/863df9687835c62aa423a22412d26fa2ebde3fd3",
- "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3",
+ "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4",
+ "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": "^5.3.3 || ^7.0"
},
"require-dev": {
- "phpunit/phpunit": "~4.2"
+ "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.3-dev"
+ "dev-master": "1.4-dev"
}
},
"autoload": {
@@ -870,31 +1127,31 @@
}
],
"description": "Diff implementation",
- "homepage": "http://www.github.com/sebastianbergmann/diff",
+ "homepage": "https://github.com/sebastianbergmann/diff",
"keywords": [
"diff"
],
- "time": "2015-02-22T15:13:53+00:00"
+ "time": "2017-05-22T07:24:03+00:00"
},
{
"name": "sebastian/environment",
- "version": "1.3.2",
+ "version": "1.3.8",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
- "reference": "6324c907ce7a52478eeeaede764f48733ef5ae44"
+ "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6324c907ce7a52478eeeaede764f48733ef5ae44",
- "reference": "6324c907ce7a52478eeeaede764f48733ef5ae44",
+ "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea",
+ "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": "^5.3.3 || ^7.0"
},
"require-dev": {
- "phpunit/phpunit": "~4.4"
+ "phpunit/phpunit": "^4.8 || ^5.0"
},
"type": "library",
"extra": {
@@ -924,20 +1181,20 @@
"environment",
"hhvm"
],
- "time": "2015-08-03T06:14:51+00:00"
+ "time": "2016-08-18T05:49:44+00:00"
},
{
"name": "sebastian/exporter",
- "version": "1.2.1",
+ "version": "1.2.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
- "reference": "7ae5513327cb536431847bcc0c10edba2701064e"
+ "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/7ae5513327cb536431847bcc0c10edba2701064e",
- "reference": "7ae5513327cb536431847bcc0c10edba2701064e",
+ "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4",
+ "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4",
"shasum": ""
},
"require": {
@@ -945,12 +1202,13 @@
"sebastian/recursion-context": "~1.0"
},
"require-dev": {
+ "ext-mbstring": "*",
"phpunit/phpunit": "~4.4"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.2.x-dev"
+ "dev-master": "1.3.x-dev"
}
},
"autoload": {
@@ -990,7 +1248,7 @@
"export",
"exporter"
],
- "time": "2015-06-21T07:55:53+00:00"
+ "time": "2016-06-17T09:04:28+00:00"
},
{
"name": "sebastian/global-state",
@@ -1045,16 +1303,16 @@
},
{
"name": "sebastian/recursion-context",
- "version": "1.0.1",
+ "version": "1.0.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/recursion-context.git",
- "reference": "994d4a811bafe801fb06dccbee797863ba2792ba"
+ "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/994d4a811bafe801fb06dccbee797863ba2792ba",
- "reference": "994d4a811bafe801fb06dccbee797863ba2792ba",
+ "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b19cc3298482a335a95f3016d2f8a6950f0fbcd7",
+ "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7",
"shasum": ""
},
"require": {
@@ -1094,7 +1352,7 @@
],
"description": "Provides functionality to recursively process PHP variables",
"homepage": "http://www.github.com/sebastianbergmann/recursion-context",
- "time": "2015-06-21T08:04:50+00:00"
+ "time": "2016-10-03T07:41:43+00:00"
},
{
"name": "sebastian/version",
@@ -1131,27 +1389,95 @@
"homepage": "https://github.com/sebastianbergmann/version",
"time": "2015-06-21T13:59:46+00:00"
},
+ {
+ "name": "symfony/polyfill-ctype",
+ "version": "v1.12.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-ctype.git",
+ "reference": "550ebaac289296ce228a706d0867afc34687e3f4"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4",
+ "reference": "550ebaac289296ce228a706d0867afc34687e3f4",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "suggest": {
+ "ext-ctype": "For best performance"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.12-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Ctype\\": ""
+ },
+ "files": [
+ "bootstrap.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Gert de Pagter",
+ "email": "BackEndTea@gmail.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill for ctype functions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "ctype",
+ "polyfill",
+ "portable"
+ ],
+ "time": "2019-08-06T08:03:45+00:00"
+ },
{
"name": "symfony/yaml",
- "version": "v2.8.0",
+ "version": "v3.4.33",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
- "reference": "f79824187de95064a2f5038904c4d7f0227fedb5"
+ "reference": "dab657db15207879217fc81df4f875947bf68804"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/yaml/zipball/f79824187de95064a2f5038904c4d7f0227fedb5",
- "reference": "f79824187de95064a2f5038904c4d7f0227fedb5",
+ "url": "https://api.github.com/repos/symfony/yaml/zipball/dab657db15207879217fc81df4f875947bf68804",
+ "reference": "dab657db15207879217fc81df4f875947bf68804",
"shasum": ""
},
"require": {
- "php": ">=5.3.9"
+ "php": "^5.5.9|>=7.0.8",
+ "symfony/polyfill-ctype": "~1.8"
+ },
+ "conflict": {
+ "symfony/console": "<3.4"
+ },
+ "require-dev": {
+ "symfony/console": "~3.4|~4.0"
+ },
+ "suggest": {
+ "symfony/console": "For validating YAML files using the lint command"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.8-dev"
+ "dev-master": "3.4-dev"
}
},
"autoload": {
@@ -1178,7 +1504,57 @@
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
- "time": "2015-11-30T12:35:10+00:00"
+ "time": "2019-10-24T15:33:53+00:00"
+ },
+ {
+ "name": "webmozart/assert",
+ "version": "1.5.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/webmozart/assert.git",
+ "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/webmozart/assert/zipball/88e6d84706d09a236046d686bbea96f07b3a34f4",
+ "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.3.3 || ^7.0",
+ "symfony/polyfill-ctype": "^1.8"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^4.8.36 || ^7.5.13"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.3-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Webmozart\\Assert\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Bernhard Schussek",
+ "email": "bschussek@gmail.com"
+ }
+ ],
+ "description": "Assertions to validate method input/output with nice error messages.",
+ "keywords": [
+ "assert",
+ "check",
+ "validate"
+ ],
+ "time": "2019-08-24T08:43:50+00:00"
}
],
"aliases": [],
diff --git a/include/controllers/activity_controller.php b/include/controllers/activity_controller.php
index a93e4a45..54ff4f39 100755
--- a/include/controllers/activity_controller.php
+++ b/include/controllers/activity_controller.php
@@ -215,46 +215,138 @@ public function opretAktivitet()
$this->page->model = $this->model;
}
-
- public function importActivities()
+
+ /**
+ * Handle import and export of activity data
+ *
+ * @access public
+ * @return void
+ */
+ public function importExportActivities(){
+ $session = $this->dic->get('Session');
+
+ // if it's not a post request, don't do anything
+ if (!$this->page->request->isPost()){
+ return;
+ }
+ $post = $this->page->request->post;
+
+ if (isset($post->importactivities)) {
+ $this->uploadActivities();
+ $session->activity_data = $this->model->activity_data;
+ }
+
+ if ((isset($post->import_add) || isset($post->import_replace)) && isset($session->activity_data)) {
+ $this->saveActivities($session->activity_data, isset($post->import_replace));
+ $session->delete('activity_data');
+ }
+
+ if (isset($post->exportactivities)){
+ $this->exportActivities();
+ }
+
+ if (isset($session->activity_data)) {
+ $this->page->activity_data = $session->activity_data;
+ $this->page->activity_header = $this->model->getActivityHeader();
+ }
+
+ }
+
+ /**
+ * Imports activities from a submitted spreadsheet
+ *
+ * @access private
+ * @return void
+ */
+ private function uploadActivities()
{
- $user = $this->model->getLoggedInUser();
-
- if ($this->page->request->isPost()) {
- $post = $this->page->request->post;
-
- /*
- Nothing in $post...
- foreach ($post as $key => $value) {
- echo "Field ".htmlspecialchars($key)." is ".htmlspecialchars($value)."
";
- }
- exit;
- */
-
- if (empty($post->importactivities)) { // skal jeg bruge file eller importactivities ?
- $this->errorMessage('Ingen Excel fil valgt.');
- $this->hardRedirect($this->url('aktiviteterhome'));
+ // Did the user submit a file
+ $file = isset($_FILES['activities']) ? $_FILES['activities'] : null;
+ if($file == null || $file['error'] == 4) {
+ $this->errorMessage('Ingen Excel fil valgt.');
+ return;
+ }
+
+ // Parse the file depending on file type or give an error if type isn't known
+ list($name, $type) = explode(".", $file['name']);
+ switch ($type) {
+ case "xlsx":
+ if ( !$data = SimpleXLSX::parse($file['tmp_name'])->rows() ) {
+ $this->errorMessage(SimpleXLSX::parseError());
+ }
+ break;
+ case "xls":
+ if ( !$data = SimpleXLS::parse($file['tmp_name'])->rows() ) {
+ $this->errorMessage(SimpleXLS::parseError());
+ }
+ break;
+ case "csv":
+ $data = self::parseCSV($file['tmp_name']);
+ break;
+ default:
+ $this->errorMessage('Fil er ikke korrekt type');
+ return false;
+ }
+
+ unset($data[0]); // remove column names from data
+ $this->model->activity_data = $this->model->parseActivityData($data);
+ $this->successMessage('Aktiviteter blev uploadet, men er IKKE gemt');
+ }
+
+ private static function parseCSV($file){
+ $csv = file_get_contents($file);
+ // $lb = "\n";
+ // $delim = ";";
+ $lines = explode(";\n", $csv);
+ foreach ($lines as $line) {
+ preg_match_all("/\"([^\"]*)\"/",$line,$matches);
+ if (count($matches[1]) > 0) {
+ $data[] = $matches[1];
}
- else {
- try {
- if ($this->model->importActivities()) {
- $this->successMessage('Aktiviteter blev importeret.');
- $this->log("Aktiviter blev importeret af {$this->model->getLoggedInUser()->user}", 'Aktivitet', $this->model->getLoggedInUser());
- $this->hardRedirect($this->url('aktiviteterhome'));
- } else
- {
- $this->errorMessage('Kunne ikke importere aktiviteter.');
- $this->hardRedirect($this->url('aktiviteterhome'));
- }
- } catch (Exception $e) {
+ }
+ return $data;
+ }
+
+ /**
+ * Save uploaded data in the database
+ *
+ * @access private
+ * @return void
+ */
+ private function saveActivities($data, $replace = false) {
+ try {
+ $this->model->saveActivities($data, $replace);
+ $this->successMessage('Aktiviteter blev importeret.');
+ $this->log("Aktiviter blev importeret", 'Aktivitet', $this->model->getLoggedInUser());
+ } catch (FrameworkException $e) {
+ if ($e->getCode() == 1) {
+ $this->errorMessage('Kan ikke udskifte aktiviteter efter der er oprettet afviklinger');
+ } else {
$this->errorMessage('Kunne ikke importere aktiviteter.');
- $this->hardRedirect($this->url('aktiviteterhome'));
}
+ $this->errorMessage('Framework Exception');
+ $e->logException();
+ } catch (Exception $e) {
+ $this->errorMessage('Kunne ikke importere aktiviteter.');
+ error_log($e->getMessage());
+ }
+ }
+
+ private function exportActivities(){
+ $activities = $this->model->loadActivities();
+ header('Content-Type: text/csv;charset=utf-8');
+ header('Content-Disposition: attachment;filename="aktiviteter.csv"');
+ header('Cache-Control: max-age=0');
+
+ echo chr(0xEF).chr(0xBB).chr(0xBF); // UTF8 BOM
+ foreach($activities as $activity) {
+ foreach($activity as $cell) {
+ echo "\"$cell\";";
}
+ echo "\n";
}
-
- $this->page->model = $this->model;
- }
+ exit;
+ }
/**
* creates a scheduling for an activity
diff --git a/include/controllers/participant_controller.php b/include/controllers/participant_controller.php
index 50f1135f..28a4b7ef 100755
--- a/include/controllers/participant_controller.php
+++ b/include/controllers/participant_controller.php
@@ -384,6 +384,7 @@ protected function genSearchVars()
'supergds' => '',
'flere_gdsvagter' => '',
'sovesal' => '',
+ 'sober_sleeping',
'udeblevet' => '',
'rabat' => '',
'knutepunkt_bil' => '',
@@ -471,24 +472,31 @@ public function visTextedit()
$this->page->setTemplate('noResults');
} else {
$this->page->textfield = $this->vars['textfield'];
- $var = $this->page->textfield;
- $this->page->textcontent = $deltager->$var;
$this->page->deltager = $deltager;
- switch ($var) {
- case 'admin_note':
- $this->page->field = 'noter om deltageren';
- break;
- case 'deltager_note':
- $this->page->field = 'beskeder fra deltageren';
- break;
- case 'beskeder':
- $this->page->field = 'beskeder til deltageren';
- break;
- case 'paid_note':
- $this->page->field = 'økonomi-noter';
- break;
- default:
- $this->page->field = e($var);
+
+ if (preg_match("/deltager_note_(\w+)/",$this->page->textfield,$matches)) {
+ $var = $matches[1];
+ $this->page->textcontent = $deltager->note->$var->content;
+ $this->page->field = $deltager->note->$var->name;
+ } else {
+ $var = $this->page->textfield;
+ $this->page->textcontent = $deltager->$var;
+ switch ($var) {
+ case 'admin_note':
+ $this->page->field = 'noter om deltageren';
+ break;
+ case 'deltager_note':
+ $this->page->field = 'beskeder fra deltageren';
+ break;
+ case 'beskeder':
+ $this->page->field = 'beskeder til deltageren';
+ break;
+ case 'paid_note':
+ $this->page->field = 'økonomi-noter';
+ break;
+ default:
+ $this->page->field = e($var);
+ }
}
$this->page->setTitle('Rediger ' . strip_tags($this->page->field));
}
@@ -1877,4 +1885,8 @@ public function checkForDoubleBookings()
{
$this->page->double_booked_participants = $this->model->findDoubleBookedParticipants();
}
+
+ public function showRefund(){
+ $this->page->rfundees = $this->model->findPeopleNeedingRefund();
+ }
}
diff --git a/include/controllers/photo_controller.php b/include/controllers/photo_controller.php
index 8b7efb1b..23bbe3e9 100755
--- a/include/controllers/photo_controller.php
+++ b/include/controllers/photo_controller.php
@@ -199,4 +199,59 @@ public function seeMissingPhotos()
$this->hardRedirect($this->url('show_search_result'));
}
+
+ /**
+ * Download all uploaded photos with ID and name of organizer,
+ * in a zip archive
+ *
+ * @access public
+ * @return void
+ */
+ public function downloadPhotos(){
+ // Path and file names
+ $path = PUBLIC_PATH . 'uploads/';
+ $archive = $path.'photos.zip';
+
+ // Get all croped photos
+ $photos = glob($path.'photo-cropped-*');
+
+ if (!is_array($photos)) {
+ echo "Ingen fotos er blevet uploaded";
+ exit;
+ }
+
+ $participant_model = $this->model->factory('Participant');
+
+ // create new zip archive
+ $zip = new ZipArchive();
+ $zip->open($archive, ZIPARCHIVE::CREATE );
+
+ foreach ($photos as $photo){
+ // Get identifier and file type from photo
+ preg_match("/photo-cropped-(.+)\.(.+)/", $photo, $matches);
+ $identifier = $matches[1];
+ $filetype = $matches[2];
+
+ // Find the participant(organizer) the photo belongs to
+ if ($participant = $participant_model->getParticipantFromPhotoidentifier($identifier)){
+ // Add photo to zip file, with a more useful name
+ $name = preg_replace("/\s+/","_", $participant->getName() );
+ $filename = "{$participant->id}_$name.$filetype";
+ $zip->addFile($photo,$filename);
+ }
+
+ }
+ // Close the archive
+ $zip->close();
+ // Set headers for downloading the zip file
+ header("Content-type: application/zip");
+ header("Content-Disposition: attachment; filename=Arrangør_billeder_".date("Ymd").".zip");
+ header("Pragma: no-cache");
+ header("Expires: 0");
+ // Add zip file to the response
+ readfile($archive);
+ // Delete the zip file afterwards
+ unlink($archive);
+ exit;
+ }
}
diff --git a/include/controllers/wear_controller.php b/include/controllers/wear_controller.php
index f04f5728..bc9a3aa3 100755
--- a/include/controllers/wear_controller.php
+++ b/include/controllers/wear_controller.php
@@ -75,6 +75,7 @@ public function showWear() {
if (empty($this->vars['id']) || !($wear = $this->model->findEntity('Wear', $this->vars['id']))) {
$this->page->setTemplate('noResults');
} else {
+ $this->page->model = $this->model;
$this->page->wear = $wear;
}
}
@@ -182,7 +183,7 @@ public function editWear() {
public function wearBreakdown()
{
$this->page->wear_data = $this->model->getWearBreakdown();
- $this->page->wear_pricetypes = $this->model->getAllWearprices();
+ $this->page->wear_types = $this->model->getAllWearTypes();
$this->page->model = $this->model;
$this->page->sizes = $this->model->getWearSizes();
$this->page->size_count = count($this->page->sizes);
@@ -250,8 +251,8 @@ public function detailedMiniList()
$size = ((!empty($this->vars['size'])) ? strtoupper($this->vars['size']) : null);
$this->page->orders = $this->model->getWearOrders($type, $size);
$this->page->size = $size;
- $this->page->type = (($type) ? $this->model->findEntity('WearPriser', $type) : null);
- $this->page->headname = $type ? $this->page->type->getWear()->navn . '(' . $this->page->type->getCategory()->navn . ')' : '';
+ $this->page->type = (($type) ? $this->model->findEntity('Wear', $type) : null);
+ $this->page->headname = $type ? $this->page->type->navn : '';
$this->page->headsize = $size ? 'str. ' . $size : '';
}
diff --git a/include/entities/deltagere.php b/include/entities/deltagere.php
index 3b945941..7cc9b895 100755
--- a/include/entities/deltagere.php
+++ b/include/entities/deltagere.php
@@ -93,6 +93,25 @@ class Deltagere extends DBObject implements AgeFulfilment
'ungdomsskole' => 'Ungdomsskole/klub',
);
+ /**
+ * Contains display names for different notes
+ *
+ * @var array
+ */
+ static protected $note_names = [
+ 'da' => [
+ 'comment' => 'Andre kommentarer',
+ 'gds' => 'Kommentarer til GDS',
+ 'junior_ward' => 'Værge kontakt'
+ ],
+ 'en' => [
+ 'comment' => 'Other comments',
+ 'gds' => 'Comments regarding GDS',
+ 'junior_ward' => 'Ward contact'
+ ]
+ ];
+
+
/**
* Name of database table
*
@@ -125,6 +144,12 @@ public function __get($var)
return $this->calculated_age = $diff->format('%y');
+ } elseif($var == 'note') {
+ if (!isset($this->note_obj)) {
+ $this->note_obj = self::parseNote($this->deltager_note);
+ }
+ return $this->note_obj;
+
} elseif (array_key_exists($var, $this->storage)) {
return parent::__get($var);
@@ -201,6 +226,8 @@ public function wildcardSearch($input) {
case 'arbejdsomraade':
case 'ungdomsklub':
case 'scenarie':
+ case 'skills':
+ case 'deltager_note':
$select->setWhereOr($field, 'like', "%{$bit}%");
break;
default:
@@ -1615,4 +1642,25 @@ public function isSingleDayParticipant()
return $x->isEntrance() && !$x->isDayTicket();
})) === 0;
}
+
+ public function setNote($name, $content) {
+ $note = json_decode($this->deltager_note);
+ $note->$name = $content;
+ parent::__set('deltager_note', json_encode($note));
+ }
+
+ public static function parseNote($note){
+ if ($jsnon_note = json_decode($note)) {
+ $note_obj = new stdClass();
+ foreach($jsnon_note as $key => $value) {
+ $note_obj->$key = new stdClass();
+ $note_obj->$key->content = $value;
+ $note_obj->$key->name = isset(self::$note_names['da'][$key]) ? self::$note_names['da'][$key] : $key;
+ $note_obj->$key->name_en = isset(self::$note_names['en'][$key]) ? self::$note_names['en'][$key] : $key;
+ }
+ return $note_obj;
+ }
+
+ return null;
+ }
}
diff --git a/include/entities/wear.php b/include/entities/wear.php
index 1b1d2474..615a201f 100755
--- a/include/entities/wear.php
+++ b/include/entities/wear.php
@@ -109,6 +109,56 @@ public function getWearpriser($kategori = null)
return $this->createEntity('WearPriser')->findBySelectMany($select);
}
+ /**
+ * returns array of wear prices for the wear object, with only one price for organizers
+ *
+ * @param object $kategori - BrugerKategorier entity
+ * @access public
+ * @return array
+ */
+ public function getWearpriserSquashed()
+ {
+ if (!$this->isLoaded()) {
+ return array();
+ }
+
+ $select = $this->createEntity('BrugerKategorier')->getSelect();
+ $select->setWhere('arrangoer','=','ja');
+ $organizer_cats = $this->createEntity('BrugerKategorier')->findBySelectMany($select);
+
+ $select = $this->createEntity('WearPriser')->getSelect();
+ $select->setLeftJoin('brugerkategorier','brugerkategori_id', 'brugerkategorier.id');
+ $select->setWhere('wear_id', '=', $this->id);
+ $select->setWhere('arrangoer','=','nej');
+ $select->setField('wearpriser.id');
+ $select->setField('wearpriser.wear_id');
+ $select->setField('wearpriser.brugerkategori_id');
+ $select->setField('wearpriser.pris');
+ $participant_prices = $this->createEntity('WearPriser')->findBySelectMany($select);
+
+ $select = $this->createEntity('WearPriser')->getSelect();
+ $select->setLeftJoin('brugerkategorier','brugerkategori_id', 'brugerkategorier.id');
+ $select->setWhere('wear_id', '=', $this->id);
+ $select->setWhere('arrangoer','=','ja');
+ $select->setField('wearpriser.id');
+ $select->setField('wearpriser.wear_id');
+ $select->setField('wearpriser.brugerkategori_id');
+ $select->setField('wearpriser.pris');
+ $organizer_prices = $this->createEntity('WearPriser')->findBySelectMany($select);
+
+ if (count($organizer_cats) == count($organizer_prices)){
+ $organizer_price = (object) [
+ 'id' => 0,
+ 'brugerkategori_id' => 0,
+ 'wear_id' => $this->id,
+ 'pris' => $organizer_prices[0]->pris
+ ];
+ $participant_prices[] = $organizer_price;
+ return $participant_prices;
+ }
+ return array_merge($participant_prices,$organizer_prices);
+ }
+
/**
* returns array of user category id's that already have prices
* set for them, for this wear item
@@ -119,7 +169,7 @@ public function getWearpriser($kategori = null)
public function getUsedUserCategories()
{
$return = array();
- $prices = $this->getWearPriser();
+ $prices = $this->getWearpriserSquashed();
foreach ($prices as $price)
{
$return[] = $price->brugerkategori_id;
diff --git a/include/framework/dbobject.php b/include/framework/dbobject.php
index d7aad5e2..2a3367e5 100755
--- a/include/framework/dbobject.php
+++ b/include/framework/dbobject.php
@@ -568,6 +568,21 @@ public function delete()
return true;
}
+ /**
+ * deletes ALL elements of the curret object type from the database
+ *
+ * @access public
+ * @return bool
+ */
+ public function deleteALL(){
+ $query = "DELETE FROM {$this->quoteTable($this->tablename)}";
+ $this->getDB()->exec($query);
+ $this->invalidate();
+ $query = "ALTER TABLE {$this->quoteTable($this->tablename)} AUTO_INCREMENT = 1";
+ $this->getDB()->exec($query);
+ return true;
+ }
+
//{{{ methods dealing with loading objects and invalidating them
/**
* creates a number of new objects and calls loadObject to fill them with data
diff --git a/include/framework/layout.php b/include/framework/layout.php
index 256e7b98..9eba50db 100755
--- a/include/framework/layout.php
+++ b/include/framework/layout.php
@@ -433,12 +433,14 @@ protected function generateMenu() {
Overnatning (alle dage) | |||||||
Indgang onsdag 28/3 | |||||||
Indgang onsdag 8/4 | |||||||
Overnatning onsdag 28/3 | |||||||
Overnatning onsdag 8/4 | |||||||
Indgang torsdag 29/3 | |||||||
Indgang torsdag 9/4 | |||||||
Overnatning torsdag 29/3 | |||||||
Overnatning torsdag 9/4 | |||||||
Indgang fredag 30/3 | |||||||
Indgang fredag 10/4 | |||||||
Overnatning fredag 30/3 | |||||||
Overnatning fredag 10/4 | |||||||
Indgang lørdag 31/3 | |||||||
Indgang lørdag 11/4 | |||||||
Overnatning lørdag 31/3 | |||||||
Overnatning lørdag 11/4 | |||||||
Indgang søndag 1/4 | |||||||
Indgang søndag 12/4 | |||||||
Overnatning søndag 1/4 | |||||||
Overnatning søndag 12/4 | |||||||
Jeg vil spille på dansk: | = strpos($this->participant->sprog, 'dansk') !== false ? 'Ja' : 'Nej';?> | ||||||
Jeg vil spille på engelsk: | = strpos($this->participant->sprog, 'engelsk') !== false ? 'Ja' : 'Nej';?> | ||||||
Jeg vil spille på skandinavisk: | = strpos($this->participant->sprog, 'skandinavisk') !== false ? 'Ja' : 'Nej';?> | ||||||
Vil gerne med-arrangere Fastaval 2020: | = $this->participant->arrangoer_naeste_aar === 'ja' ? 'Ja' : 'Nej';?> | ||||||
Vil gerne med-arrangere Fastaval 2021: | = $this->participant->arrangoer_naeste_aar === 'ja' ? 'Ja' : 'Nej';?> | ||||||
Klargøre skolen fra mandag: | = $this->participant->ready_mandag === 'ja' ? 'Ja' : 'Nej';?> | ||||||
Klargøre skolen fra tirsdag: | = $this->participant->ready_tirsdag === 'ja' ? 'Ja' : 'Nej';?> | ||||||
Jeg vil være simultantolk: | = $this->participant->interpreter === 'ja' ? 'Ja' : 'Nej';?> | ||||||
Jeg vil gerne have en plads i arrangørsovesalen: | Ja | ||||||
Evner/skills du kan og vil hjælpe med: | = e($this->participant->skills);?> | ||||||
Jeg vil gerne sove i sovesal for ædru personer: | Ja | ||||||
Andre kommentarer: | = e($this->participant->deltager_note);?> | ||||||
Evner/skills du kan og vil hjælpe med: | =e($this->participant->skills)?> | ||||||
=$note->name?>: | =nl2br(e($note->content))?> | ||||||
Andre kommentarer: | =e($this->participant->deltager_note)?> | ||||||
Rig tante/onkel (støtter Fastaval med 300kr.) | Ja | ||||||
Sleeping area (all-days) | |||||||
Entrance Wednesday 28/3 | |||||||
Entrance Wednesday 8/4 | |||||||
Sleeping area Wednesday 28/3 | |||||||
Sleeping area Wednesday 8/4 | |||||||
Entrance Thursday 29/3 | |||||||
Entrance Thursday 9/4 | |||||||
Sleeping area Thursday 29/3 | |||||||
Sleeping area Thursday 9/4 | |||||||
Entrance Friday 30/3 | |||||||
Entrance Friday 10/4 | |||||||
Sleeping area Friday 30/3 | |||||||
Sleeping area Friday 10/4 | |||||||
Entrance Saturday 31/3 | |||||||
Entrance Saturday 11/4 | |||||||
Sleeping area Saturday 31/3 | |||||||
Sleeping area Saturday 11/4 | |||||||
Entrance Sunday 1/4 | |||||||
Entrance Sunday 12/4 | |||||||
Sleeping area Sunday 1/4 | |||||||
Sleeping area Sunday 12/4 | |||||||
I want to play in Danish: | = strpos($this->participant->sprog, 'dansk') !== false ? 'Yes' : 'No';?> | ||||||
I want to play in English: | = strpos($this->participant->sprog, 'engelsk') !== false ? 'Yes' : 'No';?> | ||||||
I want to play in Scandinavian: | = strpos($this->participant->sprog, 'skandinavisk') !== false ? 'Yes' : 'No';?> | ||||||
I want to be part of organizing Fastaval 2020: | = $this->participant->arrangoer_naeste_aar === 'ja' ? 'Yes' : 'No';?> | ||||||
I want to be part of organizing Fastaval 2021: | = $this->participant->arrangoer_naeste_aar === 'ja' ? 'Yes' : 'No';?> | ||||||
I will help setup the place Monday: | = $this->participant->ready_mandag === 'ja' ? 'Yes' : 'No';?> | ||||||
I will help setup the place Tuesday: | = $this->participant->ready_tirsdag === 'ja' ? 'Yes' : 'No';?> | ||||||
I can help translate on-site: | = $this->participant->interpreter === 'ja' ? 'Yes' : 'No';?> | ||||||
I would like a spot in the organisers sleeping area: | Yes | ||||||
I would like a spot in the organisers sleeping area: | Yes | ||||||
I would like to sleep in the area for sober people: | Yes | ||||||
Any skills you can and would like to help Fastaval with: | = e($this->participant->skills);?> | ||||||
Other comments: | = e($this->participant->deltager_note);?> | ||||||
=$note->name_en?>: | =nl2br(e($note->content))?> | ||||||
Other comments: | = e($this->participant->deltager_note);?> | ||||||
I am a rich aunty/uncle (supporting Fastaval with 300kr.) | Yes | ||||||
Jeg vil gerne have en plads i arrangørsovesalen: | Ja | ||||||
Jeg vil gerne sove i sovesal for ædru personer: | Ja | ||||||
Evner/skills du kan og vil hjælpe med: | = e($this->participant->skills);?> | ||||||
Andre kommentarer: | = e($this->participant->deltager_note);?> | ||||||
=$note->name?>: | =nl2br(e($note->content))?> | ||||||
Andre kommentarer: | =e($this->participant->deltager_note)?> | ||||||
Rig onkel (støtter Fastaval med 300kr.) | Ja | ||||||
I need a space in the volunteers sleeping area: | Yes | ||||||
I would like to sleep in the area for sober people: | Yes | ||||||
Skills you would like to help with at Fastaval: | = e($this->participant->skills);?> | ||||||
Other comments: | = e($this->participant->deltager_note);?> | ||||||
=$note->name_en?>: | =nl2br(e($note->content))?> | ||||||
Other comments: | = e($this->participant->deltager_note);?> | ||||||
Rich uncle (supporting Fastaval with 300kr.) | Yes | ||||||
Arr. næste år: | = $this->deltager->arrangoer_naeste_aar;?> | Arr. sovesal: | = $this->deltager->sovesal;?> | -Forfatter: | = $this->deltager->forfatter;?> | +Ædru sovesal: | = $this->deltager->sober_sleeping;?> |
Forfatter: | = $this->deltager->forfatter;?> | Ønsket antal aktiviteter: | = e($this->deltager->desired_activities);?> | Ønsket antal GDS: | = e($this->deltager->desired_diy_shifts);?> | +||
Simultantolk: | = e($this->deltager->interpreter);?> | ||||||
Udeblevet: | = $this->deltager->udeblevet;?> | -Karma: | = $this->participant_karma;?> | Annulleret: | deltager->annulled === 'ja') :?>style='color: #ffffff;background-color: #ff0000;'>= ucfirst($this->deltager->annulled);?> | - +Aktivitets-låst: | = e($this->deltager->activity_lock);?> |
Tilmeldt: | late_signup) :?>deltager->signed_up));?> | Checked in: | = strtotime($this->deltager->checkin_time) ? date('Y-m-d H:i', strtotime($this->deltager->checkin_time)) : 'Ikke tjekket ind';?> | -Aktivitets-låst: | = e($this->deltager->activity_lock);?> | ||
Må kontaktes: genSelect('deltager[may_contact]', array('nej', 'ja'), $this->deltager->may_contact);?> | |||||||
Ædru sovesal: genSelect('deltager[sober_sleeping]',array('nej','ja'), $this->deltager->sober_sleeping);?> | Forfatter: genSelect('deltager[forfatter]',array('nej', 'ja'), $this->deltager->forfatter);?> | ||||||
Ønsket antal aktiviteter: | Ønsket antal GDS: | -Simultantolk: = $this->genSelect('deltager[interpreter]', array('nej', 'ja'), $this->deltager->dancing_with_the_clans);?> | +Simultantolk: = $this->genSelect('deltager[interpreter]', array('nej', 'ja'), $this->deltager->interpreter);?> | ||||
Udeblevet: genSelect('deltager[udeblevet]',array('nej','ja'), $this->deltager->udeblevet);?> | diff --git a/include/templates/participant/visopret.phtml b/include/templates/participant/visopret.phtml index b215f283..74418845 100755 --- a/include/templates/participant/visopret.phtml +++ b/include/templates/participant/visopret.phtml @@ -80,6 +80,7 @@Simultantolk: = $this->genSelect('deltager[interpreter]', array('nej', 'ja'));?> | ||||||
Ædru sovesal: genSelect('deltager[sober_sleeping]',array('nej','ja'));?> | Udeblevet: genSelect('deltager[udeblevet]',array('nej','ja'));?> | SuperGM: genSelect('deltager[supergm]', array('nej','ja'));?> | |||||
getCategory()->navn;?> | ++ + + + + =$navn;?> + | ||||||
id;?> | -getCategory()->navn;?> | +=$navn;?> | pris;?> | ||||
getWear()->navn;?>, getCategory()->navn;?> | - wear_data[$price->id])) : +=$wear->navn;?> | + wear_data[$wear->id])) : foreach ($this->sizes as $size) :?>0 | sizes as $size) : $col_done = false; - foreach ($this->wear_data[$price->id] as $data) : - if ($data['size'] == $size && $data['wearpris_id'] == $price->id) : ?> + foreach ($this->wear_data[$wear->id] as $data) : + if ($data['size'] == $size && $data['wear_id'] == $wear->id) : ?>- + |