21require_once NOALYSS_INCLUDE.
'/constant.php';
22require_once NOALYSS_INCLUDE.
'/lib/user_common.php';
38 parent::__construct($p_cn,
$p_id) ;
63 $where=
' where ';$and=
'';
64 if ( isset (
$array[
'company'])) {
65 $sql_query.=$where.sprintf(
" contact_company ilike '%%%s%%'",
67 $where=
'';$and=
' and ';
69 if ( isset(
$array[
'search'])) {
70 $sql_query.=$where.$and.sprintf(
" f_id in (select distinct f_id from fiche_detail where ad_value ilike '%%%s%%')",
72 $where=
'';$and=
' and ';
75 if ( isset(
$array[
'category'])) {
76 $sql_query.=$where.$and.sprintf(
" fd_id = %s",
78 $where=
'';$and=
' and ';
80 if ( isset (
$array[
'active']) &&
$array[
'active'] ==
true) {
81 $sql_query .= $where.$and.sprintf(
" f_enable='1' ");
82 $where=
'';$and=
' and ';
88 $this->filter[
'active']=
true;
90 $this->filter[
'active']=
false;
94 unset($this->filter[
'category']);
95 if ( !empty($pn_category)
97 && $pn_category != -1){
98 $this->filter[
'category']=$pn_category;
102 unset($this->filter[
'company']);
103 if ( ! empty($p_company) && $p_company !=
"-1") {
104 $this->filter[
'company']= strtoupper($p_company);
109 unset($this->filter[
'search']);
110 if ( ! empty($p_search) ){
111 $this->filter[
'search']=$p_search;
136 if ( !empty ($p_search) ) { $this->
filter_search($p_search);}
142 $all_contact=$this->
cn->get_value(
"select count(*) from ($sql) as m");
143 if ( $all_contact == 0 )
return "";
157 require NOALYSS_TEMPLATE.
'/contact-summary.php';
171 $nb_pagesize=$_SESSION[SESSION_KEY.
'g_pagesize'];
173 $ps_sql.=
' order by contact_name ';
174 if ( $nb_pagesize <0 ) {
$limit=
'';}
else {
178 if (DEBUGNOALYSS > 1) {
179 var_export(
"Contact::fetch ($ps_sql)");
181 return $this->
cn->get_array($ps_sql);
sql_string($p_string)
Fix the problem with the quote char for the database.
if(! isset($_GET['submit_query'])) $p_action
define Class fiche and fiche def, those class are using class attribut. When adding or modifing new c...
static echo_var($n_level, $msg, $print=true)
Display the value of a var if DEBUGNOALYSS is greater than $n_level, the debugging info has a certain...
navigation_bar($p_offset, $p_line, $p_size=0, $p_page=1, $p_javascript="")
Create a navigation_bar (pagesize)