AnonSec Team
Server IP : 10.128.40.6  /  Your IP : 216.73.216.233
Web Server : Apache
System : Linux webd006.cluster128.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User : logmcpe ( 111175)
PHP Version : 7.3.33
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home/logmcpe/www/TEST/../TMCPRO/pages/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/logmcpe/www/TEST/../TMCPRO/pages/rendez-vous-new.php
<?php
include 'includes/config_tmcpro.php' ;
include 'includes/stable_functions_tmcpro.php' ;
 
if(isset($_POST["title"]))
{
	// echonnn "<pre>";
	// print_r($_POST);
	
	// echo "</pre>";
	if(isset($_POST['startmodal'] ))
$_POST['start'] =  date('Y-m-d', strtotime($_POST['startmodal'])); 
$user_ide =  $_SESSION['MCPRO']['user_id']  ; 
$start = $_POST['start'].' '. $_POST['Hdeb'].':00';
$end   = $_POST['start'].' '. $_POST['Hfin'].':00';
 $query = "
 INSERT INTO events 
 (title, start_event, end_event,user_id,description,event_type) 
 VALUES ('".$_POST['title']."', '".$start."', '".$end."',$user_ide , '".$_POST['description']."', '".$_POST['event_type']."')";
 
 dbi_query($query);
}


$annee = $year = date('Y');
$mois = $month = date('m');


$months = array(
     1 => 'Janvier',
     2 => 'Février',
     3 => 'Mars',
     4 => 'Avril',
     5 => 'Mai',
     6 => 'Juin',
     7 => 'Juillet',
     8 => 'Août',
     9=> 'Septembre',
    10=> 'Octobre',
    11 => 'Novembre',
    12 => 'Décembre'
);
/**
from events_type

events_type_id`, `events_type

function GET_TYPE_EVENETS ($name = '', $param = '',$value =1)
{
	if(!is_array($value))
		$value = array($value) ;
	$tab = array(10 => 'Viste medicale', 11 => 'Entretien',  12 => 'Autre ');
	$ret = "<select name=\"$name\" $param>";
	foreach ($tab as $key => $val) {
	$ret .= sprintf('<option value="%s"%s>%s </option>', $key, in_array($key , $value) ? ' selected' : '', $val) ;
	}
	return $ret."</select>" ;
}
*/
?>
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>LogMCPRO | RDV</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="../plugins/fontawesome-free/css/all.min.css">
  <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
  
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.4.0/fullcalendar.css" />
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.6/css/bootstrap.css" />
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.4.0/fullcalendar.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/fullcalendar@3.4.0/dist/locale-all.min.js"></script>
  
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>


  <link rel="stylesheet" href="../dist/css/adminlte.min.css">
  <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
     
 <style>
.myCollapse {
    display: none;
}
.myCollapse.in {
    display: block;
}
  .modal-header {
    padding: 15px;
    border-bottom: 1px solid #e5e5e5;
}
  .modal-header {
    background: #226faa;
    background: -webkit-gradient(linear,left top,right top,from(#226faa),color-stop(37%,#2989d8),to(#72c0d3));
    background: linear-gradient(to right,#226faa 0,#2989d8 37%,#72c0d3 100%);
    border-radius: 6px;
    color: #fff;
    padding: 18px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-color: transparent;
}

.modal-header .close {
    margin-top: -3px;
    font-size: 24px;
    font-weight: 400;
    color: #fff;
    opacity: .9;
    width: 28px;
    height: 28px;
    padding-bottom: 0;
    padding-left: 1px;
}
button.close {
    padding: 0;
    cursor: pointer;
    background: 0 0;
    border: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}


;
  </style>
</head>
<body class="hold-transition sidebar-mini">
<div class="wrapper">
<!-- TOP MENU -->
  <nav class="main-header navbar navbar-expand navbar-white navbar-light">
    <ul class="navbar-nav">
		<li class="nav-item">
			<a class="nav-link" data-widget="pushmenu" href="#"><i class="fas fa-bars"></i></a>
		</li>
		<li>
            <h3><button type="button" class="btn btn-info" data-toggle="modal" data-target="#modal-nouvelle"> NOUVEAU RENDEZ-VOUS</button></h3>
		</li>

		
	
    </ul>

    <ul class="navbar-nav ml-auto">
    </ul>
  
  </nav>

<?php include('menu.php'); ?>

<!--Add event modal-->

	<div class="content-wrapper">
	



<!-- Modal -->
<div class="modal fade" id="modal-nouvelle" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel">Ajouter rendez-vous</h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
	  
	  <form action="" method="POST">

		<input type="hidden" name="start" id="start" value="">	
		<div class="form-row">
			<div class="form-group col-md-12">
				<label for="inputAddresse">Date Rendez-vous :</label>
				<input type="date" class="form-control" id="startmodal" name="startmodal" placeholder="jj/mm/aaaa"/>
			</div>
		</div>
		
		<div class="form-row">
			<div class="form-group col-md-12">
				<label for="inputAddresse">Titre :</label>
				<input class="form-control" type="text" rows="2" placeholder="" name= "title">
			</div>
		</div>
	  
		<div class="form-row">
			<div class="form-group col-md-12">
				<label for="inputAddresse">Type : </label>
				<select class="form-control select2" style="width: 100%;" name="event_type" id="event_type">
					<?php   $req =dbi_query("SELECT * FROM events_type ") ;
							while(  $sal=dbi_fetch_row($req)) { ?>
							<option value="<?php echo $sal['events_type_id'] ; ?>"  ><?php echo $sal['events_type']; ?></option>
					<?php   }	?>
				</select>
			</div>
		</div>
	  
	  
		<div class="form-row">
			<div class="form-group col-md-12">
				<label for="inputAddresse">Description :</label>
				<textarea class="form-control" type="text" rows="2" placeholder="" name= "description"></textarea>
			</div>
		</div>
	  
		<div class="form-row">
			<div class="form-group col-md-6">
				<label for="inputAddresse">Heure Début :</label>
				<input type="time" id="appt" min="05:00" max="22:00" class="form-control" name="Hdeb" value="" required="">
			</div>

			<div class="form-group col-md-6">
			  <label for="inputsociete">Heure  fin :</label>
			  <input type="time" id="appt" min="05:00" max="22:00" class="form-control" name="Hfin" value="" required="">
			</div>
		</div>
		

	 
	  
      </div>
      <div class="modal-footer">
        <button type="submit" class="btn btn-primary">Enregistrer</button>
      </div>
	  </form>
    </div>
  </div>
</div>



<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel">Ajouter rendez-vous</h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
	  
	  <form action="" method="POST">
		<input type="hidden" name="start" id="start" value="">
	  
		<div class="form-row">
			<div class="form-group col-md-12">
				<label for="inputAddresse">Titre :</label>
				<input class="form-control" type="text" rows="2" placeholder="" name= "title">
			</div>
		</div>
	  
		<div class="form-row">
			<div class="form-group col-md-12">
				<label for="inputAddresse">Type : </label>
				<select class="form-control select2" style="width: 100%;" name="event_type" id="event_type">
					<?php   $req =dbi_query("SELECT * FROM events_type ") ;
							while(  $sal=dbi_fetch_row($req)) { ?>
							<option value="<?php echo $sal['events_type_id'] ; ?>"  ><?php echo $sal['events_type']; ?></option>
					<?php   }	?>
				</select>
			</div>
		</div>
	  
	  
		<div class="form-row">
			<div class="form-group col-md-12">
				<label for="inputAddresse">Description :</label>
				<textarea class="form-control" type="text" rows="2" placeholder="" name= "description"></textarea>
			</div>
		</div>
	  
		<div class="form-row">
			<div class="form-group col-md-6">
				<label for="inputAddresse">Heure Début :</label>
				<input type="time" id="appt" min="05:00" max="22:00" class="form-control" name="Hdeb" value="" required="">
			</div>

			<div class="form-group col-md-6">
			  <label for="inputsociete">Heure  fin :</label>
			  <input type="time" id="appt" min="05:00" max="22:00" class="form-control" name="Hfin" value="" required="">
			</div>
		</div>
		

	 
	  
      </div>
      <div class="modal-footer">
        <button type="submit" class="btn btn-primary">Enregistrer</button>
      </div>
	  </form>
    </div>
  </div>
</div>
		<section class="content-header">
		  <div class="container-fluid">
			<div class="row mb-2">

			  <div class="col-sm-6">
				<ol class="breadcrumb float-sm-right">
			 
				</ol>
			  </div>
			</div>
		  </div>
		</section>


		<section class="content">
			<div class="container-fluid">			
				<div class="row">
					<div class="col-md-12">
						<div class="card card-primary">	
							<div class="card-body p-20">
								<div class="d-flex flex-row justify-content-end">						
									<?php   $req =dbi_query("SELECT * FROM events_type ") ;
									while(  $sal=dbi_fetch_row($req)) { ?>
									<span class="mr-4"><i class="fas fa-square <?php echo $sal['color'] ; ?>"></i> <?php echo $sal['events_type'] ; ?></span>
									<?php   }	
									
										// echo "<pre>";
	// print_r($_POST);
	
	// echo "</pre>";
									
									?>
								</div>
								<div id="calendar"></div>
							</div>
						</div>
					</div>
				</div>
		</section>
	</div>
	  <footer class="main-footer">
		<div class="float-right d-none d-sm-block">
		  <b>Version</b> 3.0.2
		</div>
		<strong>Copyright &copy; 2022<a href="http://adminlte.io">TMCPRO</a>.</strong> All rights
		reserved.
	  </footer>

  <!-- Control Sidebar -->
  <aside class="control-sidebar control-sidebar-dark">
    <!-- Control sidebar content goes here -->
  </aside>
  <!-- /.control-sidebar -->
</div>
<!-- ./wrapper -->

  <script>
   
  $(document).ready(function() {
	 // jQuery("#PrestUpt").modal('show');
   var calendar = $('#calendar').fullCalendar({
		locale: 'fr',
        plugins: [ 'bootstrap', 'interaction', 'dayGrid', 'timeGrid' ],
		firstDay: 1,
    editable:true,
    header:{
		left:'prev,next today',
		center:'title',
		right:'month,agendaWeek,agendaDay'
    },
    events: 'event_load_new.php',
    selectable:true,
    selectHelper:true,
select: function (start, end, allDay) {
            //do something when space selected
            //Show 'add event' modal
			// var start = $.fullCalendar.formatDate(event.start, "Y-MM-DD HH:mm:ss");
			var start = $.fullCalendar.formatDate(start, "Y-MM-DD");
			document.getElementById('start').value = start;
            $('#exampleModal').modal('show');
        },
    editable:true,
    eventResize:function(event)
    {
     var start = $.fullCalendar.formatDate(event.start, "Y-MM-DD HH:mm:ss");
     var end = $.fullCalendar.formatDate(event.end, "Y-MM-DD HH:mm:ss");
     var title = event.title;
     var id = event.id;
     $.ajax({
      url:"event_update.php",
      type:"POST",
      data:{title:title, start:start, end:end, id:id},
      success:function(){
       calendar.fullCalendar('refetchEvents');
       alert("Mise à jour de l'événement");
      }
     })
    },

    eventDrop:function(event)
    {
     var start = $.fullCalendar.formatDate(event.start, "Y-MM-DD HH:mm:ss");
     var end = $.fullCalendar.formatDate(event.end, "Y-MM-DD HH:mm:ss");
     var title = event.title;
     var id = event.id;
     $.ajax({
      url:"event_update.php",
      type:"POST",
      data:{title:title, start:start, end:end, id:id},
      success:function()
      {
       calendar.fullCalendar('refetchEvents');
       alert("Événement mis à jour");
      }
     });
    },

    eventClick:function(event)
    {
     if(confirm("Êtes-vous sûr de vouloir le supprimer ?"))
     {
      var id = event.id;
      $.ajax({
       url:"event_delete.php",
       type:"POST",
       data:{id:id},
       success:function()
       {
        calendar.fullCalendar('refetchEvents');
        alert("Événement supprimé");
       }
      })
     }
    },

   });
  });
   
  </script> 


</body>
</html>

AnonSec - 2021