diff --git a/include/adm.inc.php b/include/adm.inc.php
index 8165a74da..7d0a478dc 100644
--- a/include/adm.inc.php
+++ b/include/adm.inc.php
@@ -74,7 +74,7 @@ if ( $low_action == "list" )
' . "Exercice " . $g_user->get_exercice() . '';
echo dossier::hidden();
- $a=(isset($_GET['query']))?$_GET['query']:"";
+ $a=$http->get("query","string","");
echo _("Cherche ").HtmlInput::filter_table_form("tiers_tb", '0,1,2', 1,"query",$a);
echo HtmlInput::request_to_hidden(array('ac'));
@@ -85,7 +85,7 @@ if ( $low_action == "list" )
$sel_card->value=$cn->make_array('select fd_id, fd_label from fiche_def '.
' where frd_id=$1 '.
' order by fd_label ',1,array(FICHE_TYPE_ADM_TAX));
- $sel_card->selected=(isset($_GET['cat']))?$_GET['cat']:-1;
+ $sel_card->selected=$http->get("cat","number",-1);
$sel_card->javascript=' onchange="submit(this);"';
echo _('Catégorie :').$sel_card->input();
} else
@@ -108,7 +108,7 @@ if ( $low_action == "list" )
$cat=$http->request("cat","number",-1);
if ( $cat != -1)
{
- $sql=sprintf(" and fd_id = %d",$_GET['cat']);
+ $sql=sprintf(" and fd_id = %d",$cat);
}
echo '
';
diff --git a/include/bank.inc.php b/include/bank.inc.php
index cf2ae7a36..6fd15dd42 100644
--- a/include/bank.inc.php
+++ b/include/bank.inc.php
@@ -49,7 +49,7 @@ if ( isset($_POST['delete_card'] ) )
return;
}
- $f_id=$_REQUEST['f_id'];
+ $f_id = $http->request('f_id','number');
$fiche=new Bank($cn,$f_id);
$fiche->remove();
@@ -70,7 +70,7 @@ if ( $low_action == "list" )
' ._( "Exercice")." " . $g_user->get_exercice() . '';
- $a=(isset($_GET['query']))?$_GET['query']:"";
+ $a=$http->get("query","string","");
echo _("Cherche ").HtmlInput::filter_table_form("tiers_tb", '0,1,2', 1,"query",$a);
$choice_cat=$http->request("choice_cat", "string",1);
@@ -81,7 +81,7 @@ if ( $low_action == "list" )
$sel_card->value=$cn->make_array('select fd_id, fd_label from fiche_def '.
' where frd_id=$1'.
' order by fd_label ',1,array(FICHE_TYPE_FIN));
- $sel_card->selected=(isset($_GET['cat']))?$_GET['cat']:-1;
+ $sel_card->selected=$http->get("cat","number",-1);
$sel_card->javascript=' onchange="submit(this);"';
echo _('Catégorie :').$sel_card->input();
}
@@ -102,11 +102,12 @@ if ( $low_action == "list" )
get("query","string","");
$sql="";
if ( isset($_GET['cat']))
-{
- if ( $_GET['cat'] != -1) $sql=sprintf(" and fd_id = %d",$_GET['cat']);
+ {
+ $cat=$http->get("cat","number");
+ if ($cat!= -1 ) $sql = sprintf(" and fd_id = %s", $cat);
}
$noop=(isset($_GET['noop']))?false:true;
diff --git a/include/contact.inc.php b/include/contact.inc.php
index 9caea623e..06f76b540 100644
--- a/include/contact.inc.php
+++ b/include/contact.inc.php
@@ -27,7 +27,7 @@ require_once NOALYSS_INCLUDE.'/class/contact.class.php';
require_once NOALYSS_INCLUDE.'/lib/ibutton.class.php';
require_once NOALYSS_INCLUDE.'/class/fiche_def.class.php';
-
+$http=new HttpInput();
$low_action = (isset($_REQUEST['sb'])) ? $_REQUEST['sb'] : "list";
/** \file
@@ -54,7 +54,7 @@ if (isset($_POST['action_fiche']))
return;
}
- $f_id = $_REQUEST['f_id'];
+ $f_id = $http->request('f_id','number');
$fiche = new Contact($cn, $f_id);
$fiche->remove();
@@ -91,30 +91,31 @@ if ($low_action == "list")
where
ad_id='.ATTR_DEF_COMPANY. " and frd_id= ".FICHE_TYPE_CONTACT.
' order by 1', 1);
- $sl_company->selected = (isset($_GET['sel_company'])) ? $_GET['sel_company'] : '';
+ $sl_company->selected = $http->get("sel_company","string","");
echo _('Société :') . $sl_company->input();
?>
-
+
get("query","string","");
$sql = "";
if (isset($_GET['cat']))
{
- if ($_GET['cat'] != -1)
- $sql = sprintf(" and fd_id = %d", $_GET['cat']);
+ $cat=$http->get("cat","number");
+ if ($cat!= -1 ) $sql = sprintf(" and fd_id = %s", $cat);
}
if (isset($_GET['sel_company']))
{
- if ($_GET['sel_company'] != '' && $_GET['sel_company'] != -1)
- {
+ $sel_company=$http->get("sel_company");
+ if ($sel_company != '' && $sel_company != "-1")
+ {
- $client->company=$_GET['sel_company'];
- }
+ $client->company=$sel_company;
+ }
}
echo '';
diff --git a/include/customer.inc.php b/include/customer.inc.php
index 239cfd5c5..0bbc7c5c1 100644
--- a/include/customer.inc.php
+++ b/include/customer.inc.php
@@ -74,7 +74,7 @@ if ($low_action == "list")
get("query","string","");
$sql = "";
if (isset($_GET['cat']))
{
- if ($_GET['cat'] != -1)
- $sql = sprintf(" and fd_id = %d", $_GET['cat']);
+ $cat=$http->get("cat","number");
+ if ($cat!= -1)
+ $sql = sprintf(" and fd_id = %s", $cat);
}
$noop = (isset($_GET['noop'])) ? false : true;
echo '';
diff --git a/include/manager.inc.php b/include/manager.inc.php
index 5d4775b98..83c336b18 100644
--- a/include/manager.inc.php
+++ b/include/manager.inc.php
@@ -57,7 +57,7 @@ if (isset($_POST['action_fiche']))
return;
}
- $f_id = $_REQUEST['f_id'];
+ $f_id = $http->request('f_id','number');
$fiche = new Manager($cn, $f_id);
$fiche->remove();
@@ -77,7 +77,7 @@ if ($low_action == "list")
' . "Exercice " . $g_user->get_exercice() . '';
echo dossier::hidden();
- $a = (isset($_GET['query'])) ? $_GET['query'] : "";
+ $a=$http->get("query","string","");
echo _("Cherche ").HtmlInput::filter_table_form("tiers_tb", '0,1,2', 1,"query",$a);
echo HtmlInput::request_to_hidden(array('ac'));
@@ -88,7 +88,7 @@ if ($low_action == "list")
$sel_card->value = $cn->make_array('select fd_id, fd_label from fiche_def ' .
' where frd_id=' . FICHE_TYPE_EMPL .
' order by fd_label ', 1);
- $sel_card->selected = (isset($_GET['cat'])) ? $_GET['cat'] : -1;
+ $sel_card->selected=$http->get("cat","number",-1);
$sel_card->javascript = ' onchange="submit(this);"';
echo _('Catégorie :') . $sel_card->input();
}
@@ -103,17 +103,17 @@ if ($low_action == "list")
echo _('Inclure les employés sans opération :') . $nooperation->input();
?>
-
+
get("query","string","");
$sql = "";
if (isset($_GET['cat']))
{
- if ($_GET['cat'] != -1)
- $sql = sprintf(" and fd_id = %d", $_GET['cat']);
+ $cat=$http->get("cat","number");
+ if ($cat!= -1 ) $sql = sprintf(" and fd_id = %s", $cat);
}
$noop = (isset($_GET['noop'])) ? false : true;
diff --git a/include/supplier.inc.php b/include/supplier.inc.php
index 7fe2099e8..acbd673a0 100644
--- a/include/supplier.inc.php
+++ b/include/supplier.inc.php
@@ -87,7 +87,7 @@ if ( $low_action == "list" )
$sel_card->value=$cn->make_array('select fd_id, fd_label from fiche_def '.
' where frd_id='.FICHE_TYPE_FOURNISSEUR.
' order by fd_label ',1);
- $sel_card->selected=(isset($_GET['cat']))?$_GET['cat']:-1;
+ $sel_card->selected=$http->get("cat","number",-1);
$sel_card->javascript=' onchange="submit(this);"';
echo _('Catégorie :').$sel_card->input();
} else
@@ -102,16 +102,18 @@ if ( $low_action == "list" )
?>
-
+
get("cat","number");
+ if ($cat!= -1)
+ $sql = sprintf(" and fd_id = %s", $cat);
}
$noop=(isset($_GET['noop']))?false:true;