diff --git a/Update.bat b/Update.bat index 1d9e7c9..7e4f4d5 100644 --- a/Update.bat +++ b/Update.bat @@ -1,3 +1 @@ -git.exe stash -git.exe pull -git.exe stash pop \ No newline at end of file +git.exe pull \ No newline at end of file diff --git a/config/index.php b/config/index.php new file mode 100644 index 0000000..72fe030 --- /dev/null +++ b/config/index.php @@ -0,0 +1,8 @@ + + + + + + Your config has been updated, the page will reload with new entries.. + + \ No newline at end of file diff --git a/config/redirect.html b/config/redirect.html new file mode 100644 index 0000000..f38bae3 --- /dev/null +++ b/config/redirect.html @@ -0,0 +1,8 @@ + + + + + + Your config is being loaded, please wait.. + + \ No newline at end of file diff --git a/config/set.php b/config/set.php new file mode 100644 index 0000000..2ebb859 --- /dev/null +++ b/config/set.php @@ -0,0 +1,31 @@ + + +
+ Your Name:
+ Server Address:
+
+ Username:
+ Password:
+
+ SAB Enabled: "0") echo "checked=checked; "; ?> />
+ SAB Port:
+ SAB Name:
+ SAB Pic:
+
+ Sick Enabled: "0") echo "checked=checked; "; ?> />
+ Sick Type : >SickBeard / "1") echo "checked=checked; "; ?>>SickRage
+ Sick Port:
+ Sick Name:
+ Sick Pic:
+
+ Couch Enabled: "0") echo "checked=checked; "; ?> />
+ Couch Adults : "0") echo "checked=checked; "; ?>>Enabled / >Disabled
+ Couch Adults Port:
+ Couch Adults Name:
+ Couch Adults Pic:
+ Couch Kids : "0") echo "checked=checked; "; ?>>Enabled / >Disabled
+ Couch Kids Port:
+ Couch Kids Name:
+ Couch Kids Pic:
+ +
\ No newline at end of file diff --git a/config/write.php b/config/write.php new file mode 100644 index 0000000..dec2e68 --- /dev/null +++ b/config/write.php @@ -0,0 +1,100 @@ +*/ $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)) { + $content = preg_replace( '/\$sabvisible = \"(.*?)\";/', '$sabvisible = "0";', $content); + } else { + $content = preg_replace( '/\$sabvisible = \"(.*?)\";/', '$sabvisible = "1";', $content); + } +$content = preg_replace( '/\$sabport = \"(.*?)\";/', '$sabport = "'.$sabport1.'";', $content); +$content = preg_replace( '/\$sabname = \"(.*?)\";/', '$sabname = "'.$sabname1.'";', $content); +$content = preg_replace( '/\$sabpicname = \"(.*?)\";/', '$sabpicname = "'.$sabpicname1.'";', $content); +// End of SAB Settings + +// Sick Settings +// Sick Visible Update +if (empty($sickvis1)) { + $content = preg_replace( '/\$sickvisible = \"(.*?)\";/', '$sickvisible = "0";', $content); + } else { + $content = preg_replace( '/\$sickvisible = \"(.*?)\";/', '$sickvisible = "1";', $content); + } +// Sick Type Update +if ($sicktype1 > "1") { + $content = preg_replace( '/\$sicktype = \"(.*?)\";/', '$sicktype = "2";', $content); + } else { + $content = preg_replace( '/\$sicktype = \"(.*?)\";/', '$sicktype = "1";', $content); + } +$content = preg_replace( '/\$sickport = \"(.*?)\";/', '$sickport = "'.$sickport1.'";', $content); +$content = preg_replace( '/\$sickname = \"(.*?)\";/', '$sickname = "'.$sickname1.'";', $content); +$content = preg_replace( '/\$sickpicname = \"(.*?)\";/', '$sickpicname = "'.$sickpicname1.'";', $content); +// End of Sick Settigns + +// Couch Settings +// CPAdults Visible Update +if (empty($couchvisible1)) { + $content = preg_replace( '/\$couchvisible = \"(.*?)\";/', '$couchvisible = "0";', $content); + } else { + $content = preg_replace( '/\$couchvisible = \"(.*?)\";/', '$couchvisible = "1";', $content); + } +// CPAdults Update +if ($cpadultsvisible1 > "1") { + $content = preg_replace( '/\$cpadultsvisible = \"(.*?)\";/', '$cpadultsvisible = "0";', $content); + } else { + $content = preg_replace( '/\$cpadultsvisible = \"(.*?)\";/', '$cpadultsvisible = "1";', $content); + } +$content = preg_replace( '/\$cpadultsname = \"(.*?)\";/', '$cpadultsname = "'.$cpadultsname1.'";', $content); +$content = preg_replace( '/\$cpadultspicname = \"(.*?)\";/', '$cpadultspicname = "'.$cpadultspicname1.'";', $content); +$content = preg_replace( '/\$cpadults = \"(.*?)\";/', '$cpadults = "'.$cpadults1.'";', $content); +// CPKids Visible Update +if ($cpkidsvisible1 > "1") { + $content = preg_replace( '/\$cpkidsvisible = \"(.*?)\";/', '$cpkidsvisible = "0";', $content); + } else { + $content = preg_replace( '/\$cpkidsvisible = \"(.*?)\";/', '$cpkidsvisible = "1";', $content); + } +$content = preg_replace( '/\$cpkidsname = \"(.*?)\";/', '$cpkidsname = "'.$cpkidsname1.'";', $content); +$content = preg_replace( '/\$cpkidspicname = \"(.*?)\";/', '$cpkidspicname = "'.$cpkidspicname1.'";', $content); +$content = preg_replace( '/\$cpkids = \"(.*?)\";/', '$cpkids = "'.$cpkids1.'";', $content); +// End of Couch Settigns + + /*write operation ->*/ $tmp =fopen($fl, "w"); fwrite($tmp, $content); fclose($tmp); + + //sleep for 5 seconds + + + header("Location: index.php"); +die(); + + ?> \ No newline at end of file diff --git a/index.php b/index.php index d1ea8f0..337cdbe 100644 --- a/index.php +++ b/index.php @@ -1,78 +1,8 @@ - - - - - - - - - - - - - - - -$yourname's Server Access";?> - - - - - - - - - -Home Server Logon. - -
-
-
- -
- - - +?> \ No newline at end of file diff --git a/index2.php b/index2.php new file mode 100644 index 0000000..d1ea8f0 --- /dev/null +++ b/index2.php @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + +$yourname's Server Access";?> + + + + + + + + + + +Home Server Logon. + +
+
+
+ +
+ + +