<?php
if(!defined('IN_TM')) 
{
	exit('Access Denied');
}
if($_SESSION["admin"]!="Silence")
{
	include template('login.htm');
    exit;
}
//¹ÜÀíÔ±²Ù×÷
$a = getgpc('do');
if($a == 'list')
{
	$page = getgpc('page');
	if(isset($page)){ $page = intval($page); }else{ $page = 1; }
	$page_size = 15; 
	$sql = "SELECT * FROM `{$tablepre}order`";
	$row = $db->num_rows($db->query($sql));
	$mpurl =$PHP_SELF.'?action=order&do=list&';
	$dispage =  page($row,$page_size,$page,$mpurl);
	$page_get_start = page_get_start($page,$page_size,$row);
	$sql = "SELECT * FROM {$tablepre}order LIMIT $page_get_start, $page_size";
	$userlist = $db->fetch_all($sql);
	$a = 'Y-m-d H:i:s';
	include template('order.htm');
	$db->close();
	exit;
}
elseif ($a == 'del')
{
	$uids = timplode(getgpc('id'));
	$rs = $db->query("DELETE FROM {$tablepre}order WHERE id IN ($uids) ");
	if (!$rs) 
	{
		$messageid = 22;
		include template('message.htm');
		exit;
	}
	$messageid = 21;
	include template('message.htm');
	$db->close();
	exit;
}
?>