add update check
This commit is contained in:
		
							parent
							
								
									4b50cc842a
								
							
						
					
					
						commit
						72fa56b96d
					
				
							
								
								
									
										16
									
								
								Update.bat
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								Update.bat
									
									
									
									
									
								
							@ -156,4 +156,20 @@ findstr "custombackground" config.php >nul 2>&1
 | 
			
		||||
	 goto END
 | 
			
		||||
   :END
 | 
			
		||||
   
 | 
			
		||||
    rem Add version
 | 
			
		||||
findstr "localversion" config.php >nul 2>&1
 | 
			
		||||
   if errorlevel 1 goto ONE
 | 
			
		||||
   if errorlevel 0 goto ZERO
 | 
			
		||||
   goto END
 | 
			
		||||
   :ZERO
 | 
			
		||||
     echo localversion Already Updated
 | 
			
		||||
	 goto END
 | 
			
		||||
   :ONE
 | 
			
		||||
     echo ^<?php >>config.php
 | 
			
		||||
	 echo $localversion = "1.1"; >> config.php
 | 
			
		||||
	 echo ^?^> >> config.php
 | 
			
		||||
     echo localversion Updated
 | 
			
		||||
	 goto END
 | 
			
		||||
   :END
 | 
			
		||||
   
 | 
			
		||||
PAUSE
 | 
			
		||||
@ -74,4 +74,43 @@ color: black;
 | 
			
		||||
 color: white;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
	  #mask {
 | 
			
		||||
  position: absolute;
 | 
			
		||||
  left: 0;
 | 
			
		||||
  top: 0;
 | 
			
		||||
  z-index: 9000;
 | 
			
		||||
  background-color: #000;
 | 
			
		||||
  display: none;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#boxes .window {
 | 
			
		||||
  position: absolute;
 | 
			
		||||
  left: 0;
 | 
			
		||||
  top: 0;
 | 
			
		||||
  width: 440px;
 | 
			
		||||
  height: 200px;
 | 
			
		||||
  display: none;
 | 
			
		||||
  z-index: 9999;
 | 
			
		||||
  padding: 20px;
 | 
			
		||||
  border-radius: 15px;
 | 
			
		||||
  text-align: center;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#boxes #dialog {
 | 
			
		||||
  width: 750px;
 | 
			
		||||
  height: 300px;
 | 
			
		||||
  padding: 10px;
 | 
			
		||||
  background-color: #ffffff;
 | 
			
		||||
  font-family: 'Segoe UI Light', sans-serif;
 | 
			
		||||
  font-size: 15pt;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#popupfoot {
 | 
			
		||||
  font-size: 16pt;
 | 
			
		||||
  position: absolute;
 | 
			
		||||
  bottom: 0px;
 | 
			
		||||
  width: 250px;
 | 
			
		||||
  left: 250px;
 | 
			
		||||
}
 | 
			
		||||
	  
 | 
			
		||||
</style>
 | 
			
		||||
							
								
								
									
										53
									
								
								main.php
									
									
									
									
									
								
							
							
						
						
									
										53
									
								
								main.php
									
									
									
									
									
								
							@ -9,6 +9,7 @@
 | 
			
		||||
<link rel="alternate stylesheet" type="text/css" media="screen" title="red" href="css/red.css" />
 | 
			
		||||
<link rel="alternate stylesheet" type="text/css" media="screen" title="custom" href="css/custom.php" />
 | 
			
		||||
<link rel="stylesheet" type="text/css" media="screen" href="css/converse.min.css">
 | 
			
		||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
 | 
			
		||||
<script src="builds/converse.min.js"></script>
 | 
			
		||||
<script type="text/javascript">
 | 
			
		||||
window.onload=function(){
 | 
			
		||||
@ -30,11 +31,63 @@ indicateSelected(formref.switchcontrol)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
</head>
 | 
			
		||||
<script>
 | 
			
		||||
$(document).ready(function() {	
 | 
			
		||||
 | 
			
		||||
var id = '#dialog';
 | 
			
		||||
	
 | 
			
		||||
//Get the screen height and width
 | 
			
		||||
var maskHeight = $(document).height();
 | 
			
		||||
var maskWidth = $(window).width();
 | 
			
		||||
	
 | 
			
		||||
//Set heigth and width to mask to fill up the whole screen
 | 
			
		||||
$('#mask').css({'width':maskWidth,'height':maskHeight});
 | 
			
		||||
 | 
			
		||||
//transition effect
 | 
			
		||||
$('#mask').fadeIn(500);	
 | 
			
		||||
$('#mask').fadeTo("slow",0.9);	
 | 
			
		||||
	
 | 
			
		||||
//Get the window height and width
 | 
			
		||||
var winH = $(window).height();
 | 
			
		||||
var winW = $(window).width();
 | 
			
		||||
              
 | 
			
		||||
//Set the popup window to center
 | 
			
		||||
$(id).css('top',  winH/2-$(id).height()/2);
 | 
			
		||||
$(id).css('left', winW/2-$(id).width()/2);
 | 
			
		||||
	
 | 
			
		||||
//transition effect
 | 
			
		||||
$(id).fadeIn(2000); 	
 | 
			
		||||
	
 | 
			
		||||
//if close button is clicked
 | 
			
		||||
$('.window .close').click(function (e) {
 | 
			
		||||
//Cancel the link behavior
 | 
			
		||||
e.preventDefault();
 | 
			
		||||
 | 
			
		||||
$('#mask').hide();
 | 
			
		||||
$('.window').hide();
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
//if mask is clicked
 | 
			
		||||
$('#mask').click(function () {
 | 
			
		||||
$(this).hide();
 | 
			
		||||
$('.window').hide();
 | 
			
		||||
});
 | 
			
		||||
	
 | 
			
		||||
});
 | 
			
		||||
</script>
 | 
			
		||||
<body>
 | 
			
		||||
<div id="style">
 | 
			
		||||
<div class="innertube">
 | 
			
		||||
 | 
			
		||||
<?php include 'config.php';?>
 | 
			
		||||
<?php include 'http://home.k-world.me.uk/version.php';?>
 | 
			
		||||
 | 
			
		||||
<?php
 | 
			
		||||
if ($localversion != $version) {
 | 
			
		||||
    require "updatenotify.php";
 | 
			
		||||
 }
 | 
			
		||||
?>
 | 
			
		||||
 | 
			
		||||
<div id="header">
 | 
			
		||||
<?php echo "<p style=\" text-align: center;\">$yourname's Server Access</p>";?>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										9
									
								
								updatenotify.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								updatenotify.php
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,9 @@
 | 
			
		||||
<div id="boxes">
 | 
			
		||||
  <div id="dialog" class="window">
 | 
			
		||||
    New Update Available,
 | 
			
		||||
	
 | 
			
		||||
	Update via update.bat
 | 
			
		||||
    <div id="popupfoot"> <a href="#" class="close agree">Ok, Thank you :)</a></div>
 | 
			
		||||
  </div>
 | 
			
		||||
  <div id="mask"></div>
 | 
			
		||||
</div>
 | 
			
		||||
							
								
								
									
										4
									
								
								version.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								version.php
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,4 @@
 | 
			
		||||
<?php
 | 
			
		||||
//// KLANDING VERSION
 | 
			
		||||
$version = "1.1";  // 
 | 
			
		||||
?>
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user