當前位置: 首頁>>代碼示例>>PHP>>正文


PHP startpage函數代碼示例

本文整理匯總了PHP中startpage函數的典型用法代碼示例。如果您正苦於以下問題:PHP startpage函數的具體用法?PHP startpage怎麽用?PHP startpage使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了startpage函數的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: controller_pages

function controller_pages($args)
{
    default_html(true);
    html_add_css(base_url() . 'modules/page_browser/page_browser.css');
    if (USE_MIN_FILES) {
        html_add_js(base_url() . 'modules/page_browser/page_browser.min.js');
    } else {
        html_add_js(base_url() . 'modules/page_browser/page_browser.js');
    }
    html_add_js_var('$.glue.conf.page.startpage', startpage());
    $bdy =& body();
    elem_attr($bdy, 'id', 'pages');
    body_append('<h1>All pages</h1>');
    load_modules('glue');
    $pns = pagenames(array());
    $pns = $pns['#data'];
    foreach ($pns as $pn) {
        // display only pages with 'head'
        if (is_dir(CONTENT_DIR . '/' . $pn . '/head')) {
            body_append('<div class="page_browser_entry" id="' . htmlspecialchars($pn, ENT_COMPAT, 'UTF-8') . '"><span class="page_browser_pagename"><a href="' . base_url() . '?' . htmlspecialchars(urlencode($pn), ENT_COMPAT, 'UTF-8') . '">' . htmlspecialchars($pn, ENT_NOQUOTES, 'UTF-8') . '</a></span> ');
            if ($pn . '.head' == startpage()) {
                body_append('<span id="page_browser_startpage">[startpage]</span> ');
            }
        }
        body_append('</div>');
    }
    echo html_finalize();
}
開發者ID:danielfogarty,項目名稱:damp,代碼行數:28,代碼來源:module_page_browser.inc.php

示例2: startpage

permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
require_once 'common.inc';
startpage(UNRESTRICTED);
session_destroy();
unset($logged_in_username);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 
<link rel="stylesheet" type="text/css" href="theme.css" />
<link rel="icon" type="image/png" href="shcicon.png" />
<title>Logged out</title>
</head>
<body>
<h1>Logged out</h1>
<p>You have logged out.</p>
<?php 
開發者ID:rjaguar3,項目名稱:shc-manager,代碼行數:31,代碼來源:logout.php

示例3: header

<?php

if (!isset($_SESSION["uid"])) {
    header("location:miniadm.logon.php");
    die;
}
include_once dirname(__FILE__) . "/ressources/class.mini.admin.inc";
include_once dirname(__FILE__) . "/ressources/class.templates.inc";
include_once dirname(__FILE__) . "/ressources/class.user.inc";
include_once dirname(__FILE__) . "/ressources/class.langages.inc";
if (isset($_GET["loggoff"])) {
    logoff();
}
if (isset($_GET["start-page"])) {
    startpage();
    exit;
}
if (isset($_GET["auth"])) {
    auth_popup();
    exit;
}
if (isset($_POST["username-logon"])) {
    auth_verif();
    exit;
}
$mini = new miniadmin();
echo $mini->webpage;
function startpage()
{
    $page = CurrentPageName();
    $tpl = new templates();
開發者ID:brucewu16899,項目名稱:1.6.x,代碼行數:31,代碼來源:miniadm.php

示例4: microtime

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
// NOTE: not web-accessible; use Apache .htaccess to restrict access to
// this script
$time = microtime(true);
$report = '';
require_once 'common.inc';
require_once 'simple_html_dom.php';
startpage(ADMIN);
function report_error($err)
{
    global $admin_address, $report, $time;
    $message = <<<MESSAGE
An error occurred running the check_posters.php script.
The text of the error is as follows:

    %s

%sThe script ran in %0.3f seconds.
SHC Manager
MESSAGE;
    $body = sprintf($message, $err, (isset($report) and $report != '') ? sprintf(<<<REPORT
Additionally, the following report was made prior to exiting:
開發者ID:rjaguar3,項目名稱:shc-manager,代碼行數:29,代碼來源:check_posters.php

示例5: session_start

<?php

$GLOBALS["ICON_FAMILY"] = "VPN";
session_start();
include_once 'ressources/class.templates.inc';
include_once 'ressources/class.users.menus.inc';
include_once 'ressources/class.openvpn.inc';
include_once 'ressources/class.system.network.inc';
include_once 'ressources/class.tcpip.inc';
$users = new usersMenus();
if (!$users->AsSystemAdministrator) {
    die("alert('no access');");
}
if (isset($_GET["startpage"])) {
    echo startpage();
    exit;
}
if (isset($_GET["wizard"])) {
    wizard();
    exit;
}
if (isset($_GET["wizard-key"])) {
    wizard_key();
    exit;
}
if (isset($_GET["wizard-server"])) {
    wizard_server();
    exit;
}
if (isset($_GET["wizard-finish"])) {
    wizard_finish();
開發者ID:articatech,項目名稱:artica,代碼行數:31,代碼來源:index.openvpn.php

示例6: startpage

permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
require_once 'common.inc';
startpage(RESTRICTED);
/* USAGE OF THIS PAGE: This is an internal page used only by edit_player.php.

id is an required parameter that autoselects
the player whose responses are to be filled in.

The result is not well-formed html, as it is intended for inclusion in
the edit_player.php form.  */
do {
    if (!isset($_GET['id']) or is_null($_GET['id'])) {
        $errortext = "No user id provided";
        break;
    }
    $id = $_GET['id'];
    $mysqli = connect_mysql();
    if (!$mysqli) {
開發者ID:rjaguar3,項目名稱:shc-manager,代碼行數:31,代碼來源:get_player.php

示例7: startpage

permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
require_once 'common.inc';
$isloggedin = startpage(RESTRICTED);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 
<link rel="stylesheet" type="text/css" href="theme.css" />
<link rel="icon" type="image/png" href="shcicon.png" />
<title>Ungraded responses</title>
</head>
<body>
<h1>Ungraded responses</h1>
<?php 
$mysqli = connect_mysql();
$mysqli->query("USE {$mysql_dbname};");
if ($mysqli->errno) {
開發者ID:rjaguar3,項目名稱:shc-manager,代碼行數:31,代碼來源:ungraded.php

示例8: controller_default

/**
 *	this is the default (fallback) controller
 *
 *	it mainly invokes other controllers or sends error messages
 */
function controller_default($args)
{
    if (empty($args[0][0]) && empty($args[0][1])) {
        // take the default page
        $args[0][0] = startpage();
        log_msg('debug', 'controller_default: using the default page');
    } elseif ($args[0][0] == 'edit' && empty($args[0][1])) {
        // quirk: edit the default page
        $args[0][0] = startpage();
        $args[0][1] = 'edit';
        log_msg('debug', 'controller_default: using the default page');
        invoke_controller($args);
        return;
    }
    page_canonical($args[0][0]);
    $obj = expl('.', $args[0][0]);
    if (count($obj) == 2) {
        // page requested
        if (page_exists($args[0][0])) {
            if (DEFAULT_TO_EDIT && is_auth()) {
                log_msg('debug', 'controller_default: invoking controller_edit');
                controller_edit($args);
            } else {
                log_msg('debug', 'controller_default: invoking controller_show');
                controller_show($args);
            }
        } elseif (ALWAYS_PROMPT_CREATE_PAGE || is_auth() || $args[0][0] == startpage()) {
            log_msg('debug', 'controller_default: invoking controller_create_page');
            controller_create_page($args);
        } else {
            log_msg('info', 'controller_default: page ' . quot($args[0][0]) . ' not found, serving 404');
            hotglue_error(404);
        }
    } else {
        // possibly object requested
        if (object_exists($args[0][0])) {
            // try to serve upload
            if (isset($args['download']) && $args['download']) {
                // prompt file save dialog on client
                $dl = true;
            } else {
                $dl = false;
            }
            log_msg('debug', 'controller_default: invoking serve_resource');
            if (!serve_resource($args[0][0], $dl)) {
                log_msg('info', 'controller_default: object ' . quot($args[0][0]) . ' has no associated resource, serving 404');
                hotglue_error(404);
            }
        } else {
            log_msg('info', 'controller_default: object ' . quot($args[0][0]) . ' not found, serving 404');
            hotglue_error(404);
        }
    }
}
開發者ID:QbpNogCYUGmaGPzD,項目名稱:hotglue2,代碼行數:59,代碼來源:controller.inc.php

示例9: session_start

<?php
session_start();
include_once('ressources/class.templates.inc');
include_once('ressources/class.users.menus.inc');
include_once('ressources/class.openvpn.inc');
include_once('ressources/class.system.network.inc');
include_once('ressources/class.tcpip.inc');
$users=new usersMenus();
if(!$users->AsSystemAdministrator){die("alert('no access');");}

if(isset($_GET["startpage"])){echo startpage();exit;}
if(isset($_GET["wizard"])){wizard();exit;}
if(isset($_GET["wizard-key"])){wizard_key();exit;}
if(isset($_GET["wizard-server"])){wizard_server();exit;}
if(isset($_GET["wizard-finish"])){wizard_finish();exit;}
if(isset($_GET["KEY_COUNTRY_NAME"])){SaveCertificate();exit;}
if(isset($_GET["ENABLE_SERVER"])){SaveServerConf();exit;}
if(isset($_GET["ENABLE_BRIDGE"])){SaveBridgeMode();exit;}
if(isset($_GET["VPN_DNS_DHCP_1"])){SaveServerConf();exit;}
if(isset($_GET["restart-server"])){RestartServer();exit;}
if(isset($_GET["server-settings"])){server_settings();exit;}
if(isset($_GET["server-settings-js"])){server_settings_js();exit;}
if(isset($_GET["routes"])){routes_settings();exit;}
if(isset($_GET["ROUTE_SHOULD_BE"])){routes_shouldbe();exit;}
if(isset($_GET["ROUTE_FROM"])){routes_add();exit;}
if(isset($_GET["routes-list"])){routes_list();exit;}
if(isset($_GET["DELETE_ROUTE_FROM"])){routes_delete();exit;}

if(isset($_GET["events-js"])){events_js();exit;}
if(isset($_GET["events"])){events();exit;}
if(isset($_GET["events-session"])){events_sessions();exit;}
開發者ID:rsd,項目名稱:artica-1.5,代碼行數:31,代碼來源:index.openvpn.php


注:本文中的startpage函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。