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


PHP begin_page函数代码示例

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


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

示例1: if

} else if (!$etape) {
    $erreur = '';
    if (@file_exists($nom_fic)) {
        $f = @fopen($nom_fic, "r+");
        if (!$f) $erreur = "<p>Le fichier \"".$nom_fic."\" n'est pas accessible en écriture.</p>";
    } else {
        $f = @fopen($nom_fic, "w");
        if (!$f) $erreur = "<p>Impossible de créer le fichier \"".$nom_fic."\".</p>";
    }
    if ($f)
      if (!@fclose($f))
        $erreur = "<p>Impossible de sauvegarder le fichier \"".$nom_fic."\".</p>";

    if ($erreur!='') {
        echo begin_page("Installation de GRR");
        begin_html();
        echo "<h2>Installation de la base $dbsys : problème de droits d'accès</h2>";
        echo $erreur;
        if (@file_exists($nom_fic))
            echo "<p>Vous pouvez également renseigner manuellement le fichier \"".$nom_fic."\".</p>";
        else if (@file_exists($nom_fic.".ori")) {
            echo "<p>Vous pouvez renommer manuellement le fichier \"".$nom_fic.".ori\" en \"".$nom_fic."\", et lui donner les droits suffisants.</p>";
            echo "<p>Une fois le fichier \"".$nom_fic.".ori\" renommé en \"".$nom_fic."\", vous pouvez également renseigner manuellement le fichier \"".$nom_fic."\".</p>";
        }
        echo "<p>Vous pouvez par exemple utilisez votre client FTP afin de régler ce problème ou bien contactez l'administrateur technique. Une fois cette manipulation effectuée, vous pourrez continuer.</p>";
        echo "<p><form action='install_mysql.php' method='get'>";
        echo "<input type='hidden' name='etape' value='' />";
        echo "<input type='submit' class='fondl' name='Continuer' />";
        echo "</form>";
        end_html();
开发者ID:rhertzog,项目名称:lcs,代码行数:30,代码来源:install_mysql.php

示例2: header

    $fin_session = 'y';

if (($fin_session == 'y') and (getSettingValue("authentification_obli")==1)) {
    header("Location: ./logout.php?auto=1&url=$url");
    die();
};

if ((getSettingValue("authentification_obli")==0) and (getUserName()=='')) {
    $type_session = "no_session";
}
else
{
  $type_session = "with_session";
}

echo begin_page(get_vocab("mrbs").get_vocab("deux_points").getSettingValue("company"));
echo "<div class=\"page_sans_col_gauche\">";


$cible = isset($_POST["cible"]) ? $_POST["cible"] : (isset($_GET["cible"]) ? $_GET["cible"] : '');
$cible = htmlentities($cible); // sécurité
$type_cible = isset($_POST["type_cible"]) ? $_POST["type_cible"] : (isset($_GET["type_cible"]) ? $_GET["type_cible"] : '');
if ($type_cible!='identifiant:non') $type_cible='';  // sécurité
$action = isset($_POST["action"]) ? $_POST["action"] : '';
$corps_message = isset($_POST["message"]) ? $_POST["message"] : 'Contenu du message : ';
$email_reponse = isset($_POST["email_reponse"]) ? $_POST["email_reponse"] : '';
$error_subject = 'n';
if (isset($_POST["objet_message"])) {
  $objet_message = trim($_POST["objet_message"]);
  if ($objet_message == '')
    $error_subject = 'y';
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:contact.php

示例3: print_header

function print_header($day = '', $month = '', $year = '', $type_session = 'with_session')
{
    global $vocab, $search_str, $grrSettings, $clock_file, $desactive_VerifNomPrenomUser, $grr_script_name;
    global $use_prototype, $use_admin, $use_tooltip_js, $desactive_bandeau_sup, $id_site, $use_select2;
    if (!$desactive_VerifNomPrenomUser) {
        $desactive_VerifNomPrenomUser = 'n';
    }
    // On vérifie que les noms et prénoms ne sont pas vides
    VerifNomPrenomUser($type_session);
    if ($type_session == "with_session") {
        echo begin_page(Settings::get("company"), "with_session");
    } else {
        echo begin_page(Settings::get("company"), "no_session");
    }
    // Si nous ne sommes pas dans un format imprimable
    if (!isset($_GET['pview']) || $_GET['pview'] != 1) {
        // If we dont know the right date then make it up
        if (!isset($day) || !isset($month) || !isset($year) || $day == '' || $month == '' || $year == '') {
            $date_now = time();
            if ($date_now < Settings::get("begin_bookings")) {
                $date_ = Settings::get("begin_bookings");
            } else {
                if ($date_now > Settings::get("end_bookings")) {
                    $date_ = Settings::get("end_bookings");
                } else {
                    $date_ = $date_now;
                }
            }
            $day = date("d", $date_);
            $month = date("m", $date_);
            $year = date("Y", $date_);
        }
        if (!isset($search_str)) {
            $search_str = get_vocab("search_for");
        }
        if (empty($search_str)) {
            $search_str = "";
        }
        if (!(isset($desactive_bandeau_sup) && $desactive_bandeau_sup == 1 && $type_session != 'with_session')) {
            if (@file_exists('./admin_access_area.php')) {
                $adm = 1;
                $racine = "../";
                $racineAd = "./";
            } else {
                $adm = 0;
                $racine = "./";
                $racineAd = "./admin/";
            }
            // Génération XML
            $generationXML = 1;
            if (Settings::get("export_xml_actif") == "Oui" && $adm == 0) {
                include "{$racine}/include/generationxml.php";
            }
            if (Settings::get("export_xml_plus_actif") == "Oui" && $adm == 0) {
                include "{$racine}/include/generationxmlplus.php";
            }
            // On fabrique une date valide pour la réservation si ce n'est pas le cas
            $date_ = mktime(0, 0, 0, $month, $day, $year);
            if ($date_ < Settings::get("begin_bookings")) {
                $date_ = Settings::get("begin_bookings");
            } else {
                if ($date_ > Settings::get("end_bookings")) {
                    $date_ = Settings::get("end_bookings");
                }
            }
            $day = date("d", $date_);
            $month = date("m", $date_);
            $year = date("Y", $date_);
            echo '<div id="toppanel">' . PHP_EOL;
            echo '<div id="panel">' . PHP_EOL;
            echo '<div class="content">' . PHP_EOL;
            echo '<table id="header">' . PHP_EOL;
            echo '<tr>' . PHP_EOL;
            //Logo
            $nom_picture = $racine . "images/" . Settings::get("logo");
            if (Settings::get("logo") != '' && @file_exists($nom_picture)) {
                echo '<td class="logo" height="100">' . PHP_EOL . '<a href="' . $racine . page_accueil('yes') . 'day=' . $day . '&amp;year=' . $year . '&amp;month=' . $month . '"><img src="' . $nom_picture . '" alt="logo"/></a>' . PHP_EOL . '</td>' . PHP_EOL;
            }
            //Accueil
            echo '<td class="accueil ">', PHP_EOL, '<h2>', PHP_EOL, '<a href="' . $racine . page_accueil('yes'), 'day=', $day, '&amp;year=', $year, '&amp;month=', $month, '">', get_vocab("welcome"), ' - <b>', Settings::get("company"), '</b></a>', PHP_EOL, '</h2>', PHP_EOL;
            //Mail réservartion
            echo Settings::get('message_accueil');
            $sql = "SELECT value FROM " . TABLE_PREFIX . "_setting WHERE name='mail_etat_destinataire'";
            $res = grr_sql_query1($sql);
            //Libère le résultat de la mémoire
            grr_sql_free($res);
            if ($res == 1) {
                if ($type_session == "no_session") {
                    echo '<td class="contactformulaire">', PHP_EOL, '<input class="btn btn-default" type="submit" rel="popup_name" value="Réserver" onClick="javascript:location.href=\'contactFormulaire.php?day=', $day, '&amp;month=', $month, '&amp;year=', $year, '\'" >', PHP_EOL, '</td>', PHP_EOL;
                }
            }
            // Administration div Sauvegarde
            if ($type_session == "with_session") {
                if (authGetUserLevel(getUserName(), -1, 'area') >= 4 || authGetUserLevel(getUserName(), -1, 'user') == 1) {
                    echo '<td class="administration">' . PHP_EOL;
                    echo "<br><a href='{$racineAd}admin_accueil.php?day={$day}&amp;month={$month}&amp;year={$year}'>" . get_vocab('admin') . "</a>" . PHP_EOL;
                    if (authGetUserLevel(getUserName(), -1, 'area') >= 6) {
                        echo '<br />' . PHP_EOL;
                        echo "<form action='{$racineAd}admin_save_mysql.php' method='get'><div>" . PHP_EOL;
                        echo '<input type="hidden" name="flag_connect" value="yes" />' . PHP_EOL;
//.........这里部分代码省略.........
开发者ID:JeromeDevome,项目名称:GRR,代码行数:101,代码来源:functions.inc.php

示例4: print_header

/**
* Fonction qui affiche le header,
* @param string $day
* @param string $month
* @param string $year
* @param string $type_session
* @param bool $close si il est true, dans le template twig les div ouverts dans printHeader seront fermés à la fin du fichier, sinon ils restent ouvert et c'est soit menu_gauche, soit le
* script en cours qui doit les fermer.
*/
function print_header($day = '', $month = '', $year = '', $type_session = 'with_session', $close = true, $display = true, $admin = true)
{
    global $vocab, $search_str, $grrSettings, $clock_file, $desactive_VerifNomPrenomUser, $grr_script_name;
    global $use_prototype, $use_admin, $use_tooltip_js, $desactive_bandeau_sup, $id_site, $use_select2;
    /**
     * Intégration de twig :
     *  Todo ne pas faire un echo ici et récupérer l'array pour twig, pour pouvoir fusionner les deux templates header et printHeader
     *  Je laisse les infos dans l'ondre original du script, ça serait plus propre de les grouper, pour remplir
     *  l'array pour twig, mais ça serait plus compliqier de suivre les modifs du code, à prévoir en refacto plus tard
     *
     * var global twig
     */
    global $twig;
    $tplArray = [];
    $tplArray['close'] = $close;
    global $template;
    $tplArray['template'] = $template;
    if (!$desactive_VerifNomPrenomUser) {
        $desactive_VerifNomPrenomUser = 'n';
    }
    // On vérifie que les noms et prénoms ne sont pas vides
    VerifNomPrenomUser($type_session);
    /* le header <head> de la page est toujours affiché */
    if ($type_session == 'with_session') {
        echo begin_page(Settings::get('company'), 'with_session');
    } else {
        echo begin_page(Settings::get('company'), 'no_session');
    }
    // Si nous ne sommes pas dans un format imprimable
    if (!isset($_GET['pview']) || $_GET['pview'] != 1) {
        // If we dont know the right date then make it up
        if (!isset($day) || !isset($month) || !isset($year) || $day == '' || $month == '' || $year == '') {
            $date_now = time();
            if ($date_now < Settings::get('begin_bookings')) {
                $date_ = Settings::get('begin_bookings');
            } elseif ($date_now > Settings::get('end_bookings')) {
                $date_ = Settings::get('end_bookings');
            } else {
                $date_ = $date_now;
            }
            $day = date('d', $date_);
            $month = date('m', $date_);
            $year = date('Y', $date_);
        }
        if (!isset($search_str)) {
            $search_str = get_vocab('search_for');
        }
        if (empty($search_str)) {
            $search_str = '';
        }
        if (!(isset($desactive_bandeau_sup) && $desactive_bandeau_sup == 1 && $type_session != 'with_session')) {
            if (@file_exists('./admin_access_area.php')) {
                $adm = 1;
                $racine = '../';
                $racineAd = './';
            } else {
                $adm = 0;
                $racine = './';
                $racineAd = './admin/';
            }
            $tplArray['dansRepAdmin'] = $adm;
            // Génération XML
            $generationXML = 1;
            if (Settings::get('export_xml_actif') == 'Oui' && $adm == 0) {
                include "{$racine}/include/generationxml.php";
            }
            // On fabrique une date valide pour la réservation si ce n'est pas le cas
            $date_ = mktime(0, 0, 0, $month, $day, $year);
            if ($date_ < Settings::get('begin_bookings')) {
                $date_ = Settings::get('begin_bookings');
            } elseif ($date_ > Settings::get('end_bookings')) {
                $date_ = Settings::get('end_bookings');
            }
            $day = date('d', $date_);
            $month = date('m', $date_);
            $year = date('Y', $date_);
            /*echo '<div id="toppanel">'.PHP_EOL;
              echo '<div id="panel">'.PHP_EOL;
              echo '<div class="content">'.PHP_EOL;
              echo '<table id="header">'.PHP_EOL;
              echo '<tr>'.PHP_EOL;*/
            //Logo
            $nom_picture = $racine . 'images/' . Settings::get('logo');
            if (Settings::get('logo') != '' && @file_exists($nom_picture)) {
                $tplArray['nomPicture'] = $nom_picture;
                $tplArray['homeLink'] = $racine . page_accueil('yes') . 'day=' . $day . '&year=' . $year . '&month=' . $month;
                /*echo '<td class="logo" height="100">'.PHP_EOL.'<a href="'.$racine.page_accueil('yes').'day='.$day.'&year='.$year.'&month='.$month.'"><img src="'.$nom_picture.'" alt="logo"/></a>'.PHP_EOL.'</td>'.PHP_EOL;*/
            } else {
                $tplArray['nomPicture'] = false;
            }
            //Accueil
//.........这里部分代码省略.........
开发者ID:nicolas-san,项目名称:GRR,代码行数:101,代码来源:functions.inc.php

示例5: isset

$id_room = isset($_GET["id_room"]) ? $_GET["id_room"] : NULL;
if (isset($id_room)) {
    settype($id_room, "integer");
} else {
    $print = "all";
}
if (Settings::get("authentification_obli") == 0 && getUserName() == '') {
    $type_session = "no_session";
} else {
    $type_session = "with_session";
}
if (authGetUserLevel(getUserName(), -1) < 1 && Settings::get("authentification_obli") == 1 || !verif_acces_ressource(getUserName(), $id_room)) {
    showAccessDenied('');
    exit;
}
echo begin_page(get_vocab("mrbs") . get_vocab("deux_points") . Settings::get("company"));
$res = grr_sql_query("SELECT * FROM " . TABLE_PREFIX . "_room WHERE id={$id_room}");
if (!$res) {
    fatal_error(0, get_vocab('error_room') . $id_room . get_vocab('not_found'));
}
$row = grr_sql_row_keyed($res, 0);
grr_sql_free($res);
echo "<h3 style=\"text-align:center;\">";
echo get_vocab("room") . get_vocab("deux_points") . " " . htmlspecialchars($row["room_name"]);
$id_area = mrbsGetRoomArea($id_room);
$area_name = grr_sql_query1("select area_name from " . TABLE_PREFIX . "_area where id='" . $id_area . "'");
$area_access = grr_sql_query1("select access from " . TABLE_PREFIX . "_area where id='" . $id_area . "'");
echo "<br />(" . $area_name;
if ($area_access == 'r') {
    echo " - " . get_vocab("access");
}
开发者ID:BdEINSALyon,项目名称:GRR,代码行数:31,代码来源:view_room.php

示例6: todo_file_exist_error

function todo_file_exist_error()
{
    global $_TODO_FILENAME, $txt;
    show_title($txt['fatal_error']);
    begin_page($txt['fatal_error'], $txt['fatal_error_class']);
    echo $txt['unexistant_todo_file_text'];
    end_page();
    log_write($txt['todo_regeneration_log'] . $_TODO_FILENAME);
    $f = fopen($_TODO_FILENAME, "wb");
    fwrite($f, $txt['default_todo_file_data']);
    fclose($f);
}
开发者ID:NuriYuri,项目名称:Yuri-Todo-List,代码行数:12,代码来源:todo_list_manager.php

示例7: switch

// Inclusion de la lib' de gestion de la todo list
require "todo_list_manager.php";
// Traitement des demandes
if (isset($_GET['action']) && $_GET['action'] != 'see') {
    $todo_class = $_GET['action'];
    switch ($_GET['action']) {
        case 'push':
            todo_push();
            break;
        case 'pop':
            todo_pop();
            break;
        case 'update':
            todo_update();
            break;
        case 'clear':
            todo_clear();
            break;
        case 'download':
            todo_download();
            break;
        default:
            show_title($txt['error']);
            begin_page($txt['error'], $txt['error_class']);
            echo $txt['undefined_action'];
            end_page();
    }
} else {
    $todo_class = 'see';
    todo_see();
}
开发者ID:NuriYuri,项目名称:Yuri-Todo-List,代码行数:31,代码来源:index.php

示例8: date

 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
include "../include/admin.inc.php";
$grr_script_name = "admin_open_mysql.php";
$back = "";
$day = date("d");
$month = date("m");
$year = date("Y");
check_access(6, $back);
$sql_file = isset($_FILES["sql_file"]) ? $_FILES["sql_file"] : NULL;
$file_name = isset($_GET["file_name"]) ? $_GET["file_name"] : NULL;
VerifyModeDemo();
if (!$file_name) {
    print_header("", "", "", $type = "with_session");
} else {
    echo begin_page("", "no_session");
}
echo "<div class=\"page_sans_col_gauche\">";
echo "<br />";
if (!$file_name && !$sql_file['name']) {
    exit(get_vocab("admin_import_users_csv11") . "<br /><a href=\"admin_config.php?page_config=4\">" . get_vocab("back") . "</a></div></body></html>");
}
if (!$file_name) {
    echo "<h3>Restauration à partir du ficher : ";
    echo $sql_file['name'] . "</h3>\n";
    $file_name = str_replace("\\", "/", dirname($sql_file['tmp_name']) . "/" . $sql_file['name']);
    $ok = @copy($sql_file['tmp_name'], $file_name);
    $file = fopen($file_name, "r") or exit("Unable to open file!");
    $line = fgets($file);
    var_dump($line);
    if (!stristr($line, '#**************** BASE DE DONNEES')) {
开发者ID:nicolas-san,项目名称:GRRV4,代码行数:31,代码来源:admin_open_mysql.php

示例9: header

            header('Location: ' . $url);
            die;
        } else {
            header('Location: ./' . htmlspecialchars_decode(page_accueil()) . '');
            die;
        }
    }
}
$tplArray = [];
// Dans le cas d'une démo, on met à jour la base une fois par jour.
MajMysqlModeDemo();
//si on a interdit l'acces a la page login
if (Settings::get('Url_cacher_page_login') != '' && (!isset($sso_super_admin) || $sso_super_admin == false) && !isset($_GET['local'])) {
    header('Location: ./index.php');
}
echo begin_page(get_vocab('mrbs') . get_vocab('deux_points') . Settings::get('company'), 'no_session');
/*<!--<script type="text/javascript" src="js/functions.js" ></script>
<div class="center">-->*/
$nom_picture = './images/' . Settings::get('logo');
if (Settings::get('logo') != '' && @file_exists($nom_picture)) {
    $tplArray['pathLogo'] = $nom_picture;
    /*echo "<a href=\"javascript:history.back()\"><img src=\"".$nom_picture."\" alt=\"logo\" /></a>\n";"";*/
} else {
    $tplArray['pathLogo'] = false;
}
$tplArray['settings']['title'] = Settings::get('title_home_page');
$tplArray['settings']['company'] = Settings::get('company');
$tplArray['settings']['message'] = Settings::get('message_home_page');
$tplArray['settings']['disableLogin'] = Settings::get('disable_login');
$tplArray['vocab']['msg_login3'] = get_vocab('msg_login3');
/*<h1>
开发者ID:nicolas-san,项目名称:GRRV4,代码行数:31,代码来源:login.php

示例10: die

if (!isset($_GET['mdp']) && isset($argv[1])) {
    $_GET['mdp'] = $argv[1];
}
if (isset($_GET['mdp'])) {
    include "../include/connect.inc.php";
    include "../include/config.inc.php";
    include "../include/misc.inc.php";
    include "../include/functions.inc.php";
    include "../include/{$dbsys}.inc.php";
    include "../include/settings.class.php";
    if (!Settings::load()) {
        die("Erreur chargement settings");
    }
    if ($_GET['mdp'] != Settings::get("motdepasse_backup") || Settings::get("motdepasse_backup") == '') {
        if (!isset($argv[1])) {
            echo begin_page("backup", $page = "no_session") . "<p>";
        }
        echo "Le mot de passe fourni est invalide.";
        if (!isset($argv[1])) {
            echo "</p>";
            include "../include/trailer.inc.php";
        }
        die;
    }
} else {
    include "../include/admin.inc.php";
    $back = '';
    if (isset($_SERVER['HTTP_REFERER'])) {
        $back = htmlspecialchars($_SERVER['HTTP_REFERER']);
    }
    if (authGetUserLevel(getUserName(), -1) < 6) {
开发者ID:nicolas-san,项目名称:GRRV4,代码行数:31,代码来源:admin_save_mysql.php

示例11: begin_page

}
include "include/language.inc.php";
if (!isset($_GET['mdp'])) {
    $_GET['mdp'] = $argv[1];
}
if (!isset($_GET['mdp']) || $_GET['mdp'] != Settings::get("motdepasse_verif_auto_grr") || Settings::get("motdepasse_verif_auto_grr") == '') {
    if (!isset($argv[1])) {
        echo begin_page($titre, $page = "no_session") . "<p>";
    }
    echo "Le mot de passe fourni est invalide.";
    if (!isset($argv[1])) {
        echo "</p>";
        include "include/trailer.inc.php";
    }
    die;
}
if (!isset($argv[1])) {
    echo begin_page($titre, $page = "no_session");
}
// On vérifie une fois par jour si le délai de confirmation des réservations est dépassé
// Si oui, les réservations concernées sont supprimées et un mail automatique est envoyé.
verify_confirm_reservation();
// On vérifie une fois par jour que les ressources ont été rendue en fin de réservation
// Si non, une notification email est envoyée
verify_retard_reservation();
if (!isset($argv[1])) {
    echo "<p>Le script a été exécuté.</p>";
    include "include/trailer.inc.php";
} else {
    echo "Le script a ete execute.";
}
开发者ID:Birssan,项目名称:GRR,代码行数:31,代码来源:verif_auto_grr.php

示例12: header

        // Redirect
        header("Location: private.php?action=read&pmid=" . $_GET['pm']);
    } else {
        if (isset($_GET['profile'])) {
            // Display the profile of the user with the specified username
            $username = mysql_escape_string($_GET['profile']);
            // Get user ID
            $user = get_user_by_username($username);
            // Redirect
            header("Location: member.php?action=profile&uid=" . $user['uid']);
        } else {
            if (isset($_GET['feedback'])) {
                // Decode parameters
                $params = json_decode($_GET['feedback']);
                // Create a submit form and submit
                begin_page();
                end_header();
                ?>
	<form id="newthread_form" method="post" action="newthread.php?fid=<?php 
                echo FORUM_FEEDBACK;
                ?>
&amp;processed=1">
		<input type="hidden" name="my_post_key" value="<?php 
                echo generate_post_check();
                ?>
" />
		<input type="hidden" name="subject" value="" />
		<input type="hidden" name="icon" value="-1" />
		<input type="hidden" name="action" value="do_newthread" />
		<input type="hidden" name="posthash" value="<?php 
                md5($mybb_user['uid'] . random_str());
开发者ID:bcfuchs,项目名称:virtual-atom-smasher,代码行数:31,代码来源:vasapi.php

示例13: begin_page

<?php

include 'includes/common.php';
begin_page('de');
?>
<h2>
	Mirrors / Spiegel
</h2>
<ul>
	<li><a href="http://ngircd.barton.de/">ngircd.barton.de</a>
	<li><a href="http://ngircd.mirror.3rz.org">ngircd.mirror.3rz.org</a>
</ul>

<?php 
end_page();
开发者ID:just-some-tall-bloke,项目名称:ngircd-web,代码行数:15,代码来源:mirrors.php

示例14: print_header

function print_header($day='',$month='',$year='',$area='',$type_session='with_session',$page='no_admin',$room='')
{
   global $vocab, $search_str, $grrSettings, $clock_file, $desactive_VerifNomPrenomUser, $grr_script_name;
   global $use_prototype, $use_tooltip_js, $desactive_bandeau_sup, $id_site;

   if (!($desactive_VerifNomPrenomUser)) $desactive_VerifNomPrenomUser = 'n';
   // On vérifie que les noms et prénoms ne sont pas vides
   VerifNomPrenomUser($type_session);
   if ($type_session == "with_session")
       echo begin_page(get_vocab("mrbs").get_vocab("deux_points").getSettingValue("company"),"with_session");
   else
       echo begin_page(get_vocab("mrbs").get_vocab("deux_points").getSettingValue("company"),"no_session");

   // Si nous ne sommes pas dans un format imprimable
   if ((!isset($_GET['pview'])) or ($_GET['pview'] != 1)) {

   # If we dont know the right date then make it up
     if (!isset($day) or !isset($month) or !isset($year) or ($day == '') or ($month == '') or ($year == '')) {
         $date_now = mktime();
         if ($date_now < getSettingValue("begin_bookings"))
             $date_ = getSettingValue("begin_bookings");
         else if ($date_now > getSettingValue("end_bookings"))
             $date_ = getSettingValue("end_bookings");
         else
             $date_ = $date_now;
        $day   = date("d",$date_);
        $month = date("m",$date_);
        $year  = date("Y",$date_);
     }
   if (!(isset($search_str))) $search_str = get_vocab("search_for");
   if (empty($search_str)) $search_str = "";
   ?>
   <script type="text/javascript">
    chaine_recherche = "<?php echo $search_str; ?>";
   	function onsubmitForm()
	{
	if(document.pressed == 'a')
	{
  	document.getElementById('day').selectedIndex=<?php $date_now = mktime();echo (date("d",$date_now)-1); ?>;
		document.getElementById('month').selectedIndex=<?php echo (date("m",$date_now)-1);?>;
		document.getElementById('year').selectedIndex=<?php echo (date("Y",$date_now)-strftime("%Y", getSettingValue("begin_bookings")));?>;
  	var p=location.pathname;
	   	if(!p.match("day.php") && !p.match("week.php") && !p.match("week_all.php") && !p.match("month.php") && !p.match("month_all.php") && !p.match("month_all2.php") && !p.match("year.php"))
    document.getElementById('myform').action ="day.php";
	}
    if(document.pressed == 'd')
      document.getElementById('myform').action ="day.php";
    if(document.pressed == 'w')
    <?php
    echo "		document.getElementById('myform').action = \"";
    if ($room=="")
      echo "week_all.php";
		else
      echo "week.php";
    echo "\";\n";
    ?>
    if(document.pressed == 'm')
    <?php
    echo "		document.getElementById('myform').action = \"";
    if ($room=="") {
      if (isset($_SESSION['type_month_all'])) {echo $_SESSION['type_month_all'].".php";}
      else {echo "month_all.php";}
    } else
      echo "month.php";
    echo "\";\n";
    ?>
    return true;
		}
		</script>
    <?php

if (!(isset($desactive_bandeau_sup) and ($desactive_bandeau_sup==1) and ($type_session != 'with_session'))) {
    // On fabrique une date valide pour la réservation si ce n'est pas le cas
    $date_ = mktime(0, 0, 0, $month, $day, $year);
    if ($date_ < getSettingValue("begin_bookings"))
        $date_ = getSettingValue("begin_bookings");
    else if ($date_ > getSettingValue("end_bookings"))
        $date_ = getSettingValue("end_bookings");
    $day   = date("d",$date_);
    $month = date("m",$date_);
    $year  = date("Y",$date_);
?>

   <table width="100%" border="0">
    <tr>
      <td class="border_banner">
       <table width="100%" border="0">
        <tr>
        <?php
        $nom_picture = "./images/".getSettingValue("logo");
        if ((getSettingValue("logo")!='') and (@file_exists($nom_picture)))
         echo "<td class=\"banner\"><img src=\"".$nom_picture."\" class=\"image\" alt=\"logo\" /></td>\n";
         echo "<td class=\"banner\">\n";
          echo "&nbsp;<a href=\"".page_accueil('yes')."day=$day&amp;year=$year&amp;month=$month\">".get_vocab("welcome")."</a>";
          echo " - <b>".getSettingValue("company")."</b>";
          if ($type_session == 'no_session') {
            if ((getSettingValue('sso_statut') == 'cas_visiteur') or (getSettingValue('sso_statut') == 'cas_utilisateur'))
					  {
					    echo "<br />&nbsp;<a href='index.php?force_authentification=y'>".get_vocab("authentification")."</a>";
//					    echo "<br />&nbsp;<small><i><a href='login.php?url=".rawurlencode(str_replace('&amp;','&',get_request_uri()))."'>".get_vocab("connect_local")."</a></i></small>";
//.........这里部分代码省略.........
开发者ID:rhertzog,项目名称:lcs,代码行数:101,代码来源:functions.inc.php

示例15: list

             }
             // Cas de PHP4 en mode CGI sur IIS
         } else {
             if (isset($_SERVER['HTTP_AUTHORIZATION']) && !empty($_SERVER['HTTP_AUTHORIZATION'])) {
                 list($login, $pw) = explode(':', base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6)));
             } else {
                 // on demande de s'identifier
                 // A ce stade :
                 // - soit l'utilisateur ne s'est pas encore identifié
                 // - soit l'utilisateur s'est identifié mais de façon incorrecte
                 // - soit l'utilisateur s'est identifié de façon correcte mais l'identifiant n'a pas pu être récupéré.
                 $my_message = "Module d'authentification de GRR";
                 header('WWW-Authenticate: Basic realm="' . $my_message . '"');
                 header('HTTP/1.0 401 Unauthorized');
                 // en cas d'annulation
                 echo begin_page(get_vocab("mrbs"), "no_session");
                 echo "<h3>" . get_vocab("wrong_pwd") . "</h3>";
                 echo "<h3>" . get_vocab("connexion_a_grr_non_autorisee") . "</h3>";
                 echo "</body></html>";
                 exit;
             }
         }
     }
 }
 // A ce stade, l'utilisateur est authentifié et $login n'est pas vide via le serveur apache
 $user_ext_authentifie = 'apache';
 $password = '';
 $result = grr_opensession($login, $password, $user_ext_authentifie);
 // On écrit les données de session et ferme la session
 session_write_close();
 $message = '';
开发者ID:Sirlefou1,项目名称:GRR2,代码行数:31,代码来源:index.php


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