Esempio n. 1
0
		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>
       <?php 
echo "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" id=\"table_border\">";
$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);
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>会员删除</title>
</head>
<body>
<?php 
require_once dirname(__FILE__) . "/include/config_base.php";
require_once dirname(__FILE__) . "/include/config_rglobals.php";
if ($id == '') {
    ShowMsg('非法的执行操作', 'guest_group.php');
}
//检测分类的等级
$username = str_replace($cfg_cookie_encode, '', $_COOKIE["VioomaUserID"]);
$dsql = new Dedesql(false);
$query = "select * from #@__group where id='{$id}'";
$dsql->Setquery($query);
$dsql->Execute();
$rowcount = $dsql->GetTotalRow();
if ($rowcount == 0) {
    //非法ID
    ShowMsg('执行了非法的操作', '-1');
} else {
    $dsql->ExecuteNoneQuery("delete from #@__group where id='{$id}'");
    WriteNote('成功删除会员分组资料(ID为' . $id . ')', getdatetimemk(time()), getip(), $username);
    ShowMsg('成功删除会员分组资料', 'guest_group.php');
}
$dsql->close();
?>
</body>
</html>
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();
}