<?php
/**
* @author moufer<moufer@163.com>
* @copyright www.modoer.com
* @version $Id ac_index.php 1 2008-08-15 08:54 $
*/
!defined('IN_MUDDER') && exit('Access Denied');

$total = $db->get_value("SELECT COUNT(*) FROM {$dbpre}gifts WHERE available=1");
if($total > 0 ) {
    $offset = 15;
    $limit = get_limit($page, $offset);
    $query = $db->query("SELECT giftid,name,available,displayorder,price,num,thumb,picture,salevolume FROM {$dbpre}gifts WHERE available=1 ORDER BY displayorder,num LIMIT $limit");
    while($val = $db->fetch_array($query)) {
        $val['thumb'] = unserialize($val['thumb']);
        $val['picture'] = unserialize($val['picture']);
        $gifts[] = $val;
    }
    $multipage = multi($total, $offset, $page, $MOD['url']);
}

$subtitle = '»ý·Ö¶Ò»»';
$tplname = 'exchange_index';
require_once MUDDER_ROOT.'header.php';
require_once template($tplname);
footer();
?>