| Current Path : /home/h/a/p/happyrenas/old/happy-and-pay.fr/administration/templates/admin3/ |
Linux webd005.cluster105.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 |
| Current File : /home/h/a/p/happyrenas/old/happy-and-pay.fr/administration/templates/admin3/index.php |
<?
session_start();
include("config.php");
$page="index";
?>
<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="fr" class="no-js">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
<meta charset="utf-8"/>
<title>ADMINISTRATION HAPPY RENTALS</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1" name="viewport"/>
<meta content="" name="description"/>
<meta content="" name="author"/>
<!-- BEGIN GLOBAL MANDATORY STYLES -->
<link href="http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700&subset=all" rel="stylesheet" type="text/css"/>
<link href="../../assets/global/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
<link href="../../assets/global/plugins/simple-line-icons/simple-line-icons.min.css" rel="stylesheet" type="text/css"/>
<link href="../../assets/global/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
<link href="../../assets/global/plugins/uniform/css/uniform.default.css" rel="stylesheet" type="text/css"/>
<link href="../../assets/global/plugins/bootstrap-switch/css/bootstrap-switch.min.css" rel="stylesheet" type="text/css"/>
<!-- END GLOBAL MANDATORY STYLES -->
<!-- BEGIN PAGE LEVEL PLUGIN STYLES -->
<link href="../../assets/global/plugins/bootstrap-daterangepicker/daterangepicker-bs3.css" rel="stylesheet" type="text/css"/>
<link href="../../assets/global/plugins/fullcalendar/fullcalendar.min.css" rel="stylesheet" type="text/css"/>
<link href="../../assets/global/plugins/jqvmap/jqvmap/jqvmap.css" rel="stylesheet" type="text/css"/>
<!-- END PAGE LEVEL PLUGIN STYLES -->
<!-- BEGIN PAGE STYLES -->
<link href="../../assets/admin/pages/css/tasks.css" rel="stylesheet" type="text/css"/>
<!-- END PAGE STYLES -->
<!-- BEGIN THEME STYLES -->
<link href="../../assets/global/css/components.css" rel="stylesheet" type="text/css"/>
<link href="../../assets/global/css/plugins.css" rel="stylesheet" type="text/css"/>
<link href="../../assets/admin/layout2/css/layout.css" rel="stylesheet" type="text/css"/>
<link href="../../assets/admin/layout2/css/themes/grey.css" rel="stylesheet" type="text/css" id="style_color"/>
<link href="../../assets/admin/layout2/css/custom.css" rel="stylesheet" type="text/css"/>
<!-- END THEME STYLES -->
<link rel="shortcut icon" href="favicon.ico"/>
</head>
<!-- END HEAD -->
<!-- BEGIN BODY -->
<!-- DOC: Apply "page-header-fixed-mobile" and "page-footer-fixed-mobile" class to body element to force fixed header or footer in mobile devices -->
<!-- DOC: Apply "page-sidebar-closed" class to the body and "page-sidebar-menu-closed" class to the sidebar menu element to hide the sidebar by default -->
<!-- DOC: Apply "page-sidebar-hide" class to the body to make the sidebar completely hidden on toggle -->
<!-- DOC: Apply "page-sidebar-closed-hide-logo" class to the body element to make the logo hidden on sidebar toggle -->
<!-- DOC: Apply "page-sidebar-hide" class to body element to completely hide the sidebar on sidebar toggle -->
<!-- DOC: Apply "page-sidebar-fixed" class to have fixed sidebar -->
<!-- DOC: Apply "page-footer-fixed" class to the body element to have fixed footer -->
<!-- DOC: Apply "page-sidebar-reversed" class to put the sidebar on the right side -->
<!-- DOC: Apply "page-full-width" class to the body element to have full width page without the sidebar menu -->
<body class="page-boxed page-header-fixed page-sidebar-closed-hide-logo page-container-bg-solid page-sidebar-closed-hide-logo">
<!-- BEGIN HEADER -->
<?include("header_top.php");?>
<!-- END HEADER -->
<div class="clearfix">
</div>
<!-- BEGIN CONTAINER -->
<div class="container">
<div class="page-container">
<!-- BEGIN SIDEBAR -->
<div class="page-sidebar-wrapper">
<!-- DOC: Set data-auto-scroll="false" to disable the sidebar from auto scrolling/focusing -->
<!-- DOC: Change data-auto-speed="200" to adjust the sub menu slide up/down speed -->
<div class="page-sidebar navbar-collapse collapse">
<?include("header_left.php");?>
</div>
</div>
<!-- END SIDEBAR -->
<!-- BEGIN CONTENT -->
<div class="page-content-wrapper">
<div class="page-content">
<!-- BEGIN SAMPLE PORTLET CONFIGURATION MODAL FORM-->
<!-- /.modal -->
<!-- END SAMPLE PORTLET CONFIGURATION MODAL FORM-->
<!-- BEGIN PAGE HEADER-->
<h3 class="page-title">
Tableau de bord</h3>
<div class="page-bar">
<ul class="page-breadcrumb">
<li>
<i class="fa fa-home"></i>
<a href="index.php">Accueil</a>
<i class="fa fa-angle-right"></i>
</li>
<li>
<a href="#">Tableau de bord</a>
</li>
</ul>
</div>
<!-- END PAGE HEADER-->
<?// CLIENTS //?>
<div class="row">
<div class="col-md-12">
<?
$table_class="table table-striped table-bordered table-advance table-hover";
$ordre_client= $_REQUEST['ordre_client'];
if (!$ordre_client){$ordre_client="id desc";}
$myquery = "SELECT * from client where 1 order by ".$ordre_client;
$myquery_calls = $db->get_results($myquery);
$num = $db->num_rows;
?>
<div class="portlet box blue-steel">
<div class="portlet-title">
<div class="caption">
<i class="fa fa-cogs"></i>Liste des <?echo $num;?> clients.
</div>
<div class="tools">
<a href="javascript:;" onclick='location.reload(true); return false;' class="reload">
</a>
</div>
</div>
<div class="portlet-body">
<div class="table-scrollable">
<table class="table table-bordered table-striped table-condensed flip-content">
<thead>
<tr>
<th width="1px"> </th>
<th width="30%">Nom <a href="index.php?ordre_client=nom"> <i class="fa fa-caret<?if ($ordre_client=="nom") {echo "-square-o";}?>-down"></i></a></th>
<th width="10%">Ville<a href="index.php?ordre_client=ville"> <i class="fa fa-caret<?if ($ordre_client=="ville") {echo "-square-o";}?>-down"></i></a></th>
<th width="30%">Mail <a href="index.php?ordre_client=mail"> <i class="fa fa-caret<?if ($ordre_client=="mail") {echo "-square-o";}?>-down"></i></a></th>
<th width="10px">Statut <a href="index.php?ordre_client=statut"> <i class="fa fa-caret<?if ($ordre_client=="statut") {echo "-square-o";}?>-down"></i></a></th>
<th width="15px">Date <a href="index.php?ordre_client=date_creation"> <i class="fa fa-caret<?if ($ordre_client=="date_creation") {echo "-square-o";}?>-down"></i></a></th>
<th width="5px">Nb Rés.</th>
</tr>
</thead>
<tbody>
<?
if (!empty($myquery_calls))
{
foreach ( $myquery_calls as $client )
{
$compteur=$compteur+1;
$num_resa = $db->get_var("select count(id) from client_reservation where client_id = ".$client->id);
?>
<tr>
<td></td>
<td><a data-toggle="modal" data-target="#myModal_client<?echo $compteur;?>_1" href="fiche_client.php?client_id=<?echo $client->id;?>"><?echo $client->nom;?> <?echo $client->prenom;?></a></td>
<td><a data-toggle="modal" data-target="#myModal_client<?echo $compteur;?>_1" href="fiche_client.php?client_id=<?echo $client->id;?>"><?echo $client->ville;?></a></td>
<td><a data-toggle="modal" data-target="#myModal_client<?echo $compteur;?>_1" href="fiche_client.php?client_id=<?echo $client->id;?>"><?echo $client->mail;?></a></td>
<td>
<?
if ($client->statut==1) {echo "<span class='label label-sm label-success'>ACTIF</span>";}
if ($client->statut==2) {echo "<span class='label label-sm label-warning'>-</span>";}
?>
</td>
<td><a data-toggle="modal" data-target="#myModal_client<?echo $compteur;?>_1" href="fiche_client.php?client_id=<?echo $client->id;?>"><?echo date("d-m-Y", strtotime($client->date_creation));?></a></td>
<td align="center"><b><?echo $num_resa;?></b></td>
</tr>
<?
}
}
?>
</tbody>
</table>
<?
for ($i = 1; $i <= $compteur; $i++) {
?>
<!-- Modal -->
<div class="modal fade" id="myModal_client<?echo $i;?>_1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">FICHE CLIENT</h4>
</div>
<div class="modal-body"><div class="te"></div></div>
<div class="modal-footer">
<button type="button" class="btn default" onclick="javascript:window.location.reload()" data-dismiss="modal" >Fermer</button>
</div>
</div>
</div>
</div>
<?}?>
</div>
</div>
</div>
<!-- END SAMPLE TABLE PORTLET-->
</div>
</div>
<?// RESERVATIONS //?>
<div class="row">
<div class="col-md-12">
<?
$table_class="table table-striped table-bordered table-advance table-hover";
$ordre_reservation= $_REQUEST['ordre_reservation'];
if (!$ordre_reservation){$ordre_reservation="id DESC";}
$myquery = "SELECT * from client_reservation where 1 order by ".$ordre_reservation;
$myquery_calls = $db->get_results($myquery);
$num = $db->num_rows;
$compteur=0;
?>
<div class="portlet box blue-steel">
<div class="portlet-title">
<div class="caption">
<i class="fa fa-cogs"></i>Liste des <?echo $num;?> réservations.
</div>
<div class="tools">
<a href="javascript:;" onclick='location.reload(true); return false;' class="reload">
</a>
</div>
</div>
<div class="portlet-body">
<div class="table-scrollable">
<table class="table table-bordered table-striped table-condensed flip-content">
<thead>
<tr>
<th width="1px"> </th>
<th width="20%">Client <a href="index.php?ordre_reservation=nom"> <i class="fa fa-caret<?if ($ordre_reservation=="nom") {echo "-square-o";}?>-down"></i></a></th>
<th width="10%">Début<a href="index.php?ordre_reservation=ville"> <i class="fa fa-caret<?if ($ordre_reservation=="ville") {echo "-square-o";}?>-down"></i></a></th>
<th width="10%">Fin <a href="index.php?ordre_reservation=mail"> <i class="fa fa-caret<?if ($ordre_reservation=="mail") {echo "-square-o";}?>-down"></i></a></th>
<th width="10%">Mail proprietaire <a href="index.php?ordre_reservation=mail"> <i class="fa fa-caret<?if ($ordre_reservation=="mail") {echo "-square-o";}?>-down"></i></a></th>
<th width="5%">Montant <a href="index.php?ordre_reservation=mail"> <i class="fa fa-caret<?if ($ordre_reservation=="mail") {echo "-square-o";}?>-down"></i></a></th>
<th width="5%">Paiement</th>
<th width="50px;">Date <a href="index.php?ordre_reservation=date_creation"> <i class="fa fa-caret<?if ($ordre_reservation=="date_creation") {echo "-square-o";}?>-down"></i></a></th>
<th width="1px"> </th>
<th width="1px">CGV</th>
<th width="1px">Remb</th>
</tr>
</thead>
<tbody>
<?
if (!empty($myquery_calls))
{
foreach ( $myquery_calls as $reservation )
{
if ($reservation->paiement_type==1) {$paiement_type_affiche="A";}
if ($reservation->paiement_type==2) {$paiement_type_affiche="S";}
$compteur=$compteur+1;
$myquery = "SELECT id,nom,prenom from client where id=".$reservation->client_id;
$client = $db->get_row($myquery);
$couleur="";
$payment_id="";
if ($reservation->statut==4 && $reservation->payment_id)
{
$couleur=" style ='background-color:#90D4B1' ";
$payment_id=$reservation->payment_id;
}
if ($reservation->remboursement_id)
{
$couleur=" style ='background-color:#F4A693' ";
$payment_id=$reservation->payment_id;
}
?>
<tr>
<td <?echo $couleur;?>><?echo $paiement_type_affiche;?></td>
<td <?echo $couleur;?>><a data-toggle="modal" data-target="#myModal_reservation<?echo $compteur;?>_1" href="fiche_reservation.php?reservation_id=<?echo $reservation->id;?>&client_id=<?echo $client->id;?>"><?echo $client->nom;?> <?echo $client->prenom;?></a></td>
<td <?echo $couleur;?>><a data-toggle="modal" data-target="#myModal_reservation<?echo $compteur;?>_1" href="fiche_reservation.php?reservation_id=<?echo $reservation->id;?>"><?echo date("d-m-Y", strtotime($reservation->date_debut));?></a></td>
<td <?echo $couleur;?>><a data-toggle="modal" data-target="#myModal_reservation<?echo $compteur;?>_1" href="fiche_reservation.php?reservation_id=<?echo $reservation->id;?>"><?echo date("d-m-Y", strtotime($reservation->date_fin));?></a></td>
<td <?echo $couleur;?>><a data-toggle="modal" data-target="#myModal_reservation<?echo $compteur;?>_1" href="fiche_reservation.php?reservation_id=<?echo $reservation->id;?>"><?echo $reservation->proprietaire_mail;?></a></td>
<td <?echo $couleur;?>><a data-toggle="modal" data-target="#myModal_reservation<?echo $compteur;?>_1" href="fiche_reservation.php?reservation_id=<?echo $reservation->id;?>"><?echo $reservation->montant;?></a></td>
<td <?echo $couleur;?> width="1px"><?echo $payment_id;?></th>
<td <?echo $couleur;?>><a data-toggle="modal" data-target="#myModal_reservation<?echo $compteur;?>_1" href="fiche_reservation.php?reservation_id=<?echo $reservation->id;?>"><?echo date("d-m-Y", strtotime($reservation->date_creation));?></a></td>
<td align="center" <?echo $couleur;?> width="1px">
<?if ($payment_id) {?>
<a href="proprio_ajout.php?proprietaire_mail=<?echo $reservation->proprietaire_mail;?>&reservation_id=<?echo $reservation->id;?>"><i class="fa fa-user"></i>
<?}?>
</td>
<td align="center" <?echo $couleur;?> width="1px">
<?if ($payment_id && $reservation->cgv=="") {echo "-";}?>
<?if ($payment_id && $reservation->cgv=="0") {echo "-";}?>
<?if ($payment_id && $reservation->cgv=="1") {echo "OUI";}?>
<?if ($payment_id && $reservation->cgv=="2") {echo "NON";}?>
</td>
<td align="center" <?echo $couleur;?> width="1px">
<?if ($payment_id && $paiement_type_affiche=="A" && !$reservation->remboursement_id) {?>
<a href="fiche_remboursement.php?proprietaire_mail=<?echo $reservation->proprietaire_mail;?>&reservation_id=<?echo $reservation->id;?>"><i class="fa fa-history"></i>
<?}?>
<?if ($reservation->remboursement_id) {?>
<?echo $reservation->remboursement_id;?>
<?}?>
</td>
</tr>
<?
}
}
?>
</tbody>
</table>
<?
for ($i = 1; $i <= $compteur; $i++) {
?>
<!-- Modal -->
<div class="modal fade" id="myModal_reservation<?echo $i;?>_1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">FICHE RESERAVTION</h4>
</div>
<div class="modal-body"><div class="te"></div></div>
<div class="modal-footer">
<button type="button" class="btn default" onclick="javascript:window.location.reload()" data-dismiss="modal" >Fermer</button>
</div>
</div>
</div>
</div>
<?}?>
</div>
</div>
</div>
<!-- END SAMPLE TABLE PORTLET-->
</div>
</div>
<?include("footer.php");?>