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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

Version: 1.00 (22.09.04)
*/
?>
<?
//template parsing engine
        include 'kernel/parser.php';

//show boxes
        function show_boxes($sect) {
                global $layout, $boxes;
                foreach ($layout[$sect] as $key => $value) {
                        load_template($boxes[$value]['src']);
                        }
                }

/* return age */
function age() {
        global $en;
        $yrs = date('Y') - $en['mm_year'];
        if (date('n') < $en['mm_month']) {
                $yrs--;
                }
        elseif (date('n') == $en['mm_month'] && date('d') < $en['mm_day']) {
                $yrs--;
                }
        return $yrs;
        }

/* Profile section */
function profile_section($title) {
        global $en;
        $en['box_title'] = $title;
        //load_template(tpl_path.'profile_section_head.tpl');
	  echo '<h2>'.$title.'</h2>';
        }

/* Profile entry */
function profile_entry($title, $value) {
        global $en;
	  $en['pr_rows']++;
	  if ($en['pr_rows'] % 2) $cl = 'alt';
	  else $cl = '';
        echo '<tr class='.$cl.'><td><strong>'.$title.':</strong></td><td>'.$value.'</td></tr>';
        }

/* Profile question */
function profile_question($title, $value) {
        echo '<tr class=alt><td><strong>'.trim($title).'</strong></td><td>'.trim($value).'</td></tr>';
        }


function do_quotes($arr) {
        foreach ($arr as $key => $value) $arr[$key] = sql_escape_string(stripslashes($value));
        return $arr;
        }

/* Loads box header */
function box_head($title, $width = def_box_width) {
        global $en;
        $en['box_title'] = $title;
        $en['box_width'] = $width;
        load_template(tpl_path.'box_head.tpl');
        }

/* Loads box footer */
function box_foot() {
        load_template(tpl_path.'box_foot.tpl');
        }

//full path to category
function full_path_href($catid, $lang = '') {
        global $catz;
   //make array with categories
        $out = array();
        while ($catid != 0) {
                $out[] = $catz[$catid];
                $catid = $catz[$catid]['c_parent'];
                }
   //make paths
        foreach ($out as $c)
                $res = $c['c_url'].'/'.$res;

        if ($lang != '')
                $res = $lang.'/'.$res;
                
        return substr($res,0,-1);
        }

$repl = array ('A','A','A','A','A','A','A','E','E','E','E','E','I','I','I','I','D','N','O','O','O','O','O','O','O','U','U','U','U','Y','b','b','a','a','a','a','a','a','a','e','e','e','e','e','i','i','i','i','n','n','o','o','o','o','o','o','o','u','u','u','u','y','y','y');

function urlname ($src) {
        global $repl;
        for ($k = 192; $k <= 255; $k++) $src = str_replace(chr($k),$repl[$k-192],$src);
        $modfn = preg_replace("(%..)","-",rawurlencode(strtolower($src))); //create URL-filename
        return $modfn;
        }

function ret($val) {
        $glob = strpos($val,'[');
        if ($glob == 0) $glob = strlen($val);
        $glv = substr($val,0,$glob);
        eval ('global '.$glv.';');
        $ev = '$ret = '.$val.';';
        eval($ev);
        return $ret;
        }
        
function call404() {
        ob_clean();
        ob_end_flush();
        echo _resource_not_found;
        exit;
        }

function fileext ($file) {
        $p = pathinfo($file);
        return strtolower($p['extension']);
}


function highlight($text) {
        global $en, $terms, $o1, $o2;
        if (count($terms) > 0)
                foreach ($terms as $val)
                        $text = preg_replace("/$val/i",'<b>'."\\0".'</b>',$text);
        return $text;
        }


//returns formatted size from bytes, for example, 54.22 KB
function convertsize($size){
        $times = 0;
        $comma = '.';
        while ($size>1024){
                $times++;
                $size = $size/1024;
        }
        $size2 = floor($size);
        $rest = $size - $size2;
        $rest = $rest * 100;
        $decimal = floor($rest);

        $addsize = $decimal;
        if ($decimal<10) {$addsize .= '0';};

        if ($times == 0){$addsize=$size2;} else
         {$addsize=$size2.$comma.substr($addsize,0,2);}

        switch ($times) {
          case 1 : $mega = ' KB'; break;
          case 2 : $mega = ' MB'; break;
          case 3 : $mega = ' GB'; break;
          case 4 : $mega = ' TB'; break;}

        $addsize .= $mega;

        return $addsize;
}



function isimage($id) {
        return file_exists('images/sponsored/'.$id.'.jpg');
        }
function isscreenshot($id) {
        return file_exists('images/screenshots/'.$id.'.jpg');
        }

function create_thumbnail($forcedwidth, $forcedheight, $sourcefile, $destfile, $imgcomp) {
        require_once app_root.'/kernel/images.php';
        return internal_create_thumbnail($forcedwidth, $forcedheight, $sourcefile, $destfile, $imgcomp);
        }

/* DISTR:WATERMARK */
function watermark($original, $watermark, $quality) {

                $wmTarget=$watermark;//.'.tmp';

                $origInfo = getimagesize($original);
                $origWidth = $origInfo[0];
                $origHeight = $origInfo[1];

                $waterMarkInfo = getimagesize($watermark);
                $waterMarkWidth = $waterMarkInfo[0];
                $waterMarkHeight = $waterMarkInfo[1];

                // watermark sizing info
                $waterMarkDestWidth=round($origWidth * 0.5);
                $waterMarkDestHeight=round($origHeight * 0.5);

                // get the size info for this watermark.
                $wmInfo=getimagesize($wmTarget);
                $waterMarkDestWidth=$wmInfo[0];
                $waterMarkDestHeight=$wmInfo[1];

                $differenceX = $origWidth - $waterMarkDestWidth;
                $differenceY = $origHeight - $waterMarkDestHeight;

                $placementX =  5;
                $placementY =  $differenceY-5;

                $resultImage = imagecreatefromjpeg($original);
                imagealphablending($resultImage, false);

                $finalWaterMarkImage = imagecreatefrompng($wmTarget);
                $finalWaterMarkWidth = imagesx($finalWaterMarkImage);
                $finalWaterMarkHeight = imagesy($finalWaterMarkImage);

                imagecopymerge($resultImage,
                          $finalWaterMarkImage,
                          $placementX,
                          $placementY,
                          0,
                          0,
                          $finalWaterMarkWidth,
                          $finalWaterMarkHeight,
                          100
                );

                imagejpeg($resultImage,$original,$quality);

                imagedestroy($resultImage);
                imagedestroy($finalWaterMarkImage);
                }

function watermark_img($src) {
        if (watermark == 'Yes' && file_exists('images/watermark.png'))
                watermark($src, 'images/watermark.png', 100-pic_q);
        }
/* /DISTR */

?>

Youez - 2016 - github.com/yon3zu
LinuXploit