2 require_once(
"../class/config.php");
4 if (!$admin->enabled) {
5 __(
"This page is restricted to authorized staff");
9 include_once(
"head.php");
12 <h3><?php
__(
"Manage defaults domains type"); ?></h3>
14 <p><?php
__(
"If you don't know what this page is about, don't touch anything, and read AlternC documentation about domain types"); ?></p>
15 <p><?php
__(
"The Type column contains a type of available VirtualHost config on The server."); ?></p>
16 <p><?php
__(
"The Setting column contains the variables to be expanded in the defaults configuration. Available values are: "); ?></p>
18 <li><?php
__(
"%%DOMAIN%% : the Domain name"); ?></li>
19 <li><?php
__(
"%%TARGETDOM%%: The destination domain"); ?></li>
20 <li><?php
__(
"%%SUB%% : The subdomain name"); ?></li>
21 <li><?php
__(
"%%DOMAINDIR%%: the domain directory on the file system"); ?></li>
27 echo
"<p class=\"alert alert-danger\">$error</p>";
32 "domup" => array (
"post",
"array",
""),
37 if (!
$dom->update_default_subdomains($domup) ) {
38 $error=_(
"There was an error during the record.");
46 <form method=
"post" action=
"adm_doms_def_type.php" name=
"main" id=
"main">
48 <tr><th> </th><th><?php
__(
"Sub"); ?></th><th><?php
__(
"Type"); ?></th><th><?php
__(
"settings"); ?></th><th><?php
__(
"Concerned"); ?></th><th><?php
__(
"Activation"); ?></th></tr>
57 echo
"<input type='hidden' name='domup[$i][id]' value='".$val[
'id'].
"' />";
60 <div
class=
"ina delete"><a href=
'dom_defdel.php?id=<?php echo $val['id']; ?>' type=
''><?php
__(
"Delete"); ?></a></div>
63 <td><input type=
'text' size=
"16" name=
'domup[<?php echo $i; ?>][sub]' value=
"<?php echo $val['sub']; ?>"/></td>
64 <?php $type=array(
"VHOST",
"URL",
"WEBMAIL",
"");
65 if(in_array($val[
'domain_type'],$type)){?>
66 <td><select name=
'domup[<?php echo $i; ?>][domain_type]'>
67 <option value=
'VHOST' <?php
if($val[
'domain_type']==
'VHOST') echo
"selected=\"selected\""; ?> >VHOST</option>
68 <option value=
'URL' <?php
if($val[
'domain_type']==
'URL') echo
"selected=\"selected\""; ?> >URL</option>
69 <option value=
'WEBMAIL' <?php
if($val[
'domain_type']==
'WEBMAIL') echo
"selected=\"selected\""; ?> >WEBMAIL</option>
72 <td><input type =
'text' width=
"100px" style=
"width:100px" name=
'domup[<?php echo $i; ?>][domain_type]' value=
'<?php echo $val['domain_type
']?>' ></td>
75 <td><input type =
'text' name=
'domup[<?php echo $i; ?>][domain_type_parameter]' value=
'<?php echo $val['domain_type_parameter
']?>' /></td>
76 <td><select name=
'domup[<?php echo $i; ?>][concerned]'>
77 <option value=
'MAIN' <?php
if($val[
'concerned']==
'MAIN') echo
"selected=\"selected\""; ?> >MAIN</option>
78 <option value=
'SLAVE' <?php
if($val[
'concerned']==
'SLAVE') echo
"selected=\"selected\""; ?> >SLAVE</option>
79 <option value=
'BOTH' <?php
if($val[
'concerned']==
'BOTH') echo
"selected=\"selected\""; ?> >BOTH</option>
82 <td><input type=
"checkbox" name=
"domup[<?php echo $i; ?>][enabled]" value=
"1" <?php
if ($val[
'enabled']==1) echo
"checked=\"checked\""; ?> /></td>
88 <td colspan=
'6'><p><input type=
"submit" class=
"inb" name=
"submit" value=
"<?php __("Save
"); ?>" /></p></td>
93 include_once(
"foot.php"); ?>