<?php
/*---------------------------------------------------+
| PHP-Fusion Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2005 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
|
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
if (file_exists(INFUSIONS."photos_panel/locale/".$settings['locale'].".php")) {
include INFUSIONS."photos_panel/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."photos_panel/locale/English.php";
}
//openside($locale['MVP100']);
echo "<table width='100%' border='0' align='center' cellpadding='0' cellspacing='0'><tr>";
//echo "<a href='../../../../../../submit.php?stype=p'><img src='../../../../../../images/upload.png' title='Bild einsenden' style='position:relative; bottom:20px; float:right;'/></a>";
$result=dbquery(
"SELECT ta.album_id,album_title,photo_allow_comments,photo_datestamp,photo_id,photo_title,photo_thumb1 FROM ".$db_prefix."photo_albums ta ".
"INNER JOIN ".$db_prefix."photos USING (album_id) where ".groupaccess('album_access')." ORDER BY photo_datestamp DESC LIMIT 0,3");
if (dbrows($result) != 0 ) {
while($data = dbarray($result)) {
$filename=PHOTOS.$data['photo_id'].'t.jpg';
$photo_comments = dbcount("(comment_id)", DB_COMMENTS, "comment_type='P' AND comment_item_id='".$data['photo_id']."'");
echo "<td align='left' valign='top' class='gallery'>";
echo "<a href='../../../../../../".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' class='gallery-title'>".$data['photo_title']."</a>";
if (iADMIN) { echo " <a href='../../../../../../".ADMIN."photos.php".$aidlink."&action=edit&album_id=".$data['album_id']."&photo_id=".$data['photo_id']."' title='Foto bearbeiten' style='position:relative;top:25px;right:5px;float:right;'><img src='../../../../../../".THEME."images/edit.png' width='16' height='16' title='Foto bearbeiten'/></a>";}
echo "<a href='../../../../../../".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' title='".$data['photo_title']."'>";
echo "<img src='../../../../../../".PHOTOS."album_".$data['album_id']."/".$data['photo_thumb1']."' class='gallery-pic' width='100%'></a>";
echo "<div class='gallery-comment'><a href='../../../../../../".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."#comments'><img src='../../../../../../".BASEDIR."images/comment-info.png' border='0' width='16' height='16' style='display:inline;position:relative;top:4px;'/>";
echo ($data['photo_allow_comments'] ? ($photo_comments == 1 ? $locale['MVP102'] : $locale['MVP102']).$photo_comments." Kommentare</a>" : "");
echo "<br></div>n";
echo "</td>";
}
echo "</tr></table>";
} else {
echo $locale['rpc102'];
}
//closeside();
?>
<?php
/*---------------------------------------------------+
| PHP-Fusion Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2024 Nick Jones
| https://www.php-fusion.co.uk/
+----------------------------------------------------+
| This code is updated for PHP-Fusion 9.
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }
// In PHP-Fusion 9 werden Locales für Infusions meist automatisch geladen.
// Diese Zeilen stellen sicher, dass es auch als eigenständiges Panel funktioniert.
if (file_exists(INFUSIONS."photos_panel/locale/".fusion_get_settings('locale').".php")) {
include INFUSIONS."photos_panel/locale/".fusion_get_settings('locale').".php";
} else {
include INFUSIONS."photos_panel/locale/English.php";
}
// openside() und closeside() werden aus Kompatibilitätsgründen beibehalten.
openside($locale['photo_p_title']); // Annahme, dass MVP100 der Panel-Titel war
// Die Abfrage nutzt jetzt die v9-Konstanten (DB_PHOTOS, DB_PHOTO_ALBUMS)
// und die aktuelle Funktion in_group() zur Überprüfung der Zugriffsrechte.
$result = dbquery("
SELECT pa.album_id, pa.album_title, p.photo_allow_comments, p.photo_datestamp, p.photo_id, p.photo_title, p.photo_thumb1
FROM ".DB_PHOTO_ALBUMS." pa
INNER JOIN ".DB_PHOTOS." p ON pa.album_id = p.album_id
WHERE ".in_group('pa.album_access')."
ORDER BY p.photo_datestamp DESC
LIMIT 3
");
if (dbrows($result) > 0) {
echo "<div class='table-responsive'><table class='table table-striped' style='width:100%;'>n<tr>n";
while ($data = dbarray($result)) {
$photo_comments = dbcount("(comment_id)", DB_COMMENTS, "comment_type='P' AND comment_item_id='".$data['photo_id']."'");
echo "<td class='text-left align-top gallery-item'>";
echo "<h5><a href='".FUSION_ROOT."photogallery.php?photo_id=".$data['photo_id']."' class='gallery-title'>".$data['photo_title']."</a></h5>";
// Admin-Check sollte checkrights() für spezifische Rechte verwenden.
// Der Link nutzt FUSION_ADMIN und ein FontAwesome-Icon statt eines Bildes.
// Der alte $aidlink wird in v9 nicht mehr benötigt.
if (iADMIN && checkrights("P")) {
echo "<a href='".FUSION_ADMIN."photos.php?action=edit&album_id=".$data['album_id']."&photo_id=".$data['photo_id']."' title='".$locale['edit']."' style='position:absolute; top:5px; right:5px;'><i class='fa fa-pencil' title='".$locale['edit']."'></i></a>";
}
echo "<a href='".FUSION_ROOT."photogallery.php?photo_id=".$data['photo_id']."' title='".$data['photo_title']."'>";
// Der Bildpfad verwendet die v9-Konstante IMAGES_P
echo "<img src='".IMAGES_P."album_".$data['album_id']."/".$data['photo_thumb1']."' alt='".$data['photo_title']."' class='img-fluid gallery-pic'></a>";
echo "<div class='gallery-comment m-t-10'>";
echo "<a href='".FUSION_ROOT."photogallery.php?photo_id=".$data['photo_id']."#comments'>";
// Verwendet ein FontAwesome-Icon, was in v9-Themes Standard ist.
echo "<i class='fa fa-comments' style='vertical-align:middle;'></i> ";
// Logik für Kommentare nutzt jetzt Standard-Locales für Singular/Plural.
if ($data['photo_allow_comments']) {
echo $photo_comments." ".($photo_comments == 1 ? $locale['c101'] : $locale['c102']); // c101: Kommentar, c102: Kommentare
}
echo "</a></div>n";
echo "</td>";
}
echo "</tr>n</table></div>n";
} else {
// $locale['p_0027'] ist die Standard-Locale in v9 für "Keine Fotos".
// Ersetze dies, falls deine Locale-Datei einen anderen Schlüssel (z.B. rpc102) verwendet.
echo "<div class='text-center'>".$locale['p_0027']."</div>n";
}
closeside();
?>
<?php
/*---------------------------------------------------+
| PHP-Fusion Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2024 Nick Jones
| https://www.php-fusion.co.uk/
+----------------------------------------------------+
| This code is updated for PHP-Fusion 9.
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }
// In PHP-Fusion 9 werden Locales für Infusions meist automatisch geladen.
// Diese Zeilen stellen sicher, dass es auch als eigenständiges Panel funktioniert.
if (file_exists(INFUSIONS."photos_panel/locale/".fusion_get_settings('locale').".php")) {
include INFUSIONS."photos_panel/locale/".fusion_get_settings('locale').".php";
} else {
include INFUSIONS."photos_panel/locale/English.php";
}
// openside() und closeside() werden aus Kompatibilitätsgründen beibehalten.
openside($locale['photo_p_title']); // Annahme, dass MVP100 der Panel-Titel war
// Die Abfrage nutzt jetzt die v9-Konstanten (DB_PHOTOS, DB_PHOTO_ALBUMS)
// und die aktuelle Funktion groupaccess() zur Überprüfung der Zugriffsrechte.
$result=dbquery(
"SELECT ta.album_id,album_title,photo_allow_comments,photo_datestamp,photo_id,photo_title,photo_thumb1 FROM ".DB_PHOTO_ALBUMS." ta ".
"INNER JOIN ".DB_PHOTOS." USING (album_id) where ".groupaccess('album_access')." ORDER BY photo_datestamp DESC LIMIT 0,3");
if (dbrows($result) > 0) {
echo "<div class='table-responsive'><table class='table table-striped' style='width:100%;'>\n<tr>\n";
while ($data = dbarray($result)) {
$photo_comments = dbcount("(comment_id)", DB_COMMENTS, "comment_type='P' AND comment_item_id='".$data['photo_id']."'");
echo "<td class='text-left align-top gallery-item'>";
echo "<h5><a href='".INFUSIONS."gallery/gallery.php?photo_id=".$data['photo_id']."' class='gallery-title'>".$data['photo_title']."</a></h5>";
// Admin-Check sollte checkrights() für spezifische Rechte verwenden.
// Der Link nutzt ADMIN und ein FontAwesome-Icon statt eines Bildes.
// Der alte $aidlink wird in v9 nicht mehr benötigt.
if (iADMIN && checkrights("P")) {
echo "<a href='".ADMIN."photos.php?action=edit&album_id=".$data['album_id']."&photo_id=".$data['photo_id']."' title='".$locale['edit']."' style='position:absolute; top:5px; right:5px;'><i class='fa fa-pencil' title='".$locale['edit']."'></i></a>";
}
echo "<a href='".INFUSIONS."gallery/gallery.php?photo_id=".$data['photo_id']."' title='".$data['photo_title']."'>";
// Der Bildpfad verwendet die v9-Konstante IMAGES_P
echo "<img src='".INFUSIONS."gallery/photos/album_".$data['album_id']."/".$data['photo_thumb1']."' alt='".$data['photo_title']."' class='img-fluid gallery-pic'></a>";
echo "<div class='gallery-comment m-t-10'>";
echo "<a href='".INFUSIONS."gallery/gallery.php?photo_id=".$data['photo_id']."#comments'>";
// Verwendet ein FontAwesome-Icon, was in v9-Themes Standard ist.
echo "<i class='fa fa-comments' style='vertical-align:middle;'></i> ";
// Logik für Kommentare nutzt jetzt Standard-Locales für Singular/Plural.
if ($data['photo_allow_comments']) {
echo $photo_comments." ".($photo_comments == 1 ? $locale['c101'] : $locale['c102']); // c101: Kommentar, c102: Kommentare
}
echo "</a></div>\n";
echo "</td>";
}
echo "</tr>\n</table></div>\n";
} else {
// $locale['p_0027'] ist die Standard-Locale in v9 für "Keine Fotos".
// Ersetze dies, falls deine Locale-Datei einen anderen Schlüssel (z.B. rpc102) verwendet.
echo "<div class='text-center'>".$locale['p_0027']."</div>\n";
}
closeside();
<?php
/*---------------------------------------------------+
| PHP-Fusion Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2024 Nick Jones
| https://www.php-fusion.co.uk/
+----------------------------------------------------+
| This code is updated for PHP-Fusion 9.
| Filename: latest_photos_panel.php
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }
// Sprachdatei laden
if (file_exists(INFUSIONS."photos_panel/locale/".fusion_get_settings('locale').".php")) {
include INFUSIONS."photos_panel/locale/".fusion_get_settings('locale').".php";
} else {
include INFUSIONS."photos_panel/locale/English.php";
}
openside($locale['photo_p_title']);
$result = dbquery(
"SELECT ta.album_id, album_title, photo_allow_comments, photo_datestamp, photo_id, photo_title, photo_thumb1
FROM ".DB_PHOTO_ALBUMS." ta
INNER JOIN ".DB_PHOTOS." USING (album_id)
WHERE ".groupaccess('album_access')."
ORDER BY photo_datestamp DESC LIMIT 4"
);
if (dbrows($result) > 0) {
// NEU: Wir fügen eine 'row' hinzu, um das Bootstrap-Grid zu aktivieren.
// Die Klasse 'equal-height' sorgt dafür, dass alle Elemente in einer Zeile die gleiche Höhe haben.
echo "<div class='row equal-height'>";
while ($data = dbarray($result)) {
// Jedes Panel wird in eine Spalte verpackt.
// col-md-12: Auf Desktops (md) nimmt es die volle Breite des Panels ein.
// col-sm-6: Auf Tablets (sm) nimmt es die halbe Breite ein (2 nebeneinander).
// col-xs-12: Auf Handys (xs) nimmt es wieder die volle Breite ein.
echo '<div class="col-xs-12 col-sm-6 col-md-3">';
echo '<div class="panel panel-default">';
echo "<a href='".INFUSIONS."gallery/gallery.php?photo_id=".$data['photo_id']."' title='".$data['photo_title']."'>";
echo "<img src='".INFUSIONS."gallery/photos/album_".$data['album_id']."/".$data['photo_thumb1']."' alt='".$data['photo_title']."' class='img-responsive'>";
echo "</a>";
echo '<div class="panel-body">';
echo '<a href="'.INFUSIONS."gallery/gallery.php?photo_id=".$data['photo_id'].'" class="post-title">'.$data['photo_title'].'</a>';
echo '<div class="album-meta">';
$photo_comments = dbcount("(comment_id)", DB_COMMENTS, "comment_type='P' AND comment_item_id='".$data['photo_id']."'");
if ($data['photo_allow_comments']) {
echo "<br><span><i class='fa fa-comments'></i> ".$photo_comments."</span> · ";
}
echo "<span><i class='fa fa-calendar'></i> ".showdate('shortdate', $data['photo_datestamp'])."</span>";
echo '</div>';
echo '</div>'; // Ende panel-body
echo '</div>'; // Ende panel
echo '</div>'; // Ende col-*
}
echo "</div>"; // Ende row
} else {
echo "<div class='text-center'>".$locale['p_0027']."</div>";
}
closeside();
<?php
/*-------------------------------------------------------+
| PHPFusion Content Management System
| Copyright (C) PHP Fusion Inc
| https://phpfusion.com/
+--------------------------------------------------------+
| Filename: latest_photos_panel.php
| Author: Jazzi
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }
$locale = (array) fusion_get_locale('latest_photos_panel', LG_LOCALE);
if (file_exists(INFUSIONS."latest_photos_panel/locale/".fusion_get_settings('locale').".php")) {
include INFUSIONS."latest_photos_panel/locale/".fusion_get_settings('locale').".php";
} else {
include INFUSIONS."latest_photos_panel/locale/English.php";
}
openside($locale['lpp_title']);
$result = dbquery(
"SELECT ta.album_id, album_title, photo_allow_comments, photo_datestamp, photo_id, photo_title, photo_thumb1
FROM ".DB_PHOTO_ALBUMS." ta
INNER JOIN ".DB_PHOTOS." USING (album_id)
WHERE ".groupaccess('album_access')."
ORDER BY photo_datestamp DESC LIMIT 4"
);
if (dbrows($result) > 0) {
echo "<div class='row equal-height'>";
while ($data = dbarray($result)) {
echo '<div class="col-xs-12 col-sm-6 col-md-4 col-lg-3 gallery-index-item">';
echo '<div class="panel panel-default">';
echo "<a href='".INFUSIONS."gallery/gallery.php?photo_id=".$data['photo_id']."' title='".$data['photo_title']."'>";
echo "<img src='".INFUSIONS."gallery/photos/album_".$data['album_id']."/thumbs/".$data['photo_thumb1']."' alt='".$data['photo_title']."' class='img-responsive'>";
echo "</a>";
echo '<div class="panel-body">';
echo '<a href="'.INFUSIONS."gallery/gallery.php?photo_id=".$data['photo_id'].'" class="post-title">'.$data['photo_title'].'</a>';
echo '<div class="album-meta">';
$photo_comments = dbcount("(comment_id)", DB_COMMENTS, "comment_type='P' AND comment_item_id='".$data['photo_id']."'");
if ($data['photo_allow_comments']) {
echo "<br><span><i class='fa fa-comments'></i> ".$photo_comments."</span> · ";
}
echo "<span><i class='fa fa-calendar'></i> ".showdate('shortdate', $data['photo_datestamp'])."</span>";
echo '</div>';
echo '</div>';
echo '</div>';
echo '</div>';
}
echo "</div>";
} else {
echo "<div class='text-center'>".$locale['lpp_nophoto']."</div>";
}
closeside();
<?php
$locale["lpp_title"] = "Neuste Fotos";
$locale["lpp_nophoto"] = "Keine Bilder vorhanden.";
?>
<?php
$locale["lpp_title"] = "Latest Photos";
$locale["lpp_nophoto"] = "No pictures available.";
?>