📄 contact_folk_add.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_add.php\">";
exit;
}
$sql="insert into $tbl_crm_contact_folk(ContactID,Name,Sex,Relation,Tel,Mobile,Hobby)values('$contactid','$name','$sex','$relation','$tel','$mobile','$hobby')";
mysql_query($sql);
echo "成功新建家庭成员,请稍候...";
echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"3; url=contact_view.php?viewid=".$contactid."\">";
exit;
}
$sql="select * from $tbl_crm_contact where ContactID='$addid'";
$res=mysql_query($sql);
$row=mysql_fetch_array($res);
include "include/header.inc.php";
include "include/array.inc.php";
?>
<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_add.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"></td>
<td width="25%">性别<font color="red">*</font></td>
<td width="25%"><input type="radio" name="sex" value="1" checked>男<input type="radio" name="sex" value="0">女</td>
</tr>
<tr>
<td width="25%">与联系人关系<font color="red">*</font></td>
<td width="25%"><input type="text" name="relation"></td>
<td width="25%">电话</td>
<td width="25%"><input type="text" name="tel"></td>
</tr>
<tr>
<td width="25%">移动电话</td>
<td width="25%"><input type="text" name="mobile"></td>
<td width="25%">个人爱好</td>
<td width="25%"><input type="text" name="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="contactid" value="<? echo $addid ?>">
<input type="submit" disabled name="Submit" value="新建家庭成员">
<input type="button" name="Button" value="返回联系人" onclick="javascript:history.back();";>
<?
}
else
{
?>
<input type="hidden" name="contactid" value="<? echo $addid ?>">
<input type="submit" name="Submit" value="新建家庭成员">
<input type="button" name="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 + -