summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorneoraider <devnull@localhost>2006-04-09 01:17:04 +0200
committerneoraider <devnull@localhost>2006-04-09 01:17:04 +0200
commite90e38401db578819240d4827597cdec61d0727d (patch)
tree257bd4182bad06c62759ed8d8403fd3c3e17e287
parentc787833e7cbd2c33257a963e4bc99a3f7dc97cd7 (diff)
downloadneon-e90e38401db578819240d4827597cdec61d0727d.tar
neon-e90e38401db578819240d4827597cdec61d0727d.zip
config.inc.php angepasst. Formatierung verbessert.
-rw-r--r--code/db.inc.php2
-rw-r--r--code/links.inc.php38
-rw-r--r--code/message.inc.php6
-rw-r--r--code/nav.inc.php2
-rw-r--r--code/pages.inc.php96
-rw-r--r--code/user.inc.php68
-rw-r--r--code/util.inc.php8
-rw-r--r--config/config.inc.php16
-rw-r--r--lang/de.inc.php4
9 files changed, 120 insertions, 120 deletions
diff --git a/code/db.inc.php b/code/db.inc.php
index 57547cd..72f9025 100644
--- a/code/db.inc.php
+++ b/code/db.inc.php
@@ -6,5 +6,5 @@
$GLOBALS['db'] = &ADONewConnection($config['driver']);
$GLOBALS['db']->PConnect($config['server'], $config['user'],
- $config['password'], $config['db']);
+ $config['password'], $config['db']);
?>
diff --git a/code/links.inc.php b/code/links.inc.php
index 7895197..2eddb77 100644
--- a/code/links.inc.php
+++ b/code/links.inc.php
@@ -4,10 +4,10 @@
class Links {
function GetNeonLink($page, $extra = '', $html = true) {
if($GLOBALS['pages']->HasAccess($page, 'c')) {
- if($GLOBALS['user']->login_type == 'url')
- $ret = 'index.php?page=' . $page . '&login=' . $GLOBALS['user']->login_key
- . ($extra ? '&' . $extra : '');
-
+ if($GLOBALS['user']->login_type == 'url')
+ $ret = 'index.php?page=' . $page . '&login=' . $GLOBALS['user']->login_key
+ . ($extra ? '&' . $extra : '');
+
else
$ret = 'index.php?page=' . $page . ($extra ? '&' . $extra : '');
@@ -28,8 +28,8 @@
function GetNavPage($page) {
if($GLOBALS['pages']->HasAccess($page, 'n')) {
- $page = $GLOBALS['pages']->Get($page, 'n');
- return $page['content'];
+ $page = $GLOBALS['pages']->Get($page, 'n');
+ return $page['content'];
}
return '';
@@ -40,22 +40,22 @@
switch($link[0]) {
case ':':
- $ret = $this->GetNeonLink(substr($link, 1));
-
- if($ret)
+ $ret = $this->GetNeonLink(substr($link, 1));
+
+ if($ret)
return '<a href="' . $ret . '">' . $text . '</a>';
return $text;
- case '@':
- return '<a href="' . $this->GetMailtoLink(substr($link, 1)) . '">' . $text . '</a>';
- case '!':
- $ret = $this->GetNavPage(substr($link, 1));
-
- if($ret)
- return $ret;
-
- return $text;
- default:
+ case '@':
+ return '<a href="' . $this->GetMailtoLink(substr($link, 1)) . '">' . $text . '</a>';
+ case '!':
+ $ret = $this->GetNavPage(substr($link, 1));
+
+ if($ret)
+ return $ret;
+
+ return $text;
+ default:
return '<a href="' . $this->GetExternalLink($link) . '">' . $text . '</a>';
}
}
diff --git a/code/message.inc.php b/code/message.inc.php
index 8ac8a0e..f64905f 100644
--- a/code/message.inc.php
+++ b/code/message.inc.php
@@ -3,11 +3,11 @@
require_once('code/util.inc.php');
- $message['Error'] = 'Error';
- $message['PageNotFound'] = 'The page \'$page\' does not exist.';
+ $message['Error'] = 'Error';
+ $message['PageNotFound'] = 'The page \'$page\' does not exist.';
$message['Forbidden'] = 'The page \'$page\' is protected.';
$message['InternalError'] = 'An internal error has occourred.';
- $message['LoginError'] = 'Login failed. Username or password is wrong.';
+ $message['LoginError'] = 'Login failed. Username or password is wrong.';
if($config['language'] != 'en') @include('lang/' . $config['language'] . '.inc.php');
diff --git a/code/nav.inc.php b/code/nav.inc.php
index fbaf8e1..e7617d1 100644
--- a/code/nav.inc.php
+++ b/code/nav.inc.php
@@ -8,7 +8,7 @@
$res = $GLOBALS['db']->Execute('SELECT * FROM nav ORDER BY id');
while(!$res->EOF) {
- $this->entries[$res->fields[0]] = new NavEntry($res->fields[1], $res->fields[2], $res->fields[3]);
+ $this->entries[$res->fields[0]] = new NavEntry($res->fields[1], $res->fields[2], $res->fields[3]);
$res->MoveNext();
}
diff --git a/code/pages.inc.php b/code/pages.inc.php
index e1bfd9b..d2a0009 100644
--- a/code/pages.inc.php
+++ b/code/pages.inc.php
@@ -48,15 +48,15 @@
}
function GetName($id) {
- $res = $GLOBALS['db']->Execute('SELECT name FROM pages WHERE id = ?', $id);
-
- return $res->fields[0];
+ $res = $GLOBALS['db']->Execute('SELECT name FROM pages WHERE id = ?', $id);
+
+ return $res->fields[0];
}
function GetType($id) {
- $res = $GLOBALS['db']->Execute('SELECT type FROM pages WHERE id = ?', $id);
-
- return $res->fields[0];
+ $res = $GLOBALS['db']->Execute('SELECT type FROM pages WHERE id = ?', $id);
+
+ return $res->fields[0];
}
function Exists($page, $type = null) {
@@ -75,66 +75,66 @@
}
function Add($name, $handler, $type) {
- if($this->Exists($name, $type)) return 0;
-
- $GLOBALS['db']->Execute('INSERT INTO pages (name, handler, access, data, type) VALUES (?, ?, 0, "", ?)',
- array($name, $handler, $type));
-
- return $GLOBALS['db']->Insert_ID();
+ if($this->Exists($name, $type)) return 0;
+
+ $GLOBALS['db']->Execute('INSERT INTO pages (name, handler, access, data, type) VALUES (?, ?, 0, "", ?)',
+ array($name, $handler, $type));
+
+ return $GLOBALS['db']->Insert_ID();
}
function Edit($page, $data, $type = null) {
- $string = '';
-
- foreach($data as $key => $val)
- $string .= urlencode($key) . '=' . urlencode($val) . '&';
+ $string = '';
+
+ foreach($data as $key => $val)
+ $string .= urlencode($key) . '=' . urlencode($val) . '&';
if($type) $GLOBALS['db']->Execute('UPDATE pages SET data = ? WHERE name = ? AND type = ?',
array(substr($string, 0, -1), $page, $type));
else $GLOBALS['db']->Execute('UPDATE pages SET data = ? WHERE id = ?',
- array(substr($string, 0, -1), $page));
+ array(substr($string, 0, -1), $page));
return ($GLOBALS['db']->Affected_Rows() > 0);
}
function Rename($page, $new_name, $type = null) {
- if($type) {
- if($this->Exists($new_name, $type)) return;
-
- $GLOBALS['db']->Execute('UPDATE pages SET name = ? WHERE name = ? AND type = ?', array($new_name, $page, $type));
- }
- else {
- if($this->Exists($new_name, $this->GetType($type))) return;
-
- $GLOBALS['db']->Execute('UPDATE pages SET name = ? WHERE id = ?', array($new_name, $page));
- }
-
- return ($GLOBALS['db']->Affected_Rows() > 0);
+ if($type) {
+ if($this->Exists($new_name, $type)) return;
+
+ $GLOBALS['db']->Execute('UPDATE pages SET name = ? WHERE name = ? AND type = ?', array($new_name, $page, $type));
+ }
+ else {
+ if($this->Exists($new_name, $this->GetType($type))) return;
+
+ $GLOBALS['db']->Execute('UPDATE pages SET name = ? WHERE id = ?', array($new_name, $page));
+ }
+
+ return ($GLOBALS['db']->Affected_Rows() > 0);
}
function Copy($page, $new_name, $type = null) {
- if($type) {
- if($this->Exists($new_name, $type)) return 0;
-
- $res = $GLOBALS['db']->Execute('SELECT * FROM pages WHERE name = ? AND type = ?', array($page, $type));
- }
- else {
- if($this->Exists($new_name, $this->GetType($type))) return 0;
-
- $res = $GLOBALS['db']->Execute('SELECT handler, data, type FROM pages WHERE id = ?', $page);
- }
-
- $GLOBALS['db']->Execute('INSERT INTO pages (name, handler, access, data, type) VALUES (?, ?, 0, ?, ?)',
- array($new_name, $res->fields[0], $res->fields[1], $res->fields[2]));
-
- return $GLOBALS['db']->Insert_ID();
+ if($type) {
+ if($this->Exists($new_name, $type)) return 0;
+
+ $res = $GLOBALS['db']->Execute('SELECT * FROM pages WHERE name = ? AND type = ?', array($page, $type));
+ }
+ else {
+ if($this->Exists($new_name, $this->GetType($type))) return 0;
+
+ $res = $GLOBALS['db']->Execute('SELECT handler, data, type FROM pages WHERE id = ?', $page);
+ }
+
+ $GLOBALS['db']->Execute('INSERT INTO pages (name, handler, access, data, type) VALUES (?, ?, 0, ?, ?)',
+ array($new_name, $res->fields[0], $res->fields[1], $res->fields[2]));
+
+ return $GLOBALS['db']->Insert_ID();
}
function Delete($page, $type = null) {
- if($type) $GLOBALS['db']->Execute('DELETE FROM pages WHERE name = ? AND type = ?', array($page, $type));
- else $GLOBALS['db']->Execute('DELETE FROM pages WHERE id = ?', $page);
-
- return ($GLOBALS['db']->Affected_Rows() > 0);
+ if($type) $GLOBALS['db']->Execute('DELETE FROM pages WHERE name = ? AND type = ?', array($page, $type));
+ else $GLOBALS['db']->Execute('DELETE FROM pages WHERE id = ?', $page);
+
+ return ($GLOBALS['db']->Affected_Rows() > 0);
}
}
diff --git a/code/user.inc.php b/code/user.inc.php
index f945245..b9cab2d 100644
--- a/code/user.inc.php
+++ b/code/user.inc.php
@@ -75,66 +75,66 @@
}
function IsAdmin($id = -1) {
- if($id < 0) return ($this->uid != 0 && $this->gid == 0);
+ if($id < 0) return ($this->uid != 0 && $this->gid == 0);
return ($id != 0 && $this->GetGid($id) == 0);
}
function GetGid($id = -1) {
- if($id < 0) return $this->gid;
-
- $res = $GLOBALS['db']->Execute('SELECT gid FROM users WHERE id = ?', $id);
-
- return $res->fields[0];
+ if($id < 0) return $this->gid;
+
+ $res = $GLOBALS['db']->Execute('SELECT gid FROM users WHERE id = ?', $id);
+
+ return $res->fields[0];
}
function GetName($id = -1) {
- if($id < 0) return $this->name;
-
- $res = $GLOBALS['db']->Execute('SELECT user FROM users WHERE id = ?', $id);
-
- return $res->fields[0];
+ if($id < 0) return $this->name;
+
+ $res = $GLOBALS['db']->Execute('SELECT user FROM users WHERE id = ?', $id);
+
+ return $res->fields[0];
}
function Exists($name) {
- $res = $GLOBALS['db']->Execute('SELECT id FROM users WHERE user = ?', $name);
-
- return ($res->RecordCount() > 0);
+ $res = $GLOBALS['db']->Execute('SELECT id FROM users WHERE user = ?', $name);
+
+ return ($res->RecordCount() > 0);
}
function Add($name, $gid, $pass) {
- if($this->Exists($name)) return 0;
-
- $GLOBALS['db']->Execute('INSERT INTO users (user, gid, password) VALUES (?, ?, ?)',
- array($name, $gid, $pass));
-
- return $GLOBALS['db']->Insert_ID();
+ if($this->Exists($name)) return 0;
+
+ $GLOBALS['db']->Execute('INSERT INTO users (user, gid, password) VALUES (?, ?, ?)',
+ array($name, $gid, $pass));
+
+ return $GLOBALS['db']->Insert_ID();
}
function ChangePassword($id = -1, $new_pass) {
- if($id < 0) $id = $this->uid;
-
- $GLOBALS['db']->Execute('UPDATE users SET password = ? WHERE id = ?', array($new_pass, $id));
-
- return ($GLOBALS['db']->Affected_Rows() > 0);
+ if($id < 0) $id = $this->uid;
+
+ $GLOBALS['db']->Execute('UPDATE users SET password = ? WHERE id = ?', array($new_pass, $id));
+
+ return ($GLOBALS['db']->Affected_Rows() > 0);
}
function ChangeGroup($id, $gid) {
- $GLOBALS['db']->Execute('UPDATE users SET gid = ? WHERE id = ?', array($gid, $id));
-
- return ($GLOBALS['db']->Affected_Rows() > 0);
+ $GLOBALS['db']->Execute('UPDATE users SET gid = ? WHERE id = ?', array($gid, $id));
+
+ return ($GLOBALS['db']->Affected_Rows() > 0);
}
function Rename($id, $new_name) {
- $GLOBALS['db']->Execute('UPDATE users SET user = ? WHERE id = ?', array($new_name, $id));
-
- return ($GLOBALS['db']->Affected_Rows() > 0);
+ $GLOBALS['db']->Execute('UPDATE users SET user = ? WHERE id = ?', array($new_name, $id));
+
+ return ($GLOBALS['db']->Affected_Rows() > 0);
}
function Delete($id) {
- $GLOBALS['db']->Execute('DELETE FROM users WHERE id = ?', $id);
-
- return ($GLOBALS['db']->Affected_Rows() > 0);
+ $GLOBALS['db']->Execute('DELETE FROM users WHERE id = ?', $id);
+
+ return ($GLOBALS['db']->Affected_Rows() > 0);
}
}
diff --git a/code/util.inc.php b/code/util.inc.php
index 194102f..4b498e7 100644
--- a/code/util.inc.php
+++ b/code/util.inc.php
@@ -12,12 +12,12 @@
if(get_magic_quotes_gpc()) {
function Unquote($string) {
- return stripslashes($string);
- }
+ return stripslashes($string);
+ }
}
else {
function Unquote($string) {
- return $string;
- }
+ return $string;
+ }
}
?>
diff --git a/config/config.inc.php b/config/config.inc.php
index d12c7ba..2175083 100644
--- a/config/config.inc.php
+++ b/config/config.inc.php
@@ -1,23 +1,23 @@
<?PHP
// main options
- $GLOBALS['config']['language'] = 'de';
- $GLOBALS['config']['home'] = 'Home:Startseite';
+ $GLOBALS['config']['language'] = 'de';
+ $GLOBALS['config']['home'] = 'Home:Startseite';
// database connection
- $GLOBALS['config']['driver'] = 'mysql';
- $GLOBALS['config']['server'] = 'localhost';
+ $GLOBALS['config']['driver'] = 'mysql';
+ $GLOBALS['config']['server'] = 'localhost';
- $GLOBALS['config']['user'] = 'gamezock';
- $GLOBALS['config']['password'] = 'thegzpass';
+ $GLOBALS['config']['user'] = 'neon';
+ $GLOBALS['config']['password'] = 'neon';
- $GLOBALS['config']['db'] = 'gamezock-2';
+ $GLOBALS['config']['db'] = 'neon';
// page design
$GLOBALS['config']['default_style'] = 'GreenGrid';
- $GLOBALS['config']['title'] = 'Neon - ';
+ $GLOBALS['config']['title'] = 'Neon - ';
?>
diff --git a/lang/de.inc.php b/lang/de.inc.php
index 8c6b21b..868301b 100644
--- a/lang/de.inc.php
+++ b/lang/de.inc.php
@@ -1,7 +1,7 @@
<?PHP
- $message['Error'] = 'Fehler';
+ $message['Error'] = 'Fehler';
$message['PageNotFound'] = 'Die Seite \'$page\' existiert nicht.';
$message['Forbidden'] = 'Die Seite \'$page\' ist geschützt.';
$message['InternalError'] = 'Ein interner Fehler ist aufgetreten.';
- $message['LoginError'] = 'Login fehlgeschlagen. Username oder Passwort ist falsch.';
+ $message['LoginError'] = 'Login fehlgeschlagen. Username oder Passwort ist falsch.';
?>