BVB Source Codes

Chongqing sea on the day of the constellation chart query tool v1.0 Show core.get_php_resource.php Source code

Return Download Chongqing sea on the day of the constellation chart query tool v1.0: download core.get_php_resource.php Source code - Download Chongqing sea on the day of the constellation chart query tool v1.0 Source code - Type:.php
  1. <?php
  2. /**
  3.  * Smarty plugin
  4.  * @package Smarty
  5.  * @subpackage plugins
  6.  */
  7.  
  8. /**
  9.  * Retrieves PHP script resource
  10.  *
  11.  * sets $php_resource to the returned resource
  12.  * @param string $resource
  13.  * @param string $resource_type
  14.  * @param  $php_resource
  15.  * @return boolean
  16.  */
  17.  
  18. function smarty_core_get_php_resource(&$params, &$smarty)
  19. {
  20.  
  21.     $params['resource_base_path'] = $smarty->trusted_dir;
  22.     $smarty->_parse_resource_name($params, $smarty);
  23.  
  24.     /*
  25.      * Find out if the resource exists.
  26.      */
  27.  
  28.     if ($params['resource_type'] == 'file') {
  29.         $_readable = false;
  30.         if(file_exists($params['resource_name']) && is_readable($params['resource_name'])) {
  31.             $_readable = true;
  32.         } else {
  33.             // test for file in include_path
  34.             $_params = array('file_path' => $params['resource_name']);
  35.             require_once(SMARTY_CORE_DIR . 'core.get_include_path.php');
  36.             if(smarty_core_get_include_path($_params, $smarty)) {
  37.                 $_include_path = $_params['new_file_path'];
  38.                 $_readable = true;
  39.             }
  40.         }
  41.     } else if ($params['resource_type'] != 'file') {
  42.         $_template_source = null;
  43.         $_readable = is_callable($smarty->_plugins['resource'][$params['resource_type']][0][0])
  44.             && call_user_func_array($smarty->_plugins['resource'][$params['resource_type']][0][0],
  45.                                     array($params['resource_name'], &$_template_source, &$smarty));
  46.     }
  47.  
  48.     /*
  49.      * Set the error function, depending on which class calls us.
  50.      */
  51.     if (method_exists($smarty, '_syntax_error')) {
  52.         $_error_funcc = '_syntax_error';
  53.     } else {
  54.         $_error_funcc = 'trigger_error';
  55.     }
  56.  
  57.     if ($_readable) {
  58.         if ($smarty->security) {
  59.             require_once(SMARTY_CORE_DIR . 'core.is_trusted.php');
  60.             if (!smarty_core_is_trusted($params, $smarty)) {
  61.                 $smarty->$_error_funcc('(secure mode) ' . $params['resource_type'] . ':' . $params['resource_name'] . ' is not trusted');
  62.                 return false;
  63.             }
  64.         }
  65.     } else {
  66.         $smarty->$_error_funcc($params['resource_type'] . ':' . $params['resource_name'] . ' is not readable');
  67.         return false;
  68.     }
  69.  
  70.     if ($params['resource_type'] == 'file') {
  71.         $params['php_resource'] = $params['resource_name'];
  72.     } else {
  73.         $params['php_resource'] = $_template_source;
  74.     }
  75.     return true;
  76. }
  77.  
  78. /* vim: set expandtab: */
  79.  
  80. ?>
  81.  
downloadcore.get_php_resource.php Source code - Download Chongqing sea on the day of the constellation chart query tool v1.0 Source code
Related Source Codes/Software:
Fetion interface PHP version (free texting) v1.2 - Put on a letter is always too much memory in the c... 2016-09-15
V2.0 small chopper editor - Small chopper editor is different from the 2.0 ver... 2016-09-15
V1.2.0518 hi5360 phones belonging to query the.net version - Adopt cs file, the program without having to compi... 2016-09-15
Data import and export Excel - Export data: is the data stored in CSV format Exce... 2016-09-15
Toolxp.NET play games. Net2.0 Edition - 2009.3.14 update 2016-09-15
Tab Tab control and Demo source code - TabWebControl extended attributes 2016-09-15
A custom desktop Silverlight imitation of Google - Recently learned the Silverlight, use it to write ... 2016-09-15
Asp.net small tool v1.0 mysql database management - Software is introduced in the Asp.net, can through... 2016-09-15
Batch file upload client component free v1.0.1 for Asp.net - Batch file upload client component free of charge 2016-09-15
The thumbnail watermark components v3.0 Demo - Software is introduced ImageWaterMark3.0 thumbnail... 2016-09-15
Micro mansion v2017 online learning platform - The micro mansion online learning platform is laun... 2017-05-04
V2.2 SchoolCMS school management system - SchoolCMS school management system is a PHP + mysq... 2017-05-04
V5.2 virtual currency trading site - Virtual currency trading site is a PHP thinkphp as... 2017-05-04
Open source e-commerce (online) v4.7.170303 iWebShop system - New part Increase merchant phone management backg... 2017-05-04
Tea tea food company dream weaving web site source code (with mobile terminal) v2.1 - Latest kernel development dream template, the temp... 2017-05-04
Pure imitation of han site source code, one a 】 【 c9cms kernel v1.0 - Generic http://www.wufazhuce.com/Han one · Config... 2017-05-04
WebOA v17.2 network office automation system - WebOA network using b/s structure development of o... 2017-05-03
Cool HITCMS reactive black v3.0 enterprise website source code - HITCMS-Haitian response black enterprises website ... 2017-05-03
Ray v7.02 speed survey system - Lightning speed survey system is a. NET+MSSQL deve... 2017-05-03
HITCMS Haitian responsive electronic mechanical v3.0 foreign trade website source code - HITCMS Haitian response electronic machinery trade... 2017-05-03

 Back to top