From 6fe2ab51931602bc885601773d98e7ee18f0c9c2 Mon Sep 17 00:00:00 2001 From: OsaAjani Date: Wed, 9 Dec 2015 18:24:04 +0100 Subject: [PATCH] Ajout du support des SMS flash --- controllers/internalConsole.php | 7 +++++++ createDatabase.sql | 4 +++- templates/scheduleds/add.php | 9 +++++++++ templates/scheduleds/edit.php | 9 +++++++++ templates/settings/default.php | 19 +++++++++++++++++++ templates/users/add.php | 20 +++++++------------- 6 files changed, 54 insertions(+), 14 deletions(-) diff --git a/controllers/internalConsole.php b/controllers/internalConsole.php index 3e2f121..c4cb51c 100755 --- a/controllers/internalConsole.php +++ b/controllers/internalConsole.php @@ -102,6 +102,7 @@ { $id_scheduled = $scheduled['id']; $text_sms = escapeshellarg($scheduled['content']); + $flash = $scheduled['flash']; //On initialise les numéros auxquelles envoyer le SMS $numbers = array(); @@ -167,6 +168,12 @@ //Commande qui envoie le SMS $commande_send_sms = 'gammu-smsd-inject TEXT ' . escapeshellarg($number) . ' -report -len ' . mb_strlen($text_sms) . ' -text ' . $text_sms; + + if (RASPISMS_SETTINGS_SMS_FLASH && $flash) + { + $commande_send_sms .= ' -flash'; + } + //Commande qui s'assure de passer le SMS dans ceux envoyés, et de lui donner le bon statut //On va liée les deux commandes pour envoyer le SMS puis le passer en echec diff --git a/createDatabase.sql b/createDatabase.sql index 51843d9..cc780c8 100755 --- a/createDatabase.sql +++ b/createDatabase.sql @@ -39,6 +39,7 @@ CREATE TABLE IF NOT EXISTS scheduleds id INT NOT NULL AUTO_INCREMENT, at DATETIME NOT NULL, content VARCHAR(1000) NOT NULL, + flash BOOLEAN NOT NULL DEFAULT 0, progress BOOLEAN NOT NULL DEFAULT 0, PRIMARY KEY (id) ); @@ -153,4 +154,5 @@ VALUES ('transfer', '1'), ('sms_stop', '1'), ('detect_url', '1'), ('default_phone_country', 'fr'), -('preferred_phone_country', 'fr,be,ca'); +('preferred_phone_country', 'fr,be,ca'), +('sms_flash', '0'); diff --git a/templates/scheduleds/add.php b/templates/scheduleds/add.php index 221fee3..34f5878 100755 --- a/templates/scheduleds/add.php +++ b/templates/scheduleds/add.php @@ -65,6 +65,15 @@ + +
+ +
+ Oui + Non +
+
+ Annuler diff --git a/templates/scheduleds/edit.php b/templates/scheduleds/edit.php index 6105367..0681ca0 100755 --- a/templates/scheduleds/edit.php +++ b/templates/scheduleds/edit.php @@ -71,6 +71,15 @@ + +
+ +
+ /> Oui + /> Non +
+
+
+
+
+

Support des SMS Flash

+
+
+
+
+ + +
+
+ +
+
+
+
diff --git a/templates/users/add.php b/templates/users/add.php index d114266..5e5b44e 100755 --- a/templates/users/add.php +++ b/templates/users/add.php @@ -52,21 +52,15 @@ - + +
+
- -
- Oui - Non -
+ Oui + Non
- +
+ Annuler