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:
authornachoparker <nacho@ownyourbits.com>2017-08-10 20:47:34 +0300
committernachoparker <nacho@ownyourbits.com>2017-08-11 00:17:56 +0300
commit08b3e1fc2cb18a740f6a10434e5b4acfd2b29b7c (patch)
tree5e1ca5e7398c4b2f0815f40b8eecf4f442de3783
parentf58ca622c71c06a2e18579218c59e03562429064 (diff)
ncp-web: active markv0.19.7
-rw-r--r--ncp-web/index.php7
-rw-r--r--ncp-web/ncp-launcher.php3
2 files changed, 9 insertions, 1 deletions
diff --git a/ncp-web/index.php b/ncp-web/index.php
index 59730370..8437b6b7 100644
--- a/ncp-web/index.php
+++ b/ncp-web/index.php
@@ -70,14 +70,19 @@
{
$script = pathinfo( $file , PATHINFO_FILENAME );
$fh = fopen( $path . $file ,'r');
+ $active = "";
while ($line = fgets($fh))
+ {
+ if ( $line == "ACTIVE_=yes\n" )
+ $active = " ✓";
if ( preg_match('/^DESCRIPTION="(.*)"$/', $line, $matches) )
{
echo "<li id=\"$script\" class=\"nav-recent\">";
- echo "<a href=\"#\"> $script </a>";
+ echo "<a href=\"#\"> $script$active </a>";
echo "<input type=\"hidden\" value=\"$matches[1]\" />";
echo "</li>";
}
+ }
fclose($fh);
}
?>
diff --git a/ncp-web/ncp-launcher.php b/ncp-web/ncp-launcher.php
index ce3e88a5..2038cc61 100644
--- a/ncp-web/ncp-launcher.php
+++ b/ncp-web/ncp-launcher.php
@@ -35,6 +35,7 @@ if ( $_POST['action'] == "cfgreq" )
while ( $line = fgets($fh) )
{
+ // checkbox (yes/no) field
if ( preg_match('/^(\w+)_=(yes|no)$/', $line, $matches) )
{
if ( $matches[2] == "yes" )
@@ -44,6 +45,8 @@ if ( $_POST['action'] == "cfgreq" )
$output = $output . "<td><input type=\"checkbox\" id=\"$matches[1]\" name=\"$matches[1]\" value=\"$matches[2]\" $checked></td>";
$output = $output . "</tr>";
}
+
+ // text field
else if ( preg_match('/^(\w+)_=(.*)$/', $line, $matches) )
{
$output = $output . "<tr>";