fix integration of formfields in customer-domains

This commit is contained in:
Michael Kaufmann (d00p)
2011-02-12 17:48:54 +01:00
parent 9ddd3a2a58
commit cc96aef50f
4 changed files with 73 additions and 132 deletions

View File

@@ -381,6 +381,13 @@ elseif($page == 'domains')
$ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']); $ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']);
$openbasedir = makeoption($lng['domain']['docroot'], 0, NULL, true) . makeoption($lng['domain']['homedir'], 1, NULL, true); $openbasedir = makeoption($lng['domain']['docroot'], 0, NULL, true) . makeoption($lng['domain']['homedir'], 1, NULL, true);
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']); $pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']);
$subdomain_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/domains/formfield.domains_add.php';
$subdomain_add_form = htmlform::genHTMLForm($subdomain_add_data);
$title = $subdomain_add_data['domain_add']['title'];
$image = $subdomain_add_data['domain_add']['image'];
eval("echo \"" . getTemplate("domains/domains_add") . "\";"); eval("echo \"" . getTemplate("domains/domains_add") . "\";");
} }
} }
@@ -569,6 +576,12 @@ elseif($page == 'domains')
$domainip = $result_ipandport['ip']; $domainip = $result_ipandport['ip'];
$result = htmlentities_array($result); $result = htmlentities_array($result);
$subdomain_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/domains/formfield.domains_edit.php';
$subdomain_edit_form = htmlform::genHTMLForm($subdomain_edit_data);
$title = $subdomain_edit_data['domain_edit']['title'];
$image = $subdomain_edit_data['domain_edit']['image'];
eval("echo \"" . getTemplate("domains/domains_edit") . "\";"); eval("echo \"" . getTemplate("domains/domains_edit") . "\";");
} }
} }

View File

@@ -1,57 +1,30 @@
$header $header
<form method="post" action="$filename"> <article>
<input type="hidden" name="s" value="$s" /> <header>
<input type="hidden" name="page" value="$page" /> <h2>
<input type="hidden" name="action" value="$action" /> <img src="images/Froxlor/{$image}" alt="{$title}" />&nbsp;
<table cellpadding="5" cellspacing="4" border="0" align="center" class="maintable_60"> {$title}
<tr> </h2>
<td class="maintitle" colspan="2"><b><img src="images/title.gif" alt="" />&nbsp;{$lng['domains']['subdomain_add']}</b></td> </header>
</tr>
<tr> <section class="fullform bradiusodd">
<td class="main_field_name">{$lng['domains']['domainname']}:</td>
<td class="main_field_display" nowrap="nowrap"><input type="text" name="subdomain" value="" size="15" maxlength="50" /> <b>.</b> <select class="tendina_nobordo" name="domain">$domains</select></td> <form action="$filename" method="post" enctype="application/x-www-form-urlencoded">
</tr> <fieldset>
<tr> <legend>Froxlor&nbsp;-&nbsp;{$title}</legend>
<td class="main_field_name">{$lng['domains']['aliasdomain']}:</td>
<td class="main_field_display" nowrap="nowrap"><select name="alias">$aliasdomains</select></td> <table class="formtable">
</tr> {$subdomain_add_form}
<if $settings['panel']['pathedit'] != 'Dropdown'> </table>
<tr>
<td class="main_field_name">{$lng['panel']['pathorurl']}:<br /><font size="1">{$lng['panel']['pathDescription']}{$lng['panel']['pathDescriptionEx']}</font></td> <p style="display: none;">
<td class="main_field_display" nowrap="nowrap">{$pathSelect}</td> <input type="hidden" name="s" value="$s" />
</tr> <input type="hidden" name="page" value="$page" />
</if> <input type="hidden" name="action" value="$action" />
<if $settings['panel']['pathedit'] == 'Dropdown'> <input type="hidden" name="send" value="send" />
<tr> </p>
<td class="main_field_name">{$lng['panel']['path']}:</td> </fieldset>
<td class="main_field_display">{$pathSelect}</td> </form>
</tr> </section>
<tr> </article>
<td class="main_field_name">{$lng['panel']['urloverridespath']}:</td>
<td class="main_field_display"><input type="text" class="text" name="url" value="{$urlvalue}" size="30" /></td>
</tr>
</if>
<if $settings['system']['webserver'] == 'apache2' && $settings['customredirect']['enabled'] == '1'>
<tr>
<td class="main_field_name">{$lng['domains']['redirectifpathisurl']}:<br /><font size="1">{$lng['domains']['redirectifpathisurlinfo']}</font></td>
<td class="main_field_display" nowrap="nowrap"><select name="redirectcode">$redirectcode</select></td>
</tr>
</if>
<if $settings['system']['use_ssl'] == '1'>
<tr>
<td class="main_field_name">SSL Redirect:</td>
<td class="main_field_display" nowrap="nowrap">$ssl_redirect</td>
</tr>
</if>
<tr>
<td class="main_field_name">{$lng['domain']['openbasedirpath']}:</td>
<td class="main_field_display" nowrap><select name="openbasedir_path">$openbasedir</select></td>
</tr>
<tr>
<td class="main_field_confirm" colspan="2"><input type="hidden" name="send" value="send" /><input type="submit" class="bottom" value="{$lng['domains']['subdomain_add']}" /></td>
</tr>
</table>
</form>
<br />
<br />
$footer $footer

View File

@@ -1,76 +1,31 @@
$header $header
<form method="post" action="$filename"> <article>
<input type="hidden" name="s" value="$s" /> <header>
<input type="hidden" name="page" value="$page" /> <h2>
<input type="hidden" name="action" value="$action" /> <img src="images/Froxlor/{$image}" alt="{$title}" />&nbsp;
<input type="hidden" name="id" value="$id" /> {$title}
<table cellpadding="5" cellspacing="4" border="0" align="center" class="maintable_60"> </h2>
<tr> </header>
<td class="maintitle" colspan="2"><b><img src="images/title.gif" alt="" />&nbsp;{$lng['domains']['subdomain_edit']}</b></td>
</tr> <section class="fullform bradiusodd">
<tr>
<td class="main_field_name">{$lng['domains']['domainname']}:</td> <form action="$filename" method="post" enctype="application/x-www-form-urlencoded">
<td class="main_field_display" nowrap="nowrap">{$result['domain']}</td> <fieldset>
</tr> <legend>Froxlor&nbsp;-&nbsp;{$title}</legend>
<tr>
<td class="main_field_name">{$lng['dns']['destinationip']}:</td> <table class="formtable">
<td class="main_field_display" nowrap="nowrap">{$domainip}</td> {$subdomain_edit_form}
</tr> </table>
<if $alias_check == '0'>
<tr> <p style="display: none;">
<td class="main_field_name">{$lng['domains']['aliasdomain']}:</td> <input type="hidden" name="s" value="$s" />
<td class="main_field_display" nowrap="nowrap"><select class="tendina_nobordo" name="alias">$domains</select></td> <input type="hidden" name="page" value="$page" />
</tr> <input type="hidden" name="action" value="$action" />
</if> <input type="hidden" name="id" value="$id" />
<if $settings['panel']['pathedit'] != 'Dropdown'> <input type="hidden" name="send" value="send" />
<tr> </p>
<td class="main_field_name">{$lng['panel']['pathorurl']}:<br /><font size="1">{$lng['panel']['pathDescription']}{$lng['panel']['pathDescriptionEx']}</font></td> </fieldset>
<td class="main_field_display" nowrap="nowrap">{$pathSelect}</td> </form>
</tr> </section>
</if> </article>
<if $settings['panel']['pathedit'] == 'Dropdown'>
<tr>
<td class="main_field_name">{$lng['panel']['path']}:</td>
<td class="main_field_display">{$pathSelect}</td>
</tr>
<tr>
<td class="main_field_name">{$lng['panel']['urloverridespath']}:</td>
<td class="main_field_display"><input type="text" class="text" name="url" value="{$urlvalue}" size="30" /></td>
</tr>
</if>
<if $settings['system']['webserver'] == 'apache2' && $settings['customredirect']['enabled'] == '1'>
<tr>
<td class="main_field_name">{$lng['domains']['redirectifpathisurl']}:<br /><font size="1">{$lng['domains']['redirectifpathisurlinfo']}</font></td>
<td class="main_field_display" nowrap="nowrap"><select name="redirectcode">$redirectcode</select></td>
</tr>
</if>
<if $result['parentdomainid'] == '0' && $userinfo['subdomains'] != '0' >
<tr>
<td class="main_field_name">{$lng['domains']['wildcarddomain']}</td>
<td class="main_field_display" nowrap="nowrap">$iswildcarddomain</td>
</tr>
</if>
<if ( $result['subcanemaildomain'] == '1' || $result['subcanemaildomain'] == '2' ) && $result['parentdomainid'] != '0' >
<tr>
<td class="main_field_name">Emaildomain:</td>
<td class="main_field_display" nowrap="nowrap">$isemaildomain</td>
</tr>
</if>
<if $settings['system']['use_ssl'] == '1'>
<tr>
<td class="main_field_name">SSL Redirect:</td>
<td class="main_field_display" nowrap="nowrap">$ssl_redirect</td>
</tr>
</if>
<tr>
<td class="main_field_name">{$lng['domain']['openbasedirpath']}:</td>
<td class="main_field_display" nowrap="nowrap"><select name="openbasedir_path">$openbasedir</select></td>
</tr>
<tr>
<td class="main_field_confirm" colspan="2"><input type="hidden" name="send" value="send" /><input type="submit" class="bottom" value="{$lng['panel']['save']}" /></td>
</tr>
</table>
</form>
<br />
<br />
$footer $footer

View File

@@ -19,7 +19,7 @@ $header
<form action="$filename" method="post" enctype="application/x-www-form-urlencoded"> <form action="$filename" method="post" enctype="application/x-www-form-urlencoded">
<fieldset> <fieldset>
<legend>Froxlor&nbsp;-&nbsp;{$lng['emails']['emails_add']}</legend> <legend>Froxlor&nbsp;-&nbsp;{$title}</legend>
<table class="formtable"> <table class="formtable">
{$email_add_form} {$email_add_form}