Added.
authorPekka Riikonen <priikone@silcnet.org>
Wed, 8 Aug 2001 19:52:45 +0000 (19:52 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Wed, 8 Aug 2001 19:52:45 +0000 (19:52 +0000)
scripts/silcdoc/gen_detail.php [new file with mode: 0644]
scripts/silcdoc/gen_toc.php [new file with mode: 0644]
scripts/silcdoc/index.php [new file with mode: 0644]

diff --git a/scripts/silcdoc/gen_detail.php b/scripts/silcdoc/gen_detail.php
new file mode 100644 (file)
index 0000000..4cf6e75
--- /dev/null
@@ -0,0 +1,61 @@
+<?php
+/*
+
+  Author: Pekka Riikonen <priikone@silcnet.org>
+
+  Copyright (C) 2001 Pekka Riikonen
+
+  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.
+
+  This is the detailed page generator. This generates the actual data
+  that is shown plus index at the right side. 
+
+*/
+?>
+
+<div align="center">
+<table cellpadding=2 cellspacing=0 border=0 width="99%" align=center>
+<tr>
+<td valign=top>
+<font face="Helvetica,Arial,Sans-serif" size="+1">
+
+<?php
+/* Get the actual data for the page */
+if (Is_Readable($page.".html"))
+  require $page.".html";
+?>
+
+</font>
+</td>
+
+<td>
+<table bgcolor="#dddddd" cellpadding=2 cellspacing=0 border=0 
+width="99%" align=center>
+<tr><td>
+<font face="Helvetica,Arial,Sans-serif" size="1">
+
+<?php
+/* Get the index for this page */
+$len = strcspn($page, "_");
+$fname = substr($page, 0, $len);
+if (Is_Readable($fname."_index.html"))
+  require $fname."_index.html";
+eit
+?>
+
+</font>
+</td></tr>
+</table>
+</td>
+
+</tr>
+</table>
+</div>
diff --git a/scripts/silcdoc/gen_toc.php b/scripts/silcdoc/gen_toc.php
new file mode 100644 (file)
index 0000000..d91d0c0
--- /dev/null
@@ -0,0 +1,39 @@
+<?php
+/*
+
+  Author: Pekka Riikonen <priikone@silcnet.org>
+
+  Copyright (C) 2001 Pekka Riikonen
+
+  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.
+
+  This generates the TOC for a specific section.
+
+*/
+?>
+
+<div align="center">
+<table cellpadding=2 cellspacing=0 border=0 width="99%" align=center>
+<tr>
+<td>
+<font face="Helvetica,Arial,Sans-serif" size="+1">
+
+<?php
+/* Get the actual data for the page */
+if (Is_Readable($page.".html"))
+  require $page.".html";
+?>
+
+</font>
+</td>
+</tr>
+</table>
+</div>
diff --git a/scripts/silcdoc/index.php b/scripts/silcdoc/index.php
new file mode 100644 (file)
index 0000000..8842dd5
--- /dev/null
@@ -0,0 +1,82 @@
+<?php
+
+// directories where SILC documents are located
+$DocRoot = "/home/www/silcnet.org/d/";
+$HTMLRoot = $DocRoot;
+
+// remove dangerous characters, only alphanumerical characters are passed
+$SecurityFilter = $HTMLRoot.EReg_Replace('([^a-zA-Z0-9_.])*','',$page);
+
+?>
+
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-a" />
+ <meta http-equiv="Content-Language" content="en" />
+ <meta name="description" content="SILC Secure Internet Live Conferencing" />
+ <meta name="keywords" content="SILC, secure, chat, protocol, cipher, encrypt, SKE" />
+ <meta content="INDEX, FOLLOW" name="ROBOTS" />
+ <style type="text/css">
+  <!--
+  body { color: #000000; background: #bbbbbb; font-family: Helvetica, Arial, Sans-serif; }
+  a:link { text-decoration: none; color: #2f486f; }
+  a:visited { text-decoration: none;color: #2f486f; }
+  a:active { text-decoration: none; color: #2f486f; }
+  -->
+ </style>
+
+ <title> SILC Secure Internet Live Conferencing - 
+<?php
+
+if (Is_Readable($SecurityFilter.".php"))
+  echo $page;
+else
+  echo "news";
+
+?>
+ </title>
+
+</head>
+
+<body bgcolor="#aaaaaa" text="#000000" link="#2f486f" alink="#2f486f" vlink="#2f486f">
+
+<br />
+<div align="center">
+<table width="800" bgcolor="#000000" cellpadding="1" cellspacing="0" border="0">
+ <tr>
+  <td>
+    <table width="100%" bgcolor="#ffffff" cellpadding="0" cellspacing="0" border="0">
+     <tr>
+      <td bgcolor="#e2e2e2">
+        <br /><a href="index.php?page=news"><img src="img/silc.gif" width="700" height="100" alt=" SILC Secure Internet Live Conferencing " border="0" /></a>
+      </td>
+     </tr>
+     <tr><td bgcolor="#000000" height="1"></td></tr>
+     <tr>
+      <td>
+        <table width="100%" bgcolor="#e2e2e2" cellpadding="10" cellspacing="0" border="0">
+        <tr><td><font face="Helvetica,Arial,Sans-serif">
+<?php
+// read document, if it is not valid then read opening page
+if (Is_Readable($SecurityFilter))
+  require $SecurityFilter;
+else
+  require $HTMLRoot."news.php";
+?>
+           </font>
+          </td>
+         </tr>
+        </table>
+      </td>
+     </tr>
+    </table>
+  </td>
+ </tr>
+</table>
+</font>
+</div>
+
+</body>
+</html>