fix a few things
This commit is contained in:
parent
be194a06a8
commit
8f9bf0a729
|
@ -135,7 +135,7 @@ namespace controllers\internals;
|
||||||
|
|
||||||
$result = $this->model_group->update($id, $group);
|
$result = $this->model_group->update($id, $group);
|
||||||
|
|
||||||
$this->model_group->delete_group_contact($id);
|
$this->model_group->delete_group_contacts($id);
|
||||||
|
|
||||||
$nb_contact_insert = 0;
|
$nb_contact_insert = 0;
|
||||||
foreach ($contacts_ids as $contact_id)
|
foreach ($contacts_ids as $contact_id)
|
||||||
|
@ -161,9 +161,9 @@ namespace controllers\internals;
|
||||||
*
|
*
|
||||||
* @return array : Un tableau avec les contact
|
* @return array : Un tableau avec les contact
|
||||||
*/
|
*/
|
||||||
public function get_contact($id)
|
public function get_contacts($id)
|
||||||
{
|
{
|
||||||
//Recupération des groups
|
//Recupération des groups
|
||||||
return $this->model_group->get_contact($id);
|
return $this->model_group->get_contacts($id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/*
|
|
||||||
* This file is part of PHP CS Fixer.
|
|
||||||
*
|
|
||||||
* (c) Fabien Potencier <fabien@symfony.com>
|
|
||||||
* Dariusz Rumiński <dariusz.ruminski@gmail.com>
|
|
||||||
*
|
|
||||||
* This source file is subject to the MIT license that is bundled
|
|
||||||
* with this source code in the file LICENSE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace controllers\internals;
|
namespace controllers\internals;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -136,36 +136,37 @@ namespace controllers\internals;
|
||||||
*
|
*
|
||||||
* @return int : le nombre de ligne modifiées
|
* @return int : le nombre de ligne modifiées
|
||||||
*/
|
*/
|
||||||
public function update($scheduleds)
|
public function update($id, $content, $at, $numbers = [], $contact_ids = [], $groups_ids = [], $flash = false, $progress = false)
|
||||||
{
|
{
|
||||||
$nb_update = 0;
|
$scheduled = [
|
||||||
foreach ($scheduleds as $scheduled)
|
'at' => $date,
|
||||||
|
'content' => $content,
|
||||||
|
'flash' => $flash,
|
||||||
|
'progress' => $progress,
|
||||||
|
];
|
||||||
|
|
||||||
|
$success = $this->model_scheduled->update($id, $scheduled);
|
||||||
|
|
||||||
|
$this->model_scheduled->delete_scheduled_numbers($id);
|
||||||
|
$this->model_scheduled->delete_scheduled_contacts($id);
|
||||||
|
$this->model_scheduled->delete_scheduled_groups($id);
|
||||||
|
|
||||||
|
foreach ($scheduled['number'] as $number)
|
||||||
{
|
{
|
||||||
$result = $this->model_scheduled->update($scheduled['scheduled']['id'], $scheduled['scheduled']);
|
$this->model_scheduled->insert_scheduled_number($scheduled['scheduled']['id'], $number);
|
||||||
|
|
||||||
$this->model_scheduled->delete_scheduled_number($scheduled['scheduled']['id']);
|
|
||||||
$this->model_scheduled->delete_scheduled_contact($scheduled['scheduled']['id']);
|
|
||||||
$this->model_scheduled->delete_scheduled_group($scheduled['scheduled']['id']);
|
|
||||||
|
|
||||||
foreach ($scheduled['number'] as $number)
|
|
||||||
{
|
|
||||||
$this->model_scheduled->insert_scheduled_number($scheduled['scheduled']['id'], $number);
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($scheduled['contact_ids'] as $contact_id)
|
|
||||||
{
|
|
||||||
$this->model_scheduled->insert_scheduled_contact($scheduled['scheduled']['id'], $contact_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($scheduled['group_ids'] as $group_id)
|
|
||||||
{
|
|
||||||
$this->model_scheduled->insert_scheduled_group($scheduled['scheduled']['id'], $group_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
++$nb_update;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $nb_update;
|
foreach ($scheduled['contact_ids'] as $contact_id)
|
||||||
|
{
|
||||||
|
$this->model_scheduled->insert_scheduled_contact($scheduled['scheduled']['id'], $contact_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($scheduled['group_ids'] as $group_id)
|
||||||
|
{
|
||||||
|
$this->model_scheduled->insert_scheduled_group($scheduled['scheduled']['id'], $group_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
return (bool) $success;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -50,7 +50,7 @@ namespace controllers\publics;
|
||||||
|
|
||||||
foreach ($groups as $key => $group)
|
foreach ($groups as $key => $group)
|
||||||
{
|
{
|
||||||
$contacts = $this->internal_group->get_contact($group['id']);
|
$contacts = $this->internal_group->get_contacts($group['id']);
|
||||||
$groups[$key]['nb_contacts'] = \count($contacts);
|
$groups[$key]['nb_contacts'] = \count($contacts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -70,17 +70,13 @@ namespace controllers\publics;
|
||||||
if (!$this->verify_csrf($csrf))
|
if (!$this->verify_csrf($csrf))
|
||||||
{
|
{
|
||||||
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Jeton CSRF invalid !');
|
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Jeton CSRF invalid !');
|
||||||
$this->redirect(\descartes\Router::url('Group', 'list'));
|
return $this->redirect(\descartes\Router::url('Group', 'list'));
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$ids = $_GET['ids'] ?? [];
|
$ids = $_GET['ids'] ?? [];
|
||||||
$this->internal_group->delete($ids);
|
$this->internal_group->delete($ids);
|
||||||
|
|
||||||
$this->redirect(\descartes\Router::url('Group', 'list'));
|
return $this->redirect(\descartes\Router::url('Group', 'list'));
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -104,7 +100,7 @@ namespace controllers\publics;
|
||||||
|
|
||||||
foreach ($groups as $key => $group)
|
foreach ($groups as $key => $group)
|
||||||
{
|
{
|
||||||
$groups[$key]['contacts'] = $this->internal_group->get_contact($group['id']);
|
$groups[$key]['contacts'] = $this->internal_group->get_contacts($group['id']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->render('group/edit', [
|
$this->render('group/edit', [
|
||||||
|
@ -124,7 +120,6 @@ namespace controllers\publics;
|
||||||
if (!$this->verify_csrf($csrf))
|
if (!$this->verify_csrf($csrf))
|
||||||
{
|
{
|
||||||
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Jeton CSRF invalid !');
|
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Jeton CSRF invalid !');
|
||||||
|
|
||||||
return $this->redirect(\descartes\Router::url('Group', 'add'));
|
return $this->redirect(\descartes\Router::url('Group', 'add'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -134,20 +129,17 @@ namespace controllers\publics;
|
||||||
if (!$name || !$contacts_ids)
|
if (!$name || !$contacts_ids)
|
||||||
{
|
{
|
||||||
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Des champs sont manquants !');
|
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Des champs sont manquants !');
|
||||||
|
|
||||||
return $this->redirect(\descartes\Router::url('Group', 'add'));
|
return $this->redirect(\descartes\Router::url('Group', 'add'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$id_group = $this->internal_group->create($name, $contacts_ids);
|
$id_group = $this->internal_group->create($name, $contacts_ids);
|
||||||
if (!$id_group)
|
if (!$id_group)
|
||||||
{
|
{
|
||||||
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Impossible de créer ce group.');
|
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Impossible de créer ce groupe.');
|
||||||
|
|
||||||
return $this->redirect(\descartes\Router::url('Group', 'add'));
|
return $this->redirect(\descartes\Router::url('Group', 'add'));
|
||||||
}
|
}
|
||||||
|
|
||||||
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('success', 'Le group a bien été créé.');
|
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('success', 'Le groupe a bien été créé.');
|
||||||
|
|
||||||
return $this->redirect(\descartes\Router::url('Group', 'list'));
|
return $this->redirect(\descartes\Router::url('Group', 'list'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -164,9 +156,7 @@ namespace controllers\publics;
|
||||||
if (!$this->verify_csrf($csrf))
|
if (!$this->verify_csrf($csrf))
|
||||||
{
|
{
|
||||||
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Jeton CSRF invalid !');
|
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Jeton CSRF invalid !');
|
||||||
$this->redirect(\descartes\Router::url('Group', 'list'));
|
return $this->redirect(\descartes\Router::url('Group', 'list'));
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$groups = $_POST['groups'] ?? [];
|
$groups = $_POST['groups'] ?? [];
|
||||||
|
@ -179,13 +169,11 @@ namespace controllers\publics;
|
||||||
|
|
||||||
if ($nb_groups_update !== \count($groups))
|
if ($nb_groups_update !== \count($groups))
|
||||||
{
|
{
|
||||||
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Certains groups n\'ont pas pu êtres mis à jour.');
|
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Certains groupes n\'ont pas pu êtres mis à jour.');
|
||||||
|
|
||||||
return $this->redirect(\descartes\Router::url('Group', 'list'));
|
return $this->redirect(\descartes\Router::url('Group', 'list'));
|
||||||
}
|
}
|
||||||
|
|
||||||
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('success', 'Tous les groups ont été modifiés avec succès.');
|
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('success', 'Tous les groupes ont été modifiés avec succès.');
|
||||||
|
|
||||||
return $this->redirect(\descartes\Router::url('Group', 'list'));
|
return $this->redirect(\descartes\Router::url('Group', 'list'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -108,14 +108,12 @@ namespace controllers\publics;
|
||||||
if (!$this->verify_csrf($csrf))
|
if (!$this->verify_csrf($csrf))
|
||||||
{
|
{
|
||||||
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Jeton CSRF invalid !');
|
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Jeton CSRF invalid !');
|
||||||
|
|
||||||
return $this->redirect(\descartes\Router::url('Received', 'list'));
|
return $this->redirect(\descartes\Router::url('Received', 'list'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!\controllers\internals\Tool::is_admin())
|
if (!\controllers\internals\Tool::is_admin())
|
||||||
{
|
{
|
||||||
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Vous devez être administrateur pour effectuer cette action.');
|
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Vous devez être administrateur pour effectuer cette action.');
|
||||||
|
|
||||||
return $this->redirect(\descartes\Router::url('Received', 'list'));
|
return $this->redirect(\descartes\Router::url('Received', 'list'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,6 @@ namespace controllers\publics;
|
||||||
if (!$this->verify_csrf($csrf))
|
if (!$this->verify_csrf($csrf))
|
||||||
{
|
{
|
||||||
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Jeton CSRF invalid !');
|
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Jeton CSRF invalid !');
|
||||||
|
|
||||||
return $this->redirect(\descartes\Router::url('Scheduled', 'list'));
|
return $this->redirect(\descartes\Router::url('Scheduled', 'list'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -142,7 +141,6 @@ namespace controllers\publics;
|
||||||
if (!$this->verify_csrf($csrf))
|
if (!$this->verify_csrf($csrf))
|
||||||
{
|
{
|
||||||
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Jeton CSRF invalid !');
|
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Jeton CSRF invalid !');
|
||||||
|
|
||||||
return $this->redirect(\descartes\Router::url('Scheduled', 'add'));
|
return $this->redirect(\descartes\Router::url('Scheduled', 'add'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -155,14 +153,12 @@ namespace controllers\publics;
|
||||||
if (!$content)
|
if (!$content)
|
||||||
{
|
{
|
||||||
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Vous ne pouvez pas créer un Sms sans message.');
|
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Vous ne pouvez pas créer un Sms sans message.');
|
||||||
|
|
||||||
return $this->redirect(\descartes\Router::url('Scheduled', 'add'));
|
return $this->redirect(\descartes\Router::url('Scheduled', 'add'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!\controllers\internals\Tool::validate_date($date, 'Y-m-d H:i:s') && !\controllers\internals\Tool::validate_date($date, 'Y-m-d H:i'))
|
if (!\controllers\internals\Tool::validate_date($date, 'Y-m-d H:i:s') && !\controllers\internals\Tool::validate_date($date, 'Y-m-d H:i'))
|
||||||
{
|
{
|
||||||
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Vous devez fournir une date valide.');
|
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Vous devez fournir une date valide.');
|
||||||
|
|
||||||
return $this->redirect(\descartes\Router::url('Scheduled', 'add'));
|
return $this->redirect(\descartes\Router::url('Scheduled', 'add'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -183,7 +179,6 @@ namespace controllers\publics;
|
||||||
if (!$numbers && !$contacts && !$groups)
|
if (!$numbers && !$contacts && !$groups)
|
||||||
{
|
{
|
||||||
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Vous devez renseigner au moins un destinataire pour le Sms.');
|
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Vous devez renseigner au moins un destinataire pour le Sms.');
|
||||||
|
|
||||||
return $this->redirect(\descartes\Router::url('Scheduled', 'add'));
|
return $this->redirect(\descartes\Router::url('Scheduled', 'add'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -197,12 +192,10 @@ namespace controllers\publics;
|
||||||
if (!$scheduled_id = $this->internal_scheduled->create($scheduled, $numbers, $contacts, $groups))
|
if (!$scheduled_id = $this->internal_scheduled->create($scheduled, $numbers, $contacts, $groups))
|
||||||
{
|
{
|
||||||
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Impossible de créer le Sms.');
|
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Impossible de créer le Sms.');
|
||||||
|
|
||||||
return $this->redirect(\descartes\Router::url('Scheduled', 'add'));
|
return $this->redirect(\descartes\Router::url('Scheduled', 'add'));
|
||||||
}
|
}
|
||||||
|
|
||||||
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('success', 'Le Sms a bien été créé pour le '.$date.'.');
|
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('success', 'Le Sms a bien été créé pour le '.$date.'.');
|
||||||
|
|
||||||
return $this->redirect(\descartes\Router::url('Scheduled', 'list'));
|
return $this->redirect(\descartes\Router::url('Scheduled', 'list'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -219,7 +212,6 @@ namespace controllers\publics;
|
||||||
if (!$this->verify_csrf($csrf))
|
if (!$this->verify_csrf($csrf))
|
||||||
{
|
{
|
||||||
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Jeton CSRF invalid !');
|
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Jeton CSRF invalid !');
|
||||||
|
|
||||||
return $this->redirect(\descartes\Router::url('Scheduled', 'list'));
|
return $this->redirect(\descartes\Router::url('Scheduled', 'list'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -238,14 +230,12 @@ namespace controllers\publics;
|
||||||
if (!$content)
|
if (!$content)
|
||||||
{
|
{
|
||||||
$all_update_ok = false;
|
$all_update_ok = false;
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!\controllers\internals\Tool::validate_date($date, 'Y-m-d H:i:s') && !\controllers\internals\Tool::validate_date($date, 'Y-m-d H:i'))
|
if (!\controllers\internals\Tool::validate_date($date, 'Y-m-d H:i:s') && !\controllers\internals\Tool::validate_date($date, 'Y-m-d H:i'))
|
||||||
{
|
{
|
||||||
$all_update_ok = false;
|
$all_update_ok = false;
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -256,7 +246,6 @@ namespace controllers\publics;
|
||||||
if (!$number)
|
if (!$number)
|
||||||
{
|
{
|
||||||
unset($numbers[$key]);
|
unset($numbers[$key]);
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -266,40 +255,24 @@ namespace controllers\publics;
|
||||||
if (!$numbers && !$contacts && !$groups)
|
if (!$numbers && !$contacts && !$groups)
|
||||||
{
|
{
|
||||||
$all_update_ok = false;
|
$all_update_ok = false;
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$scheduled = [
|
$success = $this->internal_scheduled->update($id_scheduled, $content, $at, $numbers, $contacts, $groups);
|
||||||
'scheduled' => [
|
if (!$success)
|
||||||
'id' => $id_scheduled,
|
|
||||||
'at' => $date,
|
|
||||||
'content' => $content,
|
|
||||||
'flash' => false,
|
|
||||||
'progress' => false,
|
|
||||||
],
|
|
||||||
'numbers' => $numbers,
|
|
||||||
'contacts_ids' => $contacts,
|
|
||||||
'groups_ids' => $groups,
|
|
||||||
];
|
|
||||||
|
|
||||||
if (!$this->internal_scheduled->update([$scheduled]))
|
|
||||||
{
|
{
|
||||||
$all_update_ok = false;
|
$all_update_ok = false;
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$all_update_ok)
|
if (!$all_update_ok)
|
||||||
{
|
{
|
||||||
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Certains Sms n\'ont pas pu êtres mis à jour.');
|
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Certains SMS n\'ont pas pu êtres mis à jour.');
|
||||||
|
|
||||||
return $this->redirect(\descartes\Router::url('Scheduled', 'list'));
|
return $this->redirect(\descartes\Router::url('Scheduled', 'list'));
|
||||||
}
|
}
|
||||||
|
|
||||||
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('success', 'Tous les Sms ont été mis à jour.');
|
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('success', 'Tous les SMS ont été mis à jour.');
|
||||||
|
|
||||||
return $this->redirect(\descartes\Router::url('Scheduled', 'list'));
|
return $this->redirect(\descartes\Router::url('Scheduled', 'list'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,7 +105,7 @@ namespace models;
|
||||||
*
|
*
|
||||||
* @return int : Le nmbre d'entrées modifiées
|
* @return int : Le nmbre d'entrées modifiées
|
||||||
*/
|
*/
|
||||||
public function delete_group_contact($id_group)
|
public function delete_group_contacts($id_group)
|
||||||
{
|
{
|
||||||
return $this->_delete('group_contact', ['id_group' => $id_group]);
|
return $this->_delete('group_contact', ['id_group' => $id_group]);
|
||||||
}
|
}
|
||||||
|
@ -179,7 +179,7 @@ namespace models;
|
||||||
*
|
*
|
||||||
* @return array : Un tableau avec les contact
|
* @return array : Un tableau avec les contact
|
||||||
*/
|
*/
|
||||||
public function get_contact($id)
|
public function get_contacts($id)
|
||||||
{
|
{
|
||||||
$query = '
|
$query = '
|
||||||
SELECT *
|
SELECT *
|
||||||
|
|
|
@ -289,7 +289,7 @@ namespace models;
|
||||||
*
|
*
|
||||||
* @return int : Le nmbre d'entrées modifiées
|
* @return int : Le nmbre d'entrées modifiées
|
||||||
*/
|
*/
|
||||||
public function delete_scheduled_number($id_scheduled)
|
public function delete_scheduled_numbers($id_scheduled)
|
||||||
{
|
{
|
||||||
return $this->_delete('scheduled_number', ['id_scheduled' => $id_scheduled]);
|
return $this->_delete('scheduled_number', ['id_scheduled' => $id_scheduled]);
|
||||||
}
|
}
|
||||||
|
@ -301,7 +301,7 @@ namespace models;
|
||||||
*
|
*
|
||||||
* @return int : Le nmbre d'entrées modifiées
|
* @return int : Le nmbre d'entrées modifiées
|
||||||
*/
|
*/
|
||||||
public function delete_scheduled_contact($id_scheduled)
|
public function delete_scheduled_contacts($id_scheduled)
|
||||||
{
|
{
|
||||||
return $this->_delete('scheduled_contact', ['id_scheduled' => $id_scheduled]);
|
return $this->_delete('scheduled_contact', ['id_scheduled' => $id_scheduled]);
|
||||||
}
|
}
|
||||||
|
@ -313,7 +313,7 @@ namespace models;
|
||||||
*
|
*
|
||||||
* @return int : Le nmbre d'entrées modifiées
|
* @return int : Le nmbre d'entrées modifiées
|
||||||
*/
|
*/
|
||||||
public function delete_scheduled_group($id_scheduled)
|
public function delete_scheduled_groups($id_scheduled)
|
||||||
{
|
{
|
||||||
return $this->_delete('scheduled_group', ['id_scheduled' => $id_scheduled]);
|
return $this->_delete('scheduled_group', ['id_scheduled' => $id_scheduled]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
<a href="<?php echo \Router::url('Received', 'list'); ?>"><i class="fa fa-fw fa-download"></i> SMS reçus</a>
|
<a href="<?php echo \Router::url('Received', 'list'); ?>"><i class="fa fa-fw fa-download"></i> SMS reçus</a>
|
||||||
</li>
|
</li>
|
||||||
<li <?php echo $page == 'smsstop' ? 'class="active"' : ''; ?>>
|
<li <?php echo $page == 'smsstop' ? 'class="active"' : ''; ?>>
|
||||||
<a href="<?php echo \Router::url('SMSStop', 'list'); ?>"><i class="fa fa-fw fa-ban"></i> SMS STOP</a>
|
<a href="<?php echo \Router::url('SmsStop', 'list'); ?>"><i class="fa fa-fw fa-ban"></i> SMS STOP</a>
|
||||||
</li>
|
</li>
|
||||||
<li <?php echo $page == 'events' ? 'class="active"' : ''; ?>>
|
<li <?php echo $page == 'events' ? 'class="active"' : ''; ?>>
|
||||||
<a href="<?php echo \Router::url('Event', 'list'); ?>"><i class="fa fa-fw fa-clock-o"></i> Évènements</a>
|
<a href="<?php echo \Router::url('Event', 'list'); ?>"><i class="fa fa-fw fa-clock-o"></i> Évènements</a>
|
||||||
|
|
|
@ -67,7 +67,7 @@
|
||||||
<?php if ($_SESSION['user']['admin']) { ?>
|
<?php if ($_SESSION['user']['admin']) { ?>
|
||||||
<div class="text-right col-xs-12 no-padding">
|
<div class="text-right col-xs-12 no-padding">
|
||||||
<strong>Action pour la séléction :</strong>
|
<strong>Action pour la séléction :</strong>
|
||||||
<button class="btn btn-default" type="submit" formaction="<?php echo \Router::url('SMSStop', 'delete', ['csrf' => $_SESSION['csrf']]); ?>"><span class="fa fa-trash-o"></span> Supprimer</button>
|
<button class="btn btn-default" type="submit" formaction="<?php echo \Router::url('SmsStop', 'delete', ['csrf' => $_SESSION['csrf']]); ?>"><span class="fa fa-trash-o"></span> Supprimer</button>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<ul class="pager">
|
<ul class="pager">
|
||||||
|
|
Loading…
Reference in New Issue