本文整理汇总了PHP中home函数的典型用法代码示例。如果您正苦于以下问题:PHP home函数的具体用法?PHP home怎么用?PHP home使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了home函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: do_connect
function do_connect()
{
if (!isset($_REQUEST['LOGIN']) || !isset($_REQUEST['PASSWORD'])) {
return home();
}
global $user;
global $page;
if ($user->Connect($_REQUEST['LOGIN'], $_REQUEST['PASSWORD'])) {
$page['title'] = 'Succès de connection';
$page['class'] = 'VHtml';
$page['method'] = 'View_html';
$page['arg'] = 'succes_connect.html';
} else {
$page['title'] = 'Echec de connection';
$page['class'] = 'VHtml';
$page['method'] = 'View_html';
$page['arg'] = 'echec_connect.html';
}
}
示例2: get_pages
function get_pages()
{
$home = home();
if (array_key_exists('children', $home)) {
return $home['children'];
} else {
return array();
}
}
示例3: fromhome
function fromhome()
{
if (isset($_SESSION['home'])) {
// test if user comes from home page
if ($_SESSION['home'] == 'yes') {
return;
}
}
$_SESSION['home'] = 'yes';
home();
exit;
}
示例4: process_request
function process_request()
{
global $legal_op;
$result = array();
$request = split("/", $_REQUEST['q']);
$op = $request[0];
$arg = $request[1];
if (in_array($op, $legal_op) && is_callable($op, false, $run)) {
$run($result, $arg);
} else {
home($result);
}
return $result;
}
示例5: pixopoint_menu
function pixopoint_menu($pixo_which = 1)
{
echo '
<!-- Multi-level Navigational Plugin by PixoPoint Web Development ... http://pixopoint.com/multi-level-navigation/ -->
';
// Checks to see if theme CSS should be used and serves different HTML if isn't - so that theme CSS won't mess up plugin CSS
if (get_option('suckerfish_generator') == 'Theme CSS') {
echo '
<div id="menu_wrapper' . $pixo_which . '">
<div id="menu' . $pixo_which . '">
';
} else {
echo '
<div id="pixopoint_menu_wrapper' . $pixo_which . '">
<div id="pixopoint_menu' . $pixo_which . '">
';
}
if (get_option('suckerfish_titletags') == 'on') {
ob_start();
}
// Main menu option
if ($pixo_which == '1') {
?>
<ul class="sf-menu" id="suckerfishnav"><?php
global $suckerfish_menuitem;
foreach ($suckerfish_menuitem as $key => $menuitem) {
switch ($menuitem) {
case "Pages":
pages();
break;
case "Pages (single dropdown)":
pagesdropdown();
break;
case "Categories":
category();
break;
case "Categories (single dropdown)":
categoriesdropdown();
break;
case "Home":
home();
break;
case "Links - no categories":
blogroll();
break;
case "Links - no categories (single dropdown)":
blogrolldropdown();
break;
case "Links - with categories":
blogrollcategories();
break;
case "Links - with categories (single dropdown)":
blogrollcategoriesdropdown();
break;
case "Archives - months":
archivesmonths();
break;
case "Archives - years":
archivesyears();
break;
case "Archives - months (single dropdown)":
archivesmonthsdropdown();
break;
case "Archives - years (single dropdown)":
archivesyearsdropdown();
break;
case "Recent Comments (single dropdown)":
recentcomments();
break;
case "Custom 1":
custom();
break;
case "Custom 2":
custom2();
break;
case "Custom 3":
custom3();
break;
case "Custom 4":
custom4();
break;
case "Recent Posts (single dropdown)":
recentposts();
break;
}
}
}
// Second menu option
if ($pixo_which == '2') {
?>
<ul class="sf-menu" id="suckerfishnav_2"><?php
global $suckerfish_2_menuitem;
foreach ($suckerfish_2_menuitem as $key => $menuitem) {
switch ($menuitem) {
case "Pages":
pages();
break;
case "Pages (single dropdown)":
pagesdropdown();
break;
//.........这里部分代码省略.........
示例6: home
public static function home()
{
return home();
}
示例7: move
function move($file, $ndir, $folder)
{
global $folder, $l;
if (!$file == "") {
maintop($l['TOP_MOVE']);
if (@rename($folder . $file, $ndir . $file)) {
$txt = str_replace('%1', "<div class='breadcrumb' style='margin:30px;'>" . breadcrumb($folder) . " / " . $file . "</div>", $l['MOV_MSG2']);
$txt = str_replace('%2', "<div class='breadcrumb' style='margin:30px;'>" . breadcrumb($ndir) . " / " . $file . "</div>", $txt);
echo $txt;
} else {
echo "<p>" . str_replace('%1', " <span class='breadcrumb'>" . breadcrumb($folder) . " / " . $file . "</span> ", $l['MOV_MSG3']) . "</p>";
}
mainbottom();
} else {
home();
}
}
示例8: _show_webpage
private function _show_webpage()
{
$this->page = 'api_docs';
if (!loadpage($this->page, true, 'pre')) {
$this->page_body = '<div class="baseNormalContent">Pagina niet gevonden.
<a href="' . home() . '">Klik hier</a> om terug te keren naar de hoofdpagina.</div>';
}
$this->load->view('frontend_main');
}
示例9: md5
<?php
include "util.inc";
include "config.inc";
include "schema.inc";
include "xmlrpc.inc";
$uploadfile = NUCLEUS_UPLOAD_DIRECTORY . "/" . md5(uniqid(rand(), true));
if (!move_uploaded_file($_FILES['schemaFile']['tmp_name'], $uploadfile)) {
print "Unable to upload schema. Debug output below.";
print "<pre>";
print_r($_FILES);
print "</pre>";
print "<a href=\"" . home() . "\">Try again</a>";
start_over();
}
load_schema();
if ($_POST['sendQuery'] == "drip") {
$_SESSION['network']['sendQuery'] = 65534;
} else {
if ($_POST['sendQuery'] == "local") {
$_SESSION['network']['sendQuery'] = 65535;
}
}
if ($_POST['receiveResults'] == "drain") {
$_SESSION['network']['receiveResults'] = 0;
} else {
if ($_POST['receiveResults'] == "local") {
$_SESSION['network']['receiveResults'] = 65535;
} else {
if ($_POST['receiveResults'] == "serial") {
$_SESSION['network']['receiveResults'] = 126;
示例10: getCaseStudySolvById
echo $twig->render('resolutions.twig', getCaseStudySolvById($_GET['id']));
break;
case 'about':
echo $twig->render('about.twig');
break;
case 'help':
echo $twig->render('help.twig');
break;
case 'enterprise-profile':
if ($_SESSION['type'] == "student") {
echo $twig->render('enterprise_public_profile.twig', getEnterpriseProfile($_GET['id']));
} else {
echo $twig->render('500.twig');
}
break;
case 'student-profile':
echo $twig->render('user_public_profile.twig', getStudentProfile($_GET['id']));
break;
case 'home':
home($twig);
break;
case 'recover':
echo $twig->render('recover.twig');
break;
case 'new-password':
echo $twig->render('new_password.twig', array('code' => $_GET['code']));
break;
default:
home($twig);
break;
}
示例11: move
function move($file, $ndir, $folder)
{
global $folder;
if (!$file == "") {
maintop("Move");
if (rename($folder . $file, $ndir . $file)) {
echo $folder . $file . " has been succesfully moved to " . $ndir . $file;
} else {
echo "There was an error moving " . $folder . $file;
}
mainbottom();
} else {
home();
}
}
示例12: page
<li><a href="<?php
echo page('community-fr.php');
?>
">Communauté</a></li>
<li><a href="<?php
echo page('development-fr.php');
?>
">Développement</a></li>
</ul>
</div>
</div>
<div id="navigation-container">
<div id="navigation">
<ul id="breadcrumbs">
<?php
echo '<li><a href="' . home() . '">Accueil</a></li>';
foreach ($breadcrumbs as $name => $link) {
echo '<li>»<a href="' . root() . '/' . $link . '">' . $name . '</a></li>';
}
?>
</ul>
<ul id="buttons">
<li><a id="language-en" href="<?php
echo $translated_page;
?>
" title="Website in english">English</a></li>
<li><a id="donate" href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=VH4J3GW5GUXR4&lc=FR" title="Faire un don">Faire un don</a></li>
<li><a id="flattr" href="https://flattr.com/thing/38063/SFML-multimedia-library" title="Flattrer SFML">Flattr</a></li>
</ul>
</div>
</div>
示例13: tocopy
function tocopy($file, $ndir, $folder)
{
global $meurl, $folder;
if (!$file == "") {
maintop("复制");
echo "<div class='box'>";
$nndir = $ndir;
$nfolder = $folder;
$file = iconv("UTF-8", "GBK", $file);
$ndir = iconv("UTF-8", "GBK", $ndir);
$folder = iconv("UTF-8", "GBK", $folder);
if (!file_exists($ndir)) {
mkdir($ndir, 0755);
}
$file = explode(',', $file);
foreach ($file as $v) {
if (file_exists($ndir . $v)) {
@unlink($ndir . $v);
if (@copy($folder . $v, $ndir . $v)) {
$v = iconv("GBK", "UTF-8", $v);
echo $nndir . $v . " 文件被 " . $nfolder . $v . " 替换<br>";
} else {
$v = iconv("GBK", "UTF-8", $v);
echo "<span class='error'>无法复制 " . $nfolder . $v . ',请检查文件权限</span><br>';
}
} elseif (@copy($folder . $v, $ndir . $v)) {
$v = iconv("GBK", "UTF-8", $v);
echo $nfolder . $v . " 已经成功复制到 " . $nndir . $v . '<br>';
} else {
$v = iconv("GBK", "UTF-8", $v);
echo "<span class='error'>无法复制 " . $nfolder . $v . ',请检查文件权限</span><br>';
}
}
echo "你可以 <a href=\"" . $meurl . "?op=home&folder=" . $nndir . "\">前往文件夹查看文件</a> 或者 <a href=\"" . $meurl . "?op=home&folder=" . $_SESSION['folder'] . "\">返回上次浏览的文件夹</a>\n";
echo "</div>";
mainbottom();
} else {
home();
}
}
示例14: resetdb
function resetdb()
{
global $S;
// Here we have a complex single liner with three seperate sql statements.
// we drop the table. Create the table again fresh, and then insert the inital rows.
$sql = "drop table members;" . "create table members (fname text, lname text);" . "insert into members (fname, lname) values('Big', 'Joe'),('Little', 'Joe')," . "('Barton','Phillips'),('Someone','Else');";
$S->query($sql);
home();
}
示例15: switch
<?php
require_once "../includes/global_ui.php";
require_once "../connexion.php";
if (!isset($_GET["a"])) {
$a = "home";
} else {
$a = $_GET["a"];
}
switch ($a) {
case "home":
home();
break;
case "add":
add();
break;
case "add_post":
add_post();
break;
case "edit":
edit();
break;
case "edit_post":
edit_post();
break;
case "suppr_post":
suppr_post();
break;
default:
echo "Erreur de redirection";
}
function home()