mirror of
https://github.com/Froxlor/Froxlor.git
synced 2024-09-21 10:27:29 +00:00
Converted customer -> ftp to new formbuilder
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
This commit is contained in:
parent
8cb615df5f
commit
26aed64bf8
@ -270,6 +270,12 @@ elseif($page == 'accounts')
|
||||
|
||||
$sendinfomail = makeyesno('sendinfomail', '1', '0', '0');
|
||||
|
||||
$ftp_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/ftp/formfield.ftp_add.php';
|
||||
$ftp_add_form = htmlform::genHTMLForm($ftp_add_data);
|
||||
|
||||
$title = $ftp_add_data['ftp_add']['title'];
|
||||
$image = $ftp_add_data['ftp_add']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("ftp/accounts_add") . "\";");
|
||||
}
|
||||
}
|
||||
@ -352,7 +358,13 @@ elseif($page == 'accounts')
|
||||
$domains.= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['domain']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$ftp_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/ftp/formfield.ftp_edit.php';
|
||||
$ftp_edit_form = htmlform::genHTMLForm($ftp_edit_data);
|
||||
|
||||
$title = $ftp_edit_data['ftp_edit']['title'];
|
||||
$image = $ftp_edit_data['ftp_edit']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("ftp/accounts_edit") . "\";");
|
||||
}
|
||||
}
|
||||
|
56
lib/formfields/customer/ftp/formfield.ftp_add.php
Normal file
56
lib/formfields/customer/ftp/formfield.ftp_add.php
Normal file
@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Formfields
|
||||
*/
|
||||
|
||||
return array(
|
||||
'ftp_add' => array(
|
||||
'title' => $lng['ftp']['account_add'],
|
||||
'image' => 'icons/add_user.png',
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'title' => $lng['ftp']['account_add'],
|
||||
'image' => 'icons/add_user.png',
|
||||
'fields' => array(
|
||||
'ftp_username' => array(
|
||||
'visible' => ($settings['customer']['ftpatdomain'] == '1' ? true : false),
|
||||
'label' => $lng['login']['username'],
|
||||
'type' => 'text'
|
||||
),
|
||||
'ftp_domain' => array(
|
||||
'visible' => ($settings['customer']['ftpatdomain'] == '1' ? true : false),
|
||||
'label' => $lng['domains']['domainname'],
|
||||
'type' => 'select',
|
||||
'select_var' => (isset($domains) ? $domains : ""),
|
||||
),
|
||||
'path' => array(
|
||||
'label' => $lng['panel']['path'],
|
||||
'desc' => ($settings['panel']['pathedit'] != 'Dropdown' ? $lng['panel']['pathDescription'] : null),
|
||||
'type' => ($settings['panel']['pathedit'] != 'Dropdown' ? 'text' : 'select'),
|
||||
'select_var' => $pathSelect,
|
||||
),
|
||||
'ftp_password' => array(
|
||||
'label' => $lng['login']['password'],
|
||||
'type' => 'password',
|
||||
),
|
||||
'sendinfomail' => array(
|
||||
'label' => $lng['customer']['sendinfomail'],
|
||||
'type' => 'yesno',
|
||||
'yesno_var' => $sendinfomail,
|
||||
),
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
57
lib/formfields/customer/ftp/formfield.ftp_edit.php
Normal file
57
lib/formfields/customer/ftp/formfield.ftp_edit.php
Normal file
@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Formfields
|
||||
*/
|
||||
|
||||
return array(
|
||||
'ftp_edit' => array(
|
||||
'title' => $lng['ftp']['account_edit'],
|
||||
'image' => 'icons/edit_user.png',
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'title' => $lng['ftp']['account_edit'],
|
||||
'image' => 'icons/edit_user.png',
|
||||
'fields' => array(
|
||||
'username' => array(
|
||||
'label' => $lng['login']['username'],
|
||||
'type' => 'label',
|
||||
'value' => $result['username'],
|
||||
),
|
||||
'ftp_username' => array(
|
||||
'visible' => ($settings['customer']['ftpatdomain'] == '1' ? true : false),
|
||||
'label' => $lng['login']['username'],
|
||||
'type' => 'text'
|
||||
),
|
||||
'ftp_domain' => array(
|
||||
'visible' => ($settings['customer']['ftpatdomain'] == '1' ? true : false),
|
||||
'label' => $lng['domains']['domainname'],
|
||||
'type' => 'select',
|
||||
'select_var' => (isset($domains) ? $domains : ""),
|
||||
),
|
||||
'path' => array(
|
||||
'label' => $lng['panel']['path'],
|
||||
'desc' => ($settings['panel']['pathedit'] != 'Dropdown' ? $lng['panel']['pathDescription'] : NULL),
|
||||
'type' => ($settings['panel']['pathedit'] != 'Dropdown' ? 'text' : 'select'),
|
||||
'select_var' => $pathSelect
|
||||
),
|
||||
'ftp_password' => array(
|
||||
'label' => $lng['login']['password'],
|
||||
'desc' => $lng['ftp']['editpassdescription'],
|
||||
'type' => 'password',
|
||||
),
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
@ -17,11 +17,11 @@
|
||||
return array(
|
||||
'mysql_add' => array(
|
||||
'title' => $lng['mysql']['database_create'],
|
||||
'image' => 'icons/mysql_add.png',
|
||||
'image' => 'icons/add_mysql.png',
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'title' => $lng['mysql']['database_create'],
|
||||
'image' => 'icons/mysql_add.png',
|
||||
'image' => 'icons/add_mysql.png',
|
||||
'fields' => array(
|
||||
'description' => array(
|
||||
'label' => $lng['mysql']['databasedescription'],
|
||||
|
@ -17,11 +17,11 @@
|
||||
return array(
|
||||
'mysql_edit' => array(
|
||||
'title' => $lng['mysql']['database_edit'],
|
||||
'image' => 'icons/mysql_edit.png',
|
||||
'image' => 'icons/edit_mysql.png',
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'title' => $lng['mysql']['database_edit'],
|
||||
'image' => 'icons/mysql_edit.png',
|
||||
'image' => 'icons/edit_mysql.png',
|
||||
'fields' => array(
|
||||
'databasename' => array(
|
||||
'label' => $lng['mysql']['databasename'],
|
||||
|
@ -1,44 +1,20 @@
|
||||
$header
|
||||
<article>
|
||||
<header>
|
||||
<h2>
|
||||
<img src="images/Froxlor/icons/add_user.png" alt="{$lng['ftp']['account_add']}" />
|
||||
{$lng['ftp']['account_add']}
|
||||
</h2>
|
||||
</header>
|
||||
|
||||
<section class="fullform bradiusodd">
|
||||
<article>
|
||||
<header>
|
||||
<h2>
|
||||
<img src="images/Froxlor/{$image}" alt="{$title}" />
|
||||
{$title}
|
||||
</h2>
|
||||
</header>
|
||||
|
||||
<section class="fullform bradiusodd">
|
||||
|
||||
<form action="$filename" method="post" enctype="application/x-www-form-urlencoded">
|
||||
<fieldset>
|
||||
<legend>Froxlor - {$lng['ftp']['account_add']}</legend>
|
||||
<legend>Froxlor - {$title}</legend>
|
||||
|
||||
<table class="formtable">
|
||||
<if $settings['customer']['ftpatdomain'] == '1'>
|
||||
<tr>
|
||||
<td>{$lng['login']['username']}:</td>
|
||||
<td><input type="text" name="ftp_username" size="30" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$lng['domains']['domainname']}:</td>
|
||||
<td><select name="ftp_domain">$domains</select></td>
|
||||
</tr>
|
||||
</if>
|
||||
<tr>
|
||||
<td>{$lng['panel']['path']}:<if $settings['panel']['pathedit'] != 'Dropdown'><br /><font size="1">{$lng['panel']['pathDescription']}</font></if></td>
|
||||
<td>{$pathSelect}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$lng['login']['password']}:</td>
|
||||
<td><input type="password" name="ftp_password" size="30" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$lng['customer']['sendinfomail']}:</td>
|
||||
<td>{$sendinfomail}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><input type="hidden" name="send" value="send" /><input type="submit" value="{$lng['ftp']['account_add']}" /></td>
|
||||
</tr>
|
||||
{$ftp_add_form}
|
||||
</table>
|
||||
|
||||
<p style="display: none;">
|
||||
@ -49,6 +25,7 @@ $header
|
||||
</p>
|
||||
</fieldset>
|
||||
</form>
|
||||
</section>
|
||||
</article>
|
||||
|
||||
</section>
|
||||
</article>
|
||||
$footer
|
||||
|
@ -1,44 +1,20 @@
|
||||
$header
|
||||
<article>
|
||||
<header>
|
||||
<h2>
|
||||
<img src="images/Froxlor/icons/user_edit.png" alt="{$lng['ftp']['account_edit']}" />
|
||||
{$lng['ftp']['account_edit']}
|
||||
</h2>
|
||||
</header>
|
||||
|
||||
<section class="fullform bradiusodd">
|
||||
<article>
|
||||
<header>
|
||||
<h2>
|
||||
<img src="images/Froxlor/{$image}" alt="{$title}" />
|
||||
{$title}
|
||||
</h2>
|
||||
</header>
|
||||
|
||||
<section class="fullform bradiusodd">
|
||||
|
||||
<form action="$filename" method="post" enctype="application/x-www-form-urlencoded">
|
||||
<fieldset>
|
||||
<legend>Froxlor - {$lng['ftp']['account_edit']}</legend>
|
||||
<legend>Froxlor - {$title}</legend>
|
||||
|
||||
<table class="formtable">
|
||||
<tr>
|
||||
<td>{$lng['login']['username']}:</td>
|
||||
<td>{$result['username']}</td>
|
||||
</tr>
|
||||
<if $settings['customer']['ftpatdomain'] == '1'>
|
||||
<tr>
|
||||
<td>{$lng['login']['username']}:</td>
|
||||
<td><input type="text" name="ftp_username" size="30" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$lng['domains']['domainname']}:</td>
|
||||
<td><select name="ftp_domain">$domains</select></td>
|
||||
</tr>
|
||||
</if>
|
||||
<tr>
|
||||
<td>{$lng['panel']['path']}:<if $settings['panel']['pathedit'] != 'Dropdown'><br /><small>{$lng['panel']['pathDescription']}</small></if></td>
|
||||
<td>{$pathSelect}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$lng['login']['password']}:<br /><small>{$lng['ftp']['editpassdescription']}</small></td>
|
||||
<td><input type="password" name="ftp_password" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><input type="hidden" name="send" value="send" /><input type="submit" value="{$lng['panel']['save']}" /></td>
|
||||
</tr>
|
||||
{$ftp_edit_form}
|
||||
</table>
|
||||
|
||||
<p style="display: none;">
|
||||
@ -49,6 +25,7 @@ $header
|
||||
</p>
|
||||
</fieldset>
|
||||
</form>
|
||||
</section>
|
||||
</article>
|
||||
|
||||
</section>
|
||||
</article>
|
||||
$footer
|
||||
|
Loading…
Reference in New Issue
Block a user