Suppression

This commit is contained in:
Michael RICOIS 2016-01-22 10:28:58 +00:00
parent ffcc1e5411
commit 57ac0f10eb
42 changed files with 0 additions and 23473 deletions

View File

@ -1,34 +0,0 @@
Le module APC est utile à l'upload pour la barre de progression mais pas nécessaire.
Configuration APC
[apc]
apc.enable_cli = Off
apc.enabled = On
apc.cache_by_default = Off // => Voir explication
apc.file_update_protection = 2
apc.filters =
apc.ttl = 0
apc.user_ttl = 0
apc.gc_ttl = 3600
apc.include_once_override = Off
apc.max_file_size = 1M
apc.mmap_file_mask =
apc.num_files_hint = 1000
apc.optimization = 0
apc.report_autofilter = Off
apc.shm_segments = 1
apc.shm_size = 30
apc.slam_defense = 0
apc.stat = On
apc.user_entries_hint = 100
apc.write_lock = On
apc.rfc1867 = On
Explication :
"apc.cache_by_default = Off" désactive la mise en cache bien que le module est activé
Dans un .htaccess ou dans <Directory>
php_flag apc.cache_by_default On

View File

@ -1,25 +0,0 @@
<?php
define('UPLOAD_DIR', realpath(dirname(__FILE__)).'/../files');
define('POST_MAX_SIZE', '50M');
define('UPLOAD_MAX_FILESIZE', '40M');
define('FILE_EXT', 'csv');
// Paramètres de la base de données
define ('MYSQL_HOST', '192.168.3.22');
define ('MYSQL_DB', 'fichierclient');
define ('MYSQL_USER', 'root');
define ('MYSQL_PASS', 'bzh4231*');
// Configuration PHP
$phpini_config = array(
'post_max_size' => POST_MAX_SIZE,
'upload_max_filesize' => UPLOAD_MAX_FILESIZE,
'file_uploads' => 1,
);

View File

@ -1,25 +0,0 @@
.jquery-checkbox {display: inline; font-size: 20px; line-height: 20px; cursor: pointer; cursor: hand;}
.jquery-checkbox .mark {display: inline;}
.jquery-checkbox img {vertical-align: middle; width: 60px; height: 20px;}
.jquery-checkbox img{background: transparent url(../img/checkbox.png) no-repeat;}
.jquery-checkbox img{
background-position: 0px 0px;
}
.jquery-checkbox-hover img{
background-position: 0px -20px;
}
.jquery-checkbox-checked img{
background-position: 0px -40px;
}
.jquery-checkbox-checked .jquery-checkbox-hover img {
background-position: 0px -60px;
}
.jquery-checkbox-disabled img{
background-position: 0px -80px;
}
.jquery-checkbox-checked .jquery-checkbox-disabled img{
background-position: 0px -100px;
}

View File

@ -1,25 +0,0 @@
.jquery-safari-checkbox {display: inline; font-size: 16px; line-height: 16px; cursor: pointer; cursor: hand;}
.jquery-safari-checkbox .mark {display: inline;}
.jquery-safari-checkbox img {vertical-align: middle; width: 16px; height: 16px;}
.jquery-safari-checkbox img{background: transparent url(../img/safari-checkbox.png) no-repeat;}
.jquery-safari-checkbox img{
background-position: 0px 0px;
}
.jquery-safari-checkbox-hover img{
background-position: -16px 0px;
}
.jquery-safari-checkbox-checked img{
background-position: 0px -16px;
}
.jquery-safari-checkbox-checked .jquery-safari-checkbox-hover img {
background-position: -16px -16px;
}
.jquery-safari-checkbox-disabled img{
background-position: 0px -32px;
}
.jquery-safari-checkbox-checked .jquery-safari-checkbox-disabled img{
background-position: 0px -48px;
}

View File

@ -1,5 +0,0 @@
.clearfix {
zoom: 1; /* triggers hasLayout */
} /* Only IE can see inside the conditional comment
and read this CSS rule. Don't ever use a normal HTML
comment inside the CC or it will close prematurely. */

View File

@ -1,39 +0,0 @@
body {
margin: 0; /* pour éviter les marges */
text-align: center; /* pour corriger le bug de centrage IE */
font:normal normal 0.8em Arial,Verdana,Sans-serif;
}
#container {
position:relative; /* on positionne le conteneur */
width:960px;
margin:0 auto;
text-align:left;
}
#upload { float:left; width:45%; margin:0 0 10px 0; padding:0; }
#files { float:right; width:45%; margin:0 0 10px 0; padding:0; }
#main { clear:both; width:100%; margin:10px auto 0 auto; }
#colonne {}
#colonne ul { list-style-type:none; }
#colonne ul li { float:left; display:inline; margin:5px; padding:8px; background-color:#F6A828; }
#colonne ul li span.identifiant { display:inline; margin:0 5px; padding:5px; background-color:#EEEEEE; border:1px solid #DDDDDD; }
#identifiant { clear:both; }
#identifiant ul { list-style-type:none; }
#identifiant ul li { float:left; display:inline; }
#identifiant .identifiant { margin:5px; padding:5px; background-color:#EEEEEE; border:1px solid #DDDDDD; }
#traitements ul { list-style-type:none; padding:0; }
.action_fichier { display:none; margin:0; padding:0; }
.action_fichier ul {margin:0; padding:0; list-style-type:none; border:1px solid #DDDDDD; background-color:#EEEEEE; }
.clearfix:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -1,5 +0,0 @@
<?php
function block_header(){}
function block_footer(){}

View File

@ -1 +0,0 @@
<?php

View File

@ -1,24 +0,0 @@
<?php
require_once realpath(dirname(__FILE__)).'/FirePHPCore/FirePHP.class.php';
// Démarrage de l'environnement
ob_start();
$firephp = FirePHP::getInstance(true);
// Gestionnaire de chemin
require_once realpath(dirname(__FILE__)).'/path.php';
// Configuration
require_once realpath(dirname(__FILE__)).'/../config/config.php';
//
require_once realpath(dirname(__FILE__)).'/bootstrap.php';
// Connection mysql
$link = mysql_connect (MYSQL_HOST, MYSQL_USER, MYSQL_PASS) or die('Problème technique');
$db_selected = mysql_select_db(MYSQL_DB, $link);
if (!$db_selected) { die ('Problème technique.'); }
// Charset
$charset = mysql_client_encoding($link);
$firephp->info("Charset de communication :".$charset);
if( $charset=='latin1' ) mysql_query("SET NAMES utf8");

View File

@ -1,8 +0,0 @@
<?php
function module_invoke_all(){}
function module_invoke(){}
function module_list(){}

View File

@ -1,151 +0,0 @@
<?php
class WDB {
private $host;
private $database;
private $user;
private $password;
private $con_id; // Connection ID with MySQL
private $result;
public function __construct($database='', $host='', $user='', $password='') {
if ($host=='') $this->host=MYSQL_HOST;
else $this->host=$host;
if ($user=='') $this->user=MYSQL_USER;
else $this->user=$user;
if ($password=='') $this->password=MYSQL_PASS;
else $this->password=$password;
if ($database=='') $this->database=MYSQL_DEFAULT_DB;
else $this->database=$database;
$this->con_id = mysql_pconnect($this->host, $this->user, $this->password);
if (!($this->con_id === false)) {
if (mysql_select_db($this->database, $this->con_id) === false) {
echo date('Y/m/d - H:i:s') ." - ERREUR ".mysql_errno()." : Connection à la base de données impossible !".EOL;
echo date ('Y/m/d - H:i:s'). mysql_error();
die();
}
}
}
public function setCharSet($charSet) {
return (mysql_query("SET CHARACTER SET $charSet;", $this->con_id));
}
/** INSERTION d'un tableau dans une table.
** Les index doivent avoir les mêmes noms que les champs.
** @param string Table
** @param array Valeurs insérer
** @return int Dernière valeur de l'auto-incrément, 1 si pas d'auto-incrément et 0 si erreur
**/
public function insert($table, $toAdd, $debug=false){
$fields = implode(array_keys($toAdd), '`,`');
foreach (array_values($toAdd) as $key=>$array_values)
$tmp[$key]=checkaddslashes($array_values);
$values = "'".implode(array_values($tmp), "','")."'"; # better
$query = 'INSERT INTO `'.$table.'` (`'.$fields.'`) VALUES ('.$values.');';
if ($debug) $tdeb=microtime_float();
$res = mysql_query($query, $this->con_id);
if ($res!==false)
{
if (mysql_insert_id()>0)
$res=mysql_insert_id();
else
$res=true;
}
if ($debug) $this->trace($query, $res, $tdeb);
return $res;
}
public function update($table, $update, $where, $debug=false){
$fields = array_keys($update);
$values = array_values($update);
$i=0;
$query='UPDATE `'.$table.'` SET ';
while(isset($fields[$i])){
if($i>0) { $query.=', '; }
$query.=' `'.$fields[$i]."`='".addslashes($values[$i])."'";
$i++;
}
$query.=' WHERE '.$where.' LIMIT 1;';
if ($debug) $tdeb=microtime_float();
$res=mysql_query($query, $this->con_id);
if ($debug) $this->trace($query, $res, $tdeb);
return true;
}
public function delete($table, $where, $debug=false) {
$query='DELETE FROM `'.$table.'` WHERE '.$where.' LIMIT 1;';
if ($debug) $tdeb=microtime_float();
$res=mysql_query($query, $this->con_id);
if ($debug) $this->trace($query, $res, $tdeb);
return true;
}
public function select($table, $fields, $where, $debug=false, $assoc=MYSQL_BOTH, $huge=false) {
if (mysql_select_db($this->database, $this->con_id) === false) {
echo date('Y/m/d - H:i:s') ." - ERREUR ".mysql_errno()." : Connection à la base de données impossible !".EOL;
echo date ('Y/m/d - H:i:s'). mysql_error();
die();
}
$query="SELECT $fields FROM $table WHERE $where;";
if ($debug) $tdeb=microtime_float();
$this->result=mysql_query($query, $this->con_id);// or die(mysql_error());
if (mysql_errno()) die(mysql_errno() .' : '. mysql_error());
// echo $query;
if (!$huge) {
$tab=array();
while ($ligne = mysql_fetch_array($this->result, $assoc))
$tab[]=$ligne;
if ($debug) $this->trace($query, sizeof($tab), $tdeb);
return $tab;
} else {
$nbRows=mysql_num_rows($this->result);
if ($debug) $this->trace($query, $nbRows, $tdeb);
return $nbRows;
}
}
public function fetch($assoc=MYSQL_BOTH) {
return mysql_fetch_array($this->result, $assoc);
}
public function trace($query, $res='', $tdeb=-1) {
if (!$fp=fopen('mysql_insert.log', 'a'))
return false;
$errnum=mysql_errno($this->con_id);
if ($tdeb>-1) $duree=substr(''.microtime_float()-$tdeb, 0, 5);
else $duree='N/D';
if (!fwrite($fp, date('Y/m/d - H:i:s') ." - $errnum - $res - $duree - $query\n"))
return false;
if (!fclose($fp))
return false;
return true;
}
/** Exécute la requête passé en paramètre **/
public function query($query, $debug=false){
return mysql_query($query, $this->con_id);
}
/** Retourne le libellé de la dernière erreur **/
public function getLastErrorMsg() {
return mysql_error($this->con_id);
}
/** Retourne le numéro de la dernière erreur **/
public function getLastErrorNum() {
return mysql_errno($this->con_id);
}
/** Retourne le libellé et le numéro de la dernière erreur **/
public function getLastError() {
return mysql_error($this->con_id).' ('.mysql_errno($this->con_id).')';
}
}
?>

View File

@ -1,38 +0,0 @@
<?php
/**
* Return a component of the current path.
*
* When viewing a page at the path "admin/content/types", for example, arg(0)
* would return "admin", arg(1) would return "content", and arg(2) would return
* "types".
*
* @param $index
* The index of the component, where each component is separated by a '/'
* (forward-slash), and where the first component has an index of 0 (zero).
*
* @return
* The component specified by $index, or NULL if the specified component was
* not found.
*/
function arg($index = NULL, $path = NULL) {
static $arguments;
if (!isset($path)) {
$path = $_GET['q'];
}
if (!isset($arguments[$path])) {
$arguments[$path] = explode('/', $path);
}
if (!isset($index)) {
return $arguments[$path];
}
if (isset($arguments[$path][$index])) {
return $arguments[$path][$index];
}
}
?>

View File

@ -1 +0,0 @@
<?php

View File

@ -1 +0,0 @@
<?php

View File

@ -1,58 +0,0 @@
<?php
require_once 'includes/include.php';
$module = arg(0);
$firephp->log($module, 'module');
//Inclusion des modules
require_once realpath(dirname(__FILE__)).'/modules/fichier/functions.php';
require_once realpath(dirname(__FILE__)).'/modules/upload/functions.php';
//
$head = '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';
$head_title = 'Traitements fichiers';
$styles_list = array(
'<link rel="stylesheet" href="./css/jquery.checkbox.css" />',
'<link rel="stylesheet" href="./css/jquery.safari-checkbox.css" />',
'<link rel="stylesheet" href="./css/style.css" />',
);
$styles_ie_list = array(
'<link rel="stylesheet" href="./css/style-ie.css" />',
);
$scripts_list = array(
'<script type="text/javascript" src="./js/jquery.js"></script>',
'<script type="text/javascript" src="./js/jquery.progressbar.js"></script>',
'<script type="text/javascript" src="./js/jquery-ui-1.7.2.custom.min.js"></script>',
);
$styles = join("\n", $styles_list);
$styles_ie = join("\n", $styles_ie_list);
$scripts = join("\n", $scripts_list);
switch($module)
{
default:
case 'fichier':
$uuid = uniqid();
require_once realpath(dirname(__FILE__)).'/modules/fichier/fichier.php';
break;
case 'traitements';
$firephp->info('Traitements');
$uuid = uniqid();
require_once realpath(dirname(__FILE__)).'/modules/fichier/fichier.php';
require_once realpath(dirname(__FILE__)).'/modules/traitements/traitements.php';
break;
case 'comptage';
$uuid = uniqid();
require_once realpath(dirname(__FILE__)).'/modules/fichier/fichier.php';
require_once realpath(dirname(__FILE__)).'/modules/comptage/comptage.php';
break;
case 'upload':
require_once realpath(dirname(__FILE__)).'/modules/upload/upload.php';
break;
}
$block = $blocks[0];
//Chargement du template
require_once 'themes/page.tpl.php';

View File

@ -1,22 +0,0 @@
<?php
echo 'file_uploads = ' . ini_get('file_uploads') . '<br/>';
echo 'upload_tmp_dir = ' . ini_get('upload_tmp_dir') . '<br/>';
echo 'post_max_size = ' . ini_get('post_max_size') . '<br/>';
echo 'post_max_size in bytes = ' . return_bytes(ini_get('post_max_size')) . '<br/>';
echo 'upload_max_filesize = ' . return_bytes(ini_get('upload_max_filesize'));
function return_bytes($val) {
$val = trim($val);
$last = strtolower($val[strlen($val)-1]);
switch($last) {
// The 'G' modifier is available since PHP 5.1.0
case 'g':
$val *= 1024;
case 'm':
$val *= 1024;
case 'k':
$val *= 1024;
}
return $val;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,183 +0,0 @@
/*
* jQuery Progress Bar plugin
* Version 2.0 (06/22/2009)
* @requires jQuery v1.2.1 or later
*
* Copyright (c) 2008 Gary Teo
* http://t.wits.sg
USAGE:
$(".someclass").progressBar();
$("#progressbar").progressBar();
$("#progressbar").progressBar(45); // percentage
$("#progressbar").progressBar({showText: false }); // percentage with config
$("#progressbar").progressBar(45, {showText: false }); // percentage with config
*/
(function($) {
$.extend({
progressBar: new function() {
this.defaults = {
steps : 20, // steps taken to reach target
step_duration : 20,
max : 100, // Upon 100% i'd assume, but configurable
showText : true, // show text with percentage in next to the progressbar? - default : true
textFormat : 'percentage', // Or otherwise, set to 'fraction'
width : 120, // Width of the progressbar - don't forget to adjust your image too!!! // Image to use in the progressbar. Can be a single image too: 'images/progressbg_green.gif'
height : 12, // Height of the progressbar - don't forget to adjust your image too!!!
callback : null, // Calls back with the config object that has the current percentage, target percentage, current image, etc
boxImage : 'img/progressbar.gif', // boxImage : image around the progress bar
barImage : {
0: 'img/progressbg_red.gif',
30: 'img/progressbg_orange.gif',
70: 'img/progressbg_green.gif'
},
// Internal use
running_value : 0,
value : 0,
image : null
};
/* public methods */
this.construct = function(arg1, arg2) {
var argvalue = null;
var argconfig = null;
if (arg1 != null) {
if (!isNaN(arg1)) {
argvalue = arg1;
if (arg2 != null) {
argconfig = arg2;
}
} else {
argconfig = arg1;
}
}
return this.each(function(child) {
var pb = this;
var config = this.config;
if (argvalue != null && this.bar != null && this.config != null) {
this.config.value = argvalue
if (argconfig != null)
pb.config = $.extend(this.config, argconfig);
config = pb.config;
} else {
var $this = $(this);
var config = $.extend({}, $.progressBar.defaults, argconfig);
config.id = $this.attr('id') ? $this.attr('id') : Math.ceil(Math.random() * 100000); // random id, if none provided
if (argvalue == null)
argvalue = $this.html().replace("%","") // parse percentage
config.value = argvalue;
config.running_value = 0;
config.image = getBarImage(config);
$this.html("");
var bar = document.createElement('img');
var text = document.createElement('span');
var $bar = $(bar);
var $text = $(text);
pb.bar = $bar;
$bar.attr('id', config.id + "_pbImage");
$text.attr('id', config.id + "_pbText");
$text.html(getText(config));
$bar.attr('title', getText(config));
$bar.attr('alt', getText(config));
$bar.attr('src', config.boxImage);
$bar.attr('width', config.width);
$bar.css("width", config.width + "px");
$bar.css("height", config.height + "px");
$bar.css("background-image", "url(" + config.image + ")");
$bar.css("background-position", ((config.width * -1)) + 'px 50%');
$bar.css("padding", "0");
$bar.css("margin", "0");
$this.append($bar);
$this.append($text);
}
function getPercentage(config) {
return config.running_value * 100 / config.max;
}
function getBarImage(config) {
var image = config.barImage;
if (typeof(config.barImage) == 'object') {
for (var i in config.barImage) {
if (config.running_value >= parseInt(i)) {
image = config.barImage[i];
} else { break; }
}
}
return image;
}
function getText(config) {
if (config.showText) {
if (config.textFormat == 'percentage') {
return " " + Math.round(config.running_value) + "%";
} else if (config.textFormat == 'fraction') {
return " " + config.running_value + '/' + config.max;
}
}
}
config.increment = Math.round((config.value - config.running_value)/config.steps);
if (config.increment < 0)
config.increment *= -1;
if (config.increment < 1)
config.increment = 1;
var t = setInterval(function() {
var pixels = config.width / 100; // Define how many pixels go into 1%
var stop = false;
if (config.running_value > config.value) {
if (config.running_value - config.increment < config.value) {
config.running_value = config.value;
} else {
config.running_value -= config.increment;
}
}
else if (config.running_value < config.value) {
if (config.running_value + config.increment > config.value) {
config.running_value = config.value;
} else {
config.running_value += config.increment;
}
}
if (config.running_value == config.value)
clearInterval(t);
var $bar = $("#" + config.id + "_pbImage");
var $text = $("#" + config.id + "_pbText");
var image = getBarImage(config);
if (image != config.image) {
$bar.css("background-image", "url(" + image + ")");
config.image = image;
}
$bar.css("background-position", (((config.width * -1)) + (getPercentage(config) * pixels)) + 'px 50%');
$bar.attr('title', getText(config));
$text.html(getText(config));
if (config.callback != null && typeof(config.callback) == 'function')
config.callback(config);
pb.config = config;
}, config.step_duration);
});
};
}
});
$.fn.extend({
progressBar: $.progressBar.construct
});
})(jQuery);

View File

@ -1,32 +0,0 @@
<?php
require_once realpath(dirname(__FILE__)).'/functions.php';
$file = arg(1);
$action = arg(2);
$comptage = new StdClass();
switch($action)
{
default:
$html = '<h3>Informations fichier</h3>';
$html.= '<p>Nom : '.$file.'</p>';
$html.= '<p>Taille : '.formatSize(filesize(UPLOAD_DIR.'/'.$file)).'</p>';
$html.= '<p>Nombre de lignes : '.fichier_nblignes($file).'</p>';
$html.= '<p>Nombre de colonnes : '.count(fichier_colonne($file, '')).'</p>';
$html.= '<h3>Statistiques fichier</h3>';
$html.= '<table>';
$html.= '';
$html.= '</table>';
$content = new StdClass();
$content->module = 'comptage';
$content->subject = 'Informations / Comptage - ' . $file;
$content->content = $html;
$content->delta = 0;
$blocks[] = $content;
//Vérification après traitement
break;
}

View File

@ -1,42 +0,0 @@
<?php
/**
* Retourne la taille plus l'unité arrondie
*
* @param mixed $bytes taille en octets
* @param string $format formatage (http://www.php.net/manual/fr/function.sprintf.php)
* @param string $lang indique la langue des unités de taille
* @return string chaine de caractères formatées
*/
function formatSize($bytes, $format = '%.2f', $lang = 'en')
{
static $units = array(
'fr' => array( 'o', 'Ko', 'Mo', 'Go', 'To' ),
'en' => array( 'B', 'KB', 'MB', 'GB', 'TB')
);
$translatedUnits = &$units[$lang];
if(isset($translatedUnits) === false)
{
$translatedUnits = &$units['en'];
}
$b = (double)$bytes;
/*On gére le cas des tailles de fichier négatives*/
if($b > 0)
{
$e = (int)(log($b,1024));
/**Si on a pas l'unité on retourne en To*/
if(isset($translatedUnits[$e]) === false)
{
$e = 4;
}
$b = $b/pow(1024,$e);
}
else
{
$b = 0;
$e = 0;
}
return sprintf($format.' %s',$b,$translatedUnits[$e]);
}

View File

@ -1,19 +0,0 @@
<?php
function return_bytes($val) {
$val = trim($val);
$last = strtolower($val[strlen($val)-1]);
switch($last) {
// The 'G' modifier is available since PHP 5.1.0
case 'g':
$val *= 1024;
case 'm':
$val *= 1024;
case 'k':
$val *= 1024;
}
return $val;
}
function config_check(){}
function config_set(){}

View File

@ -1,149 +0,0 @@
<?php
require_once realpath(dirname(__FILE__)).'/functions.php';
$view = arg(1);
$file = arg(2);
$fichier = new StdClass();
$listefichier = fichier_liste(UPLOAD_DIR);
switch($view)
{
case 'open':
break;
case 'delete':
fichier_delete(UPLOAD_DIR.'/'.$file);
fichier_bdddelete($file);
header('Location: index.php');
break;
case 'colonne':
// Chargement des données du fichier
$ligne_colonne = fichier_colonne($file, '');
$colonne = array_merge( array( 'Numéro de la ligne') , $ligne_colonne );
$associations = fichier_get_associations($file);
if(arg(3)=='valider')
{
if($associations!=false && $associations!=''){
$sql = "UPDATE fichiers SET associations_lock=1 WHERE nom='$file'";
$result = mysql_query($sql);
$message = 'Les associations de colonnes ont été enregistrées.';
$disable = TRUE;
}else{
$message = 'Vous n\'avez pas associé d\'identifiant S&D avec les colonnes du fichier.';
}
}
if(!isset($disable))
{
$sql = "SELECT associations_lock FROM fichiers WHERE nom='$file';";
$result = mysql_query($sql);
$row = mysql_fetch_assoc($result);
if($row['associations_lock']==TRUE){ $disable = TRUE;}
}
$firephp->log($associations, 'associations');
if($associations!==FALSE){ $champs = $associations; }
if(!isset($champs))
{
$champs = array();
foreach ($colonne as $c){
$champs[]['colonne'] = $c;
}
}
$firephp->log($champs, 'Champ');
//Liste des identifiants Scores et Décisions
$identifiant = array('Siren / Siret', 'Référence Client');
// Action
$action = arg(3);
if($action == 'assoc')
{
$col = $_REQUEST['col'];
$id = $_REQUEST['id'];
$firephp->info('Enregistrement des associations');
$firephp->log($col, 'colonne');
$firephp->log($id, 'identifiant');
$champs[$col]['id'] = $identifiant[$id];
$sql = "SELECT associations FROM fichiers WHERE nom='$file';";
$result = mysql_query($sql);
$associations = serialize($champs);
if(!$result){
$sql = "INSERT INTO fichiers (nom, associations) VALUES ('$file', '$associations');";
$insert = mysql_query($sql);
}else{
$sql = "UPDATE fichiers SET associations='$associations' WHERE nom='$file';";
$insert = mysql_query($sql);
}
$firephp->log($sql, 'SQL');
if($insert===FALSE) echo "Erreur lors de l'enregistrement";
exit;
}
if($action == 'delete')
{
$sql = "UPDATE fichiers SET associations='', traitements='' WHERE nom='$file';";
mysql_query($sql);
header('Location: index.php?q='.$module.'/'.$view.'/'.$file);
exit;
}
$html = '<div id="message">'.$message.'</div>';
$html.= '<ul>';
$html.= '<li><a href="./index.php?'.$_SERVER['QUERY_STRING'].'/delete">Réinitialiser</a></li>';
$html.= '<li><a href="./index.php?'.$_SERVER['QUERY_STRING'].'/valider">Valider les associations</a></li>';
$html.= '</ul>';
$html.= '<div id="colonne">';
$html.= '<span>Intitulé colonne du fichier</span>';
$html.= '<ul>';
$i=0;
foreach($champs as $champ)
{
$html.='<li class="drop" id="'.$i.'">';
$html.='<span>'.$champ['colonne'].'</span>';
if(isset($champ['id']) && $champ['id']!='')
{
$html.= '<span class="identifiant">'.$champ['id'].'</span>';
}
$html.='</li>';
$i++;
}
$html.= '</ul>';
$html.= '</div>';
$html.='<div id="identifiant">';
$html.='<span>Identifiant Scores et Décisions</span>';
$html.= '<ul>';
$i=0;
foreach($identifiant as $id)
{
$use = false;
foreach($champs as $champ) { if(isset($champ['id']) && $champ['id']==$id){ $use = true; } }
if(!$use)
{
!isset($disable)? $class = 'class="identifiant drag"' : $class = 'class="identifiant"';
$html.= '<li ><span '.$class.' id="'.$i.'">'.$id.'</span></li>';
}
$i++;
}
$html.= '</ul>';
$html.= '</div>';
$content = new StdClass();
$content->module = 'fichier';
$content->delta = '';
$content->subject = 'Identification des colonnes - '.$file;
$content->content = $html;
$blocks[] = $content;
break;
default:
break;
}

View File

@ -1,145 +0,0 @@
<?php
/**
* Liste les fichiers dans le répertoire d'importation
* @param string $directory
* @return array
*/
function fichier_liste($directory)
{
$return = array();
if (is_dir($directory))
{
if ($dh = opendir($directory))
{
while (($file = readdir($dh)) !== false)
{
if(filetype($directory.'/'.$file) == 'file')
{
$return[] = $file;
}
}
}
closedir($dh);
}
return $return;
}
/**
* Lit un fichier CSV
* @param string $file
* @param string $separateur
* @param boolean $first_line
* @return array
*/
function fichier_read_csv($file, $separateur, $first_line = false)
{
if($separateur == ''){ $separateur = ';'; }
if($fp = fopen(UPLOAD_DIR.'/'.$file,"r"))
{
$content = array();
$ligne_num = 0;
while ($ligne = fgetcsv($fp, '', $separateur)) {
foreach($ligne as $elem) { $content[$ligne_num][] = $elem; }
$ligne_num++;
if($first_line) break;
}
fclose ($fp);
} else {
$content = false;
}
return $content;
}
/**
* Retourne les colonnes d'un fichier CSV
* @param string $file
* @param string $separateur
* @return array
*/
function fichier_colonne($file, $separateur)
{
$content = fichier_read_csv($file, $separateur, true);
return $content[0];
}
/**
* Supprime un fichier
* @param string $path_to_file
* @return boolean
*/
function fichier_delete($path_to_file)
{
if(file_exists($path_to_file)) return unlink($path_to_file);
else return false;
}
/**
* Supprime la référence à un fichier dans la bdd
* @param string $file
* @return void
*/
function fichier_bdddelete($file)
{
$result = mysql_query("DELETE FROM fichiers WHERE nom='$file';");
}
/**
* Détermine le nombre de ligne dans le fichier
* @param string $name
* @return int ou boolean
*/
function fichier_nblignes($name)
{
$lines = file(UPLOAD_DIR.'/'.$name);
if($lines != false) return count($lines);
else return false;
}
function fichier_informations($file)
{
$result = mysql_query("SELECT associations, traitements FROM fichiers WHERE nom='$file';");
$return = FALSE;
if($result)
{
$row = mysql_fetch_assoc($result);
if($row['associations']!='' || $row['traitements']!='' ) $return = TRUE;
}
return $return;
}
/**
* Retourne les associations correspondant au fichier
* @param $name
* @return unknown_type
*/
function fichier_get_associations($name)
{
$sql = "SELECT associations FROM fichiers WHERE nom='$name';";
$result = mysql_query($sql);
$return = FALSE;
if($result)
{
$row = mysql_fetch_assoc($result);
if($row['associations']!='') $return = unserialize($row['associations']);
}
return $return;
}
/**
* Retourne les traitements correspondant au fichier
* @param $name
* @return unknown_type
*/
function fichier_get_traitements($name)
{
$sql = "SELECT traitements FROM fichiers WHERE nom='$name';";
$result = mysql_query($sql);
$return = FALSE;
if($result)
{
$row = mysql_fetch_assoc($result);
if($row['traitements']!='') $return = unserialize($row['traitements']);
}
return $return;
}

View File

@ -1,137 +0,0 @@
<?php
//require_once realpath(dirname(__FILE__)).'/functions.php';
$file = arg(1);
$action = arg(2);
$firephp->log($action, 'action');
switch($action){
case 'add':
isset($_REQUEST['choices'])? $choix = $_REQUEST['choices'] : $choix = '';
$sql = "SELECT traitements FROM fichiers WHERE nom='$file';";
$result = mysql_query($sql);
if($choix!='') { $traitements = serialize($choix); } else { $traitements = ''; }
if(!$result){
$sql = "INSERT INTO fichiers (nom, traitements) VALUES ('$file', '$traitements');";
$insert = mysql_query($sql);
}else{
$sql = "UPDATE fichiers SET traitements='$traitements' WHERE nom='$file';";
$insert = mysql_query($sql);
}
$firephp->log($sql, 'SQL');
if($insert===FALSE) echo "Erreur lors de l'enregistrement";
exit;
break;
case 'start':
$firephp->info('Lancement des traitements');
//Vérifier si les colonnes ont été identifiés
$sql = "SELECT associations FROM fichiers WHERE nom='$file';";
$result = mysql_query($sql);
$row = mysql_fetch_assoc($result);
if($row['associations']!=''){ $associations = true; }
$sql = "SELECT associations_lock FROM fichiers WHERE nom='$file';";
$result = mysql_query($sql);
$row = mysql_fetch_assoc($result);
$associations_lock = false;
if($row['associations_lock']==true){ $associations_lock = true;}
//Vérifier qu'il y a au moins un traitement
$sql = "SELECT traitements FROM fichiers WHERE nom='$file';";
$result = mysql_query($sql);
$row = mysql_fetch_assoc($result);
$traitements = false;
if($row['traitements']!=''){ $traitements = true;}
$sql = "SELECT traitements_lock FROM fichiers WHERE nom='$file';";
$result = mysql_query($sql);
$row = mysql_fetch_assoc($result);
$traitements_lock = false;
if($row['traitements_lock']==true){ $traitements_lock = true;}
//Message
$html = '<p>';
if(!$associations)
{
$html.= 'Erreur : Aucune identification de colonnes.<br/>';
}
if(!$associations_lock)
{
$html.= 'Les association n\'ont pas été validées, cliquez <a href="./index.php?q=fichier/colonne/'.$file.'">ici</a> pour valider les associations<br/>';
}
if(!$traitements)
{
$html.= 'Erreur : Aucun traitement sélectionné<br/>';
}
if(!$traitements_lock)
{
$html.= 'Les traitements n\'ont pas été validées, cliquez <a href="./index.php?q=traitements/'.$file.'">ici</a> pour valider les associations<br/>';
}
$html.= '</p>';
//Définition du bloc
$content = new StdClass();
$content->module = 'traitements';
$content->subject = 'Lancement des traitements - ' . $file;
$content->content = $html;
$content->delta = 0;
$blocks[] = $content;
//Lancer le traitement en tache de fond jusqu'a ce que le fichier soit présent
break;
case 'valider':
$traitements = fichier_get_traitements($file);
if($traitements!=false && $traitements!=''){
$sql = "UPDATE fichiers SET traitements_lock=1 WHERE nom='$file'";
$result = mysql_query($sql);
$message = 'Les traitements ont été enregistrés.';
$disable = TRUE;
}else{
$message = 'Vous n\'avez selectionné aucun traitement.';
}
default :
//Liste des traitements
$traitements_list = array('Validation SIREN/SIRET', 'Vérification SIREN/SIRET dans la base S&D');
$traitements = fichier_get_traitements($file);
if(!isset($disable))
{
$sql = "SELECT traitements_lock FROM fichiers WHERE nom='$file';";
$result = mysql_query($sql);
$row = mysql_fetch_assoc($result);
if($row['traitements_lock']==TRUE){ $disable = TRUE;}
}
$html = '<div id="message"></div>';
$html.= '<ul>';
$html.= '<li><a href="./index.php?'.$_SERVER['QUERY_STRING'].'/valider" title="">Valider les choix de traitements</a></li>';
$html.= '<li><a href="./index.php?'.$_SERVER['QUERY_STRING'].'/start" title="">Lancer les traitements</a></li>';
$html.= '</ul>';
$html.= '<div id="traitements">';
$html.= '<p><i>( Sélectionner les traitements que vous souhaitez appliquer au fichier )</i></p>';
$html.= '<ul>';
foreach($traitements_list as $t)
{
$checked = '';
if($traitements!='' && in_array($t, $traitements)){$checked='checked';}
$disabled='';
if($disable===TRUE){$disabled='disabled';}
$html.= '<li><input type="checkbox" name="choix_traitements[]" value="'.$t.'" '.$checked.' '.$disabled.'/><label>'.$t.'</label></li>';
}
$html.= '</ul>';
$html.= '</div>';
$content = new StdClass();
$content->module = 'traitements';
$content->subject = 'Choix des traitements - ' . $file;
$content->content = $html;
$content->delta = 0;
$blocks[] = $content;
break;
}

View File

@ -1,121 +0,0 @@
<?php
/**
* Filtre les noms de fichier pour éliminer les caractères indésirables
* @param string $filename
* @return string
*/
function filtre_filename($filename){
$filename = str_replace(' ', '_', $filename); // Replacer les espaces
$filename = cleanstring($filename); // Supprimer les caractères illégaux
$filename = strtolower($filename); //Supprimer les majuscules
return $filename;
}
/**
* Filtre les extensions de fichiers autorisés
* @param string $filename
* @return boolean
*/
function filtre_extension($filename)
{
$extensions = explode(';', FILE_EXT);
$ext = array_pop(explode('.',$filename));
$valid = false;
foreach($extensions as $extension){
if($extension==$ext) { $valid = true; break; }
}
return $valid;
}
/**
* Clean up a string value.
*
* Resulting string contains only alphanumerics and separators.
*
* @param $string
* A string to clean.
* @param $clean_slash
* Whether to clean slashes from the given string.
* @return
* The cleaned string.
*/
function cleanstring($string) {
global $firephp;
$transliterate = TRUE;
$reduce_ascii = FALSE;
$output = utf8_encode($string);
// Remove accents and transliterate
if ($transliterate) {
static $i18n_loaded = false;
static $translations = array();
if (!$i18n_loaded) {
$path = realpath(dirname(__FILE__));
if (is_file($path .'/i18n-ascii.txt')) {
$translations = parse_ini_file($path .'/i18n-ascii.txt');
}
$i18n_loaded = true;
}
$output = strtr($output, $translations);
}
// Reduce to the subset of ASCII96 letters and numbers
if ($reduce_ascii) {
$pattern = '/[^a-zA-Z0-9\/]+/ ';
$output = preg_replace($pattern, $separator, $output);
}
return $output;
}
/**
* Retourne le nombre de ligne d'un fichier
* @param string $file
* @return int ou false
*/
function nblignes($file)
{
$lines = file($file);
if($lines != FALSE) return count($lines);
else return FALSE;
}
/**
* Retourne le nombre de colonne d'un fichier csv
* @param string $file
* @param string $separateur
* @return int
*/
function nbcolonne($file, $separateur = '')
{
$nbcolonne = 0;
if($separateur == ''){ $separateur = ';'; }
if($fp = fopen(UPLOAD_DIR.'/'.$file,"r"))
{
$ligne = fgetcsv($fp, '', $separateur);
foreach($ligne as $elem) { $nbcolonne++; }
fclose ($fp);
}
return $nbcolonne;
}
/**
* Traite le fichier envoyé
* @param string $tmp_name
* @param string $name
* @param string $new_name
* @return void
*/
function upload($tmp_name, $name, $new_name)
{
//Gestion du fichier sur le système
move_uploaded_file($tmp_name, UPLOAD_DIR.'/'.$name);
copy(UPLOAD_DIR.'/'.$name, UPLOAD_DIR.'/'.$new_name);
if(file_exists(UPLOAD_DIR.'/'.$name)) unlink(UPLOAD_DIR.'/'.$name);
//Ecriture du nom fichier dans la bdd
if(file_exists(UPLOAD_DIR.'/'.$new_name)){
$lignes = nblignes(UPLOAD_DIR.'/'.$new_name);
mysql_query('INSERT INTO fichiers (nom, nblignes) VALUES ('.$new_name.','.$lignes.');');
}
}

View File

@ -1,565 +0,0 @@
; global transliteration
[default]
À = "A"
Á = "A"
 = "A"
à = "A"
Ä = "Ae"
Å = "A"
Æ = "A"
Ā = "A"
Ą = "A"
Ă = "A"
Ç = "C"
Ć = "C"
Č = "C"
Ĉ = "C"
Ċ = "C"
Ď = "D"
Đ = "D"
È = "E"
É = "E"
Ê = "E"
Ë = "E"
Ē = "E"
Ę = "E"
Ě = "E"
Ĕ = "E"
Ė = "E"
Ĝ = "G"
Ğ = "G"
Ġ = "G"
Ģ = "G"
Ĥ = "H"
Ħ = "H"
Ì = "I"
Í = "I"
Î = "I"
Ï = "I"
Ī = "I"
Ĩ = "I"
Ĭ = "I"
Į = "I"
İ = "I"
IJ = "IJ"
Ĵ = "J"
Ķ = "K"
Ľ = "K"
Ĺ = "K"
Ļ = "K"
Ŀ = "K"
Ł = "L"
Ñ = "N"
Ń = "N"
Ň = "N"
Ņ = "N"
Ŋ = "N"
Ò = "O"
Ó = "O"
Ô = "O"
Õ = "O"
Ö = "Oe"
Ø = "O"
Ō = "O"
Ő = "O"
Ŏ = "O"
Œ = "OE"
Ŕ = "R"
Ř = "R"
Ŗ = "R"
Ś = "S"
Ş = "S"
Ŝ = "S"
Ș = "S"
Š = "S"
Ť = "T"
Ţ = "T"
Ŧ = "T"
Ț = "T"
Ù = "U"
Ú = "U"
Û = "U"
Ü = "Ue"
Ū = "U"
Ů = "U"
Ű = "U"
Ŭ = "U"
Ũ = "U"
Ų = "U"
Ŵ = "W"
Ŷ = "Y"
Ÿ = "Y"
Ý = "Y"
Ź = "Z"
Ż = "Z"
Ž = "Z"
à = "a"
á = "a"
â = "a"
ã = "a"
ä = "ae"
ā = "a"
ą = "a"
ă = "a"
å = "a"
æ = "ae"
ç = "c"
ć = "c"
č = "c"
ĉ = "c"
ċ = "c"
ď = "d"
đ = "d"
è = "e"
é = "e"
ê = "e"
ë = "e"
ē = "e"
ę = "e"
ě = "e"
ĕ = "e"
ė = "e"
ƒ = "f"
ĝ = "g"
ğ = "g"
ġ = "g"
ģ = "g"
ĥ = "h"
ħ = "h"
ì = "i"
í = "i"
î = "i"
ï = "i"
ī = "i"
ĩ = "i"
ĭ = "i"
į = "i"
ı = "i"
ij = "ij"
ĵ = "j"
ķ = "k"
ĸ = "k"
ł = "l"
ľ = "l"
ĺ = "l"
ļ = "l"
ŀ = "l"
ñ = "n"
ń = "n"
ň = "n"
ņ = "n"
ʼn = "n"
ŋ = "n"
ò = "o"
ó = "o"
ô = "o"
õ = "o"
ö = "oe"
ø = "o"
ō = "o"
ő = "o"
ŏ = "o"
œ = "oe"
ŕ = "r"
ř =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 = "i"
ἰ = "i"
ἱ = "i"
ἲ = "i"
ἳ = "i"
ἴ = "i"
ἵ = "i"
ἶ = "i"
ἷ = "i"
ὶ = "i"
ί = "i"
ῐ = "i"
ῑ = "i"
ῒ = "i"
ΐ = "i"
ῖ = "i"
ῗ = "i"
κ = "k"
λ = "l"
μ = "m"
ν = "n"
ξ = "ks"
ο = "o"
ό = "o"
ὀ = "o"
ὁ = "o"
ὂ = "o"
ὃ = "o"
ὄ = "o"
ὅ = "o"
ὸ = "o"
ό = "o"
π = "p"
ρ = "r"
ῤ = "r"
ῥ = "r"
σ = "s"
ς = "s"
τ = "t"
υ = "y"
ύ = "y"
ϋ = "y"
ΰ = "y"
ὐ = "y"
ὑ = "y"
ὒ = "y"
ὓ = "y"
ὔ = "y"
ὕ = "y"
ὖ = "y"
ὗ = "y"
ὺ = "y"
ύ = "y"
ῠ = "y"
ῡ = "y"
ῢ = "y"
ΰ = "y"
ῦ = "y"
ῧ = "y"
φ = "f"
χ = "x"
ψ = "ps"
ω = "o"
ώ = "o"
ὠ = "o"
ὡ = "o"
ὢ = "o"
ὣ = "o"
ὤ = "o"
ὥ = "o"
ὦ = "o"
ὧ = "o"
ᾠ = "o"
ᾡ = "o"
ᾢ = "o"
ᾣ = "o"
ᾤ = "o"
ᾥ = "o"
ᾦ = "o"
ᾧ = "o"
ὼ = "o"
ώ = "o"
ῲ = "o"
ῳ = "o"
ῴ = "o"
ῶ = "o"
ῷ = "o"
¨ = ""
΅ = ""
᾿ = ""
= ""
῍ = ""
῝ = ""
῎ = ""
῞ = ""
῏ = ""
῟ = ""
= ""
῁ = ""
΄ = ""
΅ = ""
= ""
῭ = ""
ͺ = ""
= ""
А = "A"
Б = "B"
В = "V"
Г = "G"
Д = "D"
Е = "E"
Ё = "E"
Ж = "ZH"
З = "Z"
И = "I"
Й = "I"
К = "K"
Л = "L"
М = "M"
Н = "N"
О = "O"
П = "P"
Р = "R"
С = "S"
Т = "T"
У = "U"
Ф = "F"
Х = "KH"
Ц = "TS"
Ч = "CH"
Ш = "SH"
Щ = "SHCH"
Ы = "Y"
Э = "E"
Ю = "YU"
Я = "YA"
а = "A"
б = "B"
в = "V"
г = "G"
д = "D"
е = "E"
ё = "E"
ж = "ZH"
з = "Z"
и = "I"
й = "I"
к = "K"
л = "L"
м = "M"
н = "N"
о = "O"
п = "P"
р = "R"
с = "S"
т = "T"
у = "U"
ф = "F"
х = "KH"
ц = "TS"
ч = "CH"
ш = "SH"
щ = "SHCH"
ы = "Y"
э = "E"
ю = "YU"
я = "YA"
Ъ = ""
ъ = ""
Ь = ""
ь = ""
ð = "d"
Ð = "D"
þ = "th"
Þ = "TH"

View File

@ -1,565 +0,0 @@
; global transliteration
[default]
À = "A"
Á = "A"
 = "A"
à = "A"
Ä = "Ae"
Å = "A"
Æ = "A"
Ā = "A"
Ą = "A"
Ă = "A"
Ç = "C"
Ć = "C"
Č = "C"
Ĉ = "C"
Ċ = "C"
Ď = "D"
Đ = "D"
È = "E"
É = "E"
Ê = "E"
Ë = "E"
Ē = "E"
Ę = "E"
Ě = "E"
Ĕ = "E"
Ė = "E"
Ĝ = "G"
Ğ = "G"
Ġ = "G"
Ģ = "G"
Ĥ = "H"
Ħ = "H"
Ì = "I"
Í = "I"
Î = "I"
Ï = "I"
Ī = "I"
Ĩ = "I"
Ĭ = "I"
Į = "I"
İ = "I"
IJ = "IJ"
Ĵ = "J"
Ķ = "K"
Ľ = "K"
Ĺ = "K"
Ļ = "K"
Ŀ = "K"
Ł = "L"
Ñ = "N"
Ń = "N"
Ň = "N"
Ņ = "N"
Ŋ = "N"
Ò = "O"
Ó = "O"
Ô = "O"
Õ = "O"
Ö = "Oe"
Ø = "O"
Ō = "O"
Ő = "O"
Ŏ = "O"
Œ = "OE"
Ŕ = "R"
Ř = "R"
Ŗ = "R"
Ś = "S"
Ş = "S"
Ŝ = "S"
Ș = "S"
Š = "S"
Ť = "T"
Ţ = "T"
Ŧ = "T"
Ț = "T"
Ù = "U"
Ú = "U"
Û = "U"
Ü = "U"
Ū = "U"
Ů = "U"
Ű = "U"
Ŭ = "U"
Ũ = "U"
Ų = "U"
Ŵ = "W"
Ŷ = "Y"
Ÿ = "Y"
Ý = "Y"
Ź = "Z"
Ż = "Z"
Ž = "Z"
à = "a"
á = "a"
â = "a"
ã = "a"
ä = "ae"
ā = "a"
ą = "a"
ă = "a"
å = "a"
æ = "ae"
ç = "c"
ć = "c"
č = "c"
ĉ = "c"
ċ = "c"
ď = "d"
đ = "d"
è = "e"
é = "e"
ê = "e"
ë = "e"
ē = "e"
ę = "e"
ě = "e"
ĕ = "e"
ė = "e"
ƒ = "f"
ĝ = "g"
ğ = "g"
ġ = "g"
ģ = "g"
ĥ = "h"
ħ = "h"
ì = "i"
í = "i"
î = "i"
ï = "i"
ī = "i"
ĩ = "i"
ĭ = "i"
į = "i"
ı = "i"
ij = "ij"
ĵ = "j"
ķ = "k"
ĸ = "k"
ł = "l"
ľ = "l"
ĺ = "l"
ļ = "l"
ŀ = "l"
ñ = "n"
ń = "n"
ň = "n"
ņ = "n"
ʼn = "n"
ŋ = "n"
ò = "o"
ó = "o"
ô = "o"
õ = "o"
ö = "oe"
ø = "o"
ō = "o"
ő = "o"
ŏ = "o"
œ = "oe"
ŕ = "r"
ř = "r"
ŗ = "r"
ś = "s"
š = "s"
ş = "s"
ť = "t"
ţ = "t"
ù = "u"
ú = "u"
û = "u"
ü = "ue"
ū = "u"
ů = "u"
ű = "u"
ŭ = "u"
ũ = "u"
ų = "u"
ŵ = "w"
ÿ = "y"
ý = "y"
ŷ = "y"
ż = "z"
ź = "z"
ž = "z"
ß = "ss"
ſ = "ss"
Α = "A"
Ά = "A"
Ἀ = "A"
Ἁ = "A"
Ἂ = "A"
Ἃ = "A"
Ἄ = "A"
Ἅ = "A"
Ἆ = "A"
Ἇ = "A"
ᾈ = "A"
ᾉ = "A"
ᾊ = "A"
ᾋ = "A"
ᾌ = "A"
ᾍ = "A"
ᾎ = "A"
ᾏ = "A"
Ᾰ = "A"
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= "O"
Ώ = "O"
ῼ = "O"
α = "a"
ά = "a"
ἀ = "a"
ἁ = "a"
ἂ = "a"
ἃ = "a"
ἄ = "a"
ἅ = "a"
ἆ = "a"
ἇ = "a"
ᾀ = "a"
ᾁ = "a"
ᾂ = "a"
ᾃ = "a"
ᾄ = "a"
ᾅ = "a"
ᾆ = "a"
ᾇ = "a"
ὰ = "a"
ά = "a"
ᾰ = "a"
ᾱ = "a"
ᾲ = "a"
ᾳ = "a"
ᾴ = "a"
ᾶ = "a"
ᾷ = "a"
β = "b"
γ = "g"
δ = "d"
ε = "e"
έ = "e"
ἐ = "e"
ἑ = "e"
ἒ = "e"
ἓ = "e"
ἔ = "e"
ἕ = "e"
ὲ = "e"
έ = "e"
ζ = "z"
η = "i"
ή = "i"
ἠ = "i"
ἡ = "i"
ἢ = "i"
ἣ = "i"
ἤ = "i"
ἥ = "i"
ἦ = "i"
ἧ = "i"
ᾐ = "i"
ᾑ = "i"
ᾒ = "i"
ᾓ = "i"
ᾔ = "i"
ᾕ = "i"
ᾖ = "i"
ᾗ = "i"
ὴ = "i"
ή = "i"
ῂ = "i"
ῃ = "i"
ῄ = "i"
ῆ = "i"
ῇ = "i"
θ = "th"
ι = "i"
ί = "i"
ϊ = "i"
ΐ = "i"
ἰ = "i"
ἱ = "i"
ἲ = "i"
ἳ = "i"
ἴ = "i"
ἵ = "i"
ἶ = "i"
ἷ = "i"
ὶ = "i"
ί = "i"
ῐ = "i"
ῑ = "i"
ῒ = "i"
ΐ = "i"
ῖ = "i"
ῗ = "i"
κ = "k"
λ = "l"
μ = "m"
ν = "n"
ξ = "ks"
ο = "o"
ό = "o"
ὀ = "o"
ὁ = "o"
ὂ = "o"
ὃ = "o"
ὄ = "o"
ὅ = "o"
ὸ = "o"
ό = "o"
π = "p"
ρ = "r"
ῤ = "r"
ῥ = "r"
σ = "s"
ς = "s"
τ = "t"
υ = "y"
ύ = "y"
ϋ = "y"
ΰ = "y"
ὐ = "y"
ὑ = "y"
ὒ = "y"
ὓ = "y"
ὔ = "y"
ὕ = "y"
ὖ = "y"
ὗ = "y"
ὺ = "y"
ύ = "y"
ῠ = "y"
ῡ = "y"
ῢ = "y"
ΰ = "y"
ῦ = "y"
ῧ = "y"
φ = "f"
χ = "x"
ψ = "ps"
ω = "o"
ώ = "o"
ὠ = "o"
ὡ = "o"
ὢ = "o"
ὣ = "o"
ὤ = "o"
ὥ = "o"
ὦ = "o"
ὧ = "o"
ᾠ = "o"
ᾡ = "o"
ᾢ = "o"
ᾣ = "o"
ᾤ = "o"
ᾥ = "o"
ᾦ = "o"
ᾧ = "o"
ὼ = "o"
ώ = "o"
ῲ = "o"
ῳ = "o"
ῴ = "o"
ῶ = "o"
ῷ = "o"
¨ = ""
΅ = ""
᾿ = ""
= ""
῍ = ""
῝ = ""
῎ = ""
῞ = ""
῏ = ""
῟ = ""
= ""
῁ = ""
΄ = ""
΅ = ""
= ""
῭ = ""
ͺ = ""
= ""
А = "A"
Б = "B"
В = "V"
Г = "G"
Д = "D"
Е = "E"
Ё = "E"
Ж = "ZH"
З = "Z"
И = "I"
Й = "I"
К = "K"
Л = "L"
М = "M"
Н = "N"
О = "O"
П = "P"
Р = "R"
С = "S"
Т = "T"
У = "U"
Ф = "F"
Х = "KH"
Ц = "TS"
Ч = "CH"
Ш = "SH"
Щ = "SHCH"
Ы = "Y"
Э = "E"
Ю = "YU"
Я = "YA"
а = "A"
б = "B"
в = "V"
г = "G"
д = "D"
е = "E"
ё = "E"
ж = "ZH"
з = "Z"
и = "I"
й = "I"
к = "K"
л = "L"
м = "M"
н = "N"
о = "O"
п = "P"
р = "R"
с = "S"
т = "T"
у = "U"
ф = "F"
х = "KH"
ц = "TS"
ч = "CH"
ш = "SH"
щ = "SHCH"
ы = "Y"
э = "E"
ю = "YU"
я = "YA"
Ъ = ""
ъ = ""
Ь = ""
ь = ""
ð = "d"
Ð = "D"
þ = "th"
Þ = "TH"

View File

@ -1,24 +0,0 @@
/* Upload */
var holdTheInterval;
$('#upload_form').submit(function(){
holdTheInterval = setInterval(updateInfo, 750);
$("#progressbar").progressBar();
});
function updateInfo()
{
$.getJSON(upload_url, function (data, textStatus){
if(data == null)
{
clearInterval(holdTheInterval);
$('#info').html('Fichier en cours d\'importation...');
}else{
$("#progressbar").progressBar(data.current*100/data.total);
$('#info').html('Fichier en cours d\'importation : '+data.filename+' .');
if (data.done == 1) {
clearInterval(holdTheInterval);
}
}
});
}

View File

@ -1,42 +0,0 @@
<?php
require_once realpath(dirname(__FILE__)).'/functions.php';
$upload = new StdClass();
$id = arg(1);
if($id !== NULL)
{
if( function_exists('apc_fetch') ) $info = apc_fetch('upload_'.$id);
$firephp->log($info, 'info');
//Envoi au navigateur
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
// HTTP/1.1
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
// HTTP/1.0
header("Pragma: no-cache");
echo json_encode($info);
exit;
}
if(isset($_POST['APC_UPLOAD_PROGRESS']))
{
$firephp->log($_FILES, 'FILES');
$tmp_name = $_FILES['fichier']['tmp_name'];
$name = $_FILES['fichier']['name'];
$new_name = filtre_filename($name);
if ( !filtre_extension($name) ){
$upload->message = "Extension du fichier incorrect";
}else{
if (is_uploaded_file($tmp_name)) {
$firephp->info("File ". $name ." uploaded successfully.");
upload($tmp_name, $name, $new_name);
//On renvoi sur la page d'accueil
header('Location: ./index.php');
exit;
}
}
}

View File

@ -1,43 +0,0 @@
-- phpMyAdmin SQL Dump
-- version 3.2.1
-- http://www.phpmyadmin.net
--
-- Serveur: localhost
-- Généré le : Ven 11 Septembre 2009 à 09:13
-- Version du serveur: 5.1.32
-- Version de PHP: 5.2.9-1
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Base de données: `fichierclient`
--
-- --------------------------------------------------------
--
-- Structure de la table `fichiers`
--
CREATE TABLE IF NOT EXISTS `fichiers` (
`nom` varchar(100) NOT NULL,
`nblignes` int(11) NOT NULL,
`nbcolonnes` int(11) NOT NULL,
`associations` text NOT NULL,
`associations_lock` tinyint(1) NOT NULL,
`traitements` text NOT NULL,
`traitements_lock` tinyint(1) NOT NULL,
`outfile` varchar(100) NOT NULL,
`status` int(11) NOT NULL,
UNIQUE KEY `nom` (`nom`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

View File

@ -1,10 +0,0 @@
<p>Importer ou sélectionner un fichier dans la liste pour commencer à utiliser l'interface.</p>
<h3>Supprimer le fichier</h3>
<p>Toutes les données sauvegardées concernant le fichier sont supprimé de notre base de données ainsi que le fichier physique.</p>
<h3>Identifier les colonnes</h3>
<p>Afin de réaliser les traitements un fichier, il faut tout d'abord.</p>
<h3>Lancer le traitement</h3>
<p>Vérouille le fichier s'il ne l'est pas déjà et demande le lancement du traitement.</p>

View File

@ -1,8 +0,0 @@
<div id="block-<?php print $block->module .'-'. $block->delta; ?>" class="clear-block block block-<?php print $block->module ?>">
<?php if (!empty($block->subject)): ?>
<h2><?php print $block->subject ?></h2>
<?php endif;?>
<div class="content"><?php print $block->content ?></div>
</div>

View File

@ -1,141 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<?php print $head ?>
<title><?php print $head_title ?></title>
<?php print $styles ?>
<!--[if IE]><?php print $styles_ie ?><![endif]-->
<?php print $scripts ?>
<script type="text/javascript">
$(document).ready(function()
{
var upload_url = './index.php?q=upload/<?=$uuid?>';
var assoc_url = 'index.php?<?=$_SERVER['QUERY_STRING']?>/assoc';
var traitements_url = 'index.php?<?=$_SERVER['QUERY_STRING']?>/add';
/* Upload */
var holdTheInterval;
$('#upload_form').submit(function(){
holdTheInterval = setInterval(updateInfo, 750);
$("#progressbar").progressBar();
});
function updateInfo()
{
$.getJSON(upload_url, function (data, textStatus){
if(data == null)
{
clearInterval(holdTheInterval);
$('#info').html('Fichier en cours d\'importation...');
}else{
$("#progressbar").progressBar(data.current*100/data.total);
$('#info').html('Fichier en cours d\'importation : '+data.filename+' .');
if (data.done == 1) {
clearInterval(holdTheInterval);
}
}
});
}
/* Action sur les fichiers */
$('.fichier').each(function(){
$(this).mouseover(function(){ $(this).children('.action_fichier').css('display', 'block'); });
});
$('.action_fichier').each(function(){
$(this).mouseout(function(){ $(this).css('display', 'none'); });
});
$('#files').mouseout(function(){
$(this).find('.action_fichier').css('display', 'none');
});
/* Drag n Drop des listes */
$('.drag').draggable({ revert: 'invalid', cursor: 'move' });
$('.drop').droppable({
drop: function(event, ui)
{
var identifiant = $(ui.draggable).attr('id');
var colonne = $(this).attr('id');
/* Envoi des informations */
$.post(assoc_url, { id: identifiant, col: colonne }, function(data){ $('#message').html(data); });
/* Modification visuel */
$(this).append('<span class="identifiant">'+$(ui.draggable).html()+'</span>');
$(ui.draggable).remove();
}
});
/* Traitements */
$('input[name=choix_traitements[]]:checkbox').click(function(){
var choix = new Array();
var cpt = 0;
$('input[name=choix_traitements[]]:checkbox').each(function(){
if($(this).attr('checked')==true){
choix[cpt] = $(this).attr('value');
cpt++;
}
});
$.post(traitements_url, { 'choices[]': choix }, function(data){ $('#message').html(data); });
});
});
</script>
</head>
<body>
<div id="container">
<div id="upload">
<h2>Charger un fichier</h2>
<form id="upload_form" action="index.php?q=upload" method="post" enctype="multipart/form-data">
<input name="APC_UPLOAD_PROGRESS" type="hidden" value="<?=$uuid?>" />
<label>Sélection du fichier : </label><input type="file" id="file" name="fichier" />
<input type="submit" name="submit" value="Envoyer" id="submit" />
</form>
<div id="progressbar">Taille maximum pour le fichier : <?=ini_get('upload_max_filesize');?></div>
<div id="info"><?php if (isset($upload->message)) print $upload->message; ?></div>
<p><a href="./index.php">Accueil</a></p>
</div>
<div id="files">
<h2>Liste des fichiers disponibles</h2>
<?php
foreach($listefichier as $fichier)
{
?>
<span class="fichier"><?=$fichier?>
<div class="action_fichier">
<ul>
<li><a href="./index.php?q=comptage/<?=$fichier?>">Informations / Comptage</a></li>
<li><a href="./index.php?q=fichier/delete/<?=$fichier?>">Supprimer le fichier</a></li>
<li><a href="./index.php?q=fichier/colonne/<?=$fichier?>">Identifier les colonnes</a></li>
<li><a href="./index.php?q=traitements/<?=$fichier?>">Choix des traitements</a></li>
</ul>
</div>
</span>
<?php
}
?>
</div>
<div id="main" class="clearfix">
<?php
if( isset($block) )
{
require_once realpath(dirname(__FILE__)).'/block.tpl.php';
}
else
{
require_once realpath(dirname(__FILE__)).'/block-frontpage.tpl.php';
}
?>
</div>
</div> <!-- // Container -->
</body>
</html>