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


PHP message_popup_window函数代码示例

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


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

示例1: starting_output

    /**
     * This method is called when the page first moves out of the STATE_BEFORE_HEADER
     * state. This is our last change to initialise things.
     */
    protected function starting_output() {
        global $CFG;

        if (!during_initial_install()) {
            $this->blocks->load_blocks();
            if (empty($this->_block_actions_done)) {
                $this->_block_actions_done = true;
                if ($this->blocks->process_url_actions($this)) {
                    redirect($this->url->out(false));
                }
            }
            $this->blocks->create_all_block_instances();
        }

        // If maintenance mode is on, change the page header.
        if (!empty($CFG->maintenance_enabled)) {
            $this->set_button('<a href="' . $CFG->wwwroot . '/' . $CFG->admin .
                    '/settings.php?section=maintenancemode">' . get_string('maintenancemode', 'admin') .
                    '</a> ' . $this->button);

            $title = $this->title;
            if ($title) {
                $title .= ' - ';
            }
            $this->set_title($title . get_string('maintenancemode', 'admin'));
        } else {
            // Show the messaging popup if there are messages
            message_popup_window();
        }

        $this->initialise_standard_body_classes();
    }
开发者ID:nottmoo,项目名称:moodle,代码行数:36,代码来源:pagelib.php

示例2: print_header


//.........这里部分代码省略.........
                    if (has_capability('coursereport/log:view', get_context_instance(CONTEXT_SYSTEM))) {
                        $menu .= ' (<a href="' . $CFG->wwwroot . '/course/report/log/index.php' . '?chooselog=1&amp;id=1&amp;modid=site_errors">' . get_string('logs') . '</a>)';
                    }
                    $menu .= '</font>';
                }
            }
        }
    }
    $meta = '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />' . "\n" . $meta . "\n";
    if (!$usexml) {
        @header('Content-Type: text/html; charset=utf-8');
    }
    @header('Content-Script-Type: text/javascript');
    @header('Content-Style-Type: text/css');
    //Accessibility: added the 'lang' attribute to $direction, used in theme <html> tag.
    $direction = get_html_lang($dir = true);
    if ($cache) {
        // Allow caching on "back" (but not on normal clicks)
        @header('Cache-Control: private, pre-check=0, post-check=0, max-age=0');
        @header('Pragma: no-cache');
        @header('Expires: ');
    } else {
        // Do everything we can to always prevent clients and proxies caching
        @header('Cache-Control: no-store, no-cache, must-revalidate');
        @header('Cache-Control: post-check=0, pre-check=0', false);
        @header('Pragma: no-cache');
        @header('Expires: Mon, 20 Aug 1969 09:23:00 GMT');
        @header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
        $meta .= "\n<meta http-equiv=\"pragma\" content=\"no-cache\" />";
        $meta .= "\n<meta http-equiv=\"expires\" content=\"0\" />";
    }
    @header('Accept-Ranges: none');
    $currentlanguage = current_language();
    if (empty($usexml)) {
        $direction = ' xmlns="http://www.w3.org/1999/xhtml"' . $direction;
        // See debug_header
    } else {
        $mathplayer = preg_match("/MathPlayer/i", $_SERVER['HTTP_USER_AGENT']);
        if (!$mathplayer) {
            header('Content-Type: application/xhtml+xml');
        }
        echo '<?xml version="1.0" ?>' . "\n";
        if (!empty($CFG->xml_stylesheets)) {
            $stylesheets = explode(';', $CFG->xml_stylesheets);
            foreach ($stylesheets as $stylesheet) {
                echo '<?xml-stylesheet type="text/xsl" href="' . $CFG->wwwroot . '/' . $stylesheet . '" ?>' . "\n";
            }
        }
        echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1';
        if (!empty($CFG->xml_doctype_extra)) {
            echo ' plus ' . $CFG->xml_doctype_extra;
        }
        echo '//' . strtoupper($currentlanguage) . '" "' . $CFG->xml_dtd . '">' . "\n";
        $direction = " xmlns=\"http://www.w3.org/1999/xhtml\"\n                       xmlns:math=\"http://www.w3.org/1998/Math/MathML\"\n                       xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n                       {$direction}";
        if ($mathplayer) {
            $meta .= '<object id="mathplayer" classid="clsid:32F66A20-7614-11D4-BD11-00104BD3F987">' . "\n";
            $meta .= '<!--comment required to prevent this becoming an empty tag-->' . "\n";
            $meta .= '</object>' . "\n";
            $meta .= '<?import namespace="math" implementation="#mathplayer" ?>' . "\n";
        }
    }
    // Clean up the title
    $title = format_string($title);
    // fix for MDL-8582
    $title = str_replace('"', '&quot;', $title);
    // Create class and id for this page
    $pageid = $PAGE->pagetype;
    $pageclass = $PAGE->bodyclasses;
    $bodytags .= ' class="' . $pageclass . '" id="' . $pageid . '"';
    require_once $CFG->libdir . '/editor/htmlEditor.class.php';
    $htmlEditorObject = new htmlEditor();
    $htmlEditor = $htmlEditorObject->configure(NULL, $COURSE->id);
    ob_start();
    include $CFG->header;
    $output = ob_get_contents();
    ob_end_clean();
    // container debugging info
    $THEME->open_header_containers = open_containers();
    // Skip to main content, see skip_main_destination().
    if ($pageid == 'course-view' or $pageid == 'site-index' or $pageid == 'course-index') {
        $skiplink = '<a class="skip" href="#maincontent">' . get_string('tocontent', 'access') . '</a>';
        if (!preg_match('/(.*<div[^>]+id="page"[^>]*>)(.*)/s', $output, $matches)) {
            preg_match('/(.*<body.*?>)(.*)/s', $output, $matches);
        }
        $output = $matches[1] . "\n" . $skiplink . $matches[2];
    }
    $output = force_strict_header($output);
    if (!empty($CFG->messaging)) {
        $output .= message_popup_window();
    }
    // Add in any extra JavaScript libraries that occurred during the header
    $output .= require_js('', 2);
    $output .= print_js_call('moodle_initialise_body', array(), true);
    $PAGE->set_state(moodle_page::STATE_IN_BODY);
    if ($return) {
        return $output;
    } else {
        echo $output;
    }
}
开发者ID:nicolasconnault,项目名称:moodle2.0,代码行数:101,代码来源:weblib.php

示例3: print_header


//.........这里部分代码省略.........
                    $menu .= '&nbsp;<font size="1">';
                    if (empty($count->accounts)) {
                        $menu .= get_string('failedloginattempts', '', $count);
                    } else {
                        $menu .= get_string('failedloginattemptsall', '', $count);
                    }
                    if (has_capability('moodle/site:viewreports', get_context_instance(CONTEXT_SYSTEM, SITEID))) {
                        $menu .= ' (<a href="' . $CFG->wwwroot . '/course/report/log/index.php' . '?chooselog=1&amp;id=1&amp;modid=site_errors">' . get_string('logs') . '</a>)';
                    }
                    $menu .= '</font>';
                }
            }
        }
    }
    $meta = '<meta http-equiv="content-type" content="text/html; charset=utf-8" />' . "\n" . $meta . "\n";
    if (!$usexml) {
        @header('Content-type: text/html; charset=utf-8');
    }
    //Accessibility: added the 'lang' attribute to $direction, used in theme <html> tag.
    $direction = get_html_lang($dir = true);
    if ($cache) {
        // Allow caching on "back" (but not on normal clicks)
        @header('Cache-Control: private, pre-check=0, post-check=0, max-age=0');
        @header('Pragma: no-cache');
        @header('Expires: ');
    } else {
        // Do everything we can to always prevent clients and proxies caching
        @header('Cache-Control: no-store, no-cache, must-revalidate');
        @header('Cache-Control: post-check=0, pre-check=0', false);
        @header('Pragma: no-cache');
        @header('Expires: Mon, 20 Aug 1969 09:23:00 GMT');
        @header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
        $meta .= "\n<meta http-equiv=\"pragma\" content=\"no-cache\" />";
        $meta .= "\n<meta http-equiv=\"expires\" content=\"0\" />";
    }
    @header('Accept-Ranges: none');
    $currentlanguage = current_language();
    if (empty($usexml)) {
        $direction = ' xmlns="http://www.w3.org/1999/xhtml"' . $direction;
        // See debug_header
    } else {
        $mathplayer = preg_match("/MathPlayer/i", $_SERVER['HTTP_USER_AGENT']);
        if (!$mathplayer) {
            header('Content-Type: application/xhtml+xml');
        }
        echo '<?xml version="1.0" ?>' . "\n";
        if (!empty($CFG->xml_stylesheets)) {
            $stylesheets = explode(';', $CFG->xml_stylesheets);
            foreach ($stylesheets as $stylesheet) {
                echo '<?xml-stylesheet type="text/xsl" href="' . $CFG->wwwroot . '/' . $stylesheet . '" ?>' . "\n";
            }
        }
        echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1';
        if (!empty($CFG->xml_doctype_extra)) {
            echo ' plus ' . $CFG->xml_doctype_extra;
        }
        echo '//' . strtoupper($currentlanguage) . '" "' . $CFG->xml_dtd . '">' . "\n";
        $direction = " xmlns=\"http://www.w3.org/1999/xhtml\"\n                       xmlns:math=\"http://www.w3.org/1998/Math/MathML\"\n                       xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n                       {$direction}";
        if ($mathplayer) {
            $meta .= '<object id="mathplayer" classid="clsid:32F66A20-7614-11D4-BD11-00104BD3F987">' . "\n";
            $meta .= '<!--comment required to prevent this becoming an empty tag-->' . "\n";
            $meta .= '</object>' . "\n";
            $meta .= '<?import namespace="math" implementation="#mathplayer" ?>' . "\n";
        }
    }
    // Clean up the title
    $title = format_string($title);
    // fix for MDL-8582
    $title = str_replace('"', '&quot;', $title);
    // Create class and id for this page
    page_id_and_class($pageid, $pageclass);
    $pageclass .= ' course-' . $COURSE->id;
    if ($pageid != 'site-index' && $pageid != 'course-view' && strstr($pageid, 'admin') === FALSE) {
        $pageclass .= ' nocoursepage';
    }
    if (!isloggedin()) {
        $pageclass .= ' notloggedin';
    }
    if (!empty($USER->editing)) {
        $pageclass .= ' editing';
    }
    if (!empty($CFG->blocksdrag)) {
        $pageclass .= ' drag';
    }
    $pageclass .= ' lang-' . $currentlanguage;
    $bodytags .= ' class="' . $pageclass . '" id="' . $pageid . '"';
    ob_start();
    include $CFG->header;
    $output = ob_get_contents();
    ob_end_clean();
    $output = force_strict_header($output);
    if (!empty($CFG->messaging)) {
        $output .= message_popup_window();
    }
    if ($return) {
        return $output;
    } else {
        echo $output;
    }
}
开发者ID:veritech,项目名称:pare-project,代码行数:101,代码来源:weblib.php

示例4: print_header


//.........这里部分代码省略.........
        }
    }
    $meta = '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />' . "\n" . $meta . "\n";
    if (!$usexml) {
        @header('Content-Type: text/html; charset=utf-8');
    }
    @header('Content-Script-Type: text/javascript');
    @header('Content-Style-Type: text/css');
    //Accessibility: added the 'lang' attribute to $direction, used in theme <html> tag.
    $direction = get_html_lang($dir = true);
    if ($cache) {
        // Allow caching on "back" (but not on normal clicks)
        @header('Cache-Control: private, pre-check=0, post-check=0, max-age=0');
        @header('Pragma: no-cache');
        @header('Expires: ');
    } else {
        // Do everything we can to always prevent clients and proxies caching
        @header('Cache-Control: no-store, no-cache, must-revalidate');
        @header('Cache-Control: post-check=0, pre-check=0', false);
        @header('Pragma: no-cache');
        @header('Expires: Mon, 20 Aug 1969 09:23:00 GMT');
        @header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
        $meta .= "\n<meta http-equiv=\"pragma\" content=\"no-cache\" />";
        $meta .= "\n<meta http-equiv=\"expires\" content=\"0\" />";
    }
    @header('Accept-Ranges: none');
    $currentlanguage = current_language();
    if (empty($usexml)) {
        $direction = ' xmlns="http://www.w3.org/1999/xhtml"' . $direction;
        // See debug_header
    } else {
        $mathplayer = preg_match("/MathPlayer/i", $_SERVER['HTTP_USER_AGENT']);
        if (!$mathplayer) {
            header('Content-Type: application/xhtml+xml');
        }
        echo '<?xml version="1.0" ?>' . "\n";
        if (!empty($CFG->xml_stylesheets)) {
            $stylesheets = explode(';', $CFG->xml_stylesheets);
            foreach ($stylesheets as $stylesheet) {
                echo '<?xml-stylesheet type="text/xsl" href="' . $CFG->wwwroot . '/' . $stylesheet . '" ?>' . "\n";
            }
        }
        echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1';
        if (!empty($CFG->xml_doctype_extra)) {
            echo ' plus ' . $CFG->xml_doctype_extra;
        }
        echo '//' . strtoupper($currentlanguage) . '" "' . $CFG->xml_dtd . '">' . "\n";
        $direction = " xmlns=\"http://www.w3.org/1999/xhtml\"\n                       xmlns:math=\"http://www.w3.org/1998/Math/MathML\"\n                       xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n                       {$direction}";
        if ($mathplayer) {
            $meta .= '<object id="mathplayer" classid="clsid:32F66A20-7614-11D4-BD11-00104BD3F987">' . "\n";
            $meta .= '<!--comment required to prevent this becoming an empty tag-->' . "\n";
            $meta .= '</object>' . "\n";
            $meta .= '<?import namespace="math" implementation="#mathplayer" ?>' . "\n";
        }
    }
    // Clean up the title
    $title = format_string($title);
    // fix for MDL-8582
    $title = str_replace('"', '&quot;', $title);
    // Create class and id for this page
    page_id_and_class($pageid, $pageclass);
    $pageclass .= ' course-' . $COURSE->id;
    if (!isloggedin()) {
        $pageclass .= ' notloggedin';
    }
    if (!empty($USER->editing)) {
        $pageclass .= ' editing';
    }
    if (!empty($CFG->blocksdrag)) {
        $pageclass .= ' drag';
    }
    $pageclass .= ' dir-' . get_string('thisdirection');
    $pageclass .= ' lang-' . $currentlanguage;
    $bodytags .= ' class="' . $pageclass . '" id="' . $pageid . '"';
    ob_start();
    include $CFG->header;
    $output = ob_get_contents();
    ob_end_clean();
    // container debugging info
    $THEME->open_header_containers = open_containers();
    // Skip to main content, see skip_main_destination().
    if ($pageid == 'course-view' or $pageid == 'site-index' or $pageid == 'course-index') {
        $skiplink = '<a class="skip" href="#maincontent">' . get_string('tocontent', 'access') . '</a>';
        if (!preg_match('/(.*<div[^>]+id="page"[^>]*>)(.*)/s', $output, $matches)) {
            preg_match('/(.*<body.*?>)(.*)/s', $output, $matches);
        }
        $output = $matches[1] . "\n" . $skiplink . $matches[2];
    }
    $output = force_strict_header($output);
    if (!empty($CFG->messaging)) {
        $output .= message_popup_window();
    }
    // Add in any extra JavaScript libraries that occurred during the header
    $output .= require_js('', 2);
    if ($return) {
        return $output;
    } else {
        echo $output;
    }
}
开发者ID:JackCanada,项目名称:moodle-hacks,代码行数:101,代码来源:weblib.php

示例5: starting_output

 /**
  * This method is called when the page first moves out of the STATE_BEFORE_HEADER
  * state. This is our last change to initialise things.
  */
 protected function starting_output()
 {
     global $CFG;
     if (!during_initial_install()) {
         $this->blocks->load_blocks();
         if (empty($this->_block_actions_done)) {
             $this->_block_actions_done = true;
             if ($this->blocks->process_url_actions($this)) {
                 redirect($this->url->out(false, array(), false));
             }
         }
         $this->blocks->create_all_block_instances();
     }
     // If maintenance mode is on, change the page header.
     if (!empty($CFG->maintenance_enabled)) {
         $this->set_button('<a href="' . $CFG->wwwroot . '/' . $CFG->admin . '/settings.php?section=maintenancemode">' . get_string('maintenancemode', 'admin') . '</a> ' . $this->button);
         $title = $this->title;
         if ($title) {
             $title .= ' - ';
         }
         $this->set_title($title . get_string('maintenancemode', 'admin'));
     }
     // Show the messaging popup, if there are messages.
     message_popup_window();
     // Add any stylesheets required using the horrible legacy mechanism.
     if (!empty($CFG->stylesheets)) {
         debugging('Some code on this page is using the horrible legacy mechanism $CFG->stylesheets to include links to ' . 'extra stylesheets. This is deprecated. Please use $PAGE->requires->css(...) instead.', DEBUG_DEVELOPER);
         foreach ($CFG->stylesheets as $stylesheet) {
             $this->requires->css($stylesheet, true);
         }
     }
     // Require theme stylesheets.
     $stylesheets = $this->theme->get_stylesheet_urls();
     foreach ($stylesheets as $stylesheet) {
         $this->requires->css($stylesheet, true);
     }
     $this->initialise_standard_body_classes();
 }
开发者ID:ajv,项目名称:Offline-Caching,代码行数:42,代码来源:pagelib.php


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