DocumentType == KIDDOCSTYPE_PORTRAIT)
{
$kd2 = $kid_docs[$pici];
break;
}
}
if ($kd2 == NULL)
{
/* No pictures, just text. */
}
else
{
$imagepath = KID_DATA_DISK_PATH($kd2->kidID, basename($kd2->Path));
$pos = strrpos($imagepath, '.');
$origx = 0;
$origy = 0;
switch(substr($imagepath, $pos))
{
case '.jpg':
$sourceImage = imagecreatefromjpeg($imagepath);
$origx = imagesx($sourceImage);
$origy = imagesy($sourceImage);
break;
case '.png':
$sourceImage = imagecreatefrompng($imagepath);
$origx = imagesx($sourceImage);
$origy = imagesy($sourceImage);
break;
case '.gif':
$sourceImage = imagecreatefromgif($imagepath);
$origx = imagesx($sourceImage);
$origy = imagesy($sourceImage);
break;
}
if($origy > 1600 || $origx >= 1600)
{
print('
![](' . resize_image($imagepath, 1024) . ')
');
}
else
printf('
![%s %s](%s)
', secure_path_kid2($imagepath), str_replace('"', '', $ki->Names), str_replace('"', '', $ki->Names));
}
?>
kidID, basename($kid_docs[$text_found]->Path)))) : ''; ?>
');
print_video($kid_docs[$video_found]);
print('
');
}
?>
DocumentType == KIDDOCSTYPE_PORTRAIT)
{
$kd2 = $kid_docs[$pici];
printf('![%s %s](%s)
',
secure_path_kid2($kd2->Path), $kd2->kidID, resize_image(KID_DATA_DISK_PATH($ki->kidID, basename($kd2->Path)), 200), str_replace('"', '', $ki->Names), str_replace('"', '', $ki->Names));
}
}
}
?>