Sauce Envoyée
";
// echo "$doc_id, $tipo_id, $titulo, $session_id, $dia_id, $autor_id, $file, $contenido";
$titulo = str_replace("'", "\'", $titulo);
// $table_temp = split("'", $contenido);
// $fichier_liste = implode("");
if (!$breaks) {
$contenido = nl2br($contenido);
}
$cnt = count($thema);
if ($ctn=!0){
$themax = "$thema[0]";
for($i=1; $i<$cnt; $i++){
$themax = "$themax"."X"."$thema[$i]";
}
}
$delete = pg_exec($conn, "DELETE FROM doc WHERE doc_id='$doc_id'");
$delete = pg_exec($conn, "DELETE FROM chunk WHERE doc_id='$doc_id'");
$add = pg_exec($conn, "INSERT INTO doc VALUES ('$doc_id', '$tipo_id', '$titulo', '$session_id', '$dia_id', '$autor_id', '$file')");
$x = splitandadd($doc_id, "chunk", $contenido);
}
if($ses_id){
$query = pg_exec($conn, "select * from doc where doc_id='$ses_id'");
if (pg_numrows($query) !=0) {
$get = pg_fetch_row($query, 0);
$query_tipo = pg_exec($conn, "select * from tipodoc where tipo_id='$get[1]'");
if (pg_numrows($query_tipo) !=0) {
$get_tipo = pg_fetch_row($query_tipo, 0);
}
echo "Cambiar : $get_tipo[1] : $get[2]
";
$doc_id = $ses_id;
}else{
echo "El documentado solicitado no esta...
";
}
}else{
$query_max = pg_exec($conn, "SELECT max(doc_id) FROM doc");
$get_max = pg_fetch_row($query_max, 0);
$doc_id = $get_max[0] + 1;
}
?>
agregar un nuevo documento