Merge branch '2.0' into 'master'

2.0



See merge request !5
This commit is contained in:
Karl 2016-02-06 13:51:08 -05:00
commit 7c40b737b2
9 changed files with 81 additions and 9 deletions

18
ManUpdate.php Normal file
View File

@ -0,0 +1,18 @@
<?php
if(isset($_POST['submit']))
{
//echo exec('Update.bat');
// DEBUG
echo exec('Update.bat', $output);
print_r($output);
//echo '<script>parent.window.location.reload(true);</script>';
} else {
// display the form
?>
<form action="" method="post">
<input type="submit" name="submit" value="GET IT!">
</form>
<?php
}
?>

View File

@ -1,3 +1,8 @@
<?php
header("Content-type: text/css; charset: UTF-8");
?>
<?php include '../../config.php';?>
.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);
<?php
if ($widgetbackgroud > "0") {
require "widgetback.php";
}
?> cursor: pointer;
}
.ready .gs_w:not(.preview-holder) {

11
assets/css/widgetback.php Normal file
View File

@ -0,0 +1,11 @@
<?php
if ($customwidgetbackgroud > "0") {
echo "background: $widgetbackgroudcolour;";
} else {
echo "background: #FFF;";
}
?>
?>

View File

@ -1,2 +1,2 @@
<a href="set1.php" target="main">General</a> - <a href="set2.php" target="main">SAB/Couch/Sick</a> - <a href="set3.php" target="main">Others</a> - <a href="set4.php" target="main">Drive Space</a> - <a href="set5.php" target="main">RSS/Server Statuses</a> - <a href="PicUpload.html" target="main">Picture Upload</a>
<a href="set1.php" target="main">General</a> - <a href="set2.php" target="main">SAB/Couch/Sick</a> - <a href="set3.php" target="main">Others</a> - <a href="set4.php" target="main">Drive Space</a> - <a href="set5.php" target="main">RSS/Server Statuses</a> - <a href="PicUpload.html" target="main">Picture Upload</a> - <a href="/../ManUpdate.php" target="main">Manual Update</a>

View File

@ -11,6 +11,8 @@
<?php include '../config.php';?>
<body>
<form action="write1.php" method="post">
<div style="width:100%;"> <!-- Main Div -->
<div style="float:left; width:50%;">
Your Name: <input type="text" value="<?php echo $yourname ?>" name="YN" /><br />
Server Address: <input type="text" value="<?php echo $base ?>" name="YB" /><br />
<br />
@ -24,6 +26,8 @@
Clock Widget Enabled: <input name="clockvisible" id="id" type="checkbox" <?php if($clockvisible > "0") echo "checked=checked; "; ?> /><br />
KKnowledge Widget Enabled: <input name="kknowledgefeedvisible" id="id" type="checkbox" <?php if($kknowledgefeedvisible > "0") echo "checked=checked; "; ?> /><br />
Klips Widget Enabled: <input name="webclipfeedvisible" id="id" type="checkbox" <?php if($webclipfeedvisible > "0") echo "checked=checked; "; ?> /><br /><br />
</div>
<div style="float:right; width:50%; ">
Konvos Chatbox Enabled: <input name="konvoschat" id="id" type="checkbox" <?php if($konvoschat > "0") echo "checked=checked; "; ?> /><br />
Konvos Widget Enabled: <input name="konvosvisible" id="id" type="checkbox" <?php if($konvosvisible > "0") echo "checked=checked; "; ?> /><br />
<br />
@ -31,9 +35,13 @@
<br />
Show Version : <input name="showversion" id="id" type="checkbox" <?php if($showversion > "0") echo "checked=checked; "; ?> /><br />
<br />
Widget Background: <input name="widgetvisible" id="id" type="checkbox" <?php if($widgetbackgroud > "0") echo "checked=checked; "; ?> /><br />
Custom Widget Background: <input name="customwidget" id="id" type="checkbox" <?php if($customwidgetbackgroud > "0") echo "checked=checked; "; ?> /><br />
Background Colour: <input class="color" name="widgetbackgroudcolour" value="<?php echo $widgetbackgroudcolour ?>"</td>
<br />
Reset Widgets : <input id="def_button" type="button" value="Set to Default" onclick="myfunction()"><br />
<br />
<input type="submit" name="submit" value="Update" />
</form>
</div>
</body>

View File

@ -1,6 +1,8 @@
<?php include '../config.php';?>
<form action="write2.php" method="post">
<div style="width:100%;"> <!-- Main Div -->
<div style="float:left; width:50%;">
SAB Enabled: <input name="sabvisible" id="id" type="checkbox" <?php if($sabvisible > "0") echo "checked=checked; "; ?> /><br />
SAB Port: <input type="text" value="<?php echo $sabport ?>" name="sabport" /><br />
SAB Name: <input type="text" value="<?php echo $sabname ?>" name="sabname" /><br />
@ -66,7 +68,8 @@ global $sickpicname;
}
?>
</div>
<div style="float:right; width:50%; ">
Couch Enabled: <input name="couchvisible" id="id" type="checkbox" <?php if($couchvisible > "0") echo "checked=checked; "; ?> /><br />
Couch Adults : <input type="radio" name="cpadultsvisible" value="1" <?php if($cpadultsvisible > "0") echo "checked=checked; "; ?>>Enabled / <input type="radio" name="cpadultsvisible" value="2" <?php if($cpadultsvisible < "1") echo "checked=checked; "; ?>>Disabled<br />
Couch Adults Port: <input type="text" value="<?php echo $cpadults ?>" name="cpadults" /><br />
@ -115,4 +118,5 @@ global $cpkidspicname;
?>
<input type="submit" name="submit" value="Update" />
</form>
</form>
</div>

9
config/test2.php Normal file
View File

@ -0,0 +1,9 @@
<?php
$p = popen('Update.bat', 'r');
if ($p)
{
while (!feof($p))
echo gets($p); // get output line-by-line
pclose($p);
}
?>

View File

@ -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

View File

@ -30,7 +30,7 @@ indicateSelected(formref.switchcontrol)
</script>
<link rel="stylesheet" type="text/css" href="assets/css/jquery.gridster.css">
<link rel="stylesheet" type="text/css" href="assets/css/jquery.gridster.php">
<script type="text/javascript" src="assets/jquery.js"></script>
<script type="text/javascript" src="assets/jquery.gridster.js" charster="utf-8"></script>