<?php
include_once('IsLogined.php');
include_once("../config/templateConfig.inc.php");
include_once("../config/databaseConfig.inc.php");
$purl = $HTTP_SERVER_VARS['HTTP_REFERER'];
$templateMain = new SmartTemplate('Admin_CptEdit.html');
$Qclass = $_GET["class"];
$Qid    = $_GET["ID"];
if (empty($Qclass) || !is_numeric($Qid))
die(参数传递错误！非法操作！);
/*
取记录
输出主体部分
*/
$sqlrow="select name,price,info from {$Qclass} where ID = {$Qid}";
$therow = $db->GetRow($sqlrow);
$templateMain->assign('class',$Qclass);
$templateMain->assign('ID',$Qid);
$templateMain->assign('name',$therow["name"]);
$templateMain->assign('price',$therow["price"]);
$templateMain->assign('info',$therow["info"]);
$templateMain->assign('Purl',$purl);
$templateMain->output();
?>