diff --git a/config.php b/config.php
index 95314e6..e2d790d 100644
--- a/config.php
+++ b/config.php
@@ -60,7 +60,14 @@
//
// The CSS file to load to style the wiki, relative to BASE_URI
-define('CSS_FILE', 'index.css');
+define('CSS_FILE', 'styles/original.css');
+
+// Templates
+//
+// The template file to load, should match css, relative to BASE_URI
+
+define('TEMPLATE', 'templates/original.php');
+
// --------------------
// File upload settings
@@ -163,4 +170,28 @@
define('W2_SESSION_NAME', 'W2');
-?>
+
+// -----------------------------
+// Locale and encoding settings
+// -----------------------------
+
+// W2_CHARSET
+//
+// Value for meta charset.
+
+define('W2_CHARSET', 'UTF-8');
+
+// W2_LOCALE
+//
+// Name for locale.
+
+define('W2_LOCALE', 'en');
+
+// -----------------------------
+// Navigation menu
+// -----------------------------
+//
+// Optional navigation menu and its content file
+
+define('NAVMENU', true);
+define('NAVMENU_FILE', PAGES_PATH . '/Menu.txt');
diff --git a/index.css b/index.css
deleted file mode 100644
index 4443f61..0000000
--- a/index.css
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * W2
- *
- * Copyright (C) 2007-2011 Steven Frank
- *
- * Code may be re-used as long as the above copyright notice is retained.
- * See README.txt for full details.
- *
- * Written with Coda:
- *
- */
-
-* {
- font-family: Helvetica, sans-serif;
- font-size: 13px;
- margin: 0;
- padding: 0;
-}
-
-blockquote {
- background-color: #f0f8f0;
- margin: 0px 0px 12px 20px;
- padding-top: 4px 10px 4px 10px;
-}
-
-form {
- display: inline;
-}
-
-li {
- line-height: 1.5em;
-}
-
-h1 {
- font-size: 20px;
- font-weight: bold;
- margin-bottom: 8px;
-}
-
-h2 {
- font-size: 16px;
- font-weight: bold;
- margin-bottom: 8px;
-}
-
-h3 {
- font-size: 13px;
- font-weight: bold;
- margin-bottom: 8px;
-}
-
-hr {
- border-top: 1px solid #cccccc;
- border-bottom: 0;
- border-left: 0;
- border-right: 0;
- margin-top: 12px;
- margin-bottom: 12px;
-}
-
-ul {
- padding-left: 12px;
- margin-left: 12px;
- margin-bottom: 12px;
- list-style-position: inside;
-}
-
-ol {
- margin-left: 12px;
- margin-bottom: 12px;
- padding-left: 12px;
- list-style-position: inside;
-}
-
-p {
- margin: 12px 12px 12px 12px;
-}
-
-pre {
- font-family: Menlo, Courier, monospace;
- font-size: 11px;
- margin-left: 12px;
- margin-bottom: 12px;
-
- /* stroke each browser so that they wrap lines in the pre tag */
- white-space: pre-wrap; /* css-3 */
- white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
- white-space: -pre-wrap; /* Opera 4-6 */
- white-space: -o-pre-wrap; /* Opera 7 */
- word-wrap: break-word; /* Internet Explorer 5.5+ */
-}
-
-code {
- font-family: Menlo, Courier, monospace;
- font-size: 11px;
-}
-
-table {
- border-collapse: collapse;
-}
-
-table, td {
- padding: 2px;
-}
-
-textarea {
- font-family: Menlo, Courier, monospace;
- font-size: 11px;
- width: 99%;
- background-color: #ffffee;
-}
-
-.main {
- padding: 8px;
-}
-
-.note {
- background-color: #ffffcc;
- padding: 4px;
- margin: 0 8px 8px 8px;
- color: #666644;
- border: solid 1px #666644;
-}
-
-.titlebar {
- background-color: #222222;
- background: -webkit-gradient(linear, left top, left bottom, from(#555555), to(#000000));
- color: #ffffff;
- font-size: 18px;
- font-weight: bold;
- padding: 4px 4px 4px 12px;
-}
-
-.titledate {
- font-size: 10px;
- color: #999999;
-}
-
-.toolbar {
- background-color: #777777;
- background: -webkit-gradient(linear, left top, left bottom, from(#666666), to(#444444));
- font-size: 12px;
- padding: 4px 4px 4px 12px;
-}
-
-a.tool {
- font-size: 11px;
- margin-right: 8px;
- color: #eeeeee;
-}
-
-input.tool {
- font-size: 11px;
- color: #000000;
-}
-
-img {
- max-width: 100%;
- height: auto;
-}
diff --git a/index.php b/index.php
index 0737af9..fa246c9 100644
--- a/index.php
+++ b/index.php
@@ -26,6 +26,37 @@
include_once "config.php";
+// Localize functions
+
+include_once 'locales/' . W2_LOCALE . '.php';
+
+/**
+ * Get translated word
+ *
+ * String $label Key for locale word
+ * String $alt_word Alternative word
+ * return String
+ */
+function __( $label, $alt_word = null ){
+ global $w2_word_set;
+
+ if( empty($w2_word_set[$label]) ) {
+ return is_null($alt_word) ? $label : $alt_word;
+ }
+ return htmlspecialchars($w2_word_set[$label], ENT_QUOTES);
+}
+
+/**
+ * Echo translated word
+ *
+ * String $label Key for locale word
+ * String $alt_word Alternative word
+ */
+function _e( $label, $alt_word = null ){
+ echo __($label, $alt_word);
+}
+
+
ini_set('session.gc_maxlifetime', W2_SESSION_LIFETIME);
session_set_cookie_params(W2_SESSION_LIFETIME);
@@ -64,17 +95,18 @@
else
{
print "\n";
- print "\n";
+ print '' . "\n";
print "
\n";
+ print '' . "\n";
print "";
print "\n";
print "\n";
- print "Log In\n";
+ print '' . __('Log In') . '' . "\n";
print "\n";
print "";
+ print '';
print "";
exit;
}
@@ -82,30 +114,70 @@
// Support functions
-function printToolbar()
+function printHome()
{
global $upage, $page, $action;
+ print "". __(DEFAULT_PAGE) . "";
+}
- print "\n";
+ print "\n";
}
+function printNavmenu()
+{
+ global $upage, $page, $action;
+ if ( NAVMENU && $action == "view" )
+ {
+ if ( file_exists(NAVMENU_FILE) )
+ {
+ $menutext = file_get_contents(NAVMENU_FILE);
+ $menuhtml = toHTML($menutext);
+ print "\n";
+ }
+ }
+}
function descLengthSort($val_1, $val_2)
{
@@ -225,6 +297,7 @@ function file_put_contents($n, $d)
}
else
{
+ $text = '';
if ( $action != "save" && $action != "all_name" && $action != "all_date" && $action != "upload" && $action != "new" && $action != "logout" && $action != "uploaded" && $action != "search" && $action != "view" )
{
$action = "edit";
@@ -239,16 +312,16 @@ function file_put_contents($n, $d)
if ( $action == "edit" )
$html .= "\n";
else
- $html .= "Title:
\n";
+ $html .= '' . __('Title') . ':
' . "\n";
if ( $action == "new" )
$text = "";
- $html .= "\n";
+ $html .= "\n";
$html .= "";
- $html .= "\n";
- $html .= "
\n";
- $html .= "\n";
+ $html .= ''."\n";
+ $html .= ''."\n";
+ $html .= "\n";
}
else if ( $action == "logout" )
{
@@ -260,15 +333,15 @@ function file_put_contents($n, $d)
{
if ( DISABLE_UPLOADS )
{
- $html = "Image uploading has been disabled on this installation.
";
+ $html = '' . __('Image uploading has been disabled on this installation.') . '
';
}
else
{
$html = "\n";
}
}
@@ -293,12 +366,12 @@ function file_put_contents($n, $d)
}
else
{
- $html = "Upload error
\n";
+ $html = '' . __('Upload error') . '
'. "\n";
}
error_reporting($errLevel);
} else {
- $html = "Upload error: invalid file type
\n";
+ $html = '' . __('Upload error: invalid file type') . '
' . "\n";
}
}
@@ -306,14 +379,14 @@ function file_put_contents($n, $d)
}
else if ( $action == "save" )
{
- $newText = $_REQUEST['newText'];
+ $newText = stripslashes($_REQUEST['newText']);
$errLevel = error_reporting(0);
$success = file_put_contents($filename, $newText);
error_reporting($errLevel);
- if ( $success )
- $html = "Saved
\n";
+ if ( $success )
+ $html = "" . __('Saved') . "
\n";
else
$html = "Error saving changes! Make sure your web server has write access to " . PAGES_PATH . "
\n";
@@ -372,27 +445,26 @@ function file_put_contents($n, $d)
if ( $file{0} == "." )
continue;
- $afile = preg_replace("/(.*?)\.txt/", "\\1", $file);
- $efile = preg_replace("/(.*?)\.txt/", "edit", urlencode($file));
-
- array_push($filelist, "$afile | | $efile |
");
-
- if ( $color == "#ffffff" )
- $color = "#f4f4f4";
- else
- $color = "#ffffff";
+ array_push($filelist, $file);
}
closedir($dir);
natcasesort($filelist);
-
- $html = "";
+ $html = "";
- for ($i = 0; $i < count($filelist); $i++)
+ foreach ($filelist as $file)
{
- $html .= $filelist[$i];
+ $afile = preg_replace("/(.*?)\.txt/", "\\1", $file);
+ $efile = preg_replace("/(.*?)\.txt/", "" . __('Edit') . '', urlencode($file));
+
+ $html .= "$afile | | $efile |
";
+
+ if ( $color == "#ffffff" )
+ $color = "#f4f4f4";
+ else
+ $color = "#ffffff";
}
$html .= "
\n";
@@ -417,8 +489,11 @@ function file_put_contents($n, $d)
foreach ($filelist as $key => $value)
{
- $html .= "$key | | " . date(TITLE_DATE_NO_TIME, $value) . " |
\n";
-
+ $date_format = __('date_format', TITLE_DATE);
+ $html .= "$key | | "
+ . date( $date_format, $value)
+ . " |
\n";
+
if ( $color == "#ffffff" )
$color = "#f4f4f4";
else
@@ -430,7 +505,7 @@ function file_put_contents($n, $d)
{
$matches = 0;
$q = $_REQUEST['q'];
- $html = "Search: $q
\n\n";
+ $html = "".$q ."
\n\n";
if ( trim($q) != "" )
{
@@ -442,8 +517,8 @@ function file_put_contents($n, $d)
continue;
$text = file_get_contents(PAGES_PATH . "/$file");
-
- if ( preg_match("/{$q}/i", $text) || preg_match("/{$q}/i", $file) )
+
+ if ( preg_match("/{$q}/i", $text) || preg_match("/{$q}/i", $file) )
{
++$matches;
$file = preg_replace("/(.*?)\.txt/", "\\1", $file);
@@ -455,7 +530,7 @@ function file_put_contents($n, $d)
}
$html .= "
\n";
- $html .= "$matches matched
\n";
+ $html .= "$matches ". __('matched') ."
\n";
}
else
{
@@ -465,24 +540,24 @@ function file_put_contents($n, $d)
$datetime = '';
if ( ($action == "all_name") || ($action == "all_date"))
- $title = "All Pages";
+ $title = __('All');
else if ( $action == "upload" )
- $title = "Upload Image";
+ $title = __('Upload');
else if ( $action == "new" )
- $title = "New";
+ $title = __('New');
else if ( $action == "search" )
- $title = "Search";
+ $title = __('Search');
else
{
$title = $page;
-
- if ( TITLE_DATE )
+ $date_format = __('date_format', TITLE_DATE);
+ if ( $date_format )
{
- $datetime = "" . date(TITLE_DATE, @filemtime($filename)) . "";
+ $datetime = "" . date($date_format, @filemtime($filename)) . "";
}
}
@@ -492,25 +567,6 @@ function file_put_contents($n, $d)
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
-print "\n";
-print "\n";
-print "\n";
-print "";
-print "\n";
-
-print "\n";
-print "$title\n";
-print "\n";
-print "\n";
-print "$title $datetime
\n";
-
-printToolbar();
-
-print "\n";
-print "$html\n";
-print "
\n";
-
-print "\n";
-print "\n";
+include_once TEMPLATE;
?>
diff --git a/locales/en.php b/locales/en.php
new file mode 100644
index 0000000..45381ae
--- /dev/null
+++ b/locales/en.php
@@ -0,0 +1,34 @@
+ 'Home',
+ 'New' => 'New',
+ 'Edit' => 'Edit',
+ 'Upload' => 'Upload',
+ 'All' => 'All',
+ 'Recent' => 'Recent',
+ 'Exit' => 'Exit',
+ 'Search' => 'Search',
+ 'Save' => 'Save',
+ 'Cancel' => 'Cancel',
+ 'Saved' => 'Saved',
+ 'Log In' => 'Log In',
+ 'Title' => 'Title',
+ 'matched' => 'matched',
+ // Messages
+ 'Upload error' => 'Upload error',
+ 'Upload error: invalid file type' => 'Upload error: invalid file type',
+ 'Image uploading has been disabled on this installation.' => 'Image uploading has been disabled on this installation.',
+ // Override TITLE_DATE and TITLE_DATE_NO_TIME if set.
+ 'date_format' => 'Y-m-d H:i:s',
+ 'date_format_no_time' => 'Y-m-d',
+);
diff --git a/locales/fr.php b/locales/fr.php
new file mode 100644
index 0000000..7289b71
--- /dev/null
+++ b/locales/fr.php
@@ -0,0 +1,34 @@
+ 'Accueil',
+ 'New' => 'Nouveau',
+ 'Edit' => 'Éditer',
+ 'Upload' => 'Charger',
+ 'All' => 'Liste des pages',
+ 'Recent' => 'Changements récents',
+ 'Exit' => 'Quitter',
+ 'Search' => 'Recherche',
+ 'Save' => 'Sauvegarder',
+ 'Cancel' => 'Canceller',
+ 'Saved' => 'Sauvegardée',
+ 'Log In' => 'S\'identifier',
+ 'Title' => 'Titre',
+ 'matched' => 'résultats',
+ // Messages
+ 'Upload error' => 'Erreur de chargement',
+ 'Upload error: invalid file type' => 'Erreur de chargement: Type de fichier invalide',
+ 'Image uploading has been disabled on this installation.' => 'Le chargement d\'image est déactivé.',
+ // Override TITLE_DATE and TITLE_DATE_NO_TIME if set.
+ 'date_format' => 'Y-m-d H:i:s',
+ 'date_format_no_time' => 'Y-m-d',
+);
diff --git a/locales/ja.php b/locales/ja.php
new file mode 100644
index 0000000..d151a4b
--- /dev/null
+++ b/locales/ja.php
@@ -0,0 +1,33 @@
+ 'ホーム',
+ 'New' => '新規',
+ 'Edit' => '編集',
+ 'Upload' => 'アップロード',
+ 'All' => '全て',
+ 'Recent' => '最近',
+ 'Exit' => 'ログアウト',
+ 'Search' => '検索',
+ 'Save' => '保存',
+ 'Cancel' => 'キャンセル',
+ 'Saved' => '保存しました',
+ 'Log In' => 'ログイン',
+ 'Title' => 'ページタイトル',
+ // Messages
+ 'Upload error' => 'アップロードエラー',
+ 'Upload error: invalid file type' => 'アップロードエラー:不正なファイル形式です',
+ 'Image uploading has been disabled on this installation.' => '画像アップロードは許可されていません。',
+ // Override TITLE_DATE and TITLE_DATE_NO_TIME if set.
+ 'date_format' => 'Y-m-d H:i:s',
+ 'date_format_no_time' => 'Y-m-d',
+);
diff --git a/locales/sample.php b/locales/sample.php
new file mode 100644
index 0000000..6e57af8
--- /dev/null
+++ b/locales/sample.php
@@ -0,0 +1,34 @@
+ 'Home',
+ 'New' => 'New',
+ 'Edit' => 'Edit',
+ 'Upload' => 'Upload',
+ 'All' => 'All',
+ 'Recent' => 'Recent',
+ 'Exit' => 'Exit',
+ 'Search' => 'Search',
+ 'Save' => 'Save',
+ 'Cancel' => 'Cancel',
+ 'Saved' => 'Saved',
+ 'Log In' => 'Log In',
+ 'Title' => 'Title',
+ 'matched' => 'matched',
+ // Messages
+ 'Upload error' => 'Upload error',
+ 'Upload error: invalid file type' => 'Upload error: invalid file type',
+ 'Image uploading has been disabled on this installation.' => 'Image uploading has been disabled on this installation.',
+ // Override TITLE_DATE and TITLE_DATE_NO_TIME if set.
+ 'date_format' => 'Y-m-d H:i:s',
+ 'date_format_no_time' => 'Y-m-d',
+);
diff --git a/pages/Menu.txt b/pages/Menu.txt
new file mode 100644
index 0000000..cde64bc
--- /dev/null
+++ b/pages/Menu.txt
@@ -0,0 +1,6 @@
+### Main pages
+
+[[Home]]
+[[Markdown Syntax]]
+
+
diff --git a/styles/original.css b/styles/original.css
new file mode 100644
index 0000000..7e86575
--- /dev/null
+++ b/styles/original.css
@@ -0,0 +1,185 @@
+/*
+ * W2
+ *
+ * Copyright (C) 2007-2011 Steven Frank
+ *
+ * Code may be re-used as long as the above copyright notice is retained.
+ * See README.txt for full details.
+ *
+ * Written with Coda:
+ *
+ */
+
+* {
+ font-family: Helvetica, sans-serif;
+ font-size: 13px;
+ margin: 0;
+ padding: 0;
+}
+
+blockquote {
+ background-color: #f0f8f0;
+ margin: 0px 0px 12px 20px;
+ padding-top: 4px 10px 4px 10px;
+}
+
+form {
+ display: inline;
+}
+
+li {
+ line-height: 1.5em;
+}
+
+h1 {
+ font-size: 20px;
+ font-weight: bold;
+ margin-bottom: 8px;
+}
+
+h2 {
+ font-size: 16px;
+ font-weight: bold;
+ margin-bottom: 8px;
+}
+
+h3 {
+ font-size: 13px;
+ font-weight: bold;
+ margin-bottom: 8px;
+}
+
+hr {
+ border-top: 1px solid #cccccc;
+ border-bottom: 0;
+ border-left: 0;
+ border-right: 0;
+ margin-top: 12px;
+ margin-bottom: 12px;
+}
+
+ul {
+ padding-left: 12px;
+ margin-left: 12px;
+ margin-bottom: 12px;
+ list-style-position: inside;
+}
+
+ol {
+ margin-left: 12px;
+ margin-bottom: 12px;
+ padding-left: 12px;
+ list-style-position: inside;
+}
+
+p {
+ margin: 12px 12px 12px 12px;
+}
+
+pre {
+ font-family: Menlo, Courier, monospace;
+ font-size: 11px;
+ margin-left: 12px;
+ margin-bottom: 12px;
+
+ /* stroke each browser so that they wrap lines in the pre tag */
+ white-space: pre-wrap; /* css-3 */
+ white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
+ white-space: -pre-wrap; /* Opera 4-6 */
+ white-space: -o-pre-wrap; /* Opera 7 */
+ word-wrap: break-word; /* Internet Explorer 5.5+ */
+}
+
+code {
+ font-family: Menlo, Courier, monospace;
+ font-size: 11px;
+}
+
+table {
+ border-collapse: collapse;
+}
+
+table, td {
+ padding: 2px;
+}
+
+textarea {
+ font-family: Menlo, Courier, monospace;
+ font-size: 11px;
+ width: 99%;
+ background-color: #ffffee;
+}
+
+.main {
+ display: table-cell;
+ vertical-align: top;
+ padding: 8px;
+}
+
+.note {
+ background-color: #ffffcc;
+ padding: 4px;
+ margin: 0 8px 8px 8px;
+ color: #666644;
+ border: solid 1px #666644;
+}
+
+.titlebar {
+ background-color: #222222;
+ background: -webkit-gradient(linear, left top, left bottom, from(#555555), to(#000000));
+ color: #ffffff;
+ font-size: 18px;
+ font-weight: bold;
+ padding: 4px 4px 4px 12px;
+}
+
+.titledate {
+ font-size: 10px;
+ color: #999999;
+}
+
+.toolbar {
+ background-color: #777777;
+ background: -webkit-gradient(linear, left top, left bottom, from(#666666), to(#444444));
+ font-size: 12px;
+ padding: 4px 4px 4px 12px;
+}
+
+a.tool {
+ font-size: 11px;
+ margin-right: 8px;
+ color: #eeeeee;
+}
+
+input.tool {
+ font-size: 11px;
+ color: #000000;
+}
+
+img {
+ max-width: 100%;
+ height: auto;
+}
+
+.content {
+ display: table;
+}
+
+.navmenu {
+ display: table-cell;
+ vertical-align: top;
+ width: 150px;
+ background: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#fff));
+ padding: 8px;
+}
+
+/* Small screen */
+@media (max-width:55em) {
+ .content {
+ display: block;
+ }
+ .navmenu,.main {
+ float: left;
+ }
+}
+
diff --git a/styles/plain.css b/styles/plain.css
new file mode 100644
index 0000000..e51b334
--- /dev/null
+++ b/styles/plain.css
@@ -0,0 +1,147 @@
+/*
+ * W2
+ *
+ * Copyright (C) 2007-2011 Steven Frank
+ *
+ * Code may be re-used as long as the above copyright notice is retained.
+ * See README.txt for full details.
+ *
+ * Written with Coda:
+ *
+ */
+
+* {
+ font-family: sans-serif;
+ font-size: 1em;
+ margin: 0;
+ padding: 0;
+}
+
+blockquote {
+ background-color: #f0f0f0;
+ margin: 0px 0px 12px 20px;
+ padding-top: 4px 10px 4px 10px;
+}
+
+form {
+ display: inline;
+}
+
+li {
+ line-height: 1.25em;
+}
+
+h1 {
+ font-size: 2em;
+ font-weight: bold;
+ margin-top: 12px;
+ margin-bottom: 12px;
+}
+
+h2 {
+ font-size: 1.5em;
+ font-weight: bold;
+ margin-top: 10px;
+ margin-bottom: 10px;
+}
+
+h3 {
+ font-size: 1em;
+ font-weight: bold;
+ margin-top: 8px;
+ margin-bottom: 8px;
+}
+
+hr {
+ border-top: 1px solid #cccccc;
+ border-bottom: 0;
+ border-left: 0;
+ border-right: 0;
+ margin-top: 12px;
+ margin-bottom: 12px;
+}
+
+ul {
+ padding-left: 12px;
+ margin-left: 12px;
+ list-style-position: inside;
+}
+
+ol {
+ margin-left: 12px;
+ padding-left: 12px;
+ list-style-position: inside;
+}
+
+p {
+ margin-top: 12px;
+ margin-bottom: 12px;
+}
+
+pre {
+ font-family: Menlo, Courier, monospace;
+ background-color: #e0e0e0;
+ margin-top: 12px;
+ margin-bottom: 12px;
+ padding: 10px;
+
+ /* stroke each browser so that they wrap lines in the pre tag */
+ white-space: pre-wrap; /* css-3 */
+ white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
+ white-space: -pre-wrap; /* Opera 4-6 */
+ white-space: -o-pre-wrap; /* Opera 7 */
+ word-wrap: break-word; /* Internet Explorer 5.5+ */
+}
+
+code {
+ font-family: Menlo, Courier, monospace;
+}
+
+table {
+ border-collapse: collapse;
+}
+
+table, td {
+ padding: 2px;
+}
+
+textarea {
+ font-family: monospace;
+ width: 100%;
+ background-color: #ffffee;
+}
+
+img {
+ max-width: 100%;
+ height: auto;
+}
+
+a {
+ color:#1474CA;text-decoration:none
+}
+
+a:hover {
+ text-decoration:underline
+}
+
+.wrapper {
+ max-width:50em;
+ padding: 10px;
+}
+
+.navmenu {
+ float: right;
+ min-width: 10em;
+ padding:0.5em;
+ margin:1em;
+ border:1px #eee;
+ background:#eee;
+ color:#333
+}
+
+/* Small screens */
+@media (max-width:55em) {
+ .wrapper{
+ width:90%
+ }
+}
diff --git a/templates/original.php b/templates/original.php
new file mode 100644
index 0000000..9980136
--- /dev/null
+++ b/templates/original.php
@@ -0,0 +1,40 @@
+\n";
+print "\n";
+print "\n";
+print "";
+print "\n";
+
+print "\n";
+print "$title\n";
+print "\n";
+print "\n";
+print "$title $datetime
\n";
+
+print "";
+printEdit();
+print " ";
+printNew();
+print " ";
+printAll();
+print " ";
+printRecent();
+print " ";
+printHome();
+print " ";
+printSearch();
+print "
\n";
+print "\n";
+printNavmenu();
+print "
\n";
+print "$html\n";
+print "
\n";
+print "
\n";
+
+print "\n";
+print "\n";
+
diff --git a/templates/plain.php b/templates/plain.php
new file mode 100644
index 0000000..ace7d81
--- /dev/null
+++ b/templates/plain.php
@@ -0,0 +1,67 @@
+\n";
+print '' . "\n";
+print "\n";
+print '' . "\n";
+print "";
+print "\n";
+
+print "\n";
+print "" . __( $title ) . "\n";
+print "\n";
+
+print "\n";
+
+print "\n";
+print "
\n";
+
+print "\n"; // header
+
+print "
\n";
+print "
\n";
+
+printNavmenu();
+
+print "$html\n";
+print "
";
+print "\n"; // main
+
+print "\n"; // footer
+
+print "
\n"; // wrapper
+print "
\n"; // center
+
+print "\n";
+print "\n";
+