[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpcompta-dev] r489 - trunk/rapport_avance
From: |
phpcompta-dev |
Subject: |
[Phpcompta-dev] r489 - trunk/rapport_avance |
Date: |
Thu, 2 May 2013 23:18:36 +0200 (CEST) |
Author: danydb
Date: 2013-05-02 23:18:36 +0200 (Thu, 02 May 2013)
New Revision: 489
Modified:
trunk/rapport_avance/ajax_declaration_display.php
trunk/rapport_avance/raw.php
Log:
Export of the modele
Modified: trunk/rapport_avance/ajax_declaration_display.php
===================================================================
--- trunk/rapport_avance/ajax_declaration_display.php 2013-04-30 22:05:26 UTC
(rev 488)
+++ trunk/rapport_avance/ajax_declaration_display.php 2013-05-02 21:18:36 UTC
(rev 489)
@@ -32,6 +32,8 @@
$decl->d_id = $_GET['d_id'];
$decl->load();
$decl->display();
+echo $decl->anchor_document();
+echo '<hr>';
$ref=HtmlInput::array_to_string(array('gDossier','plugin_code','d_id'),$_GET,'extension.raw.php?');
$ref.="&act=export_decla_csv";
echo HtmlInput::button_anchor("Export CSV",$ref,'export_id');
Modified: trunk/rapport_avance/raw.php
===================================================================
--- trunk/rapport_avance/raw.php 2013-04-30 22:05:26 UTC (rev 488)
+++ trunk/rapport_avance/raw.php 2013-05-02 21:18:36 UTC (rev 489)
@@ -81,4 +81,48 @@
$cn->commit();
}
+if ($act == 'export_definition_modele')
+{
+ $decl = new RAPAV_Formulaire();
+ $decl->f_id = $id;
+ $decl->load();
+
+ $cn->start();
+ if ($decl->f_filename == "")
+ {
+ ini_set('zlib.output_compression', 'Off');
+ header("Pragma: public");
+ header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+ header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
+ header("Cache-Control: must-revalidate");
+ header('Content-type: ' . 'text/plain');
+ header('Content-Disposition: attachment;filename=vide.txt',
FALSE);
+ header("Accept-Ranges: bytes");
+ echo "******************";
+ echo _("Fichier effacé");
+ echo "******************";
+ exit();
+ }
+ $tmp = tempnam($_ENV['TMP'], 'document_');
+
+ $cn->lo_export($decl->f_lob, $tmp);
+
+ ini_set('zlib.output_compression', 'Off');
+ header("Pragma: public");
+ header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+ header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
+ header("Cache-Control: must-revalidate");
+ header('Content-type: ' . $decl->f_mimetype);
+ header('Content-Disposition: attachment;filename="' . $decl->f_filename
. '"', FALSE);
+ header("Accept-Ranges: bytes");
+ $file = fopen($tmp, 'r');
+ while (!feof($file))
+ echo fread($file, 8192);
+
+ fclose($file);
+
+ unlink($tmp);
+
+ $cn->commit();
+}
?>
---
PhpCompta est un logiciel de comptabilité libre en ligne (full web)
Projet opensource http://www.phpcompta.eu
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpcompta-dev] r489 - trunk/rapport_avance,
phpcompta-dev <=