mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-06-07 07:06:26 +02:00
Mise en place du code, jusqu'ici développé en local
This commit is contained in:
parent
d8e121057e
commit
538d242f18
160 changed files with 28859 additions and 0 deletions
72
templates/addCommand.php
Executable file
72
templates/addCommand.php
Executable file
|
@ -0,0 +1,72 @@
|
|||
<?php
|
||||
//Template dashboard
|
||||
$incs = new internalIncs();
|
||||
$incs->head('Command - Add');
|
||||
?>
|
||||
<div id="wrapper">
|
||||
<?php
|
||||
$incs->nav('commands');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<div class="container-fluid">
|
||||
<!-- Page Heading -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
Nouvelle commande
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-dashboard"></i> <a href="<?php echo $this->generateUrl('dashboard'); ?>">Dashboard</a>
|
||||
</li>
|
||||
<li>
|
||||
<i class="fa fa-terminal"></i> <a href="<?php echo $this->generateUrl('commands'); ?>">Commandes</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-plus"></i> Nouveau
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-terminal fa-fw"></i> Ajout d'une nouvelle commande</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="<?php echo $this->generateUrl('commands', 'create', array('csrf' => $_SESSION['csrf']));?>" method="POST">
|
||||
<div class="form-group">
|
||||
<label>Nom commande</label>
|
||||
<div class="form-group">
|
||||
<input name="name" class="form-control" type="text" placeholder="Nom commande" autofocus required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Commande à appeler (la commande sera appelée depuis le dossier "<?php echo PWD_SCRIPTS; ?>")</label>
|
||||
<div class="form-group input-group">
|
||||
<span class="input-group-addon"><span class="fa fa-link"></span></span>
|
||||
<input name="script" class="form-control" type="text" placeholder="Ex : chauffage/monter.sh" autofocus required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Niveau administrateur obligatoire</label>
|
||||
<div class="form-group">
|
||||
<input name="admin" type="radio" value="1" required /> Oui
|
||||
<input name="admin" type="radio" value="0" required /> Non
|
||||
</div>
|
||||
</div>
|
||||
<a class="btn btn-danger" href="<?php echo $this->generateUrl('commands'); ?>">Annuler</a>
|
||||
<input type="submit" class="btn btn-success" value="Enregistrer la commande" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$incs->footer();
|
66
templates/addContact.php
Executable file
66
templates/addContact.php
Executable file
|
@ -0,0 +1,66 @@
|
|||
<?php
|
||||
//Template dashboard
|
||||
$incs = new internalIncs();
|
||||
$incs->head('Contacts - Show All');
|
||||
?>
|
||||
<div id="wrapper">
|
||||
<?php
|
||||
$incs->nav('contacts');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<div class="container-fluid">
|
||||
<!-- Page Heading -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
Nouveau contact
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-dashboard"></i> <a href="<?php echo $this->generateUrl('dashboard'); ?>">Dashboard</a>
|
||||
</li>
|
||||
<li>
|
||||
<i class="fa fa-user"></i> <a href="<?php echo $this->generateUrl('contacts'); ?>">Contacts</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-plus"></i> Nouveau
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-user fa-fw"></i> Ajout d'un contact</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="<?php echo $this->generateUrl('contacts', 'create', array('csrf' => $_SESSION['csrf']));?>" method="POST">
|
||||
<div class="form-group">
|
||||
<label>Nom contact</label>
|
||||
<div class="form-group input-group">
|
||||
<span class="input-group-addon"><span class="fa fa-user"></span></span>
|
||||
<input name="name" class="form-control" type="text" placeholder="Nom contact" autofocus required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Numéro de téléphone du contact</label>
|
||||
<div class="form-group input-group">
|
||||
<span class="input-group-addon"><span class="fa fa-phone"></span></span>
|
||||
<input name="phone" class="form-control" type="text" placeholder="Numéro du contact" pattern="0[1-9]([0-9] ?){8}" required>
|
||||
</div>
|
||||
</div>
|
||||
<a class="btn btn-danger" href="<?php echo $this->generateUrl('contacts'); ?>">Annuler</a>
|
||||
<input type="submit" class="btn btn-success" value="Enregistrer le contact" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$incs->footer();
|
77
templates/addGroup.php
Executable file
77
templates/addGroup.php
Executable file
|
@ -0,0 +1,77 @@
|
|||
<?php
|
||||
//Template dashboard
|
||||
$incs = new internalIncs();
|
||||
$incs->head('Groups - Add');
|
||||
?>
|
||||
<div id="wrapper">
|
||||
<?php
|
||||
$incs->nav('groups');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<div class="container-fluid">
|
||||
<!-- Page Heading -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
Nouveau groupe
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-dashboard"></i> <a href="<?php echo $this->generateUrl('dashboard'); ?>">Dashboard</a>
|
||||
</li>
|
||||
<li>
|
||||
<i class="fa fa-group"></i> <a href="<?php echo $this->generateUrl('groups'); ?>">Groupes</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-plus"></i> Nouveau
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-group fa-fw"></i> Ajout d'un groupe</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="<?php echo $this->generateUrl('groups', 'create', array('csrf' => $_SESSION['csrf']));?>" method="POST">
|
||||
<div class="form-group">
|
||||
<label>Nom du groupe</label>
|
||||
<div class="form-group input-group">
|
||||
<span class="input-group-addon"><span class="fa fa-users"></span></span>
|
||||
<input name="name" class="form-control" type="text" placeholder="Nom groupe" autofocus required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Contacts au groupe</label>
|
||||
<input class="add-contacts form-control" name="contacts[]"/>
|
||||
</div>
|
||||
<a class="btn btn-danger" href="<?php echo $this->generateUrl('groups'); ?>">Annuler</a>
|
||||
<input type="submit" class="btn btn-success" value="Enregistrer le contact" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
jQuery(document).ready(function()
|
||||
{
|
||||
jQuery('.add-contacts').each(function()
|
||||
{
|
||||
jQuery(this).magicSuggest({
|
||||
data: '<?php echo $this->generateUrl('contacts', 'jsonGetContacts'); ?>',
|
||||
valueField: 'id',
|
||||
displayField: 'name',
|
||||
name: 'contacts[]'
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
$incs->footer();
|
107
templates/addScheduled.php
Executable file
107
templates/addScheduled.php
Executable file
|
@ -0,0 +1,107 @@
|
|||
<?php
|
||||
//Template dashboard
|
||||
$incs = new internalIncs();
|
||||
$incs->head('Scheduleds - Add');
|
||||
?>
|
||||
<div id="wrapper">
|
||||
<?php
|
||||
$incs->nav('scheduleds');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<div class="container-fluid">
|
||||
<!-- Page Heading -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
Nouveau SMS programmé
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-dashboard"></i> <a href="<?php echo $this->generateUrl('dashboard'); ?>">Dashboard</a>
|
||||
</li>
|
||||
<li>
|
||||
<i class="fa fa-calendar"></i> <a href="<?php echo $this->generateUrl('scheduleds'); ?>">Scheduleds</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-plus"></i> Nouveau
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-calendar fa-fw"></i> Ajout d'un SMS programmé</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="<?php echo $this->generateUrl('scheduleds', 'create', array('csrf' => $_SESSION['csrf']));?>" method="POST">
|
||||
<div class="form-group">
|
||||
<label>Texte du SMS</label>
|
||||
<textarea name="content" class="form-control" required></textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Date d'envoie du SMS</label>
|
||||
<input name="date" class="form-control form-datetime" type="text" value="<?php secho($now); ?>" readonly>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Numéros cibles</label>
|
||||
<input class="add-numbers form-control" name="numbers[]"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Contacts cibles</label>
|
||||
<input class="add-contacts form-control" name="contacts[]"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Groupes cibles</label>
|
||||
<input class="add-groups form-control" name="groups[]"/>
|
||||
</div>
|
||||
<a class="btn btn-danger" href="<?php echo $this->generateUrl('scheduleds'); ?>">Annuler</a>
|
||||
<input type="submit" class="btn btn-success" value="Enregistrer le SMS" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
jQuery(document).ready(function()
|
||||
{
|
||||
jQuery('.form-datetime').datetimepicker(
|
||||
{
|
||||
format: 'yyyy-mm-dd hh:ii',
|
||||
autoclose: true,
|
||||
minuteStep: 1,
|
||||
language: 'fr'
|
||||
});
|
||||
|
||||
jQuery('.add-numbers').each(function()
|
||||
{
|
||||
jQuery(this).magicSuggest();
|
||||
});
|
||||
|
||||
jQuery('.add-contacts').each(function()
|
||||
{
|
||||
jQuery(this).magicSuggest({
|
||||
data: '<?php echo $this->generateUrl('contacts', 'jsonGetContacts'); ?>',
|
||||
valueField: 'id',
|
||||
displayField: 'name',
|
||||
});
|
||||
});
|
||||
|
||||
jQuery('.add-groups').each(function()
|
||||
{
|
||||
jQuery(this).magicSuggest({
|
||||
data: '<?php echo $this->generateUrl('groups', 'jsonGetGroups'); ?>',
|
||||
valueField: 'id',
|
||||
displayField: 'name',
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
$incs->footer();
|
81
templates/addUser.php
Executable file
81
templates/addUser.php
Executable file
|
@ -0,0 +1,81 @@
|
|||
<?php
|
||||
//Template dashboard
|
||||
$incs = new internalIncs();
|
||||
$incs->head('Users - Show All');
|
||||
?>
|
||||
<div id="wrapper">
|
||||
<?php
|
||||
$incs->nav('users');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<div class="container-fluid">
|
||||
<!-- Page Heading -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
Nouvel utilisateur
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-dashboard"></i> <a href="<?php echo $this->generateUrl('dashboard'); ?>">Dashboard</a>
|
||||
</li>
|
||||
<li>
|
||||
<i class="fa fa-user"></i> <a href="<?php echo $this->generateUrl('users'); ?>">Utilisateurs</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-plus"></i> Nouveau
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-user fa-fw"></i> Ajout d'un utilisateur</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="<?php echo $this->generateUrl('users', 'create', array('csrf' => $_SESSION['csrf']));?>" method="POST">
|
||||
<div class="form-group">
|
||||
<label>Adresse e-mail</label>
|
||||
<div class="form-group input-group">
|
||||
<span class="input-group-addon"><span class="fa fa-at"></span></span>
|
||||
<input name="email" class="form-control" type="email" placeholder="Adresse e-mail de l'utilisateur" autofocus required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Confirmer adresse e-mail</label>
|
||||
<div class="form-group input-group">
|
||||
<span class="input-group-addon"><span class="fa fa-at"></span></span>
|
||||
<input name="email_confirm" class="form-control" type="email" placeholder="Confirmer l'adresse e-mail de l'utilisateur" required>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
if (isset($_SESSION['admin']) && $_SESSION['admin'])
|
||||
{
|
||||
?>
|
||||
<div class="form-group">
|
||||
<label>Niveau administrateur : </label>
|
||||
<div class="form-group">
|
||||
<input name="admin" type="radio" value="1" required /> Oui
|
||||
<input name="admin" type="radio" value="0" required /> Non
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
<a class="btn btn-danger" href="<?php echo $this->generateUrl('users'); ?>">Annuler</a>
|
||||
<input type="submit" class="btn btn-success" value="Enregistrer le user" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$incs->footer();
|
106
templates/commands.php
Executable file
106
templates/commands.php
Executable file
|
@ -0,0 +1,106 @@
|
|||
<?php
|
||||
//Template dashboard
|
||||
$incs = new internalIncs();
|
||||
$incs->head('Commands - Show All');
|
||||
?>
|
||||
<div id="wrapper">
|
||||
<?php
|
||||
$incs->nav('commands');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<div class="container-fluid">
|
||||
<!-- Page Heading -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
Dashboard <small>Commandes</small>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-dashboard"></i> <a href="<?php echo $this->generateUrl('dashboard'); ?>">Dashboard</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-terminal"></i> Commandes
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-terminal fa-fw"></i> Liste des commandes</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover table-striped" id="table-commands">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Nom</th>
|
||||
<th>Script</th>
|
||||
<th>Admin obligatoire</th>
|
||||
<th style="width:5%;">Sélectionner</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach ($commands as $command)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td><?php secho($command['id']); ?></td>
|
||||
<td><?php secho($command['name']); ?></td>
|
||||
<td><?php secho($command['script']); ?></td>
|
||||
<td><?php echo $command['admin'] ? 'Oui' : 'Non' ; ?></td>
|
||||
<td><input type="checkbox" value="<?php secho($command['id']); ?>"></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</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', array('csrf' => $_SESSION['csrf'])); ?>"><span class="fa fa-edit"></span> Modifier</a></li>
|
||||
<li><a href="<?php echo $this->generateUrl('commands', 'delete', array('csrf' => $_SESSION['csrf'])); ?>"><span class="fa fa-trash-o"></span> Supprimer</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</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 += '/command' + jQuery(this).val() + '_' + jQuery(this).val();
|
||||
});
|
||||
window.location = url;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
$incs->footer();
|
104
templates/contacts.php
Executable file
104
templates/contacts.php
Executable file
|
@ -0,0 +1,104 @@
|
|||
<?php
|
||||
//Template dashboard
|
||||
$incs = new internalIncs();
|
||||
$incs->head('Contacts - Show All');
|
||||
?>
|
||||
<div id="wrapper">
|
||||
<?php
|
||||
$incs->nav('contacts');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<div class="container-fluid">
|
||||
<!-- Page Heading -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
Dashboard <small>Contacts</small>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-dashboard"></i> <a href="<?php echo $this->generateUrl('dashboard'); ?>">Dashboard</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-user"></i> Contacts
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-user fa-fw"></i> Liste des contacts</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover table-striped" id="table-contacts">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Nom</th>
|
||||
<th>Numéro</th>
|
||||
<th style="width:5%;">Sélectionner</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach ($contacts as $contact)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td><?php secho($contact['id']); ?></td>
|
||||
<td><?php secho($contact['name']); ?></td>
|
||||
<td><?php secho($contact['number']); ?></td>
|
||||
<td><input type="checkbox" value="<?php secho($contact['id']); ?>"></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</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', array('csrf' => $_SESSION['csrf'])); ?>"><span class="fa fa-edit"></span> Modifier</a></li>
|
||||
<li><a href="<?php echo $this->generateUrl('contacts', 'delete', array('csrf' => $_SESSION['csrf'])); ?>"><span class="fa fa-trash-o"></span> Supprimer</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</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 += '/contacts' + jQuery(this).val() + '_' + jQuery(this).val();
|
||||
});
|
||||
window.location = url;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
$incs->footer();
|
267
templates/dashboard.php
Executable file
267
templates/dashboard.php
Executable file
|
@ -0,0 +1,267 @@
|
|||
<?php
|
||||
//Template dashboard
|
||||
$incs = new internalIncs();
|
||||
$incs->head('Dashboard');
|
||||
?>
|
||||
<div id="wrapper">
|
||||
<?php
|
||||
$incs->nav('dashboard');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<div class="container-fluid">
|
||||
<!-- Page Heading -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
Dashboard <small>Statistiques d'utilisation</small>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li class="active">
|
||||
<i class="fa fa-dashboard"></i> Dashboard
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-3 col-md-6">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<i class="fa fa-user fa-5x"></i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="huge"><?php echo $nb_contacts; ?></div>
|
||||
<div>Contacts</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a href="<?php echo $this->generateUrl('contacts') ?>">
|
||||
<div class="panel-footer">
|
||||
<span class="pull-left">Voir vos contacts</span>
|
||||
<span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3 col-md-6">
|
||||
<div class="panel panel-green">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<i class="fa fa-group fa-5x"></i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="huge"><?php echo $nb_groups; ?></div>
|
||||
<div>Groupes</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a href="<?php echo $this->generateUrl('groups') ?>">
|
||||
<div class="panel-footer">
|
||||
<span class="pull-left">Voir les groupes</span>
|
||||
<span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3 col-md-6">
|
||||
<div class="panel panel-yellow">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<i class="fa fa-calendar fa-5x"></i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="huge"><?php echo $nb_scheduleds; ?></div>
|
||||
<div>SMS programmés</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a href="<?php echo $this->generateUrl('scheduleds') ?>">
|
||||
<div class="panel-footer">
|
||||
<span class="pull-left">Voir les SMS programmés</span>
|
||||
<span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3 col-md-6">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<i class="fa fa-terminal fa-5x"></i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="huge"><?php echo $nb_commands; ?></div>
|
||||
<div>Commandes</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a href="<?php echo $this->generateUrl('commands') ?>">
|
||||
<div class="panel-footer">
|
||||
<span class="pull-left">Voir les commandes</span>
|
||||
<span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-area-chart fa-fw"></i> Activité de la semaine : </h3>
|
||||
<span style="color: #5CB85C;">SMS envoyés (moyenne = <?php echo $avg_sendeds; ?> par jour).</span><br/>
|
||||
<span style="color: #EDAB4D">SMS reçus (moyenne = <?php echo $avg_receiveds; ?> par jour).</span>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div id="morris-area-chart"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-4">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-send fa-fw"></i> SMS Envoyés</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Numéro</th>
|
||||
<th>Date</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach ($sendeds as $sended)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td><?php secho($sended['target']); ?></td>
|
||||
<td><?php secho($sended['at']); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<a href="<?php echo $this->generateUrl('sendeds'); ?>">Voir tous les SMS envoyés <i class="fa fa-arrow-circle-right"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-download fa-fw"></i> SMS Reçus</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Numéro</th>
|
||||
<th>Date</th>
|
||||
<th>Commande</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach ($receiveds as $received)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td><?php secho($received['send_by']); ?></td>
|
||||
<td><?php secho($received['at']); ?></td>
|
||||
<td><?php echo ($received['is_command']) ? 'Oui' : 'Non'; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<a href="<?php echo $this->generateUrl('receiveds'); ?>">Voir tous les SMS reçus <i class="fa fa-arrow-circle-right"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-clock-o fa-fw"></i> Évènement survenus</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="list-group">
|
||||
<?php
|
||||
foreach ($events as $event)
|
||||
{
|
||||
$logo = internalTools::eventTypeToIcon($event['type']);
|
||||
?>
|
||||
<a href="#" class="list-group-item">
|
||||
<span class="badge"><?php secho($event['at']); ?></span>
|
||||
<i class="fa fa-fw <?php echo $logo; ?>"></i> <?php secho($event['text']); ?>
|
||||
</a>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<a href="<?php echo $this->generateUrl('events'); ?>">Voirs tous les évènements survenus <i class="fa fa-arrow-circle-right"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
|
||||
</div>
|
||||
<!-- /.container-fluid -->
|
||||
|
||||
</div>
|
||||
<!-- /#page-wrapper -->
|
||||
|
||||
</div>
|
||||
<script>
|
||||
jQuery(document).ready(function()
|
||||
{
|
||||
Morris.Area({
|
||||
element: 'morris-area-chart',
|
||||
behaveLikeLine: true,
|
||||
fillOpacity: 0.4,
|
||||
data: <?php echo $datas_area_chart;?>,
|
||||
xkey: 'period',
|
||||
ykeys: ['sendeds', 'receiveds'],
|
||||
labels: ['SMS envoyés', 'SMS reçus'],
|
||||
lineColors: ['#5CB85C', '#EDAB4D'],
|
||||
goals: [<?php echo $avg_sendeds; ?>, <?php echo $avg_receiveds; ?>],
|
||||
goalLineColors: ['#5CB85C', '#EDAB4D'],
|
||||
goalStrokeWidth: 2,
|
||||
pointSize: 4,
|
||||
hideHover: 'auto',
|
||||
resize: true
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!-- /#wrapper -->
|
||||
<?php
|
||||
$incs->footer();
|
80
templates/editCommands.php
Executable file
80
templates/editCommands.php
Executable file
|
@ -0,0 +1,80 @@
|
|||
<?php
|
||||
//Template dashboard
|
||||
$incs = new internalIncs();
|
||||
$incs->head('Command - Edit');
|
||||
?>
|
||||
<div id="wrapper">
|
||||
<?php
|
||||
$incs->nav('commands');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<div class="container-fluid">
|
||||
<!-- Page Heading -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
Modification commandes
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-dashboard"></i> <a href="<?php echo $this->generateUrl('dashboard'); ?>">Dashboard</a>
|
||||
</li>
|
||||
<li>
|
||||
<i class="fa fa-terminal"></i> <a href="<?php echo $this->generateUrl('commands'); ?>">Commandes</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-edit"></i> Modifier
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-edit fa-fw"></i>Modification de commandes</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="<?php echo $this->generateUrl('commands', 'update', array('csrf' => $_SESSION['csrf']));?>" method="POST">
|
||||
<?php
|
||||
foreach ($commands as $command)
|
||||
{
|
||||
?>
|
||||
<div class="form-group">
|
||||
<label>Nom commande</label>
|
||||
<div class="form-group">
|
||||
<input value="<?php secho($command['name']); ?>" name="commands[<?php secho($command['id']); ?>][name]" class="form-control" type="text" placeholder="Nom commande" autofocus required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Commande à appeler (la commande sera appelée depuis le dossier "<?php echo PWD_SCRIPTS; ?>")</label>
|
||||
<div class="form-group input-group">
|
||||
<span class="input-group-addon"><span class="fa fa-link"></span></span>
|
||||
<input value="<?php secho($command['script']); ?>" name="commands[<?php secho($command['id']); ?>][script]" class="form-control" type="text" placeholder="Ex : chauffage/monter.sh" autofocus required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Niveau administrateur obligatoire</label>
|
||||
<div class="form-group">
|
||||
<input <?php echo $command['admin'] ? 'checked' : ''; ?> name="commands[<?php secho($command['id']); ?>][admin]" type="radio" value="1" required /> Oui
|
||||
<input <?php echo $command['admin'] ? '' : 'checked'; ?> name="commands[<?php secho($command['id']); ?>][admin]" type="radio" value="0" required /> Non
|
||||
</div>
|
||||
</div>
|
||||
<hr/>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<a class="btn btn-danger" href="<?php echo $this->generateUrl('commands'); ?>">Annuler</a>
|
||||
<input type="submit" class="btn btn-success" value="Enregistrer la commande" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$incs->footer();
|
74
templates/editContacts.php
Executable file
74
templates/editContacts.php
Executable file
|
@ -0,0 +1,74 @@
|
|||
<?php
|
||||
//Template dashboard
|
||||
$incs = new internalIncs();
|
||||
$incs->head('Contacts - Edit');
|
||||
?>
|
||||
<div id="wrapper">
|
||||
<?php
|
||||
$incs->nav('contacts');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<div class="container-fluid">
|
||||
<!-- Page Heading -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
Modification contacts
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-dashboard"></i> <a href="<?php echo $this->generateUrl('dashboard'); ?>">Dashboard</a>
|
||||
</li>
|
||||
<li>
|
||||
<i class="fa fa-user"></i> <a href="<?php echo $this->generateUrl('contacts'); ?>">Contacts</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-edit"></i> Modifier
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-edit fa-fw"></i> Modification de contacts</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="<?php echo $this->generateUrl('contacts', 'update', array('csrf' => $_SESSION['csrf']));?>" method="POST">
|
||||
<?php
|
||||
foreach ($contacts as $contact)
|
||||
{
|
||||
?>
|
||||
<div class="form-group">
|
||||
<label>Nom contact</label>
|
||||
<div class="form-group input-group">
|
||||
<span class="input-group-addon"><span class="fa fa-user"></span></span>
|
||||
<input name="contacts[<?php secho($contact['id']); ?>][name]" class="form-control" type="text" placeholder="Nom contact" autofocus required value="<?php secho($contact['name']); ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Numéro de téléphone du contact</label>
|
||||
<div class="form-group input-group">
|
||||
<span class="input-group-addon"><span class="fa fa-phone"></span></span>
|
||||
<input name="contacts[<?php secho($contact['id']); ?>][phone]" class="form-control" type="text" placeholder="Numéro du contact" pattern="0[1-9]([0-9] ?){8}" required value="<?php secho($contact['number']); ?>">
|
||||
</div>
|
||||
</div>
|
||||
<hr/>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<a class="btn btn-danger" href="<?php echo $this->generateUrl('contacts'); ?>">Annuler</a>
|
||||
<input type="submit" class="btn btn-success" value="Enregistrer le contact" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$incs->footer();
|
91
templates/editGroups.php
Executable file
91
templates/editGroups.php
Executable file
|
@ -0,0 +1,91 @@
|
|||
<?php
|
||||
//Template dashboard
|
||||
$incs = new internalIncs();
|
||||
$incs->head('Groupes - Edit');
|
||||
?>
|
||||
<div id="wrapper">
|
||||
<?php
|
||||
$incs->nav('groups');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<div class="container-fluid">
|
||||
<!-- Page Heading -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
Modification groupes
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-dashboard"></i> <a href="<?php echo $this->generateUrl('dashboard'); ?>">Dashboard</a>
|
||||
</li>
|
||||
<li>
|
||||
<i class="fa fa-group"></i> <a href="<?php echo $this->generateUrl('groups'); ?>">Groupes</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-edit"></i> Modifier
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-edit fa-fw"></i> Modification de groupes</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="<?php echo $this->generateUrl('groups', 'update', array('csrf' => $_SESSION['csrf']));?>" method="POST">
|
||||
<?php
|
||||
foreach ($groups as $group)
|
||||
{
|
||||
$contacts = array();
|
||||
foreach ($group['contacts'] as $contact)
|
||||
{
|
||||
$contacts[] = (int)$contact['id'];
|
||||
}
|
||||
$contacts = json_encode($contacts);
|
||||
|
||||
?>
|
||||
<div class="form-group">
|
||||
<label>Nom groupe</label>
|
||||
<div class="form-group input-group">
|
||||
<span class="input-group-addon"><span class="fa fa-user"></span></span>
|
||||
<input name="groups[<?php secho($group['id']); ?>][name]" class="form-control" type="text" placeholder="Nom groupe" autofocus required value="<?php secho($group['name']); ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Contacts du groupe</label>
|
||||
<input class="add-contacts form-control" name="groups[<?php secho($group['id']); ?>][contacts][]" value="<?php secho($contacts); ?>"/>
|
||||
</div>
|
||||
<hr/>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<a class="btn btn-danger" href="<?php echo $this->generateUrl('groups'); ?>">Annuler</a>
|
||||
<input type="submit" class="btn btn-success" value="Enregistrer le contact" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
jQuery(document).ready(function()
|
||||
{
|
||||
jQuery('.add-contacts').each(function()
|
||||
{
|
||||
jQuery(this).magicSuggest({
|
||||
data: '<?php echo $this->generateUrl('contacts', 'jsonGetContacts'); ?>',
|
||||
valueField: 'id',
|
||||
displayField: 'name',
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
$incs->footer();
|
136
templates/editScheduleds.php
Executable file
136
templates/editScheduleds.php
Executable file
|
@ -0,0 +1,136 @@
|
|||
<?php
|
||||
//Template dashboard
|
||||
$incs = new internalIncs();
|
||||
$incs->head('Scheduleds - Edit');
|
||||
?>
|
||||
<div id="wrapper">
|
||||
<?php
|
||||
$incs->nav('scheduleds');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<div class="container-fluid">
|
||||
<!-- Page Heading -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
Modifier SMS programmés
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-dashboard"></i> <a href="<?php echo $this->generateUrl('dashboard'); ?>">Dashboard</a>
|
||||
</li>
|
||||
<li>
|
||||
<i class="fa fa-calendar"></i> <a href="<?php echo $this->generateUrl('scheduleds'); ?>">Scheduleds</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-edit"></i> Modifier
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-edit fa-fw"></i> Modification des SMS programmés</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="<?php echo $this->generateUrl('scheduleds', 'update', array('csrf' => $_SESSION['csrf']));?>" method="POST">
|
||||
<?php
|
||||
foreach ($scheduleds as $scheduled)
|
||||
{
|
||||
$numbers = array();
|
||||
foreach ($scheduled['numbers'] as $number)
|
||||
{
|
||||
$numbers[] = $number['number'];
|
||||
}
|
||||
|
||||
$contacts = array();
|
||||
foreach ($scheduled['contacts'] as $contact)
|
||||
{
|
||||
$contacts[] = (int)$contact['id'];
|
||||
}
|
||||
|
||||
$groups = array();
|
||||
foreach ($scheduled['groups'] as $group)
|
||||
{
|
||||
$groups[] = (int)$group['id'];
|
||||
}
|
||||
|
||||
$numbers = json_encode($numbers);
|
||||
$contacts = json_encode($contacts);
|
||||
$groups = json_encode($groups);
|
||||
?>
|
||||
<div class="form-group">
|
||||
<label>Texte du SMS</label>
|
||||
<textarea name="scheduleds[<?php secho($scheduled['id']); ?>][content]" class="form-control" required><?php secho($scheduled['content'], true); ?></textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Date d'envoie du SMS</label>
|
||||
<input name="scheduleds[<?php secho($scheduled['id']); ?>][date]" class="form-control form-datetime" type="text" value="<?php secho($scheduled['at']); ?>" readonly>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Numéros cibles</label>
|
||||
<input class="add-numbers form-control" name="scheduleds[<?php secho($scheduled['id']); ?>][numbers][]" value="<?php secho($numbers); ?>"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Contacts cibles</label>
|
||||
<input class="add-contacts form-control" name="scheduleds[<?php secho($scheduled['id']); ?>][contacts][]" value="<?php secho($contacts); ?>" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Groupes cibles</label>
|
||||
<input class="add-groups form-control" name="scheduleds[<?php secho($scheduled['id']); ?>][groups][]" value="<?php secho($groups); ?>" />
|
||||
</div>
|
||||
<hr/>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<a class="btn btn-danger" href="<?php echo $this->generateUrl('scheduleds'); ?>">Annuler</a>
|
||||
<input type="submit" class="btn btn-success" value="Enregistrer le SMS" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
jQuery(document).ready(function()
|
||||
{
|
||||
jQuery('.form-datetime').datetimepicker(
|
||||
{
|
||||
format: 'yyyy-mm-dd hh:ii',
|
||||
autoclose: true,
|
||||
minuteStep: 1,
|
||||
language: 'fr'
|
||||
});
|
||||
|
||||
jQuery('.add-numbers').each(function()
|
||||
{
|
||||
jQuery(this).magicSuggest();
|
||||
});
|
||||
|
||||
jQuery('.add-contacts').each(function()
|
||||
{
|
||||
jQuery(this).magicSuggest({
|
||||
data: '<?php echo $this->generateUrl('contacts', 'jsonGetContacts'); ?>',
|
||||
valueField: 'id',
|
||||
displayField: 'name',
|
||||
});
|
||||
});
|
||||
|
||||
jQuery('.add-groups').each(function()
|
||||
{
|
||||
jQuery(this).magicSuggest({
|
||||
data: '<?php echo $this->generateUrl('groups', 'jsonGetGroups'); ?>',
|
||||
valueField: 'id',
|
||||
displayField: 'name',
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
$incs->footer();
|
95
templates/events.php
Executable file
95
templates/events.php
Executable file
|
@ -0,0 +1,95 @@
|
|||
<?php
|
||||
//Template dashboard
|
||||
$incs = new internalIncs();
|
||||
$incs->head('Events - Show All');
|
||||
?>
|
||||
<div id="wrapper">
|
||||
<?php
|
||||
$incs->nav('events');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<div class="container-fluid">
|
||||
<!-- Page Heading -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
Dashboard <small>Évènements</small>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-dashboard"></i> <a href="<?php echo $this->generateUrl('dashboard'); ?>">Dashboard</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-clock"></i> Évènements
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-clock fa-fw"></i> Liste des évènements</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="table-events">
|
||||
<table class="table table-bordered table-hover table-striped" id="table-events">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Type</th>
|
||||
<th>Date</th>
|
||||
<th>Texte</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach ($events as $event)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td><?php secho($event['id']); ?></td>
|
||||
<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>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<nav>
|
||||
<ul class="pager">
|
||||
<?php
|
||||
if ($page)
|
||||
{
|
||||
?>
|
||||
<li><a href="<?php echo $this->generateUrl('events', 'showAll', array('page' => $page - 1)); ?>"><span aria-hidden="true">←</span> Précèdents</a></li>
|
||||
<?php
|
||||
}
|
||||
|
||||
$numero_page = 'Page : ' . ($page + 1);
|
||||
secho($numero_page);
|
||||
|
||||
if ($limit == $nbResults)
|
||||
{
|
||||
?>
|
||||
<li><a href="<?php echo $this->generateUrl('events', 'showAll', array('page' => $page + 1)); ?>">Suivants <span aria-hidden="true">→</span></a></li>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$incs->footer();
|
6
templates/footer.php
Executable file
6
templates/footer.php
Executable file
|
@ -0,0 +1,6 @@
|
|||
<footer class="text-center">
|
||||
RaspiSMS a été créé pour vous par le site <a href="http://raspbian-france.fr">Raspbian-France</a>, site dédié à la Raspberry Pi<br/>
|
||||
Copyright 2014. RaspiSMS est un programme sous <a href="https://www.gnu.org/licenses/gpl.txt" rel="nofollow">licence GNU GPL</a>.<br/>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
25
templates/forgetPassword.php
Executable file
25
templates/forgetPassword.php
Executable file
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
//Template dashboard
|
||||
$incs = new internalIncs();
|
||||
$incs->head('Forget Password');
|
||||
?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<form class="col-xs-10 col-xs-offset-1 col-md-4 col-md-offset-4 connexion-form" action="<?php echo $this->generateUrl('connect', 'changePassword'); ?>" method="POST">
|
||||
<h2>Mot de passe oublié</h2>
|
||||
<div class="form-group">
|
||||
<label>Adresse e-mail</label>
|
||||
<div class="form-group input-group">
|
||||
<span class="input-group-addon"><span class="fa fa-at"></span></span>
|
||||
<input name="mail" class="form-control" type="email" placeholder="Ex : john.doe@example.tld" autofocus required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a class="forget-password-link" href="<?php echo $this->generateUrl('connect'); ?>">Se connecter ?</a>
|
||||
<button class="btn btn-primary btn-lg btn-block">Renvoyer nouveau mot de passe</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
<?php
|
||||
$incs->footer();
|
104
templates/groups.php
Executable file
104
templates/groups.php
Executable file
|
@ -0,0 +1,104 @@
|
|||
<?php
|
||||
//Template dashboard
|
||||
$incs = new internalIncs();
|
||||
$incs->head('Groups - Show All');
|
||||
?>
|
||||
<div id="wrapper">
|
||||
<?php
|
||||
$incs->nav('groups');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<div class="container-fluid">
|
||||
<!-- Page Heading -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
Dashboard <small>Groupes</small>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-dashboard"></i> <a href="<?php echo $this->generateUrl('dashboard'); ?>">Dashboard</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-group"></i> Groupes
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-group fa-fw"></i> Liste des groupes</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover table-striped" id="table-groups">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Nom</th>
|
||||
<th>Nombre de contacts</th>
|
||||
<th style="width:5%;">Sélectionner</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach ($groups as $group)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td><?php secho($group['id']); ?></td>
|
||||
<td><?php secho($group['name']); ?></td>
|
||||
<td><?php secho($group['nb_contacts']); ?></td>
|
||||
<td><input type="checkbox" value="<?php secho($group['id']); ?>"></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</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', array('csrf' => $_SESSION['csrf'])); ?>"><span class="fa fa-trash-o"></span> Supprimer</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</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 += '/groups' + jQuery(this).val() + '_' + jQuery(this).val();
|
||||
});
|
||||
window.location = url;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
$incs->footer();
|
62
templates/head.php
Executable file
62
templates/head.php
Executable file
|
@ -0,0 +1,62 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title><?php echo $title; ?></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<meta name="author" content="<?php echo $author; ?>" />
|
||||
<link rel="icon" type="image/png" href="<?php echo HTTP_PWD_IMG; ?>favicon.png" />
|
||||
<!-- Bootstrap Core CSS -->
|
||||
<link href="<?php echo HTTP_PWD; ?>css/bootstrap.min.css" rel="stylesheet">
|
||||
<!-- Custom CSS Theme -->
|
||||
<link href="<?php echo HTTP_PWD; ?>css/sb-admin.css" rel="stylesheet">
|
||||
<!-- Morris Charts CSS -->
|
||||
<link href="<?php echo HTTP_PWD; ?>css/plugins/morris.css" rel="stylesheet">
|
||||
<!-- Custom Fonts -->
|
||||
<link href="<?php echo HTTP_PWD; ?>font-awesome-4.2.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
|
||||
<!-- Custom CSS site -->
|
||||
<link href="<?php echo HTTP_PWD; ?>css/style.css" rel="stylesheet">
|
||||
<script src="<?php echo HTTP_PWD; ?>js/jquery.js"></script>
|
||||
<script src="<?php echo HTTP_PWD; ?>js/bootstrap.min.js"></script>
|
||||
<script src="<?php echo HTTP_PWD; ?>js/plugins/morris/raphael.min.js"></script>
|
||||
<script src="<?php echo HTTP_PWD; ?>js/plugins/morris/morris.min.js"></script>
|
||||
|
||||
<!-- Magic Suggest JS and CSS -->
|
||||
<script src="<?php echo HTTP_PWD; ?>js/magicsuggest.min.js"></script>
|
||||
<link href="<?php echo HTTP_PWD; ?>css/magicsuggest.css" rel="stylesheet">
|
||||
|
||||
<!-- Datetime Picked JS and CSS -->
|
||||
<script src="<?php echo HTTP_PWD; ?>js/bootstrap-datetimepicker.min.js"></script>
|
||||
<script src="<?php echo HTTP_PWD; ?>js/locales/bootstrap-datetimepicker.fr.js"></script>
|
||||
<link href="<?php echo HTTP_PWD; ?>css/bootstrap-datetimepicker.min.css" rel="stylesheet">
|
||||
|
||||
<!-- Custom JS -->
|
||||
<script src="<?php echo HTTP_PWD; ?>js/custom.js"></script>
|
||||
|
||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
||||
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<script>
|
||||
jQuery(document).ready(function ()
|
||||
{
|
||||
<?php
|
||||
if (!empty($error_message))
|
||||
{
|
||||
?>
|
||||
showMessage('<?php secho($error_message, false, true); ?>', 0);
|
||||
<?php
|
||||
}
|
||||
|
||||
if (!empty($success_message))
|
||||
{
|
||||
?>
|
||||
showMessage('<?php secho($success_message, false, true); ?>', 1);
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
32
templates/login.php
Executable file
32
templates/login.php
Executable file
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
//Template dashboard
|
||||
$incs = new internalIncs();
|
||||
$incs->head('Connexion');
|
||||
?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<form class="col-xs-10 col-xs-offset-1 col-md-4 col-md-offset-4 connexion-form" action="<?php echo $this->generateUrl('connect', 'connection'); ?>" method="POST">
|
||||
<h2>Connexion - RaspiSMS</h2>
|
||||
<div class="form-group">
|
||||
<label>Adresse e-mail</label>
|
||||
<div class="form-group input-group">
|
||||
<span class="input-group-addon"><span class="fa fa-at"></span></span>
|
||||
<input name="mail" class="form-control" type="email" placeholder="Ex : john.doe@example.tld" autofocus required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Mot de passe</label>
|
||||
<div class="form-group input-group">
|
||||
<span class="input-group-addon"><span class="fa fa-lock"></span></span>
|
||||
<input name="password" class="form-control" type="password" placeholder="Your password" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a class="forget-password-link" href="<?php echo $this->generateUrl('connect', 'forgetPassword'); ?>">Mot de passe oublié ?</a>
|
||||
<button class="btn btn-primary btn-lg btn-block">Connexion</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
include_once(PWD . 'mvc/pingback.php');
|
||||
$incs->footer();
|
71
templates/nav.php
Executable file
71
templates/nav.php
Executable file
|
@ -0,0 +1,71 @@
|
|||
<!-- Navigation -->
|
||||
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
|
||||
<!-- Brand and toggle get grouped for better mobile display -->
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="<?php echo $this->generateUrl('dashboard'); ?>">RaspiSMS</a>
|
||||
</div>
|
||||
<!-- Top Menu Items -->
|
||||
<ul class="nav navbar-right top-nav">
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i> <?php secho($email); ?> <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a href="<?php echo $this->generateUrl('profile'); ?>"><i class="fa fa-fw fa-user"></i> Profil</a>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
<li>
|
||||
<a href="<?php echo $this->generateUrl('connect', 'logout'); ?>"><i class="fa fa-fw fa-power-off"></i> Log Out</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- Sidebar Menu Items - These collapse to the responsive navigation menu on small screens -->
|
||||
<div class="collapse navbar-collapse navbar-ex1-collapse">
|
||||
<ul class="nav navbar-nav side-nav">
|
||||
<li <?php echo $page == 'dashboard' ? 'class="active"' : ''; ?>>
|
||||
<a href="<?php echo $this->generateUrl('dashboard'); ?>"><i class="fa fa-fw fa-dashboard"></i> Dashboard</a>
|
||||
</li>
|
||||
<li <?php echo $page == 'scheduleds' ? 'class="active"' : ''; ?>>
|
||||
<a href="<?php echo $this->generateUrl('scheduleds'); ?>"><i class="fa fa-fw fa-envelope"></i> SMS</a>
|
||||
</li>
|
||||
<li <?php echo $page == 'commands' ? 'class="active"' : ''; ?>>
|
||||
<a href="<?php echo $this->generateUrl('commands'); ?>"><i class="fa fa-fw fa-terminal"></i> Commandes</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="javascript:;" data-toggle="collapse" data-target="#repertoire"><i class="fa fa-fw fa-book"></i> Répertoire <i class="fa fa-fw fa-caret-down"></i></a>
|
||||
<ul id="repertoire" class="collapse">
|
||||
<li <?php echo $page == 'contacts' ? 'class="active"' : ''; ?>>
|
||||
<a href="<?php echo $this->generateUrl('contacts'); ?>"><i class="fa fa-fw fa-user"></i> Contacts</a>
|
||||
</li>
|
||||
<li <?php echo $page == 'groups' ? 'class="active"' : ''; ?>>
|
||||
<a href="<?php echo $this->generateUrl('groups'); ?>"><i class="fa fa-fw fa-group"></i> Groupes</a>
|
||||
</li>
|
||||
</ul>
|
||||
</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">
|
||||
<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>
|
||||
<li <?php echo $page == 'receiveds' ? 'class="active"' : ''; ?>>
|
||||
<a href="<?php echo $this->generateUrl('receiveds'); ?>"><i class="fa fa-fw fa-download"></i> SMS reçus</a>
|
||||
</li>
|
||||
<li <?php echo $page == 'events' ? 'class="active"' : ''; ?>>
|
||||
<a href="<?php echo $this->generateUrl('events'); ?>"><i class="fa fa-fw fa-clock-o"></i> Évènements</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li <?php echo $page == 'users' ? 'class="active"' : ''; ?>>
|
||||
<a href="<?php echo $this->generateUrl('users'); ?>"><i class="fa fa-fw fa-user"></i> Utilisateurs</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- /.navbar-collapse -->
|
||||
</nav>
|
131
templates/profile.php
Executable file
131
templates/profile.php
Executable file
|
@ -0,0 +1,131 @@
|
|||
<?php
|
||||
//Template dashboard
|
||||
$incs = new internalIncs();
|
||||
$incs->head('Profile - Show');
|
||||
?>
|
||||
<div id="wrapper">
|
||||
<?php
|
||||
$incs->nav();
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<div class="container-fluid">
|
||||
<!-- Page Heading -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
Dashboard <small>Profil</small>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-dashboard"></i> <a href="<?php echo $this->generateUrl('dashboard'); ?>">Dashboard</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-user"></i> Profil
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-user fa-fw"></i> Mon profil</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title"><i class="fa fa-child fa-fw"></i> Mes données</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<strong>Adresse e-mail :</strong> <?php secho($_SESSION['email']); ?><br/>
|
||||
<strong>Niveau administrateur :</strong> <?php echo $_SESSION['admin'] ? 'Oui' : 'Non'; ?><br/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title"><i class="fa fa-key fa-fw"></i> Modifier mot de passe</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="<?php echo $this->generateUrl('profile', 'changePassword'); ?>" method="POST">
|
||||
<div class="form-group">
|
||||
<label>Mot de passe :</label>
|
||||
<input name="password" type="password" class="form-control" placeholder="Nouveau mot de passe" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Vérification mot de passe :</label>
|
||||
<input name="verif_password" type="password" class="form-control" placeholder="Retapez le mot de passe" />
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<button class="btn btn-success">Mettre à jour les données</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title"><i class="fa fa-at fa-fw"></i> Modifier e-mail</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="<?php echo $this->generateUrl('profile', 'changeEmail'); ?>" method="POST">
|
||||
<div class="form-group">
|
||||
<label>Adresse e-mail :</label>
|
||||
<input name="mail" type="email" class="form-control" placeholder="Nouvelle adresse e-mail" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Vérification e-mail :</label>
|
||||
<input name="verif_mail" type="email" class="form-control" placeholder="Retapez l'adresse e-mail" />
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<button class="btn btn-success">Mettre à jour les données</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title"><i class="fa fa-delete fa-fw"></i> Supprimer ce compte</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="<?php echo $this->generateUrl('profile', 'delete'); ?>" method="POST">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input name="delete_account" type="checkbox" value="1" /> Je suis totalement sûr de vouloir supprimer ce compte
|
||||
</label>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<button class="btn btn-danger">Supprimer ce compte</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</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 += '/users' + jQuery(this).val() + '_' + jQuery(this).val();
|
||||
});
|
||||
window.location = url;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
$incs->footer();
|
97
templates/receiveds.php
Executable file
97
templates/receiveds.php
Executable file
|
@ -0,0 +1,97 @@
|
|||
<?php
|
||||
//Template dashboard
|
||||
$incs = new internalIncs();
|
||||
$incs->head('Receiveds - Show All');
|
||||
?>
|
||||
<div id="wrapper">
|
||||
<?php
|
||||
$incs->nav('receiveds');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<div class="container-fluid">
|
||||
<!-- Page Heading -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
Dashboard <small>SMS reçus</small>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-dashboard"></i> <a href="<?php echo $this->generateUrl('dashboard'); ?>">Dashboard</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-download "></i> SMS reçus
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-download fa-fw"></i> Liste des SMS reçus</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="table-receiveds">
|
||||
<table class="table table-bordered table-hover table-striped" id="table-receiveds">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Numéro</th>
|
||||
<th>Message</th>
|
||||
<th>Date</th>
|
||||
<th>Commande</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach ($receiveds as $received)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td><?php secho($received['id']); ?></td>
|
||||
<td><?php secho($received['send_by']); ?></td>
|
||||
<td><?php secho($received['content']); ?></td>
|
||||
<td><?php secho($received['at']); ?></td>
|
||||
<td><?php echo $received['is_command'] ? 'Oui' : 'Non'; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<nav>
|
||||
<ul class="pager">
|
||||
<?php
|
||||
if ($page)
|
||||
{
|
||||
?>
|
||||
<li><a href="<?php echo $this->generateUrl('receiveds', 'showAll', array('page' => $page - 1)); ?>"><span aria-hidden="true">←</span> Précèdents</a></li>
|
||||
<?php
|
||||
}
|
||||
|
||||
$numero_page = 'Page : ' . ($page + 1);
|
||||
secho($numero_page);
|
||||
|
||||
if ($limit == $nbResults)
|
||||
{
|
||||
?>
|
||||
<li><a href="<?php echo $this->generateUrl('receiveds', 'showAll', array('page' => $page + 1)); ?>">Suivants <span aria-hidden="true">→</span></a></li>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$incs->footer();
|
104
templates/scheduleds.php
Executable file
104
templates/scheduleds.php
Executable file
|
@ -0,0 +1,104 @@
|
|||
<?php
|
||||
//Template dashboard
|
||||
$incs = new internalIncs();
|
||||
$incs->head('Scheduleds - Show All');
|
||||
?>
|
||||
<div id="wrapper">
|
||||
<?php
|
||||
$incs->nav('scheduleds');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<div class="container-fluid">
|
||||
<!-- Page Heading -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
Dashboard <small>Scheduleds</small>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-dashboard"></i> <a href="<?php echo $this->generateUrl('dashboard'); ?>">Dashboard</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-calendar"></i> Scheduleds
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-calendar fa-fw"></i> Liste des SMS programmés</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover table-striped" id="table-scheduleds">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Date</th>
|
||||
<th>Contenu</th>
|
||||
<th style="width:5%;">Sélectionner</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach ($scheduleds as $scheduled)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td><?php secho($scheduled['id']); ?></td>
|
||||
<td><?php secho($scheduled['at']); ?></td>
|
||||
<td><?php secho($scheduled['content']); ?>...</td>
|
||||
<td><input type="checkbox" value="<?php secho($scheduled['id']); ?>"></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
<div class="col-xs-6 no-padding">
|
||||
<a class="btn btn-success" href="<?php echo $this->generateUrl('scheduleds', 'add'); ?>"><span class="fa fa-plus"></span> Ajouter un SMS programmé</a>
|
||||
</div>
|
||||
<div class="text-right col-xs-6 no-padding">
|
||||
<strong>Action groupée :</strong>
|
||||
<div class="btn-group action-dropdown" target="#table-scheduleds">
|
||||
<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('scheduleds', 'edit'); ?>"><span class="fa fa-edit"></span> Modifier</a></li>
|
||||
<li><a href="<?php echo $this->generateUrl('scheduleds', 'delete', array('csrf' => $_SESSION['csrf'])); ?>"><span class="fa fa-trash-o"></span> Supprimer</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</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 += '/scheduleds' + jQuery(this).val() + '_' + jQuery(this).val();
|
||||
});
|
||||
window.location = url;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
$incs->footer();
|
95
templates/sendeds.php
Executable file
95
templates/sendeds.php
Executable file
|
@ -0,0 +1,95 @@
|
|||
<?php
|
||||
//Template dashboard
|
||||
$incs = new internalIncs();
|
||||
$incs->head('Sendeds - Show All');
|
||||
?>
|
||||
<div id="wrapper">
|
||||
<?php
|
||||
$incs->nav('sendeds');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<div class="container-fluid">
|
||||
<!-- Page Heading -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
Dashboard <small>SMS envoyés</small>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-dashboard"></i> <a href="<?php echo $this->generateUrl('dashboard'); ?>">Dashboard</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-send"></i> SMS envoyés
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-send fa-fw"></i> Liste des SMS envoyés</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="table-sendeds">
|
||||
<table class="table table-bordered table-hover table-striped" id="table-sendeds">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Numéro</th>
|
||||
<th>Message</th>
|
||||
<th>Date</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach ($sendeds as $send)
|
||||
{
|
||||
?>
|
||||
<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>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<nav>
|
||||
<ul class="pager">
|
||||
<?php
|
||||
if ($page)
|
||||
{
|
||||
?>
|
||||
<li><a href="<?php echo $this->generateUrl('sendeds', 'showAll', array('page' => $page - 1)); ?>"><span aria-hidden="true">←</span> Précèdents</a></li>
|
||||
<?php
|
||||
}
|
||||
|
||||
$numero_page = 'Page : ' . ($page + 1);
|
||||
secho($numero_page);
|
||||
|
||||
if ($limit == $nbResults)
|
||||
{
|
||||
?>
|
||||
<li><a href="<?php echo $this->generateUrl('sendeds', 'showAll', array('page' => $page + 1)); ?>">Suivants <span aria-hidden="true">→</span></a></li>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$incs->footer();
|
103
templates/users.php
Executable file
103
templates/users.php
Executable file
|
@ -0,0 +1,103 @@
|
|||
<?php
|
||||
//Template dashboard
|
||||
$incs = new internalIncs();
|
||||
$incs->head('Users - Show All');
|
||||
?>
|
||||
<div id="wrapper">
|
||||
<?php
|
||||
$incs->nav('users');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<div class="container-fluid">
|
||||
<!-- Page Heading -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
Dashboard <small>Utilisateurs</small>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-dashboard"></i> <a href="<?php echo $this->generateUrl('dashboard'); ?>">Dashboard</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-user"></i> Utilisateurs
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-user fa-fw"></i> Liste des utilisateurs</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover table-striped" id="table-users">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Email</th>
|
||||
<th>Admin</th>
|
||||
<th style="width:5%;">Sélectionner</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach ($users as $user)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td><?php secho($user['id']); ?></td>
|
||||
<td><?php secho($user['email']); ?></td>
|
||||
<td><?php secho($user['admin']); ?></td>
|
||||
<td><input type="checkbox" value="<?php secho($user['id']); ?>"></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
<div class="col-xs-6 no-padding">
|
||||
<a class="btn btn-success" href="<?php echo $this->generateUrl('users', 'add'); ?>"><span class="fa fa-plus"></span> Ajouter un utilisateur</a>
|
||||
</div>
|
||||
<div class="text-right col-xs-6 no-padding">
|
||||
<strong>Action groupée :</strong>
|
||||
<div class="btn-group action-dropdown" target="#table-users">
|
||||
<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('users', 'delete', array('csrf' => $_SESSION['csrf'])); ?>"><span class="fa fa-trash-o"></span> Supprimer</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</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 += '/users' + jQuery(this).val() + '_' + jQuery(this).val();
|
||||
});
|
||||
window.location = url;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
$incs->footer();
|
Loading…
Add table
Add a link
Reference in a new issue