Parašė balzhak· 2008 Geg. 3 18:05:19
#1
Gal kas galit pakurt ar nukopijuot naujausių foto panelės kodą? Nes niekur neradau...
Ačiū :)
Parašė balzhak· 2008 Geg. 3 21:05:50
#2
Radau tokį:
<?php
/* Created for PHP-FUSION 6.00
Copyright (c) 2005 Petter Paulsson
http://www.php-fusion.se/
Gets itĀ´s name from panel administration. */
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }
$result = dbquery("SELECT panel_name FROM ".$db_prefix."panels WHERE panel_filename = 'latest_images_panel'");
if (dbrows($result) != 0) {
$data = dbarray($result);
$panel_name = $data['panel_name'];
}
openside($panel_name);
$result = dbquery("SELECT * FROM ".$db_prefix."photos ORDER BY photo_id DESC LIMIT 0,4");
if (dbrows($result) != 0) {
while($data = dbarray($result)) {
$itemsubject = trimlink($data['photo_id'], 23);
$itemdescription = trimlink($data['photo_title'], 23);
echo "<a href='".BASEDIR."photogallery.php?photo=".$data['photo_id']."' title='".$data['photo_title']."' class='side'><center>
<img src='".BASEDIR."images/photoalbum/".$data['photo_id']."t.jpg' border='0'><br /> $itemdescription <p> </center></a>\n";
}
} else {
echo $locale['004'];
}
closeside();
?>
Bet kažkodėl neveikia ir metą tokį errorą:
Parse error: syntax error, unexpected '<' in /home/speedattack/public_html/administration/panel_editor.php(111) : eval()'d code on line 1
Gal yra kokių minčiu kaip pataisyt?
P.S. Sorry už dvigubą postą ;)
Redagavo balzhak· 2008 Geg. 3 21:05:59
Parašė balzhak· 2008 Geg. 4 12:05:29
#4
SpRoGaLT taip irgi neveike, bet radau kitą vaikiantį, jei kam prireiks tai va:
openside('Paskutinės foto');
$result = dbquery(
"SELECT tp.*, ta.*, tu.user_id,user_name FROM ".$db_prefix."photos tp
LEFT JOIN ".$db_prefix."photo_albums ta USING (album_id)
LEFT JOIN ".$db_prefix."users tu ON tp.photo_user=tu.user_id
WHERE ".groupaccess('ta.album_access')." ORDER BY tp.photo_datestamp DESC LIMIT 0,9"
);
if (dbrows($result) != 0) {
while($data = dbarray($result)) {
$itemsubject = trimlink($data['photo_id'], 23);
$itemdescription = trimlink($data['photo_title'], 23);
$photodir = (!SAFEMODE ? "album_".$data['album_id']."/" : "");
echo "<br>\n";
echo "<center><a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' title='".$data['photo_title']."' class='side'>
<img src='".PHOTOS.$photodir.$data['photo_thumb1']."' title='".$data['photo_title']."' alt='".$data['photo_title']."' border='0'><br>$itemdescription</a><br>\n";
echo $locale['459'].showdate("shortdate", $data['photo_datestamp'])."<br>\n";
echo $locale['460']."<a href='".BASEDIR."profile.php?lookup=".$data['photo_user']."' class='side'>".$data['user_name']."</a><br></center>\n";
echo "<br>\n";
}
} else {
echo $locale['004'];
}
closeside();
?>