</div> </div> <div class="requirement"> <a href="javascript:void(0);" data-toggle="collapse" data-target="#server_config_advanced_options" class="advanced-options-title collapsed"><span><?php echo $this->t('advanced'); ?> </span><b class="caret"></b></a> <div id="server_config_advanced_options" class="collapse"> <div class="control-group"> <label class="control-label"><?php echo $this->t('secure_server_host_name'); ?> </label> <div class="controls"> <input type="text" name="server_settings[https_host]" value="<?php echo Tygh\Tools\Url::decode($this->prepareVar($_tpl_vars, 'server_settings.https_host', 'string', Registry::get('config.http_host'))); ?> "> </div> </div> <div class="control-group control-group-last"> <label class="control-label"><?php echo $this->t('secure_server_host_directory'); ?> </label> <div class="controls"> <input type="text" name="server_settings[https_path]" value="<?php echo $this->prepareVar($_tpl_vars, 'server_settings.https_path', 'string', Registry::get('config.http_path')); ?> "> </div>
/** * Smarty plugin * ------------------------------------------------------------- * Type: modifier<br> * Name: to_json<br> * Purpose: converts php array to javascript object notation * Example: {$a|to_json} * ------------------------------------------------------------- */ function smarty_modifier_unpuny($url) { return Tygh\Tools\Url::decode($url); }
/** * Get file contents from local or remote filesystem * * @param string $location file location * @param string $base_dir * @return string $result */ function fn_get_contents($location, $base_dir = '') { $result = ''; $path = $base_dir . $location; if (!empty($base_dir) && !fn_check_path($path)) { return $result; } // Location is regular file if (is_file($path)) { $result = @file_get_contents($path); // Location is url } elseif (strpos($path, '://') !== false) { // Prepare url $url = new \Tygh\Tools\Url($path); $path = $url->build($url->getIsEncoded()); if (Bootstrap::getIniParam('allow_url_fopen') == true) { $result = @file_get_contents($path); } else { $result = Http::get($path); } } return $result; }