if(GETPOST("button_removefilter_x")||GETPOST("button_removefilter"))// Both test are required to be compatible with all browsers
/*
* Actions
*/
if(GETPOST("button_removefilter_x")||GETPOST("button_removefilter.x")||GETPOST("button_removefilter"))// All test are required to be compatible with all browsers
{
$search_name="";
$search_contract="";
$search_service="";
$search_status=-1;
$opouvertureprevuemonth="";
$opouvertureprevueday="";
$opouvertureprevueyear="";
$filter_opouvertureprevue="";
$op1month="";
$op1day="";
$op1year="";
...
...
@@ -102,6 +121,10 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both
$op2day="";
$op2year="";
$filter_op2="";
$opcloturemonth="";
$opclotureday="";
$opclotureyear="";
$filter_opcloture="";
$mode='';
$filter='';
}
...
...
@@ -143,10 +166,14 @@ if ($search_name) $sql.= " AND s.nom LIKE '%".$db->escape($search_name)."%'"
if($search_contract)$sql.=" AND c.rowid = '".$db->escape($search_contract)."'";
if($search_service)$sql.=" AND (p.ref LIKE '%".$db->escape($search_service)."%' OR p.description LIKE '%".$db->escape($search_service)."%' OR cd.description LIKE '%".$db->escape($search_service)."%')";
if(!empty($filter_opouvertureprevue)&&$filter_opouvertureprevue!=-1&&$filter_dateouvertureprevue!='')$sql.=" AND cd.date_ouverture_prevue ".$filter_opouvertureprevue." '".$db->idate($filter_dateouvertureprevue)."'";
if(!empty($filter_op1)&&$filter_op1!=-1&&$filter_date1!='')$sql.=" AND cd.date_ouverture ".$filter_op1." '".$db->idate($filter_date1)."'";
if(!empty($filter_op2)&&$filter_op2!=-1&&$filter_date2!='')$sql.=" AND cd.date_fin_validite ".$filter_op2." '".$db->idate($filter_date2)."'";
if(!empty($filter_opcloture)&&$filter_opcloture!=-1&&$filter_datecloture!='')$sql.=" AND cd.date_cloture ".$filter_opcloture." '".$db->idate($filter_datecloture)."'";