diff --git a/html/ca_list_pdf.php b/html/ca_list_pdf.php deleted file mode 100644 index b8821f4c0..000000000 --- a/html/ca_list_pdf.php +++ /dev/null @@ -1,38 +0,0 @@ -pa_id=$_GET['pa_id']; -$array=$op->get_list($_GET['from'],$_GET['to']); -$length=count($array); -$size=40; -$offset=0; -?> diff --git a/html/compta.php b/html/compta.php index 3a336b2df..7d1d91210 100644 --- a/html/compta.php +++ b/html/compta.php @@ -80,7 +80,7 @@ if ( $action == 'stock') } if ( $action=='quick_writing') { - require_once ('quick_writing.inc.php'); + require_once ('compta_ods.inc.php'); } if ( $action == 'gl' ) { diff --git a/html/popup.php b/html/popup.php index 3a7d332dc..0dfee98da 100644 --- a/html/popup.php +++ b/html/popup.php @@ -42,13 +42,13 @@ if ( basename($_GET['ajax']) == 'ajax_history.php' ) if (isset($_GET['pcm_val']) ) { - $href_csv="poste_csv.php?".$href.'&poste_id='.$_GET['pcm_val'].'&ople=0&type=poste&'.$from_periode.'&'.$to_periode; - $href_pdf="poste_pdf.php?".$href.'&poste_id='.$_GET['pcm_val'].'&ople=0&type=poste&'.$from_periode.'&'.$to_periode; + $href_csv="export.php?".$href.'&poste_id='.$_GET['pcm_val'].'&ople=0&type=poste&'.$from_periode.'&'.$to_periode."&act=CSV/postedetail"; + $href_pdf="export.php?".$href.'&poste_id='.$_GET['pcm_val'].'&ople=0&type=poste&'.$from_periode.'&'.$to_periode."&act=PDF/postedetail";; } else { - $href_csv="quick_code_csv.php?".$href.'&f_id='.$_GET['f_id'].'&ople=0&type=poste&'.$from_periode.'&'.$to_periode; - $href_pdf="quick_code_pdf.php?".$href.'&f_id='.$_GET['f_id'].'&ople=0&type=poste&'.$from_periode.'&'.$to_periode; + $href_csv="export.php?".$href.'&f_id='.$_GET['f_id'].'&ople=0&type=poste&'.$from_periode.'&'.$to_periode."&act=CSV/fichedetail"; + $href_pdf="export.php?".$href.'&f_id='.$_GET['f_id'].'&ople=0&type=poste&'.$from_periode.'&'.$to_periode."&act=PDF/fichedetail"; } echo 'Export CSV'; diff --git a/html/recherche.php b/html/recherche.php index 426656b6f..de771beba 100644 --- a/html/recherche.php +++ b/html/recherche.php @@ -95,8 +95,9 @@ if ( isset ($_GET['viewsearch'])) foreach ($_GET['r_jrn'] as $k=>$v) $r.=HtmlInput::hidden('r_jrn['.$k.']',$v); } - echo '
'; + echo ''; echo $r; + echo HtmlInput::hidden('act','CSV/histo'); echo HtmlInput::submit('viewsearch','Export vers CSV'); echo HtmlInput::hidden('p_action','ALL'); echo '
'; diff --git a/include/anc_imp.inc.php b/include/anc_imp.inc.php index 28ee5ca95..72f9559c7 100644 --- a/include/anc_imp.inc.php +++ b/include/anc_imp.inc.php @@ -86,7 +86,7 @@ if ($sub == 'bs') echo ''; if ( isset($_GET['result'])) { - echo $bs->show_button('ca_bs_csv.php','ca_bs_pdf.php',$str_hidden); + echo $bs->show_button($str_hidden); echo $bs->display_html(); } } @@ -103,7 +103,7 @@ if ( $sub == 'bc2') echo ''; if ( isset($_GET['result'])) { - echo $bc->show_button('ca_bc_csv.php','ca_bc_pdf.php',$str_hidden); + echo $bc->show_button($str_hidden); echo $bc->display_html(); } } diff --git a/include/balance.inc.php b/include/balance.inc.php index 31d418095..16920e237 100644 --- a/include/balance.inc.php +++ b/include/balance.inc.php @@ -171,10 +171,12 @@ if ( isset ($_GET['view'] ) ) echo ""; echo ''; - echo '"; - echo '
'. + echo '
'. dossier::hidden(). HtmlInput::submit('bt_pdf',"Export PDF"). HtmlInput::hidden("p_action","impress"). + HtmlInput::hidden("act","PDF/balance"). + HtmlInput::hidden("from_periode",$_GET['from_periode']). HtmlInput::hidden("to_periode",$_GET['to_periode']); echo HtmlInput::hidden('p_filter',$_GET['p_filter']); @@ -191,10 +193,11 @@ if ( isset ($_GET['view'] ) ) echo "
'. + echo '
'. HtmlInput::submit('bt_csv',"Export CSV"). dossier::hidden(). HtmlInput::hidden("p_action","impress"). + HtmlInput::hidden("act","CSV/balance"). HtmlInput::hidden("from_periode",$_GET['from_periode']). HtmlInput::hidden("to_periode",$_GET['to_periode']); echo HtmlInput::hidden('p_filter',$_GET['p_filter']); diff --git a/include/class_acc_account_ledger.php b/include/class_acc_account_ledger.php index 1df6f63db..4740326b2 100644 --- a/include/class_acc_account_ledger.php +++ b/include/class_acc_account_ledger.php @@ -405,6 +405,20 @@ class Acc_Account_Ledger */ static function HtmlTableHeader($actiontarget="poste") { + switch($actiontarget) + { + case 'poste': + $action_csv='CSV/postedetail'; + $action_pdf='PDF/postedetail'; + break; + case 'gl_comptes': + $action_csv='CSV/glcompte'; + $action_pdf='PDF/glcompte'; + break; + default: + throw new Exception(" Fonction HtmlTableHeader argument actiontarget invalid"); + exit; + } $hid=new IHidden(); echo '
'; echo ""; @@ -417,9 +431,10 @@ class Acc_Account_Ledger HtmlInput::submit('bt_other',"Autre poste"). $hid->input("type","poste").$hid->input('p_action','impress').""; } - echo '"; - echo '"; $str_ople=(isset($_REQUEST['ople']))?HtmlInput::hidden('ople',$_REQUEST['ople']):''; - echo '"; - echo '"; - echo '"; - echo '"; - echo '"; - echo '
'. + echo '
'. dossier::hidden(). HtmlInput::submit('bt_pdf',"Export PDF"). + HtmlInput::hidden('act',$action_pdf). $hid->input("type","poste").$str_ople. $hid->input('p_action','impress'). $hid->input("from_periode",$_REQUEST['from_periode']). @@ -434,9 +449,10 @@ class Acc_Account_Ledger echo "
'. + echo '
'. dossier::hidden(). HtmlInput::submit('bt_csv',"Export CSV"). + HtmlInput::hidden('act',$action_csv). $hid->input("type","poste").$str_ople. $hid->input('p_action','impress'). $hid->input("from_periode",$_REQUEST['from_periode']). diff --git a/include/class_anc_balance_double.php b/include/class_anc_balance_double.php index e5a1ee3c5..97a45178c 100644 --- a/include/class_anc_balance_double.php +++ b/include/class_anc_balance_double.php @@ -313,19 +313,18 @@ class Anc_Balance_Double extends Anc_Print } /*! * \brief Show the button to export in PDF or CSV - * \param $url_csv url of the csv - * \param $url_pdf url of the pdf * \param $p_string hidden data to include in the form * * * \return string with the button */ - function show_button($url_csv,$url_pdf,$p_string="") + function show_button($p_string="") { $r=""; - $r.= ''; + $r.= ''; $r.= $p_string; $r.= HtmlInput::hidden("to",$this->to); + $r.= HtmlInput::hidden("act","PDF/AncBalDouble"); $r.= HtmlInput::hidden("from",$this->from); $r.= HtmlInput::hidden("pa_id",$this->pa_id); $r.= HtmlInput::hidden("from_poste",$this->from_poste); @@ -337,8 +336,9 @@ class Anc_Balance_Double extends Anc_Print $r.=HtmlInput::submit('bt_pdf',"Export en PDF"); $r.= ''; - $r.= '
'; + $r.= ''; $r.= HtmlInput::hidden("to",$this->to); + $r.= HtmlInput::hidden("act","CSV/AncBalDouble"); $r.= HtmlInput::hidden("from",$this->from); $r.= HtmlInput::hidden("pa_id",$this->pa_id); $r.= HtmlInput::hidden("from_poste",$this->from_poste); diff --git a/include/class_anc_balance_simple.php b/include/class_anc_balance_simple.php index b629f49bd..175513ee4 100644 --- a/include/class_anc_balance_simple.php +++ b/include/class_anc_balance_simple.php @@ -239,13 +239,15 @@ class Anc_Balance_Simple extends Anc_Print * * \return string with the button */ - function show_button($url_csv,$url_pdf,$p_string="") + function show_button($p_string="") { $r=""; - $r.= ''; + $r.= ''; $r.= $p_string; $r.= dossier::hidden(); $r.= HtmlInput::hidden("to",$this->to); + $r.= HtmlInput::hidden("act","PDF/AncBalSimple"); + $r.= HtmlInput::hidden("from",$this->from); $r.= HtmlInput::hidden("pa_id",$this->pa_id); $r.= HtmlInput::hidden("from_poste",$this->from_poste); @@ -253,7 +255,8 @@ class Anc_Balance_Simple extends Anc_Print $r.=HtmlInput::submit('bt_pdf',"Export en PDF"); $r.= '
'; - $r.= '
'; + $r.= ''; + $r.= HtmlInput::hidden("act","CSV/AncBalSimple"); $r.= HtmlInput::hidden("to",$this->to); $r.= HtmlInput::hidden("from",$this->from); $r.= HtmlInput::hidden("pa_id",$this->pa_id); diff --git a/include/class_anc_listing.php b/include/class_anc_listing.php index e24a79b21..ec7be0a0e 100644 --- a/include/class_anc_listing.php +++ b/include/class_anc_listing.php @@ -167,13 +167,13 @@ class Anc_Listing extends Anc_Print $r.= '
'; */ - $r.= '
'; + $r.= ''; $r.= HtmlInput::hidden("to",$this->to); $r.= HtmlInput::hidden("from",$this->from); $r.= HtmlInput::hidden("pa_id",$this->pa_id); $r.= HtmlInput::hidden("from_poste",$this->from_poste); $r.= HtmlInput::hidden("to_poste",$this->to_poste); - + $r.=HtmlInput::hidden('act','CSV/AncList'); $r.= $p_string; $r.= dossier::hidden(); $r.=HtmlInput::submit('bt_csv',"Export en CSV"); diff --git a/include/class_fiche.php b/include/class_fiche.php index 87ed7ea61..b1f9211d3 100644 --- a/include/class_fiche.php +++ b/include/class_fiche.php @@ -1383,9 +1383,10 @@ class Fiche $hid->input("type","poste").$hid->input('p_action','impress')."
'. + echo '
'. HtmlInput::submit('bt_pdf',"Export PDF"). dossier::hidden().$str_ople. + HtmlInput::hidden('act','PDF/fichedetail'). $hid->input("type","poste"). $hid->input('p_action','impress'). $hid->input("f_id",$this->id). @@ -1397,8 +1398,9 @@ class Fiche echo "
'. + echo '
'. HtmlInput::submit('bt_csv',"Export CSV"). + HtmlInput::hidden('act','PDF/fichedetail'). dossier::hidden().$str_ople. $hid->input("type","poste"). $hid->input('p_action','impress'). diff --git a/include/compta_ach.inc.php b/include/compta_ach.inc.php index 4f75a2446..f7c2d7fee 100644 --- a/include/compta_ach.inc.php +++ b/include/compta_ach.inc.php @@ -339,8 +339,9 @@ if ( $def == 2 ) foreach ($_GET['r_jrn'] as $k=>$v) $r.=HtmlInput::hidden('r_jrn['.$k.']',$v); } - echo ''; + echo ''; echo $r; + echo HtmlInput::hidden('act','CSV/histo'); echo HtmlInput::submit('viewsearch','Export vers CSV'); echo ''; diff --git a/include/compta_fin.inc.php b/include/compta_fin.inc.php index 2a2a00745..61d6cea5e 100644 --- a/include/compta_fin.inc.php +++ b/include/compta_fin.inc.php @@ -221,8 +221,9 @@ if ( $def == 2) foreach ($_GET['r_jrn'] as $k=>$v) $r.=HtmlInput::hidden('r_jrn['.$k.']',$v); } - echo '
'; + echo ''; echo $r; + echo HtmlInput::hidden('act','CSV/histo'); echo HtmlInput::submit('viewsearch','Export vers CSV'); echo '
'; diff --git a/include/quick_writing.inc.php b/include/compta_ods.inc.php similarity index 98% rename from include/quick_writing.inc.php rename to include/compta_ods.inc.php index b533ca9bc..5f0fdf049 100644 --- a/include/quick_writing.inc.php +++ b/include/compta_ods.inc.php @@ -190,8 +190,9 @@ if ($sa == 'l' && $id != -1) foreach ($_GET['r_jrn'] as $k=>$v) $r.=HtmlInput::hidden('r_jrn['.$k.']',$v); } - echo '
'; + echo ''; echo $r; + echo HtmlInput::hidden('act','CSV/histo'); echo HtmlInput::submit('viewsearch','Export vers CSV'); echo '
'; diff --git a/include/compta_ven.inc.php b/include/compta_ven.inc.php index 200d0ba7d..1cbea73c6 100644 --- a/include/compta_ven.inc.php +++ b/include/compta_ven.inc.php @@ -359,8 +359,9 @@ if ( $def == 2 ) foreach ($_GET['r_jrn'] as $k=>$v) $r.=HtmlInput::hidden('r_jrn['.$k.']',$v); } - echo '
'; + echo ''; echo $r; + echo HtmlInput::hidden('act','CSV/histo'); echo HtmlInput::submit('viewsearch','Export vers CSV'); echo '
'; diff --git a/include/constant.php b/include/constant.php index 06b88e7b1..701a33d58 100644 --- a/include/constant.php +++ b/include/constant.php @@ -35,13 +35,12 @@ $g_captcha=false; /* set to none for production */ /* uncomment for production */ -$version_phpcompta=SVNINFO; -define ("DEBUG",false); +//$version_phpcompta=SVNINFO; +//define ("DEBUG",false); -/* define ("DEBUG",true); -$version_phpcompta=3872; -*/ +$version_phpcompta=4014; + define ("DBVERSION",93); define ("DBVERSIONREPO",13); diff --git a/html/ca_bc_csv.php b/include/export_anc_balance_double_csv.php similarity index 100% rename from html/ca_bc_csv.php rename to include/export_anc_balance_double_csv.php diff --git a/html/ca_bc_pdf.php b/include/export_anc_balance_double_pdf.php similarity index 100% rename from html/ca_bc_pdf.php rename to include/export_anc_balance_double_pdf.php diff --git a/html/ca_bs_csv.php b/include/export_anc_balance_simple_csv.php similarity index 100% rename from html/ca_bs_csv.php rename to include/export_anc_balance_simple_csv.php diff --git a/html/ca_bs_pdf.php b/include/export_anc_balance_simple_pdf.php similarity index 100% rename from html/ca_bs_pdf.php rename to include/export_anc_balance_simple_pdf.php diff --git a/html/ca_list_csv.php b/include/export_anc_list_csv.php similarity index 100% rename from html/ca_list_csv.php rename to include/export_anc_list_csv.php diff --git a/html/bal_csv.php b/include/export_balance_csv.php similarity index 100% rename from html/bal_csv.php rename to include/export_balance_csv.php diff --git a/html/print_balance.php b/include/export_balance_pdf.php similarity index 100% rename from html/print_balance.php rename to include/export_balance_pdf.php diff --git a/html/category_csv.php b/include/export_fiche_balance_csv.php similarity index 93% rename from html/category_csv.php rename to include/export_fiche_balance_csv.php index b9507d7e3..ac9e68a35 100644 --- a/html/category_csv.php +++ b/include/export_fiche_balance_csv.php @@ -34,15 +34,6 @@ require_once('class_database.php'); require_once('class_dossier.php'); require_once('ac_common.php'); -/* Security */ -$gDossier=dossier::id(); -$cn=new Database($gDossier); -$User=new User($cn); -$User->Check(); -$User->check_dossier($gDossier); -$User->can_request(IMPFIC,0); - - /* balance */ if ( $_GET['histo'] == 4 ) { diff --git a/html/fiche_csv.php b/include/export_fiche_csv.php similarity index 95% rename from html/fiche_csv.php rename to include/export_fiche_csv.php index 1d0be8690..466e7c589 100644 --- a/html/fiche_csv.php +++ b/include/export_fiche_csv.php @@ -34,10 +34,7 @@ $gDossier=dossier::id(); $cn=new Database($gDossier); require_once ('class_user.php'); -$User=new User($cn); -$User->Check(); -$User->check_dossier($gDossier); -$User->can_request(IMPFIC,0); + if ( isset ($_GET['fd_id'])) diff --git a/html/quick_code_csv.php b/include/export_fiche_detail_csv.php similarity index 98% rename from html/quick_code_csv.php rename to include/export_fiche_detail_csv.php index 9ccbf6916..1ae3453d6 100644 --- a/html/quick_code_csv.php +++ b/include/export_fiche_detail_csv.php @@ -23,7 +23,6 @@ */ include_once("ac_common.php"); require_once('class_database.php'); -include ('class_user.php'); require_once("class_fiche.php"); header('Content-type: application/csv'); @@ -36,9 +35,6 @@ $gDossier=dossier::id(); $cn=new Database($gDossier); -$User=new User($cn); -$User->Check(); - $Fiche=new Fiche($cn,$_REQUEST['f_id']); $Fiche->getName(); list($array,$tot_deb,$tot_cred)=$Fiche->get_row_date( diff --git a/html/quick_code_pdf.php b/include/export_fiche_detail_pdf.php similarity index 100% rename from html/quick_code_pdf.php rename to include/export_fiche_detail_pdf.php diff --git a/html/category_pdf.php b/include/export_fiche_pdf.php similarity index 100% rename from html/category_pdf.php rename to include/export_fiche_pdf.php diff --git a/html/form_csv.php b/include/export_form_csv.php similarity index 96% rename from html/form_csv.php rename to include/export_form_csv.php index 1729a04e9..8d0f41aa1 100644 --- a/html/form_csv.php +++ b/include/export_form_csv.php @@ -21,9 +21,9 @@ /*! \file * \brief Send a report in CSV format */ -include_once("ac_common.php"); +require_once ("ac_common.php"); require_once('class_database.php'); -include ('class_user.php'); +require_once ('class_user.php'); require_once("class_acc_report.php"); require_once("impress_inc.php"); header('Pragma: public'); @@ -35,11 +35,6 @@ $gDossier=dossier::id(); /* Admin. Dossier */ $cn=new Database($gDossier); - -$User=new User($cn); -$User->Check(); - - $Form=new Acc_Report($cn,$_GET['form_id']); $Form->get_name(); // Step ? diff --git a/html/form_pdf.php b/include/export_form_pdf.php similarity index 100% rename from html/form_pdf.php rename to include/export_form_pdf.php diff --git a/html/gl_comptes_csv.php b/include/export_gl_csv.php similarity index 97% rename from html/gl_comptes_csv.php rename to include/export_gl_csv.php index d68e91ff3..8bff635d9 100644 --- a/html/gl_comptes_csv.php +++ b/include/export_gl_csv.php @@ -42,10 +42,7 @@ $gDossier=dossier::id(); /* Security */ $cn=new Database($gDossier); -$User=new User($cn); -$User->Check(); -$User->check_dossier($gDossier); -$User->can_request(IMPBIL,0); + extract($_GET); diff --git a/html/gl_comptes_pdf.php b/include/export_gl_pdf.php similarity index 100% rename from html/gl_comptes_pdf.php rename to include/export_gl_pdf.php diff --git a/html/histo_csv.php b/include/export_histo_csv.php similarity index 82% rename from html/histo_csv.php rename to include/export_histo_csv.php index c755a7308..89f1d3801 100644 --- a/html/histo_csv.php +++ b/include/export_histo_csv.php @@ -24,27 +24,6 @@ * \brief */ -require_once('class_database.php'); -require_once('class_acc_ledger.php'); - -$gDossier=dossier::id(); -$cn=new Database($gDossier); - -$user=new User($cn); -$user->Check(); -$act=$user->check_dossier($gDossier); -if ( $act=='P') - { - redirect("extension.php?".dossier::get(),0); - exit(); - } -if ( $act=='X') - { - echo alert('Accès interdit'); - exit(); - } -$user->can_request(IMPJRN,0); - header('Pragma: public'); header('Content-type: application/csv'); header('Content-Disposition: attachment;filename="histo-export.csv"',FALSE); diff --git a/html/jrn_csv.php b/include/export_ledger_csv.php similarity index 100% rename from html/jrn_csv.php rename to include/export_ledger_csv.php diff --git a/html/jrn_pdf.php b/include/export_ledger_pdf.php similarity index 100% rename from html/jrn_pdf.php rename to include/export_ledger_pdf.php diff --git a/html/poste_csv.php b/include/export_poste_detail.php similarity index 100% rename from html/poste_csv.php rename to include/export_poste_detail.php diff --git a/include/export_poste_detail_csv.php b/include/export_poste_detail_csv.php new file mode 100644 index 000000000..0a2a4feb6 --- /dev/null +++ b/include/export_poste_detail_csv.php @@ -0,0 +1,155 @@ +get_array("select pcm_val from tmp_pcmn where pcm_val::text like $1||'%'",array($_REQUEST["poste_id"])); +} +else +{ + $a_poste=$cn->get_array("select pcm_val from tmp_pcmn where pcm_val = $1",array($_REQUEST['poste_id'])); +} + +if ( ! isset ($_REQUEST['oper_detail'])) +{ + if ( count($a_poste) == 0 ) + exit; + + foreach ($a_poste as $pos) + { + $Poste=new Acc_Account_Ledger($cn,$pos['pcm_val']); + $name=$Poste->get_name(); + list($array,$tot_deb,$tot_cred)=$Poste->get_row_date( $_REQUEST['from_periode'], + $_REQUEST['to_periode'], + $_GET['ople'] + ); + if ( count($Poste->row ) == 0 ) + continue; + + echo '"Poste";'. + '"n° pièce";'. + '"Lib.";'. + "\"Code interne\";". + "\"Date\";". + "\"Description\";". + "\"Débit\";". + "\"Crédit\";". + "\"Prog.\""; + printf("\n"); + + $prog=0; + foreach ( $Poste->row as $op ) + { + $diff=bcsub($op['deb_montant'],$op['cred_montant']); + $prog=bcadd($prog,$diff); + echo '"'.$pos['pcm_val'].'";'. + '"'.$op['jr_pj_number'].'"'.";". + '"'.$name.'";'. + '"'.$op['jr_internal'].'"'.";". + '"'.$op['j_date_fmt'].'"'.";". + '"'.$op['description'].'";'. + nb($op['deb_montant']).";". + nb($op['cred_montant']).";". + nb(abs($prog)); + printf("\n"); + + + } + $solde_type=($tot_deb>$tot_cred)?"solde débiteur":"solde créditeur"; + $diff=abs($tot_deb-$tot_cred); + printf( + '"'."$solde_type".'"'.";". + nb($diff).";". + nb($tot_deb).";". + nb($tot_cred)."\n"); + } +} +else +{ + /* detail of all operation */ + if ( count($a_poste) == 0 ) + exit; + + foreach ($a_poste as $pos) + { + $Poste=new Acc_Account_Ledger($cn,$pos['pcm_val']); + $Poste->get_name(); + list($array,$tot_deb,$tot_cred)=$Poste->get_row_date( $_REQUEST['from_periode'], + $_REQUEST['to_periode'] + ); + if ( count($Poste->row ) == 0 ) + continue; + + echo '"Poste";'. + '"Lib.";'. + '"QuickCode";'. + "\"Code interne\";". + "\"Date\";". + "\"Description\";". + "\"Montant\";". + "\"D/C\""; + printf("\n"); + + + foreach ( $Poste->row as $a ) + { + $op=new Acc_Operation($cn); + $op->jr_id=$a['jr_id']; + $result=$op->get_jrnx_detail(); + foreach ( $result as $r) + { + printf('"%s";"%s";"%s";"%s";"%s";"%s";"%s";%12.2f;"%s"', + $r['j_poste'], + $r['pcm_lib'], + $r['j_qcode'], + $r['jr_internal'], + $r['jr_date'], + $a['description'], + $a['jr_pj_number'], + nb($r['j_montant']), + $r['debit']); + printf("\r\n"); + + } + + + + } + } + exit; +} +?> diff --git a/html/poste_pdf.php b/include/export_poste_detail_pdf.php similarity index 98% rename from html/poste_pdf.php rename to include/export_poste_detail_pdf.php index 6535d3512..a90d3d2e6 100644 --- a/html/poste_pdf.php +++ b/include/export_poste_detail_pdf.php @@ -36,11 +36,6 @@ $gDossier=dossier::id(); /* Security */ $cn=new Database($gDossier); -$User=new User($cn); -$User->Check(); -$User->check_dossier($gDossier); -$User->can_request(IMPPOSTE,0); - extract($_GET); if ( isset ( $poste_fille) ) @@ -202,5 +197,3 @@ foreach ($a_poste as $poste) $fDate=date('dmy-Hi'); $pdf->Output('poste-'.$fDate.'.pdf','I'); ?> -?> -?> \ No newline at end of file diff --git a/html/sec_pdf.php b/include/export_security_pdf.php similarity index 100% rename from html/sec_pdf.php rename to include/export_security_pdf.php diff --git a/include/impress_fiche.inc.php b/include/impress_fiche.inc.php index c49570f98..4e35f4755 100644 --- a/include/impress_fiche.inc.php +++ b/include/impress_fiche.inc.php @@ -101,8 +101,9 @@ if ( $_GET['histo'] == 3 ) require_once('template/result_cat_card_summary.php'); $hid=new IHidden(); - echo '
'.dossier::hidden(). + echo ''.dossier::hidden(). HtmlInput::submit('bt_csv',"Export CSV"). + HtmlInput::hidden('act',"CSV/fiche"). $hid->input("type","fiche"). $hid->input("p_action","impress"). $hid->input("fd_id",$_REQUEST['cat']); @@ -110,16 +111,19 @@ if ( $_GET['histo'] == 3 ) exit(); } -$export_pdf=''; +$export_pdf=''; $export_pdf.=HtmlInput::hidden('cat',$_GET['cat']); +$export_pdf.=HtmlInput::hidden('act',"PDF/fiche"). $export_pdf.=HtmlInput::hidden('start',$_GET['start']); $export_pdf.=HtmlInput::hidden('end',$_GET['end']); $export_pdf.=HtmlInput::hidden('histo',$_GET['histo']); $export_pdf.=dossier::hidden(); $export_pdf.=HtmlInput::submit('pdf','Export en PDF'); $export_pdf.='
'; -$export_csv='
'; +$export_csv=''; + $export_csv.=HtmlInput::hidden('cat',$_GET['cat']); +$export_csv.=HtmlInput::hidden('act','CSV/fiche_balance'); $export_csv.=HtmlInput::hidden('start',$_GET['start']); $export_csv.=HtmlInput::hidden('end',$_GET['end']); $export_csv.=HtmlInput::hidden('histo',$_GET['histo']); diff --git a/include/impress_jrn.inc.php b/include/impress_jrn.inc.php index 56378d5df..189311b54 100644 --- a/include/impress_jrn.inc.php +++ b/include/impress_jrn.inc.php @@ -167,8 +167,9 @@ if ( isset( $_REQUEST['bt_html'] ) ) echo '
'.dossier::hidden(). $hid->input("type","jrn").$hid->input('p_action','impress')."
'.dossier::hidden(). + echo '
'.dossier::hidden(). HtmlInput::submit('bt_pdf',"Export PDF"). + HtmlInput::hidden('act','PDF/ledger'). $hid->input("type","jrn"). $hid->input("p_action","impress"). $hid->input("jrn_id",$Jrn->id). @@ -177,8 +178,9 @@ if ( isset( $_REQUEST['bt_html'] ) ) echo $hid->input("p_simple",$_GET['p_simple']); echo "
'.dossier::hidden(). + echo '
'.dossier::hidden(). HtmlInput::submit('bt_csv',"Export CSV"). + HtmlInput::hidden('act','CSV/ledger'). $hid->input("type","jrn"). $hid->input("p_action","impress"). $hid->input("jrn_id",$Jrn->id). diff --git a/include/impress_rapport.inc.php b/include/impress_rapport.inc.php index 8f8e46021..1b63f81f3 100644 --- a/include/impress_rapport.inc.php +++ b/include/impress_rapport.inc.php @@ -92,8 +92,9 @@ if ( isset( $_GET['bt_html'] ) ) HtmlInput::submit('bt_other',"Autre Rapport"). $hid->input("type","rapport").$hid->input("p_action","impress")."
'. + echo '
'. HtmlInput::submit('bt_pdf',"Export PDF"). + HtmlInput::hidden('act','PDF/report'). dossier::hidden(). $hid->input("type","rapport"). $hid->input("p_action","impress"). @@ -109,7 +110,8 @@ if ( isset( $_GET['bt_html'] ) ) echo "
'. + echo '
'. + HtmlInput::hidden('act','CSV/report'). HtmlInput::submit('bt_csv',"Export CSV"). dossier::hidden(). $hid->input("type","form"). diff --git a/include/user_action_gl.php b/include/user_action_gl.php index 16d047959..7a95c9c05 100644 --- a/include/user_action_gl.php +++ b/include/user_action_gl.php @@ -75,8 +75,9 @@ if (isset($_GET['r_jrn'])) { foreach ($_GET['r_jrn'] as $k=>$v) $r.=HtmlInput::hidden('r_jrn['.$k.']',$v); } -echo ''; +echo ''; echo $r; +echo HtmlInput::hidden('act','CSV/histo'); echo HtmlInput::submit('viewsearch','Export vers CSV'); echo HtmlInput::hidden('p_action','ALL'); echo '';