Commit d8b8b077 authored by tbrehm's avatar tbrehm

Made links to phpmyadmin and webmail in the database and mailbox lists configurable.

parent 91433cc6
......@@ -7,6 +7,7 @@
[dns]
[mail]
mailboxlist_webmail_link=y
[monitor]
......@@ -15,5 +16,6 @@ dbname_prefix=[CLIENTNAME]_
dbuser_prefix=[CLIENTNAME]
ftpuser_prefix=[CLIENTNAME]
shelluser_prefix=[CLIENTNAME]
dblist_phpmyadmin_link=y
[tools]
\ No newline at end of file
......@@ -132,7 +132,7 @@ class listform_actions {
}
private function onShow()
public function onShow()
{
global $app;
......
......@@ -106,6 +106,32 @@ $form["tabs"]['sites'] = array (
'width' => '30',
'maxlength' => '255'
),
'dblist_phpmyadmin_link' => array (
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'n',
'value' => array(0 => 'n',1 => 'y')
),
##################################
# ENDE Datatable fields
##################################
)
);
$form["tabs"]['mail'] = array (
'title' => "Mail",
'width' => 70,
'template' => "templates/system_config_mail_edit.htm",
'fields' => array (
##################################
# Begin Datatable fields
##################################
'mailboxlist_webmail_link' => array (
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'n',
'value' => array(0 => 'n',1 => 'y')
),
##################################
# ENDE Datatable fields
##################################
......
......@@ -9,5 +9,7 @@ $wb['dbname_prefix_error_regex'] = 'Char not allowed in database name prefix.';
$wb['dbuser_prefix_error_regex'] = 'Char not allowed in database user prefix.';
$wb['ftpuser_prefix_error_regex'] = 'Char not allowed in ftp user prefix.';
$wb['shelluser_prefix_error_regex'] = 'Char not allowed in shell user prefix.';
$wb['dblist_phpmyadmin_link_txt'] = 'Link to phpmyadmin in DB list';
$wb['mailboxlist_webmail_link_txt'] = 'Link to webmail in Mailbox list';
?>
\ No newline at end of file
......@@ -62,6 +62,7 @@ class page_action extends tform_actions {
$server_id = $this->id;
$this->dataRecord = $app->getconf->get_global_config($section);
}
$record = $app->tform->getHTML($this->dataRecord, $this->active_tab,'EDIT');
......@@ -78,9 +79,8 @@ class page_action extends tform_actions {
$app->uses('ini_parser,getconf');
$section = $app->tform->getCurrentTab();
$server_id = $this->id;
$server_config_array = $app->getconf->get_global_config($server_id);
$server_config_array = $app->getconf->get_global_config();
$server_config_array[$section] = $app->tform->encode($this->dataRecord,$section);
$server_config_str = $app->ini_parser->get_ini_string($server_config_array);
......
<h2><tmpl_var name="list_head_txt"></h2>
<div class="panel panel_system_config">
<div class="pnl_formsarea">
<fieldset id="wf_area_system_config"><legend>Mail</legend>
<span class="wf_oneField">
<label for="mailboxlist_webmail_link" class="wf_preField">{tmpl_var name='mailboxlist_webmail_link_txt'}</label> <span class="">
{tmpl_var name='mailboxlist_webmail_link'}
</span>
</span>
</fieldset>
<input type="hidden" name="id" value="{tmpl_var name='id'}">
<div class="wf_actions buttons">
<button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onClick="submitForm('pageForm','admin/system_config_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button>
<button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onClick="loadContent('admin/users_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button>
</div>
</div>
</div>
<h2><tmpl_var name="list_head_txt"></h2>
<div class="panel panel_system_config">
<div class="pnl_formsarea">
<fieldset id="wf_area_system_config"><legend>Sites</legend>
<p>{tmpl_var name='warning'}</p>
<span class="wf_oneField">
<label for="dbname_prefix" class="wf_preField">{tmpl_var name='dbname_prefix_txt'}</label>
<input type="text" id="dbname_prefix" name="dbname_prefix" value="{tmpl_var name='dbname_prefix'}" size="30" maxlength="255">
</span>
<span class="wf_oneField">
<label for="dbuser_prefix" class="wf_preField">{tmpl_var name='dbuser_prefix_txt'}</label>
<input type="text" id="dbuser_prefix" name="dbuser_prefix" value="{tmpl_var name='dbuser_prefix'}" size="30" maxlength="255">
</span>
<span class="wf_oneField">
<label for="ftpuser_prefix" class="wf_preField">{tmpl_var name='ftpuser_prefix_txt'}</label>
<input type="text" id="ftpuser_prefix" name="ftpuser_prefix" value="{tmpl_var name='ftpuser_prefix'}" size="30" maxlength="255">
</span>
<span class="wf_oneField">
<label for="shelluser_prefix" class="wf_preField">{tmpl_var name='shelluser_prefix_txt'}</label>
<input type="text" id="shelluser_prefix" name="shelluser_prefix" value="{tmpl_var name='shelluser_prefix'}" size="30" maxlength="255">
</span>
</fieldset>
<input type="hidden" name="id" value="{tmpl_var name='id'}">
<div class="wf_actions buttons">
<button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onClick="submitForm('pageForm','admin/system_config_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button>
<button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onClick="loadContent('admin/users_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button>
</div>
</div>
</div>
<h2><tmpl_var name="list_head_txt"></h2>
<div class="panel panel_system_config">
<div class="pnl_formsarea">
<fieldset id="wf_area_system_config"><legend>Sites</legend>
<span class="wf_oneField">
<label for="dbname_prefix" class="wf_preField">{tmpl_var name='dbname_prefix_txt'}</label>
<input type="text" id="dbname_prefix" name="dbname_prefix" value="{tmpl_var name='dbname_prefix'}" size="30" maxlength="255">
</span>
<span class="wf_oneField">
<label for="dbuser_prefix" class="wf_preField">{tmpl_var name='dbuser_prefix_txt'}</label>
<input type="text" id="dbuser_prefix" name="dbuser_prefix" value="{tmpl_var name='dbuser_prefix'}" size="30" maxlength="255">
</span>
<span class="wf_oneField">
<label for="ftpuser_prefix" class="wf_preField">{tmpl_var name='ftpuser_prefix_txt'}</label>
<input type="text" id="ftpuser_prefix" name="ftpuser_prefix" value="{tmpl_var name='ftpuser_prefix'}" size="30" maxlength="255">
</span>
<span class="wf_oneField">
<label for="shelluser_prefix" class="wf_preField">{tmpl_var name='shelluser_prefix_txt'}</label>
<input type="text" id="shelluser_prefix" name="shelluser_prefix" value="{tmpl_var name='shelluser_prefix'}" size="30" maxlength="255">
</span>
<span class="wf_oneField">
<label for="dblist_phpmyadmin_link" class="wf_preField">{tmpl_var name='dblist_phpmyadmin_link_txt'}</label> <span class="">
{tmpl_var name='dblist_phpmyadmin_link'}
</span>
</span>
</fieldset>
<input type="hidden" name="id" value="{tmpl_var name='id'}">
<div class="wf_actions buttons">
<button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onClick="submitForm('pageForm','admin/system_config_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button>
<button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onClick="loadContent('admin/users_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button>
</div>
</div>
</div>
......@@ -15,9 +15,30 @@ $list_def_file = "list/mail_user.list.php";
//* Check permissions for module
$app->auth->check_module_permissions('mail');
$app->uses('listform_actions');
$app->listform_actions->onLoad();
$app->load('listform_actions');
class list_action extends listform_actions {
function onShow() {
global $app,$conf;
$app->uses('getconf');
$global_config = $app->getconf->get_global_config('mail');
if($global_config['mailboxlist_webmail_link'] == 'y') {
$app->tpl->setVar('mailboxlist_webmail_link',1);
} else {
$app->tpl->setVar('mailboxlist_webmail_link',0);
}
parent::onShow();
}
}
$list = new list_action;
$list->onLoad();
?>
\ No newline at end of file
<h2><tmpl_var name="list_head_txt"></h2>
<div class="panel panel_list_mail_user">
<div class="pnl_toolsarea">
<fieldset><legend>Tools</legend>
<div class="buttons">
<button class="iconstxt icoAdd" type="button" onClick="loadContent('mail/mail_user_edit.php');">
<span>{tmpl_var name="add_new_record_txt"}</span>
</button>
</div>
</fieldset>
</div>
<div class="pnl_listarea">
<fieldset><legend><tmpl_var name="list_head_txt"></legend>
<table class="list">
<thead>
<tr>
<th class="tbl_col_email" scope="col"><tmpl_var name="email_txt"></th>
<th class="tbl_col_autoresponder" scope="col"><tmpl_var name="autoresponder_txt"></th>
<th class="tbl_col_buttons" scope="col">&nbsp;</th>
</tr>
<tr>
<td class="tbl_col_email"><input type="text" name="search_email" value="{tmpl_var name='search_email'}" /></td>
<td class="tbl_col_autoresponder"><input type="text" name="search_autoresponder" value="{tmpl_var name='search_autoresponder'}" /></td>
<td class="tbl_col_buttons"><div class="buttons"><button type="button" class="icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onClick="submitForm('pageForm','mail/mail_user_list.php');"><span>{tmpl_var name="filter_txt"}</span></button></div></td>
</tr>
</thead>
<tbody>
<tmpl_loop name="records">
<tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>">
<td class="tbl_col_email"><a href="#" onClick="loadContent('mail/mail_user_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="email"}</a></td>
<td class="tbl_col_autoresponder"><a href="#" onClick="loadContent('mail/mail_user_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="autoresponder"}</a></td>
<td class="tbl_col_buttons">
<div class="buttons icons16">
<a class="icons16 icoWebmailer" href="mail/webmailer.php?id={tmpl_var name='id'}" target="webmail"><span>{tmpl_var name='delete_txt'}</span></a>
<a class="icons16 icoDelete" href="javascript: del_record('mail/mail_user_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span>{tmpl_var name='delete_txt'}</span></a>
</div>
</td>
</tr>
</tmpl_loop>
</tbody>
<tfoot>
<tr>
<td class="tbl_footer tbl_paging" colspan="3"><tmpl_var name="paging"></td>
</tr>
</tfoot>
</table>
</fieldset>
</div>
</div>
<h2><tmpl_var name="list_head_txt"></h2>
<div class="panel panel_list_mail_user">
<div class="pnl_toolsarea">
<fieldset><legend>Tools</legend>
<div class="buttons">
<button class="iconstxt icoAdd" type="button" onClick="loadContent('mail/mail_user_edit.php');">
<span>{tmpl_var name="add_new_record_txt"}</span>
</button>
</div>
</fieldset>
</div>
<div class="pnl_listarea">
<fieldset><legend><tmpl_var name="list_head_txt"></legend>
<table class="list">
<thead>
<tr>
<th class="tbl_col_email" scope="col"><tmpl_var name="email_txt"></th>
<th class="tbl_col_autoresponder" scope="col"><tmpl_var name="autoresponder_txt"></th>
<th class="tbl_col_buttons" scope="col">&nbsp;</th>
</tr>
<tr>
<td class="tbl_col_email"><input type="text" name="search_email" value="{tmpl_var name='search_email'}" /></td>
<td class="tbl_col_autoresponder"><input type="text" name="search_autoresponder" value="{tmpl_var name='search_autoresponder'}" /></td>
<td class="tbl_col_buttons"><div class="buttons"><button type="button" class="icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onClick="submitForm('pageForm','mail/mail_user_list.php');"><span>{tmpl_var name="filter_txt"}</span></button></div></td>
</tr>
</thead>
<tbody>
<tmpl_loop name="records">
<tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>">
<td class="tbl_col_email"><a href="#" onClick="loadContent('mail/mail_user_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="email"}</a></td>
<td class="tbl_col_autoresponder"><a href="#" onClick="loadContent('mail/mail_user_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="autoresponder"}</a></td>
<td class="tbl_col_buttons">
<div class="buttons icons16">
<tmpl_if name="mailboxlist_webmail_link"><a class="icons16 icoWebmailer" href="mail/webmailer.php?id={tmpl_var name='id'}" target="webmail"><span>{tmpl_var name='delete_txt'}</span></a></tmpl_if>
<a class="icons16 icoDelete" href="javascript: del_record('mail/mail_user_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span>{tmpl_var name='delete_txt'}</span></a>
</div>
</td>
</tr>
</tmpl_loop>
</tbody>
<tfoot>
<tr>
<td class="tbl_footer tbl_paging" colspan="3"><tmpl_var name="paging"></td>
</tr>
</tfoot>
</table>
</fieldset>
</div>
</div>
......@@ -44,9 +44,30 @@ $list_def_file = "list/database.list.php";
//* Check permissions for module
$app->auth->check_module_permissions('sites');
$app->uses('listform_actions');
$app->load('listform_actions');
$app->listform_actions->onLoad();
class list_action extends listform_actions {
function onShow() {
global $app,$conf;
$app->uses('getconf');
$global_config = $app->getconf->get_global_config('sites');
if($global_config['dblist_phpmyadmin_link'] == 'y') {
$app->tpl->setVar('dblist_phpmyadmin_link',1);
} else {
$app->tpl->setVar('dblist_phpmyadmin_link',0);
}
parent::onShow();
}
}
$list = new list_action;
$list->onLoad();
?>
\ No newline at end of file
<h2><tmpl_var name="list_head_txt"></h2>
<div class="panel panel_list_database">
<div class="pnl_toolsarea">
<fieldset><legend>Tools</legend>
<div class="buttons">
<button class="iconstxt icoAdd" type="button" onClick="loadContent('sites/database_edit.php');">
<span>{tmpl_var name="add_new_record_txt"}</span>
</button>
</div>
</fieldset>
</div>
<div class="pnl_listarea">
<fieldset><legend><tmpl_var name="list_head_txt"></legend>
<table class="list">
<thead>
<tr>
<th class="tbl_col_active" scope="col"><tmpl_var name="active_txt"></th>
<th class="tbl_col_remote_access" scope="col"><tmpl_var name="remote_access_txt"></th>
<th class="tbl_col_server_id" scope="col"><tmpl_var name="server_id_txt"></th>
<th class="tbl_col_database_name" scope="col"><tmpl_var name="database_name_txt"></th>
<th class="tbl_col_buttons" scope="col">&nbsp;</th>
</tr>
<tr>
<td class="tbl_col_active"><select name="search_active" onChange="submitForm('pageForm','sites/database_list.php');">{tmpl_var name='search_active'}</select></td>
<td class="tbl_col_remote_access"><select name="search_remote_access" onChange="submitForm('pageForm','sites/database_list.php');">{tmpl_var name='search_remote_access'}</select></td>
<td class="tbl_col_server_id"><select name="search_server_id" onChange="submitForm('pageForm','sites/database_list.php');">{tmpl_var name='search_server_id'}</select></td>
<td class="tbl_col_database_name"><input type="text" name="search_database_name" value="{tmpl_var name='search_database_name'}" /></td>
<td class="tbl_col_buttons"><div class="buttons"><button type="button" class="icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onClick="submitForm('pageForm','sites/database_list.php');"><span>{tmpl_var name="filter_txt"}</span></button></div></td>
</tr>
</thead>
<tbody>
<tmpl_loop name="records">
<tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>">
<td class="tbl_col_active">{tmpl_var name="active"}</td>
<td class="tbl_col_remote_access">{tmpl_var name="remote_access"}</td>
<td class="tbl_col_server_id">{tmpl_var name="server_id"}</td>
<td class="tbl_col_database_name"><a href="#" onClick="loadContent('sites/database_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="database_name"}</a></td>
<td class="tbl_col_buttons">
<div class="buttons icons16">
<a class="icons16 icoDbAdmin" href="sites/database_phpmyadmin.php?id={tmpl_var name='id'}" target="phpmyadmin"><span>{tmpl_var name='admin_txt'}</span></a>
<a class="icons16 icoEdit" href="javascript: loadContent('sites/database_edit.php?id={tmpl_var name='id'}');"><span>{tmpl_var name='edit_txt'}</span></a>
<a class="icons16 icoDelete" href="javascript: del_record('sites/database_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span>{tmpl_var name='delete_txt'}</span></a>
</div>
</td>
</tr>
</tmpl_loop>
</tbody>
<tfoot>
<tr>
<td class="tbl_footer tbl_paging" colspan="5"><tmpl_var name="paging"></td>
</tr>
</tfoot>
</table>
</fieldset>
</div>
</div>
<h2><tmpl_var name="list_head_txt"></h2>
<div class="panel panel_list_database">
<div class="pnl_toolsarea">
<fieldset><legend>Tools</legend>
<div class="buttons">
<button class="iconstxt icoAdd" type="button" onClick="loadContent('sites/database_edit.php');">
<span>{tmpl_var name="add_new_record_txt"}</span>
</button>
</div>
</fieldset>
</div>
<div class="pnl_listarea">
<fieldset><legend><tmpl_var name="list_head_txt"></legend>
<table class="list">
<thead>
<tr>
<th class="tbl_col_active" scope="col"><tmpl_var name="active_txt"></th>
<th class="tbl_col_remote_access" scope="col"><tmpl_var name="remote_access_txt"></th>
<th class="tbl_col_server_id" scope="col"><tmpl_var name="server_id_txt"></th>
<th class="tbl_col_database_name" scope="col"><tmpl_var name="database_name_txt"></th>
<th class="tbl_col_buttons" scope="col">&nbsp;</th>
</tr>
<tr>
<td class="tbl_col_active"><select name="search_active" onChange="submitForm('pageForm','sites/database_list.php');">{tmpl_var name='search_active'}</select></td>
<td class="tbl_col_remote_access"><select name="search_remote_access" onChange="submitForm('pageForm','sites/database_list.php');">{tmpl_var name='search_remote_access'}</select></td>
<td class="tbl_col_server_id"><select name="search_server_id" onChange="submitForm('pageForm','sites/database_list.php');">{tmpl_var name='search_server_id'}</select></td>
<td class="tbl_col_database_name"><input type="text" name="search_database_name" value="{tmpl_var name='search_database_name'}" /></td>
<td class="tbl_col_buttons"><div class="buttons"><button type="button" class="icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onClick="submitForm('pageForm','sites/database_list.php');"><span>{tmpl_var name="filter_txt"}</span></button></div></td>
</tr>
</thead>
<tbody>
<tmpl_loop name="records">
<tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>">
<td class="tbl_col_active">{tmpl_var name="active"}</td>
<td class="tbl_col_remote_access">{tmpl_var name="remote_access"}</td>
<td class="tbl_col_server_id">{tmpl_var name="server_id"}</td>
<td class="tbl_col_database_name"><a href="#" onClick="loadContent('sites/database_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="database_name"}</a></td>
<td class="tbl_col_buttons">
<div class="buttons icons16">
<tmpl_if name="dblist_phpmyadmin_link"><a class="icons16 icoDbAdmin" href="sites/database_phpmyadmin.php?id={tmpl_var name='id'}" target="phpmyadmin"><span>{tmpl_var name='admin_txt'}</span></a></tmpl_if>
<a class="icons16 icoEdit" href="javascript: loadContent('sites/database_edit.php?id={tmpl_var name='id'}');"><span>{tmpl_var name='edit_txt'}</span></a>
<a class="icons16 icoDelete" href="javascript: del_record('sites/database_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span>{tmpl_var name='delete_txt'}</span></a>
</div>
</td>
</tr>
</tmpl_loop>
</tbody>
<tfoot>
<tr>
<td class="tbl_footer tbl_paging" colspan="5"><tmpl_var name="paging"></td>
</tr>
</tfoot>
</table>
</fieldset>
</div>
</div>
......@@ -44,12 +44,16 @@ $list_def_file = "list/web_domain.list.php";
//* Check permissions for module
$app->auth->check_module_permissions('sites');
$app->uses('listform_actions');
$app->load('listform_actions');
// Limit the results to alias domains
$app->listform_actions->SQLExtWhere = "type = 'vhost'";
$app->listform_actions->onLoad();
class list_action extends listform_actions {
}
$list = new list_action;
$list->SQLExtWhere = "type = 'vhost'";
$list->onLoad();
?>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment