<?php
defined ( 'IN_TS' ) or die ( 'Access Denied.' );
$userid = aac('user')->isLogin();

$page = isset($_GET['page']) ? intval($_GET['page']) : '1';

$url = tsUrl('shop','myorder',array('page'=>''));

$lstart = $page*30-30;

$strmyoder = $new['shop']->findAll('shop_order',"`selluserid`=".$userid,'orderid desc',null,$lstart.',30');

foreach($strmyoder as $key=>$item){
	$strmyoder[$key]['needpay'] = $strmyoder[$key]['pay']*$strmyoder[$key]['much'];
		//买家
	$selluser = aac ( 'user' )->getSimpleUser ( $strmyoder [$key]['userid'] );
	$strmyoder[$key]['buyusername']=$selluser['username'];
}

$albumNum = $new['shop']->findCount('shop_order');

$pageUrl = pagination($albumNum, 30, $page, $url);

include template ( "sellout" );
?>