Aisku dabar tokie laikai, kai turinio valdymo sistemas valdome one-click principu. Ne kaip seniau kode ieskodavom klaidu, norint moda pasileist.. :D paciam reikdavo susidiegt viska i ftp..
Sveiki susiduriau su sioke toke beda reikia pataisyti kad rodytu strelytes idedu piesinuka ir faila
Liksiu amzinai dekingas jaj kas padesite
Cia photogallery.php
Code
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2011 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: photogallery.php
| Author: Nick Jones (Digitanium)
| Co-Author: Robert Gaudyn (Wooya)
+--------------------------------------------------------+
| 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).
+--------------------------------------------------------*/
require_once \"maincore.php\";
require_once THEMES.\"templates/header.php\";
include LOCALE.LOCALESET.\"photogallery.php\";
if (isset($_GET['photo_id']) && isnum($_GET['photo_id'])){
$result = dbquery(
\"SELECT tp.photo_title, tp.photo_description, tp.photo_filename, tp.photo_thumb2, tp.photo_datestamp, tp.photo_views,
tp.photo_order, tp.photo_allow_comments, tp.photo_allow_ratings, ta.album_id, ta.album_title, ta.album_access,
tu.user_id, tu.user_name, tu.user_status, SUM(tr.rating_vote) AS sum_rating, COUNT(tr.rating_item_id) AS count_votes
FROM \".DB_PHOTOS.\" tp
LEFT JOIN \".DB_PHOTO_ALBUMS.\" ta USING (album_id)
LEFT JOIN \".DB_USERS.\" tu ON tp.photo_user=tu.user_id
LEFT JOIN \".DB_RATINGS.\" tr ON tr.rating_item_id = tp.photo_id AND tr.rating_type='P'
WHERE photo_id='\".$_GET['photo_id'].\"' GROUP BY tp.photo_id\"
);
$data = dbarray($result);
if (!checkgroup($data['album_access'])) {
redirect(FUSION_SELF);
} else {
define(\"PHOTODIR\", PHOTOS.(!SAFEMODE ? \"album_\".$data['album_id'].\"/\" : \"\"));
include INCLUDES.\"comments_include.php\";
include INCLUDES.\"ratings_include.php\";
$result=dbquery(\"UPDATE \".DB_PHOTOS.\" SET photo_views=(photo_views+1) WHERE photo_id='\".$_GET['photo_id'].\"'\");
$pres = dbquery(\"SELECT photo_id FROM \".DB_PHOTOS.\" WHERE photo_order='\".($data['photo_order']-1).\"' AND album_id='\".$data['album_id'].\"'\");
$nres = dbquery(\"SELECT photo_id FROM \".DB_PHOTOS.\" WHERE photo_order='\".($data['photo_order']+1).\"' AND album_id='\".$data['album_id'].\"'\");
$fres = dbquery(\"SELECT photo_id FROM \".DB_PHOTOS.\" WHERE photo_order='1' AND album_id='\".$data['album_id'].\"'\");
$lastres = dbresult(dbquery(\"SELECT MAX(photo_order) FROM \".DB_PHOTOS.\" WHERE album_id='\".$data['album_id'].\"'\"), 0);
$lres = dbquery(\"SELECT photo_id FROM \".DB_PHOTOS.\" WHERE photo_order>='\".$lastres.\"' AND album_id='\".$data['album_id'].\"'\");
if (dbrows($pres)) $prev = dbarray($pres);
if (dbrows($nres)) $next = dbarray($nres);
if (dbrows($fres)) $first = dbarray($fres);
if (dbrows($lres)) $last = dbarray($lres);
\n\";
if ($rows) {
$pdata = dbarray(dbquery(\"
SELECT tp.photo_datestamp, tu.user_id, tu.user_name, tu.user_status FROM \".DB_PHOTOS.\" tp
LEFT JOIN \".DB_USERS.\" tu ON tp.photo_user=tu.user_id
WHERE album_id='\".$_GET['album_id'].\"' ORDER BY photo_datestamp DESC LIMIT 1\"
));
echo $locale['422'].\"$rows \n\";
echo $locale['423'].profile_link($pdata['user_id'], $pdata['user_name'], $pdata['user_status']).\"\".$locale['424'].showdate(\"longdate\", $pdata['photo_datestamp']).\"\n\";
} else {
echo $locale['425'].\"\n\";
}
echo \"
\n
\n
\n
\";
echo \"\";
closetable();
if ($rows) {
opentable($locale['430']);
if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; }
$result = dbquery(
\"SELECT tp.photo_id, tp.photo_title, tp.photo_thumb1, tp.photo_views, tp.photo_datestamp, tp.photo_allow_comments, tp.photo_allow_ratings,
tu.user_id, tu.user_name, tu.user_status, SUM(tr.rating_vote) AS sum_rating, COUNT(tr.rating_item_id) AS count_votes
FROM \".DB_PHOTOS.\" tp
LEFT JOIN \".DB_USERS.\" tu ON tp.photo_user=tu.user_id
LEFT JOIN \".DB_RATINGS.\" tr ON tr.rating_item_id = tp.photo_id AND tr.rating_type='P'
WHERE album_id='\".$_GET['album_id'].\"' GROUP BY photo_id ORDER BY photo_order LIMIT \".$_GET['rowstart'].\",\".$settings['thumbs_per_page']
);
$counter = 0;
echo \"