Changed indentation
Using constants for pages git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@20 3873ddee-7413-0410-b6c4-c2c57c1ab35a
This commit is contained in:
parent
280f7dd971
commit
bddbb84cc0
1 changed files with 49 additions and 51 deletions
|
@ -29,28 +29,35 @@ $_SESSION['debug'] = $debug;
|
||||||
|
|
||||||
// pages information; should be in a database
|
// pages information; should be in a database
|
||||||
|
|
||||||
|
|
||||||
|
define('HOME', 0);
|
||||||
|
define('USAGE', 1);
|
||||||
|
define('PROTOCOL',2);
|
||||||
|
define('ROUTER', 3);
|
||||||
|
define('XML', 4);
|
||||||
|
|
||||||
// main
|
// main
|
||||||
$pages[0]['nr'] = 0;
|
$pages[HOME]['nr'] = HOME;
|
||||||
$pages[0]['title'] = "home";
|
$pages[HOME]['title'] = "home";
|
||||||
$pages[0]['php'] = "home.php";
|
$pages[HOME]['php'] = "home.php";
|
||||||
|
|
||||||
// documentation
|
// documentation
|
||||||
$pages[1]['nr'] = 1;
|
$pages[USAGE]['nr'] = USAGE;
|
||||||
$pages[1]['title'] = "usage";
|
$pages[USAGE]['title'] = "usage";
|
||||||
$pages[1]['php'] = "doc.php";
|
$pages[USAGE]['php'] = "doc.php";
|
||||||
|
|
||||||
$pages[2]['nr'] = 2;
|
$pages[PROTOCOL]['nr'] = PROTOCOL;
|
||||||
$pages[2]['title'] = "supported protocols";
|
$pages[PROTOCOL]['title'] = "supported protocols";
|
||||||
$pages[2]['php'] = "protocol.php";
|
$pages[PROTOCOL]['php'] = "protocol.php";
|
||||||
|
|
||||||
$pages[3]['nr'] = 3;
|
$pages[ROUTER]['nr'] = ROUTER;
|
||||||
$pages[3]['title'] = "supported routers";
|
$pages[ROUTER]['title'] = "supported routers";
|
||||||
$pages[3]['php'] = "router.php";
|
$pages[ROUTER]['php'] = "router.php";
|
||||||
|
|
||||||
if ($debug) {
|
if ($debug) {
|
||||||
$pages[4]['nr'] = 4;
|
$pages[XML]['nr'] = XML;
|
||||||
$pages[4]['title'] = "xml";
|
$pages[XML]['title'] = "xml";
|
||||||
$pages[4]['php'] = "xml.php";
|
$pages[XML]['php'] = "xml.php";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -96,21 +103,12 @@ require($pages[$page]['php']);
|
||||||
|
|
||||||
<div class="subHeader">
|
<div class="subHeader">
|
||||||
<span class="doNotDisplay">Navigation:</span>
|
<span class="doNotDisplay">Navigation:</span>
|
||||||
<!--
|
|
||||||
<a href="./index.php?page=home" <?php if ($page==0) printf("class=\"highlight\"");?>>home</a> |
|
|
||||||
<a href="./index.php?page=doc" <?php if ($page==1) printf("class=\"highlight\"");?>>documentation</a> |
|
|
||||||
<a href="./index.php">download</a> |
|
|
||||||
<a href="./index.php">Links</a> |
|
|
||||||
-->
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$cnt=0;
|
$cnt=0;
|
||||||
foreach ($pages as $id => $subpage) {
|
foreach ($pages as $id => $subpage) {
|
||||||
if ($cnt++) printf(" | ");
|
if ($cnt++) printf(" | ");
|
||||||
printf("<a href=\"./index.php?page=%s\"%s>%s</a>",
|
printf("<a href=\"./?page=%s\"%s>%s</a>",
|
||||||
$subpage['nr'],
|
$subpage['nr'],
|
||||||
// $id,
|
|
||||||
// $subpage['title'],
|
|
||||||
$page==$subpage['nr']?' class="highlight"':"",
|
$page==$subpage['nr']?' class="highlight"':"",
|
||||||
$subpage['title']
|
$subpage['title']
|
||||||
);
|
);
|
||||||
|
@ -128,7 +126,7 @@ foreach ($pages as $id => $subpage) {
|
||||||
<ul>
|
<ul>
|
||||||
<?php
|
<?php
|
||||||
foreach ($main as $id => $text) {
|
foreach ($main as $id => $text) {
|
||||||
printf("<li><a href=\"#%s\" title=\"%s\">› %s</a></li>",
|
printf("<li><a href=\"#%s\" title=\"%s\">› %s</a></li>\n",
|
||||||
$text['id'],
|
$text['id'],
|
||||||
$text['title'],
|
$text['title'],
|
||||||
$text['menu']
|
$text['menu']
|
||||||
|
|
Loading…
Reference in a new issue