function _photos_down_count in Album Photos 6.2
1 call to _photos_down_count()
- photos_down_page in inc/
photos.down.inc
File
- inc/
photos.down.inc, line 91
Code
function _photos_down_count($filepath, $fid) {
$image = image_get_info($filepath);
$count = 0;
if ($size = photos_upload_info()) {
foreach ($size['size'] as $v) {
if ($v['w'] < $image['width'] || $v['h'] < $image['height']) {
$count++;
}
}
}
$t = photos_upload_info(0);
for ($i = $a = 0; $i < $count; $i++, $a++) {
if ($_GET['q'] == "photos/zoom/{$fid}" && $i == $count - 1) {
$op['class'] = 'active';
}
$c[] = array(
'name' => $t['size'][$i]['name'],
'link' => l($t['size'][$i]['name'], "photos/zoom/{$fid}/thumb/" . $t['size'][$i]['name'], array(
'attributes' => $op,
)),
'size' => $t['size'][$i]['w'] . 'x' . $t['size'][$i]['h'],
);
}
return $c;
}