📄 display_contact.php3
字号:
<?################################################################## DISPLAY CONTACT#################################################################/* init */$access_level=200;include ("../include/config.php3");$title= $msg_display_contact;include "../include/header.inc";/* process */if ($user->access_level >= 200) { $edit_details = 0; if ($user->per_id) $per_id = $user->per_id; elseif($user->cmp_id) { $cmp_ent_id = $user->ent_id; $curr_ent_id = SQL_PER_TO_ENTID($dbproc,$per_id); $ok = 0; if ($curr_ent_id) { do { $ent_datas = SQL_READ_ENTITY($dbproc,$curr_ent_id); $ent_hier = $ent_datas[0]['ent_hier_id']; if ($ent_hier == $cmp_ent_id) $ok = 1; $curr_ent_id = $ent_hier; } while($ent_hier); } if (!$ok) $per_id = 0; } }else $edit_details = 1;if (isset($per_id) && ($per_id>0)){ // on renseigne la stucture datas pour les infos de bases $perdatas=SQL_READ_CONTACT($dbproc, $per_id); //echo $perdatas[0]['per_lastname']; // si on recupere des infos en tableau->on affiche if (is_array($perdatas)) { print "<TABLE width='90%' border='0' cellspacing='0' cellpadding='0'><TR><TD>\n"; /* on affiche le contact */ DSP_CONTACT($perdatas,"Contact Infos"); $addrs=SQL_READ_ADRS($dbproc, $perdatas[0]['ent_id']); /* on affiche ses adresses*/ DSP_ADRS($addrs, $msg_addr, $edit_details); $return_page = "display_contact.php3?per_id=$per_id"; $phones=SQL_READ_PHONES($dbproc, $perdatas[0]['ent_id']); DSP_PHONES($phones, $return_page, $edit_details); $mails=SQL_READ_EMAILS($dbproc, $perdatas[0]['ent_id']); DSP_EMAILS($mails, $return_page, $edit_details); /* lient ht vers les formulaires d'ajout*/ if ($user->access_level <= 100) { echo "[<a href='add_address.php3?per_id=".$per_id."&per_name=".urlencode(trim($perdatas[0]['per_lastname']))."&ent_id=".$perdatas[0]['ent_id']."'>$msg_add_adress</a>]"; echo "[<a href='phone_form.php3?mode=add&ent_id=".$perdatas[0]['ent_id']."&return_page=".rawurlencode($return_page)."'>$msg_add_phone</a>] "; echo "[<a href='uri_form.php3?mode=add&ent_id=".$perdatas[0]['ent_id']."&return_page=".rawurlencode($return_page)."'>$msg_add_mail</a>] "; } if ($user->access_level <= 100) echo "[<a href='add_contact.php3?per_id=". $per_id."&mode=edit'>$msg_edit</a>]"; print "</TD></TR></TABLE>\n"; } else { echo "pas de contact"; } } include "../include/footer.inc";?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -