| Server IP : 208.122.213.31 / Your IP : 216.73.216.45 Web Server : Apache System : Linux msd6191.mjhst.com 4.18.0-553.137.1.el8_10.x86_64 #1 SMP Wed Jun 24 11:40:24 UTC 2026 x86_64 User : WHMCS_MIA_382 ( 1001) PHP Version : 7.4.33 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/httpd/html/baberankings.com.bak/members/modules/forums/ |
Upload File : |
<?
/* K-Rate
(C) Rinalds Uzkalns, 2003-2004. All Rights Reserved
http://turn-k.net
Version: 1.00 (22.09.04)
*/
?>
<?
//check session
include 'includes/verify_session.php';
//get post info and check if valid moderator
$thrline = sql_fetch_assoc(sql_query("SELECT * FROM $fthreadtable WHERE t_id=$en[id]"));
$res = sql_query("SELECT * FROM $fmodstable WHERE mod_member=$en[m_id] AND mod_forum=$thrline[t_forum]");
if (sql_num_rows($res) == 0) die('You don`t have moderator rights to delete this post');
//move thread
if ($en['act'] == 'move') {
sql_query("UPDATE $fthreadtable SET t_forum=$en[move] WHERE t_id=$en[id]");
//update forum stats
//old forum
//get last post index for the forum
$last = sql_fetch_assoc(sql_query("SELECT * FROM $fposttable LEFT JOIN $fthreadtable ON p_thread=t_id WHERE t_forum=$thrline[t_forum] ORDER BY p_time DESC LIMIT 1"));
sql_query("UPDATE $forumtable SET f_posts=f_posts-$thrline[t_posts], f_threads=f_threads-1, f_last='$last[p_id]' WHERE f_id=$thrline[t_forum]");
//new forum
//get last post index for the forum
$last = sql_fetch_assoc(sql_query("SELECT * FROM $fposttable LEFT JOIN $fthreadtable ON p_thread=t_id WHERE t_forum=$en[move] ORDER BY p_time DESC LIMIT 1"));
sql_query("UPDATE $forumtable SET f_posts=f_posts+$thrline[t_posts], f_threads=f_threads+1, f_last='$last[p_id]' WHERE f_id=$en[move]");
}
if ($en['act'] == 'sticky') {
sql_query("UPDATE $fthreadtable SET t_sticky=".(int)($en['sticky'] == 'ON').", t_mods_only=".(int)($en['mods'] == 'ON')." WHERE t_id=$en[id]");
}
//go back to thread
ob_clean();
header('Location: '.constant('dir').'forum_thread/'.$en['id'].'.html');
exit;
?>