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

Software: nginx/1.18.0. PHP/7.4.29 

uname -a: Linux ip-172-31-23-220 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 07:00:04 UTC 2025
aarch64
 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/admin/   drwxrwxr-x
Free 39.75 GB of 48.28 GB (82.35%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     add_syllabus_action.php (2.12 KB)      -rw-rw-r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php  
require 'connection.php';
if(isset(
$_POST['importSubmit'])){
    
$technology=$_POST['technology'];
    
$package=$_POST['semester'];
    
    
// Allowed mime types
    
$csvMimes = array('text/x-comma-separated-values''text/comma-separated-values''application/octet-stream''application/vnd.ms-excel''application/x-csv''text/x-csv''text/csv''application/csv''application/excel''application/vnd.msexcel''text/plain');
    
    
// Validate whether selected file is a CSV file
    
if(!empty($_FILES['file']['name']) && in_array($_FILES['file']['type'], $csvMimes)){
        
        
// If the file is uploaded
        
if(is_uploaded_file($_FILES['file']['tmp_name'])){
            
            
// Open uploaded CSV file with read-only mode
            
$csvFile fopen($_FILES['file']['tmp_name'], 'r');
            
            
// Skip the first line
            
fgetcsv($csvFile);
            
$prevResult $con->query("SELECT id FROM syllabus WHERE technology = '$technology' and package='$package'");
            
$row mysqli_fetch_assoc($prevResult);
            if(
$prevResult->num_rows 0){
                
$syllabusid=$row['id'];
                
$con->query("DELETE  FROM syllabus_topics WHERE syllabus_id = '$syllabusid'");
            }else{
                
$add=$con->query("INSERT INTO syllabus (technology,package) VALUES ('$technology','$package')");
                
$syllabusid=$con->insert_id;;
            }
            
// Parse data from CSV file line by line
            
while(($line fgetcsv($csvFile)) !== FALSE){
                
// Get row data
                
$topic   $line[0];
                
$days =$line[1];
                
$add=$con->query("INSERT INTO syllabus_topics (syllabus_id,topic,no_of_days) VALUES ('$syllabusid','$topic','$days')");
            }
            
            
// Close opened CSV file
            
fclose($csvFile);
            
            
$qstring '?status=succ';
        }else{
            
$qstring '?status=err';
        }
    }else{
        
$qstring '?status=invalid_file';
    }
}
header("Location: add_syllabus.php".$qstring);

?>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

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

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