rem git pull
echo pull latest code
git.exe pull
echo Code downloaded

@ECHO OFF
rem Import KNews
findstr "http://knews.cf" config.php >nul 2>&1
   if errorlevel 1 goto ONE
   if errorlevel 0 goto ZERO
   goto END
   :ZERO
     echo KNews Already Updated
	 goto END
	:ONE
     echo ^<?php >>config.php
	 echo $knews = "http://knews.cf"; >> config.php
	 echo ^?^> >> config.php
     echo KNews Added
	 goto END
   :END
   
rem Import KLoud
findstr "https://k-loud.tk" config.php >nul 2>&1
   if errorlevel 1 goto ONE
   if errorlevel 0 goto ZERO
   goto END
   :ZERO
     echo Kloud.tk Already Updated
	 goto END
	:ONE
	findstr "https://k-loud.cf" config.php >nul 2>&1
   if errorlevel 1 goto ONE
   if errorlevel 0 goto ZERO
   goto END
   :ZERO
   cscript replace.vbs "config.php" "https://k-loud.cf" "https://k-loud.tk"
    echo Kloud Updated 
	goto END
	:ONE
	 echo ^<?php >>config.php
	 echo $kloud = "https://k-loud.tk"; >> config.php
	 echo ^?^> >> config.php
     echo Kloud Added
	 goto END
	:END
   
   rem Import Konvos
findstr "http://konvos.cf" config.php >nul 2>&1
   if errorlevel 1 goto ONE
   if errorlevel 0 goto ZERO
   goto END
   :ZERO
     echo Konvos Already Updated
	 goto END
	:ONE
     echo ^<?php >>config.php
	 echo $kloud = "http://konvos.cf"; >> config.php
	 echo ^?^> >> config.php
     echo Konvos Added
	 goto END
   :END
   
   rem Import Konvos enable
findstr "konvosvisible" config.php >nul 2>&1
   if errorlevel 1 goto ONE
   if errorlevel 0 goto ZERO
   goto END
   :ZERO
     echo Konvos Enabled Already Updated
	 goto END
	:ONE
     echo ^<?php >>config.php
	 echo $konvosvisible = "1"; >> config.php
	 echo ^?^> >> config.php
     echo Konvos Enabled Added
	 goto END
   :END

rem Update WebClip URL to Klips
findstr "http://webclip.ml" config.php >nul 2>&1
   if errorlevel 1 goto ONE
   if errorlevel 0 goto ZERO
   goto END
   :ZERO
     cscript replace.vbs "config.php" "http://webclip.ml" "http://klips.cf"
     echo WebClip Updated
	 goto END
   :ONE
     echo Klips Already Updated
	 goto END
   :END
PAUSE