Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
I
ISPConfig 3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Helmo
ISPConfig 3
Commits
0bd188f1
Commit
0bd188f1
authored
4 years ago
by
Thom
Browse files
Options
Downloads
Patches
Plain Diff
Make client protection configurable (#4048)
parent
6a108683
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
interface/web/admin/system_config_edit.php
+8
-3
8 additions, 3 deletions
interface/web/admin/system_config_edit.php
with
8 additions
and
3 deletions
interface/web/admin/system_config_edit.php
+
8
−
3
View file @
0bd188f1
...
@@ -96,7 +96,7 @@ class page_action extends tform_actions {
...
@@ -96,7 +96,7 @@ class page_action extends tform_actions {
if
(
$available_dashlets_txt
==
''
)
$available_dashlets_txt
=
'------'
;
if
(
$available_dashlets_txt
==
''
)
$available_dashlets_txt
=
'------'
;
$app
->
tpl
->
setVar
(
"available_dashlets_txt"
,
$available_dashlets_txt
);
$app
->
tpl
->
setVar
(
"available_dashlets_txt"
,
$available_dashlets_txt
);
// Logo
// Logo
$sys_ini
=
$app
->
db
->
queryOneRecord
(
"SELECT * FROM sys_ini WHERE sysini_id = ?"
,
$this
->
id
);
$sys_ini
=
$app
->
db
->
queryOneRecord
(
"SELECT * FROM sys_ini WHERE sysini_id = ?"
,
$this
->
id
);
if
(
$sys_ini
[
'custom_logo'
]
!=
''
){
if
(
$sys_ini
[
'custom_logo'
]
!=
''
){
...
@@ -156,6 +156,11 @@ class page_action extends tform_actions {
...
@@ -156,6 +156,11 @@ class page_action extends tform_actions {
*/
*/
$new_config
=
$app
->
tform
->
encode
(
$this
->
dataRecord
,
$section
);
$new_config
=
$app
->
tform
->
encode
(
$this
->
dataRecord
,
$section
);
if
(
$section
==
'sites'
&&
$new_config
[
'client_protection'
]
!=
'y'
&&
$server_config_array
[
'sites'
][
'client_protection'
]
==
'y'
)
{
$app
->
db
->
query
(
"UPDATE web_domain sys_perm_group = 'riud' WHERE added_by = admin"
);
}
elseif
(
$section
==
'sites'
&&
$new_config
[
'client_protection'
]
!=
'n'
&&
$server_config_array
[
'sites'
][
'client_protection'
]
==
'n'
)
{
$app
->
db
->
query
(
"UPDATE web_domain sys_perm_group = 'ru' WHERE added_by = admin"
);
}
if
(
$section
==
'sites'
&&
$new_config
[
'vhost_subdomains'
]
!=
'y'
&&
$server_config_array
[
'sites'
][
'vhost_subdomains'
]
==
'y'
)
{
if
(
$section
==
'sites'
&&
$new_config
[
'vhost_subdomains'
]
!=
'y'
&&
$server_config_array
[
'sites'
][
'vhost_subdomains'
]
==
'y'
)
{
// check for existing vhost subdomains, if found the mode cannot be disabled
// check for existing vhost subdomains, if found the mode cannot be disabled
$check
=
$app
->
db
->
queryOneRecord
(
"SELECT COUNT(*) as `cnt` FROM `web_domain` WHERE `type` = 'vhostsubdomain'"
);
$check
=
$app
->
db
->
queryOneRecord
(
"SELECT COUNT(*) as `cnt` FROM `web_domain` WHERE `type` = 'vhostsubdomain'"
);
...
@@ -198,13 +203,13 @@ class page_action extends tform_actions {
...
@@ -198,13 +203,13 @@ class page_action extends tform_actions {
"FROM dns_soa"
;
"FROM dns_soa"
;
$app
->
db
->
query
(
$sql
);
$app
->
db
->
query
(
$sql
);
}
}
//die(print_r($_FILES));
//die(print_r($_FILES));
// Logo
// Logo
/*
/*
if(isset($_FILES['file']['name']) && is_uploaded_file($_FILES['file']['tmp_name'])){
if(isset($_FILES['file']['name']) && is_uploaded_file($_FILES['file']['tmp_name'])){
//print_r($_FILES);
//print_r($_FILES);
$path= $_FILES['file']['tmp_name'];
$path= $_FILES['file']['tmp_name'];
$type = pathinfo($path, PATHINFO_EXTENSION);
$type = pathinfo($path, PATHINFO_EXTENSION);
$data = file_get_contents($path);
$data = file_get_contents($path);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment