\n"; // $strOut .= fancyLogo(); // $strOut .= "\n"; $strOut .= "\n"; $strOut .= "\n"; $strOut .= "\n"; $strOut .= "\n"; $strOut .= "\n"; $strOut .= "".STP_SITE_NAME."\n"; $strOut .= "".STP_FULL_URL."\n"; // $strOut .= "".STP_SITE_TAGLINE." - ".STP_SITE_DESCRIPTION."\n"; $strOut .= "".STP_SITE_DESCRIPTION."\n"; $strOut .= "fr\n"; $strOut .= "".$strLastPublished."\n"; $strOut .= "".$strLastMod."\n"; $strOut .= "\n"; $strOut .= "Art\n"; $strOut .= "Photographie\n"; $strOut .= "Article\n"; $strOut .= "".STP_ENGINE." v".STP_VERSION."\n"; $strOut .= "http://www.rssboard.org/rss-specification\n"; $strOut .= "\n"; $strOut .= "\n"; $strOut .= "".STP_SITE_NAME."\n"; $strOut .= "80\n"; $strOut .= "80\n"; $strOut .= "".STP_FULL_URL."\n"; $strOut .= "https://avatars.pakal.org/avatar.jpg\n"; $strOut .= "\n"; $strOut .= "\n"; $strOut .= "Copyright ".$minYear."-".$maxYear." by ".STP_AUTHOR_FULL."\n"; $strOut .= "60\n"; $strOut .= "\n"; // -- Timeline data -------------------------------------------------------- $whichYear = $maxYear; $query = "SELECT "; $query .= "'content' AS TL_type, "; $query .= "photo_title AS TL_title, "; $query .= "photo_slug AS TL_slug, "; $query .= "photo_alt AS TL_alt, "; $query .= "photo_genre AS TL_genre, "; $query .= "photo_location AS TL_location, "; $query .= "NULL AS TL_excerpt, "; $query .= "NULL AS TL_content, "; $query .= "photo_captured_on AS TL_captured_on, "; $query .= "photo_published_on AS TL_published_on, "; $query .= "YEAR(FROM_UNIXTIME(photo_published_on)) AS TL_year_published_on, "; $query .= "photo_modified_on AS TL_modified_on, "; $query .= "photo_filename AS TL_filename, "; $query .= "photo_width AS TL_photo_width, "; $query .= "photo_height AS TL_photo_height, "; $query .= "photo_aspect_ratio AS TL_photo_ratio, "; $query .= "photo_has_exif AS TL_exif, "; $query .= "alb_id AS TL_alb_id, "; $query .= "alb_title AS TL_alb_title, "; $query .= "alb_slug AS TL_alb_slug, "; $query .= "NULL AS TL_alb_excerpt, "; $query .= "alb_excerpt AS TL_alb_excerpt, "; $query .= "alb_description AS TL_alb_content, "; $query .= "alb_sort AS TL_alb_sort, "; $query .= "alb_published_on AS TL_alb_published_on, "; $query .= "alb_modified_on AS TL_alb_modified_on, "; $query .= "col_id AS TL_col_id, "; $query .= "col_title AS TL_col_title, "; $query .= "col_title_single AS TL_col_title_single, "; $query .= "col_slug AS TL_col_slug, "; $query .= "col_excerpt AS TL_col_excerpt, "; $query .= "col_description AS TL_col_content, "; $query .= "col_published_on AS TL_col_published_on, "; $query .= "col_modified_on AS TL_col_modified_on, "; $query .= "(SELECT COUNT(*) FROM tk_collections_albums "; $query .= "INNER JOIN tk_albums_photos ON albpho_album_id = colalb_alb_id "; $query .= "INNER JOIN tk_collections ON colalb_col_id = col_id "; $query .= "INNER JOIN tk_albums ON colalb_alb_id = alb_id "; $query .= "INNER JOIN tk_photo ON albpho_photo_id = photo_id "; $query .= "WHERE YEAR(FROM_UNIXTIME(photo_published_on)) = TL_year_published_on "; $query .= "AND DATE_FORMAT(FROM_UNIXTIME(photo_published_on), '%Y%M%d') = DATE_FORMAT(FROM_UNIXTIME(TL_published_on), '%Y%M%d') "; $query .= "AND photo_status = 'P' AND alb_status = 'P' "; $query .= "AND col_slug = TL_col_slug AND alb_slug = TL_alb_slug "; $query .= "GROUP BY TL_type, DATE_FORMAT(FROM_UNIXTIME(TL_published_on), '%Y%M%d'), col_slug, alb_slug LIMIT 1"; $query .= ") AS TL_count, "; $query .= "(SELECT COUNT(*) FROM tk_collections_albums "; $query .= "INNER JOIN tk_albums_photos ON albpho_album_id = colalb_alb_id "; $query .= "INNER JOIN tk_collections ON colalb_col_id = col_id "; $query .= "INNER JOIN tk_albums ON colalb_alb_id = alb_id "; $query .= "INNER JOIN tk_photo ON albpho_photo_id = photo_id "; // $query .= "WHERE YEAR(FROM_UNIXTIME(photo_published_on)) = TL_year_published_on "; // $query .= "AND DATE_FORMAT(FROM_UNIXTIME(photo_published_on), '%Y%M%d') = DATE_FORMAT(FROM_UNIXTIME(TL_published_on), '%Y%M%d') "; $query .= "WHERE photo_status = 'P' AND alb_status = 'P' "; $query .= "AND col_slug = TL_col_slug AND alb_slug = TL_alb_slug "; // $query .= "GROUP BY TL_type, DATE_FORMAT(FROM_UNIXTIME(TL_published_on), '%Y%M%d'), col_slug, alb_slug LIMIT 1"; $query .= ") AS TL_count_all, "; $query .= "NULL "; $query .= "FROM tk_collections_albums "; $query .= "INNER JOIN tk_albums_photos ON albpho_album_id = colalb_alb_id "; $query .= "INNER JOIN tk_collections ON colalb_col_id = col_id "; $query .= "INNER JOIN tk_albums ON colalb_alb_id = alb_id "; $query .= "INNER JOIN tk_photo ON albpho_photo_id = photo_id "; $query .= "WHERE photo_status = 'P' AND alb_status = 'P' "; // $query .= "AND YEAR(FROM_UNIXTIME(photo_published_on)) = ".$whichYear." "; // $query .= "AND FROM_UNIXTIME(photo_published_on) BETWEEN DATE_SUB(CURDATE(), INTERVAL 365 DAY) AND DATE_ADD(CURDATE(), INTERVAL 1 DAY) "; $query .= "AND FROM_UNIXTIME(photo_published_on) BETWEEN DATE_SUB(FROM_UNIXTIME(".$epoch_last_mod."), INTERVAL 18 MONTH) AND DATE_ADD(CURDATE(), INTERVAL 1 DAY) "; $query .= "UNION ALL "; $query .= "SELECT "; $query .= "'article' AS TL_type, "; $query .= "ess_title AS TL_title, "; $query .= "ess_slug AS TL_slug, "; $query .= "NULL AS TL_alt, "; $query .= "NULL AS TL_genre, "; $query .= "ess_location as TL_location, "; $query .= "ess_excerpt AS TL_excerpt, "; $query .= "ess_content AS TL_content, "; $query .= "NULL AS TL_captured_on, "; $query .= "ess_published_on AS TL_published_on, "; $query .= "YEAR(FROM_UNIXTIME(ess_published_on)) AS TL_year_published_on, "; $query .= "ess_modified_on AS TL_modified_on, "; $query .= "NULL AS TL_filename, "; $query .= "NULL AS TL_photo_width, "; $query .= "NULL AS TL_photo_height, "; $query .= "NULL AS TL_photo_ratio, "; $query .= "NULL AS TL_exif, "; $query .= "NULL AS TL_alb_id, "; $query .= "NULL AS TL_alb_title, "; $query .= "NULL AS TL_alb_slug, "; $query .= "NULL AS TL_alb_location, "; $query .= "NULL AS TL_alb_excerpt, "; $query .= "NULL AS TL_alb_content, "; $query .= "NULL AS TL_alb_sort, "; $query .= "NULL AS TL_alb_published_on, "; $query .= "NULL AS TL_alb_modified_on, "; $query .= "NULL AS TL_col_id, "; $query .= "NULL AS TL_col_title, "; $query .= "NULL AS TL_col_title_single, "; $query .= "NULL AS TL_col_slug, "; $query .= "NULL AS TL_col_excerpt, "; $query .= "NULL AS TL_col_content, "; $query .= "NULL AS TL_col_published_on, "; $query .= "NULL AS TL_col_modified_on, "; $query .= "NULL AS TL_count, "; $query .= "NULL AS TL_count_all, "; $query .= "NULL "; $query .= "FROM tk_essays "; $query .= "WHERE ess_status = 'P' "; // $query .= "AND YEAR(FROM_UNIXTIME(ess_published_on)) = ".$whichYear." "; // $query .= "AND FROM_UNIXTIME(ess_published_on) BETWEEN DATE_SUB(CURDATE(), INTERVAL 365 DAY) AND DATE_ADD(CURDATE(), INTERVAL 1 DAY) "; $query .= "AND FROM_UNIXTIME(ess_published_on) BETWEEN DATE_SUB(FROM_UNIXTIME(".$epoch_last_mod."), INTERVAL 18 MONTH) AND DATE_ADD(CURDATE(), INTERVAL 1 DAY) "; $query .= "ORDER BY TL_published_on DESC, TL_captured_on DESC "; // echo $query; if ( $mysql_result = mysqli_query($DBLink, $query) ) { $chkDiff = ""; // -- fetch associative array ... while ( $row = mysqli_fetch_assoc($mysql_result) ) { switch ( $row["TL_type"] ) { case "content": if ( $row["TL_count"] == $row["TL_count_all"] ) { $hashDiff = md5("typ:".$row["TL_type"]."_cid:".$row["TL_col_id"]."_aid:".$row["TL_alb_id"]."_".date("Ymd", $row["TL_alb_published_on"])); } else { $hashDiff = md5("typ:".$row["TL_type"]."_cid:".$row["TL_col_id"]."_aid:".$row["TL_alb_id"]."_".date("Ymd", $row["TL_published_on"])."_else"); } if ( $chkDiff != $hashDiff ) { if ( $row["TL_count"] <= 1 ) { if ( $row["TL_alt"] != "" ) { $strAlt = $row["TL_alt"]; } else { $strAlt = $row["TL_title"]; } # $strAlt .= " / ".$row["TL_location"]; # $strAlt .= " / photographie"; # if ( $row["TL_genre"] != "" ) { # $strAlt .= ", ".$row["TL_genre"]; # } $strOut .= "\n"; $strOut .= "".$row["TL_col_title_single"]." : ".$row["TL_title"]."\n"; $strOut .= "".STP_FULL_URL.$row["TL_col_slug"]."/".$row["TL_alb_slug"]."/".$row["TL_slug"]."/\n"; $strOut .= ""; $strOut .= "\"".$strAlt."\""; $strOut .= "
".$row["TL_location"]." - Le ".dateFrench($row["TL_captured_on"])."
"; $qtrOut .= "
"; // -- Get EXIF data if it exists... // if ( $row["TL_exif"] == "Y" ) { // $strOut .= "
"; // $strOut .= get_exif("_files/img_contents/".$row["TL_filename"], "string"); // } $strOut .= "]]>
\n"; // $strOut .= "".STP_AUTHOR_FULL."\n"; $strOut .= "".STP_AUTHOR_FULL."\n"; $strOut .= "".$hashDiff."\n"; $strOut .= "".date("r", $row["TL_published_on"])."\n"; $strOut .= "photographie\n"; $strOut .= "
\n"; $strOut .= "\n"; } else { $strOut .= "\n"; $strOut .= ""; $strOut .= $row["TL_col_title_single"]." : ".$row["TL_alb_title"]; if ( $row["TL_count"] == $row["TL_count_all"] ) { $strOut .= " (Nouvel album)"; } else { $strOut .= " (Ajout de ".$row["TL_count"]." nouvelles photos)"; } $strOut .= "\n"; $strOut .= "".STP_FULL_URL.$row["TL_col_slug"]."/".$row["TL_alb_slug"]."/\n"; $strOut .= "".$row["TL_alb_excerpt"]."

\n"; } // Get all photo from this update... $queryPhoto = "SELECT * FROM tk_albums_photos "; $queryPhoto .= "LEFT JOIN tk_photo ON albpho_photo_id = photo_id "; $queryPhoto .= "LEFT JOIN tk_albums ON albpho_album_id = alb_id "; $queryPhoto .= "WHERE albpho_album_id = ".$row["TL_alb_id"]." AND photo_status = 'P' "; $queryPhoto .= "AND DATE_FORMAT(FROM_UNIXTIME(photo_published_on), '%Y%M%d') = DATE_FORMAT(FROM_UNIXTIME(".$row["TL_published_on"]."), '%Y%M%d') "; $queryPhoto .= "ORDER BY photo_".$row["TL_alb_sort"]." "; if ( $mysql_Photo = mysqli_query($DBLink, $queryPhoto) ) { while ( $rowPhoto = mysqli_fetch_assoc($mysql_Photo) ) { if ( $rowPhoto["photo_alt"] != "" ) { $strAlt = $rowPhoto["photo_alt"]; } else { $strAlt = $rowPhoto["photo_title"]; } // $strAlt .= " / ".$rowPhoto["photo_location"]; # $strAlt .= " / photographie"; # if ( $rowPhoto["photo_genre"] != "" ) { # $strAlt .= ", ".$rowPhoto["photo_genre"]; # } $strOut .= "
"; // -- Link to album... if ( $rowPhoto["alb_link_photo"] == 'Y' ) { $strOut .= ""; } else { $strOut .= ""; } $strOut .= "\"".$strAlt."\""; $strOut .= ""; $strOut .= "
".$rowPhoto["photo_location"]." - Le ".dateFrench($rowPhoto["photo_captured_on"])."
"; $strOut .= "

\n"; } } $strOut .= "]]>
\n"; // $strOut .= "".STP_AUTHOR_FULL."\n"; $strOut .= "".STP_AUTHOR_FULL."\n"; $strOut .= "".$hashDiff."\n"; if ( $row["TL_count"] == $row["TL_count_all"] ) { $strOut .= "".date("r", $row["TL_alb_published_on"])."\n"; } else { $strOut .= "".date("r", $row["TL_published_on"])."\n"; } $strOut .= "photographie\n"; $strOut .= "
\n"; $strOut .= "\n"; } } break; case "article": $hashDiff = md5("typ:".$row["TL_type"]."_title:".$row["TL_title"]."_pub:".date("Ymd", $row["TL_published_on"])); $strOut .= "\n"; $strOut .= "Article : ".$row["TL_title"]."\n"; $strOut .= "".STP_FULL_URL."articles/".$row["TL_slug"]."/\n"; $strOut .= "\n"; // $strOut .= "".STP_AUTHOR_FULL."\n"; $strOut .= "".STP_AUTHOR_FULL."\n"; $strOut .= "".$hashDiff."\n"; $strOut .= "".date("r", $row["TL_published_on"])."\n"; $strOut .= "".STP_FULL_URL."articles/".$row["TL_slug"]."/#disqus_thread\n"; $strOut .= "photographie\n"; $strOut .= "article\n"; $strOut .= "\n"; $strOut .= "\n"; break; } $chkDiff = $hashDiff; } } $strOut .= "
\n"; $strOut .= "\n"; $strOut .= "
\n"; // $strOut = preg_replace("/(\n|\r)/", "", $strOut); header("Content-Type: ".$contentType."; charset=utf-8"); ob_start(); echo $strOut; ob_end_flush(); // -- Trace access --------------------------------------------------------- doTrace(); execTime("comment"); ?>