From fc0c5cf088f9bf9f60aef8e3133bf00c48aac762 Mon Sep 17 00:00:00 2001 From: Karl Hudgell <karl@k-world.me.uk> Date: Sat, 12 Dec 2015 23:17:13 +0000 Subject: [PATCH] config tool --- config/PicUpload.html | 55 +++---------- config/default.php | 3 + config/index.php | 20 +++-- config/menu.php | 2 + config/re1.php | 8 ++ config/redirect.html | 2 +- config/set1.php | 21 +++++ config/{set.php => set2.php} | 8 +- config/set3.php | 48 ++++++++++++ config/set4.php | 27 +++++++ config/set5.php | 51 ++++++++++++ config/upload.php | 62 ++++++++++----- config/write1.php | 68 ++++++++++++++++ config/{write.php => write2.php} | 12 +-- config/write3.php | 119 ++++++++++++++++++++++++++++ config/write4.php | 108 +++++++++++++++++++++++++ config/write5.php | 122 +++++++++++++++++++++++++++++ movielib/templates/white/img/7.png | Bin 944 -> 0 bytes 18 files changed, 647 insertions(+), 89 deletions(-) create mode 100644 config/default.php create mode 100644 config/menu.php create mode 100644 config/re1.php create mode 100644 config/set1.php rename config/{set.php => set2.php} (86%) create mode 100644 config/set3.php create mode 100644 config/set4.php create mode 100644 config/set5.php create mode 100644 config/write1.php rename config/{write.php => write2.php} (88%) create mode 100644 config/write3.php create mode 100644 config/write4.php create mode 100644 config/write5.php delete mode 100644 movielib/templates/white/img/7.png diff --git a/config/PicUpload.html b/config/PicUpload.html index 2bf873b..fb60ac4 100644 --- a/config/PicUpload.html +++ b/config/PicUpload.html @@ -1,49 +1,16 @@ <!DOCTYPE html> <html> +<body> - <head> - <meta charset="utf-8"/> - <title>KLanding Pic Uploader</title> +<form action="upload.php" method="post" enctype="multipart/form-data"> + Select image to upload: + <br /> + <br /> + <input type="file" name="fileToUpload" id="fileToUpload"> + <br /> + <br /> + <input type="submit" value="Upload Image" name="submit"> +</form> - <!-- Google web fonts --> - <link href="http://fonts.googleapis.com/css?family=PT+Sans+Narrow:400,700" rel='stylesheet' /> - - <!-- The main CSS file --> - <link href="/assets/css/style.css" rel="stylesheet" /> - </head> - - <body> - - <form id="upload" method="post" action="upload.php" enctype="multipart/form-data"> - <div id="drop"> - Drop Here - - <a>Browse</a> - <input type="file" name="upl" multiple /> - </div> - - <ul> - <!-- The file uploads will be shown here --> - </ul> - - </form> - - <footer> - - </footer> - - <!-- JavaScript Includes --> - <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> - <script src="/assets/js/jquery.knob.js"></script> - - <!-- jQuery File Upload Dependencies --> - <script src="/assets/js/jquery.ui.widget.js"></script> - <script src="/assets/js/jquery.iframe-transport.js"></script> - <script src="/assets/js/jquery.fileupload.js"></script> - - <!-- Our main JS file --> - <script src="/assets/js/script.js"></script> - - - </body> +</body> </html> \ No newline at end of file diff --git a/config/default.php b/config/default.php new file mode 100644 index 0000000..5b8e47c --- /dev/null +++ b/config/default.php @@ -0,0 +1,3 @@ +KLanding Config Page + +Use this page to configure your KLanding page. \ No newline at end of file diff --git a/config/index.php b/config/index.php index 72fe030..57d7990 100644 --- a/config/index.php +++ b/config/index.php @@ -1,8 +1,16 @@ +<!DOCTYPE html> <html> - <head> - <meta HTTP-EQUIV="REFRESH" content="3; url=/config/redirect.html"> - </head> - <body> - Your config has been updated, the page will reload with new entries.. - </body> +<head> +<title>KLanding Config</title> +</head> +<frameset rows="10%,80%,10%"> + <frame name="top" frameborder="0" src="menu.php" /> + <frame name="main" frameborder="0" src="default.php" /> + <frame name="bottom" frameborder="0" src="menu.php" /> + <noframes> + <body> + Your browser does not support frames. + </body> + </noframes> +</frameset> </html> \ No newline at end of file diff --git a/config/menu.php b/config/menu.php new file mode 100644 index 0000000..8443184 --- /dev/null +++ b/config/menu.php @@ -0,0 +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> + diff --git a/config/re1.php b/config/re1.php new file mode 100644 index 0000000..72fe030 --- /dev/null +++ b/config/re1.php @@ -0,0 +1,8 @@ +<html> + <head> + <meta HTTP-EQUIV="REFRESH" content="3; url=/config/redirect.html"> + </head> + <body> + Your config has been updated, the page will reload with new entries.. + </body> +</html> \ No newline at end of file diff --git a/config/redirect.html b/config/redirect.html index f38bae3..9fbf00b 100644 --- a/config/redirect.html +++ b/config/redirect.html @@ -1,6 +1,6 @@ <html> <head> - <meta HTTP-EQUIV="REFRESH" content="2; url=/config/set.php"> + <meta HTTP-EQUIV="REFRESH" content="2; url=default.php"> </head> <body> Your config is being loaded, please wait.. diff --git a/config/set1.php b/config/set1.php new file mode 100644 index 0000000..ebbf4c9 --- /dev/null +++ b/config/set1.php @@ -0,0 +1,21 @@ +<?php include '../config.php';?> + +<form action="write1.php" method="post"> + 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 /> + Username: <input type="text" value="<?php echo $user ?>" name="user" /><br /> + Password: <input type="text" value="<?php echo $pass ?>" name="pass" /><br /> + <br /> + <br /> + Services Widget Enabled: <input name="servicesvisible" id="id" type="checkbox" <?php if($servicesvisible > "0") echo "checked=checked; "; ?> /><br /> + 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 /> + Konvos Widget Enabled: <input name="konvosvisible" id="id" type="checkbox" <?php if($konvosvisible > "0") echo "checked=checked; "; ?> /><br /> + <br /> + Enable Kodi (MovieLib): <input name="kodivisible" id="id" type="checkbox" <?php if($kodivisible > "0") echo "checked=checked; "; ?> /><br /> + <br /> + + <input type="submit" name="submit" value="Update" /> +</form> \ No newline at end of file diff --git a/config/set.php b/config/set2.php similarity index 86% rename from config/set.php rename to config/set2.php index 2ebb859..e8a66f4 100644 --- a/config/set.php +++ b/config/set2.php @@ -1,12 +1,6 @@ <?php include '../config.php';?> -<form action="write.php" method="post"> - 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 /> - Username: <input type="text" value="<?php echo $user ?>" name="user" /><br /> - Password: <input type="text" value="<?php echo $pass ?>" name="pass" /><br /> - <br /> +<form action="write2.php" method="post"> 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 /> diff --git a/config/set3.php b/config/set3.php new file mode 100644 index 0000000..caddcf1 --- /dev/null +++ b/config/set3.php @@ -0,0 +1,48 @@ +<?php include '../config.php';?> + +<form action="write3.php" method="post"> +<div style="width:100%;"> <!-- Main Div --> +<div style="float:left; width:50%;"> + FTP Enabled: <input name="ftpvisible" id="id" type="checkbox" <?php if($ftpvisible > "0") echo "checked=checked; "; ?> /><br /> + FTP Port: <input type="text" value="<?php echo $ftpport ?>" name="ftpport" /><br /> + FTP Name: <input type="text" value="<?php echo $ftpname ?>" name="ftpname" /><br /> + FTP Pic: <input type="text" value="<?php echo $ftppicname ?>" name="ftppicname" /><br /> + <br /> + Torrent Enabled: <input name="torrentvisible" id="id" type="checkbox" <?php if($torrentvisible > "0") echo "checked=checked; "; ?> /><br /> + Torrent Type : <input type="radio" name="torrenttype" value="1" <?php if($torrenttype < "2") echo "checked=checked; "; ?>>uTorrent / <input type="radio" name="torrenttype" value="2" <?php if($torrenttype > "1") echo "checked=checked; "; ?>>Transmission<br /> + Torrent Port: <input type="text" value="<?php echo $torrentport ?>" name="torrentport" /><br /> + Torrent Name: <input type="text" value="<?php echo $torrentname ?>" name="torrentname" /><br /> + Torrent Pic: <input type="text" value="<?php echo $torrentpicname ?>" name="torrentpicname" /><br /> + <br /> + Madsonic Enabled: <input name="madsonicvisible" id="id" type="checkbox" <?php if($madsonicvisible > "0") echo "checked=checked; "; ?> /><br /> + Madsonic Port: <input type="text" value="<?php echo $madsonicport ?>" name="madsonicport" /><br /> + Madsonic Name: <input type="text" value="<?php echo $madsonicname ?>" name="madsonicname" /><br /> + Madsonic Pic: <input type="text" value="<?php echo $madsonicpicname ?>" name="madsonicpicname" /><br /> + +</div> +<div style="float:right; width:50%; "> + <br /> + Plex Enabled: <input name="plexvisible" id="id" type="checkbox" <?php if($plexvisible > "0") echo "checked=checked; "; ?> /><br /> + Plex Port: <input type="text" value="<?php echo $plexport ?>" name="plexport" /><br /> + Plex Name: <input type="text" value="<?php echo $plexname ?>" name="plexname" /><br /> + Plex Pic: <input type="text" value="<?php echo $plexpicname ?>" name="plexpicname" /><br /> + <br /> + Squeezebox Enabled: <input name="squeezevisible" id="id" type="checkbox" <?php if($squeezevisible > "0") echo "checked=checked; "; ?> /><br /> + Squeezebox Port: <input type="text" value="<?php echo $squeezeport ?>" name="squeezeport" /><br /> + Squeezebox Name: <input type="text" value="<?php echo $squeezename ?>" name="squeezename" /><br /> + Squeezebox Pic: <input type="text" value="<?php echo $squeezepicname ?>" name="squeezepicname" /><br /> + <br /> + Jdownloader Enabled: <input name="jdownloadervisible" id="id" type="checkbox" <?php if($jdownloadervisible > "0") echo "checked=checked; "; ?> /><br /> + Jdownloader Name: <input type="text" value="<?php echo $jdownloadername ?>" name="jdownloadername" /><br /> + Jdownloader Pic: <input type="text" value="<?php echo $jdownloaderpicname ?>" name="jdownloaderpicname" /><br /> + <br /> +</div> + +</div> + <div> + <input type="submit" name="submit" value="Update" /> +</div> +</div> + + +</form> \ No newline at end of file diff --git a/config/set4.php b/config/set4.php new file mode 100644 index 0000000..66f2dfa --- /dev/null +++ b/config/set4.php @@ -0,0 +1,27 @@ +<?php include '../config.php';?> + +<form action="write4.php" method="post"> + Drive Space Enabled: <input name="drivespacevisible" id="id" type="checkbox" <?php if($drivespacevisible > "0") echo "checked=checked; "; ?> /><br /> + <br /> + Drive 1 Enabled: <input name="drive1visible" id="id" type="checkbox" <?php if($drive1visible > "0") echo "checked=checked; "; ?> /><br /> + Drive 1 Name: <input type="text" value="<?php echo $drive1 ?>" name="drive1" /><br /> + <br /> + Drive 2 Enabled: <input name="drive2visible" id="id" type="checkbox" <?php if($drive2visible > "0") echo "checked=checked; "; ?> /><br /> + Drive 2 Name: <input type="text" value="<?php echo $drive2 ?>" name="drive2" /><br /> + <br /> + Drive 3 Enabled: <input name="drive3visible" id="id" type="checkbox" <?php if($drive3visible > "0") echo "checked=checked; "; ?> /><br /> + Drive 3 Name: <input type="text" value="<?php echo $drive3 ?>" name="drive3" /><br /> + <br /> + Drive 4 Enabled: <input name="drive4visible" id="id" type="checkbox" <?php if($drive4visible > "0") echo "checked=checked; "; ?> /><br /> + Drive 4 Name: <input type="text" value="<?php echo $drive4 ?>" name="drive4" /><br /> + <br /> + Drive 5 Enabled: <input name="drive5visible" id="id" type="checkbox" <?php if($drive5visible > "0") echo "checked=checked; "; ?> /><br /> + Drive 5 Name: <input type="text" value="<?php echo $drive5 ?>" name="drive5" /><br /> + <br /> + Drive 6 Enabled: <input name="drive6visible" id="id" type="checkbox" <?php if($drive6visible > "0") echo "checked=checked; "; ?> /><br /> + Drive 6 Name: <input type="text" value="<?php echo $drive6 ?>" name="drive6" /><br /> + <br /> + Drive 7 Enabled: <input name="drive7visible" id="id" type="checkbox" <?php if($drive7visible > "0") echo "checked=checked; "; ?> /><br /> + Drive 7 Name: <input type="text" value="<?php echo $drive7 ?>" name="drive7" /><br /> + <input type="submit" name="submit" value="Update" /> +</form> \ No newline at end of file diff --git a/config/set5.php b/config/set5.php new file mode 100644 index 0000000..b309013 --- /dev/null +++ b/config/set5.php @@ -0,0 +1,51 @@ +<?php include '../config.php';?> +<form action="write5.php" method="post"> +<div style="width:100%;"> <!-- Main Div --> +<div style="float:left; width:50%;"> +Set Server Upstate Monitor <br /> + <br /> +Server Status Enabled: <input name="serverstatusvisible" id="id" type="checkbox" <?php if($serverstatusvisible > "0") echo "checked=checked; "; ?> /><br /> + <br /> + Server 1 Enabled: <input name="server1visible" id="id" type="checkbox" <?php if($server1visible > "0") echo "checked=checked; "; ?> /><br /> + Server 1 Name: <input type="text" value="<?php echo $server1name ?>" name="server1name" /><br /> + Server 1 URL: <input type="text" value="<?php echo $server1url ?>" name="server1url" /><br /> + <br /> + Server 2 Enabled: <input name="server2visible" id="id" type="checkbox" <?php if($server2visible > "0") echo "checked=checked; "; ?> /><br /> + Server 2 Name: <input type="text" value="<?php echo $server2name ?>" name="server2name" /><br /> + Server 2 URL: <input type="text" value="<?php echo $server2url ?>" name="server2url" /><br /> + <br /> + Server 3 Enabled: <input name="server3visible" id="id" type="checkbox" <?php if($server3visible > "0") echo "checked=checked; "; ?> /><br /> + Server 3 Name: <input type="text" value="<?php echo $server3name ?>" name="server3name" /><br /> + Server 3 URL: <input type="text" value="<?php echo $server3url ?>" name="server3url" /><br /> + <br /> + Server 4 Enabled: <input name="server4visible" id="id" type="checkbox" <?php if($server4visible > "0") echo "checked=checked; "; ?> /><br /> + Server 4 Name: <input type="text" value="<?php echo $server4name ?>" name="server4name" /><br /> + Server 4 URL: <input type="text" value="<?php echo $server4url ?>" name="server4url" /><br /> + +</div> +<div style="float:right; width:50%; "> +Custom RSS Feeds <br /> + <br /> + Feed 1 Enabled: <input name="customfeed1visible" id="id" type="checkbox" <?php if($customfeed1visible > "0") echo "checked=checked; "; ?> /><br /> + Feed 1 Name: <input type="text" value="<?php echo $customfeed1name ?>" name="customfeed1name" /><br /> + Feed 1 URL: <input type="text" value="<?php echo $customfeed1url ?>" name="customfeed1url" /><br /> + <br /> + Feed 2 Enabled: <input name="customfeed2visible" id="id" type="checkbox" <?php if($customfeed2visible > "0") echo "checked=checked; "; ?> /><br /> + Feed 2 Name: <input type="text" value="<?php echo $customfeed2name ?>" name="customfeed2name" /><br /> + Feed 2 URL: <input type="text" value="<?php echo $customfeed2url ?>" name="customfeed2url" /><br /> + <br /> + Feed 3 Enabled: <input name="customfeed3visible" id="id" type="checkbox" <?php if($customfeed3visible > "0") echo "checked=checked; "; ?> /><br /> + Feed 3 Name: <input type="text" value="<?php echo $customfeed3name ?>" name="customfeed3name" /><br /> + Feed 3 URL: <input type="text" value="<?php echo $customfeed3url ?>" name="customfeed3url" /><br /> + <br /> + +</div> + +</div> + <div> + <input type="submit" name="submit" value="Update" /> +</div> +</div> + + +</form> \ No newline at end of file diff --git a/config/upload.php b/config/upload.php index 4f7722a..d9aa551 100644 --- a/config/upload.php +++ b/config/upload.php @@ -1,22 +1,44 @@ <?php - -// A list of permitted file extensions -$allowed = array('png', 'jpg', 'gif','zip'); - -if(isset($_FILES['upl']) && $_FILES['upl']['error'] == 0){ - - $extension = pathinfo($_FILES['upl']['name'], PATHINFO_EXTENSION); - - if(!in_array(strtolower($extension), $allowed)){ - echo '{"status":"error"}'; - exit; - } - - if(move_uploaded_file($_FILES['upl']['tmp_name'], 'Pic/'.$_FILES['upl']['name'])){ - echo '{"status":"success"}'; - exit; - } +$target_dir = "../Pic/"; +$target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]); +$uploadOk = 1; +$imageFileType = pathinfo($target_file,PATHINFO_EXTENSION); +// Check if image file is a actual image or fake image +if(isset($_POST["submit"])) { + $check = getimagesize($_FILES["fileToUpload"]["tmp_name"]); + if($check !== false) { + echo "File is an image - " . $check["mime"] . "."; + $uploadOk = 1; + } else { + echo "File is not an image."; + $uploadOk = 0; + } } - -echo '{"status":"error"}'; -exit; \ No newline at end of file +// Check if file already exists +if (file_exists($target_file)) { + echo "Sorry, file already exists."; + $uploadOk = 0; +} +// Check file size +if ($_FILES["fileToUpload"]["size"] > 500000) { + echo "Sorry, your file is too large."; + $uploadOk = 0; +} +// Allow certain file formats +if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg" +&& $imageFileType != "gif" ) { + echo "Sorry, only JPG, JPEG, PNG & GIF files are allowed."; + $uploadOk = 0; +} +// Check if $uploadOk is set to 0 by an error +if ($uploadOk == 0) { + echo "Sorry, your file was not uploaded."; +// if everything is ok, try to upload file +} else { + if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file)) { + echo "The file ". basename( $_FILES["fileToUpload"]["name"]). " has been uploaded."; + } else { + echo "Sorry, there was an error uploading your file."; + } +} +?> \ No newline at end of file diff --git a/config/write1.php b/config/write1.php new file mode 100644 index 0000000..22213d8 --- /dev/null +++ b/config/write1.php @@ -0,0 +1,68 @@ +<?php +$yn = $_POST['YN']; +$yb = $_POST['YB']; +$user1 = $_POST['user']; +$pass1 = $_POST['pass']; +$servicesvisible1 = $_POST['servicesvisible']; +$clockvisible1 = $_POST['clockvisible']; +$kknowledgefeedvisible1 = $_POST['kknowledgefeedvisible']; +$webclipfeedvisible1 = $_POST['webclipfeedvisible']; +$konvosvisible1 = $_POST['konvosvisible']; +$kodivisible1 = $_POST['kodivisible']; + +// +$fl='../config.php'; + /*read operation ->*/ $tmp = fopen($fl, "r"); $content=fread($tmp,filesize($fl)); fclose($tmp); + +// here goes your update +// Server Updates +$content = preg_replace( '/\$yourname = \"(.*?)\";/', '$yourname = "'.$yn.'";', $content); +$content = preg_replace( '/\$base = \"(.*?)\";/', '$base = "'.$yb.'";', $content); +// User/Pass Update +$content = preg_replace( '/\$user = \"(.*?)\";/', '$user = "'.$user1.'";', $content); +$content = preg_replace( '/\$pass = \"(.*?)\";/', '$pass = "'.$pass1.'";', $content); +// servicesvisible Settings + if (empty($sabvis1)) { + $content = preg_replace( '/\$sabvisible = \"(.*?)\";/', '$sabvisible = "0";', $content); + } else { + $content = preg_replace( '/\$sabvisible = \"(.*?)\";/', '$sabvisible = "1";', $content); + } + // clockvisible Settings + if (empty($clockvisible1)) { + $content = preg_replace( '/\$clockvisible = \"(.*?)\";/', '$clockvisible = "0";', $content); + } else { + $content = preg_replace( '/\$clockvisible = \"(.*?)\";/', '$clockvisible = "1";', $content); + } + // kknowledgefeedvisible Settings + if (empty($kknowledgefeedvisible1)) { + $content = preg_replace( '/\$kknowledgefeedvisible = \"(.*?)\";/', '$kknowledgefeedvisible = "0";', $content); + } else { + $content = preg_replace( '/\$kknowledgefeedvisible = \"(.*?)\";/', '$kknowledgefeedvisible = "1";', $content); + } + // webclipfeedvisible Settings + if (empty($webclipfeedvisible1)) { + $content = preg_replace( '/\$webclipfeedvisible = \"(.*?)\";/', '$webclipfeedvisible = "0";', $content); + } else { + $content = preg_replace( '/\$webclipfeedvisible = \"(.*?)\";/', '$webclipfeedvisible = "1";', $content); + } + // konvosvisible Settings + if (empty($konvosvisible1)) { + $content = preg_replace( '/\$konvosvisible = \"(.*?)\";/', '$konvosvisible = "0";', $content); + } else { + $content = preg_replace( '/\$konvosvisible = \"(.*?)\";/', '$konvosvisible = "1";', $content); + } + // kodivisible Settings + if (empty($kodivisible1)) { + $content = preg_replace( '/\$kodivisible = \"(.*?)\";/', '$kodivisible = "0";', $content); + } else { + $content = preg_replace( '/\$kodivisible = \"(.*?)\";/', '$kodivisible = "1";', $content); + } + /*write operation ->*/ $tmp =fopen($fl, "w"); fwrite($tmp, $content); fclose($tmp); + + //sleep for 5 seconds + + + header("Location: re1.php"); +die(); + + ?> \ No newline at end of file diff --git a/config/write.php b/config/write2.php similarity index 88% rename from config/write.php rename to config/write2.php index dec2e68..3bfd049 100644 --- a/config/write.php +++ b/config/write2.php @@ -1,8 +1,4 @@ <?php -$yn = $_POST['YN']; -$yb = $_POST['YB']; -$user1 = $_POST['user']; -$pass1 = $_POST['pass']; $sabvis1 = $_POST['sabvisible']; $sabport1 = $_POST['sabport']; $sabname1 = $_POST['sabname']; @@ -26,12 +22,6 @@ $fl='../config.php'; /*read operation ->*/ $tmp = fopen($fl, "r"); $content=fread($tmp,filesize($fl)); fclose($tmp); // here goes your update -// Server Updates -$content = preg_replace( '/\$yourname = \"(.*?)\";/', '$yourname = "'.$yn.'";', $content); -$content = preg_replace( '/\$base = \"(.*?)\";/', '$base = "'.$yb.'";', $content); -// User/Pass Update -$content = preg_replace( '/\$user = \"(.*?)\";/', '$user = "'.$user1.'";', $content); -$content = preg_replace( '/\$pass = \"(.*?)\";/', '$pass = "'.$pass1.'";', $content); // SAB Settings // SAB Visible Update if (empty($sabvis1)) { @@ -94,7 +84,7 @@ $content = preg_replace( '/\$cpkids = \"(.*?)\";/', '$cpkids = "'.$cpkids1.'"; //sleep for 5 seconds - header("Location: index.php"); + header("Location: re1.php"); die(); ?> \ No newline at end of file diff --git a/config/write3.php b/config/write3.php new file mode 100644 index 0000000..c55c140 --- /dev/null +++ b/config/write3.php @@ -0,0 +1,119 @@ +<?php +$torrentvisible1 = $_POST['torrentvisible']; +$torrentport1 = $_POST['$torrentport']; +$torrentname1 = $_POST['torrentname']; +$torrentpicname1 = $_POST['torrentpicname']; +$torrenttype1 = $_POST['torrenttype']; +$ftpvisible1 = $_POST['ftpvisible']; +$ftpname1 = $_POST['$ftpname']; +$ftppicname1 = $_POST['ftppicname']; +$ftpport1 = $_POST['ftpport']; +$madsonicvisible1 = $_POST['madsonicvisible']; +$madsonicname1 = $_POST['$madsonicname']; +$madsonicpicname1 = $_POST['madsonicpicname']; +$madsonicport1 = $_POST['madsonicport']; +$plexvisible1 = $_POST['plexvisible']; +$plexname1 = $_POST['$plexname']; +$plexpicname1 = $_POST['plexpicname']; +$plexport1 = $_POST['plexport']; +$squeezevisible1 = $_POST['squeezevisible']; +$squeezename1 = $_POST['$squeezename']; +$squeezepicname1 = $_POST['squeezepicname']; +$squeezeport1 = $_POST['squeezeport']; +$jdownloadervisible1 = $_POST['jdownloadervisible']; +$jdownloadername1 = $_POST['$jdownloadername']; +$jdownloaderpicname1 = $_POST['jdownloaderpicname']; + + + +// +$fl='../config.php'; + /*read operation ->*/ $tmp = fopen($fl, "r"); $content=fread($tmp,filesize($fl)); fclose($tmp); + +// here goes your update +// Torrent Settings +// Torrent Visible Update +if (empty($torrentvisible1)) { + $content = preg_replace( '/\$torrentvisible = \"(.*?)\";/', '$torrentvisible = "0";', $content); + } else { + $content = preg_replace( '/\$torrentvisible = \"(.*?)\";/', '$torrentvisible = "1";', $content); + } + if ($torrenttype1 > "1") { + $content = preg_replace( '/\$torrenttype = \"(.*?)\";/', '$torrenttype = "2";', $content); + $content = preg_replace( '/\$torrentport = \"(.*?)\";/', '$torrentport = "9091";', $content); + } else { + $content = preg_replace( '/\$torrenttype = \"(.*?)\";/', '$torrenttype = "1";', $content); + $content = preg_replace( '/\$torrentport = \"(.*?)\";/', '$torrentport = "86";', $content); + } + $content = preg_replace( '/\$torrentname = \"(.*?)\";/', '$torrentname = "'.$torrentname1.'";', $content); +$content = preg_replace( '/\$torrentpicname = \"(.*?)\";/', '$torrentpicname = "'.$torrentpicname1.'";', $content); +// End of SAB Settings + +// FTP Settings +// FTP Visible Update +if (empty($ftpvisible1)) { + $content = preg_replace( '/\$ftpvisible = \"(.*?)\";/', '$ftpvisible = "0";', $content); + } else { + $content = preg_replace( '/\$ftpvisible = \"(.*?)\";/', '$ftpvisible = "1";', $content); + } +$content = preg_replace( '/\$ftpport = \"(.*?)\";/', '$ftpport = "'.$ftpport1.'";', $content); +$content = preg_replace( '/\$ftpname = \"(.*?)\";/', '$ftpname = "'.$ftpname1.'";', $content); +$content = preg_replace( '/\$ftppicname = \"(.*?)\";/', '$ftppicname = "'.$ftppicname1.'";', $content); +// End of FTP Settigns + +// Madsonic Settings +// Madsonic Visible Update +if (empty($madsonicvisible1)) { + $content = preg_replace( '/\$madsonicvisible = \"(.*?)\";/', '$madsonicvisible = "0";', $content); + } else { + $content = preg_replace( '/\$madsonicvisible = \"(.*?)\";/', '$madsonicvisible = "1";', $content); + } +$content = preg_replace( '/\$madsonicport = \"(.*?)\";/', '$madsonicport = "'.$madsonicport1.'";', $content); +$content = preg_replace( '/\$madsonicname = \"(.*?)\";/', '$madsonicname = "'.$madsonicname1.'";', $content); +$content = preg_replace( '/\$madsonicpicname = \"(.*?)\";/', '$madsonicpicname = "'.$madsonicpicname1.'";', $content); +// End of Madsonic Settigns + +// Plex Settings +// Plex Visible Update +if (empty($plexvisible1)) { + $content = preg_replace( '/\$plexvisible = \"(.*?)\";/', '$plexvisible = "0";', $content); + } else { + $content = preg_replace( '/\$plexvisible = \"(.*?)\";/', '$plexvisible = "1";', $content); + } +$content = preg_replace( '/\$plexport = \"(.*?)\";/', '$plexport = "'.$plexport1.'";', $content); +$content = preg_replace( '/\$plexname = \"(.*?)\";/', '$plexname = "'.$plexname1.'";', $content); +$content = preg_replace( '/\$plexpicname = \"(.*?)\";/', '$plexpicname = "'.$plexpicname1.'";', $content); +// End of Plex Settigns + +// Squeezebox Settings +// Squeezebox Visible Update +if (empty($squeezevisible1)) { + $content = preg_replace( '/\$squeezevisible = \"(.*?)\";/', '$squeezevisible = "0";', $content); + } else { + $content = preg_replace( '/\$squeezevisible = \"(.*?)\";/', '$squeezevisible = "1";', $content); + } +$content = preg_replace( '/\$squeezeport = \"(.*?)\";/', '$squeezeport = "'.$squeezeport1.'";', $content); +$content = preg_replace( '/\$squeezename = \"(.*?)\";/', '$squeezename = "'.$squeezename1.'";', $content); +$content = preg_replace( '/\$squeezepicname = \"(.*?)\";/', '$squeezepicname = "'.$squeezepicname1.'";', $content); +// End of Squeeze Settigns + +// JDownloader Settings +// JDownloader Visible Update +if (empty($jdownloadervisible1)) { + $content = preg_replace( '/\$jdownloadervisible = \"(.*?)\";/', '$jdownloadervisible = "0";', $content); + } else { + $content = preg_replace( '/\$jdownloadervisible = \"(.*?)\";/', '$jdownloadervisible = "1";', $content); + } +$content = preg_replace( '/\$jdownloadername = \"(.*?)\";/', '$jdownloadername = "'.$jdownloadername1.'";', $content); +$content = preg_replace( '/\$jdownloaderpicname = \"(.*?)\";/', '$jdownloaderpicname = "'.$jdownloaderpicname1.'";', $content); +// End of Squeeze Settigns + + /*write operation ->*/ $tmp =fopen($fl, "w"); fwrite($tmp, $content); fclose($tmp); + + //sleep for 5 seconds + + + header("Location: re1.php"); +die(); + + ?> \ No newline at end of file diff --git a/config/write4.php b/config/write4.php new file mode 100644 index 0000000..d7edadb --- /dev/null +++ b/config/write4.php @@ -0,0 +1,108 @@ +<?php +$drivespacevisible1 = $_POST['drivespacevisible']; +$drive1visible1 = $_POST['drive1visible']; +$drive1a = $_POST['drive1']; +$drive2visible1 = $_POST['drive2visible']; +$drive2a = $_POST['drive2']; +$drive3visible1 = $_POST['drive3visible']; +$drive3a = $_POST['drive3']; +$drive4visible1 = $_POST['drive4visible']; +$drive4a = $_POST['drive4']; +$drive5visible1 = $_POST['drive5visible']; +$drive5a = $_POST['drive5']; +$drive6visible1 = $_POST['drive6visible']; +$drive6a = $_POST['drive6']; +$drive7visible1 = $_POST['drive7visible']; +$drive7a = $_POST['drive7']; +// +$fl='../config.php'; + /*read operation ->*/ $tmp = fopen($fl, "r"); $content=fread($tmp,filesize($fl)); fclose($tmp); + +// here goes your update +// drive Visible Update +if (empty($drivespacevisible1)) { + $content = preg_replace( '/\$drivespacevisible = \"(.*?)\";/', '$drivespacevisible = "0";', $content); + } else { + $content = preg_replace( '/\$drivespacevisible = \"(.*?)\";/', '$drivespacevisible = "1";', $content); + } + + +// Drive1 Settings +// FTP Visible Update +if (empty($drive1visible1)) { + $content = preg_replace( '/\$drive1visible = \"(.*?)\";/', '$drive1visible = "0";', $content); + } else { + $content = preg_replace( '/\$drive1visible = \"(.*?)\";/', '$drive1visible = "1";', $content); + } +$content = preg_replace( '/\$drive1 = \"(.*?)\";/', '$drive1 = "'.$drive1a.'";', $content); +// End of Settigns + +// Drive2 Settings +// FTP Visible Update +if (empty($drive2visible1)) { + $content = preg_replace( '/\$drive2visible = \"(.*?)\";/', '$drive2visible = "0";', $content); + } else { + $content = preg_replace( '/\$drive2visible = \"(.*?)\";/', '$drive2visible = "1";', $content); + } +$content = preg_replace( '/\$drive2 = \"(.*?)\";/', '$drive2 = "'.$drive2a.'";', $content); +// End of Settigns + +// Drive3 Settings +// FTP Visible Update +if (empty($drive3visible1)) { + $content = preg_replace( '/\$drive3visible = \"(.*?)\";/', '$drive3visible = "0";', $content); + } else { + $content = preg_replace( '/\$drive3visible = \"(.*?)\";/', '$drive3visible = "1";', $content); + } +$content = preg_replace( '/\$drive3 = \"(.*?)\";/', '$drive3 = "'.$drive3a.'";', $content); +// End of Settigns + +// Drive4 Settings +// FTP Visible Update +if (empty($drive4visible1)) { + $content = preg_replace( '/\$drive4visible = \"(.*?)\";/', '$drive4visible = "0";', $content); + } else { + $content = preg_replace( '/\$drive4visible = \"(.*?)\";/', '$drive4visible = "1";', $content); + } +$content = preg_replace( '/\$drive4 = \"(.*?)\";/', '$drive4 = "'.$drive4a.'";', $content); +// End of Settigns + +// Drive5 Settings +// FTP Visible Update +if (empty($drive5visible1)) { + $content = preg_replace( '/\$drive5visible = \"(.*?)\";/', '$drive5visible = "0";', $content); + } else { + $content = preg_replace( '/\$drive5visible = \"(.*?)\";/', '$drive5visible = "1";', $content); + } +$content = preg_replace( '/\$drive5 = \"(.*?)\";/', '$drive5 = "'.$drive5a.'";', $content); +// End of Settigns + +// Drive6 Settings +// FTP Visible Update +if (empty($drive6visible1)) { + $content = preg_replace( '/\$drive6visible = \"(.*?)\";/', '$drive6visible = "0";', $content); + } else { + $content = preg_replace( '/\$drive6visible = \"(.*?)\";/', '$drive6visible = "1";', $content); + } +$content = preg_replace( '/\$drive6 = \"(.*?)\";/', '$drive6 = "'.$drive6a.'";', $content); +// End of Settigns + +// Drive7 Settings +// FTP Visible Update +if (empty($drive7visible1)) { + $content = preg_replace( '/\$drive7visible = \"(.*?)\";/', '$drive7visible = "0";', $content); + } else { + $content = preg_replace( '/\$drive7visible = \"(.*?)\";/', '$drive7visible = "1";', $content); + } +$content = preg_replace( '/\$drive7 = \"(.*?)\";/', '$drive7 = "'.$drive7a.'";', $content); +// End of Settigns + + /*write operation ->*/ $tmp =fopen($fl, "w"); fwrite($tmp, $content); fclose($tmp); + + //sleep for 5 seconds + + + header("Location: re1.php"); +die(); + + ?> \ No newline at end of file diff --git a/config/write5.php b/config/write5.php new file mode 100644 index 0000000..3b18efb --- /dev/null +++ b/config/write5.php @@ -0,0 +1,122 @@ +<?php +$serverstatusvisible1 = $_POST['serverstatusvisible']; +$server1visible1 = $_POST['server1visible']; +$server1name1 = $_POST['server1name']; +$server1url1 = $_POST['server1url']; +$server2visible1 = $_POST['server2visible']; +$server2name1 = $_POST['server2name']; +$server2url1 = $_POST['server2url']; +$server3visible1 = $_POST['server3visible']; +$server3name1 = $_POST['server3name']; +$server3url1 = $_POST['server3url']; +$server4visible1 = $_POST['server4visible']; +$server4name1 = $_POST['server4name']; +$server4url1 = $_POST['server4url']; +$customfeed1visible1 = $_POST['customfeed1visible']; +$customfeed1name1 = $_POST['customfeed1name']; +$customfeed1url1 = $_POST['customfeed1url']; +$customfeed2visible1 = $_POST['customfeed2visible']; +$customfeed2name1 = $_POST['customfeed2name']; +$customfeed2url1 = $_POST['customfeed2url']; +$customfeed3visible1 = $_POST['customfeed3visible']; +$customfeed3name1 = $_POST['customfeed3name']; +$customfeed3url1 = $_POST['customfeed3url']; + +// +$fl='../config.php'; + /*read operation ->*/ $tmp = fopen($fl, "r"); $content=fread($tmp,filesize($fl)); fclose($tmp); + +// here goes your update +// ServerStatus Visible Update +if (empty($serverstatusvisible1)) { + $content = preg_replace( '/\$serverstatusvisible = \"(.*?)\";/', '$serverstatusvisible = "0";', $content); + } else { + $content = preg_replace( '/\$serverstatusvisible = \"(.*?)\";/', '$serverstatusvisible = "1";', $content); + } + + +// Drive1 Settings +// FTP Visible Update +if (empty($server1visible1)) { + $content = preg_replace( '/\$server1visible = \"(.*?)\";/', '$server1visible = "0";', $content); + } else { + $content = preg_replace( '/\$server1visible = \"(.*?)\";/', '$server1visible = "1";', $content); + } +$content = preg_replace( '/\$server1name = \"(.*?)\";/', '$server1name = "'.$server1name1.'";', $content); +$content = preg_replace( '/\$server1url = \"(.*?)\";/', '$server1url = "'.$server1url1.'";', $content); +// End of Settigns + +// Drive2 Settings +// FTP Visible Update +if (empty($server2visible1)) { + $content = preg_replace( '/\$server2visible = \"(.*?)\";/', '$server2visible = "0";', $content); + } else { + $content = preg_replace( '/\$server2visible = \"(.*?)\";/', '$server2visible = "1";', $content); + } +$content = preg_replace( '/\$server2name = \"(.*?)\";/', '$server2name = "'.$server2name1.'";', $content); +$content = preg_replace( '/\$server2url = \"(.*?)\";/', '$server2url = "'.$server2url1.'";', $content); +// End of Settigns + +// Drive3 Settings +// FTP Visible Update +if (empty($server3visible1)) { + $content = preg_replace( '/\$server3visible = \"(.*?)\";/', '$server3visible = "0";', $content); + } else { + $content = preg_replace( '/\$server3visible = \"(.*?)\";/', '$server3visible = "1";', $content); + } +$content = preg_replace( '/\$server3name = \"(.*?)\";/', '$server3name = "'.$server3name1.'";', $content); +$content = preg_replace( '/\$server3url = \"(.*?)\";/', '$server3url = "'.$server3url1.'";', $content); +// End of Settigns + +// Drive4 Settings +// FTP Visible Update +if (empty($server4visible1)) { + $content = preg_replace( '/\$server4visible = \"(.*?)\";/', '$server4visible = "0";', $content); + } else { + $content = preg_replace( '/\$server4visible = \"(.*?)\";/', '$server4visible = "1";', $content); + } +$content = preg_replace( '/\$server4name = \"(.*?)\";/', '$server4name = "'.$server4name1.'";', $content); +$content = preg_replace( '/\$server4url = \"(.*?)\";/', '$server4url = "'.$server4url1.'";', $content); +// End of Settigns + +// RSS1 Settings +// FTP Visible Update +if (empty($customfeed1visible1)) { + $content = preg_replace( '/\$customfeed1visible = \"(.*?)\";/', '$customfeed1visible = "0";', $content); + } else { + $content = preg_replace( '/\$customfeed1visible = \"(.*?)\";/', '$customfeed1visible = "1";', $content); + } +$content = preg_replace( '/\$customfeed1name = \"(.*?)\";/', '$customfeed1name = "'.$customfeed1name1.'";', $content); +$content = preg_replace( '/\$customfeed1name = \"(.*?)\";/', '$customfeed1name = "'.$customfeed1name1.'";', $content); +// End of Settigns +// RSS2 Settings +// FTP Visible Update +if (empty($customfeed2visible1)) { + $content = preg_replace( '/\$customfeed2visible = \"(.*?)\";/', '$customfeed2visible = "0";', $content); + } else { + $content = preg_replace( '/\$customfeed2visible = \"(.*?)\";/', '$customfeed2visible = "1";', $content); + } +$content = preg_replace( '/\$customfeed2name = \"(.*?)\";/', '$customfeed2name = "'.$customfeed2name1.'";', $content); +$content = preg_replace( '/\$customfeed2name = \"(.*?)\";/', '$customfeed2name = "'.$customfeed2name1.'";', $content); +// End of Settigns +// RSS3 Settings +// FTP Visible Update +if (empty($customfeed3visible1)) { + $content = preg_replace( '/\$customfeed3visible = \"(.*?)\";/', '$customfeed3visible = "0";', $content); + } else { + $content = preg_replace( '/\$customfeed3visible = \"(.*?)\";/', '$customfeed3visible = "1";', $content); + } +$content = preg_replace( '/\$customfeed3name = \"(.*?)\";/', '$customfeed3name = "'.$customfeed3name1.'";', $content); +$content = preg_replace( '/\$customfeed3name = \"(.*?)\";/', '$customfeed3name = "'.$customfeed3name1.'";', $content); +// End of Settigns + + + /*write operation ->*/ $tmp =fopen($fl, "w"); fwrite($tmp, $content); fclose($tmp); + + //sleep for 5 seconds + + + header("Location: re1.php"); +die(); + + ?> \ No newline at end of file diff --git a/movielib/templates/white/img/7.png b/movielib/templates/white/img/7.png deleted file mode 100644 index 39b9f0e4424554fe2bc43fb60c2d990b5f03c78a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 944 zcmV;h15f;kP)<h;3K|Lk000e1NJLTq000mG000*V1^@s7b@BgC00009a7bBm000XU z000XU0RWnu7ytkOAY({UO#lFTB>(_`g8%^e{{R4h=>PzAFaQARU;qF*m;eA5Z<1fd zMgRZ<Hc3Q5RCwBAV1R)CObiSR49~5sAY3C(&i?=a00960VqjokILyGn@Sg#uhGDgi z&VL351_l5C00960Vq{=oV3;c-^Z)(dzYIsdePe(t*{q=OpMilPmVtqRp~91w_dm=4 z00000|NlZ50>L^A3=9na&A7P!pH)>wQT4xCObnsrg|+p65f+yJ3=9kmObiSRCqKM> z%kbvUpR)`M3=9m3f`b3exVYfT0RR91|Nmly(yQm|=!E!*iZcBF50U%u_AP_T<;!qm zbzn~EP*C`PTt(%-3@ht@1_p)+$ZpNE6A<`+PhbDPJvTRoN3<9i82&#tGy9(^B!nT! zz`(%p|Cy!b|0&Ya|5+Fr|1&T!SfeXAj2;{?03eeJSr7(;=+mzZ8HT~i7+RLBf((Xf zSgo1`qs8B0@h|uj1iPYP*j5CwiNPX<ZSsw8;|z0p>cORZ_wL@kd(UTpGPhhN-F+W< zo&x|fr7#RbtmAl40btaHxb<`$iU?EF#3@ZNzFauLXNPmUO(UkH`T}$TEGD)MDJAxW z)w@5bSI^^8Tb#jbY8p~0v58}3g&zmrogH150>`07;lZ*jlng>A!YYbzRtf<69I%`@ z4jxH@fc@dua&ya~POV0U5cIn0S9rhY<?&>sY*rG8qbU9x{i7mc4FsC#B0)$I{8*}w zAiaTYTSafs$F^5!S8t%TsE8KXN`s(P5kjldHsd%sGcovYkrQG~b>QsoJzVZN_x|O_ zZ+r!o#f-o@z)3DgE)d||wn0%4Lg4rNQ4|H+vS?`<`-1^}$5{drUXl4?CK#0W*{tkl zGIBc>a}PoS-Ptv|b}CcW02YPdxKtt(4)b8!bjM@vEX%Fmnip^p0*(OAibcYc2|Z1t zrR&_7Cgx-UunSy!37i8f2dk?jg}@jNX%2^UOq0Ij0JMO;`6Re#0=3O#lDew$W*9Ve zosMbpXxji9u;FFn4j>!xxO}cuWUo+=hpCiYi$-O{=W`cV_iAncvJi>Lmugi$mCN!p zot6z%m5I;retRObuc->O7lhy{pC@2hT#iOu7zVeN<&NH-y7VKe|4E!z^Tz<RS4F5O S>PLbA0000<MNUMnLSTa7_M$2P