36 $this->sql=
"select f_id,quick_code,vw_name,accounting,vw_first_name,vw_description,
37 (select ad_value from fiche_detail fd where fd.f_id=vw_fiche_attr.f_id and fd.ad_id=25) as company
50 $filter=
" and ".$this->filter_enable_card();
55 $sql_cat=
' and fd_id = '.sql_string(
$sql_array[
'search_cat']);
60 $string_sql=$this->sql.
"
62 (vw_name ilike '%$query%'
63 or quick_code ilike '%$query%')
69 $string_sql=sprintf($this->sql.
" where f_id in (select f_id from fiche_detail where
70 ad_id = '%s' and ad_value ilike '%%%s%%') %s %s"
86 $filter=
"and ".$this->filter_enable_card();
91 $sql_cat=
' and fd_id = '.sql_string(
$sql_array[
'search_cat']);
94 $string_sql=
"select count(*)
97 ( vw_name ilike '%$query%'
98 or quick_code ilike '%$query%')
102 return $cn->get_value($string_sql);
110 $filter_enable_card=
" f_enable='1' ";
111 return $filter_enable_card;
124 $tmp=
$cn->get_row(
"select f_id,ag_id from action_person where ap_id=$1 ", [$p_action_person_id]);
133 throw new Exception (_(
"CMCDO01".
"Security"));
136 $aIdentity=
$cn->get_row(
"select (select ad_value from fiche_detail where f_id=$1 and ad_id=1) as name ,
137 (select ad_value from fiche_detail where f_id=$1 and ad_id=32) as first_name ,
138 (select ad_value from fiche_detail where f_id=$1 and ad_id=23) as qcode ",[
$fiche_id]);
141 $cn->exec_sql(
"insert into action_person_option (ap_value,contact_option_ref_id ,action_person_id )
142 select null,cor_id,$1
143 from contact_option_ref
146 select contact_option_ref_id
147 from action_person_option
148 join action_person a on (a.ap_id=action_person_id)
152 $cn->exec_sql(
"delete
153 from action_person_option apo
154 where contact_option_ref_id not in
155 (select contact_option_ref_id from jnt_document_option_contact jdoc join action_gestion on
156 (ag_type=document_type_id)
157 where ag_id=$1 and jdoc_enable=1)",[
$ag_id]);
160 $sql=
"select ap_id,cor_id,ap_value,cor_type ,cor_label,cor_value_select
161 from contact_option_ref cor
162 join action_person_option apo on (cor.cor_id=apo.contact_option_ref_id)
163 where action_person_id=$1 order by cor_label ";
165 $a_option=
$cn->get_array(
$sql,[$p_action_person_id]);
166 require NOALYSS_TEMPLATE.
"/card_multiple_display_option.php";
record_log($p_message)
Record an error message into the log file of the server.
sql_string($p_string)
Fix the problem with the quote char for the database.
global $g_user
if no group available , then stop
in follow-up , add multiple cards to an event, an action
$sql
SQL with the right column name.
display_option($p_action_person_id)
@global type $g_user