Converted customer -> mysql to new formbuilder
This commit is contained in:
@@ -256,6 +256,12 @@ elseif($page == 'mysqls')
|
|||||||
|
|
||||||
$sendinfomail = makeyesno('sendinfomail', '1', '0', '0');
|
$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") . "\";");
|
eval("echo \"" . getTemplate("mysql/mysqls_add") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -307,6 +313,12 @@ elseif($page == 'mysqls')
|
|||||||
}
|
}
|
||||||
else
|
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") . "\";");
|
eval("echo \"" . getTemplate("mysql/mysqls_edit") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
1
lib/.gitignore
vendored
Normal file
1
lib/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
userdata.inc.php
|
||||||
49
lib/formfields/customer/mysql/formfield.mysql_add.php
Normal file
49
lib/formfields/customer/mysql/formfield.mysql_add.php
Normal 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/mysql_add.png',
|
||||||
|
'sections' => array(
|
||||||
|
'section_a' => array(
|
||||||
|
'title' => $lng['mysql']['database_create'],
|
||||||
|
'image' => 'icons/mysql_add.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,
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
50
lib/formfields/customer/mysql/formfield.mysql_edit.php
Normal file
50
lib/formfields/customer/mysql/formfield.mysql_edit.php
Normal 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/mysql_edit.png',
|
||||||
|
'sections' => array(
|
||||||
|
'section_a' => array(
|
||||||
|
'title' => $lng['mysql']['database_edit'],
|
||||||
|
'image' => 'icons/mysql_edit.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',
|
||||||
|
),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
$header
|
$header
|
||||||
<article>
|
<article>
|
||||||
<header>
|
<header>
|
||||||
<h2>
|
<h2>
|
||||||
<img src="images/Froxlor/icons/add_mysql.png" alt="{$lng['mysql']['database_create']}" />
|
<img src="images/Froxlor/{$image}" alt="{$title}" />
|
||||||
{$lng['mysql']['database_create']}
|
{$title}
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
@@ -11,30 +11,10 @@ $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 - {$lng['mysql']['database_create']}</legend>
|
<legend>Froxlor - {$title}</legend>
|
||||||
|
|
||||||
<table class="formtable">
|
<table class="formtable">
|
||||||
<tr>
|
{$mysql_add_form}
|
||||||
<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>
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<p style="display: none;">
|
<p style="display: none;">
|
||||||
@@ -45,6 +25,7 @@ $header
|
|||||||
</p>
|
</p>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
</article>
|
</article>
|
||||||
$footer
|
$footer
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
$header
|
$header
|
||||||
<article>
|
<article>
|
||||||
<header>
|
<header>
|
||||||
<h2>
|
<h2>
|
||||||
<img src="images/Froxlor/icons/mysql_edit.png" alt="{$lng['mysql']['database_edit']}" />
|
<img src="images/Froxlor/{$image}" alt="{$title}" />
|
||||||
{$lng['mysql']['database_edit']}
|
{$title}
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
@@ -11,40 +11,22 @@ $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 - {$lng['mysql']['database_edit']}</legend>
|
<legend>Froxlor - {$title}</legend>
|
||||||
|
|
||||||
<table class="formtable">
|
<table class="formtable">
|
||||||
<tr>
|
{$mysql_edit_form}
|
||||||
<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>
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<p style="display: none;">
|
<p style="display: none;">
|
||||||
<input type="hidden" name="s" value="$s" />
|
<input type="hidden" name="s" value="$s" />
|
||||||
<input type="hidden" name="page" value="$page" />
|
<input type="hidden" name="page" value="$page" />
|
||||||
<input type="hidden" name="action" value="$action" />
|
<input type="hidden" name="action" value="$action" />
|
||||||
|
<input type="hidden" name="id" value="$id" />
|
||||||
<input type="hidden" name="send" value="send" />
|
<input type="hidden" name="send" value="send" />
|
||||||
</p>
|
</p>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
</article>
|
</article>
|
||||||
$footer
|
$footer
|
||||||
|
|||||||
Reference in New Issue
Block a user