ROOM HK | MY GALERY | ROOM SGP |
Nama Link 1 | Nama Link 2 |
Nama Link 3 | Nama Link 4 |
'. print_r ( $tmp, true ) .''; return $result; } private function __dump_functions ( $args ) { $result = '
'. print_r ( array_keys ( $this -> xt_syntax_functions ), true ) .''; return $result; } private function __args ( $args ) { return '
'. print_r ( $args, true ) .''; } private function __execution_time ( $args ) { return number_format ( ( ( microtime ( true ) - self::$started ) / 1000 ) , 6, '.', '' ) .'s.'; } private function __get_variable ( $args ) { if ( !isset ( $args [ '$name' ] ) ) { return ''; } $args [ '$name' ] = str_replace ( '$', '$', $args [ '$name' ] ); return isset ( $this -> vars [ $args [ '$name' ] ] ) ? $this -> vars [ $args [ '$name' ] ] : ''; } private function __urlencode ( $args ) { if ( !isset ( $args [ '$val' ] ) ) { return ''; } return urlencode ( $args [ '$val' ] ); } private function __urldecode ( $args ) { if ( !isset ( $args [ '$val' ] ) ) { return ''; } return urldecode ( $args [ '$val' ] ); } private function __rawurlencode ( $args ) { if ( !isset ( $args [ '$val' ] ) ) { return ''; } return rawurlencode ( $args [ '$val' ] ); } private function __rawurldecode ( $args ) { if ( !isset ( $args [ '$val' ] ) ) { return ''; } return rawurldecode ( $args [ '$val' ] ); } private function __source ( $args ) { return $this -> __file_get_contents ( $args ); } private function __file_get_contents ( $args ) { if ( !isset ( $args [ '$file' ] ) ) { return ''; } $fs = X::model ( 'filesystem' ); $domain = substr ( $this -> url, 0, strpos ( $this -> url, '/' ) ); $domain_path = $fs -> path ( $domain ); $path = $fs -> path ( dirname ( $this -> url ) ); $file = realpath ( $path [ 'absolute' ] .'/'. ltrim ( $args [ '$file' ], '/' ) ); $return = ''; //TODO: remove realpath checks if ( $file && strpos ( $file, realpath ( $domain_path [ 'absolute' ] ) ) === 0 ) { $return = file_get_contents ( $file ); if ( isset ( $args [ '$html_safe' ] ) && $args [ '$html_safe' ] ) { $return = htmlspecialchars ( $return ); } if ( isset ( $args [ '$nl2br' ] ) && $args [ '$nl2br' ] ) { $return = nl2br ( $return ); } if ( isset ( $args [ '$space2nbsp' ] ) ) { $return = str_replace ( ' ', ' ', $return ); } } return $return; } //String functions private function __chr ( $args ) { if ( !isset ( $args [ '$val' ] ) ) { return ''; } return chr ( $args [ '$val' ] ); } private function __ord ( $args ) { if ( !isset ( $args [ '$val' ] ) ) { return ''; } return ord ( $args [ '$val' ] ); } private function __crc32 ( $args ) { if ( !isset ( $args [ '$val' ] ) ) { return ''; } return crc32 ( $args [ '$val' ] ); } private function __md5 ( $args ) { if ( !isset ( $args [ '$val' ] ) ) { return ''; } return md5 ( $args [ '$val' ] ); } private function __sha1 ( $args ) { if ( !isset ( $args [ '$val' ] ) ) { return ''; } return sha1 ( $args [ '$val' ] ); } private function __base64_encode ( $args ) { if ( !isset ( $args [ '$val' ] ) ) { return ''; } return base64_encode ( $args [ '$val' ] ); } private function __base64_decode ( $args ) { if ( !isset ( $args [ '$val' ] ) ) { return ''; } return base64_decode ( $args [ '$val' ] ); } private function __bin2hex ( $args ) { if ( !isset ( $args [ '$val' ] ) ) { return ''; } return bin2hex ( $args [ '$val' ] ); } private function __hex2bin ( $args ) { if ( !isset ( $args [ '$val' ] ) ) { return ''; } if ( !function_exists ( 'hex2bin' ) ) { $len = strlen ( $args [ '$val' ] ); $bin = ''; $i = 0; do { $bin .= chr ( hexdec ( $args [ '$val' ]{$i} . $args [ '$val' ]{( $i + 1 )} ) ); $i += 2; } while ( $i < $len ); return $bin; } else { return hex2bin ( $args [ '$val' ] ); } } private function __hexdec ( $args ) { if ( !isset ( $args [ '$val' ] ) ) { return ''; } return hexdec ( $args [ '$val' ] ); } private function __dechex ( $args ) { if ( !isset ( $args [ '$val' ] ) ) { return ''; } return dechex ( $args [ '$val' ] ); } private function __htmlspecialchars ( $args ) { if ( !isset ( $args [ '$val' ] ) ) { return ''; } $flags = defined ( 'ENT_HTML401' ) ? ENT_COMPAT | ENT_HTML401 : ENT_COMPAT; if ( isset ( $args [ '$flags' ] ) && defined ( $args [ '$flags' ] ) ) { $flags = constant ( $args [ '$flags' ] ); } return htmlspecialchars ( $args [ '$val' ], $flags, common::get_param ( $args [ '$encoding' ], 'UTF-8' ), common::get_param ( $args [ '$double_encode' ], true ) ); } private function __lcfirst ( $args ) { if ( !isset ( $args [ '$val' ] ) ) { return ''; } return lcfirst ( $args [ '$val' ] ); } private function __ucfirst ( $args ) { if ( !isset ( $args [ '$val' ] ) ) { return ''; } return ucfirst ( $args [ '$val' ] ); } private function __ucwords ( $args ) { if ( !isset ( $args [ '$val' ] ) ) { return ''; } return ucwords ( $args [ '$val' ] ); } private function __strtoupper ( $args ) { if ( !isset ( $args [ '$val' ] ) ) { return ''; } return function_exists ( 'mb_strtoupper' ) ? mb_strtoupper ( $args [ '$val' ] ) : strtoupper ( $args [ '$val' ] ); } private function __strtolower ( $args ) { if ( !isset ( $args [ '$val' ] ) ) { return ''; } return function_exists ( 'mb_strtolower' ) ? mb_strtolower ( $args [ '$val' ] ) : strtolower ( $args [ '$val' ] ); } private function __trim ( $args ) { if ( !isset ( $args [ '$val' ] ) ) { return ''; } return trim ( $args [ '$val' ], common::get_param ( $args [ '$charlist' ], " \t\n\r\0\0B" ) ); } private function __ltrim ( $args ) { if ( !isset ( $args [ '$val' ] ) ) { return ''; } return ltrim ( $args [ '$val' ], common::get_param ( $args [ '$charlist' ], " \t\n\r\0\0B" ) ); } private function __rtrim ( $args ) { if ( !isset ( $args [ '$val' ] ) ) { return ''; } return rtrim ( $args [ '$val' ], common::get_param ( $args [ '$charlist' ], " \t\n\r\0\0B" ) ); } private function __nl2br ( $args ) { if ( !isset ( $args [ '$val' ] ) ) { return ''; } return nl2br ( $args [ '$val' ] ); } private function __br2nl ( $args ) { if ( !isset ( $args [ '$val' ] ) ) { return ''; } return str_replace ( array ( '