Merge branch 'redesign' of git.froxlor.org:froxlor into redesign

This commit is contained in:
Michael Kaufmann (d00p)
2011-02-12 16:14:33 +01:00
11 changed files with 296 additions and 142 deletions

View File

@@ -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") . "\";");
}
}
@@ -353,6 +359,12 @@ elseif($page == 'accounts')
}
}
$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") . "\";");
}
}

View File

@@ -256,6 +256,12 @@ elseif($page == 'mysqls')
$sendinfomail = makeyesno('sendinfomail', '1', '0', '0');
$mysql_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/mysql/formfield.mysql_add.php';
$mysql_add_form = htmlform::genHTMLForm($mysql_add_data);
$title = $mysql_add_data['mysql_add']['title'];
$image = $mysql_add_data['mysql_add']['image'];
eval("echo \"" . getTemplate("mysql/mysqls_add") . "\";");
}
}
@@ -307,6 +313,12 @@ elseif($page == 'mysqls')
}
else
{
$mysql_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/mysql/formfield.mysql_edit.php';
$mysql_edit_form = htmlform::genHTMLForm($mysql_edit_data);
$title = $mysql_edit_data['mysql_edit']['title'];
$image = $mysql_edit_data['mysql_edit']['image'];
eval("echo \"" . getTemplate("mysql/mysqls_edit") . "\";");
}
}

1
lib/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
userdata.inc.php

View 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,
),
)
)
)
)
);

View 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',
),
)
)
)
)
);

View File

@@ -0,0 +1,49 @@
<?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(
'mysql_add' => array(
'title' => $lng['mysql']['database_create'],
'image' => 'icons/add_mysql.png',
'sections' => array(
'section_a' => array(
'title' => $lng['mysql']['database_create'],
'image' => 'icons/add_mysql.png',
'fields' => array(
'description' => array(
'label' => $lng['mysql']['databasedescription'],
'type' => 'text',
),
'mysql_server' => array(
'visible' => (1 < count($sql_root) ? true : false),
'label' => $lng['mysql']['mysql_server'],
'type' => 'select',
'select_var' => $mysql_servers,
),
'mysql_password' => array(
'label' => $lng['login']['password'],
'type' => 'password',
),
'sendinfomail' => array(
'label' => $lng['customer']['sendinfomail'],
'type' => 'yesno',
'yesno_var' => $sendinfomail,
)
)
)
)
)
);

View File

@@ -0,0 +1,50 @@
<?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(
'mysql_edit' => array(
'title' => $lng['mysql']['database_edit'],
'image' => 'icons/edit_mysql.png',
'sections' => array(
'section_a' => array(
'title' => $lng['mysql']['database_edit'],
'image' => 'icons/edit_mysql.png',
'fields' => array(
'databasename' => array(
'label' => $lng['mysql']['databasename'],
'type' => 'label',
'value' => $result['databasename'],
),
'description' => array(
'label' => $lng['mysql']['databasedescription'],
'type' => 'text',
'value' => $result['description'],
),
'mysql_server' => array(
'visible' => (1 < count($sql_root) ? true : false),
'label' => $lng['mysql']['mysql_server'],
'type' => 'label',
'value' => $sql_root[$result['dbserver']]['caption']
),
'mysql_password' => array(
'label' => $lng['changepassword']['new_password_ifnotempty'],
'type' => 'password',
),
)
)
)
)
);

View File

@@ -2,8 +2,8 @@ $header
<article>
<header>
<h2>
<img src="images/Froxlor/icons/add_user.png" alt="{$lng['ftp']['account_add']}" />&nbsp;
{$lng['ftp']['account_add']}
<img src="images/Froxlor/{$image}" alt="{$title}" />&nbsp;
{$title}
</h2>
</header>
@@ -11,34 +11,10 @@ $header
<form action="$filename" method="post" enctype="application/x-www-form-urlencoded">
<fieldset>
<legend>Froxlor&nbsp;-&nbsp;{$lng['ftp']['account_add']}</legend>
<legend>Froxlor&nbsp;-&nbsp;{$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>
$footer

View File

@@ -2,8 +2,8 @@ $header
<article>
<header>
<h2>
<img src="images/Froxlor/icons/user_edit.png" alt="{$lng['ftp']['account_edit']}" />&nbsp;
{$lng['ftp']['account_edit']}
<img src="images/Froxlor/{$image}" alt="{$title}" />&nbsp;
{$title}
</h2>
</header>
@@ -11,34 +11,10 @@ $header
<form action="$filename" method="post" enctype="application/x-www-form-urlencoded">
<fieldset>
<legend>Froxlor&nbsp;-&nbsp;{$lng['ftp']['account_edit']}</legend>
<legend>Froxlor&nbsp;-&nbsp;{$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>
$footer

View File

@@ -2,8 +2,8 @@ $header
<article>
<header>
<h2>
<img src="images/Froxlor/icons/add_mysql.png" alt="{$lng['mysql']['database_create']}" />&nbsp;
{$lng['mysql']['database_create']}
<img src="images/Froxlor/{$image}" alt="{$title}" />&nbsp;
{$title}
</h2>
</header>
@@ -11,30 +11,10 @@ $header
<form action="$filename" method="post" enctype="application/x-www-form-urlencoded">
<fieldset>
<legend>Froxlor&nbsp;-&nbsp;{$lng['mysql']['database_create']}</legend>
<legend>Froxlor&nbsp;-&nbsp;{$title}</legend>
<table class="formtable">
<tr>
<td>{$lng['mysql']['databasedescription']}:</td>
<td><input type="text" class="text" name="description" /></td>
</tr>
<if 1 < count($sql_root)>
<tr>
<td>{$lng['mysql']['mysql_server']}:</td>
<td><select name="mysql_server">$mysql_servers</select></td>
</tr>
</if>
<tr>
<td>{$lng['login']['password']}:</td>
<td><input type="password" name="mysql_password" maxlength="50" /></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" class="bottom" value="{$lng['mysql']['database_create']}" /></td>
</tr>
{$mysql_add_form}
</table>
<p style="display: none;">
@@ -45,6 +25,7 @@ $header
</p>
</fieldset>
</form>
</section>
</article>
$footer

View File

@@ -2,8 +2,8 @@ $header
<article>
<header>
<h2>
<img src="images/Froxlor/icons/mysql_edit.png" alt="{$lng['mysql']['database_edit']}" />&nbsp;
{$lng['mysql']['database_edit']}
<img src="images/Froxlor/{$image}" alt="{$title}" />&nbsp;
{$title}
</h2>
</header>
@@ -11,40 +11,22 @@ $header
<form action="$filename" method="post" enctype="application/x-www-form-urlencoded">
<fieldset>
<legend>Froxlor&nbsp;-&nbsp;{$lng['mysql']['database_edit']}</legend>
<legend>Froxlor&nbsp;-&nbsp;{$title}</legend>
<table class="formtable">
<tr>
<td>{$lng['mysql']['databasename']}:</td>
<td>{$result['databasename']}</td>
</tr>
<tr>
<td>{$lng['mysql']['databasedescription']}:</td>
<td><input type="text" class="text" name="description" value="{$result['description']}" /></td>
</tr>
<if 1 < count($sql_root)>
<tr>
<td>{$lng['mysql']['mysql_server']}:</td>
<td>{$sql_root[$result['dbserver']]['caption']}</td>
</tr>
</if>
<tr>
<td>{$lng['changepassword']['new_password_ifnotempty']}:</td>
<td><input type="password" name="mysql_password" /></td>
</tr>
<tr>
<td colspan="2"><input type="hidden" name="send" value="send" /><input type="submit" value="{$lng['panel']['save']}" /></td>
</tr>
{$mysql_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>
$footer