$rs[parentid]) or (parentid=$rs[parentid] and depth<=$rs[depth] and id<$rs[id]) order by parentid asc,id desc,depth asc limit 0,1"; //$sql = "select * from $table where (parentid > $id) or (parentid=$id and depth=$depth and datetime<'$rs[datetime]') or (parentid=$id and depth<$depth) order by parentid desc,depth asc,datetime desc limit 0,1"; $rsPrev = sql_fetch_array($sql); if($rsPrev[id]!="") $prev = ""; else $prev=""; // 다음글 가져오기 $sql = "select * from store02 where"; if($category) $sql .= " category=$category and "; $sql .="(parentid < $rs[parentid]) or (parentid=$rs[parentid] and depth>=$rs[depth] and id>$rs[id]) order by parentid desc,id asc,depth desc limit 0,1"; $rsNext = sql_fetch_array($sql); if($rsNext[id]!="") $next = ""; else $next=""; if($rs[id]=="") { MsgView("선택하신 글이 존재하지 않습니다.",-1); } // 경로 및 이미지 사이즈 $fileDir = $dir.fromDB($rs[file1]); $src = "/store/data/".fromDB($rs[file1]); if(file_exists($fileDir)) $size=GetImageSize($fileDir);else {$size[0]=0;$size[1]=0;} if($size[0]==0 || $size[1]==0 ) $src="img/temp_playground01.gif"; if($size[0] > 300) {$width=300; $height = 300*$size[1]/$size[0];} else{$width=$size[0];$height=$size[1];} //if($size[0] > $size[1] ) { $width = 106; $height = 106*$size[1]/$size[0]; } //if($size[1] > $size[0] ) { $height = 106; $width = 106*$size[0]/$size[1]; } ?>



<>