示例#1
0
文件: submit.php 项目: fedecbn/codex
 } else {
     $delimitr_source = ';';
 }
 $not_all_columns = $_POST['not_all_columns'] != null ? $_POST['not_all_columns'] : 't';
 $lonely_file = $_POST['lonely_file'] != null ? $_POST['lonely_file'] : 'f';
 $infrataxon = $_POST['infrataxon'] != null ? $_POST['infrataxon'] : 'f';
 $from_propre = $_POST['from_propre'] != null ? $_POST['from_propre'] : 'f';
 $ecraser = $_POST['ecraser'] != null ? $_POST['ecraser'] : 'f';
 $file = $_POST['file'];
 $statut = $_POST['statut'];
 $format = $_POST['format'] != null ? $_POST['format'] : 'fcbn';
 /*Datapath*/
 $path = Data_path . $id . "/";
 //------------------------------------------------------------------------------ CONNEXION SERVEUR PostgreSQL
 $db = sql_connect(SQL_base);
 $db2 = sql_connect_hub(SQL_base_hub);
 if (!$db) {
     fatal_error("Impossible de se connecter au serveur PostgreSQL.", false);
 }
 //------------------------------------------------------------------------------ EDIT
 if (!empty($id)) {
     switch ($mode) {
         /*CLEAR*/
         case "clear":
             $fction .= "hub_clear";
             if ($jdd == 'all') {
                 $query = "SELECT * FROM hub_clear('{$id}', 'data', 'temp');";
                 $query .= "SELECT * FROM hub_clear('{$id}', 'taxa', 'temp');";
             } else {
                 $query = "SELECT * FROM hub_clear('{$id}', '{$jdd}', 'temp');";
             }
示例#2
0
function hub_log($schema, $fction)
{
    $db2 = sql_connect_hub(SQL_base_hub);
    $cmd = "SELECT * FROM hub_log_simple('{$schema}','{$fction}','" . str_replace('"', '', str_replace('\'', '', pg_last_error($db2))) . "');";
    pg_query($db2, $cmd);
}