📄 contact_folk_edit.php
字号:
<?
########################################
#OsoonCrm
#联系人家庭成员-编辑
########################################
include "include/db.inc.php";
include "include/check.inc.php";
if($Submit)
{
//check submit
if(!$name OR !$relation)
{
echo "请填写所有必须填写的信息..";
echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"3; url=contact_folk_edit.php?ContactID=".$contact."&FolkID=".$edit."\">";
exit;
}
$sql="update $tbl_crm_contact_folk set Name='$name',Sex='$sex',Relation='$relation',Tel='$tel',Mobile='$mobile',Hobby='$hobby' where FolkID='$edit'";
mysql_query($sql);
echo "成功编辑家庭成员,请稍候...";
echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"3; url=contact_view.php?viewid=".$contact."\">";
exit;
}
include "include/header.inc.php";
include "include/array.inc.php";
$sql="select * from $tbl_crm_contact where ContactID='$ContactID'";
$res=mysql_query($sql);
$row=mysql_fetch_array($res);
$sql_folk="select * from $tbl_crm_contact_folk where FolkID='$FolkID'";
$res_folk=mysql_query($sql_folk);
$row_folk=mysql_fetch_array($res_folk);
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="90%">
<tr valign=top>
<td width="201">
<?
include "include/left.inc.php";
?>
</td>
<td> <br>
<form method="post" action="contact_folk_edit.php">
<table width="95%" border="0" cellspacing="0" cellpadding="5" align="center">
<tr>
<td><b>编辑家庭成员</b> <font color="red">*</font>为必须填写的信息</td>
</tr>
</table>
<hr width=95% align=center>
<table width="95%" border="1" cellspacing="0" cellpadding="5" align="center" bgcolor="#F5F1E9" bordercolor="#FFFFFF">
<tr>
<td width="25%">家庭成员姓名<font color="red">*</font></td>
<td width="25%"><input type="text" name="name" value=<? echo $row_folk[Name]?>></td>
<td width="25%">性别<font color="red">*</font></td>
<td width="25%"><input type="radio" name="sex" value="1" <?if($row_folk[Sex]=='1'){echo "checked";}?>>男<input type="radio" name="sex" value="0" <?if($row_folk[Sex]=='0'){echo "checked";}?>>女</td>
</tr>
<tr>
<td width="25%">与联系人关系<font color="red">*</font></td>
<td width="25%"><input type="text" name="relation" value=<? echo $row_folk[Relation]?>></td>
<td width="25%">电话</td>
<td width="25%"><input type="text" name="tel" value=<? echo $row_folk[Tel]?>></td>
</tr>
<tr>
<td width="25%">移动电话</td>
<td width="25%"><input type="text" name="mobile" value=<? echo $row_folk[Mobile]?>></td>
<td width="25%">个人爱好</td>
<td width="25%"><input type="text" name="hobby" value=<? echo $row_folk[Hobby]?>></td>
</tr>
</table>
<table width="95%" border="0" cellspacing="0" cellpadding="5" align="center">
<tr>
<td>
<?
// 如果不是自己的联系人
if ($row[AddID] != $G_uid)
{
?>
<input type="hidden" name="contact" value="<? echo $ContactID ?>">
<input type="hidden" name="edit" value="<? echo $FolkID ?>">
<input type="submit" disabled name="Submit" value="编辑家庭成员">
<input type="button" value="返回联系人" onclick="javascript:history.back();";>
<?
}
else
{
?>
<input type="hidden" name="contact" value="<? echo $ContactID ?>">
<input type="hidden" name="edit" value="<? echo $FolkID ?>">
<input type="submit" name="Submit" value="编辑家庭成员">
<input type="button" value="返回联系人" onclick="javascript:history.back();";>
<?
}
?>
</td>
</tr>
</table>
</form>
<p> </p></td>
</tr>
</table>
<?
include "include/footer.inc.php";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -