$morencount = $_SGLOBAL['db']->result($_SGLOBAL['db']->query("select count(picid) from ".tname('pic')." where uid = '$_SGLOBAL[supe_uid]' and albumid = 0 "),0);
if($morencount){
$query = $_SGLOBAL['db']->query("select uid,filepath from ".tname('pic')." where uid = '$_SGLOBAL[supe_uid]' and albumid = 0 order by dateline desc");