0001438: Remplacement de HtmlInput par Http_Input

This commit is contained in:
Dany De Bontridder 2017-06-03 19:13:15 +02:00
parent 48c3fe5809
commit aa55ed6894
79 changed files with 1303 additions and 878 deletions

View file

@ -26,8 +26,13 @@ require_once NOALYSS_INCLUDE.'/lib/class_database.php';
require_once NOALYSS_INCLUDE.'/class/class_acc_account_ledger.php';
require_once NOALYSS_INCLUDE.'/class/class_acc_operation.php';
require_once NOALYSS_INCLUDE.'/lib/class_noalyss_csv.php';
require_once NOALYSS_INCLUDE.'/lib/class_http_input.php';
$http=new HttpInput();
$r_poste=HtmlInput::default_value_request("poste_id", "error");
$r_poste=$http->request("poste_id");
$from_periode=$http->request("from_periode");
$to_periode=$http->request("to_periode");
$ople=$http->request("ople");
$export=new Noalyss_Csv(_('poste').'_'.$r_poste);
@ -39,16 +44,19 @@ $cn=Dossier::connect();
if ( isset ( $_REQUEST['poste_fille']) )
{ //choisit de voir tous les postes
$a_poste=$cn->get_array("select pcm_val from tmp_pcmn where pcm_val::text like $1||'%'",array($_REQUEST["poste_id"]));
$a_poste=$cn->get_array("select pcm_val from tmp_pcmn where pcm_val::text like $1||'%'",array($r_poste));
}
else
{
$a_poste=$cn->get_array("select pcm_val from tmp_pcmn where pcm_val = $1",array($_REQUEST['poste_id']));
$a_poste=$cn->get_array("select pcm_val from tmp_pcmn where pcm_val = $1",array($r_poste));
}
bcscale(2);
$export->send_header();
if ( ! isset ($_REQUEST['oper_detail']))
{
/*
* Without detail for accounting
*/
if ( count($a_poste) == 0 )
exit;
@ -56,9 +64,9 @@ if ( ! isset ($_REQUEST['oper_detail']))
{
$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']
list($array,$tot_deb,$tot_cred)=$Poste->get_row_date( $from_periode,
$to_periode,
$ople
);
if ( count($Poste->row ) == 0 )
continue;
@ -153,7 +161,9 @@ if ( ! isset ($_REQUEST['oper_detail']))
}
else
{
/* detail of all operation */
/*
* detail of all operation
*/
if ( count($a_poste) == 0 )
exit;
@ -161,9 +171,9 @@ else
{
$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'],
$_GET['ople']
list($array,$tot_deb,$tot_cred)=$Poste->get_row_date($from_periode,
$to_periode,
$ople
);
if ( count($Poste->row ) == 0 )
continue;