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


PHP render_page函数代码示例

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


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

示例1: controller_revisions

function controller_revisions($args)
{
    page_canonical($args[0][0]);
    $page = $args[0][0];
    if (!page_exists($page)) {
        hotglue_error(404);
    }
    // get all revisions of page and determine the current revision's index
    load_modules('glue');
    $a = expl('.', $page);
    $revs = revisions_info(array('pagename' => $a[0], 'sort' => 'time'));
    $revs = $revs['#data'];
    $cur_rev = false;
    for ($i = 0; $i < count($revs); $i++) {
        if ($revs[$i]['revision'] == $a[1]) {
            $cur_rev = $i;
            break;
        }
    }
    if ($cur_rev === false) {
        // we didn't find the current revision
        hotglue_error(500);
    }
    default_html(true);
    html_add_css(base_url() . 'modules/revisions_browser/revisions_browser.css');
    if (USE_MIN_FILES) {
        html_add_js(base_url() . 'modules/revisions_browser/revisions_browser.min.js');
    } else {
        html_add_js(base_url() . 'modules/revisions_browser/revisions_browser.js');
    }
    html_add_js_var('$.glue.page', $page);
    $bdy =& body();
    elem_attr($bdy, 'id', 'revisions');
    render_page(array('page' => $page, 'edit' => false));
    body_append('<div id="revisions_browser_ctrl">');
    body_append('<div id="revisions_browser_prev">');
    if ($cur_rev + 1 < count($revs)) {
        body_append('<a href="' . base_url() . '?' . htmlspecialchars(urlencode($revs[$cur_rev + 1]['page']), ENT_COMPAT, 'UTF-8') . '/revisions">prev</a>');
    }
    body_append('</div><div id="revisions_browser_cur">');
    if (substr($revs[$cur_rev]['revision'], 0, 5) == 'auto-') {
        body_append(date('d M y H:i', $revs[$cur_rev]['time']));
    } else {
        body_append(htmlspecialchars($revs[$cur_rev]['revision'], ENT_NOQUOTES, 'UTF-8'));
    }
    body_append('<br>');
    if ($a[1] == 'head') {
        body_append('<a href="' . base_url() . '?' . htmlspecialchars(urlencode($page), ENT_COMPAT, 'UTF-8') . '/edit">back to editing mode</a>');
    } else {
        body_append('<a id="revisions_browser_revert_btn" href="#">revert</a>');
    }
    body_append('</div><div id="revisions_browser_next">');
    if (0 < $cur_rev) {
        body_append('<a href="' . base_url() . '?' . htmlspecialchars(urlencode($revs[$cur_rev - 1]['page']), ENT_COMPAT, 'UTF-8') . '/revisions">next</a>');
    }
    body_append('</div>');
    body_append('</div>');
    echo html_finalize();
}
开发者ID:danielfogarty,项目名称:damp,代码行数:59,代码来源:module_revisions_browser.inc.php

示例2: render

 function render($args)
 {
     include_once $this->driver;
     if (!function_exists('render_page')) {
         rcube::raise_error(array('code' => 600, 'type' => 'php', 'file' => __FILE__, 'line' => __LINE__, 'message' => "ThreeCol plugin: Broken driver: {$this->driver}"), true, false);
     }
     $args = render_page($args);
     return $args;
 }
开发者ID:EstudioNexos,项目名称:threecol,代码行数:9,代码来源:threecol.php

示例3: switch_main

function switch_main()
{
    switch ($_GET["main"]) {
        case "init":
            $content = main_page();
            break;
        case "enable_kasper":
            main_kaspersky();
            exit;
            break;
        case "kasper_level":
            main_kaspersky_level();
            exit;
            break;
        case "kasper_action":
            main_kaspersky_action();
            exit;
            break;
        case "kasper_save":
            main_kaspersky_save();
            exit;
            break;
        case "fetchmail":
            main_fetchmail();
            exit;
            break;
        case "main_fetchmail_1":
            main_fetchmail_1();
            exit;
            break;
        case "main_fetchmail_2":
            main_fetchmail_2();
            exit;
            break;
        case "main_fetchmail_3":
            main_fetchmail_3();
            exit;
            break;
        case "main_fetchmail_build":
            main_fetchmail_build();
            exit;
            break;
        case "postmaster":
            main_postmaster();
            exit;
            break;
        default:
            $content = main_page();
    }
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body(render_page($content));
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:52,代码来源:configure.server.php

示例4: render

 function render($args)
 {
     $this->include_script($this->local_skin_path() . '/threecol.js');
     $this->include_stylesheet($this->local_skin_path() . '/threecol.css');
     if (is_readable($this->driver)) {
         include_once $this->driver;
         if (!function_exists('render_page')) {
             rcube::raise_error(array('code' => 600, 'type' => 'php', 'file' => __FILE__, 'line' => __LINE__, 'message' => "ThreeCol plugin: Broken driver: {$this->driver}"), true, false);
         }
         $args = render_page($args);
     }
     return $args;
 }
开发者ID:namesco,项目名称:threecol,代码行数:13,代码来源:threecol.php

示例5: controler_send_mail

function controler_send_mail()
{
    if ($_SERVER["REQUEST_METHOD"] != "POST") {
        render_error("attend un formulaire envoyé en POST!");
        exit;
    }
    $message = $_REQUEST['message'];
    if (empty($message)) {
        render_error("Le paramètre 'message' non vide est attendu");
        exit;
    }
    $resp = service_send_sms($message, 'nico');
    if ($resp == false) {
        render_error("problème lors de l'envoie du sms.");
        exit;
    }
    render_page($resp);
}
开发者ID:silly-exp,项目名称:send_sms,代码行数:18,代码来源:send_sms.php

示例6: error_reporting

<?php

error_reporting(NULL);
$TAB = 'USER';
// Main include
include $_SERVER['DOCUMENT_ROOT'] . "/inc/main.php";
// Data
if ($user == 'admin') {
    exec(VESTA_CMD . "v-list-users json", $output, $return_var);
} else {
    exec(VESTA_CMD . "v-list-user " . $user . " json", $output, $return_var);
}
$data = json_decode(implode('', $output), true);
$data = array_reverse($data, true);
// Render page
render_page($user, $TAB, 'list_user');
// Back uri
$_SESSION['back'] = $_SERVER['REQUEST_URI'];
开发者ID:sacredwebsite,项目名称:vesta,代码行数:18,代码来源:index.php

示例7: __

    // Flush field values on success
    if (empty($_SESSION['error_msg'])) {
        $_SESSION['ok_msg'] = __('DATABASE_CREATED_OK', htmlentities($user) . "_" . htmlentities($_POST['v_database']), htmlentities($user) . "_" . htmlentities($_POST['v_database']));
        $_SESSION['ok_msg'] .= " / <a href=" . $db_admin_link . " target='_blank'>" . __('open %s', $db_admin) . "</a>";
        unset($v_database);
        unset($v_dbuser);
        unset($v_password);
        unset($v_type);
        unset($v_charset);
    }
}
// Get user email
$v_db_email = $panel[$user]['CONTACT'];
// List avaiable database types
$db_types = explode(',', $_SESSION['DB_SYSTEM']);
// List available database servers
exec(VESTA_CMD . "v-list-database-hosts json", $output, $return_var);
$db_hosts_tmp1 = json_decode(implode('', $output), true);
$db_hosts_tmp2 = array_map(function ($host) {
    return $host['HOST'];
}, $db_hosts_tmp1);
$db_hosts = array_values(array_unique($db_hosts_tmp2));
unset($output);
unset($db_hosts_tmp1);
unset($db_hosts_tmp2);
render_page($user, $TAB, 'add_db');
// Flush session messages
unset($_SESSION['error_msg']);
unset($_SESSION['ok_msg']);
// Footer
include $_SERVER['DOCUMENT_ROOT'] . '/templates/footer.html';
开发者ID:EidolonHost,项目名称:vesta,代码行数:31,代码来源:index.php

示例8: render_page

<?php

require "common.php";
$template = "links";
render_page($template);
开发者ID:BackupTheBerlios,项目名称:denial,代码行数:5,代码来源:links.php

示例9: rtrim

    $v_db_tmp = rtrim($v_db_tmp, ",");
    $v_db_tmp = "DB=" . escapeshellarg($v_db_tmp);
    $v_cron = $_POST['v_cron'];
    $v_cron_tmp = str_replace("\r\n", ",", $_POST['v_cron']);
    $v_cron_tmp = rtrim($v_cron_tmp, ",");
    $v_cron_tmp = "CRON=" . escapeshellarg($v_cron_tmp);
    $v_userdir = $_POST['v_userdir'];
    $v_userdir_tmp = str_replace("\r\n", ",", $_POST['v_userdir']);
    $v_userdir_tmp = rtrim($v_userdir_tmp, ",");
    $v_userdir_tmp = "USER=" . escapeshellarg($v_userdir_tmp);
    // Create temporary exeption list on a filesystem
    exec('mktemp', $mktemp_output, $return_var);
    $tmp = $mktemp_output[0];
    $fp = fopen($tmp, 'w');
    fwrite($fp, $v_web_tmp . "\n" . $v_dns_tmp . "\n" . $v_mail_tmp . "\n" . $v_db_tmp . "\n" . $v_userdir_tmp . "\n");
    fclose($fp);
    unset($mktemp_output);
    // Save changes
    exec(VESTA_CMD . "v-update-user-backup-exclusions " . $user . " " . $tmp, $output, $return_var);
    check_return_code($return_var, $output);
    unset($output);
    // Set success message
    if (empty($_SESSION['error_msg'])) {
        $_SESSION['ok_msg'] = __("Changes has been saved.");
    }
}
// Render page
render_page($user, $TAB, 'edit_backup_exclusions');
// Flush session messages
unset($_SESSION['error_msg']);
unset($_SESSION['ok_msg']);
开发者ID:sacredwebsite,项目名称:vesta,代码行数:31,代码来源:index.php

示例10: render_page

<?php

include_once 'header.php';
include_once 'menubar.php';
?>
<div id="content">
<?php 
try {
    render_page();
} catch (Exception $exception) {
    log_al_error($exception->getMessage());
    send_error_email($exception->getMessage());
    ?>
<p>An error was encountered processing your request.  Technical support has been notified and we hope
to correct the problem soon.  We apologize for this inconvenience.</p>
<?php 
}
?>
</div>
<?php 
include_once 'footer.php';
开发者ID:BGCX261,项目名称:zonelayout-svn-to-git,代码行数:21,代码来源:page.php

示例11: str_replace

        $v_autoreply = 'no';
        $v_autoreply_message = '';
    }
    // Add autoreply
    if (!empty($_POST['v_autoreply']) && empty($_SESSION['error_msg'])) {
        if ($v_autoreply_message != str_replace("\r\n", "\n", $_POST['v_autoreply_message'])) {
            $v_autoreply_message = str_replace("\r\n", "\n", $_POST['v_autoreply_message']);
            $v_autoreply_message = escapeshellarg($v_autoreply_message);
            exec(VESTA_CMD . "v-add-mail-account-autoreply " . $v_username . " " . $v_domain . " " . $v_account . " " . $v_autoreply_message, $output, $return_var);
            check_return_code($return_var, $output);
            unset($output);
            $v_autoreply = 'yes';
            $v_autoreply_message = $_POST['v_autoreply_message'];
        }
    }
    // Set success message
    if (empty($_SESSION['error_msg'])) {
        $_SESSION['ok_msg'] = __('Changes has been saved.');
    }
}
// Render page
if (empty($_GET['account'])) {
    // Display body for mail domain
    render_page($user, $TAB, 'edit_mail');
} else {
    // Display body for mail account
    render_page($user, $TAB, 'edit_mail_acc');
}
// Flush session messages
unset($_SESSION['error_msg']);
unset($_SESSION['ok_msg']);
开发者ID:sacredwebsite,项目名称:vesta,代码行数:31,代码来源:index.php

示例12: header

<?php

//
// Pipecode - distributed social network
// Copyright (C) 2014 Bryan Beicker <bryan@pipedot.org>
//
// This file is part of Pipecode.
//
// Pipecode is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Pipecode is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Pipecode.  If not, see <http://www.gnu.org/licenses/>.
//
include "render.php";
header("Content-Type: text/plain");
$qid = (int) $s2;
$can_moderate = true;
render_page(0, 0, $qid, true);
开发者ID:scarnago,项目名称:pipecode,代码行数:26,代码来源:comments.php

示例13: shell_exec

// Read config
$v_config = shell_exec(VESTA_CMD . "v-open-fs-config " . $v_config_path);
if (!empty($v_config_path1)) {
    $v_config1 = shell_exec(VESTA_CMD . "v-open-fs-config " . $v_config_path1);
}
if (!empty($v_config_path2)) {
    $v_config2 = shell_exec(VESTA_CMD . "v-open-fs-config " . $v_config_path2);
}
if (!empty($v_config_path3)) {
    $v_config3 = shell_exec(VESTA_CMD . "v-open-fs-config " . $v_config_path3);
}
if (!empty($v_config_path4)) {
    $v_config4 = shell_exec(VESTA_CMD . "v-open-fs-config " . $v_config_path4);
}
if (!empty($v_config_path5)) {
    $v_config5 = shell_exec(VESTA_CMD . "v-open-fs-config " . $v_config_path5);
}
if (!empty($v_config_path6)) {
    $v_config6 = shell_exec(VESTA_CMD . "v-open-fs-config " . $v_config_path6);
}
if (!empty($v_config_path7)) {
    $v_config7 = shell_exec(VESTA_CMD . "v-open-fs-config " . $v_config_path7);
}
if (!empty($v_config_path8)) {
    $v_config8 = shell_exec(VESTA_CMD . "v-open-fs-config " . $v_config_path8);
}
// Render page
render_page($user, $TAB, 'edit_server_dovecot');
// Flush session messages
unset($_SESSION['error_msg']);
unset($_SESSION['ok_msg']);
开发者ID:PurdyForks,项目名称:vesta,代码行数:31,代码来源:index.php

示例14: unset

}
$SimplePie->__destruct();
unset($SimplePie);
$_GLOBAL['aStories'] = $aStories;
// #2: Get the weather
$sWeatherFeed = 'http://www.wunderground.com/auto/rss_full/CA/Palo_Alto.xml';
$SimplePie = new SimplePie();
$SimplePie->enable_cache(false);
$SimplePie->set_feed_url($sWeatherFeed);
$SimplePie->init();
$SimplePie->handle_content_type();
if ($SimplePie->error()) {
    // TODO: Delete that feed??
    $SimplePie->__destruct();
    continue;
}
$aWeather = $SimplePie->get_items();
foreach ($aWeather as $oItem) {
    $sTitle = $oItem->get_title();
    if (stristr($sTitle, 'Current Condition')) {
        $GLOBALS['sWeather'] = mb_substr($sTitle, 21);
        break;
    }
    /*if (preg_match('/^Current Conditions : (-?[0-9]{1,3}[.][0-9])/', $sTitle, $aMatches)) {
          $GLOBALS['sCurrentTemp'] = $aMatches[1]; break;
      }*/
}
$SimplePie->__destruct();
unset($SimplePie);
render_page('Headlines', 'stories/view.feed.php');
开发者ID:sampurtill,项目名称:Stanford-Daily-mobile,代码行数:30,代码来源:index.php

示例15: render_dynamic_page

function render_dynamic_page($page, $params)
{
    require 'pages/' . $page . '.php';
    render_page($params);
}
开发者ID:bakineggs,项目名称:bakineggs.com,代码行数:5,代码来源:index.php


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