Commit 45fb5caa authored by tbrehm's avatar tbrehm
Browse files

Implemented: FS#1056 - Webftp link like phpmyadmin or webmail

parent eccb77f7
......@@ -20,6 +20,7 @@ shelluser_prefix=[CLIENTNAME]
webdavuser_prefix=[CLIENTNAME]
dblist_phpmyadmin_link=y
phpmyadmin_url=
webftp_url=
[tools]
......
......@@ -136,6 +136,18 @@ $form["tabs"]['sites'] = array (
'width' => '30',
'maxlength' => '255'
),
'webftp_url' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'validators' => array ( 0 => array ( 'type' => 'REGEX',
'regex' => '/^[0-9a-zA-Z\:\/\-\.]{0,255}$/',
'errmsg'=> 'webftp_url_error_regex'),
),
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
),
##################################
# ENDE Datatable fields
##################################
......
......@@ -18,4 +18,5 @@ $wb['phpmyadmin_url_txt'] = 'PHPMyAdmin URL';
$wb['use_domain_module_txt'] = 'Use the domain-module to add new domains';
$wb['use_domain_module_hint'] = 'If you use this module, your customers can only select one of the domains the admin creates for them. They can not free edit the domain-field.You have to re-login after changing this value, to make the changes visible.';
$wb['new_domain_txt'] = 'HTML to create a new domain';
$wb['webftp_url_txt'] = 'WebFTP URL';
?>
\ No newline at end of file
......@@ -25,16 +25,20 @@
<label for="webdavuser_prefix">{tmpl_var name='webdavuser_prefix_txt'}</label>
<input name="webdavuser_prefix" id="webdavuser_prefix" value="{tmpl_var name='webdavuser_prefix'}" size="30" maxlength="255" type="text" class="textInput formLengthHalf" />
</div>
<div class="ctrlHolder">
<p class="label">{tmpl_var name='dblist_phpmyadmin_link_txt'}</p>
<div class="multiField">
{tmpl_var name='dblist_phpmyadmin_link'}
</div>
<div class="ctrlHolder">
<p class="label">{tmpl_var name='dblist_phpmyadmin_link_txt'}</p>
<div class="multiField">
{tmpl_var name='dblist_phpmyadmin_link'}
</div>
</div>
<div class="ctrlHolder">
<label for="phpmyadmin_url">{tmpl_var name='phpmyadmin_url_txt'}</label>
<input name="phpmyadmin_url" id="phpmyadmin_url" value="{tmpl_var name='phpmyadmin_url'}" size="30" maxlength="255" type="text" class="textInput" />
</div>
<div class="ctrlHolder">
<label for="webftp_url">{tmpl_var name='webftp_url_txt'}</label>
<input name="webftp_url" id="webftp_url" value="{tmpl_var name='webftp_url'}" size="30" maxlength="255" type="text" class="textInput" />
</div>
</fieldset>
<input type="hidden" name="id" value="{tmpl_var name='id'}">
......
......@@ -44,12 +44,31 @@ $list_def_file = "list/ftp_user.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 = 'subdomain'";
$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['webftp_url'] != '') {
$app->tpl->setVar('webftp_link',1);
$app->tpl->setVar('webftp_url',$global_config['webftp_url']);
} else {
$app->tpl->setVar('webftp_link',0);
}
parent::onShow();
}
}
$list = new list_action;
$list->onLoad();
?>
\ No newline at end of file
......@@ -41,7 +41,8 @@
<td class="tbl_col_username"><a href="#" onClick="loadContent('sites/ftp_user_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="username"}</a></td>
<td class="tbl_col_buttons">
<div class="buttons icons16">
<a class="icons16 icoDelete" href="javascript: del_record('sites/ftp_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>
<tmpl_if name="webftp_link"><a class="icons16 icoDbAdmin" href="{tmpl_var name='webftp_url'}" target="_blank"><span>{tmpl_var name='admin_txt'}</span></a></tmpl_if>
<a class="icons16 icoDelete" href="javascript: del_record('sites/ftp_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>
......
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