$view = 1;
include("inc/photoData.php");
$selectFotoData01 = "select fo.fID as fotoUIN, fo.fTitle, fo.fComment, fo.fStory, fo.fDate, fo.fCreated, fo.fUpdate, fo.fFile as fotoFile, date_format(fo.fDate, '%w') as fotoDateDay, date_format(fo.fDate, '%d.%m.%Y') as fotoDate, fo.fGmNorth, fo.fGmEast, fo.frCameraID as CameraID, fo.frCityID as CityID, fo.frDistrictID as DistrictID, fo.frCollectionID as CollectionID, fo.fPublic, fo.frStateID as StateID, date_format(fo.fDate, '%Y%m%d') as longUIN, fows.frFotoID, fows.frWebsiteID";
//$selectFotoData02 = ", fows.frFotoID, fows.frWebsiteID, fokw.frFotoID, fokw.frKeywordID, kw.fID, kw.fTitle
//from tb_Foto fo
//inner join tb_Foto_Keyword fokw on fokw.frFotoID = fo.fID
//left outer join comKeyword kw on kw.fID = fokw.frKeywordID";
// SELECT RANDOM PHOTO
$selectRandomPhoto = $selectFotoData01.$selectFotoData02.$basicNew.$filterEl." order by rand()";
$randomPhotoData = @mysql_query($selectRandomPhoto,$dbh);
$fotoUIN = @mysql_result($randomPhotoData, 0, 0);
$fotoTitle = @mysql_result($randomPhotoData, 0, 1);
$fotoStory = @mysql_result($randomPhotoData, 0, 3);
$FotoID = @mysql_result($randomPhotoData, 0, 7);
$fotoFile = @mysql_result($randomPhotoData, 0, 7);
$fotoDateDay = @mysql_result($randomPhotoData, 0, 8);
$fotoDate = @mysql_result($randomPhotoData, 0, 9);
$CameraID = @mysql_result($randomPhotoData, 0, 12);
$CityID = @mysql_result($randomPhotoData, 0, 13);
$DistrictID = @mysql_result($randomPhotoData, 0, 14);
$CollectionID = @mysql_result($randomPhotoData, 0, 15);
$StateID = @mysql_result($randomPhotoData, 0, 17);
$longUIN = @mysql_result($randomPhotoData, 0, 18);
////////////////////////////////////////////////////////////////////////////////
// Calculate dimensions of PHOTOS
//// testing
if ($fotoFile != "") {
$fotoSizeData = "http://www.madloom.com/media/album/".$fotoFile."s.jpg";
$fotoSize = getimagesize($fotoSizeData);
$fotoWidth = $fotoSize[0];
$fotoWidthHalf = $fotoSize[0]/2 - 40;
$fotoHeight = $fotoSize[1] - 19;
$fotoNavPosPrev = 0;
$fotoNavIconPrev = 10;
$fotoNavPosNext = $fotoSize[0]/2 + 30;
$fotoNavIconNext = $fotoSize[0]/2 - 90;
$fotoNavRandom = $fotoSize[0] - 18;
}
////////////////////////////////////////////////////////////////////////////////
// SELECT KEYWORDS
$selectKeywords = "select kw.fTitle as Keyword, fokw.frKeywordID as KeywordID, fokw.frFotoID, fo.fID, fows.frFotoID, fows.frWebsiteID, kw.fStatus
from comKeyword kw
inner join tb_Foto_Keyword fokw on fokw.frKeywordID = kw.fID
inner join tb_Foto fo on fo.fID = fokw.frFotoID
inner join tb_Foto_Website fows on fows.frFotoID = fo.fID
where ".$basic." and fo.fID = ".$fotoUIN." and fokw.frKeywordTypeID != 1
order by rand()
limit 10";
$keywordsData = @mysql_query($selectKeywords,$dbh);
$keywordsCheckData = @mysql_query($selectKeywords,$dbh);
$keywordsCheck = @mysql_result($keywordsCheckData, 0, 2);
////////////////////////////////////////////////////////////////////////////////
// GET GEOGRAPHICAL DATA: STATE, COUNTRY, CONTINENTREGION, CONTINENT
$selectGeoInformation = "select st.fID, st.fTitle, st.frCountryID, co.fID, co.fTitleGE, co.frContinentID, coco.fID, coco.frCountryID, coco.frContinentRegionID as ContinentRegionID, cr.fID, cr.fTitleGE as continentRegionTitle, cr.frContinentID, ct.fID, ct.fTitleGE
from comState st
inner join comCountry co on co.fID = st.frCountryID
inner join comCountry_ContinentRegion coco on coco.frCountryID = co.fID
inner join comContinentRegion cr on cr.fID = coco.frContinentRegionID
inner join comContinent ct on ct.fID = cr.frContinentID
where st.fID = ".$StateID;
$geoInformationData = @mysql_query($selectGeoInformation,$dbh);
$continentRegionData = @mysql_query($selectGeoInformation,$dbh);
$stateTitle = @mysql_result($geoInformationData, 0, 1);
$CountryID = @mysql_result($geoInformationData, 0, 3);
$countryTitle = @mysql_result($geoInformationData, 0, 4);
$ContinentID = @mysql_result($geoInformationData, 0, 12);
$continentTitle = @mysql_result($geoInformationData, 0, 13);
///////////
// GET GEOGRAPHICAL DATA: ADDITIONAL CONTINENT INFORMATION
// COUNT PHOTOS FROM SELECTED CONTINENT
///////////
$selectContinentCount = "select fo.fID, fo.frStateID, st.fID, st.frCountryID, co.fID, co.frContinentID, count(co.frContinentID), fows.frFotoID, fows.frWebsiteID
from tb_Foto fo
inner join comState st on st.fID = fo.frStateID
inner join comCountry co on co.fID = st.frCountryID
inner join tb_Foto_Website fows on fows.frFotoID = fo.fID
where ".$basic." and co.frContinentID = ".$ContinentID."
group by co.frContinentID";
$continentCountData = @mysql_query($selectContinentCount,$dbh);
$continentCount = @mysql_result($continentCountData, 0, 6);
///////////
// GET GEOGRAPHICAL DATA: ADDITIONAL CONTINENT INFORMATION
// COUNT PHOTOS FROM SELECTED COUNTRY
///////////
$selectCountryCount = "select fo.fID, fo.frStateID, st.fID, st.frCountryID, count(st.frCountryID), fows.frFotoID, fows.frWebsiteID
from tb_Foto fo
inner join comState st on st.fID = fo.frStateID
inner join tb_Foto_Website fows on fows.frFotoID = fo.fID
where ".$basic." and st.frCountryID = ".$CountryID."
group by st.frCountryID";
$countryCountData = @mysql_query($selectCountryCount,$dbh);
$countryCount = @mysql_result($countryCountData, 0, 4);
///////////
// GET GEOGRAPHICAL DATA: ADDITIONAL STATE INFORMATION
// COUNT PHOTOS FROM SELECTED STATE
///////////
$selectStateCount = "select fo.fID, fo.frStateID, count(fo.frStateID), fows.frFotoID, fows.frWebsiteID
from tb_Foto fo
inner join tb_Foto_Website fows on fows.frFotoID = fo.fID
where ".$basic." and fo.frStateID = ".$StateID."
group by fo.frStateID";
$stateCountData = @mysql_query($selectStateCount,$dbh);
$stateCount = @mysql_result($stateCountData, 0, 2);
////////////////////////////////////////////////////////////////////////////////
// GET GEOGRAPHICAL DATA: CITY
$selectCity = "select fID, fTitle
from comCity
where fID = ".$CityID;
$cityData = @mysql_query($selectCity,$dbh);
$cityTitle = @mysql_result($cityData, 0, 1);
// COUNT PHOTOS FROM SELECTED CITY
$selectCityCount = "select fo.fID, fo.frCityID, count(fo.frCityID), fo.fPublic, fows.frFotoID, fows.frWebsiteID
from tb_Foto fo
inner join tb_Foto_Website fows on fows.frFotoID = fo.fID
where".$basic." and fo.frCityID = ".$CityID."
group by fo.frCityID";
$cityCountData = @mysql_query($selectCityCount,$dbh);
$cityCount = @mysql_result($cityCountData, 0, 2);
////////////////////////////////////////////////////////////////////////////////
// GET GEOGRAPHICAL DATA: DISTRICT
$selectDistrict = "select fID, fTitle
from comDistrict
where fID = ".$DistrictID;
$districtData = @mysql_query($selectDistrict,$dbh);
$districtTitle = @mysql_result($districtData, 0, 1);
// COUNT PHOTOS FROM SELECTED DISTRICT
$selectDistrictCount = "select fo.fID, fo.frDistrictID, count(fo.frDistrictID), fows.frFotoID, fows.frWebsiteID
from tb_Foto fo
inner join tb_Foto_Website fows on fows.frFotoID = fo.fID
where ".$basic." and fo.frDistrictID = ".$DistrictID."
group by fo.frDistrictID";
$districtCountData = @mysql_query($selectDistrictCount,$dbh);
$districtCount = @mysql_result($districtCountData, 0, 2);
////////////////////////////////////////////////////////////////////////////////
// INFINITE SCROLL CONTENT
$fotoCounter = $selectFotoCounter.$selectFotoData02.$basicNew.$filterEl.$fotoFilter.$orderParam.$orderDir.$limit;
$result = mysql_query($selectRandomPhotoInfinite,$dbh);
$rowcount = mysql_query($fotoCounter,$dbh);
$rownumber = @mysql_result($rowcount, 0, 0);
$actual_row_count = $rownumber;
$pics_per_page = 18;
$data_url = "dataStart.php?".$globals.$filters."view=99";
?>
if ($testServer == ""): ?>
endif; ?>
if (($DebugID == 0) && ($testServer != "")): ?>
endif; ?>
if ($keywordsCheck != ""): ?>
while ($keywords = @mysql_fetch_array($keywordsData)):
$KeywordID = $keywords["KeywordID"];
$keywordCount = @mysql_result(keywordCount($KeywordID,$basic), 0, 2);
$keywordSlideNr = keywordSlide($KeywordID,$basic,$order,$FotoID);
if ($hidePrivateData == 1) {
$keywords["fStatus"] = 1;
}
if ($keywords["fStatus"] == 1):
?>
endif; ?> endwhile; ?>
Alle Stichwörter
endif; ?>
$i = 0;
while ($thumbnail = @mysql_fetch_array($thumbnailData)):
$i++; ?>
style="border-right:none" endif; ?>>
if ($testServer != ""): ?>
Edit endif; ?>
endwhile; ?>
$i = 0;
while ($selectNewestThumbnail = @mysql_fetch_array($selectNewestThumbnailListData)):
$i++; ?>
style="border-right:none" endif; ?>>
endwhile; ?>
$i = 0;
while ($randomKeywordPhotoList = @mysql_fetch_array($selectRandomKeywordListData)):
$i++; ?>
style="border-right:none" endif; ?>>
endwhile; ?>
Alle Fotos mit dem Stichwort " " ansehen. | Alle Stichwörter
$i = 0;
while ($randomCountryList = @mysql_fetch_array($selectRandomCountryListData)):
$i++; ?>
style="border-right:none" endif; ?>>
endwhile; ?>
Alle Fotos aus " " ansehen. | Alle Standorte
$select_photos = "select fo.fID as fotoUIN, fo.fFile as fotoFile, fokw.frFotoID, fokw.frKeywordID, fows.frFotoID, fows.frWebsiteID, date_format(fo.fDate, '%w') as fotoDateDay, date_format(fo.fDate, '%d.%m.%Y') as fotoDate
from tb_Foto fo
inner join tb_Foto_Keyword fokw on fokw.frFotoID = fo.fID
left outer join tb_Foto_Website fows on fows.frFotoID = fo.fID
where ".$basic." and fokw.frKeywordID = ".$newestPhotoseriesID."
order by rand()
limit 3";
$photo_data = @mysql_query($select_photos,$dbh);
$i = 0;
while ($photos = @mysql_fetch_array($photo_data)):
$i++; ?>
style="border-right:none" endif; ?>>
endwhile; ?>
Alle Fotos aus " " ansehen. | Alle Fotostrecken
if ($Business == 1): ?>
Meine Fotos kaufen
endif; ?>
$lastpic = 0; while ($row = mysql_fetch_array($result)): $lastpic++; ?>
style="border-right:none" endif; ?>>
endwhile; ?>
if ($lastpic >= $pics_per_page): ?>
Alle Fotos dieser Serie werden angezeigt.
endif; ?>