1
0

4 Commits

Author SHA1 Message Date
mberard
de54555d77 add-attachment-in-form 2021-11-01 13:48:35 +01:00
mathieu_berard
af9b97596f Merge branch 'donation-button' of DTux/avion-poeme into master 2021-10-26 21:55:30 +00:00
mberard
f911853410 feat: add donation block in about page 2021-10-26 23:53:51 +02:00
mathieu_berard
79c241eb27 Merge branch 'add-two-pages' of DTux/avion-poeme into master 2021-10-25 21:55:06 +00:00
8 changed files with 212 additions and 114 deletions

View File

@@ -10,28 +10,22 @@
$db = new db();
//$db->open();
foreach ($table as $var)
{
if ( getpost( $var ) != null )
{
foreach ($table as $var) {
if (getpost($var) != null) {
$r = getpost($var);
/*if ( $r == "true")
{
$r = 1;
}elseif( $r ="false")*/
$db->$var = trim($r, ' \"');
}else
{
} else {
$erreur[] = $var;
}
}
if (!empty ($erreur))
{
if (!empty($erreur)) {
echo json_encode($erreur);
log_error("erreur lors de l'acquisition des données:" . EOLH . print_r($erreur, true));
}else
{
} else {
$db->newPlane();
}
$db->close();
?>

View File

@@ -197,4 +197,3 @@
}
}
$db->close();
?>

View File

@@ -54,6 +54,13 @@
<br>
<div class="form-control rounded-0" id="messageTextArea"></div>
</div>
<div class="form-group">
<label class="bold">Ajouter une piève jointe</label>
<div class="custom-file">
<input type="file" class="custom-file-input" id="attachmentPlane" aria-describedby="inputGroupFileAddon01">
<label class="custom-file-label" for="attachmentPlane"></label>
</div>
</div>
<div class="form-group">
<label class="bold" for="selectTime" id="flightTime">Temps de vol</label>
<select class="form-control" id="selectTime">

View File

@@ -1,7 +1,7 @@
[
{
"fr": "<p align=\"center\" style=\"border: 1px solid black; padding-top:50px; padding-bottom:50px; border-radius: 10px;\"><em>Cher·e·s semblables<br><br>Nous ne sommes pas comme vos milles et un prétendants<br><br>Si dautres que nous vous offrent linstantané,<br>Nous vous offrirons le temps et lattente<br><br>Sils vous offrent une lettre<br>Nous vous offrirons un poème<br><br>Sils vous offrent une certitude<br>Nous vous offrirons les aléas et linconnu<br><br>Sils vous offrent labondance<br>Nous vous offrirons le partage<br><br>Et sils vous offrent un message<br>Nous vous offrirons le voyage<br><br>Librement,<br><br>Léquipe davion-poe.me</em></p><br><br><p><b>En quelques mots</b><br><ul><li>Cette œuvre a été conçue par Maxime Sténuit (créateur), <a href=\"https://github.com/martinedoesgis\">martinedoesgis</a> (développeur front-end), et Daniel Tartavel (développeur back-end).</li><li>Lœuvre est sous licence <a href=\"https://creativecommons.org/licenses/by-nc-sa/2.0/fr/\">Creative Commons BY-NC-SA 2.0 FR</a> et le code source sous licence <a href=\"http://www.gnu.org/licenses/gpl-3.0.en.html\">GPLv3</a>.</li><li>Nous souhaitons que cette application mise librement à votre disposition soit utilisée à des fins excluant tous types de violences, quelles soient verbales ou physiques.</li><li>Les messages privés sont supprimés physiquement de notre serveur une fois arrivés, ainsi que lensemble des adresses électroniques. Ce site ne contient pas de traceurs.</li><li>Pour en savoir davantage sur <a href=\"https://lalis69.ddns.net:10443/laliscloud/index.php/s/Jf7BkZCWFpEF9tJ\">lorigine des avions-poèmes</a>.</li></ul><br>Nhésitez pas à nous faire part de vos commentaires et vos idées à <a href=\"mailto:contact@avion-poe.me\">contact@avion-poe.me</a>.<br><br>",
"en": "<p align=\"center\" style=\"border: 1px solid black; padding-top:50px; padding-bottom:50px; border-radius: 10px;\"><em>Dear fellow,<br><br>We do not resemble your sycophants and suitors<br><br>Should others offer you the instant,<br>We shall offer you the time and the wait<br><br>Should they offer you a letter<br>We shall offer you a poem<br><br>Should they offer you certainty<br>We shall offer you the vagaries and the unknown<br><br>Should they offer you abundance<br>We shall offer you sharing<br><br>And should they offer you a valley<br>We shall offer you the journey<br><br>Freely,<br><br>The team of avion-poe.me</em></p><br><br><p><b>In a few words :</b><br><ul><li>Avion-poe.me was created by Maxime Sténuit, <a href=\"https://github.com/martinedoesgis\">martinedoesgis</a> (front-end developer), and Daniel Tartavel (back-end developer).</li><li>The work is under the <a href=\"https://creativecommons.org/licenses/by-nc-sa/2.0/fr/\">Creative Commons BY-NC-SA 2.0 FR</a> license and the source code under the <a href=\"http://www.gnu.org/licenses/gpl-3.0.en.html\">GPLv3</a> licence.</li><li>We wish this application, made freely available to you, to be used for purposes that exclude all types of violence, whether verbal or physical.</li><li>Private messages are physically deleted from our server when they arrive. This site does not contain cookies.</li><li>To learn more about <a href=\"https://lalis69.ddns.net:10443/laliscloud/index.php/s/Jf7BkZCWFpEF9tJ\">the origin of the flight-poem</a>.</li></ul><br>Please feel free to share your comments and ideas with us at <a href=\"mailto:contact@avion-poe.me\">contact@avion-poe.me</a>.<br><br>",
"de": "<p align=\"center\" style=\"border: 1px solid black; padding-top:50px; padding-bottom:50px; border-radius: 10px;\"><em>Liebe Freunde<br><br>Wir gleichen euren Liebhabern nicht.<br><br>Bieten sie euch das Unmittelbare an<br>Schenken wir euch Zeit und Warten<br><br>Schreiben sie euch einen Brief<br>Überreichen wir euch ein Gedicht<br><br>Geben sie euch Gewissheit<br>bieten wir euch Launen und das Unbekannte<br><br>Überhäufen sie euch mit Überfluss<br>Lehren wir euch das Teilen<br><br>Und schicken sie euch eine Nachricht,<br>Dann schenken wir euch eine Reise.<br><br>Frei,<br><br>Das Team von avion-poe.me</em></p><br><br><p><b>In wenigen Worten:</b><br><ul><li>Diese Arbeit wurde von Maxime Sténuit (Schöpfer), <a href=\"https://github.com/martinedoesgis\">martinedoesgis</a> (Front-End-Entwickler) und Daniel Tartavel (Back-End-Entwickler) entworfen.</li><li>Die Arbeit ist unter der <a href=\"https://creativecommons.org/licenses/by-nc-sa/2.0/fr/\">Creative Commons BY-NC-SA 2.0 FR</a>-Lizenz und der Quellcode unter der <a href=\"http://www.gnu.org/licenses/gpl-3.0.en.html\">GPLv3</a>-Lizenz.</li><li>Wir möchten, dass diese Anwendung, die Ihnen frei zur Verfügung gestellt wird, für Zwecke verwendet wird, die alle Arten von verbaler oder physischer Gewalt ausschließen.</li><li>Private Nachrichten werden bei ihrem Eintreffen zusammen mit allen E-Mail-Adressen physisch von unserem Server gelöscht. Diese Seite enthält keine Cookies.</li><li>Um mehr <a href=\"https://lalis69.ddns.net:10443/laliscloud/index.php/s/Jf7BkZCWFpEF9tJ\">über den Ursprung von Gedicht-Flieger</a> zu erfahren.</li></ul><br>Bitte zögern Sie nicht, uns Ihre Kommentare und Ideen an <a href=\"mailto:contact@avion-poe.me\">contact@avion-poe.me</a> zu senden.<br><br>"
"fr": "<p align=\"center\" style=\"border: 1px solid black; padding-top:50px; padding-bottom:50px; border-radius: 10px;\"><em>Cher·e·s semblables<br><br>Nous ne sommes pas comme vos milles et un prétendants<br><br>Si dautres que nous vous offrent linstantané,<br>Nous vous offrirons le temps et lattente<br><br>Sils vous offrent une lettre<br>Nous vous offrirons un poème<br><br>Sils vous offrent une certitude<br>Nous vous offrirons les aléas et linconnu<br><br>Sils vous offrent labondance<br>Nous vous offrirons le partage<br><br>Et sils vous offrent un message<br>Nous vous offrirons le voyage<br><br>Librement,<br><br>Léquipe davion-poe.me</em></p><br><br><div id='donationElt'><div id='donationText'></div><div id='donationButton' ><a id='donationButtonText' class='btn btn-outline-primary' href='https://lydia-app.com/collect/98550-support-avion-poe-me/fr' target='_blank'></a></div></div><p><b>En quelques mots</b><br><ul><li>Cette œuvre a été conçue par Maxime Sténuit (créateur), <a href=\"https://github.com/martinedoesgis\">martinedoesgis</a> (développeur front-end), et Daniel Tartavel (développeur back-end).</li><li>Lœuvre est sous licence <a href=\"https://creativecommons.org/licenses/by-nc-sa/2.0/fr/\">Creative Commons BY-NC-SA 2.0 FR</a> et le code source sous licence <a href=\"http://www.gnu.org/licenses/gpl-3.0.en.html\">GPLv3</a>.</li><li>Nous souhaitons que cette application mise librement à votre disposition soit utilisée à des fins excluant tous types de violences, quelles soient verbales ou physiques.</li><li>Les messages privés sont supprimés physiquement de notre serveur une fois arrivés, ainsi que lensemble des adresses électroniques. Ce site ne contient pas de traceurs.</li><li>Pour en savoir davantage sur <a href=\"https://lalis69.ddns.net:10443/laliscloud/index.php/s/Jf7BkZCWFpEF9tJ\">lorigine des avions-poèmes</a>.</li></ul><br>Nhésitez pas à nous faire part de vos commentaires et vos idées à <a href=\"mailto:contact@avion-poe.me\">contact@avion-poe.me</a>.<br><br>",
"en": "<p align=\"center\" style=\"border: 1px solid black; padding-top:50px; padding-bottom:50px; border-radius: 10px;\"><em>Dear fellow,<br><br>We do not resemble your sycophants and suitors<br><br>Should others offer you the instant,<br>We shall offer you the time and the wait<br><br>Should they offer you a letter<br>We shall offer you a poem<br><br>Should they offer you certainty<br>We shall offer you the vagaries and the unknown<br><br>Should they offer you abundance<br>We shall offer you sharing<br><br>And should they offer you a valley<br>We shall offer you the journey<br><br>Freely,<br><br>The team of avion-poe.me</em></p><br><br><div id='donationElt'><div id='donationText'></div><div id='donationButton' ><a id='donationButtonText' class='btn btn-outline-primary' href='https://lydia-app.com/collect/98550-support-avion-poe-me/en' target='_blank'></a></div></div><p><b>In a few words :</b><br><ul><li>Avion-poe.me was created by Maxime Sténuit, <a href=\"https://github.com/martinedoesgis\">martinedoesgis</a> (front-end developer), and Daniel Tartavel (back-end developer).</li><li>The work is under the <a href=\"https://creativecommons.org/licenses/by-nc-sa/2.0/fr/\">Creative Commons BY-NC-SA 2.0 FR</a> license and the source code under the <a href=\"http://www.gnu.org/licenses/gpl-3.0.en.html\">GPLv3</a> licence.</li><li>We wish this application, made freely available to you, to be used for purposes that exclude all types of violence, whether verbal or physical.</li><li>Private messages are physically deleted from our server when they arrive. This site does not contain cookies.</li><li>To learn more about <a href=\"https://lalis69.ddns.net:10443/laliscloud/index.php/s/Jf7BkZCWFpEF9tJ\">the origin of the flight-poem</a>.</li></ul><br>Please feel free to share your comments and ideas with us at <a href=\"mailto:contact@avion-poe.me\">contact@avion-poe.me</a>.<br><br>",
"de": "<p align=\"center\" style=\"border: 1px solid black; padding-top:50px; padding-bottom:50px; border-radius: 10px;\"><em>Liebe Freunde<br><br>Wir gleichen euren Liebhabern nicht.<br><br>Bieten sie euch das Unmittelbare an<br>Schenken wir euch Zeit und Warten<br><br>Schreiben sie euch einen Brief<br>Überreichen wir euch ein Gedicht<br><br>Geben sie euch Gewissheit<br>bieten wir euch Launen und das Unbekannte<br><br>Überhäufen sie euch mit Überfluss<br>Lehren wir euch das Teilen<br><br>Und schicken sie euch eine Nachricht,<br>Dann schenken wir euch eine Reise.<br><br>Frei,<br><br>Das Team von avion-poe.me</em></p><br><br><div id='donationElt'><div id='donationText'></div><div id='donationButton' ><a id='donationButtonText' class='btn btn-outline-primary' href='https://lydia-app.com/collect/98550-support-avion-poe-me/fr' target='_blank'></a></div></div><p><b>In wenigen Worten:</b><br><ul><li>Diese Arbeit wurde von Maxime Sténuit (Schöpfer), <a href=\"https://github.com/martinedoesgis\">martinedoesgis</a> (Front-End-Entwickler) und Daniel Tartavel (Back-End-Entwickler) entworfen.</li><li>Die Arbeit ist unter der <a href=\"https://creativecommons.org/licenses/by-nc-sa/2.0/fr/\">Creative Commons BY-NC-SA 2.0 FR</a>-Lizenz und der Quellcode unter der <a href=\"http://www.gnu.org/licenses/gpl-3.0.en.html\">GPLv3</a>-Lizenz.</li><li>Wir möchten, dass diese Anwendung, die Ihnen frei zur Verfügung gestellt wird, für Zwecke verwendet wird, die alle Arten von verbaler oder physischer Gewalt ausschließen.</li><li>Private Nachrichten werden bei ihrem Eintreffen zusammen mit allen E-Mail-Adressen physisch von unserem Server gelöscht. Diese Seite enthält keine Cookies.</li><li>Um mehr <a href=\"https://lalis69.ddns.net:10443/laliscloud/index.php/s/Jf7BkZCWFpEF9tJ\">über den Ursprung von Gedicht-Flieger</a> zu erfahren.</li></ul><br>Bitte zögern Sie nicht, uns Ihre Kommentare und Ideen an <a href=\"mailto:contact@avion-poe.me\">contact@avion-poe.me</a> zu senden.<br><br>"
}
]

View File

@@ -1,3 +1,10 @@
:root {
/** Colors **/
--primary: #007bff;
--primary-rgb: 0, 123, 255;
--primary-hover: #0056b3;
}
html,
body {
overflow-x: hidden;
@@ -72,12 +79,12 @@ body {
/* Anthology */
#anthology {
margin-top: 30px;
margin-top: 56px;
z-index: 1029;
padding-top: 66px;
padding-bottom: 35px;
padding-left: 30%;
padding-right: 30%;
padding-left: 25%;
padding-right: 25%;
overflow-x: hidden;
width: 100vw;
background-color: rgba(255, 255, 255, 0.9);
@@ -85,12 +92,12 @@ body {
/* About */
#about {
margin-top: 30px;
margin-top: 56px;
z-index: 1029;
padding-top: 66px;
padding-bottom: 35px;
padding-left: 30%;
padding-right: 30%;
padding-left: 25%;
padding-right: 25%;
overflow-x: hidden;
width: 100vw;
background-color: rgba(255, 255, 255, 0.9);
@@ -254,3 +261,82 @@ a#navbarDropdownLang.nav-link.dropdown-toggle::after {
padding-right: 5% !important;
}
}
/* About donation */
#donationElt {
background: rgba(var(--primary-rgb), 0.2);
margin-bottom: 50px;
padding: 5%;
display: grid;
grid-template-columns: fit-content(370px) auto;
column-gap: 8%;
align-items: center;
}
#donationElt #donationButton {
text-align: right;
}
#donationElt #donationButton .btn {
background: white;
}
#donationElt #donationButton .btn:before {
font-family: "Font Awesome 5 Pro";
display: inline-block;
margin-right: 10px;
font-weight: 300;
}
#donationElt #donationButton .btn.fr:before {
content: "\f5ce";
}
#donationElt #donationButton .btn.en:before,
#donationElt #donationButton .btn.de:before,
#donationElt #donationButton .btn.pt:before,
#donationElt #donationButton .btn.es:before {
content: "\f0fc";
}
#donationElt #donationButton .btn.ar:before,
#donationElt #donationButton .btn.bg:before {
content: "\f875";
}
#donationElt #donationButton .btn.zh:before,
#donationElt #donationButton .btn.ja:before {
content: "\f7a0";
font-size: 13px;
font-weight: normal;
}
#donationElt #donationButton .btn:hover {
color: var(--primary-hover);
border-color: var(--primary-hover);
}
@media screen and (max-width: 990px) {
#donationElt {
grid-template-columns: 1fr;
grid-row-gap: 25px;
}
#donationElt #donationButton {
text-align: left;
}
}
@media screen and (max-width: 600px) {
#donationElt {
text-align: center;
}
#donationElt #donationButton {
text-align: center;
}
}
.custom-file-label::after {
content: "Parcourir";
}

View File

@@ -18,6 +18,12 @@ $("#destMail").change(function() {
checkFormValid()
})
document.querySelector('.custom-file-input').addEventListener('change',function(e){
var fileName = document.getElementById("attachmentPlane").files[0].name;
var nextSibling = e.target.nextElementSibling
nextSibling.innerText = fileName
})
function checkFormValid(){
if(validExpeMail && validExpeLoc && validDestMail && validDestLoc){
$('#sendNewPlane').prop("disabled", false)

View File

@@ -109,7 +109,29 @@ $("#sendNewPlane").on('click',function(){
var randomColor = getRandomColor()
console.log(message)
var formData = new FormData()
var attachment = $("#attachmentPlane").prop('files')[0];
formData.append('file', attachment);
formData.append('message', encodeURIComponent(message));
formData.append('expeMail', $("#expeMail").val());
formData.append('expeKnown', expeKnown);
formData.append('expeLang', lang);
formData.append('destLang', $("#selectDestLang").val());
formData.append('startLat', expeLoc.center[1]);
formData.append('startLon', expeLoc.center[0]);
formData.append('startName', expeLoc.name);
formData.append('startTime', sentDate);
formData.append('startTZ', expeTimezone);
formData.append('destMail', $("#destMail").val());
formData.append('destLat', destLoc.center[1]);
formData.append('destLon', destLoc.center[0]);
formData.append('destName', destLoc.name);
formData.append('public', publicMessage, );
formData.append('color', randomColor);
formData.append('deliveryTime', deliveryDate);
formData.append('deliveryTZ', destTimezone);
formData.append('deliveryTimeServer', deliverySecondsServer);
formData.append('deliveryMethod', $("#selectTime").val());
var data = {
'message':encodeURIComponent(message),
@@ -131,39 +153,22 @@ $("#sendNewPlane").on('click',function(){
'deliveryTime':deliveryDate,
'deliveryTZ':destTimezone,
'deliveryTimeServer':deliverySecondsServer,
'deliveryMethod':$("#selectTime").val()
'deliveryMethod':$("#selectTime").val(),
}
var query = 'avionpoeme.php?'+
'message='+data.message+'&'+
'expeMail='+data.expeMail+'&'+
'expeKnown='+data.expeKnown+'&'+
'expeLang='+data.expeLang+'&'+
'destLang='+data.destLang+'&'+
'startLat='+data.startLat+'&'+
'startLon='+data.startLon+'&'+
'startName='+data.startName+'&'+
'startTime='+data.startTime+'&'+
'startTZ='+data.startTZ+'&'+
'destMail='+data.destMail+'&'+
'destLat='+data.destLat+'&'+
'destLon='+data.destLon+'&'+
'destName='+data.destName+'&'+
'public='+data.public+'&'+
'color='+data.color+'&'+
'deliveryTime='+data.deliveryTime+'&'+
'deliveryTZ='+data.deliveryTZ+'&'+
'deliveryTimeServer='+data.deliveryTimeServer+'&'+
'deliveryMethod='+data.deliveryMethod+'';
$.post(query, function(result) {
$.ajax({
url: 'avionpoeme.php',
data: formData,
processData: false,
contentType: false,
cache : false,
type: 'POST',
success: function(result){
result = result.replace(/'/g, '"');
console.log(result)
result = $.parseJSON(result)
var planeId = Number(result.uid);
//selecting proper color for back
$("#back").attr("src","src/img/back-"+data.color+".jpg");
$("#back").attr("src","src/img/back-"+randomColor+".jpg");
// creating image for plane, need to link it to the inputs tog et entered values.
var message = quill.root.innerHTML
@@ -193,14 +198,11 @@ $("#sendNewPlane").on('click',function(){
},4400);
//reloading page (to change)
setInterval(function(){
window.location.href ='https://avion-poe.me?avion='+planeId+'';
window.location.href ='https://www.avion-poe.me/?avion='+planeId+'';
},5500);
})
})
}
});
})
});

View File

@@ -46,7 +46,6 @@ var dictionnary = []
function translateUI(l){
$.getJSON("lang/"+l+"", function(s){
//console.log(s)
dictionnary = s
//if arabic : display left to right (ltr) + troubleshooting a lot of individual elements
if (lang == "ar"){
@@ -150,10 +149,14 @@ function translateUI(l){
else{
$("#aboutText").html(e[0][lang])
}
$("#donationText").html(s.AvionPoeme_free_independent)
$("#donationButtonText").html(s.Soutenez_avionpoeme)
$("#donationButtonText").addClass(lang)
})
//plane limit tooltip
if (nbPlane && nbPlane > 99){
if (typeof nbPlane !== 'undefined') {
if (nbPlane > 99){
$("#planeLimitTooltip").attr("title", s.AvionPoeme_epuise).tooltip("_fixTitle");
}
else{
@@ -161,6 +164,7 @@ function translateUI(l){
s.NB_AvionPoeme_restant = s.NB_AvionPoeme_restant.replace('$NB_avion_poeme',remainingPlanes)
$("#planeLimitTooltip").attr("title", s.NB_AvionPoeme_restant).tooltip("_fixTitle");
}
}
})
.always(function(callback) {