2 $dir = dirname(__FILE__) ."/../view/images/thumbs/";
\r
7 while($name = $d->read()){
\r
8 if(!preg_match('/\.(jpg|gif|png)$/', $name)) continue;
\r
11 $size = filesize($dir.$name);
\r
12 $lastmod = filemtime($dir.$name)*1000;
\r
13 $images[] = array('id' => $id, 'name'=>$name, 'size'=>$size,
\r
14 'lastmod'=>$lastmod, 'url'=>"images/thumbs/".$name);
\r
18 $o = array('images'=>$images);
\r
20 echo json_encode($o);
\r