From 61f1f5a9a885b90ea585cc70b6917301c5f0df0f Mon Sep 17 00:00:00 2001
From: Marius Cramer <m.cramer@pixcept.de>
Date: Wed, 15 Apr 2015 08:51:38 -0400
Subject: [PATCH] - ported patches
---
interface/web/dns/templates/dns_import.htm | 4
interface/web/client/templates/client_edit_limits.htm | 23 ++--
interface/web/client/form/client.tform.php | 10 +
interface/web/client/templates/message_template.htm | 7
interface/web/sites/lib/module.conf.php | 22 +++
interface/web/admin/templates/system_config_domains_edit.htm | 8
interface/web/themes/default/templates/main.tpl.htm | 2
interface/web/client/templates/client_circle_edit.htm | 5
install/sql/ispconfig3.sql | 4
interface/web/index.php | 13 ++
interface/web/sites/templates/web_vhost_domain_admin_list.htm | 6
interface/web/client/templates/reseller_edit_limits.htm | 21 +--
interface/web/client/templates/client_template_edit_template.htm | 4
interface/web/themes/default/assets/stylesheets/ispconfig.css | 3
interface/lib/classes/tform_base.inc.php | 3
interface/web/client/form/reseller.tform.php | 10 +
interface/web/sites/templates/web_childdomain_list.htm | 6
interface/lib/classes/functions.inc.php | 9 +
interface/web/admin/system_config_edit.php | 25 +++++
interface/web/sites/form/web_childdomain.tform.php | 2
interface/web/sites/templates/web_vhost_domain_list.htm | 6
interface/web/admin/templates/system_config_misc_edit.htm | 88 ++++++++++++++++
interface/web/sites/form/web_vhost_domain.tform.php | 5
23 files changed, 223 insertions(+), 63 deletions(-)
diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql
index 571d59d..5011f16 100644
--- a/install/sql/ispconfig3.sql
+++ b/install/sql/ispconfig3.sql
@@ -1621,6 +1621,8 @@
CREATE TABLE `sys_ini` (
`sysini_id` int(11) unsigned NOT NULL auto_increment,
`config` longtext,
+ `default_logo` text NOT NULL,
+ `custom_logo` text NOT NULL,
PRIMARY KEY (`sysini_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
@@ -2369,7 +2371,7 @@
-- Dumping data for table `sys_ini`
--
-INSERT INTO `sys_ini` (`sysini_id`, `config`) VALUES (1, '');
+INSERT INTO `sys_ini` (`sysini_id`, `config`, `default_logo`, `custom_logo`) VALUES (1, '', 'data:image/png;base64,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', '');
-- --------------------------------------------------------
diff --git a/interface/lib/classes/functions.inc.php b/interface/lib/classes/functions.inc.php
index 5bbff40..43eec67 100644
--- a/interface/lib/classes/functions.inc.php
+++ b/interface/lib/classes/functions.inc.php
@@ -380,6 +380,15 @@
return true;
}
+
+ public function getimagesizefromstring($string){
+ if (!function_exists('getimagesizefromstring')) {
+ $uri = 'data://application/octet-stream;base64,' . base64_encode($string);
+ return getimagesize($uri);
+ } else {
+ return getimagesizefromstring($string);
+ }
+ }
}
diff --git a/interface/lib/classes/tform_base.inc.php b/interface/lib/classes/tform_base.inc.php
index f5ae05b..fb943c5 100644
--- a/interface/lib/classes/tform_base.inc.php
+++ b/interface/lib/classes/tform_base.inc.php
@@ -810,6 +810,9 @@
case 'IDNTOUTF8':
$returnval = $app->functions->idn_decode($returnval);
break;
+ case 'TRIM':
+ $returnval = trim($returnval);
+ break;
default:
$this->errorMessage .= "Unknown Filter: ".$filter['type'];
break;
diff --git a/interface/web/admin/system_config_edit.php b/interface/web/admin/system_config_edit.php
index 1e1fdc2..c07810c 100644
--- a/interface/web/admin/system_config_edit.php
+++ b/interface/web/admin/system_config_edit.php
@@ -96,6 +96,17 @@
if($available_dashlets_txt == '') $available_dashlets_txt = '------';
$app->tpl->setVar("available_dashlets_txt", $available_dashlets_txt);
+
+ // Logo
+ $sys_ini = $app->db->queryOneRecord("SELECT * FROM sys_ini WHERE sysini_id = ?", $this->id);
+ if($sys_ini['custom_logo'] != ''){
+ $logo = '<img src="'.$sys_ini['custom_logo'].'" /> <a href="#" class="btn btn-default formbutton-danger formbutton-narrow" style="margin:5px" id="del_custom_logo"><span class="icon icon-delete"></span></a>';
+ } else {
+ $logo = '<img src="'.$sys_ini['default_logo'].'" />';
+ }
+ $default_logo = '<img src="'.$sys_ini['default_logo'].'" />';
+ $app->tpl->setVar("used_logo", $logo);
+ $app->tpl->setVar("default_logo", $default_logo);
parent::onShowEnd();
}
@@ -183,6 +194,20 @@
"FROM web_domain WHERE type NOT IN ('subdomain','vhostsubdomain')";
$app->db->query($sql);
}
+
+ //die(print_r($_FILES));
+ // Logo
+ /*
+ if(isset($_FILES['file']['name']) && is_uploaded_file($_FILES['file']['tmp_name'])){
+ //print_r($_FILES);
+
+ $path= $_FILES['file']['tmp_name'];
+ $type = pathinfo($path, PATHINFO_EXTENSION);
+ $data = file_get_contents($path);
+ $base64 = 'data:image/' . $type . ';base64,' . base64_encode($data);
+ $app->db->query("UPDATE sys_ini SET custom_logo = ? WHERE sysini_id = ?", $base64, $this->id);
+ }
+ */
// Maintenance mode
if($server_config_array['misc']['maintenance_mode'] == 'y'){
diff --git a/interface/web/admin/templates/system_config_domains_edit.htm b/interface/web/admin/templates/system_config_domains_edit.htm
index a9c8705..c651e42 100644
--- a/interface/web/admin/templates/system_config_domains_edit.htm
+++ b/interface/web/admin/templates/system_config_domains_edit.htm
@@ -1,10 +1,10 @@
+<tmpl_if name="list_head_txt">
<div class='page-header'>
- <h1><tmpl_var name="list_head_txt"></h1>
+ <h1><tmpl_var name="list_head_txt"></h1>
</div>
-<p><tmpl_var name="list_desc_txt"></p>
+</tmpl_if>
+<tmpl_if name="list_desc_txt"><p><tmpl_var name="list_desc_txt"></p></tmpl_if>
-
-
<div class="form-group">
<div style="float:left;width:100%">
<p class="label" style="width:270px">{tmpl_var name='use_domain_module_txt'}</p>
diff --git a/interface/web/admin/templates/system_config_misc_edit.htm b/interface/web/admin/templates/system_config_misc_edit.htm
index f36962f..4674d4c 100644
--- a/interface/web/admin/templates/system_config_misc_edit.htm
+++ b/interface/web/admin/templates/system_config_misc_edit.htm
@@ -3,8 +3,14 @@
</div>
<p><tmpl_var name="list_desc_txt"></p>
-
- <legend>Misc</legend>
+ <div class="form-group">
+ <label for="file" class="col-sm-3 control-label">{tmpl_var name='logo_txt'}</label>
+ <div class="col-sm-3 col-text"><input name="file" id="file" size="30" type="file" class="fileUpload" /></div><div class="col-sm-6"><button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" id="start_upload">{tmpl_var name='upload_txt'}</button></div>
+ </div>
+ <div class="form-group">
+ <label for="dashboard_atom_url_admin" class="col-sm-3 control-label">{tmpl_var name='used_logo_txt'}</label>
+ <div class="col-sm-9" id="used_logo">{tmpl_var name='used_logo'}</div>
+ </div>
<div class="form-group">
<label for="dashboard_atom_url_admin" class="col-sm-3 control-label">{tmpl_var name='dashboard_atom_url_admin_txt'}</label>
<div class="col-sm-9"><input type="text" name="dashboard_atom_url_admin" id="dashboard_atom_url_admin" value="{tmpl_var name='dashboard_atom_url_admin'}" size="" maxlength="" class="form-control" /></div></div>
@@ -98,9 +104,83 @@
{tmpl_var name='maintenance_mode'}
</div>
</div>
+
+ <tmpl_if name="msg">
+ <div id="OKMsg"><p><tmpl_var name="msg"></p></div>
+ </tmpl_if>
+ <tmpl_if name="error">
+ <div id="errorMsg"><h3>ERROR</h3><ol><tmpl_var name="error"></ol></div>
+ </tmpl_if>
- <input type="hidden" name="id" value="{tmpl_var name='id'}">
+ <input type="hidden" name="id" id="id" value="{tmpl_var name='id'}">
<div class="clear"><div class="right">
<button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/system_config_edit.php">{tmpl_var name='btn_save_txt'}</button>
<button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/server_list.php">{tmpl_var name='btn_cancel_txt'}</button>
- </div></div>
\ No newline at end of file
+ </div></div>
+<script language="JavaScript" type="text/javascript">
+ var defaultLogo = '{tmpl_var name='default_logo'}';
+ $(document).on('click', '#del_custom_logo', function(){
+ delCustomLogo();
+ });
+
+ function delCustomLogo() {
+ var id = jQuery('input[name="id"]').val();
+
+ jQuery.getJSON('admin/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {'id': id, 'type': "delcustomlogo"}, function(data) {
+ //console.log(data);
+ $('#used_logo').html(defaultLogo);
+ $('#logo').css({ "background": "url("+data.data+") no-repeat", "width": data.width, "height": data.height });
+ });
+ }
+
+ // Variable to store your files
+ var files;
+ // Add events
+ $('input[type="file"]').on('change', prepareUpload);
+ $('#start_upload').on('click', uploadFiles);
+
+ // Grab the files and set them to our variable
+ function prepareUpload(event){
+ files = event.target.files;
+ }
+
+ // Catch the form submit and upload the files
+ function uploadFiles(event){
+ event.stopPropagation(); // Stop stuff happening
+ event.preventDefault(); // Totally stop stuff happening
+
+ var id = jQuery('input[name="id"]').val();
+
+ // Create a formdata object and add the files
+ var data = new FormData();
+ $.each(files, function(key, value){
+ data.append(key, value);
+ });
+
+ $.ajax({
+ url: 'admin/ajax_get_json.php?id='+id+'&type=uploadfile',
+ type: 'POST',
+ data: data,
+ cache: false,
+ dataType: 'json',
+ processData: false, // Don't process the files
+ contentType: false, // Set content type to false as jQuery will tell the server its a query string request
+ success: function(data, textStatus, jqXHR){
+ if(typeof data.error === 'undefined'){
+ // Success so call function to process the form
+ //console.log(data);
+ $('#used_logo').html('<img src="'+data.data+'" /> <a href="#" class="btn btn-default formbutton-danger formbutton-narrow" style="margin:5px" id="del_custom_logo"><span class="icon icon-delete"></span></a>');
+ $('#logo').css({ "background": "url("+data.data+") no-repeat", "width": data.width, "height": data.height });
+ } else {
+ // Handle errors here
+ //console.log(data);
+ }
+ },
+ error: function(jqXHR, textStatus, errorThrown){
+ // Handle errors here
+ //console.log(data);
+ }
+ });
+ }
+
+</script>
\ No newline at end of file
diff --git a/interface/web/client/form/client.tform.php b/interface/web/client/form/client.tform.php
index 7507c18..ef8ce33 100644
--- a/interface/web/client/form/client.tform.php
+++ b/interface/web/client/form/client.tform.php
@@ -116,7 +116,10 @@
'maxlength' => '255',
'rows' => '',
'cols' => '',
- 'searchable' => 1
+ 'searchable' => 1,
+ 'filters' => array( 0 => array( 'event' => 'SAVE',
+ 'type' => 'TRIM'),
+ ),
),
'contact_name' => array (
'datatype' => 'VARCHAR',
@@ -131,7 +134,10 @@
'maxlength' => '255',
'rows' => '',
'cols' => '',
- 'searchable' => 1
+ 'searchable' => 1,
+ 'filters' => array( 0 => array( 'event' => 'SAVE',
+ 'type' => 'TRIM'),
+ ),
),
'customer_no' => array (
'datatype' => 'VARCHAR',
diff --git a/interface/web/client/form/reseller.tform.php b/interface/web/client/form/reseller.tform.php
index 75e9fa2..822e96a 100644
--- a/interface/web/client/form/reseller.tform.php
+++ b/interface/web/client/form/reseller.tform.php
@@ -116,7 +116,10 @@
'maxlength' => '255',
'rows' => '',
'cols' => '',
- 'searchable' => 1
+ 'searchable' => 1,
+ 'filters' => array( 0 => array( 'event' => 'SAVE',
+ 'type' => 'TRIM'),
+ ),
),
'contact_name' => array (
'datatype' => 'VARCHAR',
@@ -131,7 +134,10 @@
'maxlength' => '255',
'rows' => '',
'cols' => '',
- 'searchable' => 1
+ 'searchable' => 1,
+ 'filters' => array( 0 => array( 'event' => 'SAVE',
+ 'type' => 'TRIM'),
+ ),
),
'customer_no' => array (
'datatype' => 'VARCHAR',
diff --git a/interface/web/client/templates/client_circle_edit.htm b/interface/web/client/templates/client_circle_edit.htm
index ddc3f6e..0bdf2f4 100644
--- a/interface/web/client/templates/client_circle_edit.htm
+++ b/interface/web/client/templates/client_circle_edit.htm
@@ -1,10 +1,11 @@
+<tmpl_if name="list_head_txt">
<div class='page-header'>
<h1><tmpl_var name="list_head_txt"></h1>
</div>
-<p><tmpl_var name="list_desc_txt"></p>
+</tmpl_if>
+<tmpl_if name="list_desc_txt"><p><tmpl_var name="list_desc_txt"></p></tmpl_if>
- <legend>{tmpl_var name='circle_txt'}</legend>
<div class="form-group">
<label for="circle_name" class="col-sm-3 control-label">{tmpl_var name='circle_name_txt'}*</label>
<div class="col-sm-9"><input type="text" name="circle_name" id="circle_name" value="{tmpl_var name='circle_name'}" class="form-control" /></div></div>
diff --git a/interface/web/client/templates/client_edit_limits.htm b/interface/web/client/templates/client_edit_limits.htm
index ed150b4..e7de5c6 100644
--- a/interface/web/client/templates/client_edit_limits.htm
+++ b/interface/web/client/templates/client_edit_limits.htm
@@ -1,20 +1,14 @@
+<tmpl_if name="list_head_txt">
<div class='page-header'>
<h1><tmpl_var name="list_head_txt"></h1>
</div>
-<p><tmpl_var name="list_desc_txt"></p>
+</tmpl_if>
+<tmpl_if name="list_desc_txt"><p><tmpl_var name="list_desc_txt"></p></tmpl_if>
<div class="panel panel_client">
-
- <div class="pnl_toolsarea">
- <p class="fieldset-legend">{tmpl_var name="toolsarea_head_txt"}</p>
- <div class="buttons topbuttons">
- <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='add_additional_template_txt'}" onclick="ISPConfig.addAdditionalTemplate();">{tmpl_var name='add_additional_template_txt'}</button>
- </div>
-
- </div>
-
- <div class="pnl_formsarea">
- <legend>Limits</legend>
+
+ <div class="pnl_formsarea">
+ <fieldset class="inlineLabels"><legend>Limits</legend>
<div class="form-group">
<label for="template_master" class="col-sm-3 control-label">{tmpl_var name='template_master_txt'}</label>
<div class="col-sm-9"><select name="template_master" id="template_master" class="form-control">
@@ -27,9 +21,12 @@
{tmpl_var name='tpl_add_select'}
</select></div>
</div>
+ <div class="clear"><div class="right">
+ <button class="btn btn-default formbutton-success" type="button" onclick="ISPConfig.addAdditionalTemplate();">{tmpl_var name="add_additional_template_txt"}</button>
+ </div></div>
<div class="form-group">
<label class="col-sm-3 control-label">{tmpl_var name='active_template_additional_txt'}</label>
- <div id="template_additional_list" class="multiField">
+ <div id="template_additional_list" class="col-sm-9 col-text">
<ul>
{tmpl_var name='template_additional_list'}
</ul>
diff --git a/interface/web/client/templates/client_template_edit_template.htm b/interface/web/client/templates/client_template_edit_template.htm
index 5e07d8d..e06d077 100644
--- a/interface/web/client/templates/client_template_edit_template.htm
+++ b/interface/web/client/templates/client_template_edit_template.htm
@@ -1,7 +1,9 @@
+<tmpl_if name="list_head_txt">
<div class='page-header'>
<h1><tmpl_var name="list_head_txt"></h1>
</div>
-<p><tmpl_var name="list_desc_txt"></p>
+</tmpl_if>
+<tmpl_if name="list_desc_txt"><p><tmpl_var name="list_desc_txt"></p></tmpl_if>
<legend>Template</legend>
diff --git a/interface/web/client/templates/message_template.htm b/interface/web/client/templates/message_template.htm
index 26522d4..aa27d18 100644
--- a/interface/web/client/templates/message_template.htm
+++ b/interface/web/client/templates/message_template.htm
@@ -18,12 +18,13 @@
<div class="col-sm-9"><input type="text" name="template_name" id="template_name" value="{tmpl_var name='template_name'}" class="form-control" /></div></div>
<div class="form-group">
<label for="subject" class="col-sm-3 control-label">{tmpl_var name='subject_txt'}</label>
- <div class="col-sm-9"><input type="text" name="subject" id="subject" value="{tmpl_var name='subject'}" class="form-control" /></div><br clear="all">{tmpl_var name='variables_txt'}: {tmpl_var name="message_variables"} <br />{tmpl_var name='variables_description_txt'}
+ <div class="col-sm-9"><input type="text" name="subject" id="subject" value="{tmpl_var name='subject'}" class="form-control" /></div>
+ <div class="col-sm-3 col-text"></div><div class="col-sm-9 col-text">{tmpl_var name='variables_txt'}: {tmpl_var name="message_variables"} <br />{tmpl_var name='variables_description_txt'}</div>
</div>
<div class="form-group">
<label for="message" class="col-sm-3 control-label">{tmpl_var name='message_txt'}</label>
- <div class="col-sm-9"><textarea class="form-control" name="message" id="message" rows='' cols=''>{tmpl_var name='message'}</textarea></div>
- <br clear="all">{tmpl_var name='variables_txt'}: {tmpl_var name="message_variables"} <br />{tmpl_var name='variables_description_txt'}
+ <div class="col-sm-9"><textarea class="form-control" name="message" id="message" style="height:300px">{tmpl_var name='message'}</textarea></div>
+ <div class="col-sm-3 col-text"></div><div class="col-sm-9 col-text">{tmpl_var name='variables_txt'}: {tmpl_var name="message_variables"} <br />{tmpl_var name='variables_description_txt'}</div>
</div>
<div class="clear"><div class="right">
<button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="client/message_template_edit.php">{tmpl_var name='btn_save_txt'}</button>
diff --git a/interface/web/client/templates/reseller_edit_limits.htm b/interface/web/client/templates/reseller_edit_limits.htm
index 7644b95..d58e284 100644
--- a/interface/web/client/templates/reseller_edit_limits.htm
+++ b/interface/web/client/templates/reseller_edit_limits.htm
@@ -1,19 +1,11 @@
+<tmpl_if name="list_head_txt">
<div class='page-header'>
<h1><tmpl_var name="list_head_txt"></h1>
</div>
-<p><tmpl_var name="list_desc_txt"></p>
+</tmpl_if>
+<tmpl_if name="list_desc_txt"><p><tmpl_var name="list_desc_txt"></p></tmpl_if>
<div class="panel panel_client">
-
- <tmpl_if name="is_admin">
- <div class="pnl_toolsarea">
- <p class="fieldset-legend">{tmpl_var name="toolsarea_head_txt"}</p>
- <div class="buttons topbuttons">
- <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='add_additional_template_txt'}" onclick="ISPConfig.addAdditionalTemplate();">{tmpl_var name='add_additional_template_txt'}</button>
- </div>
-
- </div>
- </tmpl_if>
<div class="pnl_formsarea">
<legend>Limits</legend>
@@ -30,9 +22,14 @@
{tmpl_var name='tpl_add_select'}
</select></div>
</div>
+ <tmpl_if name="is_admin">
+ <div class="clear"><div class="right">
+ <button class="btn btn-default formbutton-success" type="button" onclick="ISPConfig.addAdditionalTemplate();">{tmpl_var name="add_additional_template_txt"}</button>
+ </div></div>
+ </tmpl_if>
<div class="form-group">
<label class="col-sm-3 control-label">{tmpl_var name='active_template_additional_txt'}</label>
- <div id="template_additional_list" class="multiField">
+ <div id="template_additional_list" class="col-sm-9 col-text">
<ul>
{tmpl_var name='template_additional_list'}
</ul>
diff --git a/interface/web/dns/templates/dns_import.htm b/interface/web/dns/templates/dns_import.htm
index de6d356..b72ef92 100644
--- a/interface/web/dns/templates/dns_import.htm
+++ b/interface/web/dns/templates/dns_import.htm
@@ -38,11 +38,11 @@
</select></div>
<tmpl_else>
<div class="col-sm-9"><input type="text" name="domain" id="domain" value="{tmpl_var name='domain'}" class="form-control" onkeydown="keydown(event.which);" /></div></tmpl_if>
- <p class="value"><tmpl_var name='domain_field_desc_txt'}</p>
+ <div class="col-sm-3 col-text"></div><div class="col-sm-9 col-text"><tmpl_var name='domain_field_desc_txt'}</div>
</div>
<div class="form-group">
<label for="file" class="col-sm-3 control-label">{tmpl_var name='zonefile_to_import_txt'}</label>
- <input name="file" id="file" size="30" type="file" class="fileUpload" />
+ <div class="col-sm-9 col-text"><input name="file" id="file" size="30" type="file" class="fileUpload" /></div>
</div>
<tmpl_if name="msg">
diff --git a/interface/web/index.php b/interface/web/index.php
index f6929ba..e942c10 100644
--- a/interface/web/index.php
+++ b/interface/web/index.php
@@ -87,6 +87,19 @@
$app->tpl->setVar('current_theme', isset($_SESSION['s']['theme']) ? $_SESSION['s']['theme'] : 'default');
+// Logo
+$logo = $app->db->queryOneRecord("SELECT * FROM sys_ini WHERE sysini_id = 1");
+if($logo['custom_logo'] != ''){
+ $base64_logo_txt = $logo['custom_logo'];
+} else {
+ $base64_logo_txt = $logo['default_logo'];
+}
+$tmp_base64 = explode(',', $base64_logo_txt, 2);
+$logo_dimensions = $app->functions->getimagesizefromstring(base64_decode($tmp_base64[1]));
+$app->tpl->setVar('base64_logo_width', $logo_dimensions[0]);
+$app->tpl->setVar('base64_logo_height', $logo_dimensions[1]);
+$app->tpl->setVar('base64_logo_txt', $base64_logo_txt);
+
$app->tpl_defaults();
$app->tpl->pparse();
?>
diff --git a/interface/web/sites/form/web_childdomain.tform.php b/interface/web/sites/form/web_childdomain.tform.php
index 1081a23..09145f9 100644
--- a/interface/web/sites/form/web_childdomain.tform.php
+++ b/interface/web/sites/form/web_childdomain.tform.php
@@ -58,7 +58,7 @@
$form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete
$form["tabs"]['domain'] = array (
- 'title' => "Domain",
+ 'title' => ($childdomain_type == 'aliasdomain'? 'Aliasdomain' : 'Subdomain'),
'width' => 100,
'template' => "templates/web_childdomain_edit.htm",
'fields' => array (
diff --git a/interface/web/sites/form/web_vhost_domain.tform.php b/interface/web/sites/form/web_vhost_domain.tform.php
index 47f8f65..3c4723a 100644
--- a/interface/web/sites/form/web_vhost_domain.tform.php
+++ b/interface/web/sites/form/web_vhost_domain.tform.php
@@ -41,16 +41,19 @@
$vhostdomain_type = 'domain';
$form_title = "Web Domain";
$validator_function = 'web_domain';
+$first_tab_title = "Domain";
if(isset($_SESSION['s']['var']['vhostdomain_type'])) {
if($_SESSION['s']['var']['vhostdomain_type'] == 'subdomain') {
$vhostdomain_type = 'subdomain';
$form_title = "Subdomain";
$validator_function = 'sub_domain';
+ $first_tab_title = "Subomain";
} elseif($_SESSION['s']['var']['vhostdomain_type'] == 'aliasdomain') {
$vhostdomain_type = 'aliasdomain';
$form_title = "Aliasdomain";
$validator_function = 'alias_domain';
+ $first_tab_title = "Aliasomain";
}
}
@@ -96,7 +99,7 @@
$web_config = $app->getconf->get_global_config('sites');
$form["tabs"]['domain'] = array (
- 'title' => "Domain",
+ 'title' => $first_tab_title,
'width' => 100,
'template' => "templates/web_vhost_domain_edit.htm",
'readonly' => $web_domain_edit_readonly,
diff --git a/interface/web/sites/lib/module.conf.php b/interface/web/sites/lib/module.conf.php
index b6d506a..8e253fd 100644
--- a/interface/web/sites/lib/module.conf.php
+++ b/interface/web/sites/lib/module.conf.php
@@ -96,10 +96,24 @@
if($app->auth->get_client_limit($userid, 'webdav_user') != 0)
{
- $items[] = array( 'title' => "Webdav-User",
- 'target' => 'content',
- 'link' => 'sites/webdav_user_list.php',
- 'html_id' => 'webdav_user_list');
+ $apache_in_use = false;
+ $servers = $app->db->queryAllRecords("SELECT * FROM server WHERE web_server = 1 AND active = 1");
+ if(is_array($servers) && !empty($servers)){
+ foreach($servers as $server){
+ $tmp_web_config = $app->getconf->get_server_config($server['server_id'], 'web');
+ if(strtolower($tmp_web_config['server_type']) == 'apache'){
+ $apache_in_use = true;
+ break;
+ }
+ }
+ }
+
+ if($apache_in_use == true){
+ $items[] = array( 'title' => "Webdav-User",
+ 'target' => 'content',
+ 'link' => 'sites/webdav_user_list.php',
+ 'html_id' => 'webdav_user_list');
+ }
}
$items[] = array( 'title' => "Folder",
diff --git a/interface/web/sites/templates/web_childdomain_list.htm b/interface/web/sites/templates/web_childdomain_list.htm
index 0800fd1..51aadc1 100644
--- a/interface/web/sites/templates/web_childdomain_list.htm
+++ b/interface/web/sites/templates/web_childdomain_list.htm
@@ -1,5 +1,5 @@
<div class='page-header'>
- <h1><tmpl_var name="list_head_txt"></h1>
+ <h1><tmpl_if name='childdomain_type' op='==' value='aliasdomain'><tmpl_var name="aliasdomain_list_head_txt"></tmpl_else><tmpl_var name="subdomain_list_head_txt"></tmpl_if></h1>
</div>
<p><tmpl_var name="list_desc_txt"></p>
@@ -22,7 +22,7 @@
</tmpl_if>
<p class="fieldset-legend">{tmpl_var name="toolsarea_head_txt"}</p>
- <button class="btn btn-default formbutton-success" type="button" data-load-content="sites/web_childdomain_edit.php?type={tmpl_var name='childdomain_type'}">{tmpl_var name="add_new_record_txt"}</button>
+ <button class="btn btn-default formbutton-success" type="button" data-load-content="sites/web_childdomain_edit.php?type={tmpl_var name='childdomain_type'}"><tmpl_if name='childdomain_type' op='==' value='aliasdomain'>{tmpl_var name="add_new_aliasdomain_txt"}</tmpl_else>{tmpl_var name="add_new_subdomain_txt"}</tmpl_if></button>
@@ -35,7 +35,7 @@
<th class="tiny-col" data-column="active"><tmpl_var name="active_txt"></th>
<th data-column="server_id"><tmpl_var name="server_id_txt"></th>
<th data-column="parent_domain_id"><tmpl_var name="parent_domain_id_txt"></th>
- <th data-column="domain"><tmpl_var name="domain_txt"></th>
+ <th data-column="domain"><tmpl_if name='childdomain_type' op='==' value='aliasdomain'>{tmpl_var name="aliasdomain_txt"}</tmpl_else>{tmpl_var name="subdomain_txt"}</tmpl_if></th>
<th class="small-col text-right">{tmpl_var name='search_limit'}</th>
</tr>
<tr>
diff --git a/interface/web/sites/templates/web_vhost_domain_admin_list.htm b/interface/web/sites/templates/web_vhost_domain_admin_list.htm
index 3050207..ccd16e2 100644
--- a/interface/web/sites/templates/web_vhost_domain_admin_list.htm
+++ b/interface/web/sites/templates/web_vhost_domain_admin_list.htm
@@ -1,11 +1,11 @@
<div class='page-header'>
- <h1><tmpl_var name="list_head_txt"></h1>
+ <h1><tmpl_if name='vhostdomain_type' op='==' value='domain'>{tmpl_var name="domain_list_head_txt"}</tmpl_if><tmpl_if name='vhostdomain_type' op='==' value='subdomain'>{tmpl_var name="subdomain_list_head_txt"}</tmpl_if><tmpl_if name='vhostdomain_type' op='==' value='aliasdomain'>{tmpl_var name="aliasdomain_list_head_txt"}</tmpl_if></h1>
</div>
<p class="fieldset-legend">{tmpl_var name="toolsarea_head_txt"}</p>
- <button class="btn btn-default formbutton-success" type="button" data-load-content="sites/web_vhost_domain_edit.php?type={tmpl_var name='vhostdomain_type'}">{tmpl_var name="add_new_record_txt"}</button>
+ <button class="btn btn-default formbutton-success" type="button" data-load-content="sites/web_vhost_domain_edit.php?type={tmpl_var name='vhostdomain_type'}"><tmpl_if name='vhostdomain_type' op='==' value='domain'>{tmpl_var name="add_new_record_txt"}</tmpl_if><tmpl_if name='vhostdomain_type' op='==' value='subdomain'>{tmpl_var name="add_new_subdomain_txt"}</tmpl_if><tmpl_if name='vhostdomain_type' op='==' value='aliasdomain'>{tmpl_var name="add_new_aliasdomain_txt"}</tmpl_if></button>
@@ -20,7 +20,7 @@
<th data-column="sys_groupid"><tmpl_var name="sys_groupid_txt"></th>
<th data-column="server_id"><tmpl_var name="server_id_txt"></th>
<tmpl_if name="vhostdomain_type" op="!=" value="domain"><th data-column="parent_domain_id"><tmpl_var name="parent_domain_id_txt"></th></tmpl_if>
- <th data-column="domain"><tmpl_var name="domain_txt"></th>
+ <th data-column="domain"><tmpl_if name='vhostdomain_type' op='==' value='domain'>{tmpl_var name="domain_txt"}</tmpl_if><tmpl_if name='vhostdomain_type' op='==' value='subdomain'>{tmpl_var name="subdomain_txt"}</tmpl_if><tmpl_if name='vhostdomain_type' op='==' value='aliasdomain'>{tmpl_var name="aliasdomain_txt"}</tmpl_if></th>
<th class="small-col text-right">{tmpl_var name='search_limit'}</th>
</tr>
<tr>
diff --git a/interface/web/sites/templates/web_vhost_domain_list.htm b/interface/web/sites/templates/web_vhost_domain_list.htm
index 7ee6966..b40db40 100644
--- a/interface/web/sites/templates/web_vhost_domain_list.htm
+++ b/interface/web/sites/templates/web_vhost_domain_list.htm
@@ -1,5 +1,5 @@
<div class='page-header'>
- <h1><tmpl_var name="list_head_txt"></h1>
+ <h1><tmpl_if name='vhostdomain_type' op='==' value='domain'>{tmpl_var name="domain_list_head_txt"}</tmpl_if><tmpl_if name='vhostdomain_type' op='==' value='subdomain'>{tmpl_var name="subdomain_list_head_txt"}</tmpl_if><tmpl_if name='vhostdomain_type' op='==' value='aliasdomain'>{tmpl_var name="aliasdomain_list_head_txt"}</tmpl_if></h1>
</div>
<p><tmpl_var name="list_desc_txt"></p>
@@ -22,7 +22,7 @@
</tmpl_if>
<p class="fieldset-legend">{tmpl_var name="toolsarea_head_txt"}</p>
- <button class="btn btn-default formbutton-success" type="button" data-load-content="sites/web_vhost_domain_edit.php?type={tmpl_var name='vhostdomain_type'}">{tmpl_var name="add_new_record_txt"}</button>
+ <button class="btn btn-default formbutton-success" type="button" data-load-content="sites/web_vhost_domain_edit.php?type={tmpl_var name='vhostdomain_type'}"><tmpl_if name='vhostdomain_type' op='==' value='domain'>{tmpl_var name="add_new_record_txt"}</tmpl_if><tmpl_if name='vhostdomain_type' op='==' value='subdomain'>{tmpl_var name="add_new_subdomain_txt"}</tmpl_if><tmpl_if name='vhostdomain_type' op='==' value='aliasdomain'>{tmpl_var name="add_new_aliasdomain_txt"}</tmpl_if></button>
@@ -36,7 +36,7 @@
<th class="tiny-col" data-column="active"><tmpl_var name="active_txt"></th>
<th data-column="server_id"><tmpl_var name="server_id_txt"></th>
<tmpl_if name="vhostdomain_type" op="!=" value="domain"><th data-column="parent_domain_id"><tmpl_var name="parent_domain_id_txt"></th></tmpl_if>
- <th data-column="domain"><tmpl_var name="domain_txt"></th>
+ <th data-column="domain"><tmpl_if name='vhostdomain_type' op='==' value='domain'>{tmpl_var name="domain_txt"}</tmpl_if><tmpl_if name='vhostdomain_type' op='==' value='subdomain'>{tmpl_var name="subdomain_txt"}</tmpl_if><tmpl_if name='vhostdomain_type' op='==' value='aliasdomain'>{tmpl_var name="aliasdomain_txt"}</tmpl_if></th>
<th class="small-col text-right">{tmpl_var name='search_limit'}</th>
</tr>
<tr>
diff --git a/interface/web/themes/default/assets/stylesheets/ispconfig.css b/interface/web/themes/default/assets/stylesheets/ispconfig.css
index 958c2b3..40b87ac 100644
--- a/interface/web/themes/default/assets/stylesheets/ispconfig.css
+++ b/interface/web/themes/default/assets/stylesheets/ispconfig.css
@@ -65,7 +65,8 @@
float: left;
width: 200px;
height: 65px;
- background: url("../images/logo.png") no-repeat; }
+ margin-top:10px;
+ /*background: url("../images/logo.png") no-repeat;*/ }
#logo a {
display: block;
width: 100%;
diff --git a/interface/web/themes/default/templates/main.tpl.htm b/interface/web/themes/default/templates/main.tpl.htm
index 67b37e8..d29ab00 100644
--- a/interface/web/themes/default/templates/main.tpl.htm
+++ b/interface/web/themes/default/templates/main.tpl.htm
@@ -33,7 +33,7 @@
<!-- off canvas menu button -->
<div class='menu-btn left'>☰</div>
<!-- logo -->
- <div id='logo'><a href='#'></a></div>
+ <div id='logo' style="background: url({tmpl_var name="base64_logo_txt"}) no-repeat;width:{tmpl_var name="base64_logo_width"};height:{tmpl_var name="base64_logo_height"}"><a href='#'></a></div>
</div>
<div id='headerbar' class='clear'>
<!-- logout button -->
--
Gitblit v1.9.1