1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
| <?
include ("../inc/fonctions/db_connect.inc.php4");
if($_POST["action"]=='suite')
{
echo 'toto';
if($_FILES["file"]["tmp_name"]!=""){
if(file_exists('../download/import_sport.txt'))
{
echo 'on supprime';
unlink('../download/import_sport.txt');
}
move_uploaded_file($_FILES["file"]["tmp_name"],'../download/import_sport.txt');
$req="SELECT max(id_organisateur) as maxi FROM organisateur ";
$res=executeMySqlQuery($req,$cle);
$row=mysql_fetch_array($res);
$new_id=$row["maxi"]+1;
$ligne=file('../download/import_sport.txt');
if($_POST["entete"]==1){$i=1;}else{$i=0;}
$j=0;
$req="SELECT id_organisateur FROM organisateur WHERE id_theme='1'";
$res=executeMySqlQuery($req,$cle);
while($row=mysql_fetch_array($res))
{
$in.=$row["id_organisateur"].",";
}
$in=substr($in,0,-1);
}
}
?> |
Partager