26 require_once(
"../class/config.php");
27 if (!$admin->enabled) {
28 $msg->raise(
"ERROR",
"admin", _(
"This page is restricted to authorized staff"));
29 echo
$msg->msg_html_all();
33 include_once(
"head.php");
36 "name" => array (
"request",
"string",
""),
37 "description" => array (
"post",
"string",
""),
38 "target" => array (
"post",
"string",
""),
39 "entry" => array (
"post",
"string",
""),
40 "compatibility" => array (
"post",
"string",
""),
41 "enable" => array (
"post",
"string",
""),
42 "only_dns" => array (
"post",
"boolean",
""),
43 "need_dns" => array (
"post",
"boolean",
""),
44 "advanced" => array (
"post",
"boolean",
""),
45 "create_tmpdir" => array (
"post",
"boolean",
""),
46 "create_targetdir" => array (
"post",
"boolean",
""),
54 <h3><?php
__(
"Edit a domain type"); ?> </h3>
58 echo
$msg->msg_html_all();
60 if (!
$msg->has_msgs(
"ERROR")) {
63 <form action=
"adm_domstypedoedit.php" method=
"post" name=
"main" id=
"main">
65 <input type=
"hidden" name=
"name" value=
"<?php ehe($d['name']); ?>" />
68 <th><?php
__(
"Name");?></th>
69 <td><b><?php echo
$d[
"name"]; ?></b></td>
72 <th><?php
__(
"Description");?></th>
73 <td><input name=
"description" type=
"text" size=
"30" value=
"<?php ehe($d['description']); ?>" /></td>
76 <th><?php
__(
"Target type");?></th>
78 <select name=
"target">
79 <?php
foreach (
$dom->domains_type_target_values() as $k) { ?>
80 <option value=
"<?php echo $k ?>" <?php echo (
$d[
'target']==$k)?
"selected":
"";?> ><?php echo $k;?></option>
86 <th><?php
__(
"Entry");?></th>
87 <td><input name=
"entry" type=
"text" size=
"30" value=
"<?php ehe($d['entry']); ?>" /></td>
90 <th><?php
__(
"Compatibility");?><br /><small><?php
__(
"Enter comma-separated name of other types"); ?></small></th>
91 <td><input name=
"compatibility" type=
"text" size=
"15" value=
"<?php ehe($d['compatibility']); ?>" /></td>
94 <th><?php
__(
"Enabled");?></th>
96 <select name=
"enable">
97 <?php
foreach (
$dom->domains_type_enable_values() as $k) { ?>
98 <option value=
"<?php echo $k ?>" <?php echo (
$d[
'enable']==$k)?
"selected":
"";?> ><?php
__($k);?></option>
104 <th><?php
__(
"Do only a DNS entry");?></th>
105 <td><input name=
"only_dns" type=
"checkbox" value=
"1" <?php
cbox(
$d[
'only_dns']); ?> /></td>
108 <th><?php
__(
"Domain must have our DNS");?></th>
109 <td><input name=
"need_dns" type=
"checkbox" value=
"1" <?php
cbox(
$d[
'need_dns']); ?> /></td>
112 <th><?php
__(
"Is it an advanced option?");?></th>
113 <td><input name=
"advanced" type=
"checkbox" value=
"1" <?php
cbox(
$d[
'advanced']); ?> /></td>
117 <th><?php
__(
"Create tmp directory ?");?></th>
118 <td><input name=
"create_tmpdir" type=
"checkbox" value=
"1" <?php
cbox(
$d[
'create_tmpdir']); ?> /></td>
122 <th><?php
__(
"Create target directory ?");?></th>
123 <td><input name=
"create_targetdir" type=
"checkbox" value=
"1" <?php
cbox(
$d[
'create_targetdir']); ?> /></td>
127 <input type=
"submit" class=
"inb" name=
"submit" value=
"<?php __("Change
this domain type
"); ?>" />
128 <input type=
"button" class=
"inb" name=
"cancel" value=
"<?php __("Cancel
"); ?>" onclick=
"document.location='adm_domstype.php'"/>
136 <?php include_once(
"foot.php"); ?>
cbox($test, $echo=true)
ECHOes checked="checked" only if the parameter is true useful for checkboxes and radio buttons.
getFields($fields, $requestOnly=false)
Get the Fields of the posted form from $_REQUEST or POST or GET and check their type.
csrf_get($return=false)
Give a new CSRF uniq token for a form the session must be up since the CSRF is linked to the session ...