当前位置: 首页>>代码示例>>PHP>>正文


PHP cms_join_path函数代码示例

本文整理汇总了PHP中cms_join_path函数的典型用法代码示例。如果您正苦于以下问题:PHP cms_join_path函数的具体用法?PHP cms_join_path怎么用?PHP cms_join_path使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了cms_join_path函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: DisplayImage

 function DisplayImage($image, $alt = '', $class = '', $width = '', $height = '')
 {
     $config = cmsms()->GetConfig();
     // check image_directories first
     if (isset($this->_module->_image_directories) && !empty($this->_module->_image_directories)) {
         foreach ($this->_module->_image_directories as $dir) {
             $url = "{$dir}/{$image}";
             $path = cms_join_path($config['root_path'], $url);
             if (is_readable($path)) {
                 if ($this->_module->IsAdminAction()) {
                     $url = "../{$url}";
                 }
                 return $this->_module->CreateImageTag($url, $alt, $width, $height, $class);
             }
         }
     }
     $theme = cmsms()->variables['admintheme'];
     if (is_object($theme)) {
         // we're in the admin
         $txt = $theme->DisplayImage($image, $alt, $width, $height, $class);
     } else {
         // frontend
         $txt = $this->CreateImageTag($image, $alt, $width, $height, $class);
     }
     return $txt;
 }
开发者ID:aldrymaulana,项目名称:cmsdepdagri,代码行数:26,代码来源:class.cgextensions.tools.php

示例2: cms_autoloader

/**
 * A function for auto-loading classes.
 *
 * @since 1.7
 * @param string A class name
 * @return boolean
 */
function cms_autoloader($classname)
{
    global $gCms;
    $config = $gCms->GetConfig();
    $fn = cms_join_path($config['root_path'], 'lib', 'classes', "class.{$classname}.php");
    if (file_exists($fn)) {
        require_once $fn;
        return;
    }
    $fn = cms_join_path($config['root_path'], 'lib', 'classes', "interface.{$classname}.php");
    if (file_exists($fn)) {
        require_once $fn;
        return;
    }
    foreach ($gCms->modules as $module => &$data) {
        if (!isset($data['object'])) {
            continue;
        }
        $obj =& $data['object'];
        $fn = cms_join_path($obj->GetModulePath(), 'lib', "class.{$classname}.php");
        if (file_exists($fn)) {
            require_once $fn;
            return;
        }
        $fn = cms_join_path($obj->GetModulePath(), 'lib', "interface.{$classname}.php");
        if (file_exists($fn)) {
            require_once $fn;
            return;
        }
    }
}
开发者ID:rasomu,项目名称:chuza,代码行数:38,代码来源:autoloader.php

示例3: cge_CGCreateInputSubmit

function cge_CGCreateInputSubmit(&$mod, $id, $name, $value = '', $addtext = '', $image = '', $confirmtext = '', $class = '')
{
    $real_image = '';
    if (!empty($image)) {
        $config = cmsms()->GetConfig();
        // check image_directories first
        if (isset($mod->_image_directories) && !empty($mod->_image_directories)) {
            foreach ($mod->_image_directories as $dir) {
                $url = cms_join_path($dir, $image);
                $path = cms_join_path($config['root_path'], $url);
                if (is_readable($path)) {
                    $real_image = $url;
                }
            }
        }
        if (empty($real_image)) {
            $theme = cmsms()->variables['admintheme'];
            if (is_object($theme)) {
                // we're in the admin
                $txt = $theme->DisplayImage($image, $alt, $width, $height, $class);
                $real_image = $theme->imageLink[$image];
            }
        }
        $addtext .= ' title="' . $value . '"';
    }
    if (!empty($class)) {
        $addtext .= ' class="' . $class . '"';
    }
    return $mod->CreateInputSubmit($id, $name, $value, $addtext, $real_image, $confirmtext);
}
开发者ID:aldrymaulana,项目名称:cmsdepdagri,代码行数:30,代码来源:form_tools.php

示例4: cms_autoloader

function cms_autoloader($classname)
{
    //if( $classname != 'Smarty_CMS' && $classname != 'Smarty_Parser' && startswith($classname,'Smarty') ) return;
    $config = cmsms()->GetConfig();
    // standard classes
    $fn = cms_join_path($config['root_path'], 'lib', 'classes', "class.{$classname}.php");
    if (file_exists($fn)) {
        __cms_load($fn);
        return;
    }
    $lowercase = strtolower($classname);
    $fn = cms_join_path($config['root_path'], 'lib', 'classes', "class.{$lowercase}.inc.php");
    if (file_exists($fn) && $classname != 'Content') {
        __cms_load($fn);
        return;
    }
    // standard interfaces
    $fn = cms_join_path($config['root_path'], 'lib', 'classes', "interface.{$classname}.php");
    if (file_exists($fn)) {
        __cms_load($fn);
        return;
    }
    global $CMS_LAZYLOAD_MODULES;
    global $CMS_INSTALL_PAGE;
    if (!isset($CMS_LAZYLOAD_MODULES) || isset($CMS_INSTALL_PAGE)) {
        return;
    }
    // standard content types
    $fn = cms_join_path($config['root_path'], 'lib', 'classes', 'contenttypes', "{$classname}.inc.php");
    if (file_exists($fn)) {
        __cms_load($fn);
        return;
    }
    // module loaded content types
    $contentops = ContentOperations::get_instance();
    if ($contentops) {
        // why would this ever NOT be true.. dunno, but hey.
        $types = $contentops->ListContentTypes();
        if (in_array(strtolower($classname), array_keys($types))) {
            $contentops->LoadContentType(strtolower($classname));
            return;
        }
    }
    $fn = $config['root_path'] . "/modules/{$classname}/{$classname}.module.php";
    if (file_exists($fn)) {
        __cms_load($fn);
        return;
    }
    $list = ModuleOperations::get_instance()->GetLoadedModules();
    if (is_array($list) && count($list)) {
        foreach (array_keys($list) as $modname) {
            $fn = $config['root_path'] . "/modules/{$modname}/lib/class.{$classname}.php";
            if (file_exists($fn)) {
                __cms_load($fn);
                return;
            }
        }
    }
    // module classes
}
开发者ID:RTR-ITF,项目名称:usse-cms,代码行数:60,代码来源:autoloader.php

示例5: smarty_modifier_cms_date_format

function smarty_modifier_cms_date_format($string, $format = '', $default_date = '')
{
    $gCms = cmsms();
    if ($format == '') {
        $format = get_site_preference('defaultdateformat');
        if ($format == '') {
            $format = '%b %e, %Y';
        }
        if (!isset($gCms->variables['page_id'])) {
            $uid = get_userid(false);
            if ($uid) {
                $tmp = get_preference($uid, 'date_format_string');
                if ($tmp != '') {
                    $format = $tmp;
                }
            }
        }
    }
    $config = $gCms->GetConfig();
    $fn = cms_join_path($config['root_path'], 'lib', 'smarty', 'plugins', 'modifier.date_format.php');
    if (!file_exists($fn)) {
        die;
    }
    require_once $fn;
    return smarty_modifier_date_format($string, $format, $default_date);
}
开发者ID:RTR-ITF,项目名称:usse-cms,代码行数:26,代码来源:modifier.cms_date_format.php

示例6: _load_nls

 /**
  * @ignore
  */
 private static function _load_nls()
 {
     if (!is_array(self::$_nls)) {
         self::$_nls = array();
         $config = cmsms()->GetConfig();
         $nlsdir = cms_join_path($config['root_path'], 'lib', 'nls');
         $langdir = cms_join_path($config['root_path'], $config['admin_dir'], 'lang');
         $files = glob($nlsdir . '/*nls.php');
         if (is_array($files) && count($files)) {
             for ($i = 0; $i < count($files); $i++) {
                 if (!is_file($files[$i])) {
                     continue;
                 }
                 $fn = basename($files[$i]);
                 $tlang = substr($fn, 0, strpos($fn, '.'));
                 if ($tlang != 'en_US' && !file_exists(cms_join_path($langdir, 'ext', $tlang, 'admin.inc.php'))) {
                     continue;
                 }
                 unset($nls);
                 include $files[$i];
                 if (isset($nls)) {
                     $obj = CmsNls::from_array($nls);
                     unset($nls);
                     self::$_nls[$obj->key()] = $obj;
                 }
             }
         }
     }
 }
开发者ID:RTR-ITF,项目名称:usse-cms,代码行数:32,代码来源:class.CmsNlsOperations.php

示例7: __construct

 function __construct(&$content_obj, &$params = array())
 {
     $params['type'] = 'image';
     parent::__construct($content_obj, $params);
     $config = cmsms()->GetConfig();
     $this->SetBlockProperty('prefix', isset($params['prefix']) ? $params['prefix'] : 'thumb_');
     $this->SetBlockProperty('exclude', isset($params['exclude']) && $this->content_obj->IsFalse($params['exclude']));
     $this->SetBlockProperty('dir', cms_join_path($config['uploads_path'], isset($params['dir']) ? $params['dir'] : get_site_preference('contentimage_path')));
     $this->SetBlockProperty('inputname', isset($params['inputname']) ? $params['inputname'] : $this->GetBlockProperty('id'));
 }
开发者ID:aldrymaulana,项目名称:cmsdepdagri,代码行数:10,代码来源:class.acBlockType_image.php

示例8: adodb_error

/**
 * @ignore
 */
function adodb_error($dbtype, $function_performed, $error_number, $error_message, $host, $database, &$connection_obj)
{
    if (file_exists(cms_join_path(dirname(CONFIG_FILE_LOCATION), 'db_error.html'))) {
        include_once cms_join_path(dirname(CONFIG_FILE_LOCATION), 'db_error.html');
        exit;
    } else {
        echo "<strong>Database Connection Failed</strong><br />";
        echo "Error: {$error_message} ({$error_number})<br />";
        echo "Function Performed: {$function_performed}<br />";
    }
}
开发者ID:RTR-ITF,项目名称:usse-cms,代码行数:14,代码来源:adodb.functions.php

示例9: __construct

 function __construct()
 {
     //color-names supported by modern browsers(from http://www.w3schools.com/html/html_colornames.asp)
     $this->colors = array('aliceblue' => '#f0f8ff', 'antiquewhite' => '#faebd7', 'aqua' => '#00ffff', 'aquamarine' => '#7fffd4', 'azure' => '#f0ffff', 'beige' => '#f5f5dc', 'bisque' => '#ffe4c4', 'black' => '#000000', 'blanchedalmond' => '#ffebcd', 'blue' => '#0000ff', 'blueviolet' => '#8a2be2', 'brown' => '#a52a2a', 'burlywood' => '#deb887', 'cadetblue' => '#5f9ea0', 'chartreuse' => '#7fff00', 'chocolate' => '#d2691e', 'coral' => '#ff7f50', 'cornflowerblue' => '#6495ed', 'cornsilk' => '#fff8dc', 'crimson' => '#dc143c', 'cyan' => '#00ffff', 'darkblue' => '#00008b', 'darkcyan' => '#008b8b', 'darkgoldenrod' => '#b8860b', 'darkgray' => '#a9a9a9', 'darkgrey' => '#a9a9a9', 'darkgreen' => '#006400', 'darkkhaki' => '#bdb76b', 'darkmagenta' => '#8b008b', 'darkolivegreen' => '#556b2f', 'darkorange' => '#ff8c00', 'darkorchid' => '#9932cc', 'darkred' => '#8b0000', 'darksalmon' => '#e9967a', 'darkseagreen' => '#8fbc8f', 'darkslateblue' => '#483d8b', 'darkslategray' => '#2f4f4f', 'darkslategrey' => '#2f4f4f', 'darkturquoise' => '#00ced1', 'darkviolet' => '#9400d3', 'deeppink' => '#ff1493', 'deepskyblue' => '#00bfff', 'dimgray' => '#696969', 'dimgrey' => '#696969', 'dodgerblue' => '#1e90ff', 'firebrick' => '#b22222', 'floralwhite' => '#fffaf0', 'forestgreen' => '#228b22', 'fuchsia' => '#ff00ff', 'gainsboro' => '#dcdcdc', 'ghostwhite' => '#f8f8ff', 'gold' => '#ffd700', 'goldenrod' => '#daa520', 'gray' => '#808080', 'grey' => '#808080', 'green' => '#008000', 'greenyellow' => '#adff2f', 'honeydew' => '#f0fff0', 'hotpink' => '#ff69b4', 'indianred' => '#cd5c5c', 'indigo' => '#4b0082', 'ivory' => '#fffff0', 'khaki' => '#f0e68c', 'lavender' => '#e6e6fa', 'lavenderblush' => '#fff0f5', 'lawngreen' => '#7cfc00', 'lemonchiffon' => '#fffacd', 'lightblue' => '#add8e6', 'lightcoral' => '#f08080', 'lightcyan' => '#e0ffff', 'lightgoldenrodyellow' => '#fafad2', 'lightgray' => '#d3d3d3', 'lightgrey' => '#d3d3d3', 'lightgreen' => '#90ee90', 'lightpink' => '#ffb6c1', 'lightsalmon' => '#ffa07a', 'lightseagreen' => '#20b2aa', 'lightskyblue' => '#87cefa', 'lightslategray' => '#778899', 'lightslategrey' => '#778899', 'lightsteelblue' => '#b0c4de', 'lightyellow' => '#ffffe0', 'lime' => '#00ff00', 'limegreen' => '#32cd32', 'linen' => '#faf0e6', 'magenta' => '#ff00ff', 'maroon' => '#800000', 'mediumaquamarine' => '#66cdaa', 'mediumblue' => '#0000cd', 'mediumorchid' => '#ba55d3', 'mediumpurple' => '#9370d8', 'mediumseagreen' => '#3cb371', 'mediumslateblue' => '#7b68ee', 'mediumspringgreen' => '#00fa9a', 'mediumturquoise' => '#48d1cc', 'mediumvioletred' => '#c71585', 'midnightblue' => '#191970', 'mintcream' => '#f5fffa', 'mistyrose' => '#ffe4e1', 'moccasin' => '#ffe4b5', 'navajowhite' => '#ffdead', 'navy' => '#000080', 'oldlace' => '#fdf5e6', 'olive' => '#808000', 'olivedrab' => '#6b8e23', 'orange' => '#ffa500', 'orangered' => '#ff4500', 'orchid' => '#da70d6', 'palegoldenrod' => '#eee8aa', 'palegreen' => '#98fb98', 'paleturquoise' => '#afeeee', 'palevioletred' => '#d87093', 'papayawhip' => '#ffefd5', 'peachpuff' => '#ffdab9', 'peru' => '#cd853f', 'pink' => '#ffc0cb', 'plum' => '#dda0dd', 'powderblue' => '#b0e0e6', 'purple' => '#800080', 'red' => '#ff0000', 'rosybrown' => '#bc8f8f', 'royalblue' => '#4169e1', 'saddlebrown' => '#8b4513', 'salmon' => '#fa8072', 'sandybrown' => '#f4a460', 'seagreen' => '#2e8b57', 'seashell' => '#fff5ee', 'sienna' => '#a0522d', 'silver' => '#c0c0c0', 'skyblue' => '#87ceeb', 'slateblue' => '#6a5acd', 'slategray' => '#708090', 'slategrey' => '#708090', 'snow' => '#fffafa', 'springgreen' => '#00ff7f', 'steelblue' => '#4682b4', 'tan' => '#d2b48c', 'teal' => '#008080', 'thistle' => '#d8bfd8', 'tomato' => '#ff6347', 'turquoise' => '#40e0d0', 'violet' => '#ee82ee', 'wheat' => '#f5deb3', 'white' => '#ffffff', 'whitesmoke' => '#f5f5f5', 'yellow' => '#ffff00', 'yellowgreen' => '#9acd32');
     //some hard-coded default styles
     $this->css = array('.box' => array('height' => '40px', 'width' => '120px', 'margin' => '3px 5px', 'padding' => '2px', 'background-color' => '#fff', 'border-width' => '2px', 'border-color' => '#f00', 'color' => '#000', 'font-size' => '9px'), '.box:nonfirm' => array('border-color' => '#00f', 'background-color' => '#ffcb94'), '.box:firm' => array('border-color' => '#f00', 'background-color' => '#b7e8b1'), '.box:played' => array('border-color' => '#002c8f', 'background-color' => '#bfd6ec'), '.box:winner' => array('border-color' => '#80007f', 'background-color' => '#e5b400', 'color' => '#000'), '.chart' => array('padding' => '10px', 'gapwidth' => '10px', 'background-color' => '#fff7ed', 'font-family' => 'sans', 'minheight' => '526pt', 'minwidth' => '770pt'), '.line' => array('width' => '2px', 'color' => '#008000'));
     //replace defaults from file, if possible
     $csspath = cms_join_path(dirname(dirname(__FILE__)), 'css', 'chart.css');
     if (file_exists($csspath)) {
         self::Parse($csspath);
     }
 }
开发者ID:kleitz,项目名称:CMSMS-Tourney-Module,代码行数:12,代码来源:class.tmtStyler.php

示例10: installerShowErrorPage

function installerShowErrorPage($error, $fragment = '')
{
    include cms_join_path(CMS_INSTALL_BASE, 'templates', 'installer_start.tpl');
    echo '<p class="error">';
    echo $error;
    if (!empty($fragment)) {
        echo ' <a class="external" rel="external" href="' . CMS_INSTALL_HELP_URL . '#' . $fragment . '">?</a>';
    }
    echo '</p>';
    include cms_join_path(CMS_INSTALL_BASE, 'templates', 'installer_end.tpl');
    exit;
}
开发者ID:RTR-ITF,项目名称:usse-cms,代码行数:12,代码来源:functions.php

示例11: __construct

 /**
  * Constructor
  *
  * @param string $src The source URL
  * @param int  $timelimit The amount of time in minutes before this file must be refreshed.  Default is 24 hours.
  * @param string $dest Optional destination filename.
  */
 public function __construct($src, $timelimit = 0, $dest = '')
 {
     $this->_src_spec = $src;
     if ($timelimit <= 0) {
         $timelimit = 24 * 60;
     }
     $this->_cache_timelimit = $timelimit;
     if (empty($dest)) {
         $bn = 'cgecrf_' . md5($src);
         $dest = cms_join_path(TMP_CACHE_LOCATION, $bn);
     }
     $this->_cache_file = $dest;
 }
开发者ID:rainbow-studio,项目名称:cmsms,代码行数:20,代码来源:class.cge_cached_remote_file.php

示例12: GetInstance

 /**
  * GetInstance method used to access the object
  * @access public
  * @return 
  */
 public static function GetInstance()
 {
     if (!isset(self::$_instance)) {
         self::$_instance = new self();
         $rootdir = dirname(dirname(dirname(dirname(__FILE__))));
         $cmsms_cnf_file = cms_join_path($rootdir, 'config.php');
         include $cmsms_cnf_file;
         $file = cms_join_path(dirname(dirname(__FILE__)), 'includes', 'fb_cnf.inc');
         include $file;
         self::$_data = array_merge($config, $fbcfg);
     }
     return self::$_instance;
 }
开发者ID:rainbow-studio,项目名称:cmsms,代码行数:18,代码来源:class.fb_config.php

示例13: DeleteBracket

    /**
    DeleteBracket:
    @mod: reference to Tourney module object
    @bracket_id: single bracket identifier, or array of them
    */
    function DeleteBracket(&$mod, $bracket_id)
    {
        $db = cmsms()->GetDb();
        $pref = cms_db_prefix();
        if (!is_array($bracket_id)) {
            $bracket_id = array($bracket_id);
        }
        foreach ($bracket_id as $bid) {
            $sql = 'SELECT chartcss FROM ' . $pref . 'module_tmt_brackets WHERE bracket_id=?';
            $file = $db->GetOne($sql, array($bid));
            if ($file) {
                $sql = 'SELECT COUNT(*) AS sharers FROM ' . $pref . 'module_tmt_brackets WHERE chartcss=?';
                $num = $db->GetOne($sql, array($file));
                if ($num < 2) {
                    if ($mod->GetPreference('uploads_dir')) {
                        $path = cms_join_path($config['uploads_path'], $mod->GetPreference('uploads_dir'), $file);
                    } else {
                        $path = cms_join_path($config['uploads_path'], $file);
                    }
                    if (is_file($path)) {
                        unlink($path);
                    }
                }
            }
            $file = $mod->ChartImageFile($bid);
            if ($file) {
                unlink($file);
            }
            $sql = 'DELETE FROM ' . $pref . 'module_tmt_tweet WHERE bracket_id=?';
            $db->Execute($sql, array($bid));
            $sql = 'DELETE FROM ' . $pref . 'module_tmt_people WHERE id IN
			 (SELECT team_id FROM ' . $pref . 'module_tmt_teams WHERE bracket_id=?)';
            $db->Execute($sql, array($bid));
            $sql = 'DELETE FROM ' . $pref . 'module_tmt_teams WHERE bracket_id=?';
            $db->Execute($sql, array($bid));
            $sql = 'DELETE FROM ' . $pref . 'module_tmt_matches WHERE bracket_id=?';
            $db->Execute($sql, array($bid));
            $sql = 'DELETE FROM ' . $pref . 'module_tmt_brackets WHERE bracket_id=?';
            $db->Execute($sql, array($bid));
            $bid = $params['bracket_id'];
            $mod->DeleteTemplate('mailout_' . $bid . '_template');
            $mod->DeleteTemplate('mailcancel_' . $bid . '_template');
            $mod->DeleteTemplate('mailrequest_' . $bid . '_template');
            $mod->DeleteTemplate('mailin_' . $bid . '_template');
            $mod->DeleteTemplate('tweetout_' . $bid . '_template');
            $mod->DeleteTemplate('tweetcancel_' . $bid . '_template');
            $mod->DeleteTemplate('tweetrequest_' . $bid . '_template');
            $mod->DeleteTemplate('tweetin_' . $bid . '_template');
            $mod->DeleteTemplate('chart_' . $bid . '_template');
        }
    }
开发者ID:kleitz,项目名称:CMSMS-Tourney-Module,代码行数:56,代码来源:class.tmtDelete.php

示例14: assignVariables

 function assignVariables()
 {
     $values = array();
     $values['sitename'] = isset($_POST['sitename']) ? htmlentities($_POST['sitename'], ENT_QUOTES, 'UTF-8') : 'CMS Made Simple Site';
     $values['db']['dbms'] = isset($_POST['dbms']) ? $_POST['dbms'] : 'mysqli';
     $values['db']['host'] = isset($_POST['host']) ? $_POST['host'] : 'localhost';
     $values['db']['database'] = isset($_POST['database']) ? $_POST['database'] : 'cms';
     $values['db']['username'] = isset($_POST['username']) ? $_POST['username'] : '';
     $values['db']['password'] = isset($_POST['password']) ? $_POST['password'] : '';
     $values['db']['prefix'] = isset($_POST['prefix']) ? $_POST['prefix'] : 'cms_';
     $values['db']['db_port'] = isset($_POST['db_port']) ? $_POST['db_port'] : '';
     // $values['db']['db_socket'] = isset($_POST['db_socket']) ? $_POST['db_socket'] : '';
     if (isset($_SESSION['cms_orig_tz']) && $_SESSION['cms_orig_tz'] != '') {
         $values['timezone'] = $_SESSION['cms_orig_tz'];
         $this->smarty->assign('current_timezone', $_SESSION['cms_orig_tz']);
     }
     if (isset($_POST['timezone'])) {
         $values['timezone'] = $_POST['timezone'];
     }
     $values['umask'] = isset($_POST['umask']) ? $_POST['umask'] : '';
     $values['admininfo']['username'] = $_POST['adminusername'];
     $values['admininfo']['email'] = $_POST['adminemail'];
     if (isset($_POST['adminsalt'])) {
         $values['admininfo']['salt'] = $_POST['adminsalt'];
     }
     $values['admininfo']['password'] = $_POST['adminpassword'];
     $values['email_accountinfo'] = empty($_POST['email_accountinfo']) ? 0 : 1;
     $values['createtables'] = isset($_POST['createtables']) ? 1 : (isset($_POST['sitename']) ? 0 : 1);
     $values['createextra'] = isset($_POST['createextra']) ? 1 : (isset($_POST['sitename']) ? 0 : 1);
     $databases = array(array('name' => 'mysqli', 'title' => 'MySQLi (4.1+)'), array('name' => 'mysql', 'title' => 'MySQL (compatibility)'));
     $dbms_options = array();
     foreach ($databases as $db) {
         $extension = isset($db['extension']) ? $db['extension'] : $db['name'];
         if (extension_loaded($extension)) {
             $dbms_options[] = $db;
         }
     }
     $tmp = timezone_identifiers_list();
     if (is_array($tmp)) {
         $timezones = array();
         $timezones[''] = ilang('none');
         foreach ($tmp as $zone) {
             $timezones[$zone] = $zone;
         }
         $this->smarty->assign('timezones', $timezones);
     }
     $this->smarty->assign('extra_sql', is_file(cms_join_path(CMS_INSTALL_BASE, 'schemas', 'extra.sql')));
     $this->smarty->assign('dbms_options', $dbms_options);
     $this->smarty->assign('values', $values);
     $this->smarty->assign('errors', $this->errors);
 }
开发者ID:RTR-ITF,项目名称:usse-cms,代码行数:51,代码来源:CMSInstallPage5.class.php

示例15: preContent

 function preContent(&$db)
 {
     $test = new StdClass();
     $test->error = false;
     $test->messages = array();
     $db->SetFetchMode(ADODB_FETCH_ASSOC);
     $current_version = 1;
     $query = "SELECT version from " . cms_db_prefix() . "version";
     $dbresult = $db->Execute($query);
     if (!$dbresult) {
         $test->messages[] = ilang('invalid_query', $query);
         $test->error = true;
     } else {
         while ($row = $dbresult->FetchRow()) {
             $current_version = $row["version"];
         }
         if ($current_version == 1) {
             $test->messages[] = ilang('empty_query', $query);
             $test->error = true;
         }
     }
     if (!$test->error && $current_version < CMS_SCHEMA_VERSION) {
         $test->messages[] = ilang('need_upgrade_schema', $current_version, CMS_SCHEMA_VERSION);
         while ($current_version < CMS_SCHEMA_VERSION) {
             $filename = cms_join_path(CMS_INSTALL_BASE, 'upgrades', "upgrade.{$current_version}.to." . ($current_version + 1) . '.php');
             if (file_exists($filename)) {
                 if ($this->debug) {
                     include $filename;
                 } else {
                     @(include $filename);
                 }
             } else {
                 $test->messages[] = ilang('nofiles') . ": {$filename}";
             }
             $current_version++;
         }
         $test->messages[] = ilang('schema_ok', $current_version);
     } elseif (!$test->error) {
         $test->messages[] = ilang('noneed_upgrade_schema', CMS_SCHEMA_VERSION);
     }
     if (isset($_SESSION['disable_hierarchy'])) {
         // gotta move the hierarchy stuff
         $query = 'UPDATE ' . cms_db_prefix() . 'content SET page_url = content_alias';
         $db->Execute($query);
         set_site_preference('content_autocreate_urls', 1);
         set_site_preference('content_autocreate_flaturls', 1);
         $test->messages[] = ilang('setup_flat_urls');
         unset($_SESSION['disable_hierarchy']);
     }
     $this->smarty->assign('test', $test);
 }
开发者ID:RTR-ITF,项目名称:usse-cms,代码行数:51,代码来源:CMSUpgradePage5.class.php


注:本文中的cms_join_path函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。