<?php

require_once(dirname(dirname(__FILE__)) . '/app.php');
need_manager();

$condition = array();
$count = Table::Count('provider', $condition);
list($pagesize, $offset, $pagestring) = pagestring($count, 20);
$provider = DB::LimitQuery('provider', array(
	'condition' => $condition,
	'order' => 'ORDER BY id ASC',
	'size' => $pagesize,
	'offset' => $offset,
));
if(count($provider)==0){
    Session::Set('error','没有查询到符合条件的产品，请检查查询条件，重新查询！');
}else{
    if($_POST)Session::Set('success','查询完成！');
}

include template('manage_provider');?>
