summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorneoraider <devnull@localhost>2006-12-09 02:18:00 +0100
committerneoraider <devnull@localhost>2006-12-09 02:18:00 +0100
commit7be63518bdb86fb747dda20918ef6eab3d30e40c (patch)
treee9239af6d9efa6d7a2129adb71ca77fb25a0f59d
parentfa39bfd963d7d05335d968b0efdfd9bb9a40f132 (diff)
downloadneon-7be63518bdb86fb747dda20918ef6eab3d30e40c.tar
neon-7be63518bdb86fb747dda20918ef6eab3d30e40c.zip
?bersetzung vereinfacht; alle Seiten ?bersetzt
-rw-r--r--base.xml2
-rw-r--r--code/message.inc.php19
-rw-r--r--code/pages.inc.php18
-rw-r--r--code/subst.inc.php13
-rw-r--r--code/util.inc.php11
-rw-r--r--config/neon.sql8
-rw-r--r--index.php2
-rw-r--r--lang/de.inc.php48
-rw-r--r--pages/base/default.xml2
-rw-r--r--pages/content/Login.xml6
-rw-r--r--pages/content/Modules.xml4
-rw-r--r--pages/content/Pages.xml18
-rw-r--r--pages/content/Pages:Handle.xml59
-rw-r--r--pages/content/Users.xml10
-rw-r--r--pages/content/Users:Handle.xml62
-rw-r--r--templates/default.inc.php6
-rw-r--r--templates/phpexec.inc.php4
17 files changed, 158 insertions, 134 deletions
diff --git a/base.xml b/base.xml
index f37b64e..cdc3003 100644
--- a/base.xml
+++ b/base.xml
@@ -6,9 +6,9 @@
</info>
<files>
<code>links</code>
- <code>message</code>
<code>nav</code>
<code>pages</code>
+ <code>subst</code>
<code>templates</code>
<code>user</code>
<code>util</code>
diff --git a/code/message.inc.php b/code/message.inc.php
deleted file mode 100644
index fb9e8fa..0000000
--- a/code/message.inc.php
+++ /dev/null
@@ -1,19 +0,0 @@
-<?PHP
- Uses('util');
-
- $GLOBALS['message']['Error'] = 'Error';
- $GLOBALS['message']['PageNotFound'] = 'The page \'$page\' does not exist.';
- $GLOBALS['message']['Forbidden'] = 'The page \'$page\' is protected.';
- $GLOBALS['message']['InternalError'] = 'An internal error has occourred.';
- $GLOBALS['message']['LoginError'] = 'Login failed. Username or password is wrong.';
-
- if($config['language'] != 'en') @include('lang/' . $config['language'] . '.inc.php');
-
- function Message($type, $data = array()) {
- return Subst($GLOBALS['message'][$type], $data);
- }
-
- function ErrorMessage($type, $data = array()) {
- return '<span class="error">' . Subst($GLOBALS['message'][$type], $data) . '</span>';
- }
-?>
diff --git a/code/pages.inc.php b/code/pages.inc.php
index e3af67a..549e24c 100644
--- a/code/pages.inc.php
+++ b/code/pages.inc.php
@@ -1,5 +1,5 @@
<?PHP
- Uses('user', 'templates');
+ Uses('user', 'templates', 'subst');
class Pages {
@@ -9,11 +9,11 @@
function Get($page, $type) {
if(!$this->Exists($page, $type))
return array('title' => $page,
- 'content' => ErrorMessage('PageNotFound', array('page' => $page)));
+ 'content' => Subst('<span class="error">{{The page \'' . $page . '\' does not exist.}}</span>'));
if(!$this->HasReadAccess($page, $type))
return array('title' => $page,
- 'content' => ErrorMessage('Forbidden', array('page' => $page)));
+ 'content' => Subst('<span class="error">{{The page \'' . $page . '\' is protected.}}</span>'));
$pagedata = $this->GetPageData($page, $type);
@@ -22,17 +22,19 @@
$data['_page'] = $page;
$data['_type'] = $type;
- return $GLOBALS['templates'][$pagedata['template']]->GetPage($data);
+ $ret = $GLOBALS['templates'][$pagedata['template']]->GetPage($data);
+
+ return array('title' => Subst($ret['title']), 'content' => Subst($ret['content']));
}
function GetEditor($page, $type, $backlink) {
if(!$this->Exists($page, $type))
return array('title' => $page,
- 'content' => ErrorMessage('PageNotFound', array('page' => $page)));
+ 'content' => Subst('<span class="error">{{The page \'' . $page . '\' does not exist.}}</span>'));
if(!$this->HasWriteAccess($page, $type))
return array('title' => $page,
- 'content' => ErrorMessage('Forbidden', array('page' => $page)));
+ 'content' => Subst('<span class="error">{{The page \'' . $page . '\' is protected.}}</span>'));
$pagedata = $this->GetPageData($page, $type);
@@ -41,7 +43,9 @@
$data['_type'] = $type;
$data['_backlink'] = $backlink;
- return $GLOBALS['templates'][$pagedata['template']]->GetEditor($data);
+ $ret = $GLOBALS['templates'][$pagedata['template']]->GetEditor($data);
+
+ return array('title' => Subst($ret['title']), 'content' => Subst($ret['content']));
}
function Exists($page, $type) {
diff --git a/code/subst.inc.php b/code/subst.inc.php
new file mode 100644
index 0000000..9696ec9
--- /dev/null
+++ b/code/subst.inc.php
@@ -0,0 +1,13 @@
+<?PHP
+ $GLOBALS['messages'] = array();
+
+ if($GLOBALS['config']['language'] != 'en') @include('lang/' . $GLOBALS['config']['language'] . '.inc.php');
+
+ function Subst($data) {
+ $subst = array_map(create_function('$key', 'return \'(\\{\\{\' . $key . \'\\}\\})\';'), array_keys($GLOBALS['messages']));
+
+ $data = preg_replace($subst, $GLOBALS['messages'], $data);
+
+ return preg_replace('({{(.+?)}})', '$1', $data);
+ }
+?>
diff --git a/code/util.inc.php b/code/util.inc.php
index 3ee2489..b2cf954 100644
--- a/code/util.inc.php
+++ b/code/util.inc.php
@@ -1,15 +1,4 @@
<?PHP
- function Subst($string, $subst = array()) {
- $tr = array('$$' => '$');
-
- foreach($subst as $key => $value)
- $tr['$' . $key] = $value;
-
- krsort($tr);
-
- return strtr($string, $tr);
- }
-
if(get_magic_quotes_gpc()) {
function Unquote($string) {
return stripslashes($string);
diff --git a/config/neon.sql b/config/neon.sql
index 5de9591..74e4c60 100644
--- a/config/neon.sql
+++ b/config/neon.sql
@@ -3,7 +3,7 @@
-- http://www.phpmyadmin.net
--
-- Host: localhost
--- Erstellungszeit: 04. Dezember 2006 um 01:27
+-- Erstellungszeit: 09. Dezember 2006 um 02:16
-- Server Version: 5.0.27
-- PHP-Version: 5.2.0-7
--
@@ -53,6 +53,7 @@ CREATE TABLE `groups` (
--
INSERT INTO `groups` (`id`, `name`) VALUES (3, 'Mitglied');
+INSERT INTO `groups` (`id`, `name`) VALUES (-1, '{{Administrator}}');
-- --------------------------------------------------------
@@ -64,7 +65,8 @@ CREATE TABLE `modules` (
`id` bigint(20) NOT NULL auto_increment,
`name` varchar(255) NOT NULL,
`enabled` tinyint(1) NOT NULL,
- PRIMARY KEY (`id`)
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `name` (`name`)
) TYPE=MyISAM AUTO_INCREMENT=6 ;
--
@@ -203,6 +205,6 @@ CREATE TABLE `users` (
-- Daten für Tabelle `users`
--
-INSERT INTO `users` (`id`, `sid`, `gid`, `user`, `password`, `lastaccess`) VALUES (1, '', -1, 'NeoRaider', 'gamezock', '2006-12-04 01:18:26');
+INSERT INTO `users` (`id`, `sid`, `gid`, `user`, `password`, `lastaccess`) VALUES (1, '', -1, 'NeoRaider', 'gamezock', '2006-12-09 02:15:08');
INSERT INTO `users` (`id`, `sid`, `gid`, `user`, `password`, `lastaccess`) VALUES (3, '', -1, 'sicarius', 'armleuchter', '2006-12-02 22:46:58');
INSERT INTO `users` (`id`, `sid`, `gid`, `user`, `password`, `lastaccess`) VALUES (4, '', -1, 'morti', 'return', '2006-12-02 22:46:58');
diff --git a/index.php b/index.php
index cef78c6..0da673f 100644
--- a/index.php
+++ b/index.php
@@ -4,7 +4,7 @@
require_once('core/modules.inc.php');
require_once('core/xmlparser.inc.php');
- Uses('util', 'pages', 'links');
+ Uses('util', 'pages', 'links', 'subst');
header('Content-type: text/html;charset=UTF-8');
diff --git a/lang/de.inc.php b/lang/de.inc.php
index 47e7007..7837055 100644
--- a/lang/de.inc.php
+++ b/lang/de.inc.php
@@ -1,7 +1,45 @@
<?PHP
- $GLOBALS['message']['Error'] = 'Fehler';
- $GLOBALS['message']['PageNotFound'] = 'Die Seite \'$page\' existiert nicht.';
- $GLOBALS['message']['Forbidden'] = 'Die Seite \'$page\' ist geschützt.';
- $GLOBALS['message']['InternalError'] = 'Ein interner Fehler ist aufgetreten.';
- $GLOBALS['message']['LoginError'] = 'Login fehlgeschlagen. Username oder Passwort ist falsch.';
+ $GLOBALS['messages']['Administrator'] = 'Administrator';
+ $GLOBALS['messages']['An internal error has occourred.'] = 'Ein interner Fehler ist aufgetreten.';
+ $GLOBALS['messages']['Back'] = 'Zurück';
+ $GLOBALS['messages']['Change'] = 'Ändern';
+ $GLOBALS['messages']['Change access'] = 'Rechte ändern';
+ $GLOBALS['messages']['Change access to \'(.+?)\''] = 'Rechte von \'$1\' ändern';
+ $GLOBALS['messages']['Change group'] = 'Gruppe ändern';
+ $GLOBALS['messages']['Change group of \'(.+?)\''] = 'Gruppe von \'$1\' ändern';
+ $GLOBALS['messages']['Change password'] = 'Passwort ändern';
+ $GLOBALS['messages']['Change password of \'(.+?)\''] = 'Passwort von \'$1\' ändern';
+ $GLOBALS['messages']['Confirm'] = 'Bestätigen';
+ $GLOBALS['messages']['Copy'] = 'Kopieren';
+ $GLOBALS['messages']['Copy \'(.+?)\''] = '\'$1\' kopieren';
+ $GLOBALS['messages']['Delete'] = 'Löschen';
+ $GLOBALS['messages']['Delete \'(.+?)\''] = '\'$1\' löschen';
+ $GLOBALS['messages']['Display'] = 'Anzeigen';
+ $GLOBALS['messages']['Do you really want to delete the page \'(.+?)\'\\?'] = 'Wollen Sie die Seite \'$1\' wirklich löschen?';
+ $GLOBALS['messages']['Do you really want to delete the user \'(.+?)\'\\?'] = 'Wollen Sie den Benutzer \'$1\' wirklich löschen?';
+ $GLOBALS['messages']['Edit'] = 'Bearbeiten';
+ $GLOBALS['messages']['Edit \'(.+?)\''] = '\'$1\' bearbeiten';
+ $GLOBALS['messages']['Error'] = 'Fehler';
+ $GLOBALS['messages']['Group'] = 'Gruppe';
+ $GLOBALS['messages']['Guest'] = 'Gast';
+ $GLOBALS['messages']['Login failed. Username or password is wrong.'] = 'Login fehlgeschlagen. Username oder Passwort ist falsch.';
+ $GLOBALS['messages']['Modules'] = 'Module';
+ $GLOBALS['messages']['Name'] = 'Name';
+ $GLOBALS['messages']['New'] = 'Neu';
+ $GLOBALS['messages']['New group'] = 'Neue Gruppe';
+ $GLOBALS['messages']['New name'] = 'Neuer Name';
+ $GLOBALS['messages']['New page'] = 'Neue Seite';
+ $GLOBALS['messages']['New password'] = 'Neues Passwort';
+ $GLOBALS['messages']['New user'] = 'Neuer Benutzer';
+ $GLOBALS['messages']['No access'] = 'Kein Zugriff';
+ $GLOBALS['messages']['Pages'] = 'Seiten';
+ $GLOBALS['messages']['Password'] = 'Passwort';
+ $GLOBALS['messages']['Read and write'] = 'Lesen und schreiben';
+ $GLOBALS['messages']['Read only'] = 'Nur lesen';
+ $GLOBALS['messages']['Rename'] = 'Umbenennen';
+ $GLOBALS['messages']['Rename \'(.+?)\''] = '\'$1\' umbenennen';
+ $GLOBALS['messages']['Template'] = 'Template';
+ $GLOBALS['messages']['Title'] = 'Titel';
+ $GLOBALS['messages']['The page \'(.+?)\' does not exist.'] = 'Die Seite \'$1\' existiert nicht.';
+ $GLOBALS['messages']['The page \'(.+?)\' is protected.'] = 'Die Seite \'$1\' ist geschützt.';
?>
diff --git a/pages/base/default.xml b/pages/base/default.xml
index 51fc115..de2ef47 100644
--- a/pages/base/default.xml
+++ b/pages/base/default.xml
@@ -31,7 +31,7 @@
if($GLOBALS['pages']->HasWriteAccess($GLOBALS['page'], 'c') && $_GET['mode'] != 'edit') {
$backlink = $GLOBALS['links']->GetNeonLink($GLOBALS['page']);
- echo '<a class="editlink" href="' . $GLOBALS['links']->GetNeonLink($GLOBALS['page'], 'mode=edit') . '">Bearbeiten</a>';
+ echo '<a class="editlink" href="' . $GLOBALS['links']->GetNeonLink($GLOBALS['page'], 'mode=edit') . '">{{Edit}}</a>';
}
echo $GLOBALS['data']['content'];
diff --git a/pages/content/Login.xml b/pages/content/Login.xml
index 4e21b3f..4a6471a 100644
--- a/pages/content/Login.xml
+++ b/pages/content/Login.xml
@@ -10,7 +10,7 @@
<code>
<![CDATA[
<?PHP
- Uses('user', 'links', 'message', 'util');
+ Uses('user', 'links', 'util');
if($_POST['name'] && $_POST['password'] && $_POST['page']) {
if($GLOBALS['user']->Login(Unquote($_POST['name']), Unquote($_POST['password']))) {
@@ -19,9 +19,9 @@
}
}
- $title = Message('Error');
+ $title = '{{Error}}';
- echo '<span class="error">' . Message('LoginError') . '</span>';
+ echo '<span class="error">{{Login failed. Username or password is wrong.}}</span>';
?>
]]>
</code>
diff --git a/pages/content/Modules.xml b/pages/content/Modules.xml
index 86a031b..f8f52e2 100644
--- a/pages/content/Modules.xml
+++ b/pages/content/Modules.xml
@@ -12,9 +12,9 @@
<?PHP
Uses('links');
- $title = 'Module';
+ $title = '{{Modules}}';
- echo '<h2>Module</h2>';
+ echo '<h2>{{Modules}}</h2>';
$modules = array_keys($GLOBALS['modules']->modules);
unset($modules[array_search('base', $modules)]);
diff --git a/pages/content/Pages.xml b/pages/content/Pages.xml
index e72368f..6db0710 100644
--- a/pages/content/Pages.xml
+++ b/pages/content/Pages.xml
@@ -13,9 +13,9 @@
Uses('links', 'pages');
- $title = 'Seiten';
+ $title = '{{Pages}}';
- echo '<h2>Seiten</h2>';
+ echo '<h2>{{Pages}}</h2>';
echo '<form method="post" action="' . $GLOBALS['links']->GetNeonLink('Pages:Handle') . '">';
@@ -29,13 +29,13 @@
echo '</select>';
echo '<br />';
- echo '<input type="submit" name="view" value="Anzeigen" /> ';
- echo '<input type="submit" name="new" value="Neu" /> ';
- echo '<input type="submit" name="edit" value="Bearbeiten" /> ';
- echo '<input type="submit" name="privs" value="Rechte ändern" /> ';
- echo '<input type="submit" name="copy" value="Kopieren" /> ';
- echo '<input type="submit" name="rename" value="Umbenennen" /> ';
- echo '<input type="submit" name="delete" value="Löschen" />';
+ echo '<input type="submit" name="view" value="{{Display}}" /> ';
+ echo '<input type="submit" name="new" value="{{New}}" /> ';
+ echo '<input type="submit" name="edit" value="{{Edit}}" /> ';
+ echo '<input type="submit" name="privs" value="{{Change access}}" /> ';
+ echo '<input type="submit" name="copy" value="{{Copy}}" /> ';
+ echo '<input type="submit" name="rename" value="{{Rename}}" /> ';
+ echo '<input type="submit" name="delete" value="{{Delete}}" />';
echo '</form>';
?>
]]>
diff --git a/pages/content/Pages:Handle.xml b/pages/content/Pages:Handle.xml
index 173eec7..9abc7d9 100644
--- a/pages/content/Pages:Handle.xml
+++ b/pages/content/Pages:Handle.xml
@@ -23,21 +23,21 @@
}
}
elseif(isset($_POST['new'])) {
- $title = 'Neue Seite';
+ $title = '{{New page}}';
?>
- <h2>Neue Seite</h2>
+ <h2>{{New page}}</h2>
<form method="post" action="<?PHP echo $GLOBALS['links']->GetNeonLink('Pages:New'); ?>">
<input type="hidden" name="type" value="<?PHP echo $_POST['type']; ?>" />
- Name: <input type="text" id="pagename" name="name" size="70" /><br />
- Template: <select type="text" class="spaced-top" name="template" size="1" />
+ {{Name}}: <input type="text" id="pagename" name="name" size="70" /><br />
+ {{Template}}: <select type="text" class="spaced-top" name="template" size="1" />
<?PHP
foreach(array_keys($GLOBALS['templates']) as $key)
echo '<option>' . $key . '</option>';
?>
</select><br />
- <input type="submit" class="spaced-top" value="Neu" />
- <input type="submit" class="spaced-top" name="back" value="Zurück" />
+ <input type="submit" class="spaced-top" value="{{New}}" />
+ <input type="submit" class="spaced-top" name="back" value="{{Back}}" />
</form>
<?PHP
}
@@ -54,14 +54,14 @@
if($_POST['name']) {
$name = htmlspecialchars(Unquote($_POST['name']));
- $title = 'Rechte von \'' . $name . '\' ändern';
+ $title = '{{Change access to \'' . $name . '\'}}';
- echo '<h2>Rechte von \'' . $name . '\' ändern</h2>';
+ echo '<h2>{{Change access to \'' . $name . '\'}}</h2>';
$access = $GLOBALS['pages']->GetAccess(Unquote($_POST['name']), $_POST['type']);
$groups = $GLOBALS['user']->ListGroups();
- array_unshift($groups, array(0, 'Gast'));
+ array_unshift($groups, array(0, '{{Guest}}'));
echo '<form action="' . $GLOBALS['links']->GetNeonLink('Pages:Privs') . '" method="post">';
@@ -77,25 +77,25 @@
echo '<option value="0"';
if((hexdec($access[0][$group[0]/4]) & (1 << ($group[0]%4))) == 0) echo ' selected="selected"';
- echo '>Kein Zugriff</option>';
+ echo '>{{No access}}</option>';
echo '<option value="1"';
if(((hexdec($access[0][$group[0]/4]) & (1 << ($group[0]%4))) != 0)
&& ((hexdec($access[1][$group[0]/4]) & (1 << ($group[0]%4))) == 0))
echo ' selected="selected"';
- echo '>Nur lesen</option>';
+ echo '>{{Read only}}</option>';
echo '<option value="2"';
if((hexdec($access[1][$group[0]/4]) & (1 << ($group[0]%4))) != 0) echo ' selected="selected"';
- echo '>Lesen und schreiben</option>';
+ echo '>{{Read and write}}</option>';
echo '</select></td></tr>';
}
echo '</table>';
- echo '<input type="submit" class="spaced-top" value="Ändern" /> ';
- echo '<input type="submit" class="spaced-top" name="back" value="Zurück" />';
+ echo '<input type="submit" class="spaced-top" value="{{Change}}" /> ';
+ echo '<input type="submit" class="spaced-top" name="back" value="{{Back}}" />';
echo '</form>';
}
@@ -104,16 +104,16 @@
if($_POST['name']) {
$name = htmlspecialchars(Unquote($_POST['name']));
- $title = '\'' . $name . '\' kopieren';
+ $title = '{{Copy \'' . $name . '\'}}';
- echo '<h2>\'' . $name . '\' kopieren</h2>';
+ echo '<h2>{{Copy \'' . $name . '\'}}</h2>';
echo '<form method="post" action="' . $GLOBALS['links']->GetNeonLink('Pages:Copy') . '">';
echo '<input type="hidden" name="name" value="' . $name . '" />';
echo '<input type="hidden" name="type" value="' . $_POST['type'] . '" />';
- echo 'Neuer Name: <input type="text" name="newname" value="' . $name . '" size="70" /><br />';
- echo '<input type="submit" class="spaced-top" value="Kopieren" /> ';
- echo '<input type="submit" class="spaced-top" name="back" value="Zurück" />';
+ echo '{{New name}}: <input type="text" name="newname" value="' . $name . '" size="70" /><br />';
+ echo '<input type="submit" class="spaced-top" value="{{Copy}}" /> ';
+ echo '<input type="submit" class="spaced-top" name="back" value="{{Back}}" />';
echo '</form>';
}
}
@@ -121,17 +121,16 @@
if($_POST['name']) {
$name = htmlspecialchars(Unquote($_POST['name']));
- $title = '\'' . $name . '\' umbenennen';
+ $title = '{{Rename \'' . $name . '\'}}';
- echo '<h2>\'' . $name . '\' umbenennen</h2>';
+ echo '<h2>{{Rename \'' . $name . '\'}}</h2>';
echo '<form method="post" action="' . $GLOBALS['links']->GetNeonLink('Pages:Rename') . '">';
echo '<input type="hidden" name="name" value="' . $name . '" />';
echo '<input type="hidden" name="type" value="' . $_POST['type'] . '" />';
- echo 'Neuer Name:<br />';
- echo '<input type="text" name="newname" value="' . $name . '" size="70" /><br />';
- echo '<input type="submit" class="spaced-top" value="Umbenennen" /> ';
- echo '<input type="submit" class="spaced-top" name="back" value="Zurück" />';
+ echo '{{New name}}: <input type="text" name="newname" value="' . $name . '" size="70" /><br />';
+ echo '<input type="submit" class="spaced-top" value="{{Rename}}" /> ';
+ echo '<input type="submit" class="spaced-top" name="back" value="{{Back}}" />';
echo '</form>';
}
}
@@ -139,16 +138,16 @@
if($_POST['name']) {
$name = htmlspecialchars(Unquote($_POST['name']));
- $title = '\'' . $name . '\' löschen';
+ $title = '{{Delete \'' . $name . '\'}}';
- echo '<h2>\'' . $name . '\' löschen</h2>';
+ echo '<h2>{{Delete \'' . $name . '\'}}</h2>';
echo '<form method="post" action="' . $GLOBALS['links']->GetNeonLink('Pages:Delete') . '">';
echo '<input type="hidden" name="name" value="' . $name . '" />';
echo '<input type="hidden" name="type" value="' . $_POST['type'] . '" />';
- echo 'Wollen Sie die Seite \'' . $name . '\' wirklich löschen?<br />';
- echo '<input type="submit" class="spaced-top" value="Löschen" /> ';
- echo '<input type="submit" class="spaced-top" name="back" value="Zurück" />';
+ echo '{{Do you really want to delete the page \'' . $name . '\'?}}<br />';
+ echo '<input type="submit" class="spaced-top" value="{{Delete}}" /> ';
+ echo '<input type="submit" class="spaced-top" name="back" value="{{Back}}" />';
echo '</form>';
}
}
diff --git a/pages/content/Users.xml b/pages/content/Users.xml
index bd70234..9833701 100644
--- a/pages/content/Users.xml
+++ b/pages/content/Users.xml
@@ -29,11 +29,11 @@
echo '</select>';
echo '<br />';
- echo '<input type="submit" name="new" value="Neu" /> ';
- echo '<input type="submit" name="group" value="Gruppe ändern" /> ';
- echo '<input type="submit" name="password" value="Passwort ändern" /> ';
- echo '<input type="submit" name="rename" value="Umbenennen" /> ';
- echo '<input type="submit" name="delete" value="Löschen" />';
+ echo '<input type="submit" name="new" value="{{New}}" /> ';
+ echo '<input type="submit" name="group" value="{{Change group}}" /> ';
+ echo '<input type="submit" name="password" value="{{Change password}}" /> ';
+ echo '<input type="submit" name="rename" value="{{Rename}}" /> ';
+ echo '<input type="submit" name="delete" value="{{Delete}}" />';
echo '</form>';
?>
]]>
diff --git a/pages/content/Users:Handle.xml b/pages/content/Users:Handle.xml
index 27b5a3e..9e949c1 100644
--- a/pages/content/Users:Handle.xml
+++ b/pages/content/Users:Handle.xml
@@ -14,29 +14,28 @@
if(isset($_POST['new'])) {
- $title = 'Neuer Benutzer';
+ $title = '{{New user}}';
?>
- <h2>Neuer Benutzer</h2>
+ <h2>{{New user}}</h2>
<form method="post" action="<?PHP echo $GLOBALS['links']->GetNeonLink('Users:New'); ?>">
<div class="spaced-bottom">Name: <input type="text" id="username" name="name" size="70" /></div>
- Gruppe:<br />
+ {{Group}}:<br />
<select name="gid" size="15" class="grouplist spaced-bottom">
- <option value="0">Administrator</option>
<?PHP
- $res = $GLOBALS['db']->Execute('SELECT * FROM groups ORDER BY name');
+ $res = $GLOBALS['db']->Execute('SELECT * FROM groups ORDER BY id');
while($group = $res->FetchRow()) {
echo '<option value="' . $group[0] . '">' . htmlspecialchars($group[1]) . '</option>';
}
?>
</select><br />
- Passwort:<br />
+ {{Password}}:<br />
<input type="password" class="spaced-bottom" name="password" size="30" /><br />
- Bestätigen:<br />
+ {{Confirm}}:<br />
<input type="password" class="spaced-bottom" name="password2" size="30" /><br />
- <input type="submit" value="Neu" />
- <input type="submit" name="back" value="Zurück" />
+ <input type="submit" value="{{New}}" />
+ <input type="submit" name="back" value="{{Back}}" />
</form>
<?PHP
}
@@ -45,19 +44,18 @@
$name = htmlspecialchars($GLOBALS['user']->GetName($_POST['id']));
$gid = $GLOBALS['user']->GetGid($_POST['id']);
- $title = 'Gruppe von \'' . $name . '\' ändern';
+ $title = '{{Change group of \'' . $name . '\'}}';
- echo '<h2>Gruppe von \'' . $name . '\' ändern</h2>';
+ echo '<h2>{{Change group of \'' . $name . '\'}}</h2>';
echo '<form method="post" action="' . $GLOBALS['links']->GetNeonLink('Users:Group') . '">';
echo '<input type="hidden" name="id" value="' . $_POST['id'] . '" />';
- echo 'Neue Gruppe:<br />';
+ echo '{{New group}}:<br />';
echo '<select name="gid" size="15" class="grouplist spaced-bottom">';
- $res = $GLOBALS['db']->Execute('SELECT * FROM groups ORDER BY name');
+ $res = $GLOBALS['db']->Execute('SELECT * FROM groups ORDER BY id');
$groups = $res->GetArray();
- array_unshift($groups, array(0, 'Administrator'));
foreach($groups as $group) {
echo '<option value="' . $group[0] . '"';
@@ -67,8 +65,8 @@
echo '</select><br />';
- echo '<input type="submit" value="Ändern" /> ';
- echo '<input type="submit" name="back" value="Zurück" />';
+ echo '<input type="submit" value="{{Change}}" /> ';
+ echo '<input type="submit" name="back" value="{{Back}}" />';
echo '</form>';
}
}
@@ -76,18 +74,18 @@
if($_POST['id']) {
$name = htmlspecialchars($GLOBALS['user']->GetName($_POST['id']));
- $title = 'Passwort von \'' . $name . '\' ändern';
+ $title = '{{Change password of \'' . $name . '\'}}';
- echo '<h2>Passwort von \'' . $name . '\' ändern</h2>';
+ echo '<h2>{{Change password of \'' . $name . '\'}}</h2>';
echo '<form method="post" action="' . $GLOBALS['links']->GetNeonLink('Users:Password') . '">';
echo '<input type="hidden" name="id" value="' . $_POST['id'] . '" />';
- echo 'Neues Passwort:<br />';
+ echo '{{New password}}:<br />';
echo '<input type="password" name="password" class="spaced-bottom" size="30" /><br />';
- echo 'Bestätigen:<br />';
+ echo '{{Confirm}}:<br />';
echo '<input type="password" name="password2" class="spaced-bottom" size="30" /><br />';
- echo '<input type="submit" value="Ändern" /> ';
- echo '<input type="submit" name="back" value="Zurück" />';
+ echo '<input type="submit" value="{{Change}}" /> ';
+ echo '<input type="submit" name="back" value="{{Back}}" />';
echo '</form>';
}
}
@@ -95,16 +93,16 @@
if($_POST['id']) {
$name = htmlspecialchars($GLOBALS['user']->GetName($_POST['id']));
- $title = '\'' . $name . '\' umbenennen';
+ $title = '{{Rename \'' . $name . '\'}}';
- echo '<h2>\'' . $name . '\' umbenennen</h2>';
+ echo '<h2>{{Rename \'' . $name . '\'}}</h2>';
echo '<form method="post" action="' . $GLOBALS['links']->GetNeonLink('Users:Rename') . '">';
echo '<input type="hidden" name="id" value="' . $_POST['id'] . '" />';
- echo 'Neuer Name: ';
+ echo '{{New name}}: ';
echo '<input type="text" name="name" value="' . $name . '" size="70" /><br />';
- echo '<input type="submit" class="spaced-top" value="Umbenennen" /> ';
- echo '<input type="submit" class="spaced-top" name="back" value="Zurück" />';
+ echo '<input type="submit" class="spaced-top" value="{{Rename}}" /> ';
+ echo '<input type="submit" class="spaced-top" name="back" value="{{Back}}" />';
echo '</form>';
}
}
@@ -112,15 +110,15 @@
if($_POST['id']) {
$name = htmlspecialchars($GLOBALS['user']->GetName($_POST['id']));
- $title = '\'' . $name . '\' löschen';
+ $title = '{{Delete \'' . $name . '\'}}';
- echo '<h2>\'' . $name . '\' löschen</h2>';
+ echo '<h2>{{Delete \'' . $name . '\'}}</h2>';
echo '<form method="post" action="' . $GLOBALS['links']->GetNeonLink('Users:Delete') . '">';
echo '<input type="hidden" name="id" value="' . $_POST['id'] . '" />';
- echo 'Wollen Sie den Benutzer \'' . $name . '\' wirklich löschen?<br />';
- echo '<input type="submit" class="spaced-top" value="Löschen" /> ';
- echo '<input type="submit" class="spaced-top" name="back" value="Zurück" />';
+ echo '{{Do you really want to delete the user \'' . $name . '\'?}}<br />';
+ echo '<input type="submit" class="spaced-top" value="{{Delete}}" /> ';
+ echo '<input type="submit" class="spaced-top" name="back" value="{{Back}}" />';
echo '</form>';
}
}
diff --git a/templates/default.inc.php b/templates/default.inc.php
index c416f44..a6fc876 100644
--- a/templates/default.inc.php
+++ b/templates/default.inc.php
@@ -1,5 +1,5 @@
<?PHP
- Uses('message', 'links');
+ Uses('links');
class default_template {
function GetPage($data) {
@@ -14,14 +14,14 @@
}
function GetEditor($data) {
- $title = 'Edit \'' . $data['_page'] . '\'';
+ $title = '{{Edit \'' . $data['_page'] . '\'}}';
$content = '<h2>' . $title . '</h2>';
$content .= '<form method="post" action="' . $GLOBALS['links']->GetNeonLink('Pages:Edit') . '">';
$content .= '<input type="hidden" name="name" value="' . $data['_page'] . '" />';
$content .= '<input type="hidden" name="type" value="' . $data['_type'] . '" />';
$content .= '<input type="hidden" name="backlink" value="' . htmlspecialchars($data['_backlink']) . '" />';
- $content .= 'Titel: <input type="text" name="data_title" value="';
+ $content .= '{{Title}}: <input type="text" name="data_title" value="';
$content .= htmlspecialchars($data['title']) . '" size="70" /><br />';
$content .= '<textarea name="data_content" class="pageedit spaced-top spaced-bottom" rows="25" cols="70">';
$content .= htmlspecialchars($data['content']) . '</textarea><br />';
diff --git a/templates/phpexec.inc.php b/templates/phpexec.inc.php
index 18c33be..db8373a 100644
--- a/templates/phpexec.inc.php
+++ b/templates/phpexec.inc.php
@@ -1,5 +1,5 @@
<?PHP
- Uses('message', 'links');
+ Uses('links');
class phpexec_template {
function GetPage($data) {
@@ -16,7 +16,7 @@
}
function GetEditor($data) {
- $title = 'Edit \'' . $data['_page'] . '\'';
+ $title = '{{Edit \'' . $data['_page'] . '\'}}';
$content = '<h2>' . $title . '</h2>';
$content .= '<form method="post" action="' . $GLOBALS['links']->GetNeonLink('Pages:Edit') . '">';