root/trunk/wifidog-auth/wifidog/content/PatternLanguage/index.php @ 866

Revision 866, 4.9 KB (checked in by max-horvath, 7 years ago)

2005-12-26 Max Horvath <max.horvath@…>

  • added new headers to every source file
  • converted file to represent a tab as four (4) spaces
  • added PhpDocumentor? documentation
  • added WiFiDog skin to HTMLeditor
  • language selection in a content class now shows the language name instead of the language code
  • added caching support to content classes Langstring and TrivialLangstring?
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1<?php
2
3/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
4
5// +-------------------------------------------------------------------+
6// | WiFiDog Authentication Server                                     |
7// | =============================                                     |
8// |                                                                   |
9// | The WiFiDog Authentication Server is part of the WiFiDog captive  |
10// | portal suite.                                                     |
11// +-------------------------------------------------------------------+
12// | PHP version 5 required.                                           |
13// +-------------------------------------------------------------------+
14// | Homepage:     http://www.wifidog.org/                             |
15// | Source Forge: http://sourceforge.net/projects/wifidog/            |
16// +-------------------------------------------------------------------+
17// | This program is free software; you can redistribute it and/or     |
18// | modify it under the terms of the GNU General Public License as    |
19// | published by the Free Software Foundation; either version 2 of    |
20// | the License, or (at your option) any later version.               |
21// |                                                                   |
22// | This program is distributed in the hope that it will be useful,   |
23// | but WITHOUT ANY WARRANTY; without even the implied warranty of    |
24// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the     |
25// | GNU General Public License for more details.                      |
26// |                                                                   |
27// | You should have received a copy of the GNU General Public License |
28// | along with this program; if not, contact:                         |
29// |                                                                   |
30// | Free Software Foundation           Voice:  +1-617-542-5942        |
31// | 59 Temple Place - Suite 330        Fax:    +1-617-542-2652        |
32// | Boston, MA  02111-1307,  USA       gnu@gnu.org                    |
33// |                                                                   |
34// +-------------------------------------------------------------------+
35
36/**
37 * @package    WiFiDogAuthServer
38 * @author     Francois Proulx <francois.proulx@gmail.com>
39 * @copyright  2005 Francois Proulx <francois.proulx@gmail.com> - Technologies
40 * Coeus inc.
41 * @version    CVS: $Id$
42 * @link       http://sourceforge.net/projects/wifidog/
43 */
44
45/**
46 * @ignore
47 */
48define('BASEPATH', '../../');
49
50require_once BASEPATH.'include/common.php';
51require_once BASEPATH.'include/common_interface.php';
52require_once BASEPATH.'classes/MainUI.php';
53require_once BASEPATH.'classes/Content/PatternLanguage.php';
54
55// This trick is done to allow displaying of Pattern Language right away if there is only one available.
56if(!empty($_REQUEST['content_id']))
57{
58    $content_id = $_REQUEST['content_id'];
59    $pattern_language = PatternLanguage::getObject($content_id);
60}
61else
62{
63    $content_id = "";
64    $pattern_languages = PatternLanguage :: getAllContent();
65    if(count($pattern_languages) >= 1)
66        $pattern_language = $pattern_languages[0];
67    else
68        exit;
69}
70
71// The Pattern Language toolbar
72$tool_html = "<h1>{$pattern_language->getTitle()->__toString()}</h1>";
73$tool_html .= '<ul class="pattern_language_menu">'."\n";
74$gw_id = $session->get(SESS_GW_ID_VAR);
75if(!empty($gw_id))
76    $tool_html .= "<li><a href='/portal/?gw_id=$gw_id'>"._("Go back to this hotspot portal page")."</a></li>";
77$tool_html .= '<li><a href="'.BASE_SSL_PATH.'content/PatternLanguage/index.php?content_id='.$content_id.'">'._("About Pattern Language").'</a><br>'."\n";
78$tool_html .= '<li><a href="'.BASE_SSL_PATH.'content/PatternLanguage/narrative.php?content_id='.$content_id.'">'._("Read narrative").'</a><br>'."\n";
79$tool_html .= '<li><a href="'.BASE_SSL_PATH.'content/PatternLanguage/archives.php?content_id='.$content_id.'">'._("Archives").'</a><br>'."\n";
80$tool_html .= '<li><a href="'.BASE_SSL_PATH.'content/PatternLanguage/hotspots.php?content_id='.$content_id.'">'._("Participating hotspots").'</a><br>'."\n";
81$tool_html .= '<li><a href="'.BASE_SSL_PATH.'content/PatternLanguage/subscription.php?content_id='.$content_id.'">'._("Subscription").'</a><br>'."\n";
82$tool_html .= '</ul>'."\n";
83
84$tool_html .= "<div class='pattern_language_credits'>";
85$tool_html .=  $pattern_language->getSponsorInfo()->__toString();
86$tool_html .= "</div>";
87
88// Body
89$body_html = "<img src='header.gif'>\n";
90$body_html .= "<h1>"._("About Pattern Language")."</h1>";
91$body_html .= "<div class='pattern_language_body'>";
92$body_html .= $pattern_language->getLongDescription()->__toString();
93$body_html .= "</div>";
94
95
96$ui=new MainUI();
97$ui->setToolContent($tool_html);
98$ui->setTitle(_("Pattern Language - About"));
99$ui->setMainContent($body_html);
100$ui->display();
101
102/*
103 * Local variables:
104 * tab-width: 4
105 * c-basic-offset: 4
106 * c-hanging-comment-ender-p: nil
107 * End:
108 */
109
110?>
Note: See TracBrowser for help on using the browser.