<?php 

if($_G['pa_count'] < 2) {

    odz_error('parameters_error', -112);

}



$id = (int)$_GET['id'];

$idtype = trim($_GET['idtype']);



$list = array();



$query = DB::query('SELECT f.*,m.username FROM '.DB::table('home_favorite').' f

    LEFT JOIN '.DB::table('common_member')." m ON m.uid = f.uid

    WHERE f.id = '$id' AND f.idtype = '$idtype'");

    

while($row = DB::fetch($query)) {

    $list[] = array(

        'uid' => $row['uid'],

        'username' => $row['username'],

        'dateline' => dgmdate($row['dateline']),

        'avatar' => avatar($row['uid'], 'small', true)

    );

}



odz_result(array('list'=>$list));

?>