Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'ncp-web/ncp-launcher.php')
-rw-r--r--ncp-web/ncp-launcher.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/ncp-web/ncp-launcher.php b/ncp-web/ncp-launcher.php
index 03672c78..ce3e88a5 100644
--- a/ncp-web/ncp-launcher.php
+++ b/ncp-web/ncp-launcher.php
@@ -35,7 +35,16 @@ if ( $_POST['action'] == "cfgreq" )
while ( $line = fgets($fh) )
{
- if ( preg_match('/^(\w+)_=(.*)$/', $line, $matches) )
+ if ( preg_match('/^(\w+)_=(yes|no)$/', $line, $matches) )
+ {
+ if ( $matches[2] == "yes" )
+ $checked = "checked";
+ $output = $output . "<tr>";
+ $output = $output . "<td><label for=\"$matches[1]\">$matches[1]</label></td>";
+ $output = $output . "<td><input type=\"checkbox\" id=\"$matches[1]\" name=\"$matches[1]\" value=\"$matches[2]\" $checked></td>";
+ $output = $output . "</tr>";
+ }
+ else if ( preg_match('/^(\w+)_=(.*)$/', $line, $matches) )
{
$output = $output . "<tr>";
$output = $output . "<td><label for=\"$matches[1]\">$matches[1]</label></td>";