<?php
!defined("MONKEYMAO") && die("Accessed Defined!");
$urlconf = array('domains' => '/pic/', 'default' => '?', 'extents' => '.html');
	if(!isset($_SERVER['REQUEST_URI'])) {
		$_SERVER['REQUEST_URI'] = substr($_SERVER['argv'][0],strpos($_SERVER['argv'][0],';') + 1);
	}
	if ($_SERVER['REQUEST_URI']){

		if (strpos(strtolower($urlconf['domains']),'http://') === false){
			$URI_CONFIG_LENGTH = strlen($urlconf['domains'].$urlconf['default']) + 1;
			$URI_QUESTED_LENGTH = strlen($_SERVER['REQUEST_URI']);
			$_SERVER['REQUEST_URI'] = substr($_SERVER['REQUEST_URI'],$URI_CONFIG_LENGTH,($URI_QUESTED_LENGTH - $URI_CONFIG_LENGTH));
		}else{
			$URI_CONFIG_LENGTH = $urlconf['domains'].$urlconf['default'].'/';
			$URI_QUESTED_LENGTH = 'http://'.($_SERVER['HTTP_HOST'] ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME']).$_SERVER['REQUEST_URI'];
			$_SERVER['REQUEST_URI'] = str_replace($URI_CONFIG_LENGTH,'',$URI_QUESTED_LENGTH);
		}
		$_SERVER['REQUEST_URI'] = str_replace($urlconf['extents'],'',$_SERVER['REQUEST_URI']);

		$URI_REQUESTED_VARIABLES = explode('/',$_SERVER['REQUEST_URI']);
		if ($URI_REQUESTED_VARIABLES['0']){
			$action = $URI_REQUESTED_VARIABLES['0'];
			if ($URI_REQUESTED_VARIABLES['1']){
				$pid = $URI_REQUESTED_VARIABLES['1'];
				if ($URI_REQUESTED_VARIABLES['2']){
					$extent = $URI_REQUESTED_VARIABLES['2'];
						$uid = $extent;
					if ($URI_REQUESTED_VARIABLES['3']){
						$uid = $URI_REQUESTED_VARIABLES['3'];
					}
				}else{
					$extent = $uid = '';
				}
			}else{
				$option = $extent = $uid = '';
			}
		}else{
			$action = $pid = $extent = $uid = '';
		}
	}
if($uid){
$pid=$uid;
}
?>