<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright © 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: random_center_photo_panel.php
| Author: Frits Offenbach (Offenbach)
+--------------------------------------------------------+
| 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 (file_exists(INFUSIONS."random_photo_center_panel/locale/".$settings['locale'].".php")) {
include INFUSIONS."random_photo_center_panel/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."random_photo_center_panel/locale/English.php";
}
opentable($locale['rpc100']);
define("SAFEMODE", @ini_get("safe_mode") ? true : false);
define("PHOTODIR", PHOTOS);
$result = dbquery("SELECT * FROM ".DB_PHOTOS." ORDER BY RAND() LIMIT 0,4");
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
if (dbrows($result) != 0) {
while ($data = dbarray($result)) {
echo "<td width='25%' align='center' valign='top'><a href='".INFUSIONS."hsgallery/photogallery.php?photo_id=".$data['photo_id']."'>";
if ($data['photo_thumb1'] && file_exists(PHOTODIR.$data['photo_thumb1'])) {
echo "<img src='".PHOTOS.(!SAFEMODE ? "album_".$data['album_id']."/" : "").$data['photo_thumb1']."' title='".$data['photo_title']."' alt='".$data['photo_title']."' />";
} else {
echo "<img src='".IMAGES."imagenotfound.jpg' alt='".$locale['rpc101']."' title='".$locale['rpc101']."' border='0' />";
}
echo "</a>\n</td>\n";
}
}
echo "</tr>\n</table>\n";
closetable();
?>
Това е кода за случайна картинка,но при hsgallery.Може ли да се направи да излизат случайни картинки от фотогалерията на php fusion а не от hsgallery ???
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright © 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: random_center_photo_panel.php
| Author: Frits Offenbach (Offenbach)
+--------------------------------------------------------+
| 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 (file_exists(INFUSIONS."random_photo_center_panel/locale/".$settings['locale'].".php")) {
include INFUSIONS."random_photo_center_panel/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."random_photo_center_panel/locale/English.php";
}
opentable($locale['rpc100']);
define("SAFEMODE", @ini_get("safe_mode") ? true : false);
define("PHOTODIR", PHOTOS);
$result = dbquery("SELECT * FROM ".DB_PHOTOS." ORDER BY RAND() LIMIT 0,4");
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
if (dbrows($result) != 0) {
while ($data = dbarray($result)) {
echo "<td width='25%' align='center' valign='top'><a href='".INFUSIONS."hsgallery/photogallery.php?photo_id=".$data['photo_id']."'>";
if ($data['photo_thumb1'] && file_exists(PHOTODIR.$data['photo_thumb1'])) {
echo "<img src='".PHOTOS.(!SAFEMODE ? "album_".$data['album_id']."/" : "").$data['photo_thumb1']."' title='".$data['photo_title']."' alt='".$data['photo_title']."' />";
} else {
echo "<img src='".IMAGES."imagenotfound.jpg' alt='".$locale['rpc101']."' title='".$locale['rpc101']."' border='0' />";
}
echo "</a>\n</td>\n";
}
}
echo "</tr>\n</table>\n";
closetable();
?>
Това е кода за случайна картинка,но при hsgallery.Може ли да се направи да излизат случайни картинки от фотогалерията на php fusion а не от hsgallery ???