Commit 316369a0 authored by pedro_morgan's avatar pedro_morgan

* Fixed `update` column in mysql definition which had no backticks

* Silenced error in login/index.php
parent 100be1aa
Some guidelines for web development with php.
-----------------------------------------------------
Unix Line Breaks Only, NO windows breaks please.
Tabs set at 4 spaces either as tabs or spaces.
* Unix Line Breaks Only, NO windows breaks please.
* Tabs set at 4 spaces either as tabs or spaces.
* no accidental _<?php space before, within or after a file
* every php file starts and end with <?php ?> no spaces before or after
* error_reporting(E_ALL|E_STRICT) , yep php5
* Magic quotes is gone in php6, get used to it now. config = magic_quotes_gpc() Everything must be quoted
please mark any section that nned review or work on with
// TODO
Pear coding guiidelines
......
......@@ -10,7 +10,7 @@
# --------------------------------------------------------
#
# Tabellenstruktur fr Tabelle `mail_blacklist`
# Tabellenstruktur fr Tabelle `mail_blacklist`
#
DROP TABLE IF EXISTS mail_blacklist;
......@@ -30,14 +30,14 @@ CREATE TABLE mail_blacklist (
) TYPE=MyISAM;
#
# Daten fr Tabelle `mail_blacklist`
# Daten fr Tabelle `mail_blacklist`
#
INSERT INTO mail_blacklist VALUES (2, 1, 0, 'riud', 'riud', '', 1, 'till@test.int', 'till@test.int', '0');
# --------------------------------------------------------
#
# Tabellenstruktur fr Tabelle `mail_box`
# Tabellenstruktur fr Tabelle `mail_box`
#
DROP TABLE IF EXISTS mail_box;
......@@ -65,7 +65,7 @@ CREATE TABLE mail_box (
) TYPE=MyISAM;
#
# Daten fr Tabelle `mail_box`
# Daten fr Tabelle `mail_box`
#
INSERT INTO mail_box VALUES (1, 1, 0, 'riud', 'riud', '', 1, 'tt@test.int', '$1$tRlfKeOB$iHJgCn8mH8x/dh/XWy6v0/', '', '', 0, 0, '/var/spool/mail/till', '100', '0', '', '1');
......@@ -73,7 +73,7 @@ INSERT INTO mail_box VALUES (2, 1, 0, 'riud', 'riud', '', 1, 'moin@test.int', '$
# --------------------------------------------------------
#
# Tabellenstruktur fr Tabelle `mail_domain`
# Tabellenstruktur fr Tabelle `mail_domain`
#
DROP TABLE IF EXISTS mail_domain;
......@@ -94,7 +94,7 @@ CREATE TABLE mail_domain (
) TYPE=MyISAM;
#
# Daten fr Tabelle `mail_domain`
# Daten fr Tabelle `mail_domain`
#
INSERT INTO mail_domain VALUES (1, 1, 0, 'riud', 'riud', '', 1, 'test.int', 'local', '', 1);
......@@ -102,7 +102,7 @@ INSERT INTO mail_domain VALUES (2, 1, 0, 'riud', 'riud', '', 1, 'test2.int', 'al
# --------------------------------------------------------
#
# Tabellenstruktur fr Tabelle `mail_domain_catchall`
# Tabellenstruktur fr Tabelle `mail_domain_catchall`
#
DROP TABLE IF EXISTS mail_domain_catchall;
......@@ -122,14 +122,14 @@ CREATE TABLE mail_domain_catchall (
) TYPE=MyISAM;
#
# Daten fr Tabelle `mail_domain_catchall`
# Daten fr Tabelle `mail_domain_catchall`
#
INSERT INTO mail_domain_catchall VALUES (1, 1, 1, 'riud', 'riud', '', 1, 'test.int', 'till@test.int', '1');
# --------------------------------------------------------
#
# Tabellenstruktur fr Tabelle `mail_greylist`
# Tabellenstruktur fr Tabelle `mail_greylist`
#
DROP TABLE IF EXISTS mail_greylist;
......@@ -145,13 +145,13 @@ CREATE TABLE mail_greylist (
) TYPE=MyISAM;
#
# Daten fr Tabelle `mail_greylist`
# Daten fr Tabelle `mail_greylist`
#
# --------------------------------------------------------
#
# Tabellenstruktur fr Tabelle `mail_mailman_domain`
# Tabellenstruktur fr Tabelle `mail_mailman_domain`
#
DROP TABLE IF EXISTS mail_mailman_domain;
......@@ -167,13 +167,13 @@ CREATE TABLE mail_mailman_domain (
) TYPE=MyISAM;
#
# Daten fr Tabelle `mail_mailman_domain`
# Daten fr Tabelle `mail_mailman_domain`
#
# --------------------------------------------------------
#
# Tabellenstruktur fr Tabelle `mail_redirect`
# Tabellenstruktur fr Tabelle `mail_redirect`
#
DROP TABLE IF EXISTS mail_redirect;
......@@ -194,14 +194,14 @@ CREATE TABLE mail_redirect (
) TYPE=MyISAM;
#
# Daten fr Tabelle `mail_redirect`
# Daten fr Tabelle `mail_redirect`
#
INSERT INTO mail_redirect VALUES (1, 1, 0, 'riud', 'riud', '', 1, 'tom@test.int', 'tt@test.int', 'alias', '1');
# --------------------------------------------------------
#
# Tabellenstruktur fr Tabelle `mail_spamfilter`
# Tabellenstruktur fr Tabelle `mail_spamfilter`
#
DROP TABLE IF EXISTS mail_spamfilter;
......@@ -226,7 +226,7 @@ CREATE TABLE mail_spamfilter (
) TYPE=MyISAM;
#
# Daten fr Tabelle `mail_spamfilter`
# Daten fr Tabelle `mail_spamfilter`
#
INSERT INTO mail_spamfilter VALUES (1, 0, 0, '', '', '', 1, 'till@test.int', 100, 100, 1, '***SPAM mag ich nicht***', '/var/spool/mail/spam', 0, '1');
......@@ -234,7 +234,7 @@ INSERT INTO mail_spamfilter VALUES (2, 1, 0, 'riud', 'riud', '', 1, 'till2@test.
# --------------------------------------------------------
#
# Tabellenstruktur fr Tabelle `mail_transport`
# Tabellenstruktur fr Tabelle `mail_transport`
#
DROP TABLE IF EXISTS mail_transport;
......@@ -255,13 +255,13 @@ CREATE TABLE mail_transport (
) TYPE=MyISAM;
#
# Daten fr Tabelle `mail_transport`
# Daten fr Tabelle `mail_transport`
#
# --------------------------------------------------------
#
# Tabellenstruktur fr Tabelle `mail_whitelist`
# Tabellenstruktur fr Tabelle `mail_whitelist`
#
DROP TABLE IF EXISTS mail_whitelist;
......@@ -281,13 +281,13 @@ CREATE TABLE mail_whitelist (
) TYPE=MyISAM;
#
# Daten fr Tabelle `mail_whitelist`
# Daten fr Tabelle `mail_whitelist`
#
# --------------------------------------------------------
#
# Tabellenstruktur fr Tabelle `reseller`
# Tabellenstruktur fr Tabelle `reseller`
#
DROP TABLE IF EXISTS reseller;
......@@ -326,13 +326,13 @@ CREATE TABLE reseller (
) TYPE=MyISAM;
#
# Daten fr Tabelle `reseller`
# Daten fr Tabelle `reseller`
#
# --------------------------------------------------------
#
# Tabellenstruktur fr Tabelle `rr`
# Tabellenstruktur fr Tabelle `rr`
#
DROP TABLE IF EXISTS rr;
......@@ -354,7 +354,7 @@ CREATE TABLE rr (
) TYPE=MyISAM;
#
# Daten fr Tabelle `rr`
# Daten fr Tabelle `rr`
#
INSERT INTO rr VALUES (1, 2, '1', 'PTR', 'www.ensign.de.', 0, 86400, 1, 0, 'riud', 'riud', '');
......@@ -363,7 +363,7 @@ INSERT INTO rr VALUES (3, 1, 'ensign.de', 'A', '192.168.0.1', 0, 86400, 1, 0, 'r
# --------------------------------------------------------
#
# Tabellenstruktur fr Tabelle `server`
# Tabellenstruktur fr Tabelle `server`
#
DROP TABLE IF EXISTS server;
......@@ -382,20 +382,20 @@ CREATE TABLE server (
db_server tinyint(4) NOT NULL default '0',
vserver_server tinyint(4) NOT NULL default '0',
config text NOT NULL,
update tinyint(4) NOT NULL default '0',
`update` tinyint(4) NOT NULL default '0',
active tinyint(4) NOT NULL default '1',
PRIMARY KEY (server_id)
) TYPE=MyISAM;
#
# Daten fr Tabelle `server`
# Daten fr Tabelle `server`
#
INSERT INTO server VALUES (1, 1, 1, 'riud', 'riud', '', 'Server 1', 1, 0, 0, 0, 0, 0, '[global]\r\nwebserver=apache\r\nmailserver=exim\r\ndnsserver=mydns\r\n\r\n[mail]\r\nmodule=exim_mysql\r\nmaildir_path=/var/spool/mail/[domain]/[localpart]\r\nmailuser_uid=0\r\nmailuser_gid=0', 0, 1);
# --------------------------------------------------------
#
# Tabellenstruktur fr Tabelle `soa`
# Tabellenstruktur fr Tabelle `soa`
#
DROP TABLE IF EXISTS soa;
......@@ -423,7 +423,7 @@ CREATE TABLE soa (
) TYPE=MyISAM;
#
# Daten fr Tabelle `soa`
# Daten fr Tabelle `soa`
#
INSERT INTO soa VALUES (1, 'ensign.de.', 'ns1.example.com.', 'admin.example.com.', 2006012103, 28800, 7200, 604800, 86400, 86400, 'Y', '', 1, 0, 'riud', 'riud', '');
......@@ -431,7 +431,7 @@ INSERT INTO soa VALUES (2, '0.168.192.in-addr.arpa.', 'ns1.example.com.', 'admin
# --------------------------------------------------------
#
# Tabellenstruktur fr Tabelle `sys_datalog`
# Tabellenstruktur fr Tabelle `sys_datalog`
#
DROP TABLE IF EXISTS sys_datalog;
......@@ -448,13 +448,13 @@ CREATE TABLE sys_datalog (
) TYPE=MyISAM;
#
# Daten fr Tabelle `sys_datalog`
# Daten fr Tabelle `sys_datalog`
#
# --------------------------------------------------------
#
# Tabellenstruktur fr Tabelle `sys_dbsync`
# Tabellenstruktur fr Tabelle `sys_dbsync`
#
DROP TABLE IF EXISTS sys_dbsync;
......@@ -477,13 +477,13 @@ CREATE TABLE sys_dbsync (
) TYPE=MyISAM;
#
# Daten fr Tabelle `sys_dbsync`
# Daten fr Tabelle `sys_dbsync`
#
# --------------------------------------------------------
#
# Tabellenstruktur fr Tabelle `sys_filesync`
# Tabellenstruktur fr Tabelle `sys_filesync`
#
DROP TABLE IF EXISTS sys_filesync;
......@@ -502,13 +502,13 @@ CREATE TABLE sys_filesync (
) TYPE=MyISAM;
#
# Daten fr Tabelle `sys_filesync`
# Daten fr Tabelle `sys_filesync`
#
# --------------------------------------------------------
#
# Tabellenstruktur fr Tabelle `sys_group`
# Tabellenstruktur fr Tabelle `sys_group`
#
DROP TABLE IF EXISTS sys_group;
......@@ -520,7 +520,7 @@ CREATE TABLE sys_group (
) TYPE=MyISAM;
#
# Daten fr Tabelle `sys_group`
# Daten fr Tabelle `sys_group`
#
INSERT INTO sys_group VALUES (1, 'admin', 'Administrators group');
......@@ -528,7 +528,7 @@ INSERT INTO sys_group VALUES (2, 'user', 'Users Group');
# --------------------------------------------------------
#
# Tabellenstruktur fr Tabelle `sys_user`
# Tabellenstruktur fr Tabelle `sys_user`
#
DROP TABLE IF EXISTS sys_user;
......@@ -564,7 +564,7 @@ CREATE TABLE sys_user (
) TYPE=MyISAM;
#
# Daten fr Tabelle `sys_user`
# Daten fr Tabelle `sys_user`
#
INSERT INTO sys_user VALUES (1, 1, 0, 'riud', 'riud', '', 'admin', '21232f297a57a5a743894a0e4a801fc3', 'admin,designer,mail,dns', 'admin', 'default', 'admin', 1, '', 'Administrator', '', '', '', '', '', '', '', '', '', 'en', '1,2', 0);
......
......@@ -56,14 +56,15 @@ public function render() {
if($username != '' and $passwort != '') {
$sql = "SELECT * FROM sys_user WHERE USERNAME = '$username' and ( PASSWORT = '".md5($passwort)."' or PASSWORT = password('$passwort') )";
if($user = $app->db->queryOneRecord($sql)) {
$user = $app->db->queryOneRecord($sql);
if($user) {
if($user['active'] == 1) {
$user = $app->db->toLower($user);
$_SESSION = array();
$_SESSION['s']['user'] = $user;
$_SESSION['s']['user']['theme'] = $user['app_theme'];
$_SESSION['s']['language'] = $user['language'];
//print_r($_SESSION);
if(is_file($_SESSION['s']['user']['startmodule'].'/lib/module.conf.php')) {
include_once($_SESSION['s']['user']['startmodule'].'/lib/module.conf.php');
$_SESSION['s']['module'] = $module;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment