From 336a577f2809c9760e7a1a15f10f523b2cf20c8d Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Tue, 01 Nov 2005 17:59:29 -0500
Subject: [PATCH] Added Server table
---
interface/lib/config.inc.php | 3
interface/lib/classes/tform_tpl_generator.inc.php | 48 ++
interface/web/admin/form/server.tform.php | 124 +++++++
interface/web/sites/lib/module.conf.php | 3
interface/web/themes/default/templates/main.tpl.htm | 4
interface/web/admin/templates/server_edit_services.htm | 60 +++
interface/lib/app.inc.php | 2
interface/web/admin/server_edit.php | 56 +++
interface/web/admin/lib/lang/en_server.lng | 13
interface/web/admin/lib/module.conf.php | 221 +++++++------
interface/sql/ispconfig3db.sql | 436 +++++++++++++++----------
11 files changed, 684 insertions(+), 286 deletions(-)
diff --git a/interface/lib/app.inc.php b/interface/lib/app.inc.php
index 1f4ebd9..dc25cc8 100644
--- a/interface/lib/app.inc.php
+++ b/interface/lib/app.inc.php
@@ -136,9 +136,11 @@
}
function tpl_defaults() {
+ global $conf;
$this->tpl->setVar('theme',$_SESSION["s"]["theme"]);
$this->tpl->setVar('phpsessid',session_id());
+ $this->tpl->setVar('html_content_encoding',$conf["html_content_encoding"]);
}
diff --git a/interface/lib/classes/tform_tpl_generator.inc.php b/interface/lib/classes/tform_tpl_generator.inc.php
index a9d35ee..1a78288 100644
--- a/interface/lib/classes/tform_tpl_generator.inc.php
+++ b/interface/lib/classes/tform_tpl_generator.inc.php
@@ -153,7 +153,7 @@
// ansonsten wird sie angelegt
$tables = $app->db->getTables();
- if(!in_array($formDef['db_table'],$tables)) {
+ if(!@in_array($formDef['db_table'],$tables)) {
// Datenbank noch nicht vorhanden
$columns = array();
@@ -172,6 +172,52 @@
$columns[] = $col;
$app->db->show_error_messages = true;
+ if($formDef["auth"] == 'yes') {
+
+ $col = array( 'action' => 'add',
+ 'name' => 'sys_userid',
+ 'type' => 'int32',
+ 'typeValue' => '',
+ 'defaultValue' => '',
+ 'notNull' => true
+ );
+ $columns[] = $col;
+ $col = array( 'action' => 'add',
+ 'name' => 'sys_groupid',
+ 'type' => 'int32',
+ 'typeValue' => '',
+ 'defaultValue' => '',
+ 'notNull' => true
+ );
+ $columns[] = $col;
+ $col = array( 'action' => 'add',
+ 'name' => 'sys_perm_user',
+ 'type' => 'varchar',
+ 'typeValue' => '5',
+ 'defaultValue' => '',
+ 'notNull' => true
+ );
+ $columns[] = $col;
+ $col = array( 'action' => 'add',
+ 'name' => 'sys_perm_group',
+ 'type' => 'varchar',
+ 'typeValue' => '5',
+ 'defaultValue' => '',
+ 'notNull' => true
+ );
+ $columns[] = $col;
+ $col = array( 'action' => 'add',
+ 'name' => 'sys_perm_other',
+ 'type' => 'varchar',
+ 'typeValue' => '5',
+ 'defaultValue' => '',
+ 'notNull' => true
+ );
+ $columns[] = $col;
+
+ }
+
+
foreach($formDef['tabs'] as $tab) {
foreach($tab["fields"] as $name => $field) {
/*
diff --git a/interface/lib/config.inc.php b/interface/lib/config.inc.php
index 91153a8..0fe510c 100644
--- a/interface/lib/config.inc.php
+++ b/interface/lib/config.inc.php
@@ -62,7 +62,8 @@
Themes
*/
-$conf["theme"] = 'default';
+$conf["theme"] = 'default';
+$conf["html_content_encoding"] = 'text/html; charset=iso-8859-1';
/*
Default Language
diff --git a/interface/sql/ispconfig3db.sql b/interface/sql/ispconfig3db.sql
index 33dd406..887ce2e 100644
--- a/interface/sql/ispconfig3db.sql
+++ b/interface/sql/ispconfig3db.sql
@@ -3,10 +3,264 @@
# http://www.phpmyadmin.net/ (download page)
#
# Host: localhost
-# Erstellungszeit: 18. Oktober 2005 um 16:00
-# Server Version: 4.0.22
-# PHP-Version: 5.0.2
+# Erstellungszeit: 01. November 2005 um 23:57
+# Server Version: 4.0.23
+# PHP-Version: 5.0.3
# Datenbank: `ispconfig3`
+# --------------------------------------------------------
+
+#
+# Tabellenstruktur f�r Tabelle `mail_blacklist`
+#
+
+DROP TABLE IF EXISTS mail_blacklist;
+CREATE TABLE mail_blacklist (
+ blacklist_id int(11) NOT NULL auto_increment,
+ server_id int(11) NOT NULL default '0',
+ address varchar(255) NOT NULL default '',
+ PRIMARY KEY (blacklist_id),
+ KEY server_id (server_id,address)
+) TYPE=MyISAM;
+
+#
+# Daten f�r Tabelle `mail_blacklist`
+#
+
+# --------------------------------------------------------
+
+#
+# Tabellenstruktur f�r Tabelle `mail_domain`
+#
+
+DROP TABLE IF EXISTS mail_domain;
+CREATE TABLE mail_domain (
+ domain_id int(11) NOT NULL auto_increment,
+ server_id int(11) NOT NULL default '0',
+ domain varchar(255) NOT NULL default '',
+ type enum('local','relay','manual_relay') NOT NULL default 'local',
+ relay_host varchar(255) NOT NULL default '',
+ PRIMARY KEY (domain_id),
+ KEY server_id (server_id,domain,type)
+) TYPE=MyISAM;
+
+#
+# Daten f�r Tabelle `mail_domain`
+#
+
+# --------------------------------------------------------
+
+#
+# Tabellenstruktur f�r Tabelle `mail_domain_alias`
+#
+
+DROP TABLE IF EXISTS mail_domain_alias;
+CREATE TABLE mail_domain_alias (
+ domain_alias_id int(11) NOT NULL auto_increment,
+ server_id int(11) NOT NULL default '0',
+ domain varchar(255) NOT NULL default '',
+ destination varchar(255) NOT NULL default '',
+ PRIMARY KEY (domain_alias_id),
+ KEY server_id (server_id,domain)
+) TYPE=MyISAM;
+
+#
+# Daten f�r Tabelle `mail_domain_alias`
+#
+
+# --------------------------------------------------------
+
+#
+# Tabellenstruktur f�r Tabelle `mail_domain_catchall`
+#
+
+DROP TABLE IF EXISTS mail_domain_catchall;
+CREATE TABLE mail_domain_catchall (
+ virtual_default_id int(11) NOT NULL auto_increment,
+ server_id int(11) NOT NULL default '0',
+ domain varchar(255) NOT NULL default '',
+ dest varchar(255) NOT NULL default '',
+ PRIMARY KEY (virtual_default_id),
+ KEY server_id (server_id,domain)
+) TYPE=MyISAM;
+
+#
+# Daten f�r Tabelle `mail_domain_catchall`
+#
+
+# --------------------------------------------------------
+
+#
+# Tabellenstruktur f�r Tabelle `mail_email`
+#
+
+DROP TABLE IF EXISTS mail_email;
+CREATE TABLE mail_email (
+ mailbox_id int(11) NOT NULL auto_increment,
+ server_id int(11) NOT NULL default '0',
+ email varchar(255) NOT NULL default '',
+ type enum('mailbox','alias') NOT NULL default 'mailbox',
+ cryptpwd varchar(128) NOT NULL default '',
+ clearpwd varchar(128) NOT NULL default '',
+ name varchar(128) NOT NULL default '',
+ uid int(10) unsigned NOT NULL default '0',
+ gid int(10) unsigned NOT NULL default '0',
+ maildir varchar(255) NOT NULL default '',
+ quota varchar(255) NOT NULL default '',
+ cc varchar(50) NOT NULL default '',
+ forward varchar(50) NOT NULL default '',
+ autoresponder enum('yes','no') NOT NULL default 'no',
+ autoresponder_text tinytext NOT NULL,
+ enabled enum('yes','no') NOT NULL default 'yes',
+ antivirus enum('yes','no') NOT NULL default 'no',
+ spamscan enum('yes','no') NOT NULL default 'no',
+ spamdelete enum('yes','no') NOT NULL default 'no',
+ PRIMARY KEY (mailbox_id),
+ KEY server_id (server_id,email)
+) TYPE=MyISAM;
+
+#
+# Daten f�r Tabelle `mail_email`
+#
+
+# --------------------------------------------------------
+
+#
+# Tabellenstruktur f�r Tabelle `mail_greylist`
+#
+
+DROP TABLE IF EXISTS mail_greylist;
+CREATE TABLE mail_greylist (
+ greylist_id int(11) NOT NULL auto_increment,
+ relay_ip varchar(64) default NULL,
+ from_domain varchar(255) default NULL,
+ block_expires datetime NOT NULL default '0000-00-00 00:00:00',
+ record_expires datetime NOT NULL default '0000-00-00 00:00:00',
+ origin_type enum('MANUAL','AUTO') NOT NULL default 'AUTO',
+ create_time datetime NOT NULL default '0000-00-00 00:00:00',
+ PRIMARY KEY (greylist_id)
+) TYPE=MyISAM;
+
+#
+# Daten f�r Tabelle `mail_greylist`
+#
+
+# --------------------------------------------------------
+
+#
+# Tabellenstruktur f�r Tabelle `mail_mailman_domain`
+#
+
+DROP TABLE IF EXISTS mail_mailman_domain;
+CREATE TABLE mail_mailman_domain (
+ mailman_id int(11) NOT NULL auto_increment,
+ server_id int(11) NOT NULL default '0',
+ domain varchar(255) NOT NULL default '',
+ mm_home varchar(255) NOT NULL default '',
+ mm_wrap varchar(255) NOT NULL default '',
+ mm_user varchar(50) NOT NULL default '',
+ mm_group varchar(50) NOT NULL default '',
+ PRIMARY KEY (mailman_id,server_id,domain)
+) TYPE=MyISAM;
+
+#
+# Daten f�r Tabelle `mail_mailman_domain`
+#
+
+# --------------------------------------------------------
+
+#
+# Tabellenstruktur f�r Tabelle `mail_whitelist`
+#
+
+DROP TABLE IF EXISTS mail_whitelist;
+CREATE TABLE mail_whitelist (
+ whitelist_id int(11) NOT NULL auto_increment,
+ server_id int(11) NOT NULL default '0',
+ address varchar(255) NOT NULL default '',
+ PRIMARY KEY (whitelist_id),
+ KEY server_id (server_id,address)
+) TYPE=MyISAM;
+
+#
+# Daten f�r Tabelle `mail_whitelist`
+#
+
+# --------------------------------------------------------
+
+#
+# Tabellenstruktur f�r Tabelle `reseller`
+#
+
+DROP TABLE IF EXISTS reseller;
+CREATE TABLE reseller (
+ reseller_id bigint(20) NOT NULL auto_increment,
+ sys_userid int(11) NOT NULL default '0',
+ sys_groupid int(11) NOT NULL default '0',
+ sys_perm_user varchar(5) NOT NULL default '',
+ sys_perm_group varchar(5) NOT NULL default '',
+ sys_perm_other varchar(5) NOT NULL default '',
+ company varchar(255) NOT NULL default '',
+ title varchar(255) NOT NULL default '',
+ firstname varchar(255) NOT NULL default '',
+ surname varchar(255) NOT NULL default '',
+ street varchar(255) NOT NULL default '',
+ zip varchar(255) NOT NULL default '',
+ city varchar(255) NOT NULL default '',
+ country varchar(255) NOT NULL default '',
+ telephone varchar(255) NOT NULL default '',
+ mobile varchar(255) NOT NULL default '',
+ fax varchar(255) NOT NULL default '',
+ email varchar(255) NOT NULL default '',
+ internet varchar(255) NOT NULL default '',
+ icq varchar(255) NOT NULL default '',
+ notes text NOT NULL,
+ limit_client int(11) NOT NULL default '-1',
+ limit_domain int(11) NOT NULL default '-1',
+ limit_subdomain int(11) NOT NULL default '-1',
+ limit_mailbox int(11) NOT NULL default '-1',
+ limit_mailalias int(11) NOT NULL default '-1',
+ limit_webquota int(11) NOT NULL default '-1',
+ limit_mailquota int(11) NOT NULL default '-1',
+ limit_database int(11) NOT NULL default '-1',
+ ip_address text NOT NULL,
+ PRIMARY KEY (reseller_id)
+) TYPE=MyISAM;
+
+#
+# Daten f�r Tabelle `reseller`
+#
+
+# --------------------------------------------------------
+
+#
+# Tabellenstruktur f�r Tabelle `server`
+#
+
+DROP TABLE IF EXISTS server;
+CREATE TABLE server (
+ server_id bigint(20) NOT NULL auto_increment,
+ sys_userid int(11) NOT NULL default '0',
+ sys_groupid int(11) NOT NULL default '0',
+ sys_perm_user varchar(5) NOT NULL default '',
+ sys_perm_group varchar(5) NOT NULL default '',
+ sys_perm_other varchar(5) NOT NULL default '',
+ server_name varchar(255) NOT NULL default '',
+ mail_server int(11) NOT NULL default '0',
+ web_server int(11) NOT NULL default '0',
+ dns_server int(11) NOT NULL default '0',
+ file_server int(11) NOT NULL default '0',
+ mysql_server int(11) NOT NULL default '0',
+ postgresql_server int(11) NOT NULL default '0',
+ firebird_server int(11) NOT NULL default '0',
+ active int(11) NOT NULL default '1',
+ PRIMARY KEY (server_id)
+) TYPE=MyISAM;
+
+#
+# Daten f�r Tabelle `server`
+#
+
+INSERT INTO server VALUES (1, 1, 1, 'riud', 'riud', '', 'Server 1', 1, 0, 0, 0, 0, 0, 0, 1);
# --------------------------------------------------------
#
@@ -147,179 +401,3 @@
INSERT INTO sys_user VALUES (1, 1, 0, 'riud', 'riud', '', 'admin', '21232f297a57a5a743894a0e4a801fc3', 'admin,clients,designer,resellers,sites', 'admin', 'default', 'admin', 1, '', 'Administrator', '', '', '', '', '', '', '', '', '', 'en', '1,2', 0);
-
-#
-# Tabellenstruktur f�r Tabelle `mail_blacklist`
-#
-
-DROP TABLE IF EXISTS mail_blacklist;
-CREATE TABLE mail_blacklist (
- blacklist_id int(11) NOT NULL auto_increment,
- server_id int(11) NOT NULL default '0',
- address varchar(255) NOT NULL default '',
- PRIMARY KEY (blacklist_id),
- KEY server_id (server_id,address)
-) TYPE=MyISAM;
-# --------------------------------------------------------
-
-#
-# Tabellenstruktur f�r Tabelle `mail_domain`
-#
-
-DROP TABLE IF EXISTS mail_domain;
-CREATE TABLE mail_domain (
- domain_id int(11) NOT NULL auto_increment,
- server_id int(11) NOT NULL default '0',
- domain varchar(255) NOT NULL default '',
- type enum('local','relay','manual_relay') NOT NULL default 'local',
- relay_host varchar(255) NOT NULL default '',
- PRIMARY KEY (domain_id),
- KEY server_id (server_id,domain,type)
-) TYPE=MyISAM;
-# --------------------------------------------------------
-
-#
-# Tabellenstruktur f�r Tabelle `mail_domain_alias`
-#
-
-DROP TABLE IF EXISTS mail_domain_alias;
-CREATE TABLE mail_domain_alias (
- domain_alias_id int(11) NOT NULL auto_increment,
- server_id int(11) NOT NULL default '0',
- domain varchar(255) NOT NULL default '',
- destination varchar(255) NOT NULL default '',
- PRIMARY KEY (domain_alias_id),
- KEY server_id (server_id,domain)
-) TYPE=MyISAM;
-# --------------------------------------------------------
-
-#
-# Tabellenstruktur f�r Tabelle `mail_domain_catchall`
-#
-
-DROP TABLE IF EXISTS mail_domain_catchall;
-CREATE TABLE mail_domain_catchall (
- virtual_default_id int(11) NOT NULL auto_increment,
- server_id int(11) NOT NULL default '0',
- domain varchar(255) NOT NULL default '',
- dest varchar(255) NOT NULL default '',
- PRIMARY KEY (virtual_default_id),
- KEY server_id (server_id,domain)
-) TYPE=MyISAM;
-# --------------------------------------------------------
-
-#
-# Tabellenstruktur f�r Tabelle `mail_email`
-#
-
-DROP TABLE IF EXISTS mail_email;
-CREATE TABLE mail_email (
- mailbox_id int(11) NOT NULL auto_increment,
- server_id int(11) NOT NULL default '0',
- email varchar(255) NOT NULL default '',
- type enum('mailbox','alias') NOT NULL default 'mailbox',
- cryptpwd varchar(128) NOT NULL default '',
- clearpwd varchar(128) NOT NULL default '',
- name varchar(128) NOT NULL default '',
- uid int(10) unsigned NOT NULL default '0',
- gid int(10) unsigned NOT NULL default '0',
- maildir varchar(255) NOT NULL default '',
- quota varchar(255) NOT NULL default '',
- cc varchar(50) NOT NULL default '',
- forward varchar(50) NOT NULL default '',
- autoresponder enum('yes','no') NOT NULL default 'no',
- autoresponder_text tinytext NOT NULL,
- enabled enum('yes','no') NOT NULL default 'yes',
- antivirus enum('yes','no') NOT NULL default 'no',
- spamscan enum('yes','no') NOT NULL default 'no',
- spamdelete enum('yes','no') NOT NULL default 'no',
- PRIMARY KEY (mailbox_id),
- KEY server_id (server_id,email)
-) TYPE=MyISAM;
-# --------------------------------------------------------
-
-#
-# Tabellenstruktur f�r Tabelle `mail_greylist`
-#
-
-DROP TABLE IF EXISTS mail_greylist;
-CREATE TABLE mail_greylist (
- greylist_id int(11) NOT NULL auto_increment,
- relay_ip varchar(64) default NULL,
- from_domain varchar(255) default NULL,
- block_expires datetime NOT NULL default '0000-00-00 00:00:00',
- record_expires datetime NOT NULL default '0000-00-00 00:00:00',
- origin_type enum('MANUAL','AUTO') NOT NULL default 'AUTO',
- create_time datetime NOT NULL default '0000-00-00 00:00:00',
- PRIMARY KEY (greylist_id)
-) TYPE=MyISAM;
-# --------------------------------------------------------
-
-#
-# Tabellenstruktur f�r Tabelle `mail_mailman_domain`
-#
-
-DROP TABLE IF EXISTS mail_mailman_domain;
-CREATE TABLE mail_mailman_domain (
- mailman_id int(11) NOT NULL auto_increment,
- server_id int(11) NOT NULL default '0',
- domain varchar(255) NOT NULL default '',
- mm_home varchar(255) NOT NULL default '',
- mm_wrap varchar(255) NOT NULL default '',
- mm_user varchar(50) NOT NULL default '',
- mm_group varchar(50) NOT NULL default '',
- PRIMARY KEY (mailman_id,server_id,domain)
-) TYPE=MyISAM;
-# --------------------------------------------------------
-
-#
-# Tabellenstruktur f�r Tabelle `mail_whitelist`
-#
-
-DROP TABLE IF EXISTS mail_whitelist;
-CREATE TABLE mail_whitelist (
- whitelist_id int(11) NOT NULL auto_increment,
- server_id int(11) NOT NULL default '0',
- address varchar(255) NOT NULL default '',
- PRIMARY KEY (whitelist_id),
- KEY server_id (server_id,address)
-) TYPE=MyISAM;
-
-#
-# Tabellenstruktur f�r Tabelle `reseller`
-#
-
-CREATE TABLE reseller (
- reseller_id bigint(20) NOT NULL auto_increment,
- sys_userid int(11) NOT NULL default '0',
- sys_groupid int(11) NOT NULL default '0',
- sys_perm_user varchar(5) NOT NULL default '',
- sys_perm_group varchar(5) NOT NULL default '',
- sys_perm_other varchar(5) NOT NULL default '',
- company varchar(255) NOT NULL default '',
- title varchar(255) NOT NULL default '',
- firstname varchar(255) NOT NULL default '',
- surname varchar(255) NOT NULL default '',
- street varchar(255) NOT NULL default '',
- zip varchar(255) NOT NULL default '',
- city varchar(255) NOT NULL default '',
- country varchar(255) NOT NULL default '',
- telephone varchar(255) NOT NULL default '',
- mobile varchar(255) NOT NULL default '',
- fax varchar(255) NOT NULL default '',
- email varchar(255) NOT NULL default '',
- internet varchar(255) NOT NULL default '',
- icq varchar(255) NOT NULL default '',
- notes text NOT NULL,
- limit_client int(11) NOT NULL default '-1',
- limit_domain int(11) NOT NULL default '-1',
- limit_subdomain int(11) NOT NULL default '-1',
- limit_mailbox int(11) NOT NULL default '-1',
- limit_mailalias int(11) NOT NULL default '-1',
- limit_webquota int(11) NOT NULL default '-1',
- limit_mailquota int(11) NOT NULL default '-1',
- limit_database int(11) NOT NULL default '-1',
- ip_address text NOT NULL,
- PRIMARY KEY (reseller_id)
-) TYPE=MyISAM;
-# --------------------------------------------------------
\ No newline at end of file
diff --git a/interface/web/admin/form/server.tform.php b/interface/web/admin/form/server.tform.php
new file mode 100644
index 0000000..95759ae
--- /dev/null
+++ b/interface/web/admin/form/server.tform.php
@@ -0,0 +1,124 @@
+<?php
+
+/*
+ Form Definition
+
+ Tabledefinition
+
+ Datatypes:
+ - INTEGER (Forces the input to Int)
+ - DOUBLE
+ - CURRENCY (Formats the values to currency notation)
+ - VARCHAR (no format check, maxlength: 255)
+ - TEXT (no format check)
+ - DATE (Dateformat, automatic conversion to timestamps)
+
+ Formtype:
+ - TEXT (Textfield)
+ - TEXTAREA (Textarea)
+ - PASSWORD (Password textfield, input is not shown when edited)
+ - SELECT (Select option field)
+ - RADIO
+ - CHECKBOX
+ - CHECKBOXARRAY
+ - FILE
+
+ VALUE:
+ - Wert oder Array
+
+ Hint:
+ The ID field of the database table is not part of the datafield definition.
+ The ID field must be always auto incement (int or bigint).
+
+
+*/
+
+$form["title"] = "Server";
+$form["description"] = "";
+$form["name"] = "server";
+$form["action"] = "server_edit.php";
+$form["db_table"] = "server";
+$form["db_table_idx"] = "server_id";
+$form["db_history"] = "no";
+$form["tab_default"] = "services";
+$form["list_default"] = "server_list.php";
+$form["auth"] = 'yes';
+
+$form["auth_preset"]["userid"] = 0; // 0 = id of the user, > 0 id must match with id of current user
+$form["auth_preset"]["groupid"] = 1; // 0 = default groupid of the user, > 0 id must match with groupid of current user
+$form["auth_preset"]["perm_user"] = 'riud'; //r = read, i = insert, u = update, d = delete
+$form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete
+$form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete
+
+$form["tabs"]['services'] = array (
+ 'title' => "Services",
+ 'width' => 100,
+ 'template' => "templates/server_edit_services.htm",
+ 'fields' => array (
+ ##################################
+ # Begin Datatable fields
+ ##################################
+ 'server_name' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'default' => '',
+ 'value' => '',
+ 'width' => '30',
+ 'maxlength' => '255'
+ ),
+ 'mail_server' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'CHECKBOX',
+ 'default' => '0',
+ 'value' => '1'
+ ),
+ 'web_server' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'CHECKBOX',
+ 'default' => '0',
+ 'value' => '1'
+ ),
+ 'dns_server' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'CHECKBOX',
+ 'default' => '0',
+ 'value' => '1'
+ ),
+ 'file_server' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'CHECKBOX',
+ 'default' => '0',
+ 'value' => '1'
+ ),
+ 'mysql_server' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'CHECKBOX',
+ 'default' => '0',
+ 'value' => '1'
+ ),
+ 'postgresql_server' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'CHECKBOX',
+ 'default' => '0',
+ 'value' => '1'
+ ),
+ 'firebird_server' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'CHECKBOX',
+ 'default' => '0',
+ 'value' => '1'
+ ),
+ 'active' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'SELECT',
+ 'default' => '1',
+ 'value' => array(0 => 'No', 1 => 'Yes')
+ ),
+ ##################################
+ # ENDE Datatable fields
+ ##################################
+ )
+);
+
+
+?>
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/en_server.lng b/interface/web/admin/lib/lang/en_server.lng
new file mode 100644
index 0000000..a83a900
--- /dev/null
+++ b/interface/web/admin/lib/lang/en_server.lng
@@ -0,0 +1,13 @@
+<?php
+$wb["server_name_txt"] = 'Servername';
+$wb["mail_server_txt"] = 'Mailserver';
+$wb["web_server_txt"] = 'Webserver';
+$wb["dns_server_txt"] = 'DNS-Server';
+$wb["file_server_txt"] = 'Fileserver';
+$wb["mysql_server_txt"] = 'MySQL-Server';
+$wb["postgresql_server_txt"] = 'PostgreSQL-Server';
+$wb["firebird_server_txt"] = 'Firebird-Server';
+$wb["active_txt"] = 'Active';
+$wb["btn_save_txt"] = 'Save';
+$wb["btn_cancel_txt"] = 'Cancel';
+?>
\ No newline at end of file
diff --git a/interface/web/admin/lib/module.conf.php b/interface/web/admin/lib/module.conf.php
index 7ee168e..d1261e4 100644
--- a/interface/web/admin/lib/module.conf.php
+++ b/interface/web/admin/lib/module.conf.php
@@ -1,103 +1,120 @@
-<?php
-
-$module["name"] = "admin";
-$module["title"] = "System";
-$module["template"] = "module.tpl.htm";
-$module["startpage"] = "admin/users_list.php";
-$module["tab_width"] = '60';
-
-
-$items[] = array( 'title' => "Add user",
- 'target' => 'content',
- 'link' => 'admin/users_edit.php');
-
-$items[] = array( 'title' => "Edit user",
- 'target' => 'content',
- 'link' => 'admin/users_list.php');
-
-
-$module["nav"][] = array( 'title' => 'Users',
- 'open' => 1,
- 'items' => $items);
-
-
-// aufr�umen
-unset($items);
-
-$items[] = array( 'title' => "Add group",
- 'target' => 'content',
- 'link' => 'admin/groups_edit.php');
-
-$items[] = array( 'title' => "Edit group",
- 'target' => 'content',
- 'link' => 'admin/groups_list.php');
-
-
-$module["nav"][] = array( 'title' => 'Groups',
- 'open' => 1,
- 'items' => $items);
-
-
-// aufr�umen
-unset($items);
-
-$items[] = array( 'title' => "Add user",
- 'target' => 'content',
- 'link' => 'admin/dbsync_edit.php');
-
-$items[] = array( 'title' => "Edit user",
- 'target' => 'content',
- 'link' => 'admin/dbsync_list.php');
-
-
-$items[] = array( 'title' => "Sync. Now",
- 'target' => 'content',
- 'link' => 'admin/dbsync_cron.php');
-
-$module["nav"][] = array( 'title' => 'DB Sync.',
- 'open' => 1,
- 'items' => $items);
-
-
-// aufr�umen
-unset($items);
-
-$items[] = array( 'title' => "Add user",
- 'target' => 'content',
- 'link' => 'admin/filesync_edit.php');
-
-$items[] = array( 'title' => "Edit user",
- 'target' => 'content',
- 'link' => 'admin/filesync_list.php');
-
-
-$module["nav"][] = array( 'title' => 'File Sync.',
- 'open' => 1,
- 'items' => $items);
-
-
-// aufr�umen
-unset($items);
-
-
-
-// Getting the admin options from other modules
-$modules = explode(',',$_SESSION["s"]["user"]["modules"]);
-if(is_array($modules)) {
- foreach($modules as $mt) {
- if(is_file($mt."/lib/admin.conf.php")) {
- $options = array();
- include_once($conf["rootpath"]."/web/".$mt."/lib/admin.conf.php");
- if(is_array($options)) {
- foreach($options as $opt) {
- $module["nav"][] = $opt;
- }
- }
- }
- }
-}
-
-
-
-
+<?php
+
+$module["name"] = "admin";
+$module["title"] = "System";
+$module["template"] = "module.tpl.htm";
+$module["startpage"] = "admin/users_list.php";
+$module["tab_width"] = '60';
+
+
+$items[] = array( 'title' => "Add user",
+ 'target' => 'content',
+ 'link' => 'admin/users_edit.php');
+
+$items[] = array( 'title' => "Edit user",
+ 'target' => 'content',
+ 'link' => 'admin/users_list.php');
+
+
+$module["nav"][] = array( 'title' => 'Users',
+ 'open' => 1,
+ 'items' => $items);
+
+
+// aufr�umen
+unset($items);
+
+$items[] = array( 'title' => "Add group",
+ 'target' => 'content',
+ 'link' => 'admin/groups_edit.php');
+
+$items[] = array( 'title' => "Edit group",
+ 'target' => 'content',
+ 'link' => 'admin/groups_list.php');
+
+
+$module["nav"][] = array( 'title' => 'Groups',
+ 'open' => 1,
+ 'items' => $items);
+
+
+// aufr�umen
+unset($items);
+
+$items[] = array( 'title' => "Add server",
+ 'target' => 'content',
+ 'link' => 'admin/server_edit.php');
+
+$items[] = array( 'title' => "Edit server",
+ 'target' => 'content',
+ 'link' => 'admin/server_list.php');
+
+
+$module["nav"][] = array( 'title' => 'Servers',
+ 'open' => 1,
+ 'items' => $items);
+
+
+// aufr�umen
+unset($items);
+
+$items[] = array( 'title' => "Add user",
+ 'target' => 'content',
+ 'link' => 'admin/dbsync_edit.php');
+
+$items[] = array( 'title' => "Edit user",
+ 'target' => 'content',
+ 'link' => 'admin/dbsync_list.php');
+
+
+$items[] = array( 'title' => "Sync. Now",
+ 'target' => 'content',
+ 'link' => 'admin/dbsync_cron.php');
+
+$module["nav"][] = array( 'title' => 'DB Sync.',
+ 'open' => 1,
+ 'items' => $items);
+
+
+// aufr�umen
+unset($items);
+
+$items[] = array( 'title' => "Add user",
+ 'target' => 'content',
+ 'link' => 'admin/filesync_edit.php');
+
+$items[] = array( 'title' => "Edit user",
+ 'target' => 'content',
+ 'link' => 'admin/filesync_list.php');
+
+
+$module["nav"][] = array( 'title' => 'File Sync.',
+ 'open' => 1,
+ 'items' => $items);
+
+
+// aufr�umen
+unset($items);
+
+
+
+// Getting the admin options from other modules
+$modules = explode(',',$_SESSION["s"]["user"]["modules"]);
+if(is_array($modules)) {
+ foreach($modules as $mt) {
+ if(is_file($mt."/lib/admin.conf.php")) {
+ $options = array();
+ include_once($conf["rootpath"]."/web/".$mt."/lib/admin.conf.php");
+ if(is_array($options)) {
+ foreach($options as $opt) {
+ $module["nav"][] = $opt;
+ }
+ }
+ }
+ }
+}
+
+
+
+
?>
\ No newline at end of file
diff --git a/interface/web/admin/server_edit.php b/interface/web/admin/server_edit.php
new file mode 100644
index 0000000..d02dc22
--- /dev/null
+++ b/interface/web/admin/server_edit.php
@@ -0,0 +1,56 @@
+<?php
+/*
+Copyright (c) 2005, Till Brehm, projektfarm Gmbh
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+ * Neither the name of ISPConfig nor the names of its contributors
+ may be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+
+/******************************************
+* Begin Form configuration
+******************************************/
+
+$tform_def_file = "form/server.tform.php";
+
+/******************************************
+* End Form configuration
+******************************************/
+
+require_once('../../lib/config.inc.php');
+require_once('../../lib/app.inc.php');
+
+// Checking module permissions
+if(!stristr($_SESSION["s"]["user"]["modules"],$_SESSION["s"]["module"]["name"])) {
+ header("Location: ../index.php");
+ exit;
+}
+
+// Loading classes
+$app->uses('tpl,tform,tform_actions');
+
+// let tform_actions handle the page
+$app->tform_actions->onLoad();
+
+?>
\ No newline at end of file
diff --git a/interface/web/admin/templates/server_edit_services.htm b/interface/web/admin/templates/server_edit_services.htm
new file mode 100644
index 0000000..0bfd701
--- /dev/null
+++ b/interface/web/admin/templates/server_edit_services.htm
@@ -0,0 +1,60 @@
+<table width="500" border="0" cellspacing="0" cellpadding="2">
+ <tr>
+ <td width="100" class="frmText11">{tmpl_var name='server_name_txt'}:</td>
+ <td class="frmText11"><input name="server_name" type="text" class="text" value="{tmpl_var name='server_name'}" size="15" maxlength="255"></td>
+ </tr>
+ <tr><td colspan="2"> </td></tr>
+ <tr><td colspan="2">
+ <fieldset style="width:205px;"><legend class="frmText11"><b>Services</b></legend>
+ <table border="0" cellspacing="0" cellpadding="2">
+ <tr>
+ <td class="frmText11">{tmpl_var name='mail_server'}</td>
+ <td class="frmText11">{tmpl_var name='mail_server_txt'}</td>
+ </tr>
+ <tr>
+ <td class="frmText11">{tmpl_var name='web_server'}</td>
+ <td class="frmText11">{tmpl_var name='web_server_txt'}</td>
+ </tr>
+ <tr>
+ <td class="frmText11">{tmpl_var name='dns_server'}</td>
+ <td class="frmText11">{tmpl_var name='dns_server_txt'}</td>
+ </tr>
+ <tr>
+ <td class="frmText11">{tmpl_var name='file_server'}</td>
+ <td class="frmText11">{tmpl_var name='file_server_txt'}</td>
+ </tr>
+ <tr>
+ <td class="frmText11">{tmpl_var name='mysql_server'}</td>
+ <td class="frmText11">{tmpl_var name='mysql_server_txt'}</td>
+ </tr>
+ <tr>
+ <td class="frmText11">{tmpl_var name='postgresql_server'}</td>
+ <td class="frmText11">{tmpl_var name='postgresql_server_txt'}</td>
+ </tr>
+ <tr>
+ <td class="frmText11">{tmpl_var name='firebird_server'}</td>
+ <td class="frmText11">{tmpl_var name='firebird_server_txt'}</td>
+ </tr>
+ </table>
+ </fieldset>
+ </td></tr>
+ <tr><td colspan="2"> </td></tr>
+ <tr>
+ <td class="frmText11">{tmpl_var name='active_txt'}:</td>
+ <td class="frmText11">
+ <select name="active" class="text">
+ {tmpl_var name='active'}
+ </select>
+ </td>
+ </tr> <tr>
+ <td class="frmText11"> </td>
+ <td class="frmText11"> </td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td><input name="btn_save" type="submit" class="button" value="{tmpl_var name='btn_save_txt'}">
+ <input name="btn_cancel" type="button" class="button" value="{tmpl_var name='btn_cancel_txt'}" onClick="self.location.href='server_list.php';">
+ </td>
+ </tr>
+</table>
+<input type="hidden" name="id" value="{tmpl_var name='id'}">
\ No newline at end of file
diff --git a/interface/web/sites/lib/module.conf.php b/interface/web/sites/lib/module.conf.php
index 1a91e04..9f2fb8d 100644
--- a/interface/web/sites/lib/module.conf.php
+++ b/interface/web/sites/lib/module.conf.php
@@ -1,10 +1,11 @@
<?php
$module = array (
'name' => 'sites',
- 'title' => 'Sites',
+ 'title' => 'Sites & Email',
'template' => 'module.tpl.htm',
'navframe_page' => '',
'startpage' => 'sites/index.php',
'tab_width' => '',
+ 'nav' => NULL,
)
?>
\ No newline at end of file
diff --git a/interface/web/themes/default/templates/main.tpl.htm b/interface/web/themes/default/templates/main.tpl.htm
index 874ff1b..b57e866 100644
--- a/interface/web/themes/default/templates/main.tpl.htm
+++ b/interface/web/themes/default/templates/main.tpl.htm
@@ -1,8 +1,8 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
-<title>Scrigo</title>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>ISPConfig</title>
+<meta http-equiv="Content-Type" content="{tmpl_var name='html_content_encoding'}">
<link href="themes/{tmpl_var name="theme"}/style.css" rel="stylesheet" type="text/css">
<script language= "JavaScript">
function breakout()
--
Gitblit v1.9.1