Exemplo n.º 1
0
		if(!empty($_GET['fic'])) $zFic = $_GET['fic'];
		CTableMoultmp::deletes($zFic);
		CFunction::redirection("moulinette.php?a=0");
	break;

case 4 : // Ajouter 1
	break;
		
case 44 : // Ajouter 2
		$zNameFile = $_FILES['file']['name'];
		$name = substr($zNameFile,0,strlen($zNameFile)-4);
		CTableMoulListe::insert($name,$zNameFile);
		$iIdFic = CTableMoulListe::get_max_id();
		
		$url_file = CFile::upload_file($_FILES['file'], $url_dest, FALSE, TRUE);
		$oDataCsv  =  new CCsv($url_file,';');
		$arr_titre_champ = $oDataCsv->get_titles();
		$ttzDatas =$oDataCsv->get_data();
		
		foreach ($ttzDatas as $iKey=>$tzDatas)
		{
			$test = 0;
			for($i = 0; $i<$count; $i++){
				if($tzDatas[0] == $testDoublement[$i]['mtp_zMail']) {
					$test += 1;
				}
			}
			if($test == 0){
				CTableMoultmp::insert($tzDatas[0],$iIdFic['idmax']);
			}
		}
Exemplo n.º 2
0
	}
	
	$separateur = ($_REQUEST['separateur']=='PNT') 	? ';' 	: ',';
	
	$csv = new CCsv($url_file, $separateur);
	$arr_titre_champ = $csv->get_titles();
	break;
	
case 2 : // Syncro
	
	$separateur = ($_REQUEST['separateur']=='PNT') 	? ';' 	: ',';
	
	$url_file 	= !empty($_REQUEST['url_file']) 	? $_REQUEST['url_file'] 	: "";
	$id_groupe 	= !empty($_REQUEST['id_groupe']) 	? $_REQUEST['id_groupe'] 	: "0";
	
	$csv = new CCsv($url_file, $separateur);
	$data =$csv->get_data();
	
	$tab_user = array();
	
	array_shift($data);
	
	foreach($data as $key=>$row) {
		$civilite 	= $row[$_REQUEST['civilite']];
		$nom 		= $row[$_REQUEST['nom']];
		$prenom 	= $row[$_REQUEST['prenom']];
		$societe	= $row[$_REQUEST['societe']];
		$adresse 	= $row[$_REQUEST['adresse']];
		$cp 		= $row[$_REQUEST['cp']];
		$ville 		= $row[$_REQUEST['ville']];
		$email 		= $row[$_REQUEST['email']];