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/admin/includes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

Version: 1.00 (22.09.04)
*/
?>
<?

//displays options for module
function show_module_options($module, $return) {
        global $en;
        $en['mod_name'] = $module;
        $en['return'] = $return;
        include 'includes/options.php';
        }

//insert new admin into admins table
function new_admin($data) {
        global $admtable, $date, $ip, $privileges, $tables;
        $query = "INSERT INTO $admtable (adm_user,adm_pass,adm_email,adm_date,adm_superadm,adm_rights)
                                  VALUES('$data[user]','".md5($data['pass'])."','$data[email]','$date',".(int)$data['superadm'].",'".base64_encode(serialize($data))."')";
//        foreach ($privileges as $key => $value) $query .= ', '.(int)isset($data[$key]);
        sql_query($query);
        }

function mysql_swap_rows($table,$q1,$q2,$link) {
//get first row
        $query = "SELECT * FROM $table WHERE ".$q1.' LIMIT 1';
        $result = mysql_query($query, $link) or die (mysql_error());
        $line1 = mysql_fetch_array($result, MYSQL_ASSOC);

//get second row
        $query = "SELECT * FROM $table WHERE ".$q2.' LIMIT 1';
        $result = mysql_query($query, $link) or die (mysql_error());
        $line2 = mysql_fetch_array($result, MYSQL_ASSOC);

//get field types
        $f = mysql_num_fields($result);
        for ($i=0; $i < $f; $i++) {
                $fld[mysql_field_name($result, $i)] = mysql_field_type($result, $i);
                $flg[mysql_field_name($result, $i)] = mysql_field_flags($result, $i);
                }

//build queries
        $query1 = "UPDATE $table SET";
        $query2 = $query1;
                foreach ($line1 as $key => $value)
                    if (strpos($flg[$key],'auto_increment') == 0){

                        if ($fld[$key] == 'int') {
                                $query1 .= " $key=".$line2[$key];
                                $query2 .= " $key=".$line1[$key];
                                } else {
                                $query1 .= " $key='".$line2[$key]."'";
                                $query2 .= " $key='".$line1[$key]."'";
                                }
                        $query1 .= ',';
                        $query2 .= ',';
                        }
                $query1 = substr($query1,0,strlen($query1)-1);
                $query2 = substr($query2,0,strlen($query2)-1);
        $query1 .= ' WHERE '.$q1;
        $query2 .= ' WHERE '.$q2;

//swap
        $result = mysql_query($query1, $link) or die (__LINE__.mysql_error());
        $result = mysql_query($query2, $link) or die (__LINE__.mysql_error());
        }
        
function category_select($name,$form,$cat,$lang = def_lang, $style = 'class=inp100') {
        global $catz;

        $kts = 0; $kat = array();

        $p = $cat;

        while($p!=0) {
                $kat[++$kts] = $catz[$p];
                $p = $catz[$p]['c_parent'];
                }

        for ($k = $kts; $k > 0; $k--) {
                $catpath .= ' :: '.$kat[$k]['c_name_'.$lang];
                if (substr($catpath,0,4) == ' :: ') $catpath = substr($catpath,4);
                $opts .= '<option value='.$kat[$k][c_id].($kat[$k][c_id] = $cat ? ' selected' : '').'>'.$catpath.'</option>';
                }

        echo "<select name='$name' onchange=\"ch_options('includes/catbox.php?form=".$form."&lang=$lang&combo=$name', this.value);\" ".$style.'>';

        echo $opts;

        echo '<option value=0'.($cat == 0 ? ' selected' : '').'>'.($cat == 0 ? 'Home' : 'Select Other...').'</option>';

        if ($cat == 0)
                echo '<option value=0>Select Other...</option>';

        echo '</select>';
        }
        
function decode_s ($s) {
        $s = preg_replace('/&\#([\d]{1,3});/e', "chr('\\1')",$s);
        return $s;
        }

function encode_s($s) {
        $s = rawurlencode($s);
        $s = str_replace('%26','&#38;',$s);
        $s = preg_replace('/%([\dABCDEF]{2})/e', "'&#'.hexdec('\\1').';'",$s);
        return $s;
        }
        
//show page header
function admin_header($command, $help = '') {
                global $req, $id, $adm_includes, $modules;

                if ($req == 'module_select') {
                        $title = base64_decode($id);
                        }
                else  {
                        list($bs,$mod,$bss) = explode('/',$adm_includes[$req]);
                        $title = $modules[$mod]['adm_menu'][$req];
                        $title = ($mod != '' ? '<a href="index.php?req=module_select&id='.base64_encode($modules[$mod]['name']).'">'.$modules[$mod]['name'].'</a> '.($modules[$mod]['name'] != '' ? '&gt; ' : '') : '').($command != '' ? $command : $title);
                        }                 

                        echo '<table width=100% class=admin_header><tr><td align=left><h1>'.$title.'</h1></td><td align=right><a href="index.php?req=do_admin_bookmark&id='.base64_encode(serialize(array('req' => $req, 'id' => $id))).'">Bookmark</a>'.($help != '' ? ' | Help' : '').'</td></tr></table>';
        
                }
        
?>

Youez - 2016 - github.com/yon3zu
LinuXploit