if( strstr($imagepath, "treffen01") ) {
$album="frankfurt 01";
$albumshort="fra_01";
} elseif( strstr($imagepath, "ex-abi-2003") ) {
if( strstr($imagepath, "zimmer") ) {
$album="privatsphäre zimmer";
$albumshort="zimmer";
} elseif( strstr($imagepath, "urlaub") ) {
$album="urlaubsfotos";
$albumshort="urlaub";
} else {
$album="fotos von damals";
$albumshort="damals";
}
} elseif( strstr($imagepath, "treffen02") ) {
$album="stuttgart 02";
$albumshort="stu_02";
} elseif( strstr($imagepath, "treffen03") ) {
$album="hamburg 03";
$albumshort="ham_03";
} elseif( strstr($imagepath, "treffen04") ) {
$album="berlin 04";
$albumshort="ber_04";
} else {
$album="";
}
include("pics/fotodata.inc"); // frankfurt 01
include("pics/fotodata2.inc");
include("pics/fotodata-stu.inc"); // stuttgart 02
include("pics/fotodata-act.inc"); // aktuelle fotos
include("pics/fotodata-misc.inc"); // zimmer, urlaub
include("pics/fotodata-fra-dtc.inc"); // fra 01 - david
include("pics/fotodata-samrat.inc");
include("pics/fotodata-ham.inc"); // hamburg 03
if(!$imagetitle) {
// try to get from database:
include_once "sandbox/mysql.inc";
$pic_r = mysql_query ('SELECT pid, title, descr, copyright, w, h, datum FROM fotodata WHERE location="' .$imagepath. '"');
$pic_d = mysql_fetch_assoc ($pic_r);
$imagew = $pic_d['w'];
$imageh = $pic_d['h'];
$imagedescr = $pic_d['descr'];
$imagecopy = $pic_d['copyright'];
$imagetitle = $pic_d['title'];
$next_pic = mysql_query ('SELECT location FROM fotodata WHERE pid=' .($pic_d['pid']+1). ' AND location LIKE "%treffen04%"');
$next_pic = mysql_fetch_assoc ($next_pic);
if ($next_pic) {
$next_open = '';
$next_close = '';
}
}
$title= $albumshort. ': ' .$imagetitle;
$update= ($pic_d['datum'] ? $pic_d['datum'] : '');
if($imagew && $imageh){
$imagedims = ' width="' .$imagew. '" height="' .$imageh. '"';
}
$body='
Zurück zum Foto-Album ' . $album . '
' .$next_open. '' .$next_close. '
' . $imagedescr . '
© ' . str_replace('© ', '', $imagecopy) . ' | '; if ($next_pic) { $body .= '' .$next_open. 'Nächstes Bild. ' .$next_close. ' | '; } $body .= '