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

📄 job_kf_info.php

📁 开源的OA系统
💻 PHP
📖 第 1 页 / 共 2 页
字号:
<?php
session_start();
include "middle.php";
require_once  "../MessageBox.php";
$Message = new MessageBox;
if ( !empty($_SESSION["userid"])) { 
include "../datasource.inc.php";
$page             = $_REQUEST['page'];
$id               = $_REQUEST['id'];
$action           = $_REQUEST['action'];
$job_body         = str_replace("\n", "<BR>", $_REQUEST['job_body']);
$date             = Date("Y-m-j");	
if ($action == 'add') {
   $sql     = "insert into job_kf (id,userid,date,job_name,job_y,job_phone,job_address,job_email,job_qq,job_company,job_http,job_fl,job_body) values ('','$_SESSION[userid]','$date','$_REQUEST[job_name]','$_REQUEST[job_y]','$_REQUEST[job_phone]','$_REQUEST[job_address]','$_REQUEST[job_email]','$_REQUEST[job_qq]','$_REQUEST[job_company]','$_REQUEST[job_http]','$_REQUEST[job_fl]','$job_body');";    
   $result  = mysql_query($sql);
   
   $Message->setMessage("添加成功!","job_kf_info.php");
   $Message->showMessage();
}	
if ($_REQUEST['action'] == 'update') {
   $sql     = "update job_kf set date='$date',job_name='$_REQUEST[job_name]',job_y='$_REQUEST[job_y]',job_phone='$_REQUEST[job_phone]',job_address='$_REQUEST[job_address]',job_email='$_REQUEST[job_email]',job_qq='$_REQUEST[job_qq]',job_company='$_REQUEST[job_company]',job_http='$_REQUEST[job_http]',job_fl='$_REQUEST[job_fl]',job_body='$job_body' where  id='$_REQUEST[id]';";    
   $result  = mysql_query($sql);
   $Message->setMessage("编辑成功!","job_kf_info.php");
   $Message->showMessage();
}
?>
<link href="../css/a1.css" rel="stylesheet" type="text/css">
<body leftmargin="0" topmargin="0">
<table width="789" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td colspan="2"><img src="../images/home_12.jpg" width="789" height="12"></td>
  </tr>
  <tr>
    <td width="776" valign="top">
	
<table width="700" border="0" cellspacing="0" cellpadding="0">
        <tr>
         <TD vAlign=top><FONT color=#565656>&nbsp;&nbsp;<IMG height=14 
      src="../images/closedfold.gif" width=14>&nbsp;&nbsp;您当前的位置<BR>&nbsp;&nbsp;<IMG 
      height=15 src="../images/bar.gif" width=15>&nbsp;&nbsp;<IMG height=14 
      src="../images/openfold.gif" width=14>&nbsp;&nbsp;客户跟踪表</FONT></TD>
        </tr>
</table>
<TABLE width=766 border=0 cellspacing=0 cellpadding=0 align="right">
 <TR><TD width=766 height=1 bgcolor=#3494d4></TD></TR>
</TABLE>
<script language=javascript>
function check_input()
{
	if (document.form.job_name.value=='') {
		alert("请输入客户名称!");
		return false;
	}
	if (document.form.job_phone.value=='') {
		alert("请输入联系电话!");
		return false;
	}
	if (document.form.job_body.value=='') {
		alert("请输入备注内容!");
		return false;
	}
	
 return true;
}
</script>
<?php
switch ($page){
    case "add":
   // if ($_SESSION["userid"]=="admin") {

?>
<center>
<form enctype="multipart/form-data" name=form  method="post" action="job_kf_info.php" onsubmit="return check_input()">
<table border=0 cellpadding=0 cellspacing=1 bgcolor=#333333 width=766>
  <tr> 
    <td width="15%" bgColor=#ffffff align=center>登记时间</td>
    <td width="85%" bgcolor=ffffff> 
      <?php
	  echo "<input type=text size=30 name=job_date maxlength=8 height=24 value=$date>";
	  ?>&nbsp;<font color=red>*</font>&nbsp;号为必填项
    </td>
  </tr>
  <tr> 
    <td width="15%" bgColor=#ffffff align=center>客户名称</td>
    <td width="85%" bgcolor=ffffff> 
      <input type="text" size="30" name="job_name" maxlength="20" height=24>&nbsp;<font color=red>*</font>
    </td>
  </tr>
  <tr> 
    <td width="15%" bgColor=#ffffff align=center>重点跟踪</td>
    <td width="85%" bgcolor=ffffff> 
      <select name="job_y">
	  <option value="一般">一般</option>
	  <option value="重点">重点</option>
	  &nbsp;<font color=red>*</font>
    </td>
  </tr>
  <tr> 
    <td width="15%" bgColor=#ffffff align=center>联系电话</td>
    <td width="85%" bgcolor=ffffff> 
      <input type="text" size="30" name="job_phone" maxlength="40" height=24>&nbsp;<font color=red>*</font>&nbsp;有多个电话、手机请用,分开
    </td>
  </tr>
  <tr> 
    <td width="15%" bgColor=#ffffff align=center>联系地址</td>
    <td width="85%" bgcolor=ffffff> 
      <input type="text" size="30" name="job_address" maxlength="30" height=24>
    </td>
  </tr>
  <tr> 
    <td width="15%" bgColor=#ffffff align=center>联系EMAIL</td>
    <td width="85%" bgcolor=ffffff> 
      <input type="text" size="30" name="job_email" maxlength="60" height=24>
    </td>
  </tr>
  <tr> 
    <td width="15%" bgColor=#ffffff align=center>网络通讯</td>
    <td width="85%" bgcolor=ffffff> 
      <input type="text" size="30" name="job_qq" maxlength="40" height=24>&nbsp;注:OICQ,MSN之类
    </td>
  </tr>  
  <tr> 
    <td width="15%" bgColor=#ffffff align=center>公司名称</td>
    <td width="85%" bgcolor=ffffff> 
      <input type="text" size="30" name="job_company" maxlength="30" height=24>
    </td>
  </tr>
  <tr> 
    <td width="15%" bgColor=#ffffff align=center>公司网址</td>
    <td width="85%" bgcolor=ffffff> 
      <input type="text" size="30" name="job_http" maxlength="40" height=24 value=http://>
    </td>
  </tr> 
  <tr> 
    <td width="15%" bgColor=#ffffff align=center>业务类型</td>
    <td width="85%" bgcolor=ffffff> 
    <select name=job_fl>
	  <option value=网站建设>网站建设</option>
	  <option value=虚拟主机>虚拟主机</option>
	  <option value=数据库>数据库</option>	  
	  <option value=域名>域名</option>
	  <option value=主机租用>租用主机</option>	  	  	  
	</select>  
    </td>
  </tr>
  <tr> 
    <td width="15%" bgColor=#ffffff align=center>备注(内容)</td>
    <td width="85%" bgColor=#ffffff><textarea name="job_body" cols="60" rows="10">如:下个月需要做网站!</textarea>&nbsp;<font color=red>*</font></td>
  </tr>  
</table><br>
<input type="hidden" value="add" name="action">
<input type="hidden" name="MAX_FILE_SIZE" value="1000000">
<input type="submit" value="提 交" >&nbsp;&nbsp;<input type="reset"  value="取 消">
</form>
</center>
<?  
    //}
    break;
	case "delete":
         /*$sql              = "select * from job_kf where id='$id';";
         $result           = mysql_query($sql);
         $row              = mysql_fetch_array($result);
         $dele             = `rm $row['job_pic1']`;
		 $dele             = `rm $row['job_pic2']`;
		 $dele             = `rm $row['job_pic3']`;
		 $dele             = `rm $row['job_pic4']`;
		 */ 
	     $query     = "delete from job_kf where id='$id';";
         mysql_query($query);
         $Message->setMessage("删除成功!","job_kf_info.php");
         $Message->showMessage();
		 break;
	case "update":
         $sql              = "select * from job_kf where id='$id';";
         $result           = mysql_query($sql);
         $row              = mysql_fetch_array($result);
         $id               = $row['id'];
         $job_name         = $row['job_name'];
		 $job_body         = str_replace("<BR>", "\n", $row['job_body']);

?>
<form enctype="multipart/form-data" name=form  method="post" action="job_kf_info.php" onsubmit="return check_input()">
<center>
<table border=0 cellpadding=0 cellspacing=0 width=776>
 <tr><td width=10 bgcolor=#ffffff>&nbsp;</td>
 <td><table border=0 cellpadding=0 cellspacing=1 bgcolor=#3494d4 width=766>
  <tr> 
    <td width="15%" bgColor=#ffffff align=center>登记时间</td>
    <td width="85%" bgcolor=ffffff> 
      &nbsp;<?php
	  echo "<input type=text size=30 name=job_date maxlength=8 height=24 value=$row[date]>";
	  ?>	  
	  &nbsp;<font color=red>*</font>&nbsp;号为必填项
    </td>

  <tr> 
    <td width="15%" bgColor=#ffffff align=center>客户名称</td>
    <td width="85%" bgcolor=ffffff> 
     &nbsp;<?php echo "<input type=text size=30 name=job_name maxlength=20 height=24 value=\"$row[job_name]\">" ?>&nbsp;<font color=red>*</font>
	</td>
  </tr>
  <tr> 
    <td width="15%" bgColor=#ffffff align=center>重点跟踪</td>
    <td width="85%" bgcolor=ffffff> 
      &nbsp;<select name="job_y">
	<?php
	  echo "<option value=\"$row[job_y]\">$row[job_y]</option>";
	  echo "<option value=\"重点\">重点</option>";	  
	  echo "<option value=\"一般\">一般</option>";	  
	?>
	  &nbsp;<font color=red>*</font>
    </td>
  </tr>
  
  <tr> 
    <td width="15%" bgColor=#ffffff align=center>联系电话</td>
    <td width="85%" bgcolor=ffffff> 
     &nbsp;<?php echo "<input type=text size=30 name=job_phone maxlength=40 height=24 value=\"$row[job_phone]\">" ?>&nbsp;<font color=red>*</font>&nbsp;有多个电话、手机请用,分开    	  
    </td>
  </tr>
  <tr> 
    <td width="15%" bgColor=#ffffff align=center>联系地址</td>
    <td width="85%" bgcolor=ffffff> 
      &nbsp;<?php echo "<input type=text size=30 name=job_address maxlength=30 height=24 value=\"$row[job_address]\">"; ?>    	  	  
    </td>
  </tr>
  <tr> 
    <td width="15%" bgColor=#ffffff align=center>联系EMAIL</td>
    <td width="85%" bgcolor=ffffff> 
      &nbsp;<?php echo "<input type=text size=30 name=job_email maxlength=60 height=24 value=\"$row[job_email]\">"; ?>    	  	  	  
    </td>
  </tr>
  <tr> 
    <td width="15%" bgColor=#ffffff align=center>网络通讯</td>
    <td width="85%" bgcolor=ffffff> 

      &nbsp;<?php echo "<input type=text size=30 name=job_qq maxlength=30 height=24 value=\"$row[job_qq]\">"; ?>&nbsp;注:OICQ,MSN之类    	  	  	  
    </td>
  </tr>  
  <tr> 
    <td width="15%" bgColor=#ffffff align=center>公司名称</td>
    <td width="85%" bgcolor=ffffff> 
      &nbsp;<?php echo "<input type=text size=30 name=job_company maxlength=30 height=24 value=\"$row[job_company]\">"; ?>    	  	  	  	  
    </td>
  </tr>
  <tr> 

⌨️ 快捷键说明

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