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


PHP theme::load方法代码示例

本文整理汇总了PHP中theme::load方法的典型用法代码示例。如果您正苦于以下问题:PHP theme::load方法的具体用法?PHP theme::load怎么用?PHP theme::load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在theme的用法示例。


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

示例1: content_stylesheets

 public function content_stylesheets($format = 'tinymce', $name = 'content', $merge = false, $ws_theme = null)
 {
     global $theme;
     if (empty($ws_theme)) {
         $ws_theme = $theme;
         if ($this->theme != $theme->name) {
             $ws_theme = new theme();
             $ws_theme->load($this->theme);
         }
     }
     // determine stylesheets for content (website > theme + default navigate cms)
     $content_css = array();
     $content_css[] = NAVIGATE_URL . '/css/tools/tinymce.defaults.css';
     // deprecated field (will be removed at some time)
     if (!empty($this->tinymce_css)) {
         $content_css[] = $this->tinymce_css . '?bogus=' . time();
     }
     if (!empty($this->theme) && !empty($ws_theme)) {
         $style = "";
         if (isset($this->theme_options->style)) {
             $style = @$this->theme_options->style;
         }
         if (empty($style)) {
             $theme_styles = get_object_vars($ws_theme->styles);
             $theme_styles = array_values($theme_styles);
             $style = $theme_styles[0]->name;
         }
         if ($name == 'content_selectable' && !isset($ws_theme->styles->{$style}->{$name}) || empty($name)) {
             $name = 'content';
         }
         if (!empty($style) && !empty($ws_theme->styles->{$style}->{$name})) {
             $style_content_css = explode(',', $ws_theme->styles->{$style}->{$name});
             foreach ($style_content_css as $scc) {
                 if (strpos($scc, 'http') === false) {
                     $content_css[] = NAVIGATE_URL . '/themes/' . $this->theme . '/' . $scc . '?bogus=' . time();
                 } else {
                     $content_css[] = $scc;
                 }
             }
         }
     }
     $merge = false;
     // MERGE option is not completely developed
     if ($merge) {
         /*
         $css_merged_rules = '';
         $css_merged_file = 'cache/'.$website->id.'/editor_css.'.md5(json_encode($content_css)).'.css';
         
         foreach($content_css as $csa)
                     {
         	            $css_rules = @file_get_contents($csa);
                         $css_merged_rules .= $css_rules;
                     }
         
         mkdir(NAVIGATE_PATH.'/cache/'.$website->id, 0755, true);
         
         file_put_contents(NAVIGATE_PATH.'/'.$css_merged_file, $css_merged_rules);
         
         if(!empty($css_merged))
         {
         			    if($format=='link_tag')
         				    $content_css = '<link rel="stylesheet" type="text/css" href="'.NAVIGATE_URL.'/'.$css_merged_file.'" />'."\n";
         			    else
         				    $content_css = NAVIGATE_URL.'/'.$css_merged_file;
         }
         else
         			    $content_css = '';
         */
     } else {
         if ($format == 'link_tag') {
             $content_html = '';
             foreach ($content_css as $csa) {
                 if (!empty($csa)) {
                     $content_html .= '<link rel="stylesheet" type="text/css" href="' . trim($csa) . '" />' . "\n";
                 }
             }
             $content_css = $content_html;
         } else {
             if ($format == 'array') {
                 // do nothing, already an array
             } else {
                 $content_css = implode(',', $content_css);
             }
         }
     }
     return $content_css;
 }
开发者ID:NavigateCMS,项目名称:Navigate-CMS,代码行数:87,代码来源:website.class.php

示例2: process

function process()
{
    global $DB;
    global $website;
    global $events;
    global $theme;
    set_time_limit(0);
    setlocale(LC_ALL, $_SESSION['navigate_install_locale']);
    $lang = navigate_install_load_language();
    switch ($_REQUEST['process']) {
        case 'verify_zip':
            sleep(1);
            if (!file_exists('package.zip')) {
                die(json_encode($lang['missing_package']));
            } else {
                $zip = new ZipArchive();
                if ($zip->open('package.zip') !== TRUE) {
                    die(json_encode($lang['invalid_package']));
                } else {
                    $zip->close();
                    die(json_encode(true));
                }
            }
            break;
        case 'extract_zip':
            $npath = getcwd() . NAVIGATE_FOLDER;
            $npath = str_replace('\\', '/', $npath);
            if (!file_exists($npath)) {
                mkdir($npath);
            }
            if (file_exists($npath)) {
                $zip = new ZipArchive();
                if ($zip->open('package.zip') === TRUE) {
                    $zip->extractTo($npath);
                    $zip->close();
                    copy($npath . '/crossdomain.xml', dirname($npath) . '/crossdomain.xml');
                    die(json_encode(true));
                } else {
                    die(json_encode($lang['extraction_failed']));
                }
            }
            die(json_encode($lang['folder_not_exists']));
            break;
        case 'chmod':
            sleep(1);
            // chmod the directories recursively
            $npath = getcwd() . NAVIGATE_FOLDER;
            if (!navigate_install_chmodr($npath, 0755)) {
                die(json_encode($lang['chmod_failed']));
            } else {
                die(json_encode(true));
            }
            break;
        case 'verify_database':
            if ($_REQUEST['PDO_DRIVER'] == 'mysql' || $_REQUEST['PDO_DRIVER'] == 'mysql-socket') {
                try {
                    $dsn = "mysql:host=" . $_REQUEST['PDO_HOSTNAME'] . ";port=" . $_REQUEST['PDO_PORT'] . ';charset=utf8';
                    if ($_REQUEST['PDO_DRIVER'] == "mysql-socket") {
                        $dsn = "mysql:unix_socket=" . $_REQUEST['PDO_SOCKET'] . ";charset=utf8";
                    }
                    $db_test = @new PDO($dsn, $_REQUEST['PDO_USERNAME'], $_REQUEST['PDO_PASSWORD']);
                    if (!$db_test) {
                        echo json_encode(array('error' => $lang['database_connect_error']));
                    } else {
                        $create_database_privilege = false;
                        $drop_database_privilege = false;
                        $stm = $db_test->query('SHOW DATABASES;');
                        $rs = $stm->fetchAll(PDO::FETCH_COLUMN, 'Database');
                        $rs = array_diff($rs, array('mysql', 'information_schema'));
                        $stm = $db_test->query('SHOW PRIVILEGES;');
                        $privileges = $stm->fetchAll(PDO::FETCH_ASSOC);
                        for ($p = 0; $p < count($privileges); $p++) {
                            if ($privileges[$p]['Privilege'] == 'Create') {
                                if (strpos($privileges[$p]['Context'], 'Databases') !== false) {
                                    $create_database_privilege = true;
                                }
                            }
                            if ($privileges[$p]['Privilege'] == 'Drop') {
                                if (strpos($privileges[$p]['Context'], 'Databases') !== false) {
                                    $drop_database_privilege = true;
                                }
                            }
                        }
                        if ($create_database_privilege && $drop_database_privilege) {
                            // check if we are really allowed to create databases
                            $dbname = 'navigate_test_' . time();
                            $create_result = $db_test->exec('CREATE DATABASE ' . $dbname);
                            if ($create_result) {
                                $db_test->exec('DROP DATABASE ' . $dbname);
                            }
                            if (!$create_result) {
                                $create_database_privilege = false;
                            }
                        }
                        $db_test = NULL;
                        echo json_encode(array('databases' => array_values($rs), 'create_database_privilege' => $create_database_privilege));
                    }
                } catch (Exception $e) {
                    echo json_encode(array('error' => $e->getMessage()));
                }
//.........这里部分代码省略.........
开发者ID:NavigateCMS,项目名称:Navigate-CMS,代码行数:101,代码来源:setup.php

示例3: load_from_webuser

 public function load_from_webuser($property_id, $webuser_id = null)
 {
     global $website;
     global $theme;
     global $webuser;
     $wu = $webuser;
     if (!empty($webuser_id)) {
         $wu = new webuser();
         $wu->load($webuser_id);
     }
     $ws = $website;
     $ws_theme = $theme;
     if ($wu->website != $website->id) {
         $ws = new website();
         $ws->load($wu->website);
         $ws_theme = new theme();
         $ws_theme->load($ws->theme);
     }
     if (empty($ws_theme->webusers['properties'])) {
         $ws_theme->webusers['properties'] = array();
     }
     foreach ($ws_theme->webusers['properties'] as $to) {
         if ($to->id == $property_id || $to->name == $property_id) {
             $webuser_option = $to;
             $webuser_option->element = 'webuser';
             break;
         }
     }
     $this->id = $webuser_option->id;
     $this->website = $ws->id;
     $this->element = $webuser_option->element;
     $this->template = '';
     $this->name = $webuser_option->name;
     $this->type = $webuser_option->type;
     $this->options = (array) $webuser_option->options;
     $this->dvalue = $webuser_option->dvalue;
     // default value
     $this->width = $webuser_option->width;
     $this->multilanguage = $webuser_option->multilanguage;
     $this->helper = $webuser_option->helper;
     $this->function = $webuser_option->function;
     $this->conditional = $webuser_option->conditional;
     $this->position = 0;
     $this->enabled = 1;
     // decimal format extra fields
     $this->precision = $webuser_option->precision;
     $this->prefix = $webuser_option->prefix;
     $this->suffix = $webuser_option->suffix;
     if (substr($this->name, 0, 1) == '@') {
         // get translation from theme dictionary
         $this->name = $ws_theme->t(substr($this->name, 1));
     }
     if (substr($this->helper, 0, 1) == '@') {
         $this->helper = $ws_theme->t(substr($this->helper, 1));
     }
     $values = property::load_properties_associative('webuser', '', 'webuser', $wu->id);
     $this->value = $values[$this->id];
     if (is_null($this->value) && !empty($this->dvalue)) {
         $this->value = $this->dvalue;
     }
     if (is_object($this->value)) {
         $this->value = (array) $this->value;
     }
 }
开发者ID:NavigateCMS,项目名称:Navigate-CMS,代码行数:64,代码来源:property.class.php

示例4: navigate_property_layout_field

function navigate_property_layout_field($property, $object = "", $website_id = "")
{
    global $website;
    global $layout;
    global $theme;
    global $user;
    global $DB;
    $ws = $website;
    $ws_theme = $theme;
    if (!empty($website_id) && $website_id != $website->id) {
        $ws = new website();
        $ws->load($website_id);
        $ws_theme = new theme();
        $ws_theme->load($ws->theme);
    }
    // object used for translations (theme or extension)
    if (empty($object)) {
        $object = $ws_theme;
    }
    $naviforms = new naviforms();
    $langs = $ws->languages_list;
    $field = array();
    if (!isset($property->value)) {
        $property->value = $property->dvalue;
    }
    if (!isset($property->multilanguage)) {
        $property->multilanguage = 'false';
    }
    $property_name = $property->name;
    if (!empty($object)) {
        $property_name = $object->t($property_name);
    }
    if (in_array($property->type, array("text", "textarea", "rich_textarea", "link")) || $property->multilanguage == 'true') {
        if (!isset($property->multilanguage) || $property->multilanguage !== false || $property->multilanguage == "false") {
            $property->multilanguage = 'true';
        } else {
            $property->multilanguage = 'false';
        }
        if (is_object($property->value)) {
            $property->value = (array) $property->value;
        }
        if (!is_array($property->value)) {
            $property->value = array();
        }
        foreach ($langs as $lang) {
            if (!isset($property->value[$lang]) && isset($property->dvalue)) {
                $property->value[$lang] = $property->dvalue;
            }
        }
    }
    // auto show/hide properties by other properties values --> "conditional": [ { "source_property_id" : [value1,"value2"] } ]
    if (!empty($property->conditional)) {
        foreach ($property->conditional as $conditional) {
            foreach ($conditional as $conditional_property => $conditional_values) {
                if (!is_array($conditional_values)) {
                    $conditional_values = array($conditional_values);
                }
                $conditional_values = '["' . implode('", "', $conditional_values) . '"]';
                $layout->add_script('
                    navigate_tabform_conditional_property("' . $property->id . '", "' . $conditional_property . '", ' . $conditional_values . ');
                ');
            }
        }
    }
    switch ($property->type) {
        case 'value':
            $field[] = '<div class="navigate-form-row" nv_property="' . $property->id . '">';
            $field[] = '<label>' . $property_name . '</label>';
            $field[] = $naviforms->textfield("property-" . $property->id, $property->value);
            if (!empty($property->helper)) {
                $helper_text = $property->helper;
                if (!empty($object)) {
                    $helper_text = $object->t($helper_text);
                }
                $field[] = '<div class="subcomment">' . $helper_text . '</div>';
            }
            $field[] = '</div>';
            break;
        case 'decimal':
            $field[] = '<div class="navigate-form-row" nv_property="' . $property->id . '">';
            $field[] = '<label>' . $property_name . '</label>';
            $field[] = $naviforms->decimalfield("property-" . $property->id, $property->value, $property->precision, $user->decimal_separator, $user->thousands_separator, @$property->prefix, @$property->suffix);
            if (!empty($property->helper)) {
                $helper_text = $property->helper;
                if (!empty($object)) {
                    $helper_text = $object->t($helper_text);
                }
                $field[] = '<div class="subcomment">' . $helper_text . '</div>';
            }
            $field[] = '</div>';
            break;
        case 'rating':
            $default = explode('#', $property->dvalue);
            $stars = $default[1];
            if (empty($stars)) {
                $stars = 5;
            }
            $inputs = $stars * 2;
            // half stars ALWAYS enabled
            if ($property->value == $property->dvalue) {
//.........这里部分代码省略.........
开发者ID:NavigateCMS,项目名称:Navigate-CMS,代码行数:101,代码来源:property.layout.php

示例5: themes_grid

function themes_grid($list)
{
    global $layout;
    global $website;
    global $user;
    global $current_version;
    $navibars = new navibars();
    $navibars->title(t(367, 'Themes'));
    $marketplace = isset($_REQUEST['marketplace']);
    if ($user->permission("themes.install") == "true") {
        $navibars->add_actions(array('<a href="#" id="theme-upload-button"><img height="16" align="absmiddle" width="16" src="img/icons/silk/package_add.png"> ' . t(461, 'Install from file') . '</a>'));
    }
    $navibars->add_actions(array('<a href="?fid=themes&act=theme_sample_content_export" id="theme-sample-content-export-button"><img height="16" align="absmiddle" width="16" src="img/icons/silk/server_compressed.png"> ' . t(480, 'Export sample content') . '</a>'));
    $grid = new navigrid('themes');
    $grid->set_header('
        <div class="navibrowse-path ui-corner-all">
            <input type="checkbox" id="theme-available-button" /><label for="theme-available-button"><img src="img/icons/silk/rainbow.png" width="16px" height="16px" align="absbottom" /> ' . t(528, 'Available') . '</label>
            ' . ($user->permission("themes.marketplace") == "true" ? '<input type="checkbox" id="theme-marketplace-button" /><label for="theme-marketplace-button"><img src="img/icons/silk/basket.png" width="16px" height="16px" align="absbottom" /> ' . t(527, 'Marketplace') . '</label>' : '') . '
        </div>
	');
    $layout->add_script('
        $("#theme-available-button").button().on("click", function()
        {
            window.location.replace("?fid=themes");
        });
        $("#theme-marketplace-button").button();
        $("#theme-marketplace-button").button().on("click", function()
        {
            window.location.replace("?fid=themes&marketplace");
        });

        $(".navibrowse-path input").removeAttr("checked");
        $("#theme-' . ($marketplace ? 'marketplace' : 'available') . '-button").attr("checked", "checked");
        $("#theme-marketplace-button,#theme-available-button").button("refresh");
    ');
    if (!$marketplace) {
        $grid->item_size(220, 220);
        //$grid->thumbnail_size(138, 150); NV 1.x thumbnail size
        $grid->thumbnail_size(205, 145);
        $grid->highlight_on_click = false;
        $themes = array();
        // current website theme
        if (!empty($website->theme)) {
            $theme = new theme();
            $theme->load($website->theme, true);
            $update_ver = $_SESSION['themes_updates'][$theme->name];
            if (version_compare($update_ver, $theme->version, '<=')) {
                $update_ver = '';
            } else {
                $update_ver = $theme->version . ' &raquo; ' . $update_ver;
            }
            $themes[] = array('id' => $website->theme, 'name' => '<div class="navigrid-themes-title navigrid-themes-installed">' . $theme->title . '</div>', 'thumbnail' => NAVIGATE_URL . '/themes/' . $website->theme . '/thumbnail.png', 'header' => '
                ' . (file_exists(NAVIGATE_PATH . '/themes/' . $website->theme . '/' . $website->theme . '.info.html') ? '<a href="#" class="navigrid-themes-info" theme="' . $website->theme . '" theme-title="' . $theme->title . '"><img height="16" align="absmiddle" width="16" src="img/icons/silk/information.png"></a>' : '') . '
                ' . (empty($update_ver) ? '' : '
                    <a href="#" class="navigrid-themes-update" theme="' . $website->theme . '" title="' . t(285, "Update") . ' ' . $update_ver . '"><img height="16" align="absmiddle" width="16" src="img/icons/silk/asterisk_orange.png"></a>
                '), 'footer' => '
                    <a href="?fid=websites&act=edit&id=' . $website->id . '&tab=7" class="uibutton navigrid-themes-button navigrid-theme-configure"><img height="16" align="absmiddle" width="16" src="img/icons/silk/wrench_orange.png"> ' . t(200, 'Options') . '</a>
                ' . (!file_exists(NAVIGATE_PATH . '/themes/' . $website->theme . '/' . $website->theme . '_sample.zip') ? '' : '<a href="#" class="uibutton navigrid-themes-button navigrid-theme-install-demo"><img height="16" align="absmiddle" width="16" src="img/icons/silk/wand.png"> ' . t(484, 'Install demo') . '</a>'));
        }
        for ($t = 0; $t < count($list); $t++) {
            if ($website->theme == $list[$t]['code']) {
                continue;
            }
            $update_ver = $_SESSION['themes_updates'][$list[$t]['code']];
            if (version_compare($update_ver, $list[$t]['version'], '<=')) {
                $update_ver = '';
            } else {
                $update_ver = $list[$t]['version'] . ' &raquo; ' . $update_ver;
            }
            $themes[] = array('id' => $list[$t]['code'], 'name' => '<div class="navigrid-themes-title">' . $list[$t]['title'] . '</div>', 'thumbnail' => NAVIGATE_URL . '/themes/' . $list[$t]['code'] . '/thumbnail.png', 'header' => '
                    ' . ($user->permission("themes.delete") == "true" ? '<a href="#" class="navigrid-themes-remove" theme="' . $list[$t]['code'] . '" theme-title="' . $list[$t]['title'] . '"><img height="16" align="absmiddle" width="16" src="img/icons/silk/cancel.png"></a>' : '') . '
                    ' . (file_exists(NAVIGATE_PATH . '/themes/' . $list[$t]['code'] . '/' . $list[$t]['code'] . '.info.html') ? '<a href="#" class="navigrid-themes-info" theme="' . $list[$t]['code'] . '" theme-title="' . $list[$t]['title'] . '"><img height="16" align="absmiddle" width="16" src="img/icons/silk/information.png"></a>' : '') . '
                    ' . (empty($update_ver) ? '' : '
                    ' . ($user->permission("themes.update") == "true" ? '<a href="#" class="navigrid-themes-update" theme="' . $list[$t]['code'] . '" title="' . t(285, "Update") . ' ' . $update_ver . '"><img height="16" align="absmiddle" width="16" src="img/icons/silk/asterisk_orange.png"></a>' : '') . '
                '), 'footer' => '
                    ' . (file_exists(NAVIGATE_PATH . '/themes/' . $list[$t]['code'] . '/demo.html') ? '<a href="' . NAVIGATE_URL . '/themes/' . $list[$t]['code'] . '/demo.html' . '" class="uibutton navigrid-themes-button" target="_blank"><img height="16" align="absmiddle" width="16" src="img/icons/silk/monitor.png"> ' . t(274, 'Preview') . '</a>' : '') . '
                    <a href="#" class="uibutton navigrid-themes-button navigrid-themes-install" theme="' . $list[$t]['code'] . '" target="_blank" style=" margin-left: 5px; "><img height="16" align="absmiddle" width="16" src="img/icons/silk/world_go.png"> ' . t(365, 'Install') . '</a>
                ');
        }
        $grid->items($themes);
        $navibars->add_content($grid->generate());
        $navibars->add_content('
            <div id="navigrid-themes-install-confirmation" title="' . t(59, 'Confirmation') . '" style=" display: none; ">
                ' . t(371, 'Installing a new theme removes the settings of the old one.') . '<br />
                ' . t(372, 'The list of available block types may also change.') . '<br /><br />
                ' . t(373, 'Are you sure you want to continue?') . '
            </div>

            <div id="navigrid-themes-information" title="" style=" display: none; "></div>
        ');
        $navibars->add_content('
            <div id="navigrid-themes-install-demo-confirmation" title="' . t(59, 'Confirmation') . '" style=" display: none; ">
                ' . t(483, 'Do you really want to import the default website for the theme selected?') . '
            </div>');
        $navibars->add_content('
            <div id="navigrid-themes-remove-confirmation" title="' . t(59, 'Confirmation') . '" style=" display: none; ">
                ' . t(57, 'Do you really want to delete the item?') . '
            </div>');
        $navibars->add_content('
            <div id="navigrid-themes-update" title="' . t(285, 'Update') . '" style=" display: none; ">
//.........这里部分代码省略.........
开发者ID:NavigateCMS,项目名称:Navigate-CMS,代码行数:101,代码来源:themes.php

示例6: websites_form

function websites_form($item)
{
    global $user;
    global $DB;
    global $layout;
    global $events;
    $navibars = new navibars();
    $naviforms = new naviforms();
    $layout->navigate_media_browser();
    // we want to use media browser in this function
    $layout->navigate_editorfield_link_dialog();
    $theme = new theme();
    if (!empty($item->theme)) {
        $theme->load($item->theme);
    }
    if (empty($item->id)) {
        $navibars->title(t(241, 'Websites') . ' / ' . t(38, 'Create'));
    } else {
        $navibars->title(t(241, 'Websites') . ' / ' . t(170, 'Edit') . ' [' . $item->id . ']');
    }
    if ($user->permission('websites.edit') == 'true') {
        $navibars->add_actions(array('<a href="#" onclick="javascript: navigate_media_browser();" title="Ctrl+m">
					<img height="16" align="absmiddle" width="16" src="img/icons/silk/images.png"> ' . t(36, 'Media') . '</a>'));
        $extra_actions = array();
        $extra_actions[] = '<a href="#" action="navigate_reset_statistics" onclick="javascript: navigate_reset_statistics();"><img height="16" align="absmiddle" width="16" src="img/icons/silk/chart_line.png"> ' . t(429, 'Reset statistics') . '</a>';
        $layout->add_script('
            function navigate_reset_statistics()
            {
                navigate_confirmation_dialog(
                    function()
                    {
                        $.post(
                            "?fid=websites&act=reset_statistics&website=' . $item->id . '",
                            {},
                            function(data)
                            {
                                $("a[action=\'navigate_reset_statistics\']").parent().fadeOut();
                            }
                        );
                    }, 
                    "<div>' . t(430, 'Do you really want to remove all statistics of this website?') . '</div>" 
                );
            }
        ');
        if (!empty($item->id)) {
            $extra_actions[] = '<a href="#" action="navigate_replace_urls" onclick="javascript: navigate_replace_urls();"><img height="16" align="absmiddle" width="16" src="img/icons/silk/database_refresh.png"> ' . t(603, 'Replace URLs') . '</a>';
            // try to find the OLD url for NAVIGATE_DOWNLOAD
            $old_url_guessed = "";
            $DB->query('
				SELECT text
				  FROM nv_webdictionary
				  WHERE node_type = "item"
				    AND website = ' . $item->id . '
				    AND text LIKE ' . protect("%navigate_download.php%") . '
			    LIMIT 1
		    ');
            $rs = $DB->result('text');
            preg_match("/<img .*?(?=src)src=\"([^\"]+)\"/si", $rs[0], $old_url_guessed);
            $old_url_guessed = @$old_url_guessed[1];
            $old_url_guessed = substr($old_url_guessed, 0, strpos($old_url_guessed, NAVIGATE_FOLDER));
            $layout->add_content('
		        <div id="navigate_replace_urls_dialog" style="display: none;">
		            <div id="" class="navigate-form-row">
						<label>' . t(604, "Old") . '</label>
						<input type="text" style=" width: 300px;" id="replace_urls_old" name="replace_urls_old" value="' . $old_url_guessed . '/" />
					</div>
					<div id="" class="navigate-form-row">
						<label>' . t(605, "New") . '</label>
						<input type="text" style=" width: 300px;" id="replace_urls_new" name="replace_urls_new" value="' . NAVIGATE_PARENT . '/" />
					</div>
					<div class="navigate-form-row">
						<div class="subcomment">' . t(523, "This action can NOT be undone.") . '</div>
					</div>
		        </div>
		    ');
            $layout->add_script('
	            function navigate_replace_urls()
	            {
	                $("#navigate_replace_urls_dialog").dialog({
	                        resizable: true,
	                        height: 180,
	                        width: 520,
	                        modal: true,
	                        title: "' . t(603, 'Replace URLs') . '",
	                        buttons: {
	                            "' . t(190, 'Ok') . '": function()
	                            {
	                                $.post(
	                                    "?fid=websites&act=replace_urls",
	                                    {
	                                        old: $("#replace_urls_old").val(),
	                                        new: $("#replace_urls_new").val(),
	                                        website: ' . $item->id . '
	                                    },
	                                    function(data)
	                                    {
	                                        if(data!="true")
					                            navigate_notification("' . t(56, "Unexpected error.") . '");
					                        else
					                        {
//.........这里部分代码省略.........
开发者ID:NavigateCMS,项目名称:Navigate-CMS,代码行数:101,代码来源:websites.php

示例7: header

     if (!empty($website->redirect_to)) {
         header('location: ' . $website->redirect_to);
     }
     nvweb_clean_exit();
 }
 // global helper variables
 $session = array();
 // webuser session
 $structure = array();
 // web menu structure
 $webgets = array();
 // webgets static data
 $webuser = new webuser();
 $theme = new theme();
 if (!empty($website->theme)) {
     $theme->load($website->theme);
 }
 $route = $_REQUEST['route'];
 // remove last '/' in route if exists
 if (substr($route, -1) == '/') {
     $route = substr($route, 0, -1);
 }
 // remove the "folder" part of the route (only if this url is really under a folder)
 if (!empty($website->folder) && strpos('/' . $route, $website->folder) === 0) {
     $route = substr('/' . $route, strlen($website->folder) + 1);
 }
 $nvweb_absolute = $idn->encode($website->absolute_path());
 define('NVWEB_ABSOLUTE', $nvweb_absolute);
 define('NVWEB_OBJECT', $nvweb_absolute . '/object');
 define('NVWEB_AJAX', $nvweb_absolute . '/nvajax');
 define('NVWEB_THEME', NAVIGATE_PARENT . NAVIGATE_FOLDER . '/themes/' . $theme->name);
开发者ID:NavigateCMS,项目名称:Navigate-CMS,代码行数:31,代码来源:nvweb.php

示例8: section_name

 public static function section_name($default)
 {
     global $website;
     global $theme;
     $out = $default;
     if (!empty($website->theme)) {
         if (empty($theme)) {
             $theme = new theme();
             $theme->load($website->theme);
         }
         $out = $theme->template_title($default, false);
     }
     switch ($default) {
         case '#main#':
             $out = t(238, 'Main content');
             break;
         default:
     }
     return $out;
 }
开发者ID:NavigateCMS,项目名称:Navigate-CMS,代码行数:20,代码来源:template.class.php


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