$gallery_api = ConnectC2SApi(array('gallery-all'));
$gallery_result = $gallery_api['data']['gallery-all'];
//print json_encode($gallery_result);
if (!empty($gallery_result)) {
$postcount = 0;
foreach ($gallery_result as $gallery_data) {
if ($postcount == 0) {
$class = 'grid-item grid-sizer';
} else {
$class = 'grid-item';
}
list($width, $height) = getimagesize($gallery_data['img_url']);
if ($width > $height) {
$orientation = "";
} else {
$orientation = "portrait";
}
print '
';
}
}
?>