⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 project_edit.php

📁 CRM 不仅仅是一个管理名词和管理概念
💻 PHP
字号:
<?
	########################################
	#OsoonCrm
	#项目详细信息
	########################################
		
	include "include/db.inc.php";
	include "include/check.inc.php";
	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 align=center> 
      <br>
<?
	// 项目详细信息
	$sql="select * from $tbl_crm_project where ProjectID='$pid'";
	$res=mysql_query($sql);
	$row=@mysql_fetch_array($res);
	$aid = $row[AccountID];
	
	// 客户信息
	$sql="select * from $tbl_crm_account where AccountID='$aid'";
	$res=mysql_query($sql);
	$row_a=@mysql_fetch_array($res);
?>
<?
	// 功能按钮
	$btn_edit = " <input type=submit value=\"保存\" style=\"width:60\"> ";
	$btn_cancel = " <input type=button value=\"取消\" style=\"width:60\" onclick=\"javascript:history.back()\"> ";
	$btn_list = " <input type=button value=\"返回列表\" style=\"width:60\" onclick=\"javascript:document.location='project_list.php'\"> ";
	
	$btn_display = $btn_edit.$btn_cancel.$btn_list;
?>
      <form method="post" action="project_man.php">
      <input type="hidden" name="pid" value="<? echo $pid ?>">
      <input type="hidden" name="action" value="edit">
      <table width="95%" border="0" cellspacing="0" cellpadding="5" align="center">
        <tr> 
          <td width="50%"><b>项目详细信息</b> <font color="red"> * </font>为必填项</td>
          <td width="50%" align=right> 
            <? echo $btn_display; ?>
          </td>
        </tr>
      </table>
      <hr width=95% align=center>
        <table width="95%" border="0" cellspacing="0" cellpadding="5" align="center" bgcolor="#ede5d2" bordercolor="#FFFFFF">
          <tr> 
          <td colspan="2"><b>基本信息</b> </td>
        </tr>
      </table>
        <table width="95%" border="1" cellspacing="0" cellpadding="5" align="center" bgcolor="#F5F1E9" bordercolor="#ede5d2">
          <tr> 
          <td width="25%">项目名 <font color=red>*</font></td>
          <td width="25%"><input type="text" size="30" name="ProjectName" value="<? echo $row[ProjectName]; ?>"></td>
          <td width="25%">销售额(元)</td>
          <td width="25%"><input type="text" size="30" name="ProjectSale" value="<? echo $row[ProjectSale]; ?>"></td>
        </tr>
        <tr> 
          <td width="25%">项目编号 </td>
          <td width="25%"><input type="text" size="30" name="ProjectSN" value="<? echo $row[ProjectSN]; ?>"></td>
          <td width="25%">可能性(%)</td>
          <td width="25%"><input type="text" size="30" name="Possibility" value="<? echo $row[Possibility]; ?>"></td>
        </tr>
        <tr> 
          <td width="25%">项目阶段</td>
          <td width="25%">
			  <select name="JieDuan">
			  	<option value=""></option>
<?
	while (list($key, $val) = each($array_crm_jieduan)) {
		if ($key == $row[JieDuan])
			echo "<option value=\"$key\" selected>$val</option>";
		else
			echo "<option value=\"$key\">$val</option>";
	}
?>
			  </select>
          </td>
          <td width="25%">项目状态</td>
          <td width="25%">
			  <select name="ProjectState">
			  	<option value=""></option>
<?
	while (list($key, $val) = each($array_crm_project_state)) {
		if ($key == $row[ProjectState])
			echo "<option value=\"$key\" selected>$val</option>";
		else
			echo "<option value=\"$key\">$val</option>";
	}
?>
			  </select>
          </td>
        </tr>
        <tr> 
          <td width="25%">项目来源</td>
          <td width="25%">
			  <select name="ProjectSource">
			  	<option value=""></option>
<?
	while (list($key, $val) = each($array_crm_source)) {
		if ($key == $row[ProjectSource])
			echo "<option value=\"$key\" selected>$val</option>";
		else
			echo "<option value=\"$key\">$val</option>";
	}
?>
			  </select>
          </td>
          <td width="25%">项目确立时间</td>
          <td width="25%"><input type="text" size="10" name="BeginTime" value="<? echo $row[BeginTime]; ?>"></td>
        </tr>
        <tr> 
          <td width="25%">项目结果</td>
          <td width="25%">
          	<input id="successful_1" type="radio" name="Successful" value="1" disabled>
          	<label for="successful_1" disabled>成功</label>
          	<input id="successful_0" type="radio" name="Successful" value="0" disabled>
          	<label for="successful_0" disabled>失败</label>
          </td>
          <td width="25%">预计结束时间</td>
          <td width="25%"><input type="text" size="10" name="EndTime" value="<? echo $row[EndTime]; ?>"></td>
        </tr>
        <tr> 
          <td width="25%">关 闭</td>
          <td width="25%"><? if ($row[Closed]) echo $array_crm_id2user[$row[CloseID]]; ?>&nbsp;</td>
          <td width="25%">项目关闭时间</td>
          <td width="25%"><? echo $row[CloseTime]; ?>&nbsp;</td>
        </tr>
        <tr> 
          <td width="25%">项目简介</td>
          <td colspan=3><textarea name="ProjectContent" style="height:40px;width:400px;"><? echo $row[ProjectContent]; ?></textarea></td>
        </tr>
        <tr> 
          <td width="25%">项目联系人 <font color=red>*</font></td>
          <td colspan=3>
			  <select name="ContactID">
			  	<option value=""></option>
<?
	$sql_tmp = "select ContactID,ContactName from $tbl_crm_contact where $where_account_self";
	$res_tmp = mysql_query($sql_tmp);
	while ($row_tmp=@mysql_fetch_array($res_tmp))
	{
		$key = $row_tmp[0];
		$val = $row_tmp[1];
		
		if ($key == $row[ContactID])
			echo "<option value=\"$key\" selected>$val</option>";
		else
			echo "<option value=\"$key\">$val</option>";
	}
?>
			  </select>
			  <input type=button value="添加联系人" style="width:80" onclick="javascript:document.location='contact_add.php'">
          </td>
        </tr>
        <tr> 
          <td width="25%">所属客户 <font color=red>*</font></td>
          <td colspan=3>
			  <select name="AccountID">
			  	<option value=""></option>
<?
	$sql_tmp = "select AccountID,AccountName from $tbl_crm_account where $where_account_self";
	$res_tmp = mysql_query($sql_tmp);
	while ($row_tmp=@mysql_fetch_array($res_tmp))
	{
		$key = $row_tmp[0];
		$val = $row_tmp[1];
		
		if ($key == $row[AccountID])
			echo "<option value=\"$key\" selected>$val</option>";
		else
			echo "<option value=\"$key\">$val</option>";
	}
?>
			  </select>
			  <input type=button value="添加客户" style="width:80" onclick="javascript:document.location='account_add.php'">
          </td>
        </tr>
      </table>
      </form>
<!--
      <table width="95%" border="0" cellspacing="0" cellpadding="5" align="center" bgcolor="#ede5d2" bordercolor="#FFFFFF">
        <tr> 
          <td colspan="2"> <b>所属客户</b></td>
        </tr>
      </table>
      <table width="95%" border="1" cellspacing="0" cellpadding="5" align="center" bgcolor="#F5F1E9" bordercolor="#ede5d2">
        <tr> 
          <td width="25%">客户名称</td>
          <td width="25%"><? echo $row_a[AccountName]; ?>&nbsp;</td>
          <td width="25%">电话</td>
          <td width="25%"><? echo $row_a[Tel]; ?>&nbsp;</td>
        </tr>
        <tr> 
          <td width="25%">类型</td>
          <td width="25%"><? echo $array_crm_account_type[$row_a[AccountType]]; ?>&nbsp;</td>
          <td width="25%">网站</td>
          <td width="25%"><? echo $row_a[WebSite]; ?>&nbsp;</td>
        </tr>
        <tr> 
          <td width="25%">行业</td>
          <td colspan="3"><? echo $array_crm_account_industry[$row_a[AccountIndustry]]; ?>&nbsp;</td>
        </tr>
        <tr> 
          <td width="25%">地址</td>
          <td colspan="3"><? echo $row_a[Address]; ?>&nbsp;</td>
        </tr>
      </table>
      <br>

      <table width="95%" border="0" cellspacing="0" cellpadding="5" align="center" bgcolor="#ede5d2" bordercolor="#FFFFFF">
        <tr> 
          <td colspan="2"> <b>创建者/修改者</b></td>
        </tr>
      </table>
      <table width="95%" border="1" cellspacing="0" cellpadding="5" align="center" bgcolor="#F5F1E9" bordercolor="#ede5d2">
        <tr> 
          <td width="25%" height="21">创建者</td>
          <td width="25%" height="21"><? echo $array_crm_id2user[$row[CreateID]]; ?>&nbsp;</td>
          <td width="25%" height="21">修改者</td>
          <td width="25%" height="21"><? echo $array_crm_id2user[$row[ModifyID]]; ?>&nbsp;</td>
        </tr>
        <tr> 
          <td width="25%">创建时间</td>
          <td width="25%"><? echo $row[CreateTime]; ?>&nbsp;</td>
          <td width="25%">修改时间</td>
          <td width="25%"><? echo $row[ModifyTime]; ?>&nbsp;</td>
        </tr>
      </table>
-->
      <p></p>
    </td>
  </tr>
</table>
<? include "include/footer.inc.php"; ?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -