use htaccess-formfields

This commit is contained in:
Michael Kaufmann (d00p)
2011-02-12 16:42:25 +01:00
parent b9101b2041
commit 44febee357
3 changed files with 45 additions and 93 deletions

View File

@@ -357,6 +357,13 @@ elseif($page == 'htaccess')
$options_indexes = makeyesno('options_indexes', '1', '0', '0');
$cperlenabled = customerHasPerlEnabled($userinfo['customerid']);
$options_cgi = makeyesno('options_cgi', '1', '0', '0');
$htaccess_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/extras/formfield.htaccess_add.php';
$htaccess_add_form = htmlform::genHTMLForm($htaccess_add_data);
$title = $htaccess_add_data['htaccess_add']['title'];
$image = $htaccess_add_data['htaccess_add']['image'];
eval("echo \"" . getTemplate("extras/htaccess_add") . "\";");
}
}
@@ -418,6 +425,13 @@ elseif($page == 'htaccess')
$cperlenabled = customerHasPerlEnabled($userinfo['customerid']);
$options_cgi = makeyesno('options_cgi', '1', '0', $result['options_cgi']);
$result = htmlentities_array($result);
$htaccess_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/extras/formfield.htaccess_edit.php';
$htaccess_edit_form = htmlform::genHTMLForm($htaccess_edit_data);
$title = $htaccess_edit_data['htaccess_edit']['title'];
$image = $htaccess_edit_data['htaccess_edit']['image'];
eval("echo \"" . getTemplate("extras/htaccess_edit") . "\";");
}
}

View File

@@ -1,55 +1,20 @@
$header
<article>
<header>
<h2>
<img src="images/Froxlor/icons/add_htpasswd.png" alt="{$lng['extras']['pathoptions_add']}" />&nbsp;
{$lng['extras']['pathoptions_add']}
</h2>
</header>
<section class="fullform bradiusodd">
<article>
<header>
<h2>
<img src="images/Froxlor/{$image}" alt="{$title}" />&nbsp;
{$title}
</h2>
</header>
<section class="fullform bradiusodd">
<form action="$filename" method="post" enctype="application/x-www-form-urlencoded">
<fieldset>
<legend>Froxlor&nbsp;-&nbsp;{$lng['extras']['pathoptions_add']}</legend>
<legend>Froxlor&nbsp;-&nbsp;{$title}</legend>
<table class="formtable">
<tr>
<td>
<b>{$lng['panel']['path']}:</b><br />
<if $settings['panel']['pathedit'] != 'Dropdown'><small>{$lng['panel']['pathDescription']}</small></if>
</td>
<td>{$pathSelect}</td>
</tr>
<tr>
<td><b>{$lng['extras']['directory_browsing']}:</b></td>
<td>$options_indexes</td>
</tr>
<tr>
<td><b>{$lng['extras']['errordocument404path']}:</b><br />{$lng['panel']['descriptionerrordocument']}</td>
<td><input type="text" name="error404path" value="" /></td>
</tr>
<tr>
<td><b>{$lng['extras']['errordocument403path']}:</b><br />{$lng['panel']['descriptionerrordocument']}
<if $settings['system']['webserver'] == 'lighttpd'><div style="color:red">{$lng['panel']['not_supported']}lighttpd</div></if>
</td>
<td><input type="text" name="error403path" value="" /></td>
</tr>
<tr>
<td><b>{$lng['extras']['errordocument500path']}:</b><br />{$lng['panel']['descriptionerrordocument']}
<if $settings['system']['webserver'] == 'lighttpd'><div style="color:red">{$lng['panel']['not_supported']}lighttpd</div></if>
</td>
<td><input type="text" name="error500path" value="" /></td>
</tr>
<if $cperlenabled == 1 >
<tr>
<td><b>{$lng['extras']['execute_perl']}:</b></td>
<td>$options_cgi</td>
</tr>
</if>
<tr>
<td colspan="2"><input type="hidden" name="send" value="send" /><input type="submit" value="{$lng['extras']['pathoptions_add']}" /></td>
</tr>
{$htaccess_add_form}
</table>
<p style="display: none;">
@@ -60,6 +25,8 @@ $header
</p>
</fieldset>
</form>
</section>
</article>
</section>
</article>
$footer

View File

@@ -1,62 +1,33 @@
$header
<article>
<header>
<h2>
<img src="images/Froxlor/icons/edit_htpasswd.png" alt="{$lng['extras']['pathoptions_edit']}" />&nbsp;
{$lng['extras']['pathoptions_edit']}
</h2>
</header>
<section class="fullform bradiusodd">
<article>
<header>
<h2>
<img src="images/Froxlor/{$image}" alt="{$title}" />&nbsp;
{$title}
</h2>
</header>
<section class="fullform bradiusodd">
<form action="$filename" method="post" enctype="application/x-www-form-urlencoded">
<fieldset>
<legend>Froxlor&nbsp;-&nbsp;</legend>
<legend>Froxlor&nbsp;-&nbsp;{$title}</legend>
<table class="formtable">
<tr>
<td><b>{$lng['panel']['path']}:</b></td>
<td>{$result['path']}</td>
</tr>
<tr>
<td><b>{$lng['extras']['directory_browsing']}:</b></td>
<td>$options_indexes</td>
</tr>
<tr>
<td><b>{$lng['extras']['errordocument404path']}:</b><br />{$lng['panel']['descriptionerrordocument']}</td>
<td><input type="text" name="error404path" value="{$result['error404path']}" /></td>
</tr>
<tr>
<td><b>{$lng['extras']['errordocument403path']}:</b><br />{$lng['panel']['descriptionerrordocument']}
<if $settings['system']['webserver'] == 'lighttpd'><div style="color:red">{$lng['panel']['not_supported']}lighttpd</div></if>
</td>
<td><input type="text" name="error403path" value="{$result['error403path']}" /></td>
</tr>
<tr>
<td><b>{$lng['extras']['errordocument500path']}:</b><br />{$lng['panel']['descriptionerrordocument']}
<if $settings['system']['webserver'] == 'lighttpd'><div style="color:red">{$lng['panel']['not_supported']}lighttpd</div></if>
</td>
<td><input type="text" name="error500path" value="{$result['error500path']}" /></td>
</tr>
<if $cperlenabled == 1 >
<tr>
<td><b>{$lng['extras']['execute_perl']}:</b></td>
<td>$options_cgi</td>
</tr>
</if>
<tr>
<td colspan="2"><input type="hidden" name="send" value="send" /><input type="submit" value="{$lng['extras']['pathoptions_edit']}" /></td>
</tr>
{$htaccess_edit_form}
</table>
<p style="display: none;">
<input type="hidden" name="s" value="$s" />
<input type="hidden" name="page" value="$page" />
<input type="hidden" name="action" value="$action" />
<input type="hidden" name="id" value="$id" />
<input type="hidden" name="send" value="send" />
</p>
</fieldset>
</form>
</section>
</article>
</section>
</article>
$footer