MINI MINI MANI MO

Path : /home/lhcar/www/inc/
File Upload :
Current File : /home/lhcar/www/inc/popup_04.php

<?
require "$_SERVER[DOCUMENT_ROOT]/config/config.php"; 
include ($_SERVER['DOCUMENT_ROOT']."/_common/common.php");
$connect = dbconn();

	if($loginUsort != "superadmin" && $loginUsort != "admin"){
		movepage("/");
		exit;
	}

if($idx){
	$row = Row_string("SELECT * FROM salesperson WHERE idx='$idx'");
	$phone=explode("-",$row[s_phone]);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>영업사원등록</title>
<link href="/css/style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="/css/admin.css">
<style>
input { border:1px solid #666666}
</style>
</head>
<body>
<iframe name="HiddenFrm" id="HiddenFrm" style="display:none;"></iframe>
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0" style="margin:20px;">
  <tr>
    <td height="20" align="left"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <!--tr>
      	<td height="40" align="left" valign="middle">
          <input type="submit" name="Submit2223322" value="낙찰자용" class="buttona33" onClick="javascript:location.href='/inc/popup_02.php?auct_idx=<?=$auct_idx?>'">
          <input type="submit" name="Submit2223322" value="출품자용" class="button33" onClick="javascript:location.href='/inc/popup_02_2.php?auct_idx=<?=$auct_idx?>'">
         
       </td>
      </tr--> <tr>
      	<td height="40" align="center" valign="middle">
        <input type="button" value="영업사원등록수정" class="buttona33" style="background-color:#0033CC; color:#FFFFFF" onClick="javascript:location.href='popup_04.php'">
          <input type="button" value="거래처등록수정" class="buttona33" style="background-color:#0033CC; color:#FFFFFF" onClick="javascript:location.href='popup_05.php'">
          <input type="button" value="거래처담당자등록수정" class="button33" style="background-color:#0033CC; color:#FFFFFF" onClick="javascript:location.href='popup_06.php'">       </td>
      </tr>
      <tr>
        <td height="40" align="center" valign="middle"><strong>⊙ 영업사원등록</strong> </td>
        </tr>
      <tr>
        <td height="1" align="left" valign="middle" bgcolor="#CCCCCC"></td>
      </tr>
      <tr>
        <td height="10" align="left" valign="middle" >&nbsp;</td>
      </tr>
    </table>
    </td>
  </tr>
  <tr>
    <td height="20" align="left" ><table width="100%"  style="border-collapse:collapse;" border="1" bordercolor="edecec"  cellspacing="0" cellpadding="0">
<form name="join" method="post" action="/admin/sub02/proc.php" target="HiddenFrm">
<input type="hidden" name="salesperson" value="write" />
<input type="hidden" name="idx" value="<?=$idx?>" />
<input type="hidden" name="popup" value="Y" />
      <tr>
        <td width="21%" height="35" align="center" bgcolor="#F6F6F6"><strong>이름</strong></td>
        <td width="28%" align="center" bgcolor="#F6F6F6"><strong>연락처</strong></td>
        <td width="43%" align="center" bgcolor="#F6F6F6"><strong>비고</strong></td>
        <td width="8%" align="center" bgcolor="#F6F6F6"><strong>관리</strong></td>
      </tr>
      <tr style="cursor:pointer">
        <td height="35" align="center" bgcolor="#FFFFFF"><input type="text" name="s_name"   style="width:95%" value="<?=$row[s_name]?>"/></td>
        <td height="30" align="center" bgcolor="#FFFFFF"><input type="text" name="s_phone1"   style="width:25%" value="<?=$phone[0]?>"/>
-
  <input type="text" name="s_phone2" style="width:25%" value="<?=$phone[1]?>"/>
-
<input type="text" name="s_phone3" style="width:25%" value="<?=$phone[2]?>"/></td>
        <td align="center" bgcolor="#FFFFFF" style="padding-left:10px;"><input type="text" name="s_etc" style="width:95%" value="<?=$row[s_etc]?>"/></td>
        <td align="center" bgcolor="#FFFFFF" ><input type="submit" class="btn_red" value="등록"  /></td>
      </tr>
</form>
    </table></td>
  </tr>
  <tr>
    <td height="20" >&nbsp;</td>
  </tr>
  <tr>
    <td height="50" align="right"><span style="padding-left:5px;">
	<form name="search" method="get" >
      <input type="text" name="sear4" value="<?=$sear4?>" style="height:28px;" />
      <input type="submit" class="btn_blue" value="검색" />
	</form>
    </span></td>
  </tr>
  <tr>
    <td height="20" align="left"><table width="100%"  style="border-collapse:collapse;" border="1" bordercolor="edecec"  cellspacing="0" cellpadding="0">
      <tr>
        <td width="7%" height="35" align="center" bgcolor="#F6F6F6"><strong>no</strong></td>
        <td width="12%" align="center" bgcolor="#F6F6F6"><strong>영업번호</strong></td>
        <td width="12%" align="center" bgcolor="#F6F6F6"><strong>이름</strong></td>
        <td width="13%" align="center" bgcolor="#F6F6F6"><strong>연락처</strong></td>
        <td width="42%" align="center" bgcolor="#F6F6F6"><strong>비고</strong></td>
        <td width="8%" align="center" bgcolor="#F6F6F6"><strong>관리</strong></td>
      </tr>
<?
	$tb_name = "salesperson";

	$view_article = 10; // 한화면에 나타날 게시물의 총 개수  
	if (!$page) $page = 1; // 현재 페이지 지정되지 않았을 경우 1로 지정  
	$start = ($page-1)*$view_article; 

	$href = "&sear4=$sear4"; 

	$where = " s_del!='Y' ";

	if($sear4){
		$where .= " and ( s_name  like '%$sear4%' or s_phone like '%$sear4%' or s_etc like '%$sear4%') ";  	

	}

	$query = "select count(*) from $tb_name where $where ";  
	$result = mysql_query($query, $connect);  
	$temp = mysql_fetch_array($result);  
	$total_article = $temp[0]; // 현재 쿼리한 게시물의 총 개수를 구함	

if($total_article > 0){
	$Qry = "SELECT * FROM $tb_name WHERE $where order by idx  desc LIMIT $start, $view_article";
	//echo $Qry;
	$arr = Fetch_string($Qry);
	for($i=0;$i<count($arr);$i++){
		$num = $total_article-$i-(($page-1)*$view_article);
?>
      <tr style="padding:3 0 0 0;" onmouseover="this.bgColor='#d9f3fb'" onmouseout="this.bgColor='#FFFFFF'" bgcolor="#FFFFFF">
        <td height="35" align="center" ><?=$num?></td>
        <td align="center"><?=$arr[$i][sales_code]?></td>
        <td align="center"><?=$arr[$i][s_name]?></td>
        <td align="center"><?=$arr[$i][s_phone]?></td>
        <td align="center"><?=$arr[$i][s_etc]?></td>
        <td align="center"><input type="button" class="btn_red" value="수정" onclick="location.href='popup_04.php?idx=<?=$arr[$i][idx]?>';" /></td>
      </tr>
<?
	}
}
?>
    </table></td>
  </tr>
  <tr>
    <td height="20" >&nbsp;</td>
  </tr>
  <tr>
    <td height="20" align="center" ><? include "../inc/page.php";?></td>
  </tr>
</table>
</body>
</html>

OHA YOOOO