sveiki, turiu beda.. ipuciau i weba snapso ispejimu sistema viskas veikia ciki piki bet ispejimus rodo tik profile.php kaip padaryti kad rodytu forume po rank images? zinau kad yra atsakymu forume labai sukonkretinau uzklausa paieskoje bet vistiek daugiau kaip 8000 rezultatu skaiciau kad ant v6 reik irasyt koda i viewtheard.php
Code
spjimai: \".getWarnings($data['user_id']).\"
bet irasau ir man meta errora (turbut todel kad irasau viduri kito kodo) gal galite man pasakyti kaip padaryti kad rodytu po rank images t.y. kuriam faile kurioj vietoj irasyti koda? :) :-) busiu labai dekingas jeigu padesite. :) :-) jeigu negalite padet nerasykite tokiu zinuciu kaip "naudokis google, naudokis paieska" ir pan. aciu. :) :-)
Redagavo Zyle100 2010-11-03 04:32
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: viewthread.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| 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 INCLUDES.\"forum_include.php\";
require_once THEMES.\"templates/header.php\";
include LOCALE.LOCALESET.\"forum/main.php\";
if (!isset($_GET['thread_id']) || !isnum($_GET['thread_id'])) { redirect(\"index.php\"); }
if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; }
$result = dbquery(
\"SELECT t.*, f.*, f2.forum_name AS forum_cat_name
FROM \".DB_THREADS.\" t
LEFT JOIN \".DB_FORUMS.\" f ON t.forum_id=f.forum_id
LEFT JOIN \".DB_FORUMS.\" f2 ON f.forum_cat=f2.forum_id
WHERE t.thread_id='\".$_GET['thread_id'].\"'\"
);
if (dbrows($result)) {
$fdata = dbarray($result);
if (!checkgroup($fdata['forum_access']) || !$fdata['forum_cat']) { redirect(\"index.php\"); }
} else {
redirect(\"index.php\");
}
if (iMEMBER && isset($_POST['cast_vote']) && (isset($_POST['poll_option']) && isnum($_POST['poll_option']))) {
$result = dbquery(\"SELECT * FROM \".DB_FORUM_POLL_VOTERS.\" WHERE forum_vote_user_id='\".$userdata['user_id'].\"' AND thread_id='\".$_GET['thread_id'].\"'\");
if (!dbrows($result)) {
$result = dbquery(\"UPDATE \".DB_FORUM_POLL_OPTIONS.\" SET forum_poll_option_votes=forum_poll_option_votes+1 WHERE thread_id='\".$_GET['thread_id'].\"' AND forum_poll_option_id='\".$_POST['poll_option'].\"'\");
$result = dbquery(\"UPDATE \".DB_FORUM_POLLS.\" SET forum_poll_votes=forum_poll_votes+1 WHERE thread_id='\".$_GET['thread_id'].\"'\");
$result = dbquery(\"INSERT INTO \".DB_FORUM_POLL_VOTERS.\" (thread_id, forum_vote_user_id, forum_vote_user_ip) VALUES ('\".$_GET['thread_id'].\"', '\".$userdata['user_id'].\"', '\".USER_IP.\"')\");
}
redirect(FUSION_SELF.\"?thread_id=\".$_GET['thread_id']);
}
\n\";
if (!$fdata['thread_locked'] && $can_reply) {
echo \"\n\";
}
if ($can_post) {
echo \"\n
\n\";
}
}
echo \"
\n
\n\";
}
if ($rows != 0) {
if ($_GET['rowstart'] == 0 && $fdata['thread_poll'] == \"1\") {
if (iMEMBER) {
$presult = dbquery(
\"SELECT tfp.*, tfv.forum_vote_user_id FROM \".DB_FORUM_POLLS.\" tfp
LEFT JOIN \".DB_FORUM_POLL_VOTERS.\" tfv
ON tfp.thread_id=tfv.thread_id AND forum_vote_user_id='\".$userdata['user_id'].\"'
WHERE tfp.thread_id='\".$_GET['thread_id'].\"'\"
);
} else {
$presult = dbquery(
\"SELECT tfp.* FROM \".DB_FORUM_POLLS.\" tfp
WHERE tfp.thread_id='\".$_GET['thread_id'].\"'\"
);
}
if (dbrows($presult)) {
$pdata = dbarray($presult); $i = 1;
if (iMEMBER) { echo \"\n\"; }
}
}
$result = dbquery(
\"SELECT p.*, fa.attach_id, fa.attach_name, fa.attach_ext, fa.attach_size, u.*, u2.user_name AS edit_name
FROM \".DB_POSTS.\" p
LEFT JOIN \".DB_FORUM_ATTACHMENTS.\" fa USING(post_id)
LEFT JOIN \".DB_USERS.\" u ON p.post_author = u.user_id
LEFT JOIN \".DB_USERS.\" u2 ON p.post_edituser = u2.user_id AND post_edituser > '0'
WHERE p.thread_id='\".$_GET['thread_id'].\"' ORDER BY post_datestamp LIMIT \".$_GET['rowstart'].\",$posts_per_page\"
);
if (iMOD) { echo \"\n\";
}
list($postcount, $lastpid) = dbarraynum(dbquery(\"SELECT COUNT(post_id), MAX(post_id) FROM \".DB_POSTS.\" WHERE thread_id='\".$_GET['thread_id'].\"' GROUP BY thread_id\"));
if(isnum($postcount)){
dbquery(\"UPDATE \".DB_THREADS.\" SET thread_postcount='$postcount', thread_lastpostid=$lastpid WHERE thread_id='\".$_GET['thread_id'].\"'\");
}
neveikia... ziurekit as jum duodu savo viewthreard.php irasykit jus gal as ne ten kaipnors irasau..
Code
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: viewthread.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| 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 INCLUDES.\"forum_include.php\";
require_once THEMES.\"templates/header.php\";
include LOCALE.LOCALESET.\"forum/main.php\";
if (!isset($_GET['thread_id']) || !isnum($_GET['thread_id'])) { redirect(\"index.php\"); }
if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; }
$result = dbquery(
\"SELECT t.*, f.*, f2.forum_name AS forum_cat_name
FROM \".DB_THREADS.\" t
LEFT JOIN \".DB_FORUMS.\" f ON t.forum_id=f.forum_id
LEFT JOIN \".DB_FORUMS.\" f2 ON f.forum_cat=f2.forum_id
WHERE t.thread_id='\".$_GET['thread_id'].\"'\"
);
if (dbrows($result)) {
$fdata = dbarray($result);
if (!checkgroup($fdata['forum_access']) || !$fdata['forum_cat']) { redirect(\"index.php\"); }
} else {
redirect(\"index.php\");
}
if (iMEMBER && isset($_POST['cast_vote']) && (isset($_POST['poll_option']) && isnum($_POST['poll_option']))) {
$result = dbquery(\"SELECT * FROM \".DB_FORUM_POLL_VOTERS.\" WHERE forum_vote_user_id='\".$userdata['user_id'].\"' AND thread_id='\".$_GET['thread_id'].\"'\");
if (!dbrows($result)) {
$result = dbquery(\"UPDATE \".DB_FORUM_POLL_OPTIONS.\" SET forum_poll_option_votes=forum_poll_option_votes+1 WHERE thread_id='\".$_GET['thread_id'].\"' AND forum_poll_option_id='\".$_POST['poll_option'].\"'\");
$result = dbquery(\"UPDATE \".DB_FORUM_POLLS.\" SET forum_poll_votes=forum_poll_votes+1 WHERE thread_id='\".$_GET['thread_id'].\"'\");
$result = dbquery(\"INSERT INTO \".DB_FORUM_POLL_VOTERS.\" (thread_id, forum_vote_user_id, forum_vote_user_ip) VALUES ('\".$_GET['thread_id'].\"', '\".$userdata['user_id'].\"', '\".USER_IP.\"')\");
}
redirect(FUSION_SELF.\"?thread_id=\".$_GET['thread_id']);
}
\n\";
if (!$fdata['thread_locked'] && $can_reply) {
echo \"\n\";
}
if ($can_post) {
echo \"\n
\n\";
}
}
echo \"
\n
\n\";
}
if ($rows != 0) {
if ($_GET['rowstart'] == 0 && $fdata['thread_poll'] == \"1\") {
if (iMEMBER) {
$presult = dbquery(
\"SELECT tfp.*, tfv.forum_vote_user_id FROM \".DB_FORUM_POLLS.\" tfp
LEFT JOIN \".DB_FORUM_POLL_VOTERS.\" tfv
ON tfp.thread_id=tfv.thread_id AND forum_vote_user_id='\".$userdata['user_id'].\"'
WHERE tfp.thread_id='\".$_GET['thread_id'].\"'\"
);
} else {
$presult = dbquery(
\"SELECT tfp.* FROM \".DB_FORUM_POLLS.\" tfp
WHERE tfp.thread_id='\".$_GET['thread_id'].\"'\"
);
}
if (dbrows($presult)) {
$pdata = dbarray($presult); $i = 1;
if (iMEMBER) { echo \"\n\"; }
}
}
$result = dbquery(
\"SELECT p.*, fa.attach_id, fa.attach_name, fa.attach_ext, fa.attach_size, u.*, u2.user_name AS edit_name
FROM \".DB_POSTS.\" p
LEFT JOIN \".DB_FORUM_ATTACHMENTS.\" fa USING(post_id)
LEFT JOIN \".DB_USERS.\" u ON p.post_author = u.user_id
LEFT JOIN \".DB_USERS.\" u2 ON p.post_edituser = u2.user_id AND post_edituser > '0'
WHERE p.thread_id='\".$_GET['thread_id'].\"' ORDER BY post_datestamp LIMIT \".$_GET['rowstart'].\",$posts_per_page\"
);
if (iMOD) { echo \"\n\";
}
list($postcount, $lastpid) = dbarraynum(dbquery(\"SELECT COUNT(post_id), MAX(post_id) FROM \".DB_POSTS.\" WHERE thread_id='\".$_GET['thread_id'].\"' GROUP BY thread_id\"));
if(isnum($postcount)){
dbquery(\"UPDATE \".DB_THREADS.\" SET thread_postcount='$postcount', thread_lastpostid=$lastpid WHERE thread_id='\".$_GET['thread_id'].\"'\");
}
require_once THEMES.\"templates/footer.php\";
?>
P.S. Sitam viewthread ispejimu kodo nera
Redagavo Zyle100 2010-11-06 11:11