/home/ploi/oneip.vn/wp-content/themes/oneip/funcs/data_helper.php
'Đang xây dựng' => __('Đang xây dựng'),
'Đang vận hành' => __('Đang vận hành'),
'Đã hết hạn' => __('Đã hết hạn')
];
}
function getPlaceTypes() {
return [
'Queenbee' => __('Queenbee'),
'Key Market' => __('Key Market'),
'Vocational school' => __('Vocational school')
];
}
function getUnitStates() {
return [
'Đang xây dựng' => __('Đang xây dựng'),
'Đang hoạt động' => __('Đang hoạt động')
];
}
function formatNumber($number) {
return number_format( $number , 0 , ',' , '.' );
}
function formatFloat($number) {
return number_format( $number , 2 , ',' , '.' );
}
function get_unit_image($unit_id) {
$image_name = $unit_id.'-hinh01.jpg';
//$image_name = 'hinh-404.jpg';
$exist = file_exists(__DIR__ . '/../../../../unit_images/' . $image_name);
if($exist) {
return $image_name;
}
return 'hinh-404.jpg';
}
function get_unit_images($unit_id) {
$images = [];
for ($i=1; $i < 20; $i++) {
$number_string = str_pad($i, 2, '0', STR_PAD_LEFT);
/home/ploi/oneip.vn/wp-content/themes/oneip/funcs/data_helper.php
'Đang xây dựng' => __('Đang xây dựng'),
'Đang vận hành' => __('Đang vận hành'),
'Đã hết hạn' => __('Đã hết hạn')
];
}
function getPlaceTypes() {
return [
'Queenbee' => __('Queenbee'),
'Key Market' => __('Key Market'),
'Vocational school' => __('Vocational school')
];
}
function getUnitStates() {
return [
'Đang xây dựng' => __('Đang xây dựng'),
'Đang hoạt động' => __('Đang hoạt động')
];
}
function formatNumber($number) {
return number_format( $number , 0 , ',' , '.' );
}
function formatFloat($number) {
return number_format( $number , 2 , ',' , '.' );
}
function get_unit_image($unit_id) {
$image_name = $unit_id.'-hinh01.jpg';
//$image_name = 'hinh-404.jpg';
$exist = file_exists(__DIR__ . '/../../../../unit_images/' . $image_name);
if($exist) {
return $image_name;
}
return 'hinh-404.jpg';
}
function get_unit_images($unit_id) {
$images = [];
for ($i=1; $i < 20; $i++) {
$number_string = str_pad($i, 2, '0', STR_PAD_LEFT);
/home/ploi/oneip.vn/wp-content/themes/oneip/resources/views/front/product/index.php
</li>
<?php } ?>
<?php if( !empty($unit->acreage_production) ){ ?>
<li>
<p class="inline-flex w-[90%] justify-between whitespace-pre-line text-black"><span class="font-bold"><?php echo __l('acreage_production'); ?></span> <span class="text-right"><?php echo formatNumber($unit->acreage_production); ?> m2</span></p>
</li>
<?php } ?>
<?php if( !empty($unit->office_production_rate) ){ ?>
<li>
<p class="inline-flex w-[90%] justify-between whitespace-pre-line text-black"><span class="font-bold"><?php echo __l('office_production_rate'); ?></span> <span class="text-right"><?php echo formatNumber($unit->office_production_rate); ?> %</span></p>
</li>
<?php } ?>
<?php if( !empty($unit->minimum_land_lease) ){ ?>
<li>
<p class="inline-flex w-[90%] justify-between whitespace-pre-line text-black"><span class="font-bold"><?php echo __l('minimum_land_lease'); ?></span> <span class="text-right"><?php echo formatNumber($unit->minimum_land_lease); ?> m2</span></p>
</li>
<?php } ?>
<?php if( !empty($unit->leasable_area) ){ ?>
<li>
<p class="inline-flex w-[90%] justify-between whitespace-pre-line text-black"><span class="font-bold"><?php echo __l('leasable_area'); ?></span> <span class="text-right"><?php echo formatNumber($unit->leasable_area); ?> m2</span></p>
</li>
<?php } ?>
<?php if( !empty($unit->min_leasing_charge) ){ ?>
<li>
<p class="inline-flex w-[90%] justify-between whitespace-pre-line text-black"><span class="font-bold"><?php echo __l('min_leasing_charge'); ?></span> <span class="text-right">$<?php echo formatNumber($unit->min_leasing_charge); ?></span></p>
</li>
<?php } ?>
<?php if( !empty($unit->min_leasing_month) ){ ?>
<li>
<p class="inline-flex w-[90%] justify-between whitespace-pre-line text-black"><span class="font-bold"><?php echo __l('min_leasing_month'); ?></span> <span class="text-right"><?php echo formatNumber($unit->min_leasing_month); ?> months</span></p>
</li>
<?php } ?>
<?php if( !empty($unit->max_leasing_charge) ){ ?>
<li>
<p class="inline-flex w-[90%] justify-between whitespace-pre-line text-black"><span class="font-bold"><?php echo __l('max_leasing_charge'); ?></span> <span class="text-right"><?php echo formatNumber($unit->max_leasing_charge); ?></span></p>
</li>
<?php } ?>
<?php if( !empty($unit->firer_tank_capacity) ){ ?>
<li>
<p class="inline-flex w-[90%] justify-between whitespace-pre-line text-black"><span class="font-bold"><?php echo __l('firer_tank_capacity'); ?></span> <span class="text-right"><?php echo formatNumber($unit->firer_tank_capacity); ?> m3</span></p>
/home/ploi/oneip.vn/wp-content/plugins/typerocket-v5/typerocket/vendor/typerocket/professional/src/Template/TachyonTemplateEngine.php
echo $this->sections[$section] ?? null;
}
/**
* @param string $layout
*/
public function layout($layout)
{
$this->layout = $layout;
ob_start();
}
/**
* Load Template
*/
public function load()
{
extract( $this->data );
/** @noinspection PhpIncludeInspection */
include ( $this->file );
if($this->layout) {
$html = trim(ob_get_clean());
if(empty($this->sections['main'])) {
$this->sections['main'] = $html;
} elseif($html) {
$this->sections['__main'] = $html;
}
$this->include($this->layout);
}
}
}
/home/ploi/oneip.vn/wp-content/plugins/typerocket-v5/typerocket/vendor/typerocket/core/src/Template/View.php
{
$view_title = $this->getTitle();
$this->setContext($context);
if($view_title) {
add_filter('document_title_parts', function( $title ) use ($view_title) {
if( is_string($view_title) ) {
$title = [];
$title['title'] = $view_title;
} elseif ( is_array($view_title) ) {
$title = $view_title;
}
return $title;
}, 101);
}
$this->setFolder($this->getFolderPath());
$file = $this->getComposedFilePath();
$templateEngine = $this->viewsEngine ?? Config::get('app.templates.' . $context) ?? Config::get('app.templates.views');
(new $templateEngine($file, $this->getData(), $context, $this))->load();
}
/**
* Render View
*
* @param string|null $context the views context to use
*/
public function render($context = null)
{
$context = $context ?? $this->getContext() ?? 'views';
$this->load($context);
}
/**
* Set Context
*
* Can be a key from config/paths like `views`.
*
* @param null|string $context the template engine context to use
/home/ploi/oneip.vn/wp-content/plugins/typerocket-v5/typerocket/vendor/typerocket/core/src/Template/View.php
return $title;
}, 101);
}
$this->setFolder($this->getFolderPath());
$file = $this->getComposedFilePath();
$templateEngine = $this->viewsEngine ?? Config::get('app.templates.' . $context) ?? Config::get('app.templates.views');
(new $templateEngine($file, $this->getData(), $context, $this))->load();
}
/**
* Render View
*
* @param string|null $context the views context to use
*/
public function render($context = null)
{
$context = $context ?? $this->getContext() ?? 'views';
$this->load($context);
}
/**
* Set Context
*
* Can be a key from config/paths like `views`.
*
* @param null|string $context the template engine context to use
*
* @return $this
*/
public function setContext($context = null)
{
$this->context = $context ?? $this->getContext();
return $this;
}
/**
* @return null|string
/home/ploi/oneip.vn/wp-content/plugins/typerocket-v5/typerocket/vendor/typerocket/core/src/Http/Response.php
if( $forceResponseArray ) {
$response->exitJson($statusCode);
}
if(class_exists('\TypeRocketPro\Http\Download')) {
if( $returned instanceof \TypeRocketPro\Http\Download) {
$returned->send();
}
}
if( $returned instanceof Redirect) {
$returned->now();
}
if( $returned instanceof Response ) {
wp_send_json( $returned->toArray() );
}
if( $returned instanceof View ) {
$returned->render();
die();
}
if( $returned instanceof Model ) {
wp_send_json( $returned->toArray() );
}
if( $returned instanceof Results ) {
wp_send_json( $returned->toArray() );
}
if( is_callable($returned) ) {
call_user_func($returned, $this);
die();
}
if( is_array($returned) || is_object($returned) ) {
if($returned instanceof \WP_Error) {
$statusCode = $returned->get_error_code();
/home/ploi/oneip.vn/wp-content/plugins/typerocket-v5/typerocket/vendor/typerocket/core/src/Http/Router.php
if($redirect) {
$redirect = Str::replaceFirst($requestedPath, $redirect, $this->request->getUri());
$redirect = apply_filters('typerocket_route_redirect', $redirect, $this, $wpTrailingslash);
if($redirect) {
wp_redirect($redirect);
die();
}
}
$responder = new HttpResponder;
$responder
->getHandler()
->setRoute( $this->route )
->setController( $this->route->do );
$responder->respond( $this->args );
\TypeRocket\Http\Response::getFromContainer()->finish();
}
/**
* Route request through registered routes if these is a match
* @return Router
*/
public function detectRoute()
{
$root = $this->config['root'] ?? get_site_url();
$routesRegistered = $this->routes->getRegisteredRoutes($this->request->getFormMethod());
$this->path = $this->request->getPathWithoutRoot($root);
if( $this->matchRoute($this->path, $routesRegistered) ) {
add_filter( 'redirect_canonical', [$this, 'redirectCanonical'] , 10, 2);
}
return $this;
}
/home/ploi/oneip.vn/wp-content/plugins/typerocket-v5/typerocket/vendor/typerocket/core/src/Http/Router.php
*/
public function __construct($request, $config, RouteCollection $routes)
{
$this->request = $request;
$this->config = $config;
$this->routes = $routes;
}
/**
* Init Hooks
*
* @return $this
*/
public function initHooks()
{
if( ! is_admin() ) {
// template_include is needed to keep admin bar
add_filter('template_include', function( $template ) {
if( $this->route ) {
$this->runRoute();
}
return $template;
});
add_filter( 'query_vars', function($vars) {
$vars[] = 'tr_route_var';
return $vars;
} );
add_filter( 'posts_request', function($sql, $q) {
/** @var WP_Query $q */
if ( $q->is_main_query() && !empty($q->query['tr_route_var']) ) {
// disable row count
$q->query_vars['no_found_rows'] = true;
// disable cache
$q->query_vars['cache_results'] = false;
$q->query_vars['update_post_meta_cache'] = false;
$q->query_vars['update_post_term_cache'] = false;
/home/ploi/oneip.vn/wp-includes/class-wp-hook.php
$nesting_level = $this->nesting_level++;
$this->iterations[ $nesting_level ] = array_keys( $this->callbacks );
$num_args = count( $args );
do {
$this->current_priority[ $nesting_level ] = current( $this->iterations[ $nesting_level ] );
$priority = $this->current_priority[ $nesting_level ];
foreach ( $this->callbacks[ $priority ] as $the_ ) {
if ( ! $this->doing_action ) {
$args[0] = $value;
}
// Avoid the array_slice() if possible.
if ( 0 == $the_['accepted_args'] ) {
$value = call_user_func( $the_['function'] );
} elseif ( $the_['accepted_args'] >= $num_args ) {
$value = call_user_func_array( $the_['function'], $args );
} else {
$value = call_user_func_array( $the_['function'], array_slice( $args, 0, (int) $the_['accepted_args'] ) );
}
}
} while ( false !== next( $this->iterations[ $nesting_level ] ) );
unset( $this->iterations[ $nesting_level ] );
unset( $this->current_priority[ $nesting_level ] );
$this->nesting_level--;
return $value;
}
/**
* Calls the callback functions that have been added to an action hook.
*
* @since 4.7.0
*
* @param array $args Parameters to pass to the callback functions.
/home/ploi/oneip.vn/wp-includes/plugin.php
$all_args = func_get_args(); // phpcs:ignore PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue.NeedsInspection
_wp_call_all_hook( $all_args );
}
if ( ! isset( $wp_filter[ $hook_name ] ) ) {
if ( isset( $wp_filter['all'] ) ) {
array_pop( $wp_current_filter );
}
return $value;
}
if ( ! isset( $wp_filter['all'] ) ) {
$wp_current_filter[] = $hook_name;
}
// Pass the value to WP_Hook.
array_unshift( $args, $value );
$filtered = $wp_filter[ $hook_name ]->apply_filters( $value, $args );
array_pop( $wp_current_filter );
return $filtered;
}
/**
* Calls the callback functions that have been added to a filter hook, specifying arguments in an array.
*
* @since 3.0.0
*
* @see apply_filters() This function is identical, but the arguments passed to the
* functions hooked to `$hook_name` are supplied using an array.
*
* @global WP_Hook[] $wp_filter Stores all of the filters and actions.
* @global int[] $wp_filters Stores the number of times each filter was triggered.
* @global string[] $wp_current_filter Stores the list of current filters with the current one last.
*
* @param string $hook_name The name of the filter hook.
* @param array $args The arguments supplied to the functions hooked to `$hook_name`.
/home/ploi/oneip.vn/wp-includes/template-loader.php
if ( 'is_attachment' === $tag ) {
remove_filter( 'the_content', 'prepend_attachment' );
}
break;
}
}
if ( ! $template ) {
$template = get_index_template();
}
/**
* Filters the path of the current template before including it.
*
* @since 3.0.0
*
* @param string $template The path of the template to include.
*/
$template = apply_filters( 'template_include', $template );
if ( $template ) {
include $template;
} elseif ( current_user_can( 'switch_themes' ) ) {
$theme = wp_get_theme();
if ( $theme->errors() ) {
wp_die( $theme->errors() );
}
}
return;
}
/home/ploi/oneip.vn/wp-blog-header.php
<?php
/**
* Loads the WordPress environment and template.
*
* @package WordPress
*/
if ( ! isset( $wp_did_header ) ) {
$wp_did_header = true;
// Load the WordPress library.
require_once __DIR__ . '/wp-load.php';
// Set up the WordPress query.
wp();
// Load the theme template.
require_once ABSPATH . WPINC . '/template-loader.php';
}
/home/ploi/oneip.vn/index.php
<?php
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/
/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
define( 'WP_USE_THEMES', true );
/** Loads the WordPress Environment and Template */
require __DIR__ . '/wp-blog-header.php';