Commit aa513707 authored by tbrehm's avatar tbrehm
Browse files

some code cleanups

parent b5a2f8de
......@@ -6,134 +6,7 @@
# Erstellungszeit: 18. Oktober 2005 um 16:00
# Server Version: 4.0.22
# PHP-Version: 5.0.2
# Datenbank: `scrigo`
# --------------------------------------------------------
#
# Tabellenstruktur fr Tabelle `haendler`
#
DROP TABLE IF EXISTS haendler;
CREATE TABLE haendler (
id bigint(20) NOT NULL auto_increment,
KD_Nr varchar(15) NOT NULL default '',
Typ varchar(255) NOT NULL default 'Verarbeiter',
PLZ_Index varchar(5) NOT NULL default '',
Name1 varchar(255) NOT NULL default '',
Name2 varchar(255) NOT NULL default '',
Strasse varchar(255) NOT NULL default '',
PLZ varchar(20) NOT NULL default '',
PLZ_Ort varchar(255) NOT NULL default '',
Ort varchar(255) NOT NULL default '',
Region varchar(255) NOT NULL default '',
Land varchar(255) NOT NULL default '',
Telefon varchar(255) NOT NULL default '',
Fax varchar(255) NOT NULL default '',
email varchar(255) NOT NULL default '',
Internet varchar(255) NOT NULL default '',
Verkauft varchar(255) NOT NULL default '',
bem text NOT NULL,
Land_lt_Haendler varchar(255) NOT NULL default '',
Land_dt varchar(255) NOT NULL default '',
Land_int varchar(255) NOT NULL default '',
LK varchar(255) NOT NULL default '',
PRIMARY KEY (id)
) TYPE=MyISAM;
#
# Daten fr Tabelle `haendler`
#
# --------------------------------------------------------
#
# Tabellenstruktur fr Tabelle `media`
#
DROP TABLE IF EXISTS media;
CREATE TABLE media (
media_id bigint(20) NOT NULL auto_increment,
media_profile_id varchar(255) NOT NULL default '',
media_cat_id varchar(255) NOT NULL default '',
media_name varchar(255) NOT NULL default '',
media_type varchar(30) NOT NULL default '',
media_size varchar(255) NOT NULL default '',
media_format varchar(255) NOT NULL default '',
thumbnail int(11) NOT NULL default '0',
path0 varchar(255) NOT NULL default '',
path1 varchar(255) NOT NULL default '',
path2 varchar(255) NOT NULL default '',
path3 varchar(255) NOT NULL default '',
path4 varchar(255) NOT NULL default '',
path5 varchar(255) NOT NULL default '',
PRIMARY KEY (media_id)
) TYPE=MyISAM;
#
# Daten fr Tabelle `media`
#
# --------------------------------------------------------
#
# Tabellenstruktur fr Tabelle `media_cat`
#
DROP TABLE IF EXISTS media_cat;
CREATE TABLE media_cat (
media_cat_id int(10) unsigned NOT NULL auto_increment,
parent varchar(100) NOT NULL default '',
sort varchar(10) NOT NULL default '9999',
active char(1) NOT NULL default '1',
name varchar(255) NOT NULL default '',
PRIMARY KEY (media_cat_id),
UNIQUE KEY tree_id (media_cat_id),
KEY sort (sort)
) TYPE=MyISAM PACK_KEYS=1;
#
# Daten fr Tabelle `media_cat`
#
INSERT INTO media_cat VALUES (1, '0', '', '1', 'Images');
# --------------------------------------------------------
#
# Tabellenstruktur fr Tabelle `media_profile`
#
DROP TABLE IF EXISTS media_profile;
CREATE TABLE media_profile (
media_profile_id bigint(20) NOT NULL auto_increment,
media_cat_id varchar(255) NOT NULL default '',
profile_name varchar(255) NOT NULL default '',
profile_description text NOT NULL,
thumbnail int(11) NOT NULL default '1',
original int(11) NOT NULL default '0',
path0 varchar(255) NOT NULL default '',
path1 varchar(255) NOT NULL default '',
resize1 varchar(50) NOT NULL default '',
options1 varchar(50) NOT NULL default '',
path2 varchar(255) NOT NULL default '',
resize2 varchar(50) NOT NULL default '',
options2 varchar(50) NOT NULL default '',
path3 varchar(255) NOT NULL default '',
resize3 varchar(50) NOT NULL default '',
options3 varchar(50) NOT NULL default '',
path4 varchar(255) NOT NULL default '',
resize4 varchar(50) NOT NULL default '',
options4 varchar(50) NOT NULL default '',
path5 varchar(255) NOT NULL default '',
resize5 varchar(50) NOT NULL default '',
options5 varchar(50) NOT NULL default '',
PRIMARY KEY (media_profile_id)
) TYPE=MyISAM;
#
# Daten fr Tabelle `media_profile`
#
INSERT INTO media_profile VALUES (1, '2', 'Default Image', '', 1, 1, '[ROOT]/web/media/original/[ID].[EXT]', '[ROOT]/web/media/images/img_[ID]_80x110.[EXT]', '80x110', '-sharpen 2', '', '', '', '', '', '', '', '', '', '', '', '');
# Datenbank: `ispconfig3`
# --------------------------------------------------------
#
......@@ -274,3 +147,179 @@ CREATE TABLE sys_user (
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 fr 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 fr 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 fr 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 fr 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 fr 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 fr 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 fr 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 fr 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 fr 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
<?php
/*
Form Definition
Tabellendefinition
Datentypen:
- INTEGER (Wandelt Ausdrcke in Int um)
- DOUBLE
- CURRENCY (Formatiert Zahlen nach Whrungsnotation)
- VARCHAR (kein weiterer Format Check)
- TEXT (kein weiterer Format Check)
- DATE (Datumsformat, Timestamp Umwandlung)
Formtype:
- TEXT (normales Textfeld)
- TEXTAREA (normales Textfeld)
- PASSWORD (Feldinhalt wird nicht angezeigt)
- SELECT (Gibt Werte als option Feld aus)
- RADIO
- CHECKBOX
- CHECKBOXARRAY
- FILE
VALUE:
- Wert oder Array
Hinweis:
Das ID-Feld ist nicht bei den Table Values einzufgen.
*/
$form["title"] = "Media";
$form["description"] = "";
$form["name"] = "media";
$form["action"] = "media_edit.php";
$form["db_table"] = "media";
$form["db_table_idx"] = "media_id";
$form["tab_default"] = "media";
$form["list_default"] = "media_list.php";
$form["auth"] = 'no';
$app->uses("tree");
$parents = $app->db->queryAllRecords("SELECT * FROM media_cat ORDER BY name");
$app->tree->loadFromArray($parents);
// Damit eintrge nicht unter sich selbst eingehngt werden knnen
// $app->tree->deltree($_REQUEST["id"]);
$parents = $app->tree->optionlist();
$parent[0] = "Root";
if(is_array($parents)) {
foreach($parents as $p) {
$tmp_id = $p["id"];
$parent[$tmp_id] = $p["data"];
}
}
// Hole Felder
$tmp_records = $app->db->queryAllRecords("SELECT media_profile_id, profile_name FROM media_profile ORDER BY profile_name");
$media_profiles = array();
$media_profiles[0] = "";
foreach($tmp_records as $tmp) {
$tmp_id = $tmp["media_profile_id"];
$media_profiles[$tmp_id] = $tmp["profile_name"];
}
unset($tmp_records);
$form["tabs"]['media'] = array (
'title' => "Media",
'width' => 80,
'template' => "templates/media_edit.htm",
'fields' => array (
##################################
# Beginn Datenbankfelder
##################################
'media_profile_id' => array (
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
'regex' => '',
'errmsg' => '',
'default' => '',
'value' => $media_profiles,
'separator' => ',',
'width' => '30',
'maxlength' => '255',
'rows' => '',
'cols' => ''
),
'media_cat_id' => array (
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
'regex' => '',
'errmsg' => '',
'default' => '',
'value' => $parent,
'separator' => ',',
'width' => '30',
'maxlength' => '255',
'rows' => '',
'cols' => ''
),
'media_name' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'regex' => '/^.{1,255}$/',
'errmsg' => 'media_name_err',
'default' => '',
'value' => '',
'separator' => '',
'width' => '30',
'maxlength' => '255',
'rows' => '',
'cols' => ''
),
'media_type' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'regex' => '',
'errmsg' => '',
'default' => '',
'value' => '',
'separator' => '',
'width' => '5',
'maxlength' => '30',
'rows' => '',
'cols' => ''
),
'media_size' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'regex' => '',
'errmsg' => '',
'default' => '',
'value' => '',
'separator' => '',
'width' => '15',
'maxlength' => '255',
'rows' => '',
'cols' => ''
),
'media_format' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'regex' => '',
'errmsg' => '',
'default' => '',
'value' => '',
'separator' => '',
'width' => '15',
'maxlength' => '255',
'rows' => '',
'cols' => ''
),
'thumbnail' => array (
'datatype' => 'INTEGER',
'formtype' => 'CHECKBOX',
'regex' => '',
'errmsg' => '',
'default' => '0',
'value' => '1',
'separator' => '',
'width' => '',
'maxlength' => '',
'rows' => '',
'cols' => ''
),
'path0' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'regex' => '',
'errmsg' => '',
'default' => '',
'value' => '',
'separator' => '',
'width' => '30',
'maxlength' => '255',
'rows' => '',
'cols' => ''
),
'path1' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'regex' => '',
'errmsg' => '',
'default' => '',
'value' => '',
'separator' => '',
'width' => '30',
'maxlength' => '255',
'rows' => '',
'cols' => ''
),
'path2' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'regex' => '',
'errmsg' => '',
'default' => '',
'value' => '',
'separator' => '',
'width' => '30',
'maxlength' => '255',
'rows' => '',
'cols' => ''
),
'path3' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'regex' => '',
'errmsg' => '',
'default' => '',
'value' => '',
'separator' => '',
'width' => '30',
'maxlength' => '255',
'rows' => '',
'cols' => ''
),
'path4' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'regex' => '',
'errmsg' => '',
'default' => '',
'value' => '',
'separator' => '',
'width' => '30',
'maxlength' => '255',
'rows' => '',
'cols' => ''
),
'path5' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'regex' => '',
'errmsg' => '',
'default' => '',
'value' => '',
'separator' => '',
'width' => '30',
'maxlength' => '255',
'rows' => '',
'cols' => ''
)
##################################
# ENDE Datenbankfelder
##################################
)
);
?>
\ No newline at end of file
<?php
/*
Form Definition
Tabellendefinition
Datentypen:
- INTEGER (Wandelt Ausdrcke in Int um)
- DOUBLE
- CURRENCY (Formatiert Zahlen nach Whrungsnotation)
- VARCHAR (kein weiterer Format Check)
- TEXT (kein weiterer Format Check)
- DATE (Datumsformat, Timestamp Umwandlung)
Formtype:
- TEXT (normales Textfeld)
- TEXTAREA (normales Textfeld)