From 2d5ecc9a9408002e649d5f0e889e8bab1d60a406 Mon Sep 17 00:00:00 2001 From: Karl Hudgell Date: Sat, 6 Feb 2016 18:23:54 +0000 Subject: [PATCH 1/2] manual update --- ...jquery.gridster.css => jquery.gridster.php} | 15 +++++++++++---- assets/css/widgetback.php | 16 ++++++++++++++++ config/ManUpdate.php | 18 ++++++++++++++++++ config/menu.php | 2 +- config/set1.php | 1 - config/test2.php | 9 +++++++++ main.php | 2 +- 7 files changed, 56 insertions(+), 7 deletions(-) rename assets/css/{jquery.gridster.css => jquery.gridster.php} (91%) create mode 100644 assets/css/widgetback.php create mode 100644 config/ManUpdate.php create mode 100644 config/test2.php diff --git a/assets/css/jquery.gridster.css b/assets/css/jquery.gridster.php similarity index 91% rename from assets/css/jquery.gridster.css rename to assets/css/jquery.gridster.php index 46f467f..cec87bb 100644 --- a/assets/css/jquery.gridster.css +++ b/assets/css/jquery.gridster.php @@ -1,3 +1,8 @@ + + + .gridster { width: 730px; margin-left:auto; @@ -22,10 +27,12 @@ .gridster .gs_w{ z-index: 2; position: absolute; - background: #FFF; - cursor: pointer; - -webkit-box-shadow: 0 0 5px rgba(0,0,0,0.3); - box-shadow: 0 0 5px rgba(0,0,0,0.3); + "0") { + require "widgetback.php"; + } +?> cursor: pointer; + } .ready .gs_w:not(.preview-holder) { diff --git a/assets/css/widgetback.php b/assets/css/widgetback.php new file mode 100644 index 0000000..a122730 --- /dev/null +++ b/assets/css/widgetback.php @@ -0,0 +1,16 @@ + + + + + + + "0") { + echo background: ; + } else { + echo background: #FFF; + } +?> + + + \ No newline at end of file diff --git a/config/ManUpdate.php b/config/ManUpdate.php new file mode 100644 index 0000000..51cbb35 --- /dev/null +++ b/config/ManUpdate.php @@ -0,0 +1,18 @@ + parent.window.location.reload(true);'; + +} else { +// display the form +?> +
+ +
+ \ No newline at end of file diff --git a/config/menu.php b/config/menu.php index 8443184..9511ad7 100644 --- a/config/menu.php +++ b/config/menu.php @@ -1,2 +1,2 @@ -General - SAB/Couch/Sick - Others - Drive Space - RSS/Server Statuses - Picture Upload +General - SAB/Couch/Sick - Others - Drive Space - RSS/Server Statuses - Picture Upload - Manual Update diff --git a/config/set1.php b/config/set1.php index 94abbd0..31d5f56 100644 --- a/config/set1.php +++ b/config/set1.php @@ -33,7 +33,6 @@
Reset Widgets :

- \ No newline at end of file diff --git a/config/test2.php b/config/test2.php new file mode 100644 index 0000000..032115c --- /dev/null +++ b/config/test2.php @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/main.php b/main.php index 4b5b6e4..d424352 100644 --- a/main.php +++ b/main.php @@ -30,7 +30,7 @@ indicateSelected(formref.switchcontrol) - + From 9f4ac346dd1dd7a136aada19420f57d8c0d0070d Mon Sep 17 00:00:00 2001 From: Karl Hudgell Date: Sat, 6 Feb 2016 18:50:28 +0000 Subject: [PATCH 2/2] manual update/widget background and colour --- config/ManUpdate.php => ManUpdate.php | 0 assets/css/widgetback.php | 17 ++++++----------- config/menu.php | 2 +- config/set1.php | 9 +++++++++ config/set2.php | 8 ++++++-- config/write1.php | 15 +++++++++++++++ 6 files changed, 37 insertions(+), 14 deletions(-) rename config/ManUpdate.php => ManUpdate.php (100%) diff --git a/config/ManUpdate.php b/ManUpdate.php similarity index 100% rename from config/ManUpdate.php rename to ManUpdate.php diff --git a/assets/css/widgetback.php b/assets/css/widgetback.php index a122730..1ba572e 100644 --- a/assets/css/widgetback.php +++ b/assets/css/widgetback.php @@ -1,16 +1,11 @@ - - - - - + "0") { - echo background: ; - } else { - echo background: #FFF; - } + echo "background: $widgetbackgroudcolour;"; +} else { + echo "background: #FFF;"; +} ?> +?> - - \ No newline at end of file diff --git a/config/menu.php b/config/menu.php index 9511ad7..46046bb 100644 --- a/config/menu.php +++ b/config/menu.php @@ -1,2 +1,2 @@ -General - SAB/Couch/Sick - Others - Drive Space - RSS/Server Statuses - Picture Upload - Manual Update +General - SAB/Couch/Sick - Others - Drive Space - RSS/Server Statuses - Picture Upload - Manual Update diff --git a/config/set1.php b/config/set1.php index 31d5f56..7f599cc 100644 --- a/config/set1.php +++ b/config/set1.php @@ -11,6 +11,8 @@
+
+
Your Name:
Server Address:

@@ -24,6 +26,8 @@ Clock Widget Enabled: "0") echo "checked=checked; "; ?> />
KKnowledge Widget Enabled: "0") echo "checked=checked; "; ?> />
Klips Widget Enabled: "0") echo "checked=checked; "; ?> />

+
+
Konvos Chatbox Enabled: "0") echo "checked=checked; "; ?> />
Konvos Widget Enabled: "0") echo "checked=checked; "; ?> />

@@ -31,8 +35,13 @@
Show Version : "0") echo "checked=checked; "; ?> />

+ Widget Background: "0") echo "checked=checked; "; ?> />
+ Custom Widget Background: "0") echo "checked=checked; "; ?> />
+ Background Colour: +
Reset Widgets :

+
\ No newline at end of file diff --git a/config/set2.php b/config/set2.php index 8ac21cc..76040f9 100644 --- a/config/set2.php +++ b/config/set2.php @@ -1,6 +1,8 @@
+
+
SAB Enabled: "0") echo "checked=checked; "; ?> />
SAB Port:
SAB Name:
@@ -66,7 +68,8 @@ global $sickpicname; } ?> - +
+
Couch Enabled: "0") echo "checked=checked; "; ?> />
Couch Adults : "0") echo "checked=checked; "; ?>>Enabled / >Disabled
Couch Adults Port:
@@ -115,4 +118,5 @@ global $cpkidspicname; ?> - \ No newline at end of file + +
\ No newline at end of file diff --git a/config/write1.php b/config/write1.php index 015bd6d..3f88794 100644 --- a/config/write1.php +++ b/config/write1.php @@ -12,6 +12,9 @@ $konvosvisible1 = $_POST['konvosvisible']; $kodivisible1 = $_POST['kodivisible']; $backgroundcolor1 = $_POST['backgroundcolor']; $showversion1 = $_POST['showversion']; +$widgetbackgroud1 = $_POST['widgetvisible']; +$customwidgetbackgroud1 = $_POST['customwidget']; +$widgetbackgroudcolour1 = $_POST['widgetbackgroudcolour']; // $fl='../config.php'; @@ -67,6 +70,18 @@ $content = preg_replace( '/\$custombackground = \"(.*?)\";/', '$custombackgrou } else { $content = preg_replace( '/\$kodivisible = \"(.*?)\";/', '$kodivisible = "1";', $content); } + // Widget Config +if (empty($widgetbackgroud1)) { + $content = preg_replace( '/\$widgetbackgroud = \"(.*?)\";/', '$widgetbackgroud = "0";', $content); + } else { + $content = preg_replace( '/\$widgetbackgroud = \"(.*?)\";/', '$widgetbackgroud = "1";', $content); + } + if (empty($customwidgetbackgroud1)) { + $content = preg_replace( '/\$customwidgetbackgroud = \"(.*?)\";/', '$customwidgetbackgroud = "0";', $content); + } else { + $content = preg_replace( '/\$customwidgetbackgroud = \"(.*?)\";/', '$customwidgetbackgroud = "1";', $content); + } +$content = preg_replace( '/\$widgetbackgroudcolour = \"(.*?)\";/', '$widgetbackgroudcolour = "#'.$widgetbackgroudcolour1.'";', $content); /*write operation ->*/ $tmp =fopen($fl, "w"); fwrite($tmp, $content); fclose($tmp); //sleep for 5 seconds