Skip to content
server.tform.php 3.79 KiB
Newer Older
tbrehm's avatar
tbrehm committed
<?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";
tbrehm's avatar
tbrehm committed
$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'		=> array(0 => 0,1 => 1)
tbrehm's avatar
tbrehm committed
		),
		'web_server' => array (
			'datatype'	=> 'INTEGER',
			'formtype'	=> 'CHECKBOX',
			'default'	=> '0',
			'value'		=> array(0 => 0,1 => 1)
tbrehm's avatar
tbrehm committed
		),
		'dns_server' => array (
			'datatype'	=> 'INTEGER',
			'formtype'	=> 'CHECKBOX',
			'default'	=> '0',
			'value'		=> array(0 => 0,1 => 1)
tbrehm's avatar
tbrehm committed
		),
		'file_server' => array (
			'datatype'	=> 'INTEGER',
			'formtype'	=> 'CHECKBOX',
			'default'	=> '0',
			'value'		=> array(0 => 0,1 => 1)
tbrehm's avatar
tbrehm committed
		),
		'db_server' => array (
			'datatype'	=> 'INTEGER',
			'formtype'	=> 'CHECKBOX',
			'default'	=> '0',
			'value'		=> array(0 => 0,1 => 1)
tbrehm's avatar
tbrehm committed
		),
		'vserver_server' => array (
			'datatype'	=> 'INTEGER',
			'formtype'	=> 'CHECKBOX',
			'default'	=> '0',
			'value'		=> array(0 => 0,1 => 1)
tbrehm's avatar
tbrehm committed
		),
		'mirror_server_id' => array (
			'datatype'	=> 'INTEGER',
			'formtype'	=> 'TEXT',
			'default'	=> '',
			'value'		=> ''
		),
tbrehm's avatar
tbrehm committed
		'update' => array (
			'datatype'	=> 'INTEGER',
			'formtype'	=> 'SELECT',
			'default'	=> '1',
			'value'		=> array(0 => 'No', 1 => 'Yes')
		),
tbrehm's avatar
tbrehm committed
		'active' => array (
			'datatype'	=> 'INTEGER',
			'formtype'	=> 'SELECT',
			'default'	=> '1',
			'value'		=> array(0 => 'No', 1 => 'Yes')
		),
	##################################
	# ENDE Datatable fields
	##################################
	)
);

$form["tabs"]['config'] = array (
	'title' 	=> "Config",
	'width' 	=> 100,
	'template' 	=> "templates/server_edit_config.htm",
	'fields' 	=> array (
	##################################
	# Begin Datatable fields
	##################################
		'config' => array (
			'datatype'	=> 'TEXT',
			'formtype'	=> 'TEXTAREA',
			'default'	=> '',
			'value'		=> '',
			'width'		=> '',
			'cols'		=> '40',
			'rows'		=> '20',
			'maxlength'	=> ''
		),
	##################################
	# ENDE Datatable fields
	##################################
	)
);
tbrehm's avatar
tbrehm committed
?>