Changed days layout into table

This commit is contained in:
lars 2019-03-10 23:34:02 +01:00
parent 9667c00639
commit 3ba7cf595e
6 changed files with 127 additions and 80 deletions

View File

@ -7,3 +7,7 @@ RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.+)$ $1\.php [QSA,L] RewriteRule ^(.+)$ $1\.php [QSA,L]
<Files accred_config.php>
Require all denied
</Files>

View File

@ -269,7 +269,7 @@ die();
)); ));
$form->add('label', 'label_why', 'why', 'Précisions'); $form->add('label', 'label_why', 'why', 'Précisions');
$obj = $form->add('textarea', 'why',$ar['why']); $obj = $form->add('textarea', 'why',$ar['why'], array('cols' => 60));
$obj->set_rule(array( $obj->set_rule(array(
'required' => array('error', 'Merci de préciser la nature de la prestation!'), 'required' => array('error', 'Merci de préciser la nature de la prestation!'),
)); ));
@ -338,7 +338,7 @@ die();
)); ));
$form->add('label', 'label_paiement_autre', 'paiement_autre', 'Autre'); $form->add('label', 'label_paiement_autre', 'paiement_autre', 'Autre');
$obj = $form->add('textarea', 'paiement_autre', $ar['paiement_autre']); $obj = $form->add('textarea', 'paiement_autre', $ar['paiement_autre'], array('cols' => 60));
$obj->set_rule(array( $obj->set_rule(array(
'required' => array('error', 'Merci de préciser la nature du paiement!'), 'required' => array('error', 'Merci de préciser la nature du paiement!'),
'dependencies' => array(array( 'dependencies' => array(array(
@ -358,7 +358,7 @@ die();
)); ));
$form->add('label', 'label_adresse_distrib', 'adresse_distrib', 'Adresse de distribution'); $form->add('label', 'label_adresse_distrib', 'adresse_distrib', 'Adresse de distribution');
$obj = $form->add('textarea', 'adresse_distrib', $ar['adresse_distrib']); $obj = $form->add('textarea', 'adresse_distrib', $ar['adresse_distrib'], array('cols' => 60));
$obj->set_rule(array( $obj->set_rule(array(
'required' => array('error', 'Merci de fournir une adresse de distribution'), 'required' => array('error', 'Merci de fournir une adresse de distribution'),
'dependencies' => array(array( 'dependencies' => array(array(
@ -420,7 +420,7 @@ $(document).ready(function(){
var $form = $('#form'), var $form = $('#form'),
$summands = $('.num_prest'); $summands = $('.num_prest');
var $sumDisplay = null, var $sumDisplay = null,
$summandsNor = $form.find('.num_nor'), $summandsNor = $form.find('.num_nor'),
$summandsVip = $form.find('.num_vip'), $summandsVip = $form.find('.num_vip'),
@ -439,13 +439,13 @@ var $form = $('#form'),
var value = Number($(this).val()); var value = Number($(this).val());
if($(this).hasClass('num_nor')) { if($(this).hasClass('num_nor')) {
if (!isNaN(value)) { if (!isNaN(value)) {
price = Number($(this).parent().parent().find('.prixnor').html().substring(4)); price = Number($(this).parent().parent().find('.prixnor').html());
cntNor += value; cntNor += value;
sumNor += price*value; sumNor += price*value;
} }
} else if($(this).hasClass('num_vip')) { } else if($(this).hasClass('num_vip')) {
if (!isNaN(value)) { if (!isNaN(value)) {
price = Number($(this).parent().parent().find('.prixvip').html().substring(4)); price = Number($(this).parent().parent().find('.prixvip').html());
cntVip += value; cntVip += value;
sumVip += price*value; sumVip += price*value;
} }

View File

@ -35,7 +35,6 @@
if($_GET['o']=='excel') { if($_GET['o']=='excel') {
$objPHPExcel = new PHPExcel(); $objPHPExcel = new PHPExcel();
// Set properties // Set properties
$objPHPExcel->getProperties()->setCreator("Caribana festival"); $objPHPExcel->getProperties()->setCreator("Caribana festival");
$objPHPExcel->getProperties()->setLastModifiedBy("Caribana festival"); $objPHPExcel->getProperties()->setLastModifiedBy("Caribana festival");

View File

@ -89,16 +89,6 @@ background-color:#999; color: White;
width: 150px; width: 150px;
float: left; float: left;
} }
.prixvip {
padding-left: 60px;
float: left;
width: 50px;
}
.prixnor {
padding-left: 30px;
width: 60px;
float: left;
}
.ptot { .ptot {
width: 225px; width: 225px;
float: left; float: left;
@ -108,10 +98,13 @@ background-color:#999; color: White;
padding-left: 20px; padding-left: 20px;
} }
.num { .num {
width: 60px !important; width: 30px !important;
} }
.right-blob { .right-blob {
float: right; float: right;
text-align: right; text-align: right;
padding-left: 10px; padding-left: 10px;
} }
table#tpresta td {
padding-left: 20px;
}

155
composer.lock generated
View File

@ -1,7 +1,7 @@
{ {
"_readme": [ "_readme": [
"This file locks the dependencies of your project to a known state", "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" "This file is @generated automatically"
], ],
"content-hash": "90b442b74cfbb9deb4c2e60e01b68f98", "content-hash": "90b442b74cfbb9deb4c2e60e01b68f98",
@ -54,16 +54,16 @@
}, },
{ {
"name": "google/apiclient", "name": "google/apiclient",
"version": "v2.2.1", "version": "v2.2.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/google/google-api-php-client.git", "url": "https://github.com/googleapis/google-api-php-client.git",
"reference": "b69b8ac4bf6501793c389d4e013a79d09c85c5f2" "reference": "4e0fd83510e579043e10e565528b323b7c2b3c81"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/google/google-api-php-client/zipball/b69b8ac4bf6501793c389d4e013a79d09c85c5f2", "url": "https://api.github.com/repos/googleapis/google-api-php-client/zipball/4e0fd83510e579043e10e565528b323b7c2b3c81",
"reference": "b69b8ac4bf6501793c389d4e013a79d09c85c5f2", "reference": "4e0fd83510e579043e10e565528b323b7c2b3c81",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -78,7 +78,7 @@
}, },
"require-dev": { "require-dev": {
"cache/filesystem-adapter": "^0.3.2", "cache/filesystem-adapter": "^0.3.2",
"phpunit/phpunit": "~4", "phpunit/phpunit": "~4.8.36",
"squizlabs/php_codesniffer": "~2.3", "squizlabs/php_codesniffer": "~2.3",
"symfony/css-selector": "~2.1", "symfony/css-selector": "~2.1",
"symfony/dom-crawler": "~2.1" "symfony/dom-crawler": "~2.1"
@ -109,20 +109,20 @@
"keywords": [ "keywords": [
"google" "google"
], ],
"time": "2017-11-03T01:19:53+00:00" "time": "2018-06-20T15:52:20+00:00"
}, },
{ {
"name": "google/apiclient-services", "name": "google/apiclient-services",
"version": "v0.57", "version": "v0.88",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/google/google-api-php-client-services.git", "url": "https://github.com/googleapis/google-api-php-client-services.git",
"reference": "fc1821419f0e9d060d83a2864e2a40874b91430d" "reference": "1ad0a77dc28f658cf65b7146ee5342bd12cfff3f"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/google/google-api-php-client-services/zipball/fc1821419f0e9d060d83a2864e2a40874b91430d", "url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/1ad0a77dc28f658cf65b7146ee5342bd12cfff3f",
"reference": "fc1821419f0e9d060d83a2864e2a40874b91430d", "reference": "1ad0a77dc28f658cf65b7146ee5342bd12cfff3f",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -146,20 +146,20 @@
"keywords": [ "keywords": [
"google" "google"
], ],
"time": "2018-04-28T00:23:39+00:00" "time": "2019-03-04T00:22:51+00:00"
}, },
{ {
"name": "google/auth", "name": "google/auth",
"version": "v1.3.0", "version": "v1.4.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/google/google-auth-library-php.git", "url": "https://github.com/googleapis/google-auth-library-php.git",
"reference": "8f7c96146b2c62d3f4c6bbc4b5bb8a8e396b0b71" "reference": "196237248e636a3554a7d9e4dfddeb97f450ab5c"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/google/google-auth-library-php/zipball/8f7c96146b2c62d3f4c6bbc4b5bb8a8e396b0b71", "url": "https://api.github.com/repos/googleapis/google-auth-library-php/zipball/196237248e636a3554a7d9e4dfddeb97f450ab5c",
"reference": "8f7c96146b2c62d3f4c6bbc4b5bb8a8e396b0b71", "reference": "196237248e636a3554a7d9e4dfddeb97f450ab5c",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -193,7 +193,7 @@
"google", "google",
"oauth2" "oauth2"
], ],
"time": "2018-04-06T19:26:30+00:00" "time": "2018-09-17T20:29:21+00:00"
}, },
{ {
"name": "guzzlehttp/guzzle", "name": "guzzlehttp/guzzle",
@ -313,32 +313,33 @@
}, },
{ {
"name": "guzzlehttp/psr7", "name": "guzzlehttp/psr7",
"version": "1.4.2", "version": "1.5.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/guzzle/psr7.git", "url": "https://github.com/guzzle/psr7.git",
"reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c" "reference": "9f83dded91781a01c63574e387eaa769be769115"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c", "url": "https://api.github.com/repos/guzzle/psr7/zipball/9f83dded91781a01c63574e387eaa769be769115",
"reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c", "reference": "9f83dded91781a01c63574e387eaa769be769115",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.4.0", "php": ">=5.4.0",
"psr/http-message": "~1.0" "psr/http-message": "~1.0",
"ralouphie/getallheaders": "^2.0.5"
}, },
"provide": { "provide": {
"psr/http-message-implementation": "1.0" "psr/http-message-implementation": "1.0"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "~4.0" "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.4-dev" "dev-master": "1.5-dev"
} }
}, },
"autoload": { "autoload": {
@ -368,26 +369,27 @@
"keywords": [ "keywords": [
"http", "http",
"message", "message",
"psr-7",
"request", "request",
"response", "response",
"stream", "stream",
"uri", "uri",
"url" "url"
], ],
"time": "2017-03-20T17:10:46+00:00" "time": "2018-12-04T20:46:45+00:00"
}, },
{ {
"name": "monolog/monolog", "name": "monolog/monolog",
"version": "1.23.0", "version": "1.24.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/Seldaek/monolog.git", "url": "https://github.com/Seldaek/monolog.git",
"reference": "fd8c787753b3a2ad11bc60c063cff1358a32a3b4" "reference": "bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/fd8c787753b3a2ad11bc60c063cff1358a32a3b4", "url": "https://api.github.com/repos/Seldaek/monolog/zipball/bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266",
"reference": "fd8c787753b3a2ad11bc60c063cff1358a32a3b4", "reference": "bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -452,26 +454,30 @@
"logging", "logging",
"psr-3" "psr-3"
], ],
"time": "2017-06-19T01:22:40+00:00" "time": "2018-11-05T09:00:11+00:00"
}, },
{ {
"name": "phpoffice/phpexcel", "name": "phpoffice/phpexcel",
"version": "1.8.1", "version": "1.8.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/PHPOffice/PHPExcel.git", "url": "https://github.com/PHPOffice/PHPExcel.git",
"reference": "372c7cbb695a6f6f1e62649381aeaa37e7e70b32" "reference": "1441011fb7ecdd8cc689878f54f8b58a6805f870"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/PHPOffice/PHPExcel/zipball/372c7cbb695a6f6f1e62649381aeaa37e7e70b32", "url": "https://api.github.com/repos/PHPOffice/PHPExcel/zipball/1441011fb7ecdd8cc689878f54f8b58a6805f870",
"reference": "372c7cbb695a6f6f1e62649381aeaa37e7e70b32", "reference": "1441011fb7ecdd8cc689878f54f8b58a6805f870",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"ext-mbstring": "*",
"ext-xml": "*", "ext-xml": "*",
"ext-xmlwriter": "*", "ext-xmlwriter": "*",
"php": ">=5.2.0" "php": "^5.2|^7.0"
},
"require-dev": {
"squizlabs/php_codesniffer": "2.*"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@ -481,7 +487,7 @@
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
"license": [ "license": [
"LGPL" "LGPL-2.1"
], ],
"authors": [ "authors": [
{ {
@ -489,18 +495,19 @@
"homepage": "http://blog.maartenballiauw.be" "homepage": "http://blog.maartenballiauw.be"
}, },
{ {
"name": "Mark Baker" "name": "Erik Tilt"
}, },
{ {
"name": "Franck Lefevre", "name": "Franck Lefevre",
"homepage": "http://blog.rootslabs.net" "homepage": "http://rootslabs.net"
}, },
{ {
"name": "Erik Tilt" "name": "Mark Baker",
"homepage": "http://markbakeruk.net"
} }
], ],
"description": "PHPExcel - OpenXML - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine", "description": "PHPExcel - OpenXML - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine",
"homepage": "http://phpexcel.codeplex.com", "homepage": "https://github.com/PHPOffice/PHPExcel",
"keywords": [ "keywords": [
"OpenXML", "OpenXML",
"excel", "excel",
@ -510,20 +517,20 @@
"xlsx" "xlsx"
], ],
"abandoned": "phpoffice/phpspreadsheet", "abandoned": "phpoffice/phpspreadsheet",
"time": "2015-05-01T07:00:55+00:00" "time": "2018-11-22T23:07:24+00:00"
}, },
{ {
"name": "phpseclib/phpseclib", "name": "phpseclib/phpseclib",
"version": "2.0.11", "version": "2.0.15",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpseclib/phpseclib.git", "url": "https://github.com/phpseclib/phpseclib.git",
"reference": "7053f06f91b3de78e143d430e55a8f7889efc08b" "reference": "11cf67cf78dc4acb18dc9149a57be4aee5036ce0"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/7053f06f91b3de78e143d430e55a8f7889efc08b", "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/11cf67cf78dc4acb18dc9149a57be4aee5036ce0",
"reference": "7053f06f91b3de78e143d430e55a8f7889efc08b", "reference": "11cf67cf78dc4acb18dc9149a57be4aee5036ce0",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -602,7 +609,7 @@
"x.509", "x.509",
"x509" "x509"
], ],
"time": "2018-04-15T16:55:05+00:00" "time": "2019-03-10T16:53:45+00:00"
}, },
{ {
"name": "psr/cache", "name": "psr/cache",
@ -702,16 +709,16 @@
}, },
{ {
"name": "psr/log", "name": "psr/log",
"version": "1.0.2", "version": "1.1.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/php-fig/log.git", "url": "https://github.com/php-fig/log.git",
"reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd",
"reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -745,7 +752,47 @@
"psr", "psr",
"psr-3" "psr-3"
], ],
"time": "2016-10-10T12:19:37+00:00" "time": "2018-11-20T15:27:04+00:00"
},
{
"name": "ralouphie/getallheaders",
"version": "2.0.5",
"source": {
"type": "git",
"url": "https://github.com/ralouphie/getallheaders.git",
"reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/5601c8a83fbba7ef674a7369456d12f1e0d0eafa",
"reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa",
"shasum": ""
},
"require": {
"php": ">=5.3"
},
"require-dev": {
"phpunit/phpunit": "~3.7.0",
"satooshi/php-coveralls": ">=1.0"
},
"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": "2016-02-11T07:05:27+00:00"
}, },
{ {
"name": "stefangabos/zebra_form", "name": "stefangabos/zebra_form",

View File

@ -26,15 +26,19 @@
</div> </div>
<div class="row"> <div class="row">
<h6><strong>Contre-prestation</strong> <span id="xtot_num_nor"></span></h6><br> <h6><strong>Contre-prestation</strong> <span id="xtot_num_nor"></span></h6><br>
<div class="clear" style="margin-bottom:10px"></div>
<table id="tpresta">
<th>
<td>Jour</td><td>Normal</td><td></td><td>VIP</td><td></td>
</th>
<?php foreach($prices as $day => $onePrice) { ?> <?php foreach($prices as $day => $onePrice) { ?>
<div class="<?php echo $day; ?>"> <tr class="<?php echo $day; ?>">
<div class="cell"><div class="pdate"><?php echo $onePrice['label']; ?></div><div class="prix prixnor">CHF <?php echo $onePrice['nor']; ?></div></div> <td><?php echo $onePrice['label']; ?></td><td>CHF <span class="prixnor"><?php echo $onePrice['nor']; ?></span></td><td><?php echo ${$day.'_nor'}; ?></td><td>CHF <span class="prixvip"><?php echo $onePrice['vip']; ?></span></td><td><?php echo ${$day.'_vip'}; ?></td>
<div class="cell"><?php echo ${$day.'_nor'}; ?></div> </tr>
<div class="cell"><div class="pvip">VIP</div><div class="prix prixvip">CHF <?php echo $onePrice['vip']; ?></div></div>
<div class="cell"><?php echo ${$day.'_vip'}; ?></div>
<div class="clear" style="margin-bottom:10px"></div>
</div>
<?php } ?> <?php } ?>
</table>
<div class="clear" style="margin-bottom:10px"></div> <div class="clear" style="margin-bottom:10px"></div>
<div class="cell"><?php echo $label_nor_tot ?></div> <div class="cell"><?php echo $label_nor_tot ?></div>
<div class="cell"><?php echo $nor_tot ?></div> <div class="cell"><?php echo $nor_tot ?></div>