OSDN Git Service

Small update to version checker.
[idb/iDB-Extras.git.git] / vercheck / index.php
1 <?php
2 /*
3     This program is free software; you can redistribute it and/or modify
4     it under the terms of the Revised BSD License.
5
6     This program is distributed in the hope that it will be useful,
7     but WITHOUT ANY WARRANTY; without even the implied warranty of
8     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
9     Revised BSD License for more details.
10
11     Copyright 2009-2011 iDB Support - http://idb.berlios.de/
12     Copyright 2009-2011 Game Maker 2k - http://gamemaker2k.org/
13
14     $FileInfo: index.php - Last Update: 08/02/2011 Ver 3.1.2 - Author: cooldude2k $
15 */
16 /* Change to your url. */
17 @ini_set("html_errors", false);
18 @ini_set("track_errors", false);
19 @ini_set("display_errors", false);
20 @ini_set("report_memleaks", false);
21 @ini_set("display_startup_errors", false);
22 //@ini_set("error_log","logs/error.log"); 
23 //@ini_set("log_errors","On"); 
24 @ini_set("docref_ext", "");
25 @ini_set("docref_root", "http://php.net/");
26 @ini_set("date.timezone","UTC"); 
27 @ini_set("default_mimetype","text/html");
28 @error_reporting(E_ALL ^ E_NOTICE);
29 @set_time_limit(30); @ignore_user_abort(true);
30 if(function_exists("date_default_timezone_set")) { 
31         @date_default_timezone_set("UTC"); }
32 function idb_output_handler($buffer) { return $buffer; }
33 @ob_start("idb_output_handler");
34 header("Cache-Control: private, no-cache, no-store, must-revalidate, pre-check=0, post-check=0, max-age=0");
35 header("Pragma: private, no-cache, no-store, must-revalidate, pre-check=0, post-check=0, max-age=0");
36 header("P3P: CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\"");
37 header("Date: ".gmdate("D, d M Y H:i:s")." GMT");
38 header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
39 header("Expires: ".gmdate("D, d M Y H:i:s")." GMT");
40 output_reset_rewrite_vars();
41 require_once('inc/killglobals.php');
42 $site_url = "http://localhost/vercheck/";
43 $agent_site_url = $site_url."?act=vercheck";
44 $site_name = "iDB Version checker";
45 $appname = "iDB VerCheck";
46 $download_url = $site_url."download.php";
47 $site_version = "3.1.2";
48 $ver_exp = explode(".",$site_version);
49 if(!isset($ver_exp[3])) { $ver_exp[3] = null; }
50 $appver = array($ver_exp[0],$ver_exp[1],$ver_exp[2],$ver_exp[3]);//Version of program
51 $csryear = "2004"; $cryear = date("Y"); if($cryear<=2004) { $cryear = "2005"; }
52 $site_useragent = "Mozilla/5.0 (compatible; iDB-VerCheck/".$site_version."; +".$agent_site_url.")";
53 // Programs to check for add to array.
54 // $iDBArray = array("RDB", "iDB", "iDB-Host", "iDBEH-Mod");//ReneeDB
55 $iDBArray = array("iDB", "iDB-Host", "iDBEH-Mod");
56 @ini_set("user_agent", $site_useragent);
57 if (function_exists("stream_context_create")) {
58 $opts = array(
59   'http' => array(
60     'method' => "GET",
61     'header' => "Accept-Language: *\r\n".
62                 "User-Agent: ".$site_useragent."\r\n".
63                 "Accept: */*\r\n".
64                 "Connection: keep-alive\r\n".
65                 "Referer: ".$agent_site_url."\r\n".
66                 "From: ".$agent_site_url."\r\n".
67                 "Via: ".$_SERVER['REMOTE_ADDR']."\r\n".
68                 "Forwarded: ".$_SERVER['REMOTE_ADDR']."\r\n".
69                 "X-Forwarded-For: ".$_SERVER['REMOTE_ADDR']."\r\n".
70                 "Client-IP: ".$_SERVER['REMOTE_ADDR']."\r\n"
71   )
72 );
73 $context = stream_context_create($opts); }
74 function version_info($proname,$subver,$ver,$supver,$reltype,$svnver,$showsvn) {
75         $return_var = $proname." ".$reltype." ".$subver.".".$ver.".".$supver;
76         if($showsvn==false) { $showsvn = null; }
77         if($showsvn==true) { $return_var .= " SVN ".$svnver; }
78         if($showsvn!=true&&$showsvn!=null) { $return_var .= " ".$showsvn." ".$svnver; }
79         return $return_var; }
80 $appversion = version_info($appname,$appver[0],$appver[1],$appver[2],$appver[3]." Ver.",null,false);
81 if(!isset($_GET['redirect'])) { $_GET['redirect'] = "off"; }
82     /**
83      * Returns true if $string is valid UTF-8 and false otherwise.
84      *
85      * @since        1.14
86      * @param [mixed] $string     string to be tested
87      * @subpackage
88      */
89     function is_utf8($string) {
90       
91         // From http://w3.org/International/questions/qa-forms-utf-8.html
92         return preg_match('%^(?:
93               [\x09\x0A\x0D\x20-\x7E]            # ASCII
94             | [\xC2-\xDF][\x80-\xBF]             # non-overlong 2-byte
95             |  \xE0[\xA0-\xBF][\x80-\xBF]        # excluding overlongs
96             | [\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}  # straight 3-byte
97             |  \xED[\x80-\x9F][\x80-\xBF]        # excluding surrogates
98             |  \xF0[\x90-\xBF][\x80-\xBF]{2}     # planes 1-3
99             | [\xF1-\xF3][\x80-\xBF]{3}          # planes 4-15
100             |  \xF4[\x80-\x8F][\x80-\xBF]{2}     # plane 16
101         )*$%xs', $string);
102       
103     } 
104   # Original PHP code by Chirp Internet: www.chirp.com.au
105   # Please acknowledge use of this code by including this header.
106
107   function robots_allowed($url, $useragent=false)
108   {
109         global $context;
110     # parse url to retrieve host and path
111     $parsed = parse_url($url);
112
113     $agents = array(preg_quote('*'));
114     if($useragent) $agents[] = preg_quote($useragent);
115     $agents = implode('|', $agents);
116
117     # location of robots.txt file
118     if (function_exists("stream_context_create")) {
119         $robotstxt = file_get_contents("http://{$parsed['host']}/robots.txt",false,$context);
120     } else {
121         $robotstxt = file_get_contents("http://{$parsed['host']}/robots.txt");
122     }
123     if(!$robotstxt) { return true; }
124
125     $rules = array();
126     $ruleapplies = false;
127     foreach($robotstxt as $line) {
128       # skip blank lines
129       if(!$line = trim($line)) continue;
130
131       # following rules only apply if User-agent matches $useragent or '*'
132       if(preg_match('/User-agent: (.*)/i', $line, $match)) {
133         $ruleapplies = preg_match("/($agents)/i", $match[1]);
134       }
135       if($ruleapplies && preg_match('/Disallow:(.*)/i', $line, $regs)) {
136         # an empty rule implies full access - no further tests required
137         if(!$regs[1]) return true;
138         # add rules that apply to array for testing
139         $rules[] = preg_quote(trim($regs[1]), '/');
140       }
141     }
142
143     foreach($rules as $rule) {
144       # check if page is disallowed to us
145       if(preg_match("/^$rule/", $parsed['path'])) return false;
146     }
147
148     # page is not disallowed
149     return true;
150   }
151 if(!isset($_SERVER['HTTP_USER_AGENT'])) {
152         $_SERVER['HTTP_USER_AGENT'] = null; }
153 if (stristr($_SERVER["HTTP_USER_AGENT"],"W3C_Validator")) {
154         $_SERVER["HTTP_ACCEPT"] = "application/xml"; }
155 if(!isset($_SERVER['HTTP_ACCEPT'])) {
156         $_SERVER['HTTP_ACCEPT'] = null; }
157 if(!isset($_SERVER['PATH_INFO'])) {
158         $_SERVER['PATH_INFO'] = null; }
159 if(!isset($_GET['vercheck'])) { $_GET['vercheck'] = null; }
160 if($_GET['redirect']=="js") {
161 header("Content-Type: application/javascript; charset=UTF-8"); }
162 if($_GET['redirect']=="xml") {
163 if (stristr($_SERVER["HTTP_USER_AGENT"],"W3C_Validator")) {
164         $_SERVER["HTTP_ACCEPT"] = "application/xml"; }
165 if(stristr($_SERVER["HTTP_ACCEPT"],"application/xml") ) {
166 header("Content-Type: application/xml; charset=UTF-8"); }
167 else { header("Content-Type: text/xml; charset=UTF-8"); } }
168 if(!isset($_GET['act'])) { $_GET['act'] = "vercheck"; }
169 if(isset($_GET['act'])&&$_GET['act']!="update") {
170 if(!isset($_GET['name'])&&!isset($_GET['bid'])) {
171 ?>
172 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
173    "http://www.w3.org/TR/html4/strict.dtd">
174 <html>
175 <head>
176 <title> <?php echo $site_name; ?> </title>
177 <meta http-equiv="content-language" content="en-US">
178 <meta http-equiv="content-type" content="text/html; charset=iso-8859-15">
179 <meta name="Generator" content="EditPlus">
180 <meta name="Author" content="Cool Dude 2k">
181 <meta name="Keywords" content="<?php echo $site_name; ?>">
182 <meta name="Description" content="<?php echo $site_name; ?>">
183 <meta name="ROBOTS" content="Index, FOLLOW">
184 <meta name="revisit-after" content="1 days">
185 <meta name="GOOGLEBOT" content="Index, FOLLOW">
186 <meta name="resource-type" content="document">
187 <meta name="distribution" content="global">
188 <link rel="icon" href="favicon.ico" type="image/icon">
189 <link rel="shortcut icon" href="favicon.ico" type="image/icon">
190 <!-- Katarzyna O_o -->
191 </head>
192
193 <body>
194 <!-- Renee Sabonis ^_^ -->
195 <form method="get" action="?act=vercheck&amp;vercheck=newtype&amp;encoded=false">
196 <div>
197 <input type="hidden" id="act" name="act" value="vercheck" />
198 <label for="bid">Insert board url:</label><br />
199 <input type="text" id="bid" name="bid" /><br />
200 <input type="hidden" id="vercheck" name="vercheck" value="newtype" />
201 <input type="hidden" id="encoded" name="encoded" value="false" />
202 <input type="submit" />
203 </div>
204 </form>
205
206 <div class="copyright"><br />Powered by <a href="http://idb.berlios.de/" title="iDB-VerCheck <?php echo $site_version; ?>" onclick="window.open(this.href);return false;">iDB VerCheck</a> &copy; <a href="http://idb.berlios.de/support/category.php?act=view&amp;id=2" title="Game Maker 2k" onclick="window.open(this.href);return false;">Game Maker 2k</a> @ <?php echo $csryear." - ".$cryear; ?></div>
207 <!-- Stephanie Braun o_O -->
208 </body>
209 </html>
210 <?php exit(); } }
211 if(isset($_GET['bid'])) {
212         if(!isset($_GET['encoded'])) { 
213                 $_GET['encoded'] = "true"; }
214         if($_GET['encoded']=="true") { 
215         $_GET['bid'] = @base64_decode($_GET['bid']); }
216         $_GET['bid'] = @urldecode($_GET['bid']);
217         $_GET['bid'] = @strip_tags($_GET['bid']);
218         if(robots_allowed($_GET['bid'],"iDB-VerCheck")===false) {
219                 echo "Error cannot prase this site. :P ";
220                 /* Then we cant prase this site now*/ exit(); die(); }
221         $ChkURL = parse_url($_GET['bid']);
222         $HostIP = gethostbyname($ChkURL['host']);
223         if($_GET['vercheck']=="newtype") {
224         $actchange = preg_quote("act=view", '/');
225         $_GET['bid'] = preg_replace("/".$actchange."/i", "act=versioninfo", $_GET['bid']);
226     if (function_exists("stream_context_create")) {
227         $GetTitle = file_get_contents($_GET['bid'],false,$context);
228     } else {
229         $GetTitle = file_get_contents($_GET['bid']);
230     } }
231         if($_GET['vercheck']!="newtype") {
232     if (function_exists("stream_context_create")) {
233         $GetTitle = file_get_contents($_GET['bid'],false,$context);
234     } else {
235         $GetTitle = file_get_contents($_GET['bid']);
236     } }
237         $_GET['bid'] = htmlspecialchars($_GET['bid']);
238         preg_match_all("/<title>(.*?)<\/title>/i", $GetTitle, $GetFullTitle);
239         $GetConType = $GetTitle;
240         $GetTitle = htmlspecialchars(strip_tags(trim($GetFullTitle[1][0]))); 
241         if($_GET['vercheck']=="newtype") {
242         $prequote1 = preg_quote("<charset>", '/');
243         $prequote2 = preg_quote("</charset>", '/'); }
244         if($_GET['vercheck']!="newtype") {
245         $prequote1 = preg_quote("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=", '/');
246         $prequote2 = preg_quote("\" />", '/'); }
247         preg_match_all("/".$prequote1."(.*?)".$prequote2."/i", $GetConType, $GetCType);
248         $prequote1 = preg_quote("<name>", '/');
249         $prequote2 = preg_quote("</name>", '/');
250         preg_match_all("/".$prequote1."(.*?)".$prequote2."/i", $GetConType, $GetVerNum);
251         if(!isset($GetVerNum[1][0])) { 
252         $prequote1 = preg_quote("<!-- generator=\"", '/');
253         $prequote2 = preg_quote("\" -->", '/');
254         preg_match_all("/".$prequote1."(.*?)".$prequote2."/i", $GetConType, $GetVerNum); }
255         if(!isset($GetVerNum[1][0])) { 
256         $prequote1 = preg_quote("<meta name=\"Generator\" content=\"", '/');
257         $prequote2 = preg_quote("\" />", '/');
258         preg_match_all("/".$prequote1."(.*?)".$prequote2."/i", $GetConType, $GetVerNum); }
259         if(!isset($GetVerNum[1][0])) { 
260         $prequote1 = preg_quote("<a href=\"http://idb.berlios.de/\" title=\"", '/');
261         $prequote2 = preg_quote("\" onclick=\"window.open(this.href);return false;\">", '/');
262         preg_match_all("/".$prequote1."(.*?)".$prequote2."/i", $GetConType, $GetVerNum); }
263         if(!isset($GetVerNum[1][0])) { $GetVerNum[1][0] = null; }
264         $GetVerNum = $GetVerNum[1][0];
265         $GetVerNum = preg_replace("/iDB EH Mod/i", "iDBEH-Mod", $GetVerNum);
266         $GetVerNum = preg_replace("/iDB EH/i", "iDB-Host", $GetVerNum);
267         $GetVerNum = preg_replace("/\s/i", "|", $GetVerNum);
268         if(!isset($_GET['name'])) { $_GET['name'] = $GetVerNum; }
269         if(!isset($GetCType[1][0])) {
270         if(is_utf8($GetTitle)==true) { $GetCType[1][0] = "UTF-8"; }
271         if(is_utf8($GetTitle)==false) { $GetCType[1][0] = "UTF-8"; 
272         $GetTitle = utf8_encode($GetTitle); }
273         $preq1 = preg_quote("&amp;#", '/');
274         $GetTitle = preg_replace("/".$preq1."(.*?);/isU","&#\\1;",$GetTitle);
275         $preq2 = preg_quote("&amp;#x", '/');
276         $GetTitle = preg_replace("/".$preq2."(.*?);/isU","&#x\\1;",$GetTitle);
277         if(!isset($GetCType[1][0])) { $GetCType[1][0] = null; }
278         $BoardLang = $GetCType[1][0];
279         if(isset($BoardLang)) {
280         if($BoardLang!="ISO-8859-15"&&$BoardLang!="ISO-8859-1"&&
281         $BoardLang!="UTF-8"&&$BoardLang!="CP866"&&
282         $BoardLang!="Windows-1251"&&$BoardLang!="Windows-1252"&&
283         $BoardLang!="KOI8-R"&&$BoardLang!="BIG5"&&
284         $BoardLang!="GB2312"&&$BoardLang!="BIG5-HKSCS"&&
285         $BoardLang!="Shift_JIS"&&$BoardLang!="EUC-JP") {
286         $BoardLang = "ISO-8859-15"; } }
287         $GetFullTitle = $GetTitle; } }
288 if(!isset($_GET['bid'])) { $_GET['bid'] = null; }
289 // Make the Query String if we are not useing &=
290 function qstring($qstr=";",$qsep="=")
291 { $_GET = null; $_GET = array();
292 if (!isset($_SERVER['QUERY_STRING'])) {
293 $_SERVER['QUERY_STRING'] = getenv('QUERY_STRING'); }
294 @ini_get("arg_separator.input", $qstr);
295 $_SERVER['QUERY_STRING'] = urldecode($_SERVER['QUERY_STRING']);
296 $preqs = explode($qstr,$_SERVER["QUERY_STRING"]);
297 $qsnum = count($preqs); $qsi = 0;
298 while ($qsi < $qsnum) {
299 $preqst = explode($qsep,$preqs[$qsi],2);
300 $fix1 = array(" ",'$'); $fix2  = array("_","_");
301 $preqst[0] = str_replace($fix1, $fix2, $preqst[0]);
302 $preqst[0] = killbadvars($preqst[0]);
303 if($preqst[0]!=null) {
304 $_GET[$preqst[0]] = $preqst[1]; }
305 ++$qsi; } return true; }
306 if($_SERVER['PATH_INFO']==null) {
307         if(@getenv('PATH_INFO')!=null&&@getenv('PATH_INFO')!="1") {
308 $_SERVER['PATH_INFO'] = @getenv('PATH_INFO'); }
309 if(@getenv('PATH_INFO')==null) {
310 $myscript = $_SERVER["SCRIPT_NAME"];
311 $myphpath = $_SERVER["PHP_SELF"];
312 $mypathinfo = str_replace($myscript, "", $myphpath);
313 @putenv("PATH_INFO=".$mypathinfo); } }
314 // Change Path info to Get Vars :
315 function mrstring() {
316 $urlvar = explode('/',$_SERVER['PATH_INFO']);
317 $num=count($urlvar); $i=1;
318 while ($i < $num) {
319 //$urlvar[$i] = urldecode($urlvar[$i]);
320 if(!isset($_GET[$urlvar[$i]])) { $_GET[$urlvar[$i]] = null; }
321 if(!isset($urlvar[$i])) { $urlvar[$i] = null; }
322 if($_GET[$urlvar[$i]]==null&&$urlvar[$i]!=null) {
323 $fix1 = array(" ",'$'); $fix2  = array("_","_");
324 $urlvar[$i] = str_replace($fix1, $fix2, $urlvar[$i]);
325 $urlvar[$i] = killbadvars($urlvar[$i]);
326         $_GET[$urlvar[$i]] = $urlvar[$i+1]; }
327 ++$i; ++$i; } return true; }
328 // Redirect to another file with ether timed or nontimed redirect
329 function redirect($type,$file,$time=0,$url=null,$dbsr=true) {
330 if($type!="location"&&$type!="refresh") { $type=="location"; }
331 if($url!=null) { $file = $url.$file; }
332 if($dbsr===true) { $file = str_replace("//", "/", $file); }
333 if($type=="refresh") { header("Refresh: ".$time."; URL=".$file); }
334 if($type=="location") { @session_write_close(); 
335 header("Location: ".$file); } return true; }
336 function redirects($type,$url,$time=0) {
337 if($type!="location"&&$type!="refresh") { $type=="location"; }
338 if($type=="refresh") { header("Refresh: ".$time."; URL=".$url); }
339 if($type=="location") { header("Location: ".$url); } return true; }
340 // Make xhtml tags
341 function html_tag_make($name="br",$emptytag=true,$attbvar=null,$attbval=null,$extratest=null) {
342         $var_num = count($attbvar); $value_num = count($attbval);
343         if($var_num!=$value_num) { 
344                 echo "Erorr Number of Var and Values dont match!";
345         return false; } $i = 0;
346         while ($i < $var_num) {
347         if($i==0) { $mytag = "<".$name." ".$attbvar[$i]."=\"".$attbval[$i]."\""; }
348         if($i>=1) { $mytag = $mytag." ".$attbvar[$i]."=\"".$attbval[$i]."\""; }
349         if($i==$var_num-1) { 
350         if($emptytag===false) { $mytag = $mytag.">"; }
351         if($emptytag===true) { $mytag = $mytag." />"; } }       ++$i; }
352         if($attbvar==null&&$attbval==null) { $mytag = "<".$name;
353         if($emptytag===true) { $mytag = $mytag." />"; }
354         if($emptytag===false) { $mytag = $mytag.">"; } }
355         if($emptytag===false&&$extratest!=null) { 
356         $mytag = $mytag.$extratest; $mytag = $mytag."</".$name.">"; } 
357         return $mytag; }
358 // Start a xml document
359 function xml_tag_make($type,$attbs,$retval=false) {
360         $renee1 = explode("&",$attbs);
361         $reneenum=count($renee1);
362         $reneei=0; $attblist = null;
363         while ($reneei < $reneenum) {
364         $renee2 = explode("=",$renee1[$reneei]);
365         if($renee2[0]!=null||$renee2[1]!=null) {
366         $attblist = $attblist.' '.$renee2[0].'="'.$renee2[1].'"'; }
367         ++$reneei; }
368         if($retval!==false&&$retval!==true) { $retval=false; }
369         if($retval===false) {
370         echo '<?'.$type.$attblist.'?>'."\n"; }
371         if($retval===true) {
372         return '<?'.$type.$attblist.'?>'."\n"; } }
373 // Start a xml document (old version)
374 function xml_doc_start($ver,$encode,$retval=false) {
375         if($retval===false) {
376         echo xml_tag_make('xml','version='.$ver.'&encoding='.$encode,true); }
377         if($retval===true) {
378         return xml_tag_make('xml','version='.$ver.'&encoding='.$encode,true); } }
379 if($_GET['redirect']!="on"&&$_GET['redirect']!="xml"&&$_GET['redirect']!="js") {
380 ?>
381 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
382    "http://www.w3.org/TR/html4/strict.dtd">
383 <html>
384 <head>
385 <?php if(isset($GetFullTitle)) { ?>
386 <title> <?php echo $site_name; ?> - Checking <?php echo $GetFullTitle; ?> </title>
387 <?php } if(!isset($GetFullTitle)) { ?>
388 <title> <?php echo $site_name; ?> </title>
389 <?php } ?>
390 <meta http-equiv="content-language" content="en-US">
391 <?php if(isset($BoardLang)) { ?>
392 <meta http-equiv="content-type" content="text/html; charset=<?php echo $BoardLang; ?>">
393 <?php } if(!isset($BoardLang)) { ?>
394 <meta http-equiv="content-type" content="text/html; charset=iso-8859-15">
395 <?php } ?>
396 <meta name="Generator" content="EditPlus">
397 <meta name="Author" content="Cool Dude 2k">
398 <meta name="Keywords" content="<?php echo $site_name; ?>">
399 <meta name="Description" content="<?php echo $site_name; ?>">
400 <meta name="ROBOTS" content="Index, FOLLOW">
401 <meta name="revisit-after" content="1 days">
402 <meta name="GOOGLEBOT" content="Index, FOLLOW">
403 <meta name="resource-type" content="document">
404 <meta name="distribution" content="global">
405 <link rel="icon" href="favicon.ico" type="image/icon">
406 <link rel="shortcut icon" href="favicon.ico" type="image/icon">
407 <!-- Katarzyna O_o -->
408 </head>
409
410 <body>
411 <!-- Renee Sabonis ^_^ -->
412 <?php }
413 if(!isset($_GET['act'])) { $_GET['act'] = null; }
414 if(!isset($_GET['redirect'])) { $_GET['redirect'] = null; }
415 if(isset($_GET['act'])&&$_GET['act']=="update") {
416 if (function_exists("stream_context_create")) {
417     $GetNewVersion = file_get_contents("http://sourceforge.jp/projects/idb/releases/",false,$context);
418 } else {
419     $GetNewVersion = file_get_contents("http://sourceforge.jp/projects/idb/releases/");
420 }
421 preg_match_all("/([0-9])\.([0-9])\.([0-9]) ([A-Za-z]+) SVN ([0-9]+)\<\/a\>/isU", $GetNewVersion, $NewVersionPart);
422 $NewSVNPart = $NewVersionPart[5][0];
423 if (function_exists("stream_context_create")) {
424     $GetSVNVersion = file_get_contents("http://sourceforge.net/p/intdb/svn/".$NewSVNPart."/tree/trunk/inc/versioninfo.php?format=raw",false,$context);
425 } else {
426     $GetSVNVersion = file_get_contents("http://sourceforge.net/p/intdb/svn/".$NewSVNPart."/tree/trunk/inc/versioninfo.php?format=raw");
427
428 $newver['subver'] = $NewSVNPart;
429 $prepreg1 = preg_quote("\$VER1[0] = ","/"); 
430 $prepreg2 = preg_quote(";","/");
431 preg_match_all("/".$prepreg1."(.*)".$prepreg2."{1}/isU", $GetSVNVersion, $GetVer0);
432 $GetVer0 = $GetVer0[1][0];
433 $prepreg1 = preg_quote("\$VER1[1] = ","/"); 
434 $prepreg2 = preg_quote(";","/");
435 preg_match_all("/".$prepreg1."(.*)".$prepreg2."{1}/isU", $GetSVNVersion, $GetVer1);
436 $GetVer1 = $GetVer1[1][0];
437 $prepreg1 = preg_quote("\$VER1[2] = ","/"); 
438 $prepreg2 = preg_quote(";","/");
439 preg_match_all("/".$prepreg1."(.*)".$prepreg2."{1}/isU", $GetSVNVersion, $GetVer2);
440 $GetVer2 = $GetVer2[1][0];
441 $newver['ver'] = $GetVer0.".".$GetVer1.".".$GetVer2;
442 $prepreg1 = preg_quote("\$VER2[0] = \"","/"); 
443 $prepreg2 = preg_quote("\";","/");
444 preg_match_all("/".$prepreg1."(.*)".$prepreg2."{1}/isU", $GetSVNVersion, $GetFullVerType);
445 $newver['fullreltype'] = $GetFullVerType[1][0];
446 $prepreg1 = preg_quote("\$VER2[1] = \"","/"); 
447 $prepreg2 = preg_quote("\";","/");
448 preg_match_all("/".$prepreg1."(.*)".$prepreg2."{1}/isU", $GetSVNVersion, $GetVerType);
449 $newver['reltype'] = $GetVerType[1][0];
450 $prepreg1 = preg_quote("\$VER2[2] = \"","/"); 
451 $prepreg2 = preg_quote("\";","/");
452 preg_match_all("/".$prepreg1."(.*)".$prepreg2."{1}/isU", $GetSVNVersion, $GetVerSubType);
453 $newver['subtype'] = $GetVerSubType[1][0];
454 echo "Sorry need more info to check version.";
455 $VersionXML = xml_doc_start("1.0","UTF-8",true);
456 $VersionXML .= xml_tag_make("xml-stylesheet","type=text/xsl&href=version.xsl",true)."\n";
457 $VersionXML .= "<!DOCTYPE versioninfo [\n";
458 $VersionXML .= "<!ELEMENT versioninfo (version*)>\n";
459 $VersionXML .= "<!ELEMENT version (relname,reltype,reltypename,relnum,subtype,relsvnum,fullrel,fullname)>\n";
460 $VersionXML .= "<!ELEMENT relname (#PCDATA)>\n";
461 $VersionXML .= "<!ELEMENT reltype (#PCDATA)>\n";
462 $VersionXML .= "<!ELEMENT reltypename (#PCDATA)>\n";
463 $VersionXML .= "<!ELEMENT relnum (#PCDATA)>\n";
464 $VersionXML .= "<!ELEMENT subtype (#PCDATA)>\n";
465 $VersionXML .= "<!ELEMENT relsvnum (#PCDATA)>\n";
466 $VersionXML .= "<!ELEMENT fullrel (#PCDATA)>\n";
467 $VersionXML .= "<!ELEMENT fullname (#PCDATA)>\n";
468 $VersionXML .= "]>\n\n";
469 $VersionXML .= "<versioninfo>\n\n";
470 $VersionXML .= "<version>\n";
471 $VersionXML .= "<relname>iDB</relname>\n";
472 $VersionXML .= "<reltype>".$newver['reltype']."</reltype>\n";
473 $VersionXML .= "<reltypename>".$newver['fullreltype']."</reltypename>\n";
474 $VersionXML .= "<relnum>".$newver['ver']."</relnum>\n";
475 $VersionXML .= "<subtype>".$newver['subtype']."</subtype>\n";
476 $VersionXML .= "<relsvnum>".$newver['subver']."</relsvnum>\n";
477 $VersionXML .= "<fullrel>iDB ".$newver['reltype']." ".$newver['ver']."</fullrel>\n";
478 $VersionXML .= "<fullname>iDB ".$newver['reltype']." ".$newver['ver']." ".$newver['subtype']." ".$newver['subver']."</fullname>\n";
479 $VersionXML .= "</version>\n\n";
480 $VersionXML .= "<version>\n";
481 $VersionXML .= "<relname>iDB-Host</relname>\n";
482 $VersionXML .= "<reltype>".$newver['reltype']."</reltype>\n";
483 $VersionXML .= "<reltypename>".$newver['fullreltype']."</reltypename>\n";
484 $VersionXML .= "<relnum>".$newver['ver']."</relnum>\n";
485 $VersionXML .= "<subtype>".$newver['subtype']."</subtype>\n";
486 $VersionXML .= "<relsvnum>".$newver['subver']."</relsvnum>\n";
487 $VersionXML .= "<fullrel>iDB-Host ".$newver['reltype']." ".$newver['ver']."</fullrel>\n";
488 $VersionXML .= "<fullname>iDB-Host ".$newver['reltype']." ".$newver['ver']." ".$newver['subtype']." ".$newver['subver']."</fullname>\n";
489 $VersionXML .= "</version>\n\n";
490 $VersionXML .= "<version>\n";
491 $VersionXML .= "<relname>iDBEH-Mod</relname>\n";
492 $VersionXML .= "<reltype>".$newver['reltype']."</reltype>\n";
493 $VersionXML .= "<reltypename>".$newver['fullreltype']."</reltypename>\n";
494 $VersionXML .= "<relnum>".$newver['ver']."</relnum>\n";
495 $VersionXML .= "<subtype>".$newver['subtype']."</subtype>\n";
496 $VersionXML .= "<relsvnum>".$newver['subver']."</relsvnum>\n";
497 $VersionXML .= "<fullrel>iDBEH-Mod ".$newver['reltype']." ".$newver['ver']."</fullrel>\n";
498 $VersionXML .= "<fullname>iDBEH-Mod ".$newver['reltype']." ".$newver['ver']." ".$newver['subtype']." ".$newver['subver']."</fullname>\n";
499 $VersionXML .= "</version>\n\n";
500 $VersionXML .= "</versioninfo>";
501 $fp = fopen("./inc/version.xml","w+");
502 fwrite($fp, $VersionXML);
503 fclose($fp); }
504
505 if($_GET['act']!="update") {
506 $VersionFile = file_get_contents("inc/version.xml");
507 if(!isset($iDBArray)) {
508 $iDBArray = array("iDB", "iDB-Host", "iDBEH-Mod"); }
509 $NamePart = explode("|", $_GET['name']);
510 if(count($NamePart)>=5) { 
511 $_GET['name'] = $NamePart[0];
512 if(!isset($_GET['reltype'])&&isset($NamePart[1])) {
513         $_GET['reltype'] = $NamePart[1]; }
514 if(!isset($_GET['ver'])&&isset($NamePart[2])) {
515         $_GET['ver'] = $NamePart[2]; }
516 if(!isset($_GET['subtype'])&&isset($NamePart[3])) {
517         $_GET['subtype'] = $NamePart[3]; }
518 if(!isset($_GET['subver'])&&isset($NamePart[4])) {
519         $_GET['subver'] = $NamePart[4]; } }
520 if(count($NamePart)<5&&count($NamePart)!=1) { 
521 if(!isset($_GET['name'])||!isset($_GET['reltype'])||!isset($_GET['ver'])||
522         !isset($_GET['subtype'])||!isset($_GET['subver'])) {
523         echo "Sorry need more info to check version."; ?>
524
525 <div class="copyright"><br />Powered by <a href="http://idb.berlios.de/" title="iDB-VerCheck <?php echo $site_version; ?>" onclick="window.open(this.href);return false;">iDB VerCheck</a> &copy; <a href="http://idb.berlios.de/support/category.php?act=view&amp;id=2" title="Game Maker 2k" onclick="window.open(this.href);return false;">Game Maker 2k</a> @ <?php echo $csryear." - ".$cryear; ?></div>
526 <!-- Stephanie Braun o_O -->
527 </body>
528 </html>
529 <?php exit(); } }
530 if(!isset($_GET['name'])||!isset($_GET['reltype'])||!isset($_GET['ver'])||
531         !isset($_GET['subtype'])||!isset($_GET['subver'])) {
532         echo "Sorry need more info to check version."; ?>
533 <?php exit(); }
534 if(count($NamePart)==1) { $_GET['name'] = $NamePart[0]; }
535 if(!in_array($_GET['name'],$iDBArray)) { echo "Sorry cound not find ".$_GET['name']."."; ?>
536
537 <div class="copyright"><br />Powered by <a href="http://idb.berlios.de/" title="iDB-VerCheck <?php echo $site_version; ?>" onclick="window.open(this.href);return false;">iDB VerCheck</a> &copy; <a href="http://idb.berlios.de/support/category.php?act=view&amp;id=2" title="Game Maker 2k" onclick="window.open(this.href);return false;">Game Maker 2k</a> @ <?php echo $csryear." - ".$cryear; ?></div>
538 </body>
539 </html>
540 <?php exit(); }
541 $VerSplit = explode(".", $_GET['ver']);
542 if(count($VerSplit)>3||count($VerSplit)<3) { 
543 echo "Sorry version number is not formated right"; exit(); }
544 preg_match_all("/([a-zA-Z]+)([0-9]+)/i", $_GET['reltype'], $reltypeChCk);
545 if(isset($reltypeChCk[0][0])) {
546 $_GET['reltype'] = $reltypeChCk[1][0];
547 $uvercheck['reltypex'] = $reltypeChCk[2][0]; }
548 if(!isset($reltypeChCk[0][0])) {
549 preg_match_all("/([a-zA-Z]+)/i", $_GET['reltype'], $reltypeChCk); 
550 $_GET['reltype'] = $reltypeChCk[1][0];
551 $uvercheck['reltypex'] = "0"; }
552 /*
553 PA (Pre-Alpha) = 100
554 A - Al (Alpha) = 200
555 PB (Pre-Beta) = 300
556 B - Be (Beta) = 400
557 G - Ga (Gamma) = 500
558 D - De (Delta) = 600
559 O - Om (Omega) = 700
560 Z - Ze (Zenith) = 800
561 R - RC (Release Candidate) = 900
562 F - FR (Final Release) = 950
563 */
564 // Pre-Alpha
565 if($_GET['reltype']=="PA") {
566         $uvercheck['reltypenum'] = 100 + $uvercheck['reltypex']; }
567 // Alpha
568 if($_GET['reltype']=="A"||
569         $_GET['reltype']=="Al") {
570         $uvercheck['reltypenum'] = 200 + $uvercheck['reltypex']; }
571 // Pre-Beta
572 if($_GET['reltype']=="PB") {
573         $uvercheck['reltypenum'] = 300 + $uvercheck['reltypex']; }
574 // Beta
575 if($_GET['reltype']=="B"||
576         $_GET['reltype']=="Be") {
577         $uvercheck['reltypenum'] = 400 + $uvercheck['reltypex']; }
578 // Gamma
579 if($_GET['reltype']=="G"||
580         $_GET['reltype']=="Ga") {
581         $uvercheck['reltypenum'] = 500 + $uvercheck['reltypex']; }
582 // Delta
583 if($_GET['reltype']=="D"||
584         $_GET['reltype']=="De") {
585         $uvercheck['reltypenum'] = 600 + $uvercheck['reltypex']; }
586 // Omega
587 if($_GET['reltype']=="O"||
588         $_GET['reltype']=="Om") {
589         $uvercheck['reltypenum'] = 700 + $uvercheck['reltypex']; }
590 // Zenith
591 if($_GET['reltype']=="Z"||
592         $_GET['reltype']=="Ze") {
593         $uvercheck['reltypenum'] = 800 + $uvercheck['reltypex']; }
594 // Release Candidate
595 if($_GET['reltype']=="R"||
596         $_GET['reltype']=="RC") {
597         $uvercheck['reltypenum'] = 900 + $uvercheck['reltypex']; }
598 // Final Release
599 if($_GET['reltype']=="F"||
600         $_GET['reltype']=="FR") {
601         $uvercheck['reltypenum'] = 950 + $uvercheck['reltypex']; }
602 if($uvercheck['reltypex']!=0) {
603         $_GET['reltype'] = $_GET['reltype'].$uvercheck['reltypex']; }
604 $FullRelNum = $VerSplit[0].$VerSplit[1].$VerSplit[2].".".$uvercheck['reltypenum'].$_GET['subver'];
605 $prepreg1 = preg_quote("<version>\n<relname>".$_GET['name']."</relname>","/"); 
606 $prepreg2 = preg_quote("</version>","/");
607 preg_match_all("/".$prepreg1."(.*)".$prepreg2."{1}/isU", $VersionFile, $VersionPart);
608 $VersionPart = $VersionPart[0][0];
609 $prepreg1 = preg_quote("<relname>","/"); 
610 $prepreg2 = preg_quote("</relname>","/");
611 preg_match_all("/".$prepreg1."(.*)".$prepreg2."{1}/isU", $VersionPart, $NamePart);
612 $vercheck['name'] = $NamePart[1][0];
613 $prepreg1 = preg_quote("<reltype>","/"); 
614 $prepreg2 = preg_quote("</reltype>","/");
615 preg_match_all("/".$prepreg1."(.*)".$prepreg2."{1}/isU", $VersionPart, $RelTypePart);
616 $vercheck['reltype'] = $RelTypePart[1][0];
617 preg_match_all("/([a-zA-Z]+)([0-9]+)/i", $vercheck['reltype'], $reltypeChCk);
618 if(isset($reltypeChCk[0][0])) {
619 $vercheck['reltype'] = $reltypeChCk[1][0];
620 $vercheck['reltypex'] = $reltypeChCk[2][0]; }
621 if(!isset($reltypeChCk[0][0])) {
622 preg_match_all("/([a-zA-Z]+)/i", $vercheck['reltype'], $reltypeChCk); 
623 $vercheck['reltype'] = $reltypeChCk[1][0];
624 $vercheck['reltypex'] = "0"; }
625 /*
626 PA (Pre-Alpha) = 100
627 A - Al (Alpha) = 200
628 PB (Pre-Beta) = 300
629 B - Be (Beta) = 400
630 G - Ga (Gamma) = 500
631 D - De (Delta) = 600
632 O - Om (Omega) = 700
633 Z - Ze (Zenith) = 800
634 R - RC (Release Candidate) = 900
635 F - FR (Final Release) = 950
636 */
637 // Pre-Alpha
638 if($vercheck['reltype']=="PA") {
639         $vercheck['reltypenum'] = 100 + $vercheck['reltypex']; }
640 // Alpha
641 if($vercheck['reltype']=="A"||
642         $vercheck['reltype']=="Al") {
643         $vercheck['reltypenum'] = 200 + $vercheck['reltypex']; }
644 // Pre-Beta
645 if($vercheck['reltype']=="PB") {
646         $vercheck['reltypenum'] = 300 + $vercheck['reltypex']; }
647 // Beta
648 if($vercheck['reltype']=="B"||
649         $vercheck['reltype']=="Be") {
650         $vercheck['reltypenum'] = 400 + $vercheck['reltypex']; }
651 // Gamma
652 if($vercheck['reltype']=="G"||
653         $vercheck['reltype']=="Ga") {
654         $vercheck['reltypenum'] = 500 + $vercheck['reltypex']; }
655 // Delta
656 if($vercheck['reltype']=="D"||
657         $vercheck['reltype']=="De") {
658         $vercheck['reltypenum'] = 600 + $vercheck['reltypex']; }
659 // Omega
660 if($vercheck['reltype']=="O"||
661         $vercheck['reltype']=="Om") {
662         $vercheck['reltypenum'] = 700 + $vercheck['reltypex']; }
663 // Zenith
664 if($vercheck['reltype']=="Z"||
665         $vercheck['reltype']=="Ze") {
666         $vercheck['reltypenum'] = 800 + $vercheck['reltypex']; }
667 // Release Candidate
668 if($vercheck['reltype']=="R"||
669         $vercheck['reltype']=="RC") {
670         $vercheck['reltypenum'] = 900 + $vercheck['reltypex']; }
671 // Final Release
672 if($vercheck['reltype']=="F"||
673         $vercheck['reltype']=="FR") {
674         $vercheck['reltypenum'] = 950 + $vercheck['reltypex']; }
675 if($vercheck['reltypex']!=0) {
676         $vercheck['reltype'] = $vercheck['reltype'].$vercheck['reltypex']; }
677 $prepreg1 = preg_quote("<relnum>","/"); 
678 $prepreg2 = preg_quote("</relnum>","/");
679 preg_match_all("/".$prepreg1."(.*)".$prepreg2."{1}/isU", $VersionPart, $RelNumPart);
680 $vercheck['ver'] = $RelNumPart[1][0];
681 $MyVerSplit = explode(".", $vercheck['ver']);
682 $prepreg1 = preg_quote("<subtype>","/"); 
683 $prepreg2 = preg_quote("</subtype>","/");
684 preg_match_all("/".$prepreg1."(.*)".$prepreg2."{1}/isU", $VersionPart, $SubTypePart);
685 $vercheck['subtype'] = $SubTypePart[1][0];
686 $prepreg1 = preg_quote("<relsvnum>","/"); 
687 $prepreg2 = preg_quote("</relsvnum>","/");
688 preg_match_all("/".$prepreg1."(.*)".$prepreg2."{1}/isU", $VersionPart, $RelSVNumPart);
689 $vercheck['subver'] = $RelSVNumPart[1][0];
690 $MyFullRelNum = $MyVerSplit[0].$MyVerSplit[1].$MyVerSplit[2].".".$vercheck['reltypenum'].$vercheck['subver'];
691 $DownloadLink = "<a href=\"".$download_url."\">".$download_url."</a>";
692 if($_GET['redirect']!="on"&&$_GET['redirect']!="xml"&&$_GET['redirect']!="js") {
693 echo "<div>"; }
694 $actchange = preg_quote("act=versioninfo", '/');
695 $_GET['bid'] = preg_replace("/".$actchange."/i", "act=view", $_GET['bid']);
696 if($_GET['redirect']=="xml") {
697 $VersionXML = xml_doc_start("1.0","UTF-8",true);
698 $VersionXML .= "<!DOCTYPE versioninfo [\n";
699 $VersionXML .= "<!ELEMENT versioninfo (version*)>\n";
700 $VersionXML .= "<!ELEMENT version (reltype,relnum,subtype,relsvnum,results)>\n";
701 $VersionXML .= "<!ELEMENT reltype (#PCDATA)>\n";
702 $VersionXML .= "<!ELEMENT relnum (#PCDATA)>\n";
703 $VersionXML .= "<!ELEMENT subtype (#PCDATA)>\n";
704 $VersionXML .= "<!ELEMENT relsvnum (#PCDATA)>\n";
705 $VersionXML .= "<!ELEMENT results (#PCDATA)>\n";
706 $VersionXML .= "<!ENTITY nbsp \" \">\n";
707 $VersionXML .= "]>\n\n";
708 $VersionXML .= "<versioninfo>\n\n";
709 $VersionXML .= "<version>\n";
710 $VersionXML .= "<reltype>".$vercheck['reltype']."</reltype>\n";
711 $VersionXML .= "<relnum>".$vercheck['ver']."</relnum>\n";
712 $VersionXML .= "<subtype>".$vercheck['subtype']."</subtype>\n";
713 $VersionXML .= "<relsvnum>".$vercheck['subver']."</relsvnum>\n";
714 if($FullRelNum<$MyFullRelNum) {
715 $VersionXML .= "<results><![CDATA[\n<img src=\"".$site_url."inc/pics/old.png\" alt=\"You seem to be using a old version.\" title=\"You seem to be using a old version.\" />&nbsp;Warning: A new version is available. <a href=\"".$download_url."\">Click Here</a>\n]]></results>\n"; }
716 if($FullRelNum==$MyFullRelNum) {
717 $VersionXML .= "<results><![CDATA[\n<img src=\"".$site_url."inc/pics/new.png\" alt=\"Congratulations you have the newest version. ^_^ \" title=\"Congratulations you have the newest version. ^_^ \" />&nbsp;Congratulates: You have the latest version.\n]]></results>\n"; }
718 if($FullRelNum>$MyFullRelNum) {
719 $VersionXML .= "<results><![CDATA[\n<img src=\"".$site_url."inc/pics/beta.png\" alt=\"You seem to be using a nightly version.\" title=\"You seem to be using a nightly version.\" />&nbsp;Warning: You seem to be using a nightly version. <a href=\"".$download_url."\">Click Here</a> for latest version.\n]]></results>\n"; }
720 $VersionXML .= "</version>\n\n";
721 $VersionXML .= "</versioninfo>"; 
722 echo $VersionXML; }
723 if($_GET['redirect']=="js") {
724 $VersionJS = "function idbvercheck() \n{ \n";
725 $VersionJS .= "document.getElementById('iverinfo').style.display = '';\n";
726 $VersionJS .= "var vercheckinfo = 'Version Check info below: <br />';\n";
727 $VersionJS .= "var yourverinfo = 'Your Version: ".$_GET['name']." ".$_GET['reltype']." ".$_GET['ver']." ".$_GET['subtype']." ".$_GET['subver']."';\n";
728 $VersionJS .= "var myverinfo = 'Current Version: ".$vercheck['name']." ".$vercheck['reltype']." ".$vercheck['ver']." ".$vercheck['subtype']." ".$vercheck['subver']."<br />';\n";
729 $VersionJS .= "var ourverinfo = yourverinfo+'<br />'+myverinfo;\n";
730 if($_GET['bid']!==null) {
731 $VersionJS .= "var checkingsite = 'Checking board: <a href=\"".$_GET['bid']."\" title=\"".$GetTitle."\">".$GetTitle."<\/a><br />';\n"; }
732 if($_GET['bid']===null) {
733 $VersionJS .= "var checkingsite = '';\n"; }
734 $VersionJS .= "var copyright = '<br \/>Powered by <a href=\"http://idb.berlios.de/\" title=\"iDB-VerCheck ".$site_version."\" onclick=\"window.open(this.href);return false;\">iDB VerCheck</a> &#169; <a href=\"http://idb.berlios.de/support/category.php?act=view&amp;id=2\" title=\"Game Maker 2k\" onclick=\"window.open(this.href);return false;\">Game Maker 2k<\/a> @ ".$csryear." - ".$cryear."';\n";
735 if($FullRelNum<$MyFullRelNum) {
736 $VersionJS .= "document.getElementById('iverinfo').innerHTML = vercheckinfo+'<img src=\"".$site_url."inc/pics/old.png\" alt=\"You seem to be using a old version.\" title=\"You seem to be using a old version.\" />&#160;Warning: A new version is available. <a href=\"".$download_url."\">Click Here<\/a><br />'+ourverinfo+checkingsite+'<br />';"; }
737 if($FullRelNum==$MyFullRelNum) {
738 $VersionJS .= "document.getElementById('iverinfo').innerHTML = vercheckinfo+'<img src=\"".$site_url."inc/pics/new.png\" alt=\"Congratulations you have the newest version. ^_^ \" title=\"Congratulations you have the newest version. ^_^ \" />&#160;Congratulates: You have the latest version.<br />'+ourverinfo+checkingsite+copyright+'<br />';"; }
739 if($FullRelNum>$MyFullRelNum) {
740 $VersionJS .= "document.getElementById('iverinfo').innerHTML = vercheckinfo+'<img src=\"".$site_url."inc/pics/beta.png\" alt=\"You seem to be using a nightly version.\" title=\"You seem to be using a nightly version.\" \/>&#160;Warning: You seem to be using a nightly version. <br /><a href=\"".$download_url."\">Click Here</a> for latest version.<br \/>'+ourverinfo+checkingsite+copyright+'<br />';"; }
741 $VersionJS .= "\n} ";
742 echo $VersionJS; }
743 if($_GET['redirect']=="on") { 
744 if($FullRelNum<$MyFullRelNum) {
745 redirect("location","old.png",FALSE,$site_url."inc/pics/",FALSE); }
746 if($FullRelNum==$MyFullRelNum) {
747 redirect("location","new.png",FALSE,$site_url."inc/pics/",FALSE); }
748 if($FullRelNum>$MyFullRelNum) {
749 redirect("location","beta.png",FALSE,$site_url."inc/pics/",FALSE); } }
750 if($_GET['redirect']!="on"&&$_GET['redirect']!="xml"&&$_GET['redirect']!="js") {
751 if($FullRelNum<$MyFullRelNum) { echo "You seem to be using a old version.\n<br />Goto link below to download new version.\n<br />".$DownloadLink; }
752 if($FullRelNum==$MyFullRelNum) { echo "Congratulations you have the newest version. ^_^ \n<br />You dont need to do anything for now."; }
753 if($FullRelNum>$MyFullRelNum) { echo "You seem to be using a nightly version.\n<br />Rember these version are not as stable as the Current Version.\n<br />"; 
754 echo "Goto link below to download latest version.\n<br />".$DownloadLink; }
755 echo "\n<br />\n<br />";
756 echo "Your Version: ".$_GET['name']." ".$_GET['reltype']." ".$_GET['ver']." ".$_GET['subtype']." ".$_GET['subver'];
757 echo "\n<br />";
758 echo "Current Version: ".$vercheck['name']." ".$vercheck['reltype']." ".$vercheck['ver']." ".$vercheck['subtype']." ".$vercheck['subver'];
759 if($_GET['bid']!=null) {
760 echo "\n<br />Checking board: <a href=\"".$_GET['bid']."\" title=\"".$GetTitle."\">".$GetTitle."</a>"; }
761 echo "</div>"; } }
762 if($_GET['redirect']!="on"&&$_GET['redirect']!="xml"&&$_GET['redirect']!="js") {
763 ?>
764
765 <div class="copyright"><br />Powered by <a href="http://idb.berlios.de/" title="iDB-VerCheck <?php echo $site_version; ?>" onclick="window.open(this.href);return false;">iDB VerCheck</a> &copy; <a href="http://idb.berlios.de/support/category.php?act=view&amp;id=2" title="Game Maker 2k" onclick="window.open(this.href);return false;">Game Maker 2k</a> @ <?php echo $csryear." - ".$cryear; ?></div>
766 <!-- Stephanie Braun o_O -->
767 </body>
768 </html>
769 <?php } ?>