id'"); $where = ""; foreach($where_clauses as $clause) { if($where != "") $where .= " and "; $where .= $clause; } if (!empty($assigned_user_id)) { if (!empty($where)) { $where .= " AND "; } $where .= "cases.assigned_user_id IN("; foreach ($assigned_user_id as $key => $val) { $where .= "'".PearDatabase::quote($val)."'"; $where .= ($key == count($assigned_user_id) - 1) ? ")" : ", "; } } $log->info("Here is the where clause for the list view: $where"); } if (!isset($_REQUEST['search_form']) || $_REQUEST['search_form'] != 'false') { // Stick the form header out there. $search_form=new XTemplate ('modules/Cases/SearchForm.html'); $search_form->assign("MOD", $current_module_strings); $search_form->assign("APP", $app_strings); if(isset($name)) $search_form->assign("NAME", $name); if(isset($account_name)) $search_form->assign("ACCOUNT_NAME", $account_name); $search_form->assign("JAVASCRIPT", get_clear_form_js()); if(isset($current_user_only)) $search_form->assign("CURRENT_USER_ONLY", "checked"); echo get_form_header($current_module_strings['LBL_SEARCH_FORM_TITLE'], "", false); if (isset($_REQUEST['advanced']) && $_REQUEST['advanced'] == 'true') { if (isset($number)) $search_form->assign("NUMBER", $number); $case_status_dom = & $app_list_strings['case_status_dom']; array_unshift($case_status_dom, ''); if (isset($status)) $search_form->assign("STATUS_OPTIONS", get_select_options_with_id($case_status_dom, $status)); else $search_form->assign("STATUS_OPTIONS", get_select_options_with_id($case_status_dom, '')); if (!empty($assigned_user_id)) $search_form->assign("USER_FILTER", get_select_options_with_id(get_user_array(FALSE), $assigned_user_id)); else $search_form->assign("USER_FILTER", get_select_options_with_id(get_user_array(FALSE), '')); $search_form->parse("advanced"); $search_form->out("advanced"); } else { $search_form->parse("main"); $search_form->out("main"); } echo get_form_footer(); echo "\n
\n"; } $newForm = null; $ListView = new ListView(); $ListView->initNewXTemplate( 'modules/Cases/ListView.html',$current_module_strings); $ListView->setHeaderTitle($current_module_strings['LBL_LIST_FORM_TITLE'] ); $ListView->setQuery($where, "", "name", "CASE"); $ListView->processListView($seedCase, "main", "CASE"); ?>