6 files modified
15 files added
| | |
| | | // Load list definition
|
| | | $app->listform->loadListDef($list_def_file);
|
| | |
|
| | | if(!is_file('templates/'.$app->listform->listDef["name"].'_list.htm')) {
|
| | | $app->uses('listform_tpl_generator');
|
| | | $app->listform_tpl_generator->buildHTML($app->listform->listDef);
|
| | | }
|
| | | |
| | | $app->tpl->newTemplate("form.tpl.htm");
|
| | | $app->tpl->setInclude('content_tpl','templates/'.$app->listform->listDef["name"].'_list.htm');
|
| | |
|
| | |
| | |
|
| | | // Getting the records
|
| | | $tmp_records = $app->db->queryAllRecords($querystring);
|
| | | if($app->db->errorMessage != '') die($app->db->errorMessage);
|
| | | if(is_array($tmp_records)) {
|
| | | $key_field = $field["datasource"]["keyfield"];
|
| | | $value_field = $field["datasource"]["valuefield"];
|
| | |
| | | $this->errorMessage .= "Custom datasource class or function is empty<br>\r\n";
|
| | | }
|
| | | }
|
| | | |
| | | return $values;
|
| | |
|
| | | }
|
| | |
|
| | |
| | | } else {
|
| | | // Action: NEW
|
| | | foreach($this->formDef['tabs'][$tab]['fields'] as $key => $field) {
|
| | | |
| | | // If Datasource is set, get the data from there
|
| | | if(is_array($field['datasource'])) {
|
| | | $field["value"] = $this->getDatasourceData($field, $record);
|
| | | }
|
| | | |
| | | switch ($field['formtype']) {
|
| | | case 'SELECT':
|
| | | if(is_array($field['value'])) {
|
| | |
| | | $sql = $app->tform->getSQL($this->dataRecord,$app->tform->getCurrentTab(),'UPDATE',$this->id,$ext_where);
|
| | | if($app->tform->errorMessage == '') {
|
| | | $app->db->query($sql);
|
| | | if($app->db->errorMessage != '') die($app->db->errorMessage);
|
| | |
|
| | | // Call plugin
|
| | | foreach($this->plugins as $plugin) {
|
| | |
| | | $sql = $app->tform->getSQL($this->dataRecord,$app->tform->getCurrentTab(),'INSERT',$this->id,$ext_where);
|
| | | if($app->tform->errorMessage == '') {
|
| | | $app->db->query($sql);
|
| | | if($app->db->errorMessage != '') die($app->db->errorMessage);
|
| | | $this->id = $app->db->insertID();
|
| | |
|
| | | // Call plugin
|
New file |
| | |
| | | ALTER TABLE `mail_domain` ADD `sys_userid` INT NOT NULL AFTER `domain_id` ,
|
| | | ADD `sys_groupid` INT NOT NULL AFTER `sys_userid` ,
|
| | | ADD `sys_perm_user` VARCHAR( 5 ) NOT NULL AFTER `sys_groupid` ,
|
| | | ADD `sys_perm_group` VARCHAR( 5 ) NOT NULL AFTER `sys_perm_user` ,
|
| | | ADD `sys_perm_other` VARCHAR( 5 ) NOT NULL AFTER `sys_perm_group` ; |
| | |
| | | # http://www.phpmyadmin.net/ (download page)
|
| | | #
|
| | | # Host: localhost
|
| | | # Erstellungszeit: 01. November 2005 um 23:57
|
| | | # Erstellungszeit: 09. November 2005 um 23:22
|
| | | # Server Version: 4.0.23
|
| | | # PHP-Version: 5.0.3
|
| | | # Datenbank: `ispconfig3`
|
| | |
| | | DROP TABLE IF EXISTS mail_domain;
|
| | | CREATE TABLE mail_domain (
|
| | | domain_id int(11) 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_id int(11) NOT NULL default '0',
|
| | | domain varchar(255) NOT NULL default '',
|
| | | type enum('local','relay','manual_relay') NOT NULL default 'local',
|
| | | type enum('local','relay','manual_relay','alias') NOT NULL default 'local',
|
| | | relay_host varchar(255) NOT NULL default '',
|
| | | destination varchar(255) NOT NULL default '',
|
| | | active tinyint(4) NOT NULL default '1',
|
| | | PRIMARY KEY (domain_id),
|
| | | KEY server_id (server_id,domain,type)
|
| | | ) TYPE=MyISAM;
|
| | |
| | | # Daten für Tabelle `mail_domain`
|
| | | #
|
| | |
|
| | | INSERT INTO mail_domain VALUES (1, 1, 0, 'riud', 'riud', '', 1, 'test.de', 'local', '', '', 1);
|
| | | # --------------------------------------------------------
|
| | |
|
| | | #
|
| | |
| | | # Daten für Tabelle `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);
|
| | | INSERT INTO sys_user VALUES (1, 1, 0, 'riud', 'riud', '', 'admin', '21232f297a57a5a743894a0e4a801fc3', 'admin,designer,sites', 'admin', 'default', 'admin', 1, '', 'Administrator', '', '', '', '', '', '', '', '', '', 'en', '1,2', 0);
|
| | |
|
New file |
| | |
| | | <?php
|
| | | $wb["list_head_txt"] = 'Server';
|
| | | $wb["server_name_txt"] = 'Name';
|
| | | $wb["mail_server_txt"] = 'Mail';
|
| | | $wb["web_server_txt"] = 'Web';
|
| | | $wb["dns_server_txt"] = 'DNS';
|
| | | $wb["file_server_txt"] = 'File';
|
| | | $wb["mysql_server_txt"] = 'MySQL';
|
| | | $wb["postgresql_server_txt"] = 'PostgreSQL';
|
| | | $wb["firebird_server_txt"] = 'Firebird';
|
| | | $wb["page_txt"] = 'Page';
|
| | | $wb["page_of_txt"] = 'of';
|
| | | $wb["page_next_txt"] = 'Next';
|
| | | $wb["page_back_txt"] = 'Back';
|
| | | $wb["delete_txt"] = 'Delete';
|
| | | $wb["filter_txt"] = 'Filter';
|
| | | ?> |
| | |
| | | 'link' => 'admin/users_list.php');
|
| | |
|
| | |
|
| | | $module["nav"][] = array( 'title' => 'Users',
|
| | | $module["nav"][] = array( 'title' => 'CP Users',
|
| | | 'open' => 1,
|
| | | 'items' => $items);
|
| | |
|
New file |
| | |
| | | <?php
|
| | |
|
| | | /*
|
| | | Datatypes:
|
| | | - INTEGER
|
| | | - DOUBLE
|
| | | - CURRENCY
|
| | | - VARCHAR
|
| | | - TEXT
|
| | | - DATE
|
| | | */
|
| | |
|
| | |
|
| | |
|
| | | // Name of the list
|
| | | $liste["name"] = "server";
|
| | |
|
| | | // Database table
|
| | | $liste["table"] = "server";
|
| | |
|
| | | // Index index field of the database table
|
| | | $liste["table_idx"] = "server_id";
|
| | |
|
| | | // Search Field Prefix
|
| | | $liste["search_prefix"] = "search_";
|
| | |
|
| | | // Records per page
|
| | | $liste["records_per_page"] = 15;
|
| | |
|
| | | // Script File of the list
|
| | | $liste["file"] = "server_list.php";
|
| | |
|
| | | // Script file of the edit form
|
| | | $liste["edit_file"] = "server_edit.php";
|
| | |
|
| | | // Script File of the delete script
|
| | | $liste["delete_file"] = "server_del.php";
|
| | |
|
| | | // Paging Template
|
| | | $liste["paging_tpl"] = "templates/paging.tpl.htm";
|
| | |
|
| | | // Enable authe
|
| | | $liste["auth"] = "yes";
|
| | |
|
| | |
|
| | | /*****************************************************
|
| | | * Suchfelder
|
| | | *****************************************************/
|
| | |
|
| | | $liste["item"][] = array( 'field' => "server_name",
|
| | | 'datatype' => "VARCHAR",
|
| | | 'formtype' => "TEXT",
|
| | | 'op' => "like",
|
| | | 'prefix' => "%",
|
| | | 'suffix' => "%",
|
| | | 'width' => "",
|
| | | 'value' => "");
|
| | |
|
| | | $liste["item"][] = array( 'field' => "mail_server",
|
| | | 'datatype' => "VARCHAR",
|
| | | 'formtype' => "TEXT",
|
| | | 'op' => "like",
|
| | | 'prefix' => "%",
|
| | | 'suffix' => "%",
|
| | | 'width' => "",
|
| | | 'value' => "");
|
| | |
|
| | | $liste["item"][] = array( 'field' => "web_server",
|
| | | 'datatype' => "VARCHAR",
|
| | | 'formtype' => "TEXT",
|
| | | 'op' => "like",
|
| | | 'prefix' => "%",
|
| | | 'suffix' => "%",
|
| | | 'width' => "",
|
| | | 'value' => ""); |
| | |
|
| | | $liste["item"][] = array( 'field' => "dns_server",
|
| | | 'datatype' => "VARCHAR",
|
| | | 'formtype' => "TEXT",
|
| | | 'op' => "like",
|
| | | 'prefix' => "%",
|
| | | 'suffix' => "%",
|
| | | 'width' => "",
|
| | | 'value' => "");
|
| | |
|
| | | $liste["item"][] = array( 'field' => "file_server",
|
| | | 'datatype' => "VARCHAR",
|
| | | 'formtype' => "TEXT",
|
| | | 'op' => "like",
|
| | | 'prefix' => "%",
|
| | | 'suffix' => "%",
|
| | | 'width' => "",
|
| | | 'value' => "");
|
| | |
|
| | | $liste["item"][] = array( 'field' => "mysql_server",
|
| | | 'datatype' => "VARCHAR",
|
| | | 'formtype' => "TEXT",
|
| | | 'op' => "like",
|
| | | 'prefix' => "%",
|
| | | 'suffix' => "%",
|
| | | 'width' => "",
|
| | | 'value' => "");
|
| | |
|
| | |
|
| | | $liste["item"][] = array( 'field' => "postgresql_server",
|
| | | 'datatype' => "VARCHAR",
|
| | | 'formtype' => "TEXT",
|
| | | 'op' => "like",
|
| | | 'prefix' => "%",
|
| | | 'suffix' => "%",
|
| | | 'width' => "",
|
| | | 'value' => "");
|
| | |
|
| | |
|
| | | $liste["item"][] = array( 'field' => "firebird_server",
|
| | | 'datatype' => "VARCHAR",
|
| | | 'formtype' => "TEXT",
|
| | | 'op' => "like",
|
| | | 'prefix' => "%",
|
| | | 'suffix' => "%",
|
| | | 'width' => "",
|
| | | 'value' => "");
|
| | | ?> |
New file |
| | |
| | | <?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
|
| | | ******************************************/
|
| | |
|
| | | $list_def_file = "list/server.list.php";
|
| | | $tform_def_file = "form/server.tform.php";
|
| | |
|
| | | /******************************************
|
| | | * End Form configuration
|
| | | ******************************************/
|
| | |
|
| | | require_once('../../lib/config.inc.php');
|
| | | require_once('../../lib/app.inc.php');
|
| | |
|
| | | // Checke Berechtigungen für Modul
|
| | | if(!stristr($_SESSION["s"]["user"]["modules"],$_SESSION["s"]["module"]["name"])) {
|
| | | header("Location: ../index.php");
|
| | | exit;
|
| | | }
|
| | |
|
| | | $app->uses("tform_actions");
|
| | | $app->tform_actions->onDelete();
|
| | |
|
| | | ?> |
New file |
| | |
| | | <?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.
|
| | | */
|
| | |
|
| | | require_once('../../lib/config.inc.php');
|
| | | require_once('../../lib/app.inc.php');
|
| | |
|
| | | /******************************************
|
| | | * Begin Form configuration
|
| | | ******************************************/
|
| | |
|
| | | $list_def_file = "list/server.list.php";
|
| | |
|
| | | /******************************************
|
| | | * End Form configuration
|
| | | ******************************************/
|
| | |
|
| | | // Checking module permissions
|
| | | if(!stristr($_SESSION["s"]["user"]["modules"],$_SESSION["s"]["module"]["name"])) {
|
| | | header("Location: ../index.php");
|
| | | exit;
|
| | | }
|
| | |
|
| | | $app->uses('listform_actions');
|
| | | $app->listform_actions->onLoad();
|
| | |
|
| | |
|
| | | ?> |
New file |
| | |
| | | <form name="myform" action="server_list.php" method="POST">
|
| | | <div class="frmTextHead"><tmpl_var name="list_head_txt"></div><br />
|
| | | <table width="100%" border="0" cellspacing="0" cellpadding="4">
|
| | | <tr>
|
| | | <td class="tblHead"><tmpl_var name="server_name_txt"></td>
|
| | | <td class="tblHead"><tmpl_var name="mail_server_txt"></td>
|
| | | <td class="tblHead"><tmpl_var name="web_server_txt"></td>
|
| | | <td class="tblHead"><tmpl_var name="dns_server_txt"></td>
|
| | | <td class="tblHead"><tmpl_var name="file_server_txt"></td>
|
| | | <td class="tblHead"><tmpl_var name="mysql_server_txt"></td>
|
| | | <td class="tblHead"><tmpl_var name="postgresql_server_txt"></td>
|
| | | <td class="tblHead"><tmpl_var name="firebird_server_txt"></td>
|
| | | <td class="tblHead"> </td>
|
| | | </tr>
|
| | | <tr>
|
| | | <td class="frmText11"><input type="text" name="search_server_name" value="{tmpl_var name='search_server_name'}" class="text" /></td>
|
| | | <td class="frmText11"><input type="text" name="search_mail_server" value="{tmpl_var name='search_mail_server'}" class="text" size="2" /></td>
|
| | | <td class="frmText11"><input type="text" name="search_web_server" value="{tmpl_var name='search_web_server'}" class="text" size="2" /></td>
|
| | | <td class="frmText11"><input type="text" name="search_dns_server" value="{tmpl_var name='search_dns_server'}" class="text" size="2" /></td>
|
| | | <td class="frmText11"><input type="text" name="search_file_server" value="{tmpl_var name='search_file_server'}" class="text" size="2" /></td>
|
| | | <td class="frmText11"><input type="text" name="search_mysql_server" value="{tmpl_var name='search_mysql_server'}" class="text" size="2" /></td>
|
| | | <td class="frmText11"><input type="text" name="search_postgresql_server" value="{tmpl_var name='search_postgresql_server'}" class="text" size="2" /></td>
|
| | | <td class="frmText11"><input type="text" name="search_firebird_server" value="{tmpl_var name='search_firebird_server'}" class="text" size="2" /></td>
|
| | | <td class="frmText11" align="right"><input name="Filter" type="submit" id="Filter" value="{tmpl_var name="filter_txt"}"></td>
|
| | | </tr>
|
| | | <tmpl_loop name="records">
|
| | | <tr bgcolor="{tmpl_var name="bgcolor"}">
|
| | | <td class="frmText11"><a href="server_edit.php?id={tmpl_var name='id'}" class="frmText11">{tmpl_var name="server_name"}</a></td>
|
| | | <td class="frmText11"><a href="server_edit.php?id={tmpl_var name='id'}" class="frmText11">{tmpl_var name="mail_server"}</a></td>
|
| | | <td class="frmText11"><a href="server_edit.php?id={tmpl_var name='id'}" class="frmText11">{tmpl_var name="web_server"}</a></td>
|
| | | <td class="frmText11"><a href="server_edit.php?id={tmpl_var name='id'}" class="frmText11">{tmpl_var name="dns_server"}</a></td>
|
| | | <td class="frmText11"><a href="server_edit.php?id={tmpl_var name='id'}" class="frmText11">{tmpl_var name="file_server"}</a></td>
|
| | | <td class="frmText11"><a href="server_edit.php?id={tmpl_var name='id'}" class="frmText11">{tmpl_var name="mysql_server"}</a></td>
|
| | | <td class="frmText11"><a href="server_edit.php?id={tmpl_var name='id'}" class="frmText11">{tmpl_var name="postgresql_server"}</a></td>
|
| | | <td class="frmText11"><a href="server_edit.php?id={tmpl_var name='id'}" class="frmText11">{tmpl_var name="firebird_server"}</a></td>
|
| | | <td class="frmText11" align="right">[<a href="javascript: del_record('server_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}');" class="frmText11">{tmpl_var name='delete_txt'}</a>]</td>
|
| | | </tr>
|
| | | </tmpl_loop>
|
| | |
|
| | | <tr>
|
| | | <td colspan="9" height="40" align="center" class="tblFooter"><tmpl_var name="paging"></td>
|
| | | </tr>
|
| | | </table>
|
| | | </form> |
New file |
| | |
| | | <?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"] = "Mail Domain";
|
| | | $form["description"] = "";
|
| | | $form["name"] = "mail_domain";
|
| | | $form["action"] = "mail_domain_edit.php";
|
| | | $form["db_table"] = "mail_domain";
|
| | | $form["db_table_idx"] = "domain_id";
|
| | | $form["db_history"] = "yes";
|
| | | $form["tab_default"] = "domain";
|
| | | $form["list_default"] = "mail_domain_list.php";
|
| | | $form["auth"] = 'no';
|
| | |
|
| | | $form["auth_preset"]["userid"] = 0; // 0 = id of the user, > 0 id must match with id of current user
|
| | | $form["auth_preset"]["groupid"] = 0; // 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"]['domain'] = array (
|
| | | 'title' => "Domain",
|
| | | 'width' => 100,
|
| | | 'template' => "templates/mail_domain_edit.htm",
|
| | | 'fields' => array (
|
| | | ##################################
|
| | | # Begin Datatable fields
|
| | | ##################################
|
| | | 'server_id' => array (
|
| | | 'datatype' => 'INTEGER',
|
| | | 'formtype' => 'SELECT',
|
| | | 'default' => '',
|
| | | 'datasource' => array ( 'type' => 'SQL',
|
| | | 'querystring' => 'SELECT server_id,server_name FROM server WHERE 1 ORDER BY server_name',
|
| | | 'keyfield'=> 'server_id',
|
| | | 'valuefield'=> 'server_name'
|
| | | ),
|
| | | 'value' => ''
|
| | | ),
|
| | | 'domain' => array (
|
| | | 'datatype' => 'VARCHAR',
|
| | | 'formtype' => 'TEXT',
|
| | | 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
|
| | | 'errmsg'=> 'domain_error_empty'),
|
| | | 1 => array ( 'type' => 'UNIQUE',
|
| | | 'errmsg'=> 'domain_error_unique'),
|
| | | ),
|
| | | 'default' => '',
|
| | | 'value' => '',
|
| | | 'width' => '30',
|
| | | 'maxlength' => '255'
|
| | | ),
|
| | | 'type' => array (
|
| | | 'datatype' => 'VARCHAR',
|
| | | 'formtype' => 'SELECT',
|
| | | 'default' => '',
|
| | | 'value' => array('local' => 'local','relay'=>'relay','manual_relay'=>'manual Relay')
|
| | | ),
|
| | | 'active' => array (
|
| | | 'datatype' => 'INTEGER',
|
| | | 'formtype' => 'CHECKBOX',
|
| | | 'default' => '1',
|
| | | 'value' => '1'
|
| | | ),
|
| | | ##################################
|
| | | # ENDE Datatable fields
|
| | | ##################################
|
| | | )
|
| | | );
|
| | |
|
| | |
|
| | | ?> |
New file |
| | |
| | | <?php
|
| | | $wb["server_id_txt"] = 'Server';
|
| | | $wb["domain_txt"] = 'Domain';
|
| | | $wb["type_txt"] = 'Type';
|
| | | $wb["active_txt"] = 'Active';
|
| | | $wb["btn_save_txt"] = 'Save';
|
| | | $wb["btn_cancel_txt"] = 'Cancel';
|
| | | ?> |
New file |
| | |
| | | <?php
|
| | | $wb["list_head_txt"] = 'Email Domains';
|
| | | $wb["server_id_txt"] = 'Server';
|
| | | $wb["domain_txt"] = 'Domain';
|
| | | $wb["page_txt"] = 'Page';
|
| | | $wb["page_of_txt"] = 'of';
|
| | | $wb["page_next_txt"] = 'Next';
|
| | | $wb["page_back_txt"] = 'Back';
|
| | | $wb["delete_txt"] = 'Delete';
|
| | | $wb["filter_txt"] = 'Filter';
|
| | | ?> |
| | |
| | | 'navframe_page' => '', |
| | | 'startpage' => 'sites/index.php', |
| | | 'tab_width' => '', |
| | | 'nav' => NULL, |
| | | 'nav' => |
| | | array ( |
| | | 0 => |
| | | array ( |
| | | 'title' => 'Email Accounts', |
| | | 'open' => 1, |
| | | 'items' => |
| | | array ( |
| | | 0 => |
| | | array ( |
| | | 'title' => 'Domain', |
| | | 'target' => 'content', |
| | | 'link' => 'sites/mail_domain_list.php', |
| | | ), |
| | | 1 => |
| | | array ( |
| | | 'title' => 'Domain Alias', |
| | | 'target' => 'content', |
| | | 'link' => '', |
| | | ), |
| | | 2 => |
| | | array ( |
| | | 'title' => 'Email Mailbox', |
| | | 'target' => 'content', |
| | | 'link' => '', |
| | | ), |
| | | 3 => |
| | | array ( |
| | | 'title' => 'Email Forward', |
| | | 'target' => 'content', |
| | | 'link' => '', |
| | | ), |
| | | 4 => |
| | | array ( |
| | | 'title' => 'Domain Catchall', |
| | | 'target' => 'content', |
| | | 'link' => '', |
| | | ), |
| | | ), |
| | | ), |
| | | 1 => |
| | | array ( |
| | | 'title' => 'Email Filter', |
| | | 'open' => 1, |
| | | 'items' => |
| | | array ( |
| | | 0 => |
| | | array ( |
| | | 'title' => 'Email Whitelist', |
| | | 'target' => 'content', |
| | | 'link' => '', |
| | | ), |
| | | 1 => |
| | | array ( |
| | | 'title' => 'Email Blacklist', |
| | | 'target' => 'content', |
| | | 'link' => '', |
| | | ), |
| | | ), |
| | | ), |
| | | ), |
| | | )
|
| | | ?> |
New file |
| | |
| | | <?php
|
| | |
|
| | | /*
|
| | | Datatypes:
|
| | | - INTEGER
|
| | | - DOUBLE
|
| | | - CURRENCY
|
| | | - VARCHAR
|
| | | - TEXT
|
| | | - DATE
|
| | | */
|
| | |
|
| | |
|
| | |
|
| | | // Name of the list
|
| | | $liste["name"] = "mail_domain";
|
| | |
|
| | | // Database table
|
| | | $liste["table"] = "mail_domain";
|
| | |
|
| | | // Index index field of the database table
|
| | | $liste["table_idx"] = "domain_id";
|
| | |
|
| | | // Search Field Prefix
|
| | | $liste["search_prefix"] = "search_";
|
| | |
|
| | | // Records per page
|
| | | $liste["records_per_page"] = 15;
|
| | |
|
| | | // Script File of the list
|
| | | $liste["file"] = "mail_domain_list.php";
|
| | |
|
| | | // Script file of the edit form
|
| | | $liste["edit_file"] = "mail_domain_edit.php";
|
| | |
|
| | | // Script File of the delete script
|
| | | $liste["delete_file"] = "mail_domain_del.php";
|
| | |
|
| | | // Paging Template
|
| | | $liste["paging_tpl"] = "templates/paging.tpl.htm";
|
| | |
|
| | | // Enable auth
|
| | | $liste["auth"] = "yes";
|
| | |
|
| | |
|
| | | /*****************************************************
|
| | | * Suchfelder
|
| | | *****************************************************/
|
| | |
|
| | | $liste["item"][] = array( 'field' => "server_id",
|
| | | 'datatype' => "VARCHAR",
|
| | | 'formtype' => "TEXT",
|
| | | 'op' => "like",
|
| | | 'prefix' => "%",
|
| | | 'suffix' => "%",
|
| | | 'width' => "",
|
| | | 'value' => "");
|
| | |
|
| | | $liste["item"][] = array( 'field' => "domain",
|
| | | 'datatype' => "VARCHAR",
|
| | | 'formtype' => "TEXT",
|
| | | 'op' => "like",
|
| | | 'prefix' => "%",
|
| | | 'suffix' => "%",
|
| | | 'width' => "",
|
| | | 'value' => "");
|
| | |
|
| | |
|
| | | ?> |
New file |
| | |
| | | <?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
|
| | | ******************************************/
|
| | |
|
| | | $list_def_file = "list/mail_domain.list.php";
|
| | | $tform_def_file = "form/mail_domain.tform.php";
|
| | |
|
| | | /******************************************
|
| | | * End Form configuration
|
| | | ******************************************/
|
| | |
|
| | | require_once('../../lib/config.inc.php');
|
| | | require_once('../../lib/app.inc.php');
|
| | |
|
| | | // Checke Berechtigungen für Modul
|
| | | if(!stristr($_SESSION["s"]["user"]["modules"],$_SESSION["s"]["module"]["name"])) {
|
| | | header("Location: ../index.php");
|
| | | exit;
|
| | | }
|
| | |
|
| | | $app->uses("tform_actions");
|
| | | $app->tform_actions->onDelete();
|
| | |
|
| | | ?> |
New file |
| | |
| | | <?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/mail_domain.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();
|
| | |
|
| | | ?> |
New file |
| | |
| | | <?php
|
| | | require_once('../../lib/config.inc.php');
|
| | | require_once('../../lib/app.inc.php');
|
| | |
|
| | | /******************************************
|
| | | * Begin Form configuration
|
| | | ******************************************/
|
| | |
|
| | | $list_def_file = "list/mail_domain.list.php";
|
| | |
|
| | | /******************************************
|
| | | * End Form configuration
|
| | | ******************************************/
|
| | |
|
| | | // Checking module permissions
|
| | | if(!stristr($_SESSION["s"]["user"]["modules"],$_SESSION["s"]["module"]["name"])) {
|
| | | header("Location: ../index.php");
|
| | | exit;
|
| | | }
|
| | |
|
| | | $app->uses('listform_actions');
|
| | | $app->listform_actions->onLoad();
|
| | |
|
| | |
|
| | | ?> |
New file |
| | |
| | | <table width="500" border="0" cellspacing="0" cellpadding="2">
|
| | | <tr>
|
| | | <td width="126" class="frmText11">{tmpl_var name='server_id_txt'}:</td>
|
| | | <td width="366" class="frmText11">
|
| | | <select name="server_id" class="text">
|
| | | {tmpl_var name='server_id'}
|
| | | </select>
|
| | | </td>
|
| | | </tr>
|
| | | <tr>
|
| | | <td width="126" class="frmText11">{tmpl_var name='domain_txt'}:</td>
|
| | | <td width="366" class="frmText11"><input name="domain" type="text" class="text" value="{tmpl_var name='domain'}" size="30" maxlength="255"></td>
|
| | | </tr>
|
| | | <tr>
|
| | | <td class="frmText11"> </td>
|
| | | <td class="frmText11">{tmpl_var name='active'} {tmpl_var name='active_txt'}</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='mail_domain_list.php';">
|
| | | </td>
|
| | | </tr>
|
| | | </table>
|
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}">
|
| | | <input type="hidden" name="type" value="local"> |
New file |
| | |
| | | <form name="myform" action="mail_domain_list.php" method="POST">
|
| | | <div class="frmTextHead"><tmpl_var name="list_head_txt"></div><br />
|
| | | <input type="button" value="Add new Domain" onClick="location.href='mail_domain_edit.php'" /><br /><br />
|
| | | <table width="100%" border="0" cellspacing="0" cellpadding="4">
|
| | | <tr>
|
| | | <td class="tblHead"><tmpl_var name="server_id_txt"></td>
|
| | | <td class="tblHead"><tmpl_var name="domain_txt"></td>
|
| | | <td class="tblHead"> </td>
|
| | | </tr>
|
| | | <tr>
|
| | | <td class="frmText11"><input type="text" name="search_server_id" value="{tmpl_var name='search_server_id'}" class="text" size="5" /></td>
|
| | | <td class="frmText11"><input type="text" name="search_domain" value="{tmpl_var name='search_domain'}" class="text" /></td>
|
| | | <td class="frmText11" align="right"><input name="Filter" type="submit" id="Filter" value="{tmpl_var name="filter_txt"}"></td>
|
| | | </tr>
|
| | | <tmpl_loop name="records">
|
| | | <tr bgcolor="{tmpl_var name="bgcolor"}">
|
| | | <td class="frmText11"><a href="mail_domain_edit.php?id={tmpl_var name='id'}" class="frmText11">{tmpl_var name="server_id"}</a></td>
|
| | | <td class="frmText11"><a href="mail_domain_edit.php?id={tmpl_var name='id'}" class="frmText11">{tmpl_var name="domain"}</a></td>
|
| | | <td class="frmText11" align="right">[<a href="javascript: del_record('mail_domain_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}');" class="frmText11">{tmpl_var name='delete_txt'}</a>]</td>
|
| | | </tr>
|
| | | </tmpl_loop>
|
| | | <tr>
|
| | | <td colspan="3" height="40" align="center" class="tblFooter"><tmpl_var name="paging"></td>
|
| | | </tr>
|
| | | </table>
|
| | | </form> |