예제 #1
0
//
// This program 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 this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
// ----------------------------------------------------------------------------
require_once "include/webpage.php";
// Adding a new page in 4 stages
// ###
// 1. First of all, chose a title (in english) for the new page, just one word if possible. The current titles are today (May 2003): Home, FAQ, Download.
// Place your title in the following line:
$aWebPage = new webPage("titleOfMyPage", "{$Date}: 2005/05/14 01:32:06 \$");
// if you need to add a new stylesheet - say newStyleSheet.css - please, place it in the directory "styles"
// You will replace the previous php line by:
// $aStyle[0]="newStyleSheet.css";
// $aWebPage=new webPage("titleOfMyPage", "$Date: 2005/05/14 01:32:06 $", $aStyle);
// ###
// 2. Updating the title of the page and the navigation bar
// Update the file htm/title.htm with your new title. Exactly the same title that you previously supplied in stage 1
// If possible, inform the translaters so that e.g. htm/title-fr.htm be updated too.
// ###
// 3. The content (the information) of your page is included in a file written in xhtml
// Well, this is not a complete html file (with doctype, head, body) since the structure is built by the webpage class.
// The html files are stored in directory htm
// You will find as example
// - A one row layout: htm/skeleton1.htm
// - A two rows layout: the first div (main) is on the left and takes 70% of the width, the second div is named (sidebar).
예제 #2
0
<?php

/**
 * Created by PhpStorm.
 * User: corentinfievet
 * Date: 21/12/15
 * Time: 11:35
 */
require_once "config/config_base.php";
require_once "inc/autoload.function.php";
$p = new webPage('Accueil');
$p->appendCssUrl('css/index.css');
$p->appendBootstrap('../bootstrap');
$p->appendContent(<<<HTML
        
        <div id="carousel-news" class="carousel slide" data-ride="carousel">
            <ol class="carousel-indicators">
                <li data-target="#carousel-news" data-slide-to="0" class="active"></li>
                <li data-target="#carousel-news" data-slide-to="1"></li>
                <li data-target="#carousel-news" data-slide-to="2"></li>
            </ol>

            <div class="carousel-inner" role="listbox">
                <div class="item active">
                    <img class="image-car" src="ressources/images/news1.jpg" alt="news1" height="500" width="500">
                    <div class="carousel-caption">
                        Première news
                    </div>
                </div>
                <div class="item">
                    <img class="image-car" src="ressources/images/news2.jpg" alt="news2" height="500" width="500">
예제 #3
0
        foreach ($aMenu as $j => $queryString) {
            if ($queryString == $aPage) {
                $aIndex = $i;
                break;
            }
        }
        if (isset($aIndex)) {
            break;
        }
    }
    $aSeparator = "";
    if (!isset($aIndex)) {
        $a_buffer .= $aPage;
    } else {
        $aMenu = $Menu[$aIndex];
        foreach ($aMenu as $i => $queryString) {
            if ($queryString == $aPage) {
                $a_buffer .= "{$aSeparator} {$i}";
            } else {
                $a_buffer .= "{$aSeparator} <a href=\"{$ScriptUrl}?{$queryString}\">{$i}</a>";
            }
            $aSeparator = "|";
        }
    }
}
$a_buffer .= "</div>\n";
$a_buffer .= ob_get_contents();
ob_end_clean();
//phpInfo();
$aWebPage = new webPage("Translation", "{$Date}: 2004/09/28 21:48:40 \$", $aStyle);
$aWebPage->printBuffer($a_buffer);
예제 #4
0
// ----------------------------------------------------------------------------
// accessibility.php
// $Id: accessibility.php,v 1.1 2004/09/28 21:48:39 gcasse Exp $
// $Author: gcasse $
// Description: How creating a new web page
// $Date: 2004/09/28 21:48:39 $ |
// $Revision: 1.1 $ |
// Copyright (C) 2003 Gilles Casse (gcasse@oralux.org)
//
// This program 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 2
// of the License, or (at your option) any later version.
//
// This program 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 this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
// ----------------------------------------------------------------------------
require_once "include/webpage.php";
// Warning:
// This page named "Accessibility" is reachable via the footer of any page.
// This is a "subentry" which is not reachable via the navigation bar.
$aStyle[0] = "faq.css";
$aWebPage = new webPage("Accessibility", "{$Date}: 2004/09/28 21:48:39 \$", $aStyle);
// Printing the web page
$aWebPage->printTag("htm/accessibility.htm");
예제 #5
0
<?php

// ----------------------------------------------------------------------------
// faq.php
// $Id: faq-pt-br.php,v 1.1 2006/05/06 20:59:10 gcasse Exp $
// $Author: gcasse $
// Description: Frequently asked questions
// $Date: 2006/05/06 20:59:10 $ |
// $Revision: 1.1 $ |
// Copyright (C) 2003 Gilles Casse (gcasse@oralux.org)
//
// This program 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 2
// of the License, or (at your option) any later version.
//
// This program 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 this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
// ----------------------------------------------------------------------------
require_once "include/webpage.php";
require_once "include/tools.php";
$aStyle[0] = "faq.css";
$aWebPage = new webPage("FAQ", "{$Date}: 2006/05/06 20:59:10 \$", $aStyle, "pt-br");
// Printing the web page
$aWebPage->printTag("htm/faq.htm");
예제 #6
0
// ----------------------------------------------------------------------------
// index.php
// $Id: index.php,v 1.1 2005/05/14 01:32:06 gcasse Exp $
// $Author: gcasse $
// Description: homepage
// $Date: 2005/05/14 01:32:06 $ |
// $Revision: 1.1 $ |
// Copyright (C) 2003 Gilles Casse (gcasse@oralux.org)
//
// This program 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 2
// of the License, or (at your option) any later version.
//
// This program 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 this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
// ----------------------------------------------------------------------------
require_once "include/webpage.php";
#require_once("prepend.php");
$aStyle[0] = "home.css";
$aWebPage = new webPage("mcvox", "{$Date}: 2005/05/14 01:32:06 \$", $aStyle);
// Printing the web page
$aWebPage->printTag("htm/index.htm");
echo "{$BASE}";
예제 #7
0
// $Revision: 1.1 $ |
// Copyright (C) 2003 Gilles Casse (gcasse@oralux.org)
//
// This program 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 2
// of the License, or (at your option) any later version.
//
// This program 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 this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
// ----------------------------------------------------------------------------
// if the user select a language, then mylang will be found in the query string
// e.g. preferences.php?mylang=fr
session_start();
// first line, because it sends the http header
if (isset($_POST["mylang"])) {
    // e.g. if the posted variable mylang = en
    // then "en" is stored in the session variable $mylang
    $_SESSION['mylang'] = $_POST["mylang"];
}
// To be placed after the previous lines
require_once "include/webpage.php";
$aWebPage = new webPage("Preferences", "{$Date}: 2004/09/28 21:48:39 \$");
// Printing the web page
$aWebPage->printTag("htm/preferences.htm");
예제 #8
0
<?php

// ----------------------------------------------------------------------------
// translation.php
// $Id: translation.php,v 1.1 2004/09/28 21:48:39 gcasse Exp $
// $Author: gcasse $
// Description: How creating a new web page
// $Date: 2004/09/28 21:48:39 $ |
// $Revision: 1.1 $ |
// Copyright (C) 2003 Gilles Casse (gcasse@oralux.org)
//
// This program 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 2
// of the License, or (at your option) any later version.
//
// This program 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 this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
// ----------------------------------------------------------------------------
require_once "include/webpage.php";
$aWebPage = new webPage("Translation", "{$Date}: 2004/09/28 21:48:39 \$");
$aWebPage->printTag("htm/translation.htm");
예제 #9
0
<?php

// ----------------------------------------------------------------------------
// about.php
// $Id: about.php,v 1.1 2004/09/28 21:48:40 gcasse Exp $
// $Author: gcasse $
// Description: About Oralux
// $Date: 2004/09/28 21:48:40 $ |
// $Revision: 1.1 $ |
// Copyright (C) 2003 Gilles Casse (gcasse@oralux.org)
//
// This program 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 2
// of the License, or (at your option) any later version.
//
// This program 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 this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
// ----------------------------------------------------------------------------
require_once "include/webpage.php";
require_once "include/tools.php";
$aWebPage = new webPage("About", "{$Date}: 2004/09/28 21:48:40 \$");
// Printing the web page
$aWebPage->printTag("htm/about.htm");
예제 #10
0
<?php

// ----------------------------------------------------------------------------
// download.php
// $Id: download.php,v 1.1 2004/09/28 21:48:39 gcasse Exp $
// $Author: gcasse $
// Description: Info to get the iso or the CD
// $Date: 2004/09/28 21:48:39 $ |
// $Revision: 1.1 $ |
// Copyright (C) 2003 Gilles Casse (gcasse@oralux.org)
//
// This program 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 2
// of the License, or (at your option) any later version.
//
// This program 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 this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
// ----------------------------------------------------------------------------
require_once "include/webpage.php";
require_once "include/tools.php";
$aWebPage = new webPage("Download", "{$Date}: 2004/09/28 21:48:39 \$");
// Printing the web page
$aWebPage->printTag("htm/download.htm");
예제 #11
0
class webPage implements Displayable
{
    function display()
    {
        echo "这个类实现了接口Displayable<br/>";
    }
}
class animation implements Displayable
{
    function display()
    {
        echo "这个类以另一种方式实现了接口Displayable<br/>";
    }
}
echo "<h1>接口的实现</h1>";
$homePage = new webPage();
$homeAnimation = new animation();
$homePage->display();
$homeAnimation->display();
echo '$homePage instanceof webPage -> ' . $homePage instanceof webPage . "<br/>";
echo '$homeAnimation instanceof webPage -> ' . $homeAnimation instanceof webPage . "<br/>";
echo '$homePage instanceof Displayable -> ' . $homePage instanceof Displayable . "<br/>";
echo "<h1>PHP的类型提示</h1>";
function check_hint(webPage $a)
{
    echo "这个函数传入了一个类型为webPage的类类型的参数<br/>";
}
//check_hint($homeAnimation);  Catchable fatal error: Argument 1 passed to check_hint() must be an instance of webPage, instance of animation given
class A
{
    public static function who()
예제 #12
0
<?php

// ----------------------------------------------------------------------------
// doc.php
// $Id: doc.php,v 1.1 2005/08/14 23:35:22 gcasse Exp $
// $Author: gcasse $
// Description: Frequently asked questions
// $Date: 2005/08/14 23:35:22 $ |
// $Revision: 1.1 $ |
// Copyright (C) 2003 Gilles Casse (gcasse@oralux.org)
//
// This program 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 2
// of the License, or (at your option) any later version.
//
// This program 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 this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
// ----------------------------------------------------------------------------
require_once "include/webpage.php";
require_once "include/tools.php";
$aStyle[0] = "doc.css";
$aWebPage = new webPage("Documents", "{$Date}: 2005/08/14 23:35:22 \$", $aStyle);
// Printing the web page
$aWebPage->printTag("htm/doc.htm");
예제 #13
0
<?php

// ----------------------------------------------------------------------------
// skeleton.php
// $Id: roadmap.php,v 1.1 2004/09/28 21:48:39 gcasse Exp $
// $Author: gcasse $
// Description: How creating a new web page
// $Date: 2004/09/28 21:48:39 $ |
// $Revision: 1.1 $ |
// Copyright (C) 2003 Gilles Casse (gcasse@oralux.org)
//
// This program 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 2
// of the License, or (at your option) any later version.
//
// This program 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 this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
// ----------------------------------------------------------------------------
require_once "include/webpage.php";
$aWebPage = new webPage("Roadmap", "{$Date}: 2004/09/28 21:48:39 \$");
$aWebPage->printTag("htm/roadmap.htm");
예제 #14
0
<?php

require_once '../inc/autoload.function.php';
$p = new webPage("Connexion");
$p->appendCssUrl('../css/index.css');
$p->appendBootstrap("../bootstrap");
if (isset($_GET['err'])) {
    $p->appendContent(<<<HTML
\t\t\t<div class="alert alert-danger" role="alert"><b>Mots de passe ou identifiant incorrect</b></div>
HTML
);
}
$p->appendContent(Utilisateur::loginForm('../front/Authentification.php'));
echo $p->toHTML();