<?php
/** feedback list */
function get_feedback_list($where = 1, $orderby = 'fb_id', $start = 0, $pagesize = 0) {
	global $DB;
	
	$sql = "SELECT fb_id, fb_nick, fb_email, fb_content, fb_date FROM ".$DB->table('feedback')." WHERE $where ORDER BY $orderby DESC LIMIT $start, $pagesize";
	$result = $DB->fetch_all($sql);
	
	return $result;
}
	
/** one feedback */
function get_one_feedback($fb_id) {
	global $DB;
	
	$sql = "SELECT * FROM ".$DB->table('feedback')." WHERE fb_id=$fb_id LIMIT 1";
	$result = $DB->fetch_one($sql);
	
	return $result;
}
?>