Ajout de la suppression sur les logs du système (sms reçus, envoyés, events, sms stop)
This commit is contained in:
parent
a7293d7530
commit
3369c34152
|
@ -46,4 +46,40 @@
|
|||
'nbResults' => count($events),
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Cette fonction supprimer une liste de sms reçus
|
||||
* @param $csrf : Le jeton CSRF
|
||||
* @param int... $ids : Les id des sms à supprimer
|
||||
* @return boolean;
|
||||
*/
|
||||
public function delete($csrf)
|
||||
{
|
||||
//On vérifie que le jeton csrf est bon
|
||||
if (!internalTools::verifyCSRF($csrf))
|
||||
{
|
||||
$_SESSION['errormessage'] = 'Jeton CSRF invalide !';
|
||||
header('Location: ' . $this->generateUrl('events'));
|
||||
return false;
|
||||
}
|
||||
|
||||
//On récupère les ids comme étant tous les arguments de la fonction et on supprime le premier (csrf)
|
||||
$ids = func_get_args();
|
||||
unset($ids[0]);
|
||||
|
||||
//Create de l'object de base de données
|
||||
global $db;
|
||||
|
||||
//Si on est pas admin
|
||||
if (!$_SESSION['admin'])
|
||||
{
|
||||
$_SESSION['errormessage'] = 'Vous devez être administrateur pour effectuer cette action.';
|
||||
header('Location: ' . $this->generateUrl('events'));
|
||||
return false;
|
||||
}
|
||||
|
||||
$db->deleteEventsIn($ids);
|
||||
header('Location: ' . $this->generateUrl('events'));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -91,4 +91,40 @@
|
|||
$_SESSION['popup_nb_receiveds'] = $nbReceiveds;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Cette fonction supprimer une liste de sms reçus
|
||||
* @param $csrf : Le jeton CSRF
|
||||
* @param int... $ids : Les id des sms à supprimer
|
||||
* @return boolean;
|
||||
*/
|
||||
public function delete($csrf)
|
||||
{
|
||||
//On vérifie que le jeton csrf est bon
|
||||
if (!internalTools::verifyCSRF($csrf))
|
||||
{
|
||||
$_SESSION['errormessage'] = 'Jeton CSRF invalide !';
|
||||
header('Location: ' . $this->generateUrl('receiveds'));
|
||||
return false;
|
||||
}
|
||||
|
||||
//On récupère les ids comme étant tous les arguments de la fonction et on supprime le premier (csrf)
|
||||
$ids = func_get_args();
|
||||
unset($ids[0]);
|
||||
|
||||
//Create de l'object de base de données
|
||||
global $db;
|
||||
|
||||
//Si on est pas admin
|
||||
if (!$_SESSION['admin'])
|
||||
{
|
||||
$_SESSION['errormessage'] = 'Vous devez être administrateur pour effectuer cette action.';
|
||||
header('Location: ' . $this->generateUrl('receiveds'));
|
||||
return false;
|
||||
}
|
||||
|
||||
$db->deleteReceivedsIn($ids);
|
||||
header('Location: ' . $this->generateUrl('receiveds'));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,4 +48,40 @@
|
|||
'nbResults' => count($sendeds),
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Cette fonction supprimer une liste de sms reçus
|
||||
* @param $csrf : Le jeton CSRF
|
||||
* @param int... $ids : Les id des sms à supprimer
|
||||
* @return boolean;
|
||||
*/
|
||||
public function delete($csrf)
|
||||
{
|
||||
//On vérifie que le jeton csrf est bon
|
||||
if (!internalTools::verifyCSRF($csrf))
|
||||
{
|
||||
$_SESSION['errormessage'] = 'Jeton CSRF invalide !';
|
||||
header('Location: ' . $this->generateUrl('sendeds'));
|
||||
return false;
|
||||
}
|
||||
|
||||
//On récupère les ids comme étant tous les arguments de la fonction et on supprime le premier (csrf)
|
||||
$ids = func_get_args();
|
||||
unset($ids[0]);
|
||||
|
||||
//Create de l'object de base de données
|
||||
global $db;
|
||||
|
||||
//Si on est pas admin
|
||||
if (!$_SESSION['admin'])
|
||||
{
|
||||
$_SESSION['errormessage'] = 'Vous devez être administrateur pour effectuer cette action.';
|
||||
header('Location: ' . $this->generateUrl('sendeds'));
|
||||
return false;
|
||||
}
|
||||
|
||||
$db->deleteSendedsIn($ids);
|
||||
header('Location: ' . $this->generateUrl('sendeds'));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,4 +46,40 @@
|
|||
'nbResults' => count($smsStops),
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Cette fonction supprimer une liste de sms stop
|
||||
* @param $csrf : Le jeton CSRF
|
||||
* @param int... $ids : Les id des sms à supprimer
|
||||
* @return boolean;
|
||||
*/
|
||||
public function delete($csrf)
|
||||
{
|
||||
//On vérifie que le jeton csrf est bon
|
||||
if (!internalTools::verifyCSRF($csrf))
|
||||
{
|
||||
$_SESSION['errormessage'] = 'Jeton CSRF invalide !';
|
||||
header('Location: ' . $this->generateUrl('smsstop'));
|
||||
return false;
|
||||
}
|
||||
|
||||
//On récupère les ids comme étant tous les arguments de la fonction et on supprime le premier (csrf)
|
||||
$ids = func_get_args();
|
||||
unset($ids[0]);
|
||||
|
||||
//Create de l'object de base de données
|
||||
global $db;
|
||||
|
||||
//Si on est pas admin
|
||||
if (!$_SESSION['admin'])
|
||||
{
|
||||
$_SESSION['errormessage'] = 'Vous devez être administrateur pour effectuer cette action.';
|
||||
header('Location: ' . $this->generateUrl('smsstop'));
|
||||
return false;
|
||||
}
|
||||
|
||||
$db->deleteSmsStopsIn($ids);
|
||||
header('Location: ' . $this->generateUrl('smsstop'));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,6 +45,25 @@
|
|||
return $this->runQuery($query, $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Supprime tous les sendeds dont l'id fait partie du tableau fourni
|
||||
* @param $sendeds_ids : Tableau des id des sendeds à supprimer
|
||||
* @return int : Nombre de lignes supprimées
|
||||
*/
|
||||
public function deleteSendedsIn($sendeds_ids)
|
||||
{
|
||||
$query = "
|
||||
DELETE FROM sendeds
|
||||
WHERE id ";
|
||||
|
||||
//On génère la clause IN et les paramètres adaptés depuis le tableau des id
|
||||
$generted_in = $this->generateInFromArray($sendeds_ids);
|
||||
$query .= $generted_in['QUERY'];
|
||||
$params = $generted_in['PARAMS'];
|
||||
|
||||
return $this->runQuery($query, $params, self::ROWCOUNT);
|
||||
}
|
||||
|
||||
/*********************************/
|
||||
/* PARTIE DES REQUETES RECEIVEDS */
|
||||
/*********************************/
|
||||
|
@ -159,6 +178,25 @@
|
|||
return $this->runQuery($query, $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Supprime tous les receivedss dont l'id fait partie du tableau fourni
|
||||
* @param $receiveds_ids : Tableau des id des receiveds à supprimer
|
||||
* @return int : Nombre de lignes supprimées
|
||||
*/
|
||||
public function deleteReceivedsIn($receiveds_ids)
|
||||
{
|
||||
$query = "
|
||||
DELETE FROM receiveds
|
||||
WHERE id ";
|
||||
|
||||
//On génère la clause IN et les paramètres adaptés depuis le tableau des id
|
||||
$generted_in = $this->generateInFromArray($receiveds_ids);
|
||||
$query .= $generted_in['QUERY'];
|
||||
$params = $generted_in['PARAMS'];
|
||||
|
||||
return $this->runQuery($query, $params, self::ROWCOUNT);
|
||||
}
|
||||
|
||||
/***********************************/
|
||||
/* PARTIE DES REQUETES DISCUSSIONS */
|
||||
/***********************************/
|
||||
|
@ -779,4 +817,51 @@
|
|||
|
||||
return $this->runQuery($query, $params, self::ROWCOUNT);
|
||||
}
|
||||
|
||||
/******************************/
|
||||
/* PARTIE DES REQUETES EVENTS */
|
||||
/******************************/
|
||||
|
||||
/**
|
||||
* Supprime tous les events dont l'id fait partie du tableau fourni
|
||||
* @param $events_ids : Tableau des id des events à supprimer
|
||||
* @return int : Nombre de lignes supprimées
|
||||
*/
|
||||
public function deleteEventsIn($events_ids)
|
||||
{
|
||||
$query = "
|
||||
DELETE FROM events
|
||||
WHERE id ";
|
||||
|
||||
//On génère la clause IN et les paramètres adaptés depuis le tableau des id
|
||||
$generted_in = $this->generateInFromArray($events_ids);
|
||||
$query .= $generted_in['QUERY'];
|
||||
$params = $generted_in['PARAMS'];
|
||||
|
||||
return $this->runQuery($query, $params, self::ROWCOUNT);
|
||||
}
|
||||
|
||||
/********************************/
|
||||
/* PARTIE DES REQUETES SMS STOP */
|
||||
/********************************/
|
||||
|
||||
/**
|
||||
* Supprime tous les sms_stops dont l'id fait partie du tableau fourni
|
||||
* @param $sms_stops_ids : Tableau des id des sms_stops à supprimer
|
||||
* @return int : Nombre de lignes supprimées
|
||||
*/
|
||||
public function deleteSmsStopsIn($sms_stops_ids)
|
||||
{
|
||||
$query = "
|
||||
DELETE FROM sms_stop
|
||||
WHERE id ";
|
||||
|
||||
//On génère la clause IN et les paramètres adaptés depuis le tableau des id
|
||||
$generted_in = $this->generateInFromArray($sms_stops_ids);
|
||||
$query .= $generted_in['QUERY'];
|
||||
$params = $generted_in['PARAMS'];
|
||||
|
||||
return $this->runQuery($query, $params, self::ROWCOUNT);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -63,19 +63,18 @@
|
|||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
<div class="col-xs-6 no-padding">
|
||||
<a class="btn btn-success" href="<?php echo $this->generateUrl('commands', 'add'); ?>"><span class="fa fa-plus"></span> Ajouter une commande</a>
|
||||
</div>
|
||||
<div class="text-right col-xs-6 no-padding">
|
||||
<strong>Action groupée :</strong>
|
||||
<div class="btn-group action-dropdown" target="#table-commands">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Action pour la sélection <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu pull-right" role="menu">
|
||||
<li><a href="<?php echo $this->generateUrl('commands', 'edit', [$_SESSION['csrf']]); ?>"><span class="fa fa-edit"></span> Modifier</a></li>
|
||||
<li><a href="<?php echo $this->generateUrl('commands', 'delete', [$_SESSION['csrf']]); ?>"><span class="fa fa-trash-o"></span> Supprimer</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div>
|
||||
<div class="col-xs-6 no-padding">
|
||||
<a class="btn btn-success" href="<?php echo $this->generateUrl('commands', 'add'); ?>"><span class="fa fa-plus"></span> Ajouter une commande</a>
|
||||
</div>
|
||||
<div class="text-right col-xs-6 no-padding">
|
||||
<strong>Action groupée :</strong>
|
||||
<div class="btn-group action-dropdown" target="#table-commands">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Action pour la sélection <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu pull-right" role="menu">
|
||||
<li><a href="<?php echo $this->generateUrl('commands', 'edit', [$_SESSION['csrf']]); ?>"><span class="fa fa-edit"></span> Modifier</a></li>
|
||||
<li><a href="<?php echo $this->generateUrl('commands', 'delete', [$_SESSION['csrf']]); ?>"><span class="fa fa-trash-o"></span> Supprimer</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -61,19 +61,18 @@
|
|||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
<div class="col-xs-6 no-padding">
|
||||
<a class="btn btn-success" href="<?php echo $this->generateUrl('contacts', 'add'); ?>"><span class="fa fa-plus"></span> Ajouter un contact</a>
|
||||
</div>
|
||||
<div class="text-right col-xs-6 no-padding">
|
||||
<strong>Action groupée :</strong>
|
||||
<div class="btn-group action-dropdown" target="#table-contacts">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Action pour la sélection <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu pull-right" role="menu">
|
||||
<li><a href="<?php echo $this->generateUrl('contacts', 'edit', [$_SESSION['csrf']]); ?>"><span class="fa fa-edit"></span> Modifier</a></li>
|
||||
<li><a href="<?php echo $this->generateUrl('contacts', 'delete', [$_SESSION['csrf']]); ?>"><span class="fa fa-trash-o"></span> Supprimer</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div>
|
||||
<div class="col-xs-6 no-padding">
|
||||
<a class="btn btn-success" href="<?php echo $this->generateUrl('contacts', 'add'); ?>"><span class="fa fa-plus"></span> Ajouter un contact</a>
|
||||
</div>
|
||||
<div class="text-right col-xs-6 no-padding">
|
||||
<strong>Action groupée :</strong>
|
||||
<div class="btn-group action-dropdown" target="#table-contacts">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Action pour la sélection <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu pull-right" role="menu">
|
||||
<li><a href="<?php echo $this->generateUrl('contacts', 'edit', [$_SESSION['csrf']]); ?>"><span class="fa fa-edit"></span> Modifier</a></li>
|
||||
<li><a href="<?php echo $this->generateUrl('contacts', 'delete', [$_SESSION['csrf']]); ?>"><span class="fa fa-trash-o"></span> Supprimer</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
<th>Type</th>
|
||||
<th>Date</th>
|
||||
<th>Texte</th>
|
||||
<th>Sélectionner</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -54,6 +55,7 @@
|
|||
<td><span class="fa fa-fw <?php echo internalTools::eventTypeToIcon($event['type']); ?>"></span></td>
|
||||
<td><?php secho($event['at']); ?></td>
|
||||
<td><?php secho($event['text']); ?></td>
|
||||
<td><input type="checkbox" value="<?php secho($event['id']); ?>"></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
@ -62,6 +64,15 @@
|
|||
</table>
|
||||
</div>
|
||||
<nav>
|
||||
<div class="text-right col-xs-12 no-padding">
|
||||
<strong>Action groupée :</strong>
|
||||
<div class="btn-group action-dropdown" target="#table-events">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Action pour la sélection <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu pull-right" role="menu">
|
||||
<li><a href="<?php echo $this->generateUrl('events', 'delete', [$_SESSION['csrf']]); ?>"><span class="fa fa-trash-o"></span> Supprimer</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="pager">
|
||||
<?php
|
||||
if ($page)
|
||||
|
@ -83,7 +94,6 @@
|
|||
?>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -91,5 +101,21 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
jQuery(document).ready(function ()
|
||||
{
|
||||
jQuery('.action-dropdown a').on('click', function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var target = jQuery(this).parents('.action-dropdown').attr('target');
|
||||
var url = jQuery(this).attr('href');
|
||||
jQuery(target).find('input:checked').each(function ()
|
||||
{
|
||||
url += '/' + jQuery(this).val();
|
||||
});
|
||||
window.location = url;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
$incs->footer();
|
||||
|
|
|
@ -61,19 +61,18 @@
|
|||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
<div class="col-xs-6 no-padding">
|
||||
<a class="btn btn-success" href="<?php echo $this->generateUrl('groups', 'add'); ?>"><span class="fa fa-plus"></span> Ajouter un groupe</a>
|
||||
</div>
|
||||
<div class="text-right col-xs-6 no-padding">
|
||||
<strong>Action groupée :</strong>
|
||||
<div class="btn-group action-dropdown" target="#table-groups">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Action pour la sélection <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu pull-right" role="menu">
|
||||
<li><a href="<?php echo $this->generateUrl('groups', 'edit'); ?>"><span class="fa fa-edit"></span> Modifier</a></li>
|
||||
<li><a href="<?php echo $this->generateUrl('groups', 'delete', [$_SESSION['csrf']]); ?>"><span class="fa fa-trash-o"></span> Supprimer</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div>
|
||||
<div class="col-xs-6 no-padding">
|
||||
<a class="btn btn-success" href="<?php echo $this->generateUrl('groups', 'add'); ?>"><span class="fa fa-plus"></span> Ajouter un groupe</a>
|
||||
</div>
|
||||
<div class="text-right col-xs-6 no-padding">
|
||||
<strong>Action groupée :</strong>
|
||||
<div class="btn-group action-dropdown" target="#table-groups">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Action pour la sélection <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu pull-right" role="menu">
|
||||
<li><a href="<?php echo $this->generateUrl('groups', 'edit'); ?>"><span class="fa fa-edit"></span> Modifier</a></li>
|
||||
<li><a href="<?php echo $this->generateUrl('groups', 'delete', [$_SESSION['csrf']]); ?>"><span class="fa fa-trash-o"></span> Supprimer</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
</li>
|
||||
<li>
|
||||
<a href="javascript:;" data-toggle="collapse" data-target="#logs"><i class="fa fa-fw fa-file-text"></i> Logs <i class="fa fa-fw fa-caret-down"></i></a>
|
||||
<ul id="logs" class="collapse <?php echo in_array($page, array('sendeds', 'receiveds', 'events')) ? 'in' : ''; ?>">
|
||||
<ul id="logs" class="collapse <?php echo in_array($page, array('sendeds', 'receiveds', 'events', 'smsstop')) ? 'in' : ''; ?>">
|
||||
<li <?php echo $page == 'sendeds' ? 'class="active"' : ''; ?>>
|
||||
<a href="<?php echo $this->generateUrl('sendeds'); ?>"><i class="fa fa-fw fa-send"></i> SMS envoyés</a>
|
||||
</li>
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
<th>Message</th>
|
||||
<th>Date</th>
|
||||
<th>Commande</th>
|
||||
<th>Sélectionner</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -56,6 +57,7 @@
|
|||
<td><?php secho($received['content']); ?></td>
|
||||
<td><?php secho($received['at']); ?></td>
|
||||
<td><?php echo $received['is_command'] ? 'Oui' : 'Non'; ?></td>
|
||||
<td><input type="checkbox" value="<?php secho($received['id']); ?>"></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
@ -64,6 +66,15 @@
|
|||
</table>
|
||||
</div>
|
||||
<nav>
|
||||
<div class="text-right col-xs-12 no-padding">
|
||||
<strong>Action groupée :</strong>
|
||||
<div class="btn-group action-dropdown" target="#table-receiveds">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Action pour la sélection <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu pull-right" role="menu">
|
||||
<li><a href="<?php echo $this->generateUrl('receiveds', 'delete', [$_SESSION['csrf']]); ?>"><span class="fa fa-trash-o"></span> Supprimer</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="pager">
|
||||
<?php
|
||||
if ($page)
|
||||
|
@ -93,5 +104,21 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
jQuery(document).ready(function ()
|
||||
{
|
||||
jQuery('.action-dropdown a').on('click', function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var target = jQuery(this).parents('.action-dropdown').attr('target');
|
||||
var url = jQuery(this).attr('href');
|
||||
jQuery(target).find('input:checked').each(function ()
|
||||
{
|
||||
url += '/' + jQuery(this).val();
|
||||
});
|
||||
window.location = url;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
$incs->footer();
|
||||
|
|
|
@ -43,19 +43,21 @@
|
|||
<th>Message</th>
|
||||
<th>Date</th>
|
||||
<th>Statut</th>
|
||||
<th>Sélectionner</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach ($sendeds as $send)
|
||||
foreach ($sendeds as $sended)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td><?php secho($send['id']); ?></td>
|
||||
<td><?php secho($send['target']); ?></td>
|
||||
<td><?php secho($send['content']); ?></td>
|
||||
<td><?php secho($send['at']); ?></td>
|
||||
<td><?php secho($send['delivered'] ? 'Délivré' : ($send['failed'] ? 'Échoué' : 'Inconnu')); ?></td>
|
||||
<td><?php secho($sended['id']); ?></td>
|
||||
<td><?php secho($sended['target']); ?></td>
|
||||
<td><?php secho($sended['content']); ?></td>
|
||||
<td><?php secho($sended['at']); ?></td>
|
||||
<td><?php secho($sended['delivered'] ? 'Délivré' : ($sended['failed'] ? 'Échoué' : 'Inconnu')); ?></td>
|
||||
<td><input type="checkbox" value="<?php secho($sended['id']); ?>"></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
@ -64,6 +66,15 @@
|
|||
</table>
|
||||
</div>
|
||||
<nav>
|
||||
<div class="text-right col-xs-12 no-padding">
|
||||
<strong>Action groupée :</strong>
|
||||
<div class="btn-group action-dropdown" target="#table-sendeds">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Action pour la sélection <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu pull-right" role="menu">
|
||||
<li><a href="<?php echo $this->generateUrl('sendeds', 'delete', [$_SESSION['csrf']]); ?>"><span class="fa fa-trash-o"></span> Supprimer</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="pager">
|
||||
<?php
|
||||
if ($page)
|
||||
|
@ -85,7 +96,6 @@
|
|||
?>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -93,5 +103,21 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
jQuery(document).ready(function ()
|
||||
{
|
||||
jQuery('.action-dropdown a').on('click', function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var target = jQuery(this).parents('.action-dropdown').attr('target');
|
||||
var url = jQuery(this).attr('href');
|
||||
jQuery(target).find('input:checked').each(function ()
|
||||
{
|
||||
url += '/' + jQuery(this).val();
|
||||
});
|
||||
window.location = url;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
$incs->footer();
|
||||
|
|
|
@ -35,11 +35,12 @@
|
|||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="table-events">
|
||||
<table class="table table-bordered table-hover table-striped" id="table-sms-stop">
|
||||
<table class="table table-bordered table-hover table-striped" id="table-smsstop">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Numéro</th>
|
||||
<th>Sélectionner</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -50,6 +51,7 @@
|
|||
<tr>
|
||||
<td><?php secho($smsStop['id']); ?></td>
|
||||
<td><?php secho($smsStop['number']); ?></td>
|
||||
<td><input type="checkbox" value="<?php secho($smsStop['id']); ?>"></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
@ -58,6 +60,15 @@
|
|||
</table>
|
||||
</div>
|
||||
<nav>
|
||||
<div class="text-right col-xs-12 no-padding">
|
||||
<strong>Action groupée :</strong>
|
||||
<div class="btn-group action-dropdown" target="#table-smsstop">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Action pour la sélection <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu pull-right" role="menu">
|
||||
<li><a href="<?php echo $this->generateUrl('smsstop', 'delete', [$_SESSION['csrf']]); ?>"><span class="fa fa-trash-o"></span> Supprimer</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="pager">
|
||||
<?php
|
||||
if ($page)
|
||||
|
@ -79,7 +90,6 @@
|
|||
?>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -87,5 +97,21 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
jQuery(document).ready(function ()
|
||||
{
|
||||
jQuery('.action-dropdown a').on('click', function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var target = jQuery(this).parents('.action-dropdown').attr('target');
|
||||
var url = jQuery(this).attr('href');
|
||||
jQuery(target).find('input:checked').each(function ()
|
||||
{
|
||||
url += '/' + jQuery(this).val();
|
||||
});
|
||||
window.location = url;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
$incs->footer();
|
||||
|
|
Loading…
Reference in New Issue