[Vtigercrm-commits] [vtiger-commits] r4317 - /vtigercrm/trunk/modules/Leads/ListView.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Mon Mar 20 03:58:19 EST 2006
Author: saraj
Date: Mon Mar 20 01:58:15 2006
New Revision: 4317
Log:
changes made for advance search
Modified:
vtigercrm/trunk/modules/Leads/ListView.php
Modified: vtigercrm/trunk/modules/Leads/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/Leads/ListView.php (original)
+++ vtigercrm/trunk/modules/Leads/ListView.php Mon Mar 20 01:58:15 2006
@@ -71,8 +71,36 @@
if(isset($_REQUEST['query']) && $_REQUEST['query'] == 'true')
{
- $where=Search($currentModule);
-
+ if($_REQUEST['searchtype']=='advance')
+ {
+ $adv_string='';
+ if(isset($_REQUEST['search_cnt']))
+ $tot_no_criteria = $_REQUEST['search_cnt'];
+ if($_REQUEST['matchtype'] == 'all')
+ $matchtype = "or";
+ else
+ $matchtype = "and";
+
+ for($i=0; $i<=$tot_no_criteria; $i++)
+ {
+ if($i == $tot_no_criteria-1)
+ $matchtype= "";
+
+ $table_colname = 'Fields'.$i;
+ $search_condition = 'Condition'.$i;
+ $search_value = 'Srch_value'.$i;
+
+ $tab_col = str_replace('\'','',stripslashes($_REQUEST[$table_colname]));
+ $srch_cond = str_replace('\'','',stripslashes($_REQUEST[$search_condition]));
+ $srch_val = $_REQUEST[$search_value];
+ $adv_string .= " ".getSearch_criteria($srch_cond,$srch_val,$tab_col)." ".$matchtype;
+ }
+ $where=$adv_string;
+ }
+ else
+ {
+ $where=Search($currentModule);
+ }
// we have a query
$url_string .="&query=true";
More information about the vtigercrm-commits
mailing list