phpcompta-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpcompta-dev] r4953 - in phpcompta/trunk: html include sql


From: phpcompta-dev
Subject: [Phpcompta-dev] r4953 - in phpcompta/trunk: html include sql
Date: Thu, 21 Jun 2012 00:42:33 +0200 (CEST)

Author: danydb
Date: 2012-06-21 00:42:33 +0200 (Thu, 21 Jun 2012)
New Revision: 4953

Removed:
   phpcompta/trunk/include/export_stock_histo.csv
Modified:
   phpcompta/trunk/html/export.php
   phpcompta/trunk/sql/upgrade.sql
Log:
0000648: Impression : d?\195?\169placer les fichiers ?\195?\160 importer dans 
la DB

Modified: phpcompta/trunk/html/export.php
===================================================================
--- phpcompta/trunk/html/export.php     2012-06-20 22:00:39 UTC (rev 4952)
+++ phpcompta/trunk/html/export.php     2012-06-20 22:42:33 UTC (rev 4953)
@@ -42,135 +42,8 @@
     redirect("do.php?".dossier::get());
     exit();
   }
+// get file and execute it
 
-  switch( $_GET['act'])
-  {
-  case 'CSV:histo':
-    require_once('export_histo_csv.php');
-    exit();
-    break;
-  case 'CSV:ledger':
-    require_once('export_ledger_csv.php');
-    exit();
-    break;
-  case 'PDF:ledger':
-    require_once('export_ledger_pdf.php');
-    exit();
-    break;
-
-  case 'CSV:postedetail':
-    require_once('export_poste_detail_csv.php');
-    exit();
-    break;
-  case 'PDF:postedetail':
-    require_once('export_poste_detail_pdf.php');
-    exit();
-    break;
-  case 'CSV:fichedetail':
-    require_once('export_fiche_detail_csv.php');
-    exit();
-    break;
-  case 'PDF:fichedetail':
-    require_once('export_fiche_detail_pdf.php');
-    exit();
-    break;
-
-  case 'CSV:fiche_balance':
-    require_once('export_fiche_balance_csv.php');
-    exit();
-    break;
-  case 'PDF:fiche_balance':
-    require_once('export_fiche_balance_pdf.php');
-    exit();
-    break;
-  case 'CSV:report':
-    require_once('export_form_csv.php');
-    exit();
-    break;
-  case 'PDF:report':
-    require_once('export_form_pdf.php');
-    exit();
-    break;
-  case 'CSV:fiche':
-    require_once('export_fiche_csv.php');
-    exit();
-    break;
-  case 'PDF:fiche':
-    require_once('export_fiche_pdf.php');
-    exit();
-    break;
-  case 'CSV:glcompte':
-    require_once('export_gl_csv.php');
-    exit();
-    break;
-  case 'PDF:glcompte':
-    require_once('export_gl_pdf.php');
-    exit();
-    break;
-  case 'PDF:sec':
-    require_once('export_security_pdf.php');
-    exit();
-    break;
-  case 'CSV:AncList':
-    require_once('export_anc_list_csv.php');
-    exit();
-    break;
-  case 'CSV:AncBalSimple':
-    require_once('export_anc_balance_simple_csv.php');
-    exit();
-    break;
-  case 'PDF:AncBalSimple':
-    require_once('export_anc_balance_simple_pdf.php');
-    exit();
-    break;
-  case 'CSV:AncBalDouble':
-    require_once('export_anc_balance_double_csv.php');
-    exit();
-    break;
-  case 'PDF:AncBalDouble':
-    require_once('export_anc_balance_double_pdf.php');
-    exit();
-    break;
-  case 'CSV:balance':
-    require_once('export_balance_csv.php');
-    exit();
-    break;
-  case 'PDF:balance':
-    require_once('export_balance_pdf.php');
-    exit();
-    break;
-  case 'CSV:AncTable':
-    require_once('export_anc_table_csv.php');
-    exit();
-    break;
-  case 'CSV:AncAccList':
-    require_once('export_anc_acc_list_csv.php');
-    exit();
-    break;
-  case 'CSV:AncBalGroup':
-    require_once('export_anc_balance_group_csv.php');
-    exit();
-    break;
-  case 'OTH:Bilan':
-      require_once 'export_bilan_oth.php';
-      exit();
-      break;
-  case 'CSV:AncGrandLivre':
-      require_once 'export_anc_grandlivre_csv.php';
-      break;
-  case 'CSV:reportinit':
-         require_once('export_reportinit_csv.php');
-         break;
-  case 'CSV:ActionGestion':
-         require_once 'export_follow_up_csv.php';
-         break;
-       case 'CSV:StockHisto': // Export Historique mouvement stock
-               require_once 'export_stock_histo.csv';
-               break;
-       case 'CSV:StockResmList' : // 'Export Résumé list stock
-               require_once 'export_stock_resume_list.php';
-               break;
-   default:
-    alert('Action inconnue '.$_GET['act']);
-    exit();
-  }
\ No newline at end of file
+ $prfile=$cn->get_value("select me_file from menu_ref where 
me_code=$1",array($_GET['act']));
+ require_once $prfile;
+ ?>
\ No newline at end of file

Deleted: phpcompta/trunk/include/export_stock_histo.csv
===================================================================
--- phpcompta/trunk/include/export_stock_histo.csv      2012-06-20 22:00:39 UTC 
(rev 4952)
+++ phpcompta/trunk/include/export_stock_histo.csv      2012-06-20 22:42:33 UTC 
(rev 4953)
@@ -1,63 +0,0 @@
-<?php
-
-/*
- *   This file is part of PhpCompta.
- *
- *   PhpCompta is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   PhpCompta is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with PhpCompta; if not, write to the Free Software
- *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-/* $Revision$ */
-
-// Copyright Author Dany De Bontridder address@hidden
-
-/**
- * @file
- * @brief export in CSV the export of history
- *
- */
-require_once 'class_stock.php';
-
-$stock=new Stock();
-$sql = $stock->create_query_histo($_GET);
-$sql .= " order by  real_date asc";
-
-$res=$cn->exec_sql($sql);
-$max_row=Database::num_row($res);
-header('Pragma: public');
-header('Content-type: application/csv');
-header('Content-Disposition: attachment;filename="histo-stock.csv"',FALSE);
-printf('"Date";');
-       printf('"%s";','Code Stock');
-       printf('"%s";','Depot');
-       printf('"%s";','Fiche');
-       printf('"%s";','Commentaire');
-       printf('%s;','Quantité');
-       printf('"%s";','IN/OUT');
-               printf("\n\r");
-for ($i=0;$i<$max_row;$i++)
-{
-       $row=Database::fetch_array($res,$i);
-       printf('"%s";',$row['cdate']);
-       printf('"%s";',$row['sg_code']);
-       printf('"%s";',$row['r_name']);
-       printf('"%s";',$row['qcode']);
-       $row['ccomment']=str_replace('"','',$row['ccomment']);
-       printf('"%s";',$row['ccomment']);
-       printf('%s;',nbm($row['sg_quantity']));
-       printf('"%s";',$row['direction']);
-       printf("\n\r");
-
-}
-
-?>
\ No newline at end of file

Modified: phpcompta/trunk/sql/upgrade.sql
===================================================================
--- phpcompta/trunk/sql/upgrade.sql     2012-06-20 22:00:39 UTC (rev 4952)
+++ phpcompta/trunk/sql/upgrade.sql     2012-06-20 22:42:33 UTC (rev 4953)
@@ -388,4 +388,38 @@
 
 ALTER TABLE stock_goods ADD CONSTRAINT stock_goods_c_id_fkey FOREIGN KEY 
(c_id) REFERENCES stock_change (c_id) MATCH SIMPLE
       ON UPDATE CASCADE ON DELETE CASCADE;
-update action_gestion set ag_id=-1 ;
\ No newline at end of file
+update action_gestion set ag_id=-1 ;
+
+update menu_ref set me_code='CSV:reportinit'  where me_code='CVS:reportinit';
+ update menu_ref set me_file='export_histo_csv.php' where me_code='CSV:histo';
+ update menu_ref set me_file='export_ledger_csv.php' where 
me_code='CSV:ledger';
+ update menu_ref set me_file='export_ledger_pdf.php' where 
me_code='PDF:ledger';
+ update menu_ref set me_file='export_poste_detail_csv.php' where 
me_code='CSV:postedetail';
+ update menu_ref set me_file='export_poste_detail_pdf.php' where 
me_code='PDF:postedetail';
+ update menu_ref set me_file='export_fiche_detail_csv.php' where 
me_code='CSV:fichedetail';
+ update menu_ref set me_file='export_fiche_detail_pdf.php' where 
me_code='PDF:fichedetail';
+ update menu_ref set me_file='export_fiche_balance_csv.php' where 
me_code='CSV:fiche_balance';
+ update menu_ref set me_file='export_fiche_balance_pdf.php' where 
me_code='PDF:fiche_balance';
+ update menu_ref set me_file='export_form_csv.php' where me_code='CSV:report';
+ update menu_ref set me_file='export_form_pdf.php' where me_code='PDF:report';
+ update menu_ref set me_file='export_fiche_csv.php' where me_code='CSV:fiche';
+ update menu_ref set me_file='export_fiche_pdf.php' where me_code='PDF:fiche';
+ update menu_ref set me_file='export_gl_csv.php' where me_code='CSV:glcompte';
+ update menu_ref set me_file='export_gl_pdf.php' where me_code='PDF:glcompte';
+ update menu_ref set me_file='export_security_pdf.php' where me_code='PDF:sec';
+ update menu_ref set me_file='export_anc_list_csv.php' where 
me_code='CSV:AncList';
+ update menu_ref set me_file='export_anc_balance_simple_csv.php' where 
me_code='CSV:AncBalSimple';
+ update menu_ref set me_file='export_anc_balance_simple_pdf.php' where 
me_code='PDF:AncBalSimple';
+ update menu_ref set me_file='export_anc_balance_double_csv.php' where 
me_code='CSV:AncBalDouble';
+ update menu_ref set me_file='export_anc_balance_double_pdf.php' where 
me_code='PDF:AncBalDouble';
+ update menu_ref set me_file='export_balance_csv.php' where 
me_code='CSV:balance';
+ update menu_ref set me_file='export_balance_pdf.php' where 
me_code='PDF:balance';
+ update menu_ref set me_file='export_anc_table_csv.php' where 
me_code='CSV:AncTable';
+ update menu_ref set me_file='export_anc_acc_list_csv.php' where 
me_code='CSV:AncAccList';
+ update menu_ref set me_file='export_anc_balance_group_csv.php' where 
me_code='CSV:AncBalGroup';
+ update menu_ref set me_file='export_bilan_oth.php' where me_code='OTH:Bilan';
+ update menu_ref set me_file='export_anc_grandlivre_csv.php' where 
me_code='CSV:AncGrandLivre';
+ update menu_ref set me_file='export_reportinit_csv.php' where 
me_code='CSV:reportinit';
+ update menu_ref set me_file='export_follow_up_csv.php' where 
me_code='CSV:ActionGestion';
+ update menu_ref set me_file='export_stock_histo_csv.php' where 
me_code='CSV:StockHisto';
+ update menu_ref set me_file='export_stock_resume_list.php' where 
me_code='CSV:StockResmList';



---
PhpCompta est un logiciel de comptabilité libre en ligne (full web)
Projet opensource http://www.phpcompta.eu



reply via email to

[Prev in Thread] Current Thread [Next in Thread]