3 function photo_init(&$a) {
10 $photo = str_replace('.jpg','',$photo);
11 if(substr($photo,-2,1) == '-') {
12 $resolution = intval(substr($photo,-1,1));
13 $photo = substr($photo,0,-2);
15 $r = q("SELECT * FROM `photo` WHERE `resource-id` = '%s'
16 AND `scale` = %d LIMIT 1",
19 if($r === NULL || (! count($r))) {
22 header("Content-type: image/jpeg");