2021-04-07
This commit is contained in:
parent
6a48817267
commit
37d8c8b64f
@ -12,14 +12,14 @@
|
||||
|
||||
foreach ($table as $var)
|
||||
{
|
||||
if ( !empty(getpost( $var )))
|
||||
if ( getpost( $var ) != null )
|
||||
{
|
||||
$r = getpost( $var );
|
||||
/*if ( $r == "true")
|
||||
{
|
||||
$r = 1;
|
||||
}elseif( $r ="false")*/
|
||||
$db->$var = $r;
|
||||
$db->$var = trim($r, ' \"');
|
||||
}else
|
||||
{
|
||||
$erreur[] = $var;
|
||||
|
8
gestion/avions.php
Normal file
8
gestion/avions.php
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
require_once '../session_init.php';
|
||||
require_once 'config.inc.php';
|
||||
require_once 'db.class.php';
|
||||
require_once 'log.php';
|
||||
|
||||
function liste()
|
||||
{}
|
@ -12,7 +12,8 @@ Depuis <a href="https://lite.framacalc.org/9mfo-traduction">https://lite.framaca
|
||||
<li>cliquer sur enregistrer</li>
|
||||
<li>cliquer sur "Utiliser le format Texte CSV"</li>
|
||||
<li>sélectionner le Jeu de caractère "Unicode (UTF-8)"</li>
|
||||
<li>dans "Séparateur de champ" sélectionner ";"</li>
|
||||
<li>dans "Séparateur de champ" sélectionner "|" (barre verticale - AltGr + -)</li>
|
||||
<li>dans "Séparateur de chaines de caractères" supprimer les guillemets et laisser vide.</li>
|
||||
<li>cliquer sur valider</li>
|
||||
<li>uploader le fichier sur le serveur dans le dossier lang/</li>
|
||||
<li>en admin lancer le script genere_lang.php</li>
|
||||
|
19
gestion/comment_exporter_tableur_vers_cvs.html~
Normal file
19
gestion/comment_exporter_tableur_vers_cvs.html~
Normal file
@ -0,0 +1,19 @@
|
||||
|
||||
<strong>Documentation pour l'importation des langues.</strong>
|
||||
|
||||
Depuis <a href="https://lite.framacalc.org/9mfo-traduction">https://lite.framacalc.org/9mfo-traduction</a>
|
||||
<ol>
|
||||
<li>cliquer sur enregistrer</li>
|
||||
<li>choisir "ODS" comme format d'export</li>
|
||||
<li>ouvrir avec "LibreOffice Calc"</li>
|
||||
<li>dans "LibreOffice Calc" , menu "Fichier" => "enregistrer sous ..."</li>
|
||||
<li>sélectionner le dossier dans lequel vous voulez enregistrer le fichier</li>
|
||||
<li>choisir le format "Texte CSV(.csv)"à la place de "Classeur ODF(.ods)" (en bas à droite de la fenêtre)</li>
|
||||
<li>cliquer sur enregistrer</li>
|
||||
<li>cliquer sur "Utiliser le format Texte CSV"</li>
|
||||
<li>sélectionner le Jeu de caractère "Unicode (UTF-8)"</li>
|
||||
<li>dans "Séparateur de champ" sélectionner "|" (barre verticale - AltGr + -)</li>
|
||||
<li>cliquer sur valider</li>
|
||||
<li>uploader le fichier sur le serveur dans le dossier lang/</li>
|
||||
<li>en admin lancer le script genere_lang.php</li>
|
||||
</ol>
|
@ -11,7 +11,8 @@ Depuis https://lite.framacalc.org/9mfo-traduction
|
||||
7 - cliquer sur enregistrer
|
||||
8 - cliquer sur "Utiliser le format Texte CSV"
|
||||
9 - sélectionner le Jeu de caractère "Unicode (UTF-8)"
|
||||
10 - dans "Séparateur de champ" sélectionner ";"
|
||||
10 - dans "Séparateur de champ" sélectionner "|" (barre verticale - AltGr + -)
|
||||
11 - dans "Séparateur de chaines de caractères" supprimer les guillemets et laisser vide.
|
||||
11 - cliquer sur valider
|
||||
12 - uploader le fichier sur le serveur dans le dossier lang/
|
||||
13 - en admin lancer le script genere_lang.php
|
||||
|
17
gestion/comment_exporter_tableur_vers_cvs.txt~
Normal file
17
gestion/comment_exporter_tableur_vers_cvs.txt~
Normal file
@ -0,0 +1,17 @@
|
||||
|
||||
Documentation pour l'importation des langues.
|
||||
|
||||
Depuis https://lite.framacalc.org/9mfo-traduction
|
||||
1 - cliquer sur enregistrer
|
||||
2 - choisir "ODS" comme format d'export
|
||||
3 - ouvrir avec "LibreOffice Calc"
|
||||
4 - dans "LibreOffice Calc" , menu "Fichier" => "enregistrer sous ..."
|
||||
5 - sélectionner le dossier dans lequel vous voulez enregistrer le fichier
|
||||
6 - choisir le format "Texte CSV(.csv)"à la place de "Classeur ODF(.ods)" (en bas à droite de la fenêtre)
|
||||
7 - cliquer sur enregistrer
|
||||
8 - cliquer sur "Utiliser le format Texte CSV"
|
||||
9 - sélectionner le Jeu de caractère "Unicode (UTF-8)"
|
||||
10 - dans "Séparateur de champ" sélectionner "|" (barre verticale - AltGr + -)
|
||||
11 - cliquer sur valider
|
||||
12 - uploader le fichier sur le serveur dans le dossier lang/
|
||||
13 - en admin lancer le script genere_lang.php
|
@ -11,68 +11,71 @@
|
||||
$first_object = true;
|
||||
while( $line = fgets($fh))
|
||||
{
|
||||
echo $line . EOLH;
|
||||
$first_column = true;
|
||||
$table = explode(';', $line);
|
||||
$table = explode('|', $line);
|
||||
$i =0;
|
||||
foreach ( $table as $column )
|
||||
{
|
||||
$column = trim($column, " \n\r\t\v\0\"" );
|
||||
echo $column . "=>";
|
||||
|
||||
$column = trim($column, " \n\r\t\0\"" );
|
||||
|
||||
if ($first_line == true)
|
||||
{
|
||||
echo "first_line =>";
|
||||
//echo "first_line =>";
|
||||
if ( $first_column_line == true )
|
||||
{
|
||||
echo "first_column";
|
||||
//echo "first_column";
|
||||
$first_column_line = false;
|
||||
}else
|
||||
{
|
||||
|
||||
$index = explode("/",$column);
|
||||
echo "opening ../lang/" . $index[0];
|
||||
echo "opening ../lang/" . $index[0] . EOLH;
|
||||
|
||||
$fhl[++$i] = fopen("../lang/" . $index[0], "w") or die("can't open lang/" . $index[0]);
|
||||
$fhl[++$i] = fopen("../lang/" . $index[0], "wb") or die("can't open lang/" . $index[0]);
|
||||
fwrite($fhl[$i], '{');
|
||||
if ( $first_column == true )
|
||||
{
|
||||
$first_column = false;
|
||||
}else
|
||||
{
|
||||
fwrite($fhIndex, ",");
|
||||
fwrite($fhIndex, ",");
|
||||
}
|
||||
fwrite($fhIndex, '"' . $index[0] . '":"' . $index[1] . '"');
|
||||
}
|
||||
echo EOL;
|
||||
echo EOLH;
|
||||
}else
|
||||
{
|
||||
if (!empty($fhIndex))
|
||||
{
|
||||
fwrite($fhIndex, '}');
|
||||
fclose($fhIndex);
|
||||
unset($fhIndex);
|
||||
}
|
||||
echo "not first_line =>";
|
||||
//echo "not first_line =>";
|
||||
if ( $first_column == true )
|
||||
{
|
||||
$first_column = false;
|
||||
$index = $column;
|
||||
echo "first_column = ". $index . "=>";
|
||||
//echo "first_column = ". $index . "=>";
|
||||
}else
|
||||
{
|
||||
$i++;
|
||||
if ($first_object == true) // insère la virgule
|
||||
if ($first_object == false) // insère la virgule
|
||||
{
|
||||
echo "first_object =>";
|
||||
}else
|
||||
{
|
||||
echo "not first_object =>";
|
||||
//echo "not first_object =>";
|
||||
fwrite($fhl[$i], ", ");
|
||||
}
|
||||
fwrite($fhl[$i], '"' . $index . '":"' . $column .'"'); //écrit l'objet json
|
||||
echo "writing " . '"' . $index . '":"' . $column .'"';
|
||||
$text = '"' . $index . '":"' . $column .'"';
|
||||
fwrite($fhl[$i], $text ); //écrit l'objet json
|
||||
echo "writing ***" . $text .'***' . EOLH;
|
||||
fflush($fhl[$i]);
|
||||
|
||||
}
|
||||
echo EOL;
|
||||
echo EOLH;
|
||||
}
|
||||
echo EOL;
|
||||
//echo EOLH;
|
||||
}
|
||||
if ($first_line == false)
|
||||
{
|
||||
|
74
gestion/stats.php
Normal file
74
gestion/stats.php
Normal file
@ -0,0 +1,74 @@
|
||||
<?php
|
||||
require_once '../session_init.php';
|
||||
require_once 'config.inc.php';
|
||||
require_once 'db.class.php';
|
||||
require_once 'log.php';
|
||||
$db = new db();
|
||||
$db->open();
|
||||
|
||||
function totaltotal() //nombre d'avions poèmes créés depuis le début
|
||||
{
|
||||
global $db;
|
||||
$query = "SHOW TABLE STATUS LIKE 'avionpoeme'";
|
||||
$db->query($query);
|
||||
$result = $db->result->fetch_assoc();
|
||||
return $result['Auto_increment']-1;
|
||||
}
|
||||
function total()
|
||||
{
|
||||
global $db;
|
||||
$query = "SELECT COUNT(*) as nAvion FROM avionpoeme";
|
||||
$db->query($query);
|
||||
$result = $db->result->fetch_assoc();
|
||||
return $result["nAvion"];
|
||||
|
||||
}
|
||||
|
||||
function totalenvol()
|
||||
{
|
||||
global $db;
|
||||
$query = "SELECT COUNT(*) as n FROM avionpoeme WHERE public!=2";
|
||||
$db->query($query);
|
||||
$result = $db->result->fetch_assoc();
|
||||
return $result["n"];
|
||||
}
|
||||
|
||||
function alea()
|
||||
{
|
||||
global $db;
|
||||
$query = "SELECT COUNT(*) as nAvion FROM avionpoeme WHERE ";
|
||||
$db->query($query);
|
||||
$result = $db->result->fetch_assoc();
|
||||
return $result["n"];
|
||||
|
||||
}
|
||||
|
||||
function anonymous()
|
||||
{
|
||||
global $db;
|
||||
$query = "SELECT COUNT(*) as n FROM avionpoeme WHERE expemail=''";
|
||||
$db->query($query);
|
||||
$result = $db->result->fetch_assoc();
|
||||
return $result["n"];
|
||||
}
|
||||
|
||||
|
||||
$nAvionCree = totaltotal();
|
||||
if ($nAvionCree == 0)
|
||||
{
|
||||
echo "Aucun avion-poème envoyé pour l'instant";
|
||||
}else
|
||||
{
|
||||
|
||||
echo "Nombre total d'avions-poème : " . $nAvionCree . EOL;
|
||||
$total = total();
|
||||
$avionSupp = $nAvionCree-$total;
|
||||
echo "Nombre d'avion supprimés : " . $avionSupp . " => " . $avionSupp/$nAvionCree*100 . "%" . EOL;
|
||||
$nAvionenvol = totalenvol();
|
||||
echo "Nombre d'avions-poème en vol : " . $nAvionenvol . " => " . $nAvionenvol/$nAvionCree*100 . "%" . EOL;
|
||||
$anonymous = anonymous();
|
||||
echo "Nombre d'envois anonymes : " . $anonymous . " => " . $anonymous/$nAvionCree*100 . "%" . EOL;
|
||||
}
|
||||
|
||||
|
||||
$db->close();
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
define( 'EOL', "\n" );
|
||||
define( 'EOLH', "</br>" );
|
||||
define( 'LF', "\r\n" );
|
||||
define( 'TAB', "\t" );
|
||||
|
||||
|
@ -7,6 +7,7 @@ if ( !isset($site) )
|
||||
|
||||
require_once "config.inc.php";
|
||||
require_once "log.php";
|
||||
require_once "envoi_courriel.inc.php";
|
||||
|
||||
$table_prefix = "";
|
||||
class db
|
||||
@ -110,14 +111,14 @@ class db
|
||||
$query .= "FROM_UNIXTIME(" . $this->protect($this->deliveryTime) . "), '";
|
||||
$query .= $this->protect($this->deliveryTZ) . "', ";
|
||||
$query .= "FROM_UNIXTIME(" . $this->protect($this->deliveryTimeServer) . "), '";
|
||||
$query .= $this->protect($this->deliveryMethod) . "'";
|
||||
$query .= ")";
|
||||
$query .= $this->protect($this->deliveryMethod) . "','";
|
||||
$query .= "0')";
|
||||
//print_r($this);
|
||||
$this->query($query);
|
||||
$this->uid = $this->connect->insert_id;
|
||||
echo "{'uid':'" . $this->uid . "'}";
|
||||
|
||||
//newPeripetie($uid);
|
||||
courrielEnvoi($this);
|
||||
$this->newPeripetie();
|
||||
}
|
||||
|
||||
function getCurrentPlanes()
|
||||
@ -142,7 +143,7 @@ class db
|
||||
}else //renvoie les lignes d'anthologie
|
||||
{
|
||||
if ($page > $n_pages) $page=$n_pages;
|
||||
$query = "SELECT UNIX_TIMESTAMP(startTime) as startTime, startTZ, startName, message, UNIX_TIMESTAMP(deliveryTime) as deliveryTime , deliveryTZ, destName FROM avionpoeme WHERE deliveryTimeServer<NOW() AND public='1' ORDER BY startTime ASC LIMIT " . ($page-1)*RESULTS_BY_PAGE . "," . RESULTS_BY_PAGE;
|
||||
$query = "SELECT UNIX_TIMESTAMP(startTime) as startTime, startTZ, startName, message, UNIX_TIMESTAMP(deliveryTime) as deliveryTime , deliveryTZ, destName FROM avionpoeme WHERE deliveryTimeServer<NOW() AND public='1' ORDER BY startTime DESC LIMIT " . ($page-1)*RESULTS_BY_PAGE . "," . RESULTS_BY_PAGE;
|
||||
$this->query($query);
|
||||
$planes = $this->result->fetch_all(MYSQLI_ASSOC);
|
||||
print json_encode($planes, JSON_FORCE_OBJECT);
|
||||
@ -154,39 +155,37 @@ class db
|
||||
{
|
||||
global $db;
|
||||
$query = "INSERT INTO avionPeripetie VALUES ('0','";
|
||||
$query .= $this->protect($this->uid) . ",'";
|
||||
$query .= $this->protect($this->idPeripetie) . "', '";
|
||||
$query .= $this->protect($this->datePeripetie) . "', '";
|
||||
$query .= $this->protect($this->effetPeripetie) . "', '";
|
||||
$query .= $this->protect($this->expeMail) . "', '";
|
||||
$query .= $this->protect($this->destMail) . "')";
|
||||
echo $query;
|
||||
//$this->query($query);
|
||||
$query .= $this->protect($this->uid) . "','";
|
||||
$query .= $this->protect($this->idPeripetie) . "', ";
|
||||
$query .= "FROM_UNIXTIME(" . $this->protect($this->datePeripetie) . "))";
|
||||
//$query .= $this->protect($this->effetPeripetie) . "', '";
|
||||
//$query .= $this->protect($this->expeMail) . "', '";
|
||||
//$query .= $this->protect($this->destMail) . "')"; echo $query . EOL;
|
||||
$this->query($query);
|
||||
}
|
||||
|
||||
function newPeripetie()
|
||||
{
|
||||
global $db;
|
||||
mt_getrandmax ( );
|
||||
$query = "SELECT COUNT(*) as count FROM peripeties";
|
||||
|
||||
$query = "SELECT *, DATEDIFF(quand,CURDATE()) as datePeripetie FROM peripeties WHERE quand IS NULL";
|
||||
echo $query .EOL;
|
||||
$this->query($query);
|
||||
$result = $this->result->fetch_assoc();
|
||||
$db->idPeripetie = round(mt_rand(1,$result["count"]));
|
||||
$query = "SELECT * FROM peripeties WHERE idPeripetie='" . $db->idPeripetie . "'";
|
||||
$query = "SELECT COUNT(*) as count FROM peripeties";
|
||||
$this->query($query);
|
||||
$result = $this->result->fetch_assoc();
|
||||
//calcul de la probabilité de la péripétie
|
||||
|
||||
|
||||
//ajustement de l'effet
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$this->savePeripetie();
|
||||
$this->startTime = 1616584838;
|
||||
$this->deliveryTime = 1617469941;
|
||||
while ( ($result = $this->result->fetch_assoc()) )
|
||||
{
|
||||
print_r($result["idPeripetie"]);
|
||||
$this->idPeripetie = $result["idPeripetie"];
|
||||
if ((mt_rand(0,100) <= $result["probabilite"])) //calcul de la probabilité de la péripétie
|
||||
{
|
||||
print $this->startTime . "=>" . $this->deliveryTime . "===>";
|
||||
$this->datePeripetie = mt_rand($this->startTime, $this->deliveryTime); //ajustement de l'effet
|
||||
print $this->datePeripetie . "EOL";
|
||||
$this->savePeripetie();
|
||||
break; //une seule péripétie par avionpoème. Enlever le break si pas de limites sur le nombre de péripéties
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,46 @@
|
||||
<?php
|
||||
require_once 'log.php';
|
||||
|
||||
function getLang( $lang )
|
||||
{
|
||||
$dico = array();
|
||||
$fh = fopen('lang/'.$lang, 'r');
|
||||
$str = fgets($fh);
|
||||
fclose($fh);
|
||||
$dico = json_decode($str, true);
|
||||
return $dico;
|
||||
}
|
||||
|
||||
function courrielEnvoi( $db )
|
||||
{
|
||||
$dicoExpe = getLang( $db->expeLang );
|
||||
$dicoDest = getLang( $db->destLang );
|
||||
$expediteurIndex = "Notification_denvoi_Expediteur";
|
||||
//print "envoi du courriel" . EOL;
|
||||
if ( $db->expeKnown == false )
|
||||
{
|
||||
$destinataireIndex = "Notification_denvoi_Destinataire_ExpediteurConnu";
|
||||
}else
|
||||
{
|
||||
$destinataireIndex = "Notification_denvoi_Destinataire_ExpediteurAnonyme";
|
||||
}
|
||||
$indexObjet = "Objet_" . $expediteurIndex;
|
||||
$objetMail = $dicoExpe[$indexObjet];
|
||||
$mailText = $dicoExpe[$expediteurIndex] .EOL .EOL ;
|
||||
|
||||
envoiMail( $db->expeMail, $objetMail, $mailText, true);
|
||||
|
||||
$indexObjet = "Objet_" . $destinataireIndex;
|
||||
$objetMail = $dicoExpe[$indexObjet];
|
||||
$mailText = $dicoExpe[$destinataireIndex] .EOL .EOL ;
|
||||
//sleep (1);
|
||||
envoiMail( $db->destMail, $objetMail, $mailText, true);
|
||||
}
|
||||
|
||||
function courrielArrivee($uid)
|
||||
{
|
||||
//TODO
|
||||
}
|
||||
|
||||
function envoiMail($destinataire, $sujet, $text, $html=false)
|
||||
{
|
||||
@ -16,16 +56,17 @@ function envoiMail($destinataire, $sujet, $text, $html=false)
|
||||
$headers .= "DATE: " . date( 'r' ) . LF . LF;
|
||||
|
||||
log_write(__FILE__ . __LINE__ . " Envoi d'un courriel à " . $text . "sujet:" . $sujet, INFO);
|
||||
if( !mail($destinataire, $sujet, $text, $headers) ) //Sending mail
|
||||
if( !mail($destinataire, $sujet, wordwrap($text, 70 , "\r\n"), $headers) ) //Sending mail
|
||||
{
|
||||
log_write(__FILE__ . EOL . __LINE__ . EOL . "Le courriel n'est pas parti:" .$text . EOL . $sujet . EOL, ERROR);
|
||||
return 0;
|
||||
}else
|
||||
{
|
||||
log_write(__FILE__ . EOL . __LINE__ . EOL . "Le courriel avec les pièces jointes est parti:" .$text . EOL, INFO);
|
||||
log_write(__FILE__ . EOL . __LINE__ . EOL . "Le courriel est parti:" .$text . EOL, INFO);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -8,7 +8,7 @@ if ( !isset($site) )
|
||||
// $default valeur retournée si aucune valeur n'est trouvée
|
||||
// $session: si true, rechercher aussi dans $_SESSION
|
||||
|
||||
function getpost( $var, $default="", $session=false )
|
||||
function getpost( $var )
|
||||
{
|
||||
//echo '$var =>' . $var . "<br />";
|
||||
if ( isset($_GET[$var]) )
|
||||
@ -22,14 +22,7 @@ function getpost( $var, $default="", $session=false )
|
||||
return $_POST[$var];
|
||||
}else
|
||||
{
|
||||
if ( isset($_SESSION[$var]) AND $session==true )
|
||||
{
|
||||
return $_SESSION[$var];
|
||||
}else
|
||||
{
|
||||
//echo 'default -> $var =>' . $var . "<br />";
|
||||
return $default;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
88
peripetie.cron.php
Normal file
88
peripetie.cron.php
Normal file
@ -0,0 +1,88 @@
|
||||
<?php
|
||||
require_once './session_init.php';
|
||||
require_once 'config.inc.php';
|
||||
require_once 'db.class.php';
|
||||
require_once 'log.php';
|
||||
|
||||
$db = new db();
|
||||
$db->open();
|
||||
test();
|
||||
//peripetieDatee();
|
||||
peripeties();
|
||||
|
||||
function peripetieDatee()
|
||||
{
|
||||
global $db;
|
||||
require_once 'envoi_courriel.inc.php';
|
||||
$flag = false;
|
||||
|
||||
//recherche des péripéties datées
|
||||
$query = "SELECT * FROM peripeties WHERE quand!='' AND DATEDIFF(quand,CURDATE())=0";
|
||||
$db->query($query);
|
||||
$peripetieTable = $result = $db->result->fetch_all(MYSQLI_ASSOC);
|
||||
$query = "SELECT * FROM avionpoeme WHERE atteri=0";
|
||||
$db->query($query);
|
||||
while ( ($result = $db->result->fetch_assoc()) )
|
||||
{
|
||||
$dicoExpe = getLang( $result['expeLang'] );
|
||||
$dicoDest = getLang( $result['destLang'] );
|
||||
foreach( $peripetieTable as $p )
|
||||
{
|
||||
$indexObjet = "Objet_" . $p['indexText'];
|
||||
$objetMail = $dicoExpe["Objet_" . $p['indexText']];
|
||||
$mailText = $dicoExpe[$p['indexText']] .EOL .EOL ;
|
||||
print $objetMail .EOLH;
|
||||
print $mailText .EOLH;
|
||||
envoiMail( "dtux@free.fr", $objetMail, $mailText, true);//$result['destMail']
|
||||
sleep(2);
|
||||
envoiMail( "dtux@free.fr", $objetMail, $mailText, true);//$result['expeMail']
|
||||
sleep(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function peripeties()
|
||||
{
|
||||
global $db;
|
||||
//recherche des péripéties non datées
|
||||
$query = "SELECT * FROM avionpoeme WHERE atteri = 0";
|
||||
$db->query($query);
|
||||
$dbPeripetie = new db();
|
||||
$dbPeripetie->open();
|
||||
|
||||
while ( ($result = $db->result->fetch_assoc()) )
|
||||
{
|
||||
$dicoExpe = getLang( $result['expeLang'] );
|
||||
$dicoDest = getLang( $result['destLang'] );
|
||||
$query = "SELECT * FROM avionPeripetie LEFT JOIN peripeties USING (idPeripetie) WHERE idAvion='" . $result['idAvion'] . "'";
|
||||
$dbPeripetie->query($query);
|
||||
while (($peripetie =$dbPeripetie->result->fetch_assoc()))
|
||||
{
|
||||
print $result["destMail"] . EOL;
|
||||
$indexObjet = "Objet_" . $peripetie['indexText'];
|
||||
$objetMail = $dicoExpe["Objet_" . $peripetie['indexText']];
|
||||
$mailText = $dicoExpe[$peripetie['indexText']] .EOL .EOL ;
|
||||
print $indexObjet . EOL;
|
||||
print $mailText .EOL;
|
||||
//envoiMail( "dtux@free.fr", $objetMail, $mailText, true);//$result['destMail']
|
||||
//sleep(2);
|
||||
//envoiMail( "dtux@free.fr", $objetMail, $mailText, true);//$result['expeMail']
|
||||
//sleep(2);
|
||||
}
|
||||
|
||||
}
|
||||
$dbPeripetie->close();
|
||||
}
|
||||
|
||||
function test()
|
||||
{
|
||||
$lang = array( 'fr', 'en', 'es', 'de', 'ar', 'bg', 'zh', 'ja', 'pt');
|
||||
foreach ($lang as $value)
|
||||
{
|
||||
getLang( $value );
|
||||
print $value;
|
||||
print json_last_error_msg() .EOL;
|
||||
}
|
||||
}
|
||||
$db->close();
|
||||
?>
|
Reference in New Issue
Block a user