else
document.forms[0].s_e.value="元/件";
}
</script>
</head>
<body>
<?php 
$esql = new Dedesql(false);
$query = "select * from #@__staff where id='{$id}'";
$esql->SetQuery($query);
$esql->Execute();
if ($esql->GetTotalRow() == 0) {
    ShowMsg('非法调用参数,请重试', '-1');
    exit;
}
$row = $esql->GetOne($query);
$esql->close();
?>
<table width="100%" border="0" id="table_style_all" cellpadding="0" cellspacing="0">
  <tr>
    <td id="table_style" class="l_t">&nbsp;</td>
    <td>&nbsp;</td>
    <td id="table_style" class="r_t">&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>
	<table width="100%" border="0" cellpadding="0" cellspacing="2">
     <tr>
      <td><strong>&nbsp;公司员工资料修改</strong></td>
     </tr>
		obj.style.display = "block";
	}else{
		obj.style.display = "none";
	}
}
</script>
<base target="main">
<body>
<div class="menu">
<?php 
if (!empty($_COOKIE["VioomaUserID"])) {
    if ($c == '') {
        $c = 1;
    }
    $msql = new Dedesql(false);
    $query = "select name from #@__menu where id='{$c}'";
    $menuinfo = $msql->GetOne($query);
    $menus = "\r\n<dl>\r\n    <dt><a href='###' onclick=showHide('items" . $c . "') target='_self' class='top'>" . $menuinfo['name'] . "</a></dt>\r\n    <dd id='items" . $c . "' style='display:block;'>\r\n\t\t\t<ul>\r\n~Item~\r\n  \t\t\t</ul>\r\n\t\t</dd>\r\n\t</dl>\r\n";
    $msql->Setquery("select name,url from #@__menu where reid='{$c}'");
    $msql->Execute();
    while ($row = $msql->GetArray()) {
        $iteminfo = $iteminfo . "\r\n<li><a href='" . $row['url'] . "' target='main'>" . $row['name'] . "</a></li>\r\n";
    }
    $menus = str_replace("~Item~", $iteminfo, $menus);
    echo $menus . $endmenus;
    $msql->close();
}
?>
</div>
</body>
</html>
$csql = new Dedesql(false);
if ($pid == '') {
    //初始状态
    if ($action == 'normal') {
        $csql->SetQuery("select * from #@__saleback where rdh='{$did}'");
    } else {
        $csql->SetQuery("select * from #@__saleback where id<0");
    }
} else {
    if ($action == '' && $did != '') {
        //写入产品记录
        $wsql = new Dedesql(false);
        $writesql = "select * from #@__basic where cp_number='{$pid}'";
        $wsql->Setquery($writesql);
        $wsql->Execute();
        $wrs = $wsql->GetOne();
        $wsql->ExecuteNoneQuery("insert into #@__saleback(productid,number,rdh,dtime,r_text) values('" . $pid . "','" . $num . "','" . $did . "','" . GetDateTimeMk(time()) . "','" . $r_text . "')");
        $wsql->close();
    }
    $csql->SetQuery("select * from #@__saleback where rdh='{$did}'");
}
$csql->Execute();
$rowcount = $csql->GetTotalRow();
if ($rowcount == 0) {
    echo "<tr><td>&nbsp;</td></tr>";
} else {
    echo "<tr class='row_color_head'><td>货号</td><td>名称</td><td>规格</td><td>分类</td><td>单位</td><td>售价</td><td>退回原因<td>退回数量</td><td>删除</tr>";
    while ($row = $csql->GetArray()) {
        $nsql = new dedesql(false);
        $query1 = "select * from #@__basic where cp_number='" . $row['productid'] . "'";
        $nsql->setquery($query1);
<?php 
require_once dirname(__FILE__) . "/include/config_base.php";
require_once dirname(__FILE__) . "/include/config_rglobals.php";
if ($id == '') {
    ShowMsg('非法的执行操作', 'system_lab.php');
}
//检测分类的等级
$username = str_replace($cfg_cookie_encode, '', $_COOKIE["VioomaUserID"]);
$dsql = new Dedesql(false);
$query = "select * from #@__lab where id='{$id}'";
$dsql->Setquery($query);
$dsql->Execute();
$rowcount = $dsql->GetTotalRow();
if ($rowcount == 0) {
    //非法ID
    ShowMsg('执行了非法的操作', '-1');
} else {
    $row = $dsql->GetOne();
    if ($row['l_default'] == 1) {
        ShowMsg('你不能删除的系统默认的仓库!', '-1');
        exit;
    }
    $dsql->ExecuteNoneQuery("delete from #@__lab where id='{$id}'");
    WriteNote('成功删除仓库资料(ID为' . $id . ')', getdatetimemk(time()), getip(), $username);
    ShowMsg('成功删除公司仓库资料', 'system_lab.php');
}
$dsql->close();
?>
</body>
</html>
    $logindate = getdatetimemk(time());
    $username = str_replace($cfg_cookie_encode, '', $_COOKIE['VioomaUserID']);
    WriteNote('修改产品基本信息' . $cp_name . ' 成功', $logindate, $loginip, $username);
    $bsql->close();
    exit;
}
$seekrs = new Dedesql(falsh);
$squery = "select * from #@__basic where id='{$id}'";
$seekrs->SetQuery($squery);
$seekrs->Execute();
$rowcount = $seekrs->gettotalrow();
if ($rowcount == 0) {
    Showmsg('非法的参数', '-1');
    exit;
}
$row = $seekrs->GetOne();
$seekrs->close();
?>
<body onload="form1.cp_tm.focus()">
<table width="100%" border="0" id="table_style_all" cellpadding="0" cellspacing="0">
  <tr>
    <td id="table_style" class="l_t">&nbsp;</td>
    <td>&nbsp;</td>
    <td id="table_style" class="r_t">&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>
	<table width="100%" border="0" cellpadding="0" cellspacing="2">
     <tr>
      <td><strong>&nbsp;产品基本信息管理</strong>(注:橙色背景为必填选项)&nbsp;&nbsp;- <a href="system_basic_cp.php">新产品登记</a> - <a href="system_basic_cp.php?action=seek">产品基本信息查询</a></td>
function get_name($id, $type)
{
    $getrs = new Dedesql(falsh);
    switch ($type) {
        case "dw":
            $query = "select dwname from #@__dw where id='{$id}'";
            $getrs->Setquery($query);
            $getrs->execute();
            $row = $getrs->GetOne();
            return $row['dwname'];
            break;
        case "categories":
            $query = "select categories from #@__categories where id='{$id}'";
            $getrs->Setquery($query);
            $getrs->execute();
            $row = $getrs->GetOne();
            return $row['categories'];
            break;
        case "name":
            $query = "select cp_name from #@__basic where cp_number='{$id}'";
            $getrs->Setquery($query);
            $getrs->execute();
            $row = $getrs->GetOne();
            return $row['cp_name'];
            break;
        case "gg":
            $query = "select cp_gg from #@__basic where cp_number='{$id}'";
            $getrs->Setquery($query);
            $getrs->execute();
            $row = $getrs->GetOne();
            return $row['cp_gg'];
            break;
        case "gys":
            $query = "select cp_gys from #@__basic where cp_number='{$id}'";
            $getrs->Setquery($query);
            $getrs->execute();
            $row = $getrs->GetOne();
            return $row['cp_gys'];
            break;
        case "dwname":
            $query = "select cp_dwname from #@__basic where cp_number='{$id}'";
            $getrs->Setquery($query);
            $getrs->execute();
            $row = $getrs->GetOne();
            return $row['cp_dwname'];
            break;
        case "lab":
            $query = "select l_name from #@__lab where id='{$id}'";
            $getrs->Setquery($query);
            $getrs->execute();
            $row = $getrs->GetOne();
            return $row['l_name'];
            break;
        case "bcate":
            $query = "select cp_categories from #@__basic where cp_number='{$id}'";
            $getrs->Setquery($query);
            $getrs->execute();
            $row = $getrs->GetOne();
            return $row['cp_categories'];
            break;
        case "scate":
            $query = "select cp_categories_down from #@__basic where cp_number='{$id}'";
            $getrs->Setquery($query);
            $getrs->execute();
            $row = $getrs->GetOne();
            return $row['cp_categories_down'];
            break;
    }
    $getrs->close();
}