show version

This commit is contained in:
Karl Hudgell 2016-01-12 19:21:39 +00:00
parent 6b39e2323b
commit a1fc531551
4 changed files with 31 additions and 2 deletions

View File

@ -172,4 +172,20 @@ findstr "localversion" config.php >nul 2>&1
goto END goto END
:END :END
rem show version
findstr "showversion" config.php >nul 2>&1
if errorlevel 1 goto ONE
if errorlevel 0 goto ZERO
goto END
:ZERO
echo showversion Already Updated
goto END
:ONE
echo ^<?php >>config.php
echo $showversion = "0"; >> config.php
echo ^?^> >> config.php
echo showversion Updated
goto END
:END
PAUSE PAUSE

View File

@ -23,6 +23,8 @@
<br /> <br />
Enable Kodi (MovieLib): <input name="kodivisible" id="id" type="checkbox" <?php if($kodivisible > "0") echo "checked=checked; "; ?> /><br /> Enable Kodi (MovieLib): <input name="kodivisible" id="id" type="checkbox" <?php if($kodivisible > "0") echo "checked=checked; "; ?> /><br />
<br /> <br />
Show Version : <input name="showversion" id="id" type="checkbox" <?php if($showversion > "0") echo "checked=checked; "; ?> /><br />
<br />
<input type="submit" name="submit" value="Update" /> <input type="submit" name="submit" value="Update" />
</form> </form>

View File

@ -11,7 +11,7 @@ $konvoschat1 = $_POST['konvoschat'];
$konvosvisible1 = $_POST['konvosvisible']; $konvosvisible1 = $_POST['konvosvisible'];
$kodivisible1 = $_POST['kodivisible']; $kodivisible1 = $_POST['kodivisible'];
$backgroundcolor1 = $_POST['backgroundcolor']; $backgroundcolor1 = $_POST['backgroundcolor'];
$showversion1 = $_POST['showversion'];
// //
$fl='../config.php'; $fl='../config.php';
@ -25,6 +25,12 @@ $content = preg_replace( '/\$base = \"(.*?)\";/', '$base = "'.$yb.'";', $conte
$content = preg_replace( '/\$user = \"(.*?)\";/', '$user = "'.$user1.'";', $content); $content = preg_replace( '/\$user = \"(.*?)\";/', '$user = "'.$user1.'";', $content);
$content = preg_replace( '/\$pass = \"(.*?)\";/', '$pass = "'.$pass1.'";', $content); $content = preg_replace( '/\$pass = \"(.*?)\";/', '$pass = "'.$pass1.'";', $content);
$content = preg_replace( '/\$custombackground = \"(.*?)\";/', '$custombackground = "#'.$backgroundcolor1.'";', $content); $content = preg_replace( '/\$custombackground = \"(.*?)\";/', '$custombackground = "#'.$backgroundcolor1.'";', $content);
// version Settings
if (empty($showversion1)) {
$content = preg_replace( '/\$showversion = \"(.*?)\";/', '$showversion = "0";', $content);
} else {
$content = preg_replace( '/\$showversion = \"(.*?)\";/', '$showversion = "1";', $content);
}
// clockvisible Settings // clockvisible Settings
if (empty($clockvisible1)) { if (empty($clockvisible1)) {
$content = preg_replace( '/\$clockvisible = \"(.*?)\";/', '$clockvisible = "0";', $content); $content = preg_replace( '/\$clockvisible = \"(.*?)\";/', '$clockvisible = "0";', $content);

View File

@ -149,7 +149,11 @@ if ($squeezevisible > "0") {
require "links/squeeze.php"; require "links/squeeze.php";
} }
?> ?>
<?php
if ($showversion > "0") {
echo "<p style=\" text-align: center;\">Version - $localversion</p>";
}
?>
<div id="test-popup" class="white-popup mfp-hide"> <div id="test-popup" class="white-popup mfp-hide">
<p style="text-align: center;"> <p style="text-align: center;">
@ -183,4 +187,5 @@ if ($konvoschat > "0") {
require "konvoschat.php"; require "konvoschat.php";
} }
?> ?>
</html> </html>