add_contact.php3
来自「FIREFLY 是一个多用户专业帮助桌面系统」· PHP3 代码 · 共 176 行
PHP3
176 行
<?################################################################## ADD CONTACT FORM##################################################################$access_level=100;include ("../include/config.php3");if (!isset($mode)) $mode='add';if ($mode=='add'){ $title=$msg_add_contact; include "../include/header.inc"; $datas[0]['per_cmp_id'] = $cmp_hier_id; $datas[0]['per_cmp_name'] = $cmp_name_flat;}else{ $title="Edit Contact"; include "../include/header.inc"; if (isset($per_id) && ($per_id>0)) { $datas=SQL_READ_CONTACT($dbproc, $per_id); $datas=STRIP_SLASHES($datas); $tres=SQL_READ_ENTITY($dbproc,$datas[0]['ent_id']); $cmp_hier_id=$tres[0]['ent_hier_id']; $cmp_id=SQL_ENTID_TO_CMPID($dbproc, $cmp_hier_id); $tres=SQL_READ_CMP($dbproc, $cmp_id); if (is_array($tres)) { $datas[0]['per_cmp_id'] =$tres[0]['cmp_id']; $datas[0]['per_cmp_name'] =$tres[0]['cmp_name']; } }}?><SCRIPT>function verif_plnf(){ if (window.document.forms[0].per_lastname_flat.value=='') { window.document.forms[0].per_lastname_flat.value= prompt('vous devez renseigner le champ nom de famille'); }}</SCRIPT><form action="add_contact_do.php3?mode=<?echo $mode?>" method="get" target="_self" ><table cellspacing=0 border=0 cellpadding=0 width="90%"><tr> <td class='color_title' colspan=1 > <H1><? if ($mode=='add') echo $msg_add_contact; else echo $msg_edit_contact ?> </H1> </td></tr><tr></tr><tr> <td class='color_title' colspan=1 > <b> <? echo $msg_general_infos ?> </b> </td></tr><tr> <td class='tdcl' colspan=1> <table> <tr> <td class='tdcr'> <? echo $msg_cont_civility ?> </td> <td class='tdcl'> <? SQL_TBL_TO_SELECT($dbproc,"refcivility", "civ_id", "civ_lbl","html","civility_short", $datas[0]['per_civility_short']);?> </td> <td class='tdcl'> <? SQL_TBL_TO_SELECT($dbproc,"refcivility", "civ_id", "civ_lbl","html","civility_long", $datas[0]['per_civility_long']); ?> </td> <td class='tdcr'> <? echo $msg_cont_lastname ?> </td> <td class='tdcl'> <input type="text" name="per_lastname_flat" size=25 maxlength=255 value="<? echo $datas[0]['per_lastname']; ?>" onBlur="verif_plnf()" "> <a href='search_contact.php3?sender=per_lastname_flat' target='downright'> <img border=0 src='images/search.gif'></a> </td> <td class='tdcr' > <? echo $msg_cont_middleinitial ?> </td> <td class='tdcl'> <input type="text" name="per_middleinitial" size=2 maxlength=255 value="<? echo $datas[0]['per_middleinitial']; ?>"> </td> <td class='tdcr'> <? echo $msg_cont_firstname ?> </td> <td class='tdcl'> <input type="text" name="per_firstname" size=30 maxlength=255 value="<? echo $datas[0]['per_firstname']; ?>"> </td> </tr> </table> </td></tr><tr> <td class='tdcl' colspan=1> <table> <tr> <td class='tdcr'> <? echo $msg_cont_type; ?> </td> <td class='tdcl'> <? SQL_TBL_TO_SELECT($dbproc,"refpertype", "per_typ_id", "per_typ_lbl","html","per_typ_id", $datas[0]['per_typ_id']); ?> </td> <td class='tdcr'> <? echo $msg_cont_comment; ?> </td> <td> <textarea name="per_comment" rows=3 cols=35 ><? echo $datas[0]['per_comment']; ?></textarea> </td> </tr> </table> </td></tr><tr> <td class='tdcl' colspan=1> <table> <tr> <td> <? echo $msg_cont_depends;?><br> <input type="text" name="per_depends" size=45 maxlength=255 value="<? echo $datas[0]['per_cmp_name'];?>" readonly> <a href='search_company.php3?sender=per_depends&sender2=cmp_hier_id' target='downright'> <img border=0 src='../images/search.gif'></a> <input type="hidden" name="cmp_hier_id" value="<? echo $datas[0]['per_cmp_id'];?>"> </td> </tr> </table> </td></tr><tr> <td class='color_title' colspan=1> <table> <tr> <td class='color_title'> </td> <td class='color_title'> <input type="hidden" name="mode" value="<?echo $mode?>"> <input type="submit" name="submit " value="<? if ($mode=="add") echo $msg_add_contact; else echo $msg_edit_contact ?>" onClick="verif_plnf()"> <input type="hidden" name="per_id" value="<? echo $per_id?>"> </td> <td class='color_title'> <input type="reset" name="reset" value="<?echo $msg_reset ?>"> </td> <td class='color_title' colspan =3 > </td> </tr> </table></tr></table></tr></table></form><? include "../include/footer.inc";?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?