diff --git a/manifest.toml b/manifest.toml index 6e6b449..3bc8c7b 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Moncycle" description.en = "Menstrual cycle follow-up for natural family planning" description.fr = "Suivi de cycle pour les méthodes naturelles de régulation de naissance" -version = "9.0~ynh6" +version = "9.0~ynh7" maintainers = ["Raoul de Limezy"] @@ -45,7 +45,7 @@ ram.runtime = "50M" main.url = "/" [resources.apt] - packages = "mariadb-server, php8.2-gd, php8.2-mysql, php8.2-xml, php8.2-mbstring, php8.2-opcache" + packages = "mariadb-server, php8.3-gd, php8.3-mysql, php8.3-xml, php8.3-mbstring, php8.3-opcache" [resources.database] type = "mysql" diff --git a/sources/patches/main-01.static.patch b/sources/patches/main-01.static.patch deleted file mode 100644 index c3c8904..0000000 --- a/sources/patches/main-01.static.patch +++ /dev/null @@ -1,460 +0,0 @@ -diff --git a/www_data/lib/db.php b/www_data/lib/db.php -index 73b2d83..61d675d 100644 ---- a/www_data/lib/db.php -+++ b/www_data/lib/db.php -@@ -20,7 +20,7 @@ function db_open() { - function db_select_cycles($db, $no_compte) { - static $sql = "SELECT date_obs AS cycles FROM observation WHERE no_compte = :no_compte AND premier_jour=1 ORDER BY cycles DESC"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->bindValue(":no_compte", $no_compte, PDO::PARAM_INT); - $statement->execute(); - -@@ -30,7 +30,7 @@ function db_select_cycles($db, $no_compte) { - function db_select_grossesses($db, $no_compte) { - static $sql = "SELECT date_obs AS cycles FROM observation WHERE no_compte = :no_compte AND grossesse=1 ORDER BY cycles DESC"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->bindValue(":no_compte", $no_compte, PDO::PARAM_INT); - $statement->execute(); - -@@ -40,7 +40,7 @@ function db_select_grossesses($db, $no_compte) { - function db_select_sensations($db, $no_compte) { - static $sql = "select distinct sensation, count(sensation) as nb from observation where sensation is not null and no_compte=:no_compte group by sensation order by nb desc"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->bindValue(":no_compte", $no_compte, PDO::PARAM_INT); - $statement->execute(); - -@@ -50,7 +50,7 @@ function db_select_sensations($db, $no_compte) { - function db_select_compte_par_nocompte($db, $no_compte) { - static $sql = "select * from compte where no_compte = :no_compte"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->bindValue(":no_compte", $no_compte, PDO::PARAM_INT); - $statement->execute(); - -@@ -60,7 +60,7 @@ function db_select_compte_par_nocompte($db, $no_compte) { - function db_select_compte_par_mail($db, $mail) { - static $sql = "select * from compte where email1 like :email1"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->bindValue(":email1", $mail, PDO::PARAM_STR); - $statement->execute(); - -@@ -90,7 +90,7 @@ function db_update_co_echoue($db, $mail){ - function db_select_compte_existe($db, $mail) { - static $sql = "select count(no_compte)>0 as compte_existe from compte where email1 like :email1"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->bindValue(":email1", $mail, PDO::PARAM_STR); - $statement->execute(); - -@@ -100,7 +100,7 @@ function db_select_compte_existe($db, $mail) { - function db_insert_compte($db, $nom, $methode, $age, $mail, $mdp, $decouvert, $recherche) { - static $sql = "INSERT INTO compte (nom, methode, age, email1, motdepasse, decouvert, recherche) VALUES (:nom, :methode, :age, :email1, :motdepasse, :decouvert, :recherche)"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->bindValue(":nom", $nom, PDO::PARAM_STR); - $statement->bindValue(":methode", $methode, PDO::PARAM_INT); - $statement->bindValue(":age", $age, PDO::PARAM_INT); -@@ -117,9 +117,9 @@ function db_update_compte_param_str($db, $param, $value, $no_compte) { - $param_list = ["nom", "email1", "email2", "motdepasse", "totp_secret", "derniere_co_date", "inscription_date", "mdp_change_date", "decouvert"]; - if (!in_array($param, $param_list, true)) return false; - -- static $sql = "UPDATE compte SET " . $param . " = :cvalue WHERE no_compte = :no_compte"; -+ $sql = "UPDATE compte SET " . $param . " = :cvalue WHERE no_compte = :no_compte"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->bindValue(":no_compte", $no_compte, PDO::PARAM_INT); - $statement->bindValue(":cvalue", $value, PDO::PARAM_STR); - $statement->execute(); -@@ -131,9 +131,9 @@ function db_update_compte_param_int($db, $param, $value, $no_compte) { - $param_list = ["methode", "age", "nb_co_echoue", "donateur", "actif", "relance", "timeline_asc", "recherche"]; - if (!in_array($param, $param_list, true)) return false; - -- static $sql = "UPDATE compte SET " . $param . " = :cvalue WHERE no_compte = :no_compte"; -+ $sql = "UPDATE compte SET " . $param . " = :cvalue WHERE no_compte = :no_compte"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->bindValue(":no_compte", $no_compte, PDO::PARAM_INT); - $statement->bindValue(":cvalue", $value, PDO::PARAM_INT); - $statement->execute(); -@@ -144,7 +144,7 @@ function db_update_compte_param_int($db, $param, $value, $no_compte) { - function db_update_motdepasse_par_mail ($db, $mdp, $mail) { - static $sql = "UPDATE compte SET motdepasse = :motdepasse, mdp_change_date = NULL WHERE email1 = :email1"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->bindValue(":email1", $mail, PDO::PARAM_STR); - $statement->bindValue(":motdepasse", $mdp, PDO::PARAM_STR); - $statement->execute(); -@@ -155,7 +155,7 @@ function db_update_motdepasse_par_mail ($db, $mdp, $mail) { - function db_udpate_motdepasse_par_nocompte($db, $mdp, $no_compte) { - static $sql = "UPDATE compte SET motdepasse = :motdepasse, mdp_change_date = now() WHERE no_compte = :no_compte"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->bindValue(":no_compte", $no_compte, PDO::PARAM_INT); - $statement->bindValue(":motdepasse", $mdp, PDO::PARAM_STR); - $statement->execute(); -@@ -166,7 +166,7 @@ function db_udpate_motdepasse_par_nocompte($db, $mdp, $no_compte) { - function db_delete_compte($db, $no_compte){ - static $sql = "DELETE FROM compte WHERE no_compte = :no_compte"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->bindValue(":no_compte", $no_compte, PDO::PARAM_INT); - $statement->execute(); - -@@ -176,7 +176,7 @@ function db_delete_compte($db, $no_compte){ - function db_delete_jetton($db, $no_jetton, $no_compte){ - static $sql = "DELETE FROM `jetton` WHERE `no_jetton` = :no_jetton AND `no_compte` = :no_compte"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->bindValue(":no_jetton", $no_jetton, PDO::PARAM_INT); - $statement->bindValue(":no_compte", $no_compte, PDO::PARAM_INT); - $statement->execute(); -@@ -187,7 +187,7 @@ function db_delete_jetton($db, $no_jetton, $no_compte){ - function db_delete_observation($db, $no_compte, $date){ - static $sql = "DELETE FROM observation WHERE no_compte = :no_compte AND date_obs = :date"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->bindValue(":no_compte", $no_compte, PDO::PARAM_INT); - $statement->bindValue(":date", $date, PDO::PARAM_STR); - $statement->execute(); -@@ -198,7 +198,7 @@ function db_delete_observation($db, $no_compte, $date){ - function db_delete_vieux_jetton($db) { - static $sql = "DELETE FROM jetton WHERE (date_creation < (CURDATE() + INTERVAL - 365 DAY) OR date_use < (CURDATE() + INTERVAL - 40 DAY)) AND expire>0"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->execute(); - - return $statement->rowCount(); -@@ -207,7 +207,7 @@ function db_delete_vieux_jetton($db) { - function db_select_all_observation($db, $no_compte) { - static $sql = "select * from observation where no_compte = :no_compte"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->bindValue(":no_compte", $no_compte, PDO::PARAM_INT); - $statement->execute(); - -@@ -217,7 +217,7 @@ function db_select_all_observation($db, $no_compte) { - function db_select_observation ($db, $date, $no_compte) { - static $sql = "SELECT * FROM observation WHERE date_obs = :date AND no_compte = :no_compte LIMIT 1"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->bindValue(":date", $date, PDO::PARAM_STR); - $statement->bindValue(":no_compte", $no_compte, PDO::PARAM_INT); - $statement->execute(); -@@ -228,7 +228,7 @@ function db_select_observation ($db, $date, $no_compte) { - function db_insert_observation ($db, $date, $no_compte) { - static $sql = "INSERT INTO observation (no_compte, date_obs, gommette) VALUES (:no_compte, :date, '')"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->bindValue(":date", $date, PDO::PARAM_STR); - $statement->bindValue(":no_compte", $no_compte, PDO::PARAM_INT); - $statement->execute(); -@@ -239,7 +239,7 @@ function db_insert_observation ($db, $date, $no_compte) { - function db_update_observation ($db, $date, $no_compte, $gommette='', $note_fc=null, $fleche_fc=null, $sensation=null, $temp=null, $htemp=null, $jour_sommet=null, $union_sex=null, $premier_jour=null, $jenesaispas=null, $grossesse=null, $commentaire=null, $compteur=null) { - static $sql = "UPDATE observation SET gommette = :gommette, note_fc = :note_fc, fleche_fc = :fleche_fc, temperature = :temp, heure_temp = :htemp, sensation = :sensation, jour_sommet = :jour_sommet, union_sex = :union_sex, premier_jour = :premier_jour, jenesaispas = :jenesaispas, grossesse = :grossesse, commentaire = :commentaire, compteur = :compteur WHERE date_obs = :date AND no_compte = :no_compte"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->bindValue(":gommette", $gommette, PDO::PARAM_STR); - $statement->bindValue(":note_fc", $note_fc, PDO::PARAM_STR); - $statement->bindValue(":fleche_fc", $fleche_fc, PDO::PARAM_STR); -@@ -263,7 +263,7 @@ function db_update_observation ($db, $date, $no_compte, $gommette='', $note_fc=n - function db_select_cycle($db, $date, $no_compte) { - static $sql = "SELECT date_obs AS cycle FROM observation WHERE premier_jour=1 AND date_obs<=:date AND no_compte = :no_compte ORDER BY date_obs DESC LIMIT 1"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->bindValue(":date", $date, PDO::PARAM_STR); - $statement->bindValue(":no_compte", $no_compte, PDO::PARAM_INT); - $statement->execute(); -@@ -274,7 +274,7 @@ function db_select_cycle($db, $date, $no_compte) { - function db_select_cycle_end($db, $date, $no_compte) { - static $sql = "SELECT date_obs AS cycle_end FROM observation WHERE premier_jour=1 and date_obs>:date AND no_compte = :no_compte ORDER BY date_obs ASC LIMIT 1"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->bindValue(":date", $date, PDO::PARAM_STR); - $statement->bindValue(":no_compte", $no_compte, PDO::PARAM_INT); - $statement->execute(); -@@ -285,7 +285,7 @@ function db_select_cycle_end($db, $date, $no_compte) { - function db_select_cycle_grossesse($db, $date, $no_compte) { - static $sql = "SELECT date_obs AS grossesse FROM observation WHERE grossesse=1 and date_obs>:date AND no_compte = :no_compte ORDER BY date_obs ASC LIMIT 1"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->bindValue(":date", $date, PDO::PARAM_STR); - $statement->bindValue(":no_compte", $no_compte, PDO::PARAM_INT); - $statement->execute(); -@@ -296,7 +296,7 @@ function db_select_cycle_grossesse($db, $date, $no_compte) { - function db_select_cycle_complet($db, $date_start, $date_end, $no_compte) { - static $sql = "SELECT date_obs, COALESCE(jenesaispas,'') as '?', COALESCE(note_fc,'') as note_fc, COALESCE(fleche_fc,'') as fleche_fc, gommette, COALESCE(temperature,'') as temperature, COALESCE(heure_temp,'') as heure_temp, COALESCE(sensation,'') as sensation, COALESCE(jour_sommet, '') as sommet, COALESCE(compteur, '') as compteur, COALESCE(union_sex, '') as 'unions', COALESCE(grossesse, '') as 'grossesse', commentaire, COALESCE(premier_jour, 0) as 'premier_jour' FROM observation WHERE date_obs>=:date_start AND date_obs<=:date_end AND no_compte = :no_compte ORDER BY date_obs ASC"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->bindValue(":date_start", $date_start, PDO::PARAM_STR); - $statement->bindValue(":date_end", $date_end, PDO::PARAM_STR); - $statement->bindValue(":no_compte", $no_compte, PDO::PARAM_INT); -@@ -308,7 +308,7 @@ function db_select_cycle_complet($db, $date_start, $date_end, $no_compte) { - function db_select_nb_compte($db) { - static $sql = "select count(no_compte) as MONCYCLE_APP_NB_COMPTE from compte"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->execute(); - - return $statement->fetchAll(PDO::FETCH_NUM); -@@ -317,7 +317,7 @@ function db_select_nb_compte($db) { - function db_select_nb_compte_actif($db) { - static $sql = "select count(distinct no_compte) as MONCYCLE_APP_NB_COMPTE_ACTIF from observation where date_obs >= DATE(NOW()) - INTERVAL 35 DAY"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->execute(); - - return $statement->fetchAll(PDO::FETCH_NUM); -@@ -326,7 +326,7 @@ function db_select_nb_compte_actif($db) { - function db_select_nb_compte_actif_par_methode($db, $methode) { - static $sql = "select count(distinct obs.no_compte) as MONCYCLE_APP_NB_COMPTE_ACTIF_METHODE from observation as obs left join compte as com on obs.no_compte = com.no_compte where date_obs >= DATE(NOW()) - INTERVAL 35 DAY and com.methode = :methode"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->bindValue(":methode", $methode, PDO::PARAM_INT); - $statement->execute(); - -@@ -336,7 +336,7 @@ function db_select_nb_compte_actif_par_methode($db, $methode) { - function db_select_nb_compte_recent($db) { - static $sql = "select count(no_compte) as MONCYCLE_APP_NB_COMPTE_RECENT from compte where inscription_date >= DATE(NOW()) - INTERVAL 15 DAY and derniere_co_date is not null"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->execute(); - - return $statement->fetchAll(PDO::FETCH_NUM); -@@ -345,7 +345,7 @@ function db_select_nb_compte_recent($db) { - function db_select_nb_cycle($db) { - static $sql = "select count(no_observation) as MONCYCLE_APP_NB_CYCLE from observation where premier_jour=1 and no_compte!=2"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->execute(); - - return $statement->fetchAll(PDO::FETCH_NUM); -@@ -354,7 +354,7 @@ function db_select_nb_cycle($db) { - function db_select_nb_cycle_recent($db) { - static $sql = "select count(no_observation) as MONCYCLE_APP_NB_CYCLE_RECENT from observation where premier_jour=1 and date_obs>= DATE(NOW()) - INTERVAL 30 DAY and no_compte!=2"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->execute(); - return $statement->fetchAll(PDO::FETCH_NUM); - } -@@ -362,7 +362,7 @@ function db_select_nb_cycle_recent($db) { - function db_select_age_moyen($db) { - static $sql = "select year(now())-avg(age)+2.5 as MONCYCLE_APP_NB_AGE_MOYEN from compte"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->execute(); - - return $statement->fetchAll(PDO::FETCH_NUM); -@@ -371,7 +371,7 @@ function db_select_age_moyen($db) { - function db_select_age_moyen_recent($db) { - static $sql = "select year(now())-avg(age)+2.5 as MONCYCLE_APP_NB_AGE_MOYEN_RECENT from compte where inscription_date >= DATE(NOW()) - INTERVAL 15 DAY and derniere_co_date is not null and no_compte!=2"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->execute(); - - return $statement->fetchAll(PDO::FETCH_NUM); -@@ -380,7 +380,7 @@ function db_select_age_moyen_recent($db) { - function db_select_total_observation_count($db) { - static $sql = "select count(no_observation) as MONCYCLE_APP_NB_OBSERVATION from observation where no_compte!=2;"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->execute(); - - return $statement->fetchAll(PDO::FETCH_NUM); -@@ -389,7 +389,7 @@ function db_select_total_observation_count($db) { - function db_select_observation_aujourdhui($db) { - static $sql = "select count(no_observation) as MONCYCLE_APP_NB_OBSERVATION_AUJOURDHUI from observation where date_obs like DATE(NOW()) and no_compte!=2"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->execute(); - - return $statement->fetchAll(PDO::FETCH_NUM); -@@ -398,7 +398,7 @@ function db_select_observation_aujourdhui($db) { - function db_select_observation_count($db, $nbj) { - static $sql = "select count(no_observation) as MONCYCLE_APP_NB_OBSERVATION from observation where date_obs>= DATE(NOW()) - INTERVAL :nbj DAY and no_compte!=2"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->bindValue(":nbj", $nbj, PDO::PARAM_INT); - $statement->execute(); - -@@ -408,7 +408,7 @@ function db_select_observation_count($db, $nbj) { - function db_select_jetton_compte($db) { - static $sql = "select count(no_jetton) as MONCYCLE_APP_NB_JETTON from jetton"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->execute(); - - return $statement->fetchAll(PDO::FETCH_NUM); -@@ -417,7 +417,7 @@ function db_select_jetton_compte($db) { - function db_select_cycles_recent($db) { - static $sql = "select subdate(obs.date_obs, 1) as cycle_complet, obs.no_compte as no_compte, c.nom as nom, c.methode as methode, c.email1 as email1, c.email2 as email2 from observation as obs, compte as c where obs.no_compte=c.no_compte and date_obs= DATE(NOW()) - INTERVAL 2 DAY and (premier_jour=1 or grossesse=1)"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->execute(); - - return $statement->fetchAll(PDO::FETCH_ASSOC); -@@ -426,7 +426,7 @@ function db_select_cycles_recent($db) { - function db_select_compte_inactif($db) { - static $sql = "select `c`.`no_compte` as `no_compte`,`c`.`nom` as `nom`,max(`o`.`dernier_modif`) as `derniere_obs_modif`,`c`.`email1` as `email1`,`c`.`email2` as `email2`,`c`.`inscription_date` as `inscription_date` from `compte` as `c` left join `observation` as `o` on `c`.`no_compte` = `o`.`no_compte` where `c`.`no_compte` != 2 and `c`.`relance`=0 group by `c`.`no_compte` having (date(`derniere_obs_modif`) < date(now()) - interval 35 DAY or `derniere_obs_modif` is null) and `inscription_date` < date(now()) - interval 35 DAY order by `derniere_obs_modif` desc limit 20"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->execute(); - - return $statement->fetchAll(PDO::FETCH_ASSOC); -@@ -435,7 +435,7 @@ function db_select_compte_inactif($db) { - function db_update_relance ($db, $no_compte, $relance) { - static $sql = "UPDATE compte SET relance = :relance WHERE no_compte = :no_compte"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->bindValue(":no_compte", $no_compte, PDO::PARAM_INT); - $statement->bindValue(":relance", $relance, PDO::PARAM_INT); - $statement->execute(); -@@ -446,7 +446,7 @@ function db_update_relance ($db, $no_compte, $relance) { - function db_insert_jetton($db, $no_compte, $nom, $pays, $jetton_str, $expire=2) { - static $sql = "INSERT INTO `jetton` (`no_compte`, `nom`, `pays`, `jetton_str`, `expire`) VALUES (:no_compte, :nom, :pays, :jetton_str, :expire)"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->bindValue(":no_compte", $no_compte, PDO::PARAM_INT); - $statement->bindValue(":expire", $expire, PDO::PARAM_INT); - $statement->bindValue(":nom", $nom, PDO::PARAM_STR); -@@ -460,7 +460,7 @@ function db_insert_jetton($db, $no_compte, $nom, $pays, $jetton_str, $expire=2) - function db_select_compte_jetton($db, $jetton_str) { - static $sql = "SELECT J.no_compte, J.no_jetton, C.nom AS nom_compte, J.pays, J.nom AS nom_jetton, J.date_creation AS d_creation_jetton, J.date_use AS d_use_jetton, C.methode, C.age, C.email1, C.email2, C.nb_co_echoue, C.donateur, C.actif, C.relance, C.derniere_co_date, C.inscription_date, C.mdp_change_date, C.decouvert, C.totp_secret, C.totp_etat, C.recherche, C.timeline_asc FROM `jetton` AS J INNER JOIN `compte` AS C ON J.no_compte=C.no_compte WHERE `jetton_str` = :jetton_str LIMIT 1"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->bindValue(":jetton_str", $jetton_str, PDO::PARAM_STR); - $statement->execute(); - -@@ -470,7 +470,7 @@ function db_select_compte_jetton($db, $jetton_str) { - function db_select_jetton_captcha($db, $jetton_str) { - static $sql = "SELECT captcha, no_jetton FROM `jetton` WHERE `jetton_str` = :jetton_str LIMIT 1"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->bindValue(":jetton_str", $jetton_str, PDO::PARAM_STR); - $statement->execute(); - -@@ -480,7 +480,7 @@ function db_select_jetton_captcha($db, $jetton_str) { - function db_update_jetton_use($db, $no_jetton){ - static $sql = "UPDATE `jetton` SET `date_use` = now() WHERE `no_jetton` = :no_jetton"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->bindValue(":no_jetton", $no_jetton, PDO::PARAM_INT); - $statement->execute(); - -@@ -490,7 +490,7 @@ function db_update_jetton_use($db, $no_jetton){ - function db_update_jetton_captcha($db, $jetton_str, $captcha){ - static $sql = "UPDATE `jetton` SET `date_use` = now(), `captcha` = :captcha WHERE `jetton_str` = :jetton_str"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->bindValue(":jetton_str", $jetton_str, PDO::PARAM_STR); - $statement->bindValue(":captcha", $captcha, PDO::PARAM_STR); - $statement->execute(); -@@ -501,7 +501,7 @@ function db_update_jetton_captcha($db, $jetton_str, $captcha){ - function db_select_tous_les_jetton($db, $no_compte) { - static $sql = "SELECT * FROM jetton where no_compte= :no_compte"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->bindValue(":no_compte", $no_compte, PDO::PARAM_INT); - $statement->execute(); - -@@ -511,7 +511,7 @@ function db_select_tous_les_jetton($db, $no_compte) { - function db_update_increment_cle_valeur($db, $cle){ - static $sql = "update cle_valeur set valeur = valeur+1 where cle like :cle"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->bindValue(":cle", $cle, PDO::PARAM_STR); - $statement->execute(); - -@@ -521,7 +521,7 @@ function db_update_increment_cle_valeur($db, $cle){ - function db_select_cle_valeur($db, $cle) { - static $sql = "select valeur from cle_valeur where cle=:cle"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->bindValue(":cle", $cle, PDO::PARAM_STR); - $statement->execute(); - -@@ -531,7 +531,7 @@ function db_select_cle_valeur($db, $cle) { - function db_update_reset_cle_valeur($db, $cle){ - static $sql = "update cle_valeur set valeur = 0 where cle like :cle"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->bindValue(":cle", $cle, PDO::PARAM_STR); - $statement->execute(); - -@@ -541,7 +541,7 @@ function db_update_reset_cle_valeur($db, $cle){ - function db_update_compte_totp_secret($db, $totp_secret, $no_compte) { - static $sql = "UPDATE compte SET totp_secret = :cvalue WHERE no_compte = :no_compte"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->bindValue(":no_compte", $no_compte, PDO::PARAM_INT); - $statement->bindValue(":cvalue", $totp_secret, PDO::PARAM_STR); - $statement->execute(); -@@ -552,7 +552,7 @@ function db_update_compte_totp_secret($db, $totp_secret, $no_compte) { - function db_update_compte_totp_etat($db, $totp_etat, $no_compte) { - static $sql = "UPDATE compte SET totp_etat = :cvalue WHERE no_compte = :no_compte"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->bindValue(":no_compte", $no_compte, PDO::PARAM_INT); - $statement->bindValue(":cvalue", $totp_etat, PDO::PARAM_INT); - $statement->execute(); -@@ -563,7 +563,7 @@ function db_update_compte_totp_etat($db, $totp_etat, $no_compte) { - function db_select_compte_avec_totp($db) { - static $sql = "select count(no_compte) as MONCYCLE_APP_NB_COMPTE_AVEC_TOTP from compte where totp_etat=3 and no_compte!=2"; - -- static $statement = $db->prepare($sql); -+ $statement = $db->prepare($sql); - $statement->execute(); - - return $statement->fetchAll(PDO::FETCH_NUM); \ No newline at end of file