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


PHP load_page函数代码示例

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


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

示例1: list_children

function list_children($from, MCSession $curusr, $filter = null)
{
    $path_parts = explode("/", $from);
    $names = array();
    foreach ($path_parts as $name) {
        if (!empty($name)) {
            $names[] = storagenamedecode($name);
        }
    }
    $cid = find_cid($names);
    $con = new DataBaseTable('content', true, DATACONF);
    $types = new DataBaseTable('types', true, DATACONF);
    $cq = $con->getData("pid:`= {$cid}`", null, null, $curusr->items_per_page, $_GET['offset']);
    $cols = $curusr->items_per_page / $curusr->rows_per_page;
    $grid = con_list_to_grid($cq);
    $list = "<div id=\"Grid-{$cid}\" class=\"grid grid-col-{$cols}\">" . $grid . "</div>\n";
    if (empty($grid)) {
        $self = $con->getData("cid:`= {$cid}`");
        $self = $self->fetch();
        $type = $types->getData("ttid:`= {$self['ttid']}`");
        $type = $type->fetch();
        if ($type['ctype'] == 'page') {
            require_once dirname(__FILE__) . "/page.mod.php";
            $list = load_page($self, $curusr);
        } else {
            $list = "<div id=\"Message-{$cid}\" class=\"alert alert-warning\">No Children detected for this content!</div>\n";
        }
    }
    return $list;
}
开发者ID:jjon-saxton,项目名称:webcomicmanager,代码行数:30,代码来源:children.mod.php

示例2: handleShutdown

function handleShutdown()
{
  if (($error = error_get_last())) {
    $buffer = ob_get_contents();
    ob_clean();
   # raport the event, send email etc.
  
	$msg= $buffer;
	$um ='We have found some error please try again later.';
	ob_start();
	$data=array();
	$CI = get_instance();
	if(!$CI->config->item('DEBUG_PRINT'))
	{
		$msg='';
	}
	$data['print_msg'] =$msg;
	$data['um'] = $um;
	
	load_page('exception',$data);
	$buffer = ob_get_contents();
	ob_end_clean();
	echo $buffer; 
	exit();
   # from /error-capture, you can use another redirect, to e.g. home page
  }
}
开发者ID:bmfelix,项目名称:draftlounge,代码行数:27,代码来源:PHPFatalError.php

示例3: header

<?php

namespace YABA;

require_once 'includes/includes.inc.php';
if (!file_exists('config/')) {
    header('Location: setup/index.php?page=1');
}
$config = load_object('blog');
$page = 1;
if (array_key_exists('page', $_GET)) {
    $page = $_GET['page'];
}
$pages = [];
load_page('main', ['page' => $page, 'parser' => new \Parsedown(), 'pages' => $pages]);
开发者ID:jasef,项目名称:yet-another-blogging-app,代码行数:15,代码来源:index.php

示例4: define

<?php

/*
 *
 * "The main script.
 *
 *   WELCOME. :)" - Andrzej Dąbski
 *
 */
/*
 * Very importat begining.
 *   Remember to define AD_ROOT.
 */
define('AD_ROOT', '/var/www/AD_Project/');
function load_class($class_name)
{
    include_once AD_ROOT . 'Class/' . $class_name . '.php';
}
function load_page($page_name)
{
    include_once AD_ROOT . 'Temples/' . $page_name . '.php';
}
function load_config($config_name)
{
    include_once AD_ROOT . 'Configs/' . $config_name . '.conf.php';
}
load_class('Authorization');
Authorization::get_instance();
load_page('index');
开发者ID:jedrus113,项目名称:AD_Project,代码行数:29,代码来源:index.php

示例5: load_page

<?php

include_once "core/core.php";
load_page();
开发者ID:serhiynikolskiy,项目名称:Internetshop,代码行数:4,代码来源:index.php

示例6: admin_mode_update

/**
 * Enables/disables Admin mode
 * @return boolean
 */
function admin_mode_update()
{
    global $input;
    global $ezplayer_url;
    if (acl_admin_user()) {
        $_SESSION['admin_enabled'] = !$_SESSION['admin_enabled'];
    }
    $input['action'] = $_SESSION['ezplayer_mode'];
    if (count($input) > 0) {
        $ezplayer_url .= '/index.php?';
        foreach ($input as $key => $value) {
            $ezplayer_url .= "{$key}={$value}&";
        }
    }
    trace_append(array('0', 'admin_mode_update', $_SESSION['admin_enabled']));
    // 4) Displaying the previous page
    header("Location: " . $ezplayer_url);
    load_page();
}
开发者ID:jingyexu,项目名称:ezcast,代码行数:23,代码来源:web_index.php

示例7: load_page

<?php

require_once "app/functions.php";
$content = load_page($nid, $pdo);
// ==========================================
//
// TEMPLATE FILES
// --------------
//
// All CMS page template files should be prefixed
// with 'page-' and must have '.tpl.php' as the
// extensions (e.g. 'page-my-custom-template.tpl.php')
//
// The 'load_page()' function must be called after
// the functions file has been included to make the
// the following variables available for use.
//
//
// AVAILABLE VARIABLES:
// -------------------
//
// $content->nodeID			: The ID of the current page
// $content->title 			: The title of the CMS page
// $content->description 	: The description meta tag
// $content->body 			: The HTML body of the page
// $content->published 		: The timestamp of when the page was created
// $content->updated 		: The timestamp of when the page was last edited
// $content->url 			: The default/original URL alias for the page
// $content->template 		: The filename of the template this page uses
// $content->head_title		: The title (text) to be used within <title> tags in the header file
// $content->head_code 		: Code to be included within the <head> tags of the header file
开发者ID:Garvey80,项目名称:MNS,代码行数:31,代码来源:page-blog-post.tpl.php

示例8: date

 $l_sResponseStatusName = $vals[4]['value'];
 if ($l_iResponseStatusCode == 1) {
     //coordinates have been found successfully
     $l_sLongitude = $vals[11]['value'];
     $l_sLatitude = $vals[13]['value'];
     print "\n" . date("d/m/y : H:i:s", time()) . " Response long: " . $l_sLongitude;
     print "\n" . date("d/m/y : H:i:s", time()) . " Response latt: " . $l_sLatitude;
 } else {
     //error response - sending new request with only city name
     print "\n" . date("d/m/y : H:i:s", time()) . " Full address response was not found.";
     print "\n" . date("d/m/y : H:i:s", time()) . " Response status code: {$l_iResponseStatusCode}";
     print "\n" . date("d/m/y : H:i:s", time()) . " Response status name: {$l_sResponseStatusName}";
     $l_sAddress = trim($l_aOneRow['l_city']);
     $l_sURLTemp = str_replace("{address}", $l_sAddress, $l_sURL);
     print "\n" . date("d/m/y : H:i:s", time()) . " Calling API with only city name ({$l_sURLTemp})";
     $l_iStatus = load_page($l_sURLTemp, &$a_sResult);
     if ($l_iStatus != 200) {
         print "\n" . date("d/m/y : H:i:s", time()) . " Error loading page.";
     } else {
         print "\n" . date("d/m/y : H:i:s", time()) . " Parsing XML...";
         $p = xml_parser_create();
         xml_parse_into_struct($p, $a_sResult, $vals, $index);
         xml_parser_free($p);
         $l_iResponseStatusCode = $vals[3]['value'];
         $l_sResponseStatusName = $vals[4]['value'];
         if ($l_iResponseStatusCode == 1) {
             //coordinates have been found successfully
             $l_sLongitude = $vals[11]['value'];
             $l_sLatitude = $vals[13]['value'];
             print "\n" . date("d/m/y : H:i:s", time()) . " Response long: " . $l_sLongitude;
             print "\n" . date("d/m/y : H:i:s", time()) . " Response latt: " . $l_sLatitude;
开发者ID:sergrin,项目名称:crawlers-il,代码行数:31,代码来源:onetime_latlng.php

示例9: user_session_manager

require_once 'config.php';
// Load all Configuration Parameters
require_once 'functions.php';
// Load all needed base Functions
if (isset($_GET['logout'])) {
    require_once ABSCPATH . 'modules/citizens/logout.php';
}
//Logout User
user_session_manager();
// Start the Session Manager
if (!user_is_logged_in()) {
    // Check if User is Logged In
    if (!isset($_GET['login']) && !isset($_GET['oauth_token'])) {
        require_once 'modules/citizens/login.php';
    } else {
        require_once 'modules/citizens/oauth.php';
    }
    //If trying to Login, start the Oauth Procedure
} else {
    session_start();
    initiate();
    // Initiate all Needed Variables/Methods
    debug();
    if (isset($_GET['p'])) {
        load_page(trim($_GET['p']));
    } else {
        load_home();
    }
    // else Load Home
}
开发者ID:eellak,项目名称:opengov_planodioi,代码行数:30,代码来源:index.php

示例10: load_page

<?php

// load functions
require '../functions/functions.php';
$_SESSION['exist'] = false;
$_SESSION['match'];
load_page('banner.html');
load_page("log_reg.php");
load_page("quote.html");
load_page("footer.html");
?>


开发者ID:yuan9778,项目名称:Stock_Trade,代码行数:11,代码来源:index.php

示例11: doload

function doload($dir, $allow_directory = true, $may_execute = true)
{
    if (file_exists($dir)) {
        if (is_file($dir)) {
            load_local_file($dir, EXTENSION, $may_execute);
            return true;
        } elseif (is_dir($dir) && !TRAILING_SLASH && REDIRECT_TRAILING_SLASH) {
            if ($_SERVER['REQUEST_METHOD'] == "POST") {
                load_page("404", 503);
            } else {
                header('Location: ' . URL . '/');
            }
            return true;
        } elseif ($allow_directory && is_dir($dir) && (TRAILING_SLASH || FILENAME == '' || HANDLE_TRAILING_SLASH)) {
            require "defaults.php";
            foreach ($defaults as $default => $execute) {
                # TODO: Optimize this!
                $extension = explode('.', $default);
                $extension = $extension[1];
                if (file_exists("{$dir}/{$default}")) {
                    if ($execute && $may_execute) {
                        load_script_file("{$dir}/{$default}");
                    } else {
                        load_local_file("{$dir}/{$default}", $extension);
                    }
                    return true;
                }
            }
        }
    }
    if (REQUESTED_FILE == "favicon.ico") {
        return serve_favicon();
    }
    return false;
}
开发者ID:serverboy,项目名称:Interchange,代码行数:35,代码来源:local_files.php

示例12: trim

    if ($id > 0) {
        $url .= "/{$id}";
    }
    //if (isset($_POST['cancel_id'])) {
    //}
    $url .= ".xml";
} else {
    if (isset($_GET['test'])) {
        $url = "http://dining.foretees.com/portal/reservations/available_time_options.json?reservation_category=dining&organization_id=4&location_id=124&reservation_date=2014-2-3";
    }
}
if (strlen($url)) {
    //echo "<!-- $url -->";
    //echo "<br>".url_encode_array($_POST);
    //echo load_page($url, $_POST);
    $xml = trim(load_page($url, $_POST));
    if ($xml == "") {
        $xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
        $xml .= "<success>1</success>";
    }
    echo $xml;
} else {
    echo "Bad target selection. {$id}";
}
function load_page($url, $post, $ref_url = false)
{
    $ch = curl_init();
    if (strlen($ref_url)) {
        curl_setopt($ch, CURLOPT_REFERER, $ref_url);
    }
    curl_setopt($ch, CURLOPT_URL, $url);
开发者ID:uksubs66,项目名称:java-v2,代码行数:31,代码来源:dprox.php

示例13: preg_replace

                case "/":
                    return "include/php/pages/start.php";
                    break;
                default:
                    return "include/php/pages/404.php";
            }
        }
    }
}
$path = $_SERVER["REQUEST_URI"];
// Remove GET Parameters
$path = preg_replace('/\\?.*/', '', $path);
// Remove prescending directory part e.g. webmum/ defined in SUBDIR
$path = preg_replace("#" . SUBDIR . "#", '', $path);
// Webserver should add trailing slash, but if there is no trailing slash for any reason, add one ;)
if (strrpos($path, "/") != strlen($path) - 1) {
    $path = $path . "/";
}
/*
 * Include page content here
 */
include load_page($path);
/*
 * End of dynamic content
 */
require_once 'include/php/template/footer.php';
include_once 'include/php/db_close.inc.php';
?>


开发者ID:beli3ver,项目名称:webmum,代码行数:28,代码来源:index.php

示例14: load_page

  <input onclick="custom_width(this)" type="radio" name="tabs" id="tab2">
  <label for="tab2">
      <i class="fa fa-css3"></i><span>Studs</span>
  </label>
  <!-- Radio button and lable for Kittens -->
  <input onclick="custom_width(this)" type="radio" name="tabs" id="tab3">
  <label for="tab3">
      <i class="fa fa-code"></i><span>Kittens</span>
  </label>
  <!-- Radio button and lable for Customers -->
  <input onclick="custom_width(this)" type="radio" name="tabs" id="tab4">
  <label for="tab4">
      <i class="fa fa-code"></i><span>Customers</span>
  </label>

  <?php 
load_page("queen", "1");
?>
  <?php 
load_page("stud", "2");
?>
  <?php 
load_page("kitten", "3");
?>
  <?php 
load_page("customer", "4");
?>
  

<?php 
require 'includes/footer.php';
开发者ID:LeeDavid87,项目名称:CS-313,代码行数:31,代码来源:project.php

示例15: session_start

<?php

namespace YABA;

require_once 'includes/includes.inc.php';
$pages = ['categories' => 'Categories', 'posts' => 'Posts', 'newpost' => 'New Post'];
session_start();
if (!logged_in()) {
    header('Location: index.php');
    exit;
}
$page = array_key_exists('page', $_GET) ? $_GET['page'] : 'posts';
if ($_SERVER['REQUEST_METHOD'] == "GET") {
    load_page(sprintf(ADMIN_PAGE_PATH, $page), ['pages' => $pages]);
} else {
    call_user_func(sprintf(ADMIN_FUNC_PATH, $page));
}
function newpost()
{
    $title = $_POST['post_title'];
    $text = $_POST['post_text'];
    $category = $_POST['post_category'];
    $author = $_SESSION['user_id'];
    add_post($title, $text, $category, $author);
}
开发者ID:jasef,项目名称:yet-another-blogging-app,代码行数:25,代码来源:admin.php


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