noalyss Version-9
contact-summary.php
Go to the documentation of this file.
1<?php
2/**
3 * @brief display table of contact, called from Contact::summary
4 *
5 */
6// From calling script : $step_contact,$bar,$offset,$page
9$from=$http->request("ac","string","");
10?>
11<?php echo $bar;?>
12<table id="contact_tb" class="sortable">
13 <TR>
14 <th><?=_('Code')?></th>
15 <th><?=_('Nom')?></th>
16 <th><?=_('Prénom')?></th>
17 <th><?=_('Société')?></th>
18 <th><?=_('Mobile')?></th>
19 <th><?=_('email')?></th>
20 <th><?=_('Téléphone')?></th>
21 <th><?=_('Fax')?></th>
22 </TR>
23 <?php
26 $ac=$http->request('ac');
27 foreach ($step_contact as $contact):
28 $even_odd=($idx%2==0)?'even':'odd';
29 $idx++;
30 $url=NOALYSS_URL."/do.php?".http_build_query(["gDossier"=>$dossier_id,"ac"=>$ac,"sb"=>"detail","f_id"=>$contact['f_id']]);
31 ?>
32 <tr class="<?=$even_odd?>">
33 <td>
34 <?php if ( strpos($from,'CONTACT') !== false ):?>
35 <a href="<?=$url?>">
36 <?=h($contact['contact_qcode'])?>
37 </a>
38 <?php else :?>
39 <?php
40 $fiche=new Fiche($cn,$contact['f_id']);
41 echo \HtmlInput::card_detail($contact['contact_qcode']);
42 ?>
43 <?php endif;?>
44 </td>
45
46 <td>
47 <?=$contact['contact_name']?>
48 </td>
49 <td>
50 <?=$contact['contact_fname']?>
51 </td>
52 <td>
53 <?php
54
55 /* detail for the company */
56 if ( !empty ($contact['contact_company']) ) {
57 $l_company=new Fiche($cn);
58 $l_company->get_by_qcode(trim($contact['contact_company']),false);
59 $l_company_name=$l_company->strAttribut(ATTR_DEF_NAME,0);
60
61 // add popup for detail if the company does exist
62 if ( $l_company_name !="")
63 {
64 echo HtmlInput::card_detail($contact['contact_company'],$l_company_name,'style="text-decoration:underline;"');
65 }
66 }
67
68 ?>
69 </td>
70 <td>
71 <?=phoneTo($contact['contact_mobile'])?>
72 </td>
73 <td>
74 <?php
75 echo mailTo($contact['contact_email']);
76 ?>
77 </td>
78 <td>
79 <?=phoneTo($contact['contact_phone'])?>
80 </td>
81 <td>
82 <?=FaxTo($contact['contact_fax'])?>
83 </td>
84 </tr>
85 <?php endforeach;?>
86</table>
87
88<?php echo $bar;?>
phoneTo($p_tel)
compose a HTML string with phone
Definition: ac_common.php:1602
th($p_string, $p_extra='', $raw='')
Definition: ac_common.php:58
mailTo($p_email)
compose a HTML string with email
Definition: ac_common.php:1615
tr($p_string, $p_extra='')
Definition: ac_common.php:88
td($p_string='', $p_extra='')
surround the string with td
Definition: ac_common.php:83
FaxTo($p_tel)
compose a HTML string with fax
Definition: ac_common.php:1642
if(!headers_sent()) else
h( $row[ 'oa_description'])
static id()
return the 'gDossier' value after a check
static connect()
define Class fiche and fiche def, those class are using class attribut. When adding or modifing new c...
Definition: fiche.class.php:38
static card_detail($p_qcode, $pname='', $p_style="", $p_nohistory=false, $nofollowup=false)
show the detail of a card
manage the http input (get , post, request) and extract from an array
$all table
const ATTR_DEF_NAME
Definition: constant.php:216
$cn
display table of contact, called from Contact::summary
endforeach
$dossier_id