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..
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| http://www.php-fu...
+--------------------------------------------------------+
| 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/licen... 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\";
?>
meta erora Vytukai "Table 'a7671677_sharaz.DB_AWARD' doesn't existTable 'a7671677_sharaz.DB_AWARD' doesn't exist"
WwW.KarCiaMa.CoM - Portalas turintis savo unikali praeit,dabart , bei ateit :)
Ta naujoji veikia, bet a? ne?inau kaip padaryti ,kad matytusi daugiau medaliu. Dabar matosi tik tas kur u?dedi pirma, kiti medaliai kuriuos dedu nebesimato.
Kad nekurt atskiros temos ra?ysi ?ioje.
Gal galit kas duoti koda, kad forume po avatru rodyt natio medalius, ne viena medal o visus kurios jis turi. Ir taip pat, kad profilyje rodyt jo medalius irgi visus ir u?jus su pelyt ant medalio rodyt u? k.