?? activity_edit.php
字號:
<?
########################################
#OsoonCrm
#編輯行動
########################################
include "include/db.inc.php";
include "include/check.inc.php";
include "include/array.inc.php";
if($Submit)
{
//check submit
if(!$ActivityName)
{
echo "請?zhí)顚懶袆又黝}...";
echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"3; url=activity_edit.php\">";
exit;
}
$sql="update $tbl_crm_activity set ActivityName='$ActivityName',ActivityLocation='$ActivityLocation',BeginTime='$BeginTime',EndTime='$EndTime',ActivityMode='$ActivityMode',YuJianSale='$YuJianSale',PeiTongRen='$PeiTongRen',AccountID='$AccountID',ProjectID='$ProjectID',Result='$Result',Memo='$Memo' where ActivityID='$edit'";
mysql_query($sql);
echo "成功編輯行動,請稍候...";
echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"3; url=activity_list.php\">";
exit;
}
include "include/header.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>
<?
$sql="select * from $tbl_crm_activity where ActivityID='$ActivityID'";
$res=mysql_query($sql);
$row=mysql_fetch_array($res);
$sql_account="select * from $tbl_crm_account where AccountOwnerID='$G_uid'";
$res_account=mysql_query($sql_account);
$sql_project="select * from $tbl_crm_project where CreateID='$row[ActivityExecuteID]'";
$res_project=mysql_query($sql_project);
?>
<br>
<form method="post" action="activity_edit.php">
<table width="95%" border="0" cellspacing="0" cellpadding="5" align="center">
<tr>
<td width=50%><b>編輯行動</b><font color="red"> * </font>為必填項(xiàng)</td>
<td width=50% align=right>
<input type="hidden" name="edit" value=<? echo $ActivityID ?>>
<input type="submit" name="Submit" value="編輯行動">
<input type="button" name="button" value="行動列表" onClick="javascript:document.location='activity_list.php';">
</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="ActivityName" value="<? echo $row[ActivityName] ?>">
</td>
<td width="25%">行動地點(diǎn)</td>
<td width="25%">
<input type="text" name="ActivityLocation" value="<? echo $row[ActivityLocation] ?>">
</td>
</tr>
<tr>
<td width="25%">執(zhí)行者</td>
<td width="25%">
<? echo $array_crm_id2user[$G_uid]?>
</td>
<td width="25%">開始時間</td>
<td width="25%">
<input type="text" name="BeginTime" value="<? echo $row[BeginTime]?>">
</td>
</tr>
<tr>
<td width="25%">完成時間</td>
<td width="25%">
<input type="text" name="EndTime" value="<? echo $row[EndTime]?>">
</td>
<td width="25%">行動方式</td>
<td width="25%">
<input type="text" name="ActivityMode" value="<? echo $row[ActivityMode]?>">
</td>
</tr>
<tr>
<td width="25%">預(yù)計費(fèi)用</td>
<td width="25%">
<input type="text" name="YuJianSale" value="<? echo $row[YuJianSale]?>">
</td>
<td width="25%">陪同者</td>
<td width="25%">
<input type="text" name="PeiTongRen" value="<? echo $row[PeiTongRen]?>">
</td>
</tr>
<tr>
<td width="25%">所屬客戶</td>
<td>
<select name="AccountID">
<?
while ($row_account=@mysql_fetch_array($res_account))
{
$key = $row_account[AccountID];
$val = $row_account[AccountName];
?>
<option value="<? echo $key?>"<? if($row[AccountID]==$key){echo "selected";} ?>><? echo $val ?></option>
<?
}
?>
</select>
</td>
<td>所屬項(xiàng)目</td>
<td>
<select name="ProjectID">
<?
while ($row_project=@mysql_fetch_array($res_project)) {
$key = $row_project[ProjectID];
$val = $row_project[ProjectName];
?>
<option value="<? echo $key ?>"<? if($row[ProjectID]==$key){echo "selected";} ?>><? echo $val ?></option>
<?
}
?>
</select>
</td>
</tr>
<tr>
<td width="25%">行動結(jié)果</td>
<td width="25%">
<input type="text" name="Result" value="<? echo $row[Result] ?>">
</td>
<td width="25%"> </td>
<td width="25%"> </td>
</tr>
<tr>
<td width="25%">備注</td>
<td colspan="3">
<textarea name="Memo" cols="50" rows="6"><? echo $row[Memo] ?></textarea>
</td>
</tr>
</table>
<br>
</form>
<p> </p></td>
</tr>
</table>
<?
include "include/footer.inc.php";
?>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -