Made links to phpmyadmin and webmail in the database and mailbox lists configurable.
1 files added
11 files modified
| | |
| | | [dns] |
| | | |
| | | [mail] |
| | | mailboxlist_webmail_link=y |
| | | |
| | | [monitor] |
| | | |
| | |
| | | dbuser_prefix=[CLIENTNAME] |
| | | ftpuser_prefix=[CLIENTNAME] |
| | | shelluser_prefix=[CLIENTNAME] |
| | | dblist_phpmyadmin_link=y |
| | | |
| | | [tools] |
| | |
| | | } |
| | | |
| | | |
| | | private function onShow() |
| | | public function onShow() |
| | | { |
| | | global $app; |
| | | |
| | |
| | | '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 |
| | | ################################## |
| | |
| | | $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'; |
| | | |
| | | ?> |
| | |
| | | $server_id = $this->id; |
| | | |
| | | $this->dataRecord = $app->getconf->get_global_config($section); |
| | | |
| | | } |
| | | |
| | | $record = $app->tform->getHTML($this->dataRecord, $this->active_tab,'EDIT'); |
| | |
| | | $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); |
| | | |
New file |
| | |
| | | <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>
|
| | |
| | | |
| | | <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"> |
| | |
| | | <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'}"> |
| | |
| | | //* Check permissions for module |
| | | $app->auth->check_module_permissions('mail'); |
| | | |
| | | $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('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(); |
| | | |
| | | |
| | | ?> |
| | |
| | | <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>
|
| | | <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>
|
| | |
| | | //* 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(); |
| | | |
| | | |
| | | ?> |
| | |
| | | <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>
|
| | | <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>
|
| | |
| | | //* 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(); |
| | | |
| | | |
| | | ?> |