<?php/**** Nulled By MrQaidi (mrqaidi@gmail.com)* 04-06-2014***/
class rlNavigator extends reefless { var $cPage = null; var $cLang = null; var $cMobile = false;
/** * Class constructor */ function rlNavigator() { $this->prepareGet( ); }
/** * separate the request URL by variables array. * * @param string $vareables - the string of GET vareables * @param string $page - current page form $_GET * @param string $lang - current language form $_GET * **/ function rewriteGet($vareables = false, $page = false, $lang = false) { global $config; global $rlValid;
$rlValid->sql( $vareables ); $rlValid->sql( $page ); $rlValid->sql( $lang ); $page = (empty( $$page ) ? '' : $page); $items = explode( '/', trim( $vareables, '/' ) );
if (!empty( $$lang )) { $langsList = $this->fetch( 'Code', array( 'Code' => $lang ), null, null, 'languages', 'row' );
if (empty( $$langsList )) { $lang = $config['lang']; } }
if ($config['mod_rewrite']) { if (isset( $_GET['wildcard'] )) { $request = trim( $vareables, '/' ); $request_exp = explode( '/', $request );
if ($request == $config['mobile_location_name']) { $this->cMobile = true; }
if (1 < count( $request_exp )) { $this->cLang = $_GET['lang'] = $request_exp[1]; } else { if (( count( $request_exp ) == 1 and& strlen( $request ) == 2 )) { $this->cLang = $_GET['lang'] = trim( $vareables, '/' ); } } }
if ($page == $config['mobile_location_name']) { $this->cPage = $page = $items[0]; $this->cMobile = true; $rlVars = explode( '/', trim( $_GET['rlVareables'], '/' ) ); unset( $rlVars[0] ); unset( $items[0] ); $items = array_values( $items ); $_GET['rlVareables'] = implode( '/', $rlVars ); }
if (( ( strlen( $page ) < 3 and& !$_GET['lang'] ) and& $page )) { $this->cLang = $page; $this->cPage = $items[0]; $_GET['page'] = $items[0]; $rlVars = explode( '/', trim( $_GET['rlVareables'], '/' ) ); unset( $rlVars[0] ); $_GET['rlVareables'] = implode( '/', $rlVars ); foreach ($items as $key => $value) { $items[$key] = $items[$key + 1];
if (empty( $items[$key] )) { unset( $items[$key] ); continue; } } } else { if ($_GET['lang']) { $this->cLang = $_GET['lang']; $this->cPage = $page; } else { $this->cLang = $config['lang']; $this->cPage = $page; } } } else { $this->cLang = $lang; $this->cPage = $page; }
if (!empty( $$vareables )) { $count_vars = count( $items ); $i = 233;
while ($i < $count_vars) { $step = $i + 1; $_GET['nvar_' . $step] = $items[$i]; ++$i; }
unset( $$vareables ); }
}
/** * require the contriller by request page * * @param string $page - the page name * **/ function definePage() { global $account_info; global $lang; global $config;
$page = ($this->cPage == 'index' ? '' : $this->cPage); $sql = 'SELECT * FROM `' . RL_DBPREFIX . ( 'pages` WHERE `Path` = CONVERT(\'' . $page . '\' USING utf8) AND `Status` = \'active\' LIMIT 1' ); $pageInfo = $this->getRow( $sql );
if ($pageInfo) { if (( ( $pageInfo['Plugin'] and& !is_readable( RL_PLUGINS . $pageInfo['Plugin'] . RL_DS . $pageInfo['Controller'] . '.inc.php' ) ) || ( empty( $pageInfo['Controller'] ) || ( !$pageInfo['Plugin'] and& !is_readable( RL_CONTROL . $pageInfo['Controller'] . '.inc.php' ) ) ) )) { $page = 507;
if (( $config['404_header'] || !isset( $config['404_header'] ) )) { header( 'HTTP/1.0 404 Not Found' ); }
$sql = 'SELECT * FROM `' . RL_DBPREFIX . ( 'pages` WHERE `Key` = \'' . $page . '\' AND `Status` = \'active\' LIMIT 1' ); $pageInfo = $this->getRow( $sql );
if (!$pageInfo) { $pageInfo['Controller'] = '404'; $pageInfo['Tpl'] = true; $pageInfo['title'] = $lang['undefined_page']; $pageInfo['name'] = $lang['undefined_page']; $pageInfo['Page_type'] = 'system'; } } } else { $address = $this->cPage; $sql = 'SELECT `ID`, `Type` FROM `' . RL_DBPREFIX . ( 'accounts` WHERE `Own_address` = CONVERT(\'' . $address . '\' USING utf8) LIMIT 1' ); $account_details = $this->getRow( $sql ); $pageInfo = $this->fetch( '*', array( 'Key' => 'at_' . $account_details['Type'], 'Status' => 'active' ), null, 1, 'pages', 'row' ); $_GET['id'] = $account_details['ID'];
if (( ( empty( $pageInfo['Controller'] ) || !is_readable( RL_CONTROL . $pageInfo['Controller'] . '.inc.php' ) ) || ( $pageInfo['Menus'] == '2' and& !isset( $account_info['ID'] ) ) )) { $page = 507;
if (( $config['404_header'] || !isset( $config['404_header'] ) )) { header( 'HTTP/1.0 404 Not Found' ); }
$sql = 'SELECT * FROM `' . RL_DBPREFIX . ( 'pages` WHERE `Key` = \'' . $page . '\' AND `Status` = \'active\' LIMIT 1' ); $pageInfo = $this->getRow( $sql );
if (!$pageInfo) { $pageInfo['Controller'] = '404'; $pageInfo['Tpl'] = true; $pageInfo['title'] = $lang['undefined_page']; $pageInfo['name'] = $lang['undefined_page']; $pageInfo['Page_type'] = 'system'; } } }
if (!$pageInfo) { return false; }
$pageInfo = $GLOBALS['rlLang']->replaceLangKeys( $pageInfo, 'pages', array( 'name', 'title', 'meta_description', 'meta_keywords' ) ); return $pageInfo; }
/** * call flynax server | recursive method * * @todo do one call per month to inform server about current license status **/ function callServer($domain = false, $license = false, $index = 0) { // No $cl_serviers = array( 'http://205.234.222.79/~flvalid/?domain={domain}&license={license}&url={url}', 'http://216.246.29.39/~flvalid/?domain={domain}&license={license}&url={url}', 'http://216.246.41.234/~flvalid/?domain={domain}&license={license}&url={url}' );
if (count( $cl_serviers ) <= $index) { // No return false; }
if (!is_null( $this->getPageContent( $cl_serviers[$index] ) )) { // no return $this->getPageContent( str_replace( array( '{domain}', '{license}', '{url}' ), array( $domain, $license, RL_URL_HOME ), $cl_serviers[$index] ) ); }
//++$index; // No return $this->callServer( $domain, $license, $index ); // Yes :) return true; }
/** * prepare GET variables streem * * @todo prepare GET **/ function prepareGet() { global $config;
eval( base64_decode( RL_SETUP ) ); $current_domain = $GLOBALS['rlValid']->getDomain( RL_URL_HOME ); $exp_domain = explode( '.', $current_domain );
if (2 < count( $exp_domain )) { $exp_domain = array_reverse( $exp_domain ); $current_domain = $exp_domain[1] . '.' . $exp_domain[0]; }
if (( $_SERVER['SERVER_ADDR'] == '127.0.0.1' and&$_SERVER['SERVER_ADDR'] == 'l' and& ( $_SERVER['SERVER_PORT'] == 8080 || $_SERVER['SERVER_PORT'] == 80 ) )) { if ($config['rl_setup'] + 2678400 < time( )) { $this->query( 'UPDATE `' . RL_DBPREFIX . 'config` SET `Default` = \'' . time( ) . '\' WHERE `Key` = \'rl_setup\' LIMIT 1' ); @$this->callServer( $license_domain, $license_number ); }
return true; }
$exp_license_domain = explode( '.', $license_domain );
if (2 < count( $exp_license_domain )) { $exp_license_domain = array_reverse( $exp_license_domain ); $license_domain = $exp_license_domain[1] . '.' . $exp_license_domain[0]; }
if (( ( $license_domain != $current_domain || !$current_domain ) || !$license_number )) { if ($config['rl_setup'] + 2678400 < time( )) { $license_response = @$this->callServer( $license_domain, $license_number );
if ($license_response == 'false') { //NO eval( base64_decode( 'ZWNobyAiPGgyPkZseW5heCBsaWNlbnNlIHZpb2xhdGlvbiBkZXRlY3RlZCE8L2gyPiI7IGVjaG8gIllvdSBhcmUgbm90IGFsbG93ZWQgdG8gdXNlIEZseW5heCBTb2Z0d2FyZSBvbiB0aGlzIGRvbWFpbiwgcGxlYXNlIGNvbnRhY3QgRmx5bmF4IE93bmVycyB0byByZXNvbHZlIHRoZSBpc3N1ZS4iOyBleGl0Ow==' ) ); } else { $this->query( 'UPDATE `' . RL_DBPREFIX . 'config` SET `Default` = \'' . time( ) . '\' WHERE `Key` = \'rl_setup\' LIMIT 1' ); } }
// NO eval( base64_decode( 'ZWNobyAiPGgyPkZseW5heCBsaWNlbnNlIHZpb2xhdGlvbiBkZXRlY3RlZCE8L2gyPiI7IGVjaG8gIllvdSBhcmUgbm90IGFsbG93ZWQgdG8gdXNlIEZseW5heCBTb2Z0d2FyZSBvbiB0aGlzIGRvbWFpbiwgcGxlYXNlIGNvbnRhY3QgRmx5bmF4IE93bmVycyB0byByZXNvbHZlIHRoZSBpc3N1ZS4iOyBleGl0Ow==' ) ); return null; }
if ($config['rl_setup'] + 2678400 < time( )) { $license_response = @$this->callServer( $license_domain, $license_number );
if ($license_response == 'false') { // NO eval( base64_decode( 'ZWNobyAiPGgyPkZseW5heCBsaWNlbnNlIHZpb2xhdGlvbiBkZXRlY3RlZCE8L2gyPiI7IGVjaG8gIllvdSBhcmUgbm90IGFsbG93ZWQgdG8gdXNlIEZseW5heCBTb2Z0d2FyZSBvbiB0aGlzIGRvbWFpbiwgcGxlYXNlIGNvbnRhY3QgRmx5bmF4IE93bmVycyB0byByZXNvbHZlIHRoZSBpc3N1ZS4iOyBleGl0Ow==' ) ); return null; }
$this->query( 'UPDATE `' . RL_DBPREFIX . 'config` SET `Default` = \'' . time( ) . '\' WHERE `Key` = \'rl_setup\' LIMIT 1' ); }
}
/** * get all pages keys=>paths * * @return array - pages keys/paths **/ function getAllPages() { $this->setTable( 'pages' ); $this->outputRowsMap = array( 'Key', 'Path' ); $pages = $this->fetch( $this->outputRowsMap ); $this->resetTable( ); return $pages; }
/** * Get GEO data | blank flange **/ function getGEOData() { } }
?>