--- /dev/null
+ RewriteEngine on
+ RewriteBase /functions/
+ #RewriteRule codesrc(.*) index.php$1
--- /dev/null
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+ Revised BSD License
+
+Copyright (c) 2004-2011 Game Maker 2k.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the distribution.
+
+ 3. Neither the name of Game Maker 2k nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGE.
+
+The views and conclusions contained in the software and documentation are those of the
+authors and should not be interpreted as representing official policies, either expressed
+or implied, of <copyright holder>.
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\ No newline at end of file
--- /dev/null
+<?php
+/*
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the Revised BSD License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ Revised BSD License for more details.
+
+ Copyright 2004-2008 Cool Dude 2k - http://idb.berlios.de/
+ Copyright 2004-2008 Game Maker 2k - http://intdb.sourceforge.net/
+
+ $FileInfo: image.php - Last Update: 12/15/2011 RC 5 Ver. 3.0.0 - Author: cooldude2k $
+*/
+//@ob_clean();
+@ob_start();
+$urltype = 1;
+$url = "http://hostname.domain/url/to/path/";
+$urlfname = "index.php";
+$appname = "Neo Source Viewer";
+$appver = array(3,0,0,"RC 3");
+function version_info($proname,$subver,$ver,$supver,$reltype,$svnver,$showsvn) {
+ $return_var = $proname." ".$reltype." ".$subver.".".$ver.".".$supver;
+ if($showsvn==false) { $showsvn = null; }
+ if($showsvn==true) { $return_var .= " SVN ".$svnver; }
+ if($showsvn!=true&&$showsvn!=null) { $return_var .= " ".$showsvn." ".$svnver; }
+ return $return_var; }
+$appversion = version_info($appname,$appver[0],$appver[1],$appver[2],$appver[3]." Ver.",null,false);
+function redirect($type,$file,$time=0,$url=null,$dbsr=true) {
+if($type!="location"&&$type!="refresh") { $type=="location"; }
+if($url!=null) { $file = $url.$file; }
+if($dbsr==true) { $file = str_replace("//", "/", $file); }
+if($type=="refresh") { header("Refresh: ".$time."; URL=".$file); }
+if($type=="location") { @session_write_close();
+header("Location: ".$file); } return true; }
+if(dirname($_SERVER['SCRIPT_NAME'])!=".") {
+$basedir = dirname($_SERVER['SCRIPT_NAME'])."/"; }
+if(dirname($_SERVER['SCRIPT_NAME'])==".") {
+$basedir = dirname($_SERVER['PHP_SELF'])."/"; }
+if($basedir=="\/") { $basedir="/"; }
+if($_SERVER['PATH_INFO']==null) {
+ if(@getenv('PATH_INFO')!=null&&@getenv('PATH_INFO')!="1") {
+$_SERVER['PATH_INFO'] = @getenv('PATH_INFO'); } }
+if($_SERVER['PATH_INFO']!=null) {
+$_GET['dir'] = $_SERVER['PATH_INFO']; }
+if($_GET['dir']=="1") { $_GET['dir']="/"; }
+if(!isset($_GET['dir'])) {
+ $_GET['dir'] = "/"; }
+$_GET['dir']=preg_replace("/(.*?)\.\/(.*?)/", "iDB", $_GET['dir']);
+if($urltype==1) {
+redirect("location",$urlfname."?dir=".$_GET['dir']."&act=lowview",0,$url,false); }
+if($urltype==2) {
+redirect("location",$urlfname.$_GET['dir']."?act=lowview",0,$url,false); }
+?>
--- /dev/null
+<?php
+/*
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the Revised BSD License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ Revised BSD License for more details.
+
+ Copyright 2004-2008 Cool Dude 2k - http://idb.berlios.de/
+ Copyright 2004-2008 Game Maker 2k - http://intdb.sourceforge.net/
+
+ $FileInfo: index.php - Last Update: 12/15/2011 RC 5 Ver. 3.0.0 - Author: cooldude2k $
+*/
+//@ob_clean();
+@ob_start();
+$urltype = 1;
+$url = "http://hostname.domain/url/to/path/";
+$urlfname = "index.php";
+$appname = "Neo Source Viewer";
+$appver = array(3,0,0,"RC 3");
+function version_info($proname,$subver,$ver,$supver,$reltype,$svnver,$showsvn) {
+ $return_var = $proname." ".$reltype." ".$subver.".".$ver.".".$supver;
+ if($showsvn==false) { $showsvn = null; }
+ if($showsvn==true) { $return_var .= " SVN ".$svnver; }
+ if($showsvn!=true&&$showsvn!=null) { $return_var .= " ".$showsvn." ".$svnver; }
+ return $return_var; }
+$appversion = version_info($appname,$appver[0],$appver[1],$appver[2],$appver[3]." Ver.",null,false);
+//List of text type files
+$txt_type = "htm,html,php,txt,css,null,";
+$txt_type = explode(",",$txt_type);
+//List of image type files
+$img_type = "gif,png,ico,jpg,jpeg,jpe,bmp";
+$img_type = explode(",",$img_type);
+//List of mime types
+$mine_type = array(
+ "gif" => "image/gif",
+ "png" => "image/png",
+ "ico" => "image/x-icon",
+ "jpg" => "image/jpeg",
+ "jpeg" => "image/jpeg",
+ "jpe" => "image/jpeg",
+ "bmp" => "image/bmp");
+//List of binary type files
+$bin_type = "ttf";
+$bin_type = explode(",",$bin_type);
+if(!isset($_SERVER['PATH_INFO'])) {
+ $_SERVER['PATH_INFO'] = null; }
+if(!isset($_GET['act'])) {
+ $_GET['act'] = "list"; }
+if(!isset($urltype)) { $urltype = 1; }
+if($urltype!=1&&$urltype!=2) { $urltype = 1; }
+if(!isset($urlfname)) { $urlfname = "index.php"; }
+if(dirname($_SERVER['SCRIPT_NAME'])!=".") {
+$basedir = dirname($_SERVER['SCRIPT_NAME'])."/"; }
+if(dirname($_SERVER['SCRIPT_NAME'])==".") {
+$basedir = dirname($_SERVER['PHP_SELF'])."/"; }
+if($basedir=="\/") { $basedir="/"; }
+if($_SERVER['PATH_INFO']==null) {
+ if(@getenv('PATH_INFO')!=null&&@getenv('PATH_INFO')!="1") {
+$_SERVER['PATH_INFO'] = @getenv('PATH_INFO'); } }
+if($_SERVER['PATH_INFO']!=null) {
+$_GET['dir'] = $_SERVER['PATH_INFO']; }
+if($_GET['dir']=="1") { $_GET['dir']="/"; }
+if(!isset($_GET['dir'])) {
+ $_GET['dir'] = "/"; }
+$_GET['dir']=preg_replace("/(.*?)\.\/(.*?)/", "iDB", $_GET['dir']);
+$dayconv = array('second' => 1, 'minute' => 60, 'hour' => 3600, 'day' => 86400, 'week' => 604800, 'month' => 2630880, 'year' => 31570560, 'decade' => 15705600);
+$twohour = $dayconv['hour'] * 0;
+function file_get_source($filename,$return = TRUE)
+{
+$phpsrc = file_get_contents($filename);
+$phpsrcs = highlight_string($phpsrc,$return);
+$phpsrcs = preg_replace("/\<font color=\"(.*?)\"\>/i", "<span style=\"color: \\1;\">", $phpsrcs);
+$phpsrcs = preg_replace("/\<\/font>/i", "</span>", $phpsrcs);
+return $phpsrcs;
+}
+function GMTimeChange($format,$timestamp,$offset,$minoffset=null,$dst=null) {
+$TCHour = date("H",$timestamp);
+$TCMinute = date("i",$timestamp);
+$TCSecond = date("s",$timestamp);
+$TCMonth = date("n",$timestamp);
+$TCDay = date("d",$timestamp);
+$TCYear = date("Y",$timestamp);
+unset($dstake); $dstake = null;
+if(!is_numeric($minoffset)) { $minoffset = "00"; }
+$ts_array = explode(":",$offset);
+if(count($ts_array)!=2) {
+ if(!isset($ts_array[0])) { $ts_array[0] = "0"; }
+ if(!isset($ts_array[1])) { $ts_array[1] = "00"; }
+ $offset = $ts_array[0].":".$ts_array[1]; }
+if(!is_numeric($ts_array[0])) { $ts_array[0] = "0"; }
+if($ts_array[0]>12) { $ts_array[0] = "12"; $offset = $ts_array[0].":".$ts_array[1]; }
+if($ts_array[0]<-12) { $ts_array[0] = "-12"; $offset = $ts_array[0].":".$ts_array[1]; }
+if(!is_numeric($ts_array[1])) { $ts_array[1] = "00"; }
+if($ts_array[1]>59) { $ts_array[1] = "59"; $offset = $ts_array[0].":".$ts_array[1]; }
+if($ts_array[1]<0) { $ts_array[1] = "00"; $offset = $ts_array[0].":".$ts_array[1]; }
+$tsa = array("offset" => $offset, "hour" => $ts_array[0], "minute" => $ts_array[1]);
+//$tsa['minute'] = $tsa['minute'] + $minoffset;
+if($dst!="on"&&$dst!="off") { $dst = "off"; }
+if($dst=="on") { if($dstake!="done") {
+ $dstake = "done"; $tsa['hour'] = $tsa['hour']+1; } }
+$TCHour = $TCHour + $tsa['hour'];
+$TCMinute = $TCMinute + $tsa['minute'];
+return date($format,mktime($TCHour,$TCMinute,$TCSecond,$TCMonth,$TCDay,$TCYear)); }
+function SeverOffSet() {
+$TestHour1 = date("H");
+$TestHour2 = gmdate("H");
+$TestHour3 = $TestHour1-$TestHour2;
+return $TestHour3; }
+if(!isset($_GET['dst'])) {
+$_GET['dst'] = "on"; }
+if($_GET['dst']!="on"&&
+ $_GET['dst']!="off") {
+ $_GET['dst'] = "off"; }
+if(!isset($_GET['offset'])) {
+$_GET['offset'] = "-6"; }
+if(!is_numeric($_GET['offset'])) { $_GET['offset'] = "0"; }
+if($_GET['offset']>=12) { $_GET['offset'] = "12"; }
+if($_GET['offset']<=-12) { $_GET['offset'] = "-12"; }
+if(!isset($_GET['minoffset'])) { $_GET['minoffset'] = "00"; }
+if(!is_numeric($_GET['minoffset'])) { $_GET['minoffset'] = "00"; }
+if($_GET['minoffset']>=59) { $_GET['minoffset'] = "59"; }
+if($_GET['minoffset']<=0) { $_GET['minoffset'] = "00"; }
+$TimeOffSet = $_GET['offset'].":".$_GET['minoffset'];
+function format_size($size, $round = 0) {
+ //Size must be bytes!
+ $sizes = array(' B', ' KB', ' MB', ' GB', ' TB', ' PB', ' EB', ' ZB', ' YB');
+ for ($i=0; $size > 1024 && $i < count($sizes); $i++) $size /= 1024;
+ return round($size,$round).$sizes[$i];
+}
+function file_list_dir($dirname) {
+if (!isset($dirnum)) { $dirnum = null; }
+$srcfile = array();
+$srcdir = array();
+if ($handle = opendir($dirname)) {
+while (false !== ($file = readdir($handle))) {
+ if ($dirnum==null) { $dirnum = 0; }
+ if ($file != "." && $file != ".." && $file != ".htaccess" && $file != null) {
+ if(filetype($dirname.$file)=="link") {
+ if(is_file($dirname.$file)===true) {
+ $srcfile[$dirnum] = $file; }
+ if(is_dir($dirname.$file)===true) {
+ $srcdir[$dirnum] = $file; } }
+ if(filetype($dirname.$file)=="file") {
+ $srcfile[$dirnum] = $file; }
+ if(filetype($dirname.$file)=="dir") {
+ $srcdir[$dirnum] = $file; }
+ ++$dirnum;
+ } }
+if($srcdir!=null) { asort($srcdir); }
+if($srcfile!=null) { asort($srcfile); }
+if($srcdir!=null&&$srcfile!=null) {
+$fulllist = array_merge($srcdir, $srcfile); }
+if($srcdir!=null&&$srcfile==null) { $fulllist = $srcdir; }
+if($srcdir==null&&$srcfile!=null) { $fulllist = $srcfile; }
+closedir($handle); }
+ return $fulllist; }
+$addurlpart = null;
+if(isset($_GET['offset'])) {
+$addurlpart = $addurlpart."&offset=".$_GET['offset']; }
+if(isset($_GET['minoffset'])) {
+$addurlpart = $addurlpart."&minoffset=".$_GET['minoffset']; }
+if(isset($_GET['dst'])) {
+$addurlpart = $addurlpart."&dst=".$_GET['dst']; }
+if($_GET['act']=="list"||$_GET['act']=="dir") {
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+ <head>
+ <title> Index of <?php echo $_GET['dir']; ?> </title>
+ <meta name="Generator" content="<?php echo $appversion; ?>" />
+ <meta name="Author" content="" />
+ <meta name="Keywords" content="" />
+ <meta name="Description" content="" />
+ <meta http-equiv="Content-Language" content="en" />
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-15" />
+ <meta http-equiv="Content-Style-Type" content="text/css" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <base href="<?php echo $url; ?>" />
+ <link rel="icon" href="favicon.ico" type="image/icon" />
+ <link rel="shortcut icon" href="favicon.ico" type="image/icon" />
+<style type="text/css">
+img { border: 0; padding: 0 2px; vertical-align: text-bottom; }
+td { font-family: monospace; padding: 2px 3px; text-align: right; vertical-align: bottom; }
+td:first-child { text-align: left; padding: 2px 10px 2px 3px; }
+table { border: 0; }
+a.symlink { font-style: italic; }
+</style>
+ </head>
+
+ <body>
+<h1>Index of <?php echo $_GET['dir']; ?></h1>
+<hr /><table>
+<tbody>
+<?php
+$file = @file_list_dir("source".$_GET['dir']);
+$num=count($file);
+$i=0;
+if($num<=0) {
+?>
+<tr>
+ <td style="text-align: left;"> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+</tr>
+<?php } $olddir = null;
+if($_GET['dir']!="/"&&$num>0) {
+$goback = explode("/",$_GET['dir']);
+$numz = count($goback)-2;
+$iz=1;
+while ($iz < $numz) {
+ $olddir=$olddir."/".$goback[$iz];
+ ++$iz; }
+if($urltype==1) {
+$FileURL = $urlfname."?dir=".$olddir."/&act=list".$addurlpart; }
+if($urltype==2) {
+$FileURL = $urlfname.$olddir."/?act=list".$addurlpart; }
+?>
+<tr><td style="text-align: left;"><a href="<?php echo $FileURL; ?>"><img src="back.gif" alt="dir" /></a><a href="<?php echo $FileURL; ?>">..</a></td></tr>
+<?php }
+while ($i < $num) {
+$FileName = $file[$i];
+$FileType = filetype("source".$_GET['dir'].$file[$i]);
+ if(filetype("source".$_GET['dir'].$file[$i])=="link") {
+ if(is_file("source".$_GET['dir'].$file[$i])===true) {
+ $FileType = "file"; }
+ if(is_dir("source".$_GET['dir'].$file[$i])===true) {
+ $FileType = "dir"; } }
+$FileSize = filesize("source".$_GET['dir'].$FileName);
+$FileTimeStamp = filemtime("source".$_GET['dir'].$FileName);
+if($FileType=="file") {
+$FileExp = explode(".",$FileName);
+$FileBaseName = $FileExp[0];
+if(isset($FileExp[1])) {
+$FileExt = $FileExp[1]; }
+if(!isset($FileExp[1])) {
+$FileExt = null; } }
+if($FileType=="dir") {
+$FileBaseName = $FileName;
+$FileExt = null; }
+if($FileType=="dir") {
+if($urltype==1) {
+$FileURL = $urlfname."?dir=".$_GET['dir'].$FileName."/&act=list".$addurlpart; }
+if($urltype==2) {
+$FileURL = $urlfname.$_GET['dir'].$FileName."/?act=list".$addurlpart; }
+$FilePic = "dir.gif"; }
+if($FileType=="file") {
+if($urltype==1) {
+$FileURL = $urlfname."?dir=".$_GET['dir'].$FileName."&act=view".$addurlpart;
+if(in_array($FileExt, $bin_type)) {
+$FileURL = $urlfname."?dir=".$_GET['dir'].$FileName."&act=download".$addurlpart; } }
+if($urltype==2) {
+$FileURL = $urlfname.$_GET['dir'].$FileName."?act=view".$addurlpart;
+if(in_array($FileExt, $bin_type)) {
+$FileURL = $urlfname.$_GET['dir'].$FileName."?act=download".$addurlpart; } }
+if(in_array($FileExt, $txt_type)) {
+ $FilePic = "icnres/text.gif"; }
+if(in_array($FileExt, $bin_type)) {
+ $FilePic = "icnres/binary.gif"; }
+if(in_array($FileExt, $img_type)) {
+ $FilePic = "icnres/image.gif"; } }
+?>
+<tr>
+ <td style="text-align: left;"><a href="<?php echo $FileURL; ?>"><img style="text-decoration: none;" src="<?php echo $FilePic; ?>" alt="<?php echo $FileType; ?>" /></a><a href="<?php echo $FileURL; ?>"><?php echo $FileName; ?></a></td>
+<?php if($FileType=="file") { ?>
+ <td><?php echo format_size($FileSize); ?></td>
+<?php } if($FileType=="dir") { ?>
+ <td> </td>
+<?php } ?>
+ <td><?php echo GMTimeChange("n/j/Y",$FileTimeStamp-$twohour,$TimeOffSet,null,$_GET['dst']); ?></td>
+ <td><?php echo GMTimeChange("g:i:s A",$FileTimeStamp-$twohour,$TimeOffSet,null,$_GET['dst']); ?></td>
+</tr>
+<?php
+++$i; }
+?>
+</tbody></table><hr />
+<?php if($urltype==1) { ?>
+<form method="get" action="<?php echo $url.$urlfname; ?>">
+<?php } if($urltype==2) { ?>
+<form method="get" action="<?php echo $url.$urlfname.$_GET['dir']; ?>">
+<?php } ?>
+<select id="offset" name="offset" class="TextBox"><?php
+$tsa_mem = explode(":",$TimeOffSet);
+$TimeZoneArray = array("offset" => $Settings['DefaultTimeZone'], "hour" => $tsa_mem[0], "minute" => $tsa_mem[1]);
+$plusi = 1; $minusi = 12;
+$plusnum = 13; $minusnum = 0;
+while ($minusi > $minusnum) {
+if($TimeZoneArray['hour']==-$minusi) {
+echo "<option selected=\"selected\" value=\"-".$minusi."\">GMT - ".$minusi." hours</option>\n"; }
+if($TimeZoneArray['hour']!=-$minusi) {
+echo "<option value=\"-".$minusi."\">GMT - ".$minusi." hours</option>\n"; }
+--$minusi; }
+if($TimeZoneArray['hour']==0) { ?>
+<option selected="selected" value="0">GMT +/- 0 hours</option>
+<?php } if($TimeZoneArray['hour']!=0) { ?>
+<option value="0">GMT +/- 0 hours</option>
+<?php }
+while ($plusi < $plusnum) {
+if($TimeZoneArray['hour']==$plusi) {
+echo "<option selected=\"selected\" value=\"".$plusi."\">GMT + ".$plusi." hours</option>\n"; }
+if($TimeZoneArray['hour']!=$plusi) {
+echo "<option value=\"".$plusi."\">GMT + ".$plusi." hours</option>\n"; }
+++$plusi; }
+?></select>
+<select id="minoffset" name="minoffset" class="TextBox"><?php
+$mini = 0; $minnum = 60;
+while ($mini < $minnum) {
+if(strlen($mini)==2) { $showmin = $mini; }
+if(strlen($mini)==1) { $showmin = "0".$mini; }
+if($mini==$TimeZoneArray['minute']) {
+echo "\n<option selected=\"selected\" value=\"".$showmin."\">".$showmin." minutes</option>\n"; }
+if($mini!=$TimeZoneArray['minute']) {
+echo "<option value=\"".$showmin."\">".$showmin." minutes</option>\n"; }
+++$mini; }
+?></select>
+<select id="dst" name="dst" class="TextBox"><?php echo "\n" ?>
+<?php if($_GET['dst']=="off"&&$_GET['dst']!="on") { ?>
+<option selected="selected" value="off">DST/ST off</option><?php echo "\n" ?><option value="on">DST/ST on</option>
+<?php } if($_GET['dst']=="on") { ?>
+<option selected="selected" value="on">DST/ST on</option><?php echo "\n" ?><option value="off">DST/ST off</option>
+<?php } echo "\n" ?></select>
+<input type="hidden" name="act" value="<?php echo $_GET['act']; ?>" style="display: none;" />
+<?php if($urltype==1) { ?>
+<input type="hidden" name="dir" value="<?php echo $_GET['dir']; ?>" style="display: none;" />
+<?php } ?>
+<input type="submit" value="set" />
+</form>
+ </body>
+</html>
+<?php }
+if($_GET['act']=="view"||$_GET['act']=="show") {
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+ <head>
+ <title> Viewing File <?php echo $_GET['dir']; ?> </title>
+ <meta name="Generator" content="<?php echo $appversion; ?>" />
+ <meta name="Author" content="" />
+ <meta name="Keywords" content="" />
+ <meta name="Description" content="" />
+ <base href="<?php echo $url; ?>" />
+ <meta http-equiv="Content-Language" content="en" />
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-15" />
+ <meta http-equiv="Content-Style-Type" content="text/css" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <link rel="icon" href="favicon.ico" type="image/icon" />
+ <link rel="shortcut icon" href="favicon.ico" type="image/icon" />
+<style type="text/css">
+img { border: 0; padding: 0 2px; vertical-align: text-bottom; }
+td { font-family: monospace; padding: 2px 3px; text-align: right; vertical-align: bottom; }
+td:first-child { text-align: left; padding: 2px 10px 2px 3px; }
+table { border: 0; }
+a.symlink { font-style: italic; }
+</style>
+ </head>
+
+ <body>
+<h1>Viewing File <?php echo $_GET['dir']; ?></h1>
+<hr /><table>
+<tbody>
+<?php $olddir = null;
+if($_GET['dir']!="/") {
+$goback = explode("/",$_GET['dir']);
+$numz = count($goback)-1;
+$iz=1;
+while ($iz < $numz) {
+ $olddir=$olddir."/".$goback[$iz];
+ ++$iz; }
+if($urltype==1) {
+$FileURL = $urlfname."?dir=".$olddir."/&act=list".$addurlpart; }
+if($urltype==2) {
+$FileURL = $urlfname.$olddir."/?act=list".$addurlpart; }
+$FileExp = explode(".",$_GET['dir']);
+if(isset($FileExp[1])) {
+$FileExt = $FileExp[1]; }
+if($urltype==1) {
+$DownloadURL = $urlfname."?dir=".$_GET['dir']."&act=download&output=text";
+$GZipURL = $urlfname."?dir=".$_GET['dir']."&act=download&output=gzip";
+$BZipURL = $urlfname."?dir=".$_GET['dir']."&act=download&output=bzip";
+$LineURL = $urlfname."?dir=".$_GET['dir']."&act=line";
+$LowURL = $urlfname."?dir=".$_GET['dir']."&act=lowview";
+$SourceURL = $urlfname."?dir=".$_GET['dir']."&act=highlight"; }
+if($urltype==2) {
+$DownloadURL = $urlfname.$_GET['dir']."?act=download&output=text";
+$GZipURL = $urlfname.$_GET['dir']."?act=download&output=gzip";
+$BZipURL = $urlfname.$_GET['dir']."?act=download&output=bzip";
+$LineURL = $urlfname.$_GET['dir']."?act=line";
+$LowURL = $urlfname.$_GET['dir']."?act=text";
+$SourceURL = $urlfname.$_GET['dir']."?act=highlight"; }
+?>
+<tr><td style="text-align: left;"><a href="<?php echo $FileURL; ?>"><img src="icnres/back.gif" alt="dir" /></a><a href="<?php echo $FileURL; ?>">..</a></td></tr>
+<?php }
+if(in_array($FileExt, $txt_type)) { ?>
+<tr>
+ <td style="text-align: left;"><a href="<?php echo $DownloadURL; ?>"><img src="icnres/text.gif" alt="download" /></a><a href="<?php echo $DownloadURL; ?>">Download</a> <a href="<?php echo $GZipURL; ?>"><img src="icnres/zip.gif" alt="gzip" /></a><a href="<?php echo $GZipURL; ?>">Download GZip</a> <a href="<?php echo $BZipURL; ?>"><img src="icnres/zip.gif" alt="bzip2" /></a><a href="<?php echo $BZipURL; ?>">Download BZip2</a> <a href="<?php echo $LowURL; ?>"><img src="icnres/text.gif" alt="lowview" /></a><a href="<?php echo $LowURL; ?>">Low View</a> <a href="<?php echo $LineURL; ?>"><img src="icnres/text.gif" alt="lineview" /></a><a href="<?php echo $LineURL; ?>">Line View</a> <a href="<?php echo $SourceURL; ?>"><img src="icnres/text.gif" alt="lowviewtwo" /></a><a href="<?php echo $SourceURL; ?>">Alt Highlight View</a></td>
+</tr>
+<tr><td style="text-align: left;"><?php echo file_get_source("source".$_GET['dir']); ?></td></tr>
+<?php }
+if(in_array($FileExt, $img_type)) { ?>
+<tr>
+ <td style="text-align: left;"><a href="<?php echo $DownloadURL; ?>"><img src="icnres/text.gif" alt="download" /></a><a href="<?php echo $DownloadURL; ?>">Download</a> <a href="<?php echo $GZipURL; ?>"><img src="icnres/zip.gif" alt="gzip" /></a><a href="<?php echo $GZipURL; ?>">Download GZip</a> <a href="<?php echo $BZipURL; ?>"><img src="icnres/zip.gif" alt="bzip2" /></a><a href="<?php echo $BZipURL; ?>">Download BZip2</a> <a href="<?php echo $LowURL; ?>"><img src="icnres/text.gif" alt="lowview" /></a><a href="<?php echo $LowURL; ?>">Low View</a> <a href="<?php echo $LineURL; ?>"><img src="icnres/text.gif" alt="lineview" /></a><a href="<?php echo $LineURL; ?>">Line View</a> <a href="<?php echo $SourceURL; ?>"><img src="icnres/text.gif" alt="lowviewtwo" /></a><a href="<?php echo $SourceURL; ?>">Alt Highlight View</a></td>
+</tr>
+<?php if($urltype==1) { ?>
+<tr><td style="text-align: left;"><img src="<?php echo $urlfname."?dir=".$_GET['dir']."&act=text".$addurlpart; ?>" alt="<?php echo $_GET['dir']; ?>" /></td></tr>
+<?php } if($urltype==2) { ?>
+<tr><td style="text-align: left;"><img src="<?php echo $urlfname.$_GET['dir']."?act=text".$addurlpart; ?>" alt="<?php echo $_GET['dir']; ?>" /></td></tr>
+<?php } } ?>
+</tbody></table><hr />
+<?php if($urltype==1) { ?>
+<form method="get" action="<?php echo $url.$urlfname; ?>">
+<?php } if($urltype==2) { ?>
+<form method="get" action="<?php echo $url.$urlfname.$_GET['dir']; ?>">
+<?php } ?>
+<select id="offset" name="offset" class="TextBox"><?php
+$tsa_mem = explode(":",$TimeOffSet);
+$TimeZoneArray = array("offset" => $Settings['DefaultTimeZone'], "hour" => $tsa_mem[0], "minute" => $tsa_mem[1]);
+$plusi = 1; $minusi = 12;
+$plusnum = 13; $minusnum = 0;
+while ($minusi > $minusnum) {
+if($TimeZoneArray['hour']==-$minusi) {
+echo "<option selected=\"selected\" value=\"-".$minusi."\">GMT - ".$minusi." hours</option>\n"; }
+if($TimeZoneArray['hour']!=-$minusi) {
+echo "<option value=\"-".$minusi."\">GMT - ".$minusi." hours</option>\n"; }
+--$minusi; }
+if($TimeZoneArray['hour']==0) { ?>
+<option selected="selected" value="0">GMT +/- 0 hours</option>
+<?php } if($TimeZoneArray['hour']!=0) { ?>
+<option value="0">GMT +/- 0 hours</option>
+<?php }
+while ($plusi < $plusnum) {
+if($TimeZoneArray['hour']==$plusi) {
+echo "<option selected=\"selected\" value=\"".$plusi."\">GMT + ".$plusi." hours</option>\n"; }
+if($TimeZoneArray['hour']!=$plusi) {
+echo "<option value=\"".$plusi."\">GMT + ".$plusi." hours</option>\n"; }
+++$plusi; }
+?></select>
+<select id="minoffset" name="minoffset" class="TextBox"><?php
+$mini = 0; $minnum = 60;
+while ($mini < $minnum) {
+if(strlen($mini)==2) { $showmin = $mini; }
+if(strlen($mini)==1) { $showmin = "0".$mini; }
+if($mini==$TimeZoneArray['minute']) {
+echo "\n<option selected=\"selected\" value=\"".$showmin."\">".$showmin." minutes</option>\n"; }
+if($mini!=$TimeZoneArray['minute']) {
+echo "<option value=\"".$showmin."\">".$showmin." minutes</option>\n"; }
+++$mini; }
+?></select>
+<select id="dst" name="dst" class="TextBox"><?php echo "\n" ?>
+<?php if($_GET['dst']=="off"&&$_GET['dst']!="on") { ?>
+<option selected="selected" value="off">DST/ST off</option><?php echo "\n" ?><option value="on">DST/ST on</option>
+<?php } if($_GET['dst']=="on") { ?>
+<option selected="selected" value="on">DST/ST on</option><?php echo "\n" ?><option value="off">DST/ST off</option>
+<?php } echo "\n" ?></select>
+<input type="hidden" name="act" value="<?php echo $_GET['act']; ?>" style="display: none;" />
+<?php if($urltype==1) { ?>
+<input type="hidden" name="dir" value="<?php echo $_GET['dir']; ?>" style="display: none;" />
+<?php } ?>
+<input type="submit" value="set" />
+</form>
+ </body>
+</html>
+<?php }
+if ($_GET['act']=="get"||$_GET['act']=="download") {
+ if (!isset($_GET['output'])&&isset($_GET['foutput'])!=null) {
+ $_GET['output'] = $_GET['foutput']; }
+ if (!isset($_GET['output'])&&!isset($_GET['foutput'])!=null) {
+ $_GET['output'] = "text"; }
+ if ($_GET['output']=="gz") { $_GET['output'] = "gzip"; }
+ if ($_GET['output']=="bz") { $_GET['output'] = "bzip2"; }
+ if ($_GET['output']=="bz2") { $_GET['output'] = "bzip2"; }
+ if ($_GET['output']=="bzip") { $_GET['output'] = "bzip2"; }
+ if ($_GET['output']!="gzip"&&
+ $_GET['output']!="bzip2") {
+ $_GET['output'] = "text"; }
+ @header("Content-type: text/plain");
+ $dirtest = explode("/",$_GET['dir']);
+ $inum = count($dirtest)-1; $file = $dirtest[$inum];
+ $fcontent = file_get_contents("source".$_GET['dir']);
+ if ($_GET['output']=="gzip") { echo gzencode($fcontent);
+ header("Content-Disposition: attachment; filename=\"".$file.".gz\""); }
+ if ($_GET['output']=="bzip2") { echo bzcompress($fcontent);
+ header("Content-Disposition: attachment; filename=\"".$file.".bz2\""); }
+ if ($_GET['output']=="text") { echo $fcontent;
+ header("Content-Disposition: attachment; filename=\"".$file."\""); } }
+if ($_GET['act']=="lowview"||$_GET['act']=="text") {
+ $FileExt = explode(".",$_GET['dir']);
+ if($FileExt[1]=="gif") {
+ @header("Content-type: image/gif"); }
+ if($FileExt[1]=="png") {
+ @header("Content-type: image/png"); }
+ if($FileExt[1]=="ico") {
+ @header("Content-type: image/x-icon"); }
+ if($FileExt[1]!="gif"&&$FileExt[1]!="png"&&$FileExt[1]!="ico") {
+ @header("Content-type: text/plain"); }
+ echo file_get_contents("source".$_GET['dir']); }
+if ($_GET['act']=="highlight"||$_GET['act']=="sourcecode") {
+ $FileExt = explode(".",$_GET['dir']);
+ if(in_array($FileExt[1], $img_type)) {
+ @header("Content-type: ".$mine_type[$FileExt[1]]);
+ echo file_get_contents("source".$_GET['dir']);}
+ if(in_array($FileExt[1], $txt_type)) {
+ @header("Content-type: text/html");
+ ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+ <head>
+ <title> Viewing file <?php echo $_GET['dir']; ?> </title>
+ <meta name="Generator" content="<?php echo $appversion; ?>" />
+ <meta name="Author" content="" />
+ <meta name="Keywords" content="" />
+ <meta name="Description" content="" />
+ <meta http-equiv="Content-Language" content="en" />
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-15" />
+ <meta http-equiv="Content-Style-Type" content="text/css" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <base href="<?php echo $url; ?>" />
+ <link rel="icon" href="favicon.ico" type="image/icon" />
+ <link rel="shortcut icon" href="favicon.ico" type="image/icon" />
+<style type="text/css">
+img { border: 0; padding: 0 2px; vertical-align: text-bottom; }
+td { font-family: monospace; padding: 2px 3px; text-align: right; vertical-align: bottom; }
+td:first-child { text-align: left; padding: 2px 10px 2px 3px; }
+table { border: 0; }
+a.symlink { font-style: italic; }
+</style>
+ </head>
+
+ <body>
+ <?php
+ echo file_get_source("source".$_GET['dir']);
+ ?>
+ </body>
+</html><?php } }
+if ($_GET['act']=="lineview"||$_GET['act']=="line") {
+ $FileExt = explode(".",$_GET['dir']);
+ if(in_array($FileExt[1], $img_type)) {
+ @header("Content-type: ".$mine_type[$FileExt[1]]);
+ echo file_get_contents("source".$_GET['dir']); }
+ if(in_array($FileExt[1], $txt_type)) {
+ @header("Content-type: text/plain");
+ $Code = explode("\n",file_get_contents("source".$_GET['dir']));
+ $Last = count($Code)-1;
+ $i=0;
+ while ($i <= $Last) {
+ $Line = $i+1;
+ //$Code[$i] = htmlentities($Code[$i]);
+ echo $Line.": ".$Code[$i]."\n";
+ ++$i; } } }
+?>
--- /dev/null
+Order deny,allow
+Deny from all
\ No newline at end of file
--- /dev/null
+ RewriteEngine on
+ RewriteBase /srcview/
+ RewriteRule ^dwntargzip([A-Za-z0-9\.\/%\?\-_]+) index.php?act=dwntar&tar=$1&output=gzip
+ RewriteRule ^dwntargz([A-Za-z0-9\.\/%\?\-_]+) index.php?act=dwntar&tar=$1&output=gzip
+ RewriteRule ^dwntarbzip2([A-Za-z0-9\.\/%\?\-_]+) index.php?act=dwntar&tar=$1&output=bzip2
+ RewriteRule ^dwntarbzip([A-Za-z0-9\.\/%\?\-_]+) index.php?act=dwntar&tar=$1&output=bzip2
+ RewriteRule ^dwntarbz2([A-Za-z0-9\.\/%\?\-_]+) index.php?act=dwntar&tar=$1&output=bzip2
+ RewriteRule ^dwntarbz([A-Za-z0-9\.\/%\?\-_]+) index.php?act=dwntar&tar=$1&output=bzip2
+ RewriteRule ^dwntar([A-Za-z0-9\.\/%\?\-_]+) index.php?act=dwntar&tar=$1
+ RewriteRule ^html([A-Za-z0-9\.\/%\?\-_]+):([A-Za-z0-9\.\/%\?\-_]+) index.php?act=html&tar=$1&file=$2
+ RewriteRule ^view([A-Za-z0-9\.\/%\?\-_]+):([A-Za-z0-9\.\/%\?\-_]+) index.php?act=view&tar=$1&file=$2
+ RewriteRule ^text([A-Za-z0-9\.\/%\?\-_]+):([A-Za-z0-9\.\/%\?\-_]+) index.php?act=text&tar=$1&file=$2
+ RewriteRule ^txt([A-Za-z0-9\.\/%\?\-_]+):([A-Za-z0-9\.\/%\?\-_]+) index.php?act=text&tar=$1&file=$2
+ RewriteRule ^list([A-Za-z0-9\.\/%\?\-_]+):([A-Za-z0-9\.\/%\?\-_]+) index.php?act=list&tar=$1&dir=$2
+ RewriteRule ^downloadgzip([A-Za-z0-9\.\/%\?\-_]+):([A-Za-z0-9\.\/%\?\-_]+) index.php?act=download&tar=$1&file=$2&output=gzip
+ RewriteRule ^downloadgz([A-Za-z0-9\.\/%\?\-_]+):([A-Za-z0-9\.\/%\?\-_]+) index.php?act=download&tar=$1&file=$2&output=gzip
+ RewriteRule ^downloadgbzip2([A-Za-z0-9\.\/%\?\-_]+):([A-Za-z0-9\.\/%\?\-_]+) index.php?act=download&tar=$1&file=$2&output=bzip2
+ RewriteRule ^downloadgbzip([A-Za-z0-9\.\/%\?\-_]+):([A-Za-z0-9\.\/%\?\-_]+) index.php?act=download&tar=$1&file=$2&output=bzip2
+ RewriteRule ^downloadgbz2([A-Za-z0-9\.\/%\?\-_]+):([A-Za-z0-9\.\/%\?\-_]+) index.php?act=download&tar=$1&file=$2&output=bzip2
+ RewriteRule ^downloadgbz([A-Za-z0-9\.\/%\?\-_]+):([A-Za-z0-9\.\/%\?\-_]+) index.php?act=download&tar=$1&file=$2&output=bzip2
+ RewriteRule ^download([A-Za-z0-9\.\/%\?\-_]+):([A-Za-z0-9\.\/%\?\-_]+) index.php?act=download&tar=$1&file=$2
+ RewriteRule ^html([A-Za-z0-9\.\/%\?\-_]+)\!([A-Za-z0-9\.\/%\?\-_]+) index.php?act=html&tar=$1&file=$2
+ RewriteRule ^view([A-Za-z0-9\.\/%\?\-_]+)\!([A-Za-z0-9\.\/%\?\-_]+) index.php?act=view&tar=$1&file=$2
+ RewriteRule ^text([A-Za-z0-9\.\/%\?\-_]+)\!([A-Za-z0-9\.\/%\?\-_]+) index.php?act=text&tar=$1&file=$2
+ RewriteRule ^txt([A-Za-z0-9\.\/%\?\-_]+)\!([A-Za-z0-9\.\/%\?\-_]+) index.php?act=text&tar=$1&file=$2
+ RewriteRule ^list([A-Za-z0-9\.\/%\?\-_]+)\!([A-Za-z0-9\.\/%\?\-_]+) index.php?act=list&tar=$1&dir=$2
+ RewriteRule ^downloadgzip([A-Za-z0-9\.\/%\?\-_]+)\!([A-Za-z0-9\.\/%\?\-_]+) index.php?act=download&tar=$1&file=$2&output=gzip
+ RewriteRule ^downloadgz([A-Za-z0-9\.\/%\?\-_]+)\!([A-Za-z0-9\.\/%\?\-_]+) index.php?act=download&tar=$1&file=$2&output=gzip
+ RewriteRule ^downloadgbzip2([A-Za-z0-9\.\/%\?\-_]+)\!([A-Za-z0-9\.\/%\?\-_]+) index.php?act=download&tar=$1&file=$2&output=bzip2
+ RewriteRule ^downloadgbzip([A-Za-z0-9\.\/%\?\-_]+)\!([A-Za-z0-9\.\/%\?\-_]+) index.php?act=download&tar=$1&file=$2&output=bzip2
+ RewriteRule ^downloadgbz2([A-Za-z0-9\.\/%\?\-_]+)\!([A-Za-z0-9\.\/%\?\-_]+) index.php?act=download&tar=$1&file=$2&output=bzip2
+ RewriteRule ^downloadgbz([A-Za-z0-9\.\/%\?\-_]+)\!([A-Za-z0-9\.\/%\?\-_]+) index.php?act=download&tar=$1&file=$2&output=bzip2
+ RewriteRule ^download([A-Za-z0-9\.\/%\?\-_]+)\!([A-Za-z0-9\.\/%\?\-_]+) index.php?act=download&tar=$1&file=$2
+ RewriteRule ^html([A-Za-z0-9\.\/%\?\-_]+)\@([A-Za-z0-9\.\/%\?\-_]+) index.php?act=html&tar=$1&file=$2
+ RewriteRule ^view([A-Za-z0-9\.\/%\?\-_]+)\@([A-Za-z0-9\.\/%\?\-_]+) index.php?act=view&tar=$1&file=$2
+ RewriteRule ^text([A-Za-z0-9\.\/%\?\-_]+)\@([A-Za-z0-9\.\/%\?\-_]+) index.php?act=text&tar=$1&file=$2
+ RewriteRule ^txt([A-Za-z0-9\.\/%\?\-_]+)\@([A-Za-z0-9\.\/%\?\-_]+) index.php?act=text&tar=$1&file=$2
+ RewriteRule ^list([A-Za-z0-9\.\/%\?\-_]+)\@([A-Za-z0-9\.\/%\?\-_]+) index.php?act=list&tar=$1&dir=$2
+ RewriteRule ^downloadgzip([A-Za-z0-9\.\/%\?\-_]+)\@([A-Za-z0-9\.\/%\?\-_]+) index.php?act=download&tar=$1&file=$2&output=gzip
+ RewriteRule ^downloadgz([A-Za-z0-9\.\/%\?\-_]+)\@([A-Za-z0-9\.\/%\?\-_]+) index.php?act=download&tar=$1&file=$2&output=gzip
+ RewriteRule ^downloadgbzip2([A-Za-z0-9\.\/%\?\-_]+)\@([A-Za-z0-9\.\/%\?\-_]+) index.php?act=download&tar=$1&file=$2&output=bzip2
+ RewriteRule ^downloadgbzip([A-Za-z0-9\.\/%\?\-_]+)\@([A-Za-z0-9\.\/%\?\-_]+) index.php?act=download&tar=$1&file=$2&output=bzip2
+ RewriteRule ^downloadgbz2([A-Za-z0-9\.\/%\?\-_]+)\@([A-Za-z0-9\.\/%\?\-_]+) index.php?act=download&tar=$1&file=$2&output=bzip2
+ RewriteRule ^downloadgbz([A-Za-z0-9\.\/%\?\-_]+)\@([A-Za-z0-9\.\/%\?\-_]+) index.php?act=download&tar=$1&file=$2&output=bzip2
+ RewriteRule ^download([A-Za-z0-9\.\/%\?\-_]+)\@([A-Za-z0-9\.\/%\?\-_]+) index.php?act=download&tar=$1&file=$2
+ RewriteRule ^html([A-Za-z0-9\.\/%\?\-_]+);([A-Za-z0-9\.\/%\?\-_]+) index.php?act=html&tar=$1&file=$2
+ RewriteRule ^view([A-Za-z0-9\.\/%\?\-_]+);([A-Za-z0-9\.\/%\?\-_]+) index.php?act=view&tar=$1&file=$2
+ RewriteRule ^text([A-Za-z0-9\.\/%\?\-_]+);([A-Za-z0-9\.\/%\?\-_]+) index.php?act=text&tar=$1&file=$2
+ RewriteRule ^txt([A-Za-z0-9\.\/%\?\-_]+);([A-Za-z0-9\.\/%\?\-_]+) index.php?act=text&tar=$1&file=$2
+ RewriteRule ^list([A-Za-z0-9\.\/%\?\-_]+);([A-Za-z0-9\.\/%\?\-_]+) index.php?act=list&tar=$1&dir=$2
+ RewriteRule ^downloadgzip([A-Za-z0-9\.\/%\?\-_]+);([A-Za-z0-9\.\/%\?\-_]+) index.php?act=download&tar=$1&file=$2&output=gzip
+ RewriteRule ^downloadgz([A-Za-z0-9\.\/%\?\-_]+);([A-Za-z0-9\.\/%\?\-_]+) index.php?act=download&tar=$1&file=$2&output=gzip
+ RewriteRule ^downloadgbzip2([A-Za-z0-9\.\/%\?\-_]+);([A-Za-z0-9\.\/%\?\-_]+) index.php?act=download&tar=$1&file=$2&output=bzip2
+ RewriteRule ^downloadgbzip([A-Za-z0-9\.\/%\?\-_]+);([A-Za-z0-9\.\/%\?\-_]+) index.php?act=download&tar=$1&file=$2&output=bzip2
+ RewriteRule ^downloadgbz2([A-Za-z0-9\.\/%\?\-_]+);([A-Za-z0-9\.\/%\?\-_]+) index.php?act=download&tar=$1&file=$2&output=bzip2
+ RewriteRule ^downloadgbz([A-Za-z0-9\.\/%\?\-_]+);([A-Za-z0-9\.\/%\?\-_]+) index.php?act=download&tar=$1&file=$2&output=bzip2
+ RewriteRule ^download([A-Za-z0-9\.\/%\?\-_]+);([A-Za-z0-9\.\/%\?\-_]+) index.php?act=download&tar=$1&file=$2
+ RewriteRule ^list([A-Za-z0-9\.\/%\?\-_]+) index.php?act=list&dir=$1
+ IndexOptions HTMLTable VersionSort FoldersFirst VersionSort
\ No newline at end of file
--- /dev/null
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+ Revised BSD License
+
+Copyright (c) 2004-2011 Game Maker 2k.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the distribution.
+
+ 3. Neither the name of Game Maker 2k nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGE.
+
+The views and conclusions contained in the software and documentation are those of the
+authors and should not be interpreted as representing official policies, either expressed
+or implied, of <copyright holder>.
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\ No newline at end of file
--- /dev/null
+<?php
+/*
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the Revised BSD License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ Revised BSD License for more details.
+
+ Copyright 2004-2011 Cool Dude 2k - http://idb.berlios.de/
+ Copyright 2004-2011 Game Maker 2k - http://intdb.sourceforge.net/
+
+ $FileInfo: index.php - Last Update: 01/04/2011 Ver. 2.0.5 RC 1 - Author: cooldude2k $
+*/
+$disfunc = @ini_get("disable_functions");
+$disfunc = @trim($disfunc);
+$disfunc = @preg_replace("/([\\s+|\\t+|\\n+|\\r+|\\0+|\\x0B+])/i", "", $disfunc);
+if($disfunc!="ini_set") { $disfunc = explode(",",$disfunc); }
+if($disfunc=="ini_set") { $disfunc = array("ini_set"); }
+if(!in_array("ini_set", $disfunc)) {
+/* Change to your url. */
+@ini_set("html_errors", false);
+@ini_set("track_errors", false);
+@ini_set("display_errors", false);
+@ini_set("report_memleaks", false);
+@ini_set("display_startup_errors", false);
+//@ini_set("error_log","logs/error.log");
+//@ini_set("log_errors","On");
+@ini_set("docref_ext", "");
+@ini_set("docref_root", "http://php.net/");
+@ini_set("date.timezone","UTC");
+@ini_set("default_mimetype","text/html"); }
+if(!defined("E_DEPRECATED")) { define("E_DEPRECATED", 0); }
+@error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
+@set_time_limit(30); @ignore_user_abort(true);
+if(function_exists("date_default_timezone_set")) {
+ @date_default_timezone_set("UTC"); }
+function idb_output_handler($buffer) { return $buffer; }
+@ob_start("idb_output_handler");
+header("Cache-Control: private, no-cache, no-store, must-revalidate, pre-check=0, post-check=0, max-age=0");
+header("Pragma: private, no-cache, no-store, must-revalidate, pre-check=0, post-check=0, max-age=0");
+header("P3P: CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\"");
+header("Date: ".gmdate("D, d M Y H:i:s")." GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+header("Expires: ".gmdate("D, d M Y H:i:s")." GMT");
+output_reset_rewrite_vars();
+$urltype = 1;//URL type to use can be 1 or 2
+$urlview = "html";//URL view type can be html or view
+$dirstyle = "old";//DIR list style can be old, new. :P
+$url = "http://localhost/srcview/";//Program url path
+$sourcedir = "./tarball";//Program url path
+$urlfname = "index.php";//Not used dont ask why its here. :P
+$appname = "TAR Source Viewer";//Name of program also not used. :P
+$dwntarlink = "dwntargz";
+$downloadlink = "downloadgz";
+$appver = array(2,0,5,"RC 1");//Version of program
+$PathSep = ":";//You can set this to : ! @ ;
+//$PathSep = "!"; $PathSep = "@"; $PathSep = ";";
+$dir_image = "icnres/dir.gif";
+$unknown_image = "icnres/unknown.gif";
+$back_image = "icnres/back.gif";
+//List of text type files
+$txt_type = "htm,html,php,txt,xml,xsl,js,css,htaccess,null,";
+$txt_type = explode(",",$txt_type);
+//List of text mime types
+$txt_mine_type = array(
+ "htm" => "text/plain",
+ "html" => "text/plain",
+ "php" => "text/plain",
+ "txt" => "text/plain",
+ "xml" => "text/plain",
+ "xsl" => "text/plain",
+ "js" => "text/plain",
+ "css" => "text/plain",
+ "htaccess" => "text/plain",
+ "null" => "text/plain",
+ "" => "text/plain");
+//List of text highlight types
+$txt_highlight_type = array(
+ "htm" => "highlight_php_source",
+ "html" => "highlight_php_source",
+ "php" => "highlight_php_source",
+ "txt" => "highlight_php_source",
+ "xml" => "highlight_php_source",
+ "xsl" => "highlight_php_source",
+ "js" => "highlight_php_source",
+ "css" => "highlight_php_source",
+ "htaccess" => "highlight_php_source",
+ "null" => "highlight_php_source",
+ "" => "highlight_php_source");
+//List of text images
+$txt_image = array(
+ "htm" => "icnres/text.gif",
+ "html" => "icnres/text.gif",
+ "php" => "icnres/text.gif",
+ "txt" => "icnres/text.gif",
+ "xml" => "icnres/text.gif",
+ "xsl" => "icnres/text.gif",
+ "js" => "icnres/text.gif",
+ "css" => "icnres/text.gif",
+ "htaccess" => "icnres/text.gif",
+ "null" => "icnres/text.gif",
+ "" => "icnres/text.gif");
+//List of image type files
+$img_type = "gif,png,ico,jpg,jpeg,jpe,bmp";
+$img_type = explode(",",$img_type);
+//List of image mime types
+$img_mine_type = array(
+ "gif" => "image/gif",
+ "png" => "image/png",
+ "ico" => "image/x-icon",
+ "jpg" => "image/jpeg",
+ "jpeg" => "image/jpeg",
+ "jpe" => "image/jpeg",
+ "bmp" => "image/bmp");
+//List of image images
+$img_image = array(
+ "gif" => "icnres/image.gif",
+ "png" => "icnres/image.gif",
+ "ico" => "icnres/image.gif",
+ "jpg" => "icnres/image.gif",
+ "jpeg" => "icnres/image.gif",
+ "jpe" => "icnres/image.gif",
+ "bmp" => "icnres/image.gif");
+//List of binary type files
+$bin_type = "ttf,tar";
+//List of binary mime types
+$bin_mine_type = array(
+ "ttf" => "application/x-font-ttf",
+ "tar" => "application/x-tar");
+//List of binary images
+$bin_image = array(
+ "ttf" => "icnres/binary.gif",
+ "tar" => "icnres/binary.gif");
+$bin_type = explode(",",$bin_type);
+function version_info($proname,$subver,$ver,$supver,$reltype,$svnver,$showsvn) {
+ $return_var = $proname." ".$reltype." ".$subver.".".$ver.".".$supver;
+ if($showsvn==false) { $showsvn = null; }
+ if($showsvn==true) { $return_var .= " SVN ".$svnver; }
+ if($showsvn!=true&&$showsvn!=null) { $return_var .= " ".$showsvn." ".$svnver; }
+ return $return_var; }
+$appversion = version_info($appname,$appver[0],$appver[1],$appver[2],$appver[3]." Ver.",null,false);
+function highlight_php_source($text)
+{
+$phpsrcs = highlight_string($text, true);
+$phpsrcs = str_replace("<br />", "<br />\n", $phpsrcs);
+$phpsrcs = str_replace("<br>", "<br />\n", $phpsrcs);
+$phpsrcs = preg_replace("/\<font color=\"(.*?)\"\>/i", "<span style=\"color: \\1;\">", $phpsrcs);
+$phpsrcs = preg_replace("/\<\/font>/i", "</span>", $phpsrcs);
+return $phpsrcs;
+}
+if(!isset($_GET['act'])) { $_GET['act'] = "list"; }
+if($_GET['act']=="text") { $_GET['act'] = "view"; }
+if(!isset($_GET['dir'])) { $_GET['dir'] = "/"; }
+if(!isset($_GET['output'])) { $_GET['output'] = "none"; }
+if($dirstyle=="neo") { $dirstyle = "new"; }
+if($dirstyle!="new"&&$dirstyle!="old") {
+ $dirstyle = "new"; }
+if($_GET['act']=="downloadgz"||$_GET['act']=="downloadgzip") {
+ $_GET['act'] = "download";
+ $_GET['output'] = "gzip"; }
+if($_GET['act']=="downloadbz"||$_GET['act']=="downloadbz2") {
+ $_GET['act'] = "download";
+ $_GET['output'] = "bzip2"; }
+if($_GET['act']=="downloadbzip"||$_GET['act']=="downloadbzip2") {
+ $_GET['act'] = "download";
+ $_GET['output'] = "bzip2"; }
+if($downloadlink!="downloadgz"&&$downloadlink!="downloadgzip"&&
+ $downloadlink!="downloadbz"&&$downloadlink!="downloadbz2"&&
+ $downloadlink!="downloadbzip"&&$downloadlink!="downloadbzip2"&&
+ $downloadlink!="download") { $downloadlink = "downloadgz"; }
+if($dwntarlink!="dwntargz"&&$dwntarlink!="dwntargzip"&&
+ $dwntarlink!="dwntarbz"&&$dwntarlink!="dwntarbz2"&&
+ $dwntarlink!="dwntarbzip"&&$dwntarlink!="dwntarbzip2"&&
+ $dwntarlink!="dwntar") { $dwntarlink = "dwntargz"; }
+if($_GET['act']=="dwntargz"||$_GET['act']=="dwntargzip") {
+ $_GET['act'] = "dwntar";
+ $_GET['output'] = "gzip"; }
+if($_GET['act']=="dwntarbz"||$_GET['act']=="dwntarbz2") {
+ $_GET['act'] = "dwntar";
+ $_GET['output'] = "bzip2"; }
+if($_GET['act']=="dwntarbzip"||$_GET['act']=="dwntarbzip2") {
+ $_GET['act'] = "dwntar";
+ $_GET['output'] = "bzip2"; }
+if($_GET['output']=="gz") {
+ $_GET['output'] = "gzip"; }
+if($_GET['output']=="bz2") {
+ $_GET['output'] = "bzip2"; }
+if($_GET['output']!="none"&&$_GET['output']!="gzip"&&$_GET['output']!="bzip2") {
+ $_GET['output'] = "none"; }
+require_once("./untar.php");
+// http://www.php.net/manual/en/function.sort.php#99700
+ function array_sort($array, $on, $order='SORT_DESC')
+ {
+ $new_array = array();
+ $sortable_array = array();
+
+ if (count($array) > 0) {
+ foreach ($array as $k => $v) {
+ if (is_array($v)) {
+ foreach ($v as $k2 => $v2) {
+ if ($k2 == $on) {
+ $sortable_array[$k] = $v2;
+ }
+ }
+ } else {
+ $sortable_array[$k] = $v;
+ }
+ }
+
+ switch($order)
+ {
+ case 'SORT_ASC':
+ //echo "ASC";
+ asort($sortable_array);
+ break;
+ case 'SORT_DESC':
+ //echo "DESC";
+ arsort($sortable_array);
+ break;
+ }
+
+ foreach($sortable_array as $k => $v) {
+ $new_array[] = $array[$k];
+ }
+ }
+ return $new_array;
+ }
+function format_size($size, $round = 0) {
+ //Size must be bytes!
+ $sizes = array(' B', ' KB', ' MB', ' GB', ' TB', ' PB', ' EB', ' ZB', ' YB');
+ for ($i=0; $size > 1024 && $i < count($sizes); $i++) $size /= 1024;
+ return round($size,$round).$sizes[$i];
+}
+// Change Time Stamp to a readable time
+function GMTimeChange($format,$timestamp,$offset,$minoffset=null,$dst=null) {
+global $utshour,$utsminute;
+$dstake = null;
+if(!is_numeric($minoffset)) { $minoffset = "00"; }
+$ts_array = explode(":",$offset);
+if(count($ts_array)!=2) {
+ if(!isset($ts_array[0])) { $ts_array[0] = "0"; }
+ if(!isset($ts_array[1])) { $ts_array[1] = "00"; }
+ $offset = $ts_array[0].":".$ts_array[1]; }
+if(!is_numeric($ts_array[0])) { $ts_array[0] = "0"; }
+if(!is_numeric($ts_array[1])) { $ts_array[1] = "00"; }
+if($ts_array[1]<0) { $ts_array[1] = "00"; $offset = $ts_array[0].":".$ts_array[1]; }
+$tsa = array("offset" => $offset, "hour" => $ts_array[0], "minute" => $ts_array[1]);
+//$tsa['minute'] = $tsa['minute'] + $minoffset;
+if($dst!="on"&&$dst!="off") { $dst = "off"; }
+if($dst=="on") { if($dstake!="done") {
+ $dstake = "done"; $tsa['hour'] = $tsa['hour']+1; } }
+$utimestamp = $tsa['hour'] * $utshour;
+$utimestamp = $utimestamp + $tsa['minute'] * $utsminute;
+$utimestamp = $utimestamp + $minoffset * $utsminute;
+$timestamp = $timestamp + $utimestamp;
+return date($format,$timestamp); }
+ $Names['SB'] = "Stephanie Braun";
+define("_stephanie_", $Names['SB']);
+// Change Time Stamp to a readable time
+function TimeChange($format,$timestamp,$offset,$minoffset=null,$dst=null) {
+return GMTimeChange($format,$timestamp,$offset,$minoffset,$dst); }
+// Make a GMT Time Stamp
+function GMTimeStamp() {
+$GMTHour = gmdate("H");
+$GMTMinute = gmdate("i");
+$GMTSecond = gmdate("s");
+$GMTMonth = gmdate("n");
+$GMTDay = gmdate("d");
+$GMTYear = gmdate("Y");
+return mktime($GMTHour,$GMTMinute,$GMTSecond,$GMTMonth,$GMTDay,$GMTYear); }
+// Get Server offset
+function GetSeverZone() {
+$TestHour1 = date("H");
+@putenv("OTZ=".getenv("TZ"));
+@putenv("TZ=GMT");
+$TestHour2 = date("H");
+@putenv("TZ=".getenv("OTZ"));
+$TestHour3 = $TestHour1-$TestHour2;
+return $TestHour3; }
+// Get Server offset alt version
+function SeverOffSet() {
+$TestHour1 = date("H");
+$TestHour2 = gmdate("H");
+$TestHour3 = $TestHour1-$TestHour2;
+return $TestHour3; }
+// Get Server offset new version
+function SeverOffSetNew() {
+return gmdate("g",mktime(0,date("Z"))); }
+function gmtime() { return time() - (int) date('Z'); }
+if(!isset($_GET['dst'])) {
+$_GET['dst'] = "on"; }
+if($_GET['dst']!="on"&&
+ $_GET['dst']!="off") {
+ $_GET['dst'] = "off"; }
+if(!isset($_GET['offset'])) {
+$_GET['offset'] = "-6"; }
+if(!is_numeric($_GET['offset'])) { $_GET['offset'] = "0"; }
+if($_GET['offset']>=12) { $_GET['offset'] = "12"; }
+if($_GET['offset']<=-12) { $_GET['offset'] = "-12"; }
+if(!isset($_GET['minoffset'])) { $_GET['minoffset'] = "00"; }
+if(!is_numeric($_GET['minoffset'])) { $_GET['minoffset'] = "00"; }
+if($_GET['minoffset']>=59) { $_GET['minoffset'] = "59"; }
+if($_GET['minoffset']<=0) { $_GET['minoffset'] = "00"; }
+$TimeOffSet = $_GET['offset'].":".$_GET['minoffset'];
+// Renee Marilyn Sabonis is the best ever. ^_^
+ $Names['RS'] = "Renee Sabonis";
+define("_renee_", $Names['RS']);
+if(isset($_GET['tar'])&&$_GET['act']=="dwntar") {
+if($_GET['output']=="none") {
+$FileType = "application/x-tar";
+header("Content-Disposition: attachment; filename=\"".basename($_GET['tar'])."\"");
+header("Content-type: ".$FileType);
+echo file_get_contents($sourcedir.$_GET['tar']); }
+if($_GET['output']=="gzip") {
+$FileType = "application/x-gzip";
+header("Content-Disposition: attachment; filename=\"".basename($_GET['tar']).".gz\"");
+header("Content-type: ".$FileType);
+echo gzencode(file_get_contents($sourcedir.$_GET['tar'])); }
+if($_GET['output']=="bzip2") {
+$FileType = "application/x-bzip2";
+header("Content-Disposition: attachment; filename=\"".basename($_GET['tar']).".bz2\"");
+header("Content-type: ".$FileType);
+echo bzcompress(file_get_contents($sourcedir.$_GET['tar'])); }
+die(); exit(); }
+if(isset($_GET['tar'])&&$_GET['act']!="view"&&$_GET['act']!="html") {
+$File = array_sort(untar($sourcedir.$_GET['tar'],"/",null,false,true),"FileType",'SORT_DESC'); }
+if((isset($_GET['tar'])&&$_GET['act']=="view")||
+ (isset($_GET['tar'])&&$_GET['act']=="html")||
+ (isset($_GET['tar'])&&$_GET['act']=="download")) {
+$File = array_sort(untar($sourcedir.$_GET['tar'],"/",null,false,false,$_GET['file']),"FileType",'SORT_DESC'); }
+if($_GET['act']=="view"||$_GET['act']=="html"||$_GET['act']=="download") {
+$i = 0; $num = count($File);
+$fileview = false;
+while ($i < $num) {
+if($_GET['file']==$File[$i]['FileName']) {
+ if(count(explode(".",$File[$i]['FileName']))>1) {
+ $FileExp = strtolower(end(explode(".",$File[$i]['FileName']))); }
+ if(count(explode(".",$File[$i]['FileName']))<=1) {
+ $FileExp = "null"; }
+ if(isset($FileExp)) { $FileExt = $FileExp; }
+ if(!in_array($FileExt, $txt_type)) { $_GET['act'] = "view";
+ $FileType = "application/octet-stream"; }
+ if(in_array($FileExt, $txt_type)) {
+ $FileType = $txt_mine_type[$FileExt];
+ if($_GET['act']=="html") { $FileType = "text/html"; } }
+ if(in_array($FileExt, $bin_type)) {
+ if($_GET['act']=="html") { $_GET['act'] = "view"; }
+ $FileType = $bin_mine_type[$FileExt]; }
+ if(in_array($FileExt, $img_type)) {
+ if($_GET['act']=="html") { $_GET['act'] = "view"; }
+ $FileType = $img_mine_type[$FileExt]; }
+ if($_GET['act']=="download") {
+ if($_GET['output']=="none") {
+ $FileType = "application/octet-stream";
+ header("Content-Disposition: attachment; filename=\"".basename($File[$i]['FileName'])."\""); }
+ if($_GET['output']=="gzip") {
+ $FileType = "application/x-gzip";
+ header("Content-Disposition: attachment; filename=\"".basename($File[$i]['FileName']).".gz\""); }
+ if($_GET['output']=="bzip2") {
+ $FileType = "application/x-bzip2";
+ header("Content-Disposition: attachment; filename=\"".basename($File[$i]['FileName']).".bz2\""); } }
+ header("Content-type: ".$FileType);
+ if($_GET['act']=="html") {?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title> Source Viewer 2k </title>
+ <meta name="generator" content="<?php echo $appversion; ?>" />
+ <base href="<?php echo $url; ?>" />
+ <link rel="icon" href="favicon.ico" type="image/icon" />
+ <link rel="shortcut icon" href="favicon.ico" type="image/icon" />
+<style type="text/css">
+img { border: 0; padding: 0 2px; vertical-align: text-bottom; }
+/*
+td { font-family: monospace; padding: 2px 3px; text-align: right; vertical-align: bottom; }
+td:first-child { text-align: left; padding: 2px 10px 2px 3px; }
+table { border: 0; }
+a.symlink { font-style: italic; }
+*/
+</style>
+ </head>
+ <body>
+ <?php
+ echo $txt_highlight_type[$FileExt]($File[$i]['FileContent']);
+ ?>
+ </body>
+</html>
+<?php }
+ if($_GET['act']=="view") {
+ echo $File[$i]['FileContent']; }
+ if($_GET['act']=="download") {
+ if($_GET['output']=="none") {
+ echo $File[$i]['FileContent']; }
+ if($_GET['output']=="gzip") {
+ echo gzencode($File[$i]['FileContent']); }
+ if($_GET['output']=="bzip2") {
+ echo bzcompress($File[$i]['FileContent']); } }
+ $fileview = true; }
+++$i; }
+if($fileview===false) { $_GET['act'] = "list"; } }
+if($_GET['act']=="list") {
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title> Source Viewer 2k </title>
+ <meta name="generator" content="<?php echo $appversion; ?>" />
+ <base href="<?php echo $url; ?>" />
+ <link rel="icon" href="favicon.ico" type="image/icon" />
+ <link rel="shortcut icon" href="favicon.ico" type="image/icon" />
+<style type="text/css">
+img { border: 0; padding: 0 2px; vertical-align: text-bottom; }
+td { font-family: monospace; padding: 2px 3px; text-align: right; vertical-align: bottom; }
+td:first-child { text-align: left; padding: 2px 10px 2px 3px; }
+table { border: 0; }
+a.symlink { font-style: italic; }
+</style>
+ </head>
+
+ <body>
+<?php
+header("Content-type: text/html");
+if(!isset($_GET['tar'])) {
+if(isset($_GET['dir'])) {
+ $_GET['dir'] = preg_replace("/(.*?)\.\/(.*?)/", "/", $_GET['dir']); }
+chdir($sourcedir.$_GET['dir']);
+if($dirstyle=="new") {
+echo "Reading dir ".$_GET['dir']."<br />\n";
+if($urltype===1) {
+echo "<img style=\"text-decoration: none;\" src=\"".$back_image."\" alt=\"dir\" /> <a href=\"?act=list&&dir=".$_GET['dir']."\">./</a><br />\n";
+echo "<img style=\"text-decoration: none;\" src=\"".$back_image."\" alt=\"dir\" /> <a href=\"?act=list&dir=".preg_replace("/^\\\\/isU", "",preg_replace('{/$}', '', dirname($_GET['dir'])))."/\">../</a><br />\n"; }
+if($urltype===2) {
+echo "<img style=\"text-decoration: none;\" src=\"".$back_image."\" alt=\"dir\" /> <a href=\"list".$_GET['dir']."\">./</a><br />\n";
+echo "<img style=\"text-decoration: none;\" src=\"".$back_image."\" alt=\"dir\" /> <a href=\"list".preg_replace("/^\\\\/isU", "",preg_replace('{/$}', '', dirname($_GET['dir'])))."/\">../</a><br />\n"; } }
+if($dirstyle=="old") {
+echo "<h1>Index of ".$_GET['dir']."</h1>\n";
+echo "<hr /><table><tbody>\n";
+if($urltype===1) {
+echo "<tr><td style=\"text-align: left;\"><img src=\"".$back_image."\" alt=\"dir\" /> <a href=\"?act=list&dir=".preg_replace("/^\\\\/isU", "",preg_replace('{/$}', '', dirname($_GET['dir'])))."/\">Parent Directory</a></td></tr>\n"; }
+if($urltype===2) {
+echo "<tr><td style=\"text-align: left;\"><img src=\"".$back_image."\" alt=\"dir\" /> <a href=\"list".preg_replace("/^\\\\/isU", "",preg_replace('{/$}', '', dirname($_GET['dir'])))."/\">Parent Directory</a></td></tr>\n"; } }
+ if (is_array(glob("*",GLOB_ONLYDIR))) {
+ foreach (glob("*",GLOB_ONLYDIR) as $filename) {
+ $FilePic = $dir_image;
+ $FileType = "dir";
+ if($urltype===1) {
+ if($dirstyle=="new") {
+ echo "<img style=\"text-decoration: none;\" src=\"".$FilePic."\" alt=\"".$FileType."\" /> <a href=\"?act=list&dir=".$_GET['dir'].$filename."/\">".$filename."</a><br />\n"; }
+ if($dirstyle=="old") {
+ echo "<tr>";
+ echo "<td style=\"text-align: left;\"><img style=\"text-decoration: none;\" src=\"".$FilePic."\" alt=\"".$FileType."\" /> <a href=\"?act=list&dir=".$_GET['dir'].$filename."/\">".$filename."</a></td>";
+ echo "<td> </td>";
+ echo "<td>".GMTimeChange("n/j/Y",filemtime($filename),$TimeOffSet,null,$_GET['dst'])."</td>";
+ echo "<td>".GMTimeChange("g:i:s A",filemtime($filename),$TimeOffSet,null,$_GET['dst'])."</td>";
+ echo "</tr>\n"; } }
+ if($urltype===2) {
+ if($dirstyle=="new") {
+ echo "<img style=\"text-decoration: none;\" src=\"".$FilePic."\" alt=\"".$FileType."\" /> <a href=\"list".$_GET['dir'].$filename."/\">".$_GET['dir'].$filename."</a><br />\n"; }
+ if($dirstyle=="old") {
+ echo "<tr>";
+ echo "<td style=\"text-align: left;\"><img style=\"text-decoration: none;\" src=\"".$FilePic."\" alt=\"".$FileType."\" /> <a href=\"list".$_GET['dir'].$filename."/\">".$filename."</a></td>";
+ echo "<td> </td>";
+ echo "<td>".GMTimeChange("n/j/Y",filemtime($filename),$TimeOffSet,null,$_GET['dst'])."</td>";
+ echo "<td>".GMTimeChange("g:i:s A",filemtime($filename),$TimeOffSet,null,$_GET['dst'])."</td>";
+ echo "</tr>\n"; } } } }
+ if (is_array(glob("*.tar"))) {
+ foreach (glob("*.tar") as $filename) {
+ $FilePic = $bin_image['tar'];
+ $FileType = "bin";
+ if($urltype===1) {
+ if($dirstyle=="new") {
+ echo "<a href=\"?act=".$dwntarlink."&output=gzip&tar=".$_GET['dir'].$filename."\"><img style=\"text-decoration: none;\" src=\"".$FilePic."\" alt=\"".$FileType."\" /></a> <a href=\"?act=list&tar=".$_GET['dir'].$filename."&dir=/\" title=\"".format_size(filesize($filename))."\">".$_GET['dir'].$filename."</a><br />\n"; }
+ if($dirstyle=="old") {
+ echo "<tr>";
+ echo "<td style=\"text-align: left;\"><a href=\"?act=".$dwntarlink."&output=gzip&tar=".$_GET['dir'].$filename."\"><img style=\"text-decoration: none;\" src=\"".$FilePic."\" alt=\"".$FileType."\" /></a> <a href=\"?act=list&tar=".$_GET['dir'].$filename."&dir=/\">".$filename."</a></td>";
+ echo "<td>".format_size(filesize($filename))."</td>";
+ echo "<td>".GMTimeChange("n/j/Y",filemtime($filename),$TimeOffSet,null,$_GET['dst'])."</td>";
+ echo "<td>".GMTimeChange("g:i:s A",filemtime($filename),$TimeOffSet,null,$_GET['dst'])."</td>";
+ echo "</tr>\n"; } }
+ if($urltype===2) {
+ if($dirstyle=="new") {
+ echo "<a href=\"".$dwntarlink.$_GET['dir'].$filename."\"><img style=\"text-decoration: none;\" src=\"".$FilePic."\" alt=\"".$FileType."\" /></a> <a href=\"list".$_GET['dir'].$filename.$PathSep."/\" title=\"".format_size(filesize($filename))."\">".$_GET['dir'].$filename."</a><br />\n"; }
+ if($dirstyle=="old") {
+ echo "<tr>";
+ echo "<td style=\"text-align: left;\"><a href=\"".$dwntarlink.$_GET['dir'].$filename."\"><img style=\"text-decoration: none;\" src=\"".$FilePic."\" alt=\"".$FileType."\" /></a> <a href=\"list".$_GET['dir'].$filename.$PathSep."/\">".$filename."</a></td>";
+ echo "<td>".format_size(filesize($filename))."</td>";
+ echo "<td>".GMTimeChange("n/j/Y",filemtime($filename),$TimeOffSet,null,$_GET['dst'])."</td>";
+ echo "<td>".GMTimeChange("g:i:s A",filemtime($filename),$TimeOffSet,null,$_GET['dst'])."</td>";
+ echo "</tr>\n"; } } } }
+if($dirstyle=="old") {
+echo "</tbody></table><hr />"; } }
+if(isset($_GET['tar'])) {
+$_GET['tar'] = preg_replace("/(.*?)\.\/(.*?)/", "/iDB.tar", $_GET['tar']);
+if(isset($_GET['dir'])&&strlen($_GET['dir'])>1) {
+ $_GET['dir'] = preg_replace('{/$}', '', $_GET['dir']); }
+if($dirstyle=="new") {
+echo "Reading dir ".$_GET['tar'].$PathSep.$_GET['dir']."<br />\n"; }
+if($dirstyle=="old") {
+echo "<h1>Index of ".$_GET['tar'].$PathSep.$_GET['dir']."</h1>\n";
+echo "<hr /><table>\n<tbody>";
+if($urltype===1) {
+if(isset($_GET['dir'])&&strlen($_GET['dir'])>1) {
+echo "<tr><td style=\"text-align: left;\"><img src=\"".$back_image."\" alt=\"dir\" /> <a href=\"?act=list&tar=".$_GET['tar']."&dir=".preg_replace("/^\\\\/isU", "/",dirname($_GET['dir']))."\">Parent Directory</a></td></tr>\n"; }
+if(isset($_GET['dir'])&&strlen($_GET['dir'])<=1) {
+echo "<tr><td style=\"text-align: left;\"><img src=\"".$back_image."\" alt=\"dir\" /> <a href=\"?act=list&dir=".preg_replace("/^\\\\/isU", "/",preg_replace('{/$}', '', dirname($_GET['tar'])))."/\">Parent Directory</a></td></tr>\n"; } }
+if($urltype===2) {
+if(isset($_GET['dir'])&&strlen($_GET['dir'])>1) {
+echo "<tr><td style=\"text-align: left;\"><img src=\"".$back_image."\" alt=\"dir\" /> <a href=\"list".$_GET['tar'].$PathSep.preg_replace("/^\\\\/isU", "/",dirname($_GET['dir']))."\">Parent Directory</a></td></tr>\n"; }
+if(isset($_GET['dir'])&&strlen($_GET['dir'])<=1) {
+echo "<tr><td style=\"text-align: left;\"><img src=\"".$back_image."\" alt=\"dir\" /> <a href=\"list".preg_replace("/^\\\\/isU", "/",preg_replace('{/$}', '', dirname($_GET['tar'])))."/\">Parent Directory</a></td></tr>\n"; } } }
+if($dirstyle=="new") {
+if($urltype===1) {
+echo "<img style=\"text-decoration: none;\" src=\"".$back_image."\" alt=\"dir\" /> <a href=\"?act=list&tar=".$_GET['tar']."&dir=".$_GET['dir']."\">./</a><br />\n";
+if(isset($_GET['dir'])&&strlen($_GET['dir'])>1) {
+echo "<img style=\"text-decoration: none;\" src=\"".$back_image."\" alt=\"dir\" /> <a href=\"?act=list&tar=".$_GET['tar']."&dir=".preg_replace("/^\\\\/isU", "/",dirname($_GET['dir']))."\">../</a><br />\n"; }
+if(isset($_GET['dir'])&&strlen($_GET['dir'])<=1) {
+echo "<img style=\"text-decoration: none;\" src=\"".$back_image."\" alt=\"dir\" /> <a href=\"?act=list&dir=".preg_replace("/^\\\\/isU", "/",preg_replace('{/$}', '', dirname($_GET['tar'])))."/\">../</a><br />\n"; } }
+if($urltype===2) {
+echo "<img style=\"text-decoration: none;\" src=\"".$back_image."\" alt=\"dir\" /> <a href=\"list".$_GET['tar'].$PathSep.$_GET['dir']."\">./</a><br />\n";
+if(isset($_GET['dir'])&&strlen($_GET['dir'])>1) {
+echo "<img style=\"text-decoration: none;\" src=\"".$back_image."\" alt=\"dir\" /> <a href=\"list".$_GET['tar'].$PathSep.preg_replace("/^\\\\/isU", "/",dirname($_GET['dir']))."\">../</a><br />\n"; }
+if(isset($_GET['dir'])&&strlen($_GET['dir'])<=1) {
+echo "<img style=\"text-decoration: none;\" src=\"".$back_image."\" alt=\"dir\" /> <a href=\"list".preg_replace("/^\\\\/isU", "/",preg_replace('{/$}', '', dirname($_GET['tar'])))."/\">../</a><br />\n"; } } }
+$i = 0; $num = count($File);
+while ($i < $num) {
+if($File[$i]['FileType']=="0"&&$_GET['dir']==preg_replace("/^\\\\/isU", "/",dirname($File[$i]['FileName']))) {
+ if(count(explode(".",$File[$i]['FileName']))>1) {
+ $FileExp = strtolower(end(explode(".",$File[$i]['FileName']))); }
+ if(count(explode(".",$File[$i]['FileName']))<=1) {
+ $FileExp = "null"; }
+ if(isset($FileExp)) { $FileExt = $FileExp; }
+ $FilePic = $unknown_image;
+ if(in_array($FileExt, $txt_type)) {
+ $FilePic = $txt_image[$FileExt]; }
+ if(in_array($FileExt, $bin_type)) {
+ $FilePic = $bin_image[$FileExt]; }
+ if(in_array($FileExt, $img_type)) {
+ $FilePic = $img_image[$FileExt]; }
+ if(!isset($FilePic)||$FilePic==""||$FilePic===null) {
+ $FilePic = $unknown_image; }
+ $FileType = "file";
+ if($urltype===1) {
+ if($dirstyle=="new") {
+ echo "<a href=\"?act=".$downloadlink."&tar=".$_GET['tar']."&file=".$File[$i]['FileName']."\"><img style=\"text-decoration: none;\" src=\"".$FilePic."\" alt=\"".$FileType."\" /></a> <a href=\"?act=".$urlview."&tar=".$_GET['tar']."&file=".$File[$i]['FileName']."\" title=\"".format_size($File[$i]['FileSize'])."\">".basename($File[$i]['FileName'])."</a><br />\n"; }
+ if($dirstyle=="old") {
+ echo "<tr>";
+ echo "<td style=\"text-align: left;\"><a href=\"?act=".$downloadlink."&tar=".$_GET['tar']."&file=".$File[$i]['FileName']."\"><img style=\"text-decoration: none;\" src=\"".$FilePic."\" alt=\"".$FileType."\" /></a> <a href=\"?act=".$urlview."&tar=".$_GET['tar']."&file=".$File[$i]['FileName']."\">".basename($File[$i]['FileName'])."</a></td>";
+ echo "<td>".format_size($File[$i]['FileSize'])."</td>";
+ echo "<td>".date("n/j/Y", $File[$i]['LastEdit'])."</td>";
+ echo "<td>".date("g:i:s A", $File[$i]['LastEdit'])."</td>";
+ echo "</tr>\n"; } }
+ if($urltype===2) {
+ if($dirstyle=="new") {
+ echo "<a href=\"".$downloadlink.$_GET['tar'].$PathSep.$File[$i]['FileName']."\"><img style=\"text-decoration: none;\" src=\"".$FilePic."\" alt=\"".$FileType."\" /></a> <a href=\"".$urlview.$_GET['tar'].$PathSep.$File[$i]['FileName']."\" title=\"".format_size($File[$i]['FileSize'])."\">".basename($File[$i]['FileName'])."</a><br />\n"; }
+ if($dirstyle=="old") {
+ echo "<tr>";
+ echo "<td style=\"text-align: left;\"><a href=\"".$downloadlink.$_GET['tar'].$PathSep.$File[$i]['FileName']."\"><img style=\"text-decoration: none;\" src=\"".$FilePic."\" alt=\"".$FileType."\" /></a> <a href=\"".$urlview.$_GET['tar'].$PathSep.$File[$i]['FileName']."\">".basename($File[$i]['FileName'])."</a></td>";
+ echo "<td>".format_size($File[$i]['FileSize'])."</td>";
+ echo "<td>".date("n/j/Y", $File[$i]['LastEdit'])."</td>";
+ echo "<td>".date("g:i:s A", $File[$i]['LastEdit'])."</td>";
+ echo "</tr>\n"; } } }
+if($File[$i]['FileType']=="5"&&$_GET['dir']==preg_replace("/^\\\\/isU", "/",dirname($File[$i]['FileName']))) {
+ $FilePic = $dir_image;
+ $FileType = "dir";
+ if($urltype===1) {
+ if($dirstyle=="new") {
+ echo "<img style=\"text-decoration: none;\" src=\"".$FilePic."\" alt=\"".$FileType."\" /> <a href=\"?act=list&tar=".$_GET['tar']."&dir=".preg_replace('{/$}', '', $File[$i]['FileName'])."\">".basename($File[$i]['FileName'])."</a><br />\n"; }
+ if($dirstyle=="old") {
+ echo "<tr>";
+ echo "<td style=\"text-align: left;\"><img style=\"text-decoration: none;\" src=\"".$FilePic."\" alt=\"".$FileType."\" /> <a href=\"?act=list&tar=".$_GET['tar']."&dir=".preg_replace('{/$}', '', $File[$i]['FileName'])."\">".basename($File[$i]['FileName'])."</a></td>";
+ echo "<td> </td>";
+ echo "<td>".date("n/j/Y", $File[$i]['LastEdit'])."</td>";
+ echo "<td>".date("g:i:s A", $File[$i]['LastEdit'])."</td>";
+ echo "</tr>\n"; } }
+ if($urltype===2) {
+ if($dirstyle=="new") {
+ echo "<img style=\"text-decoration: none;\" src=\"".$FilePic."\" alt=\"".$FileType."\" /> <a href=\"list".$_GET['tar'].$PathSep.preg_replace('{/$}', '', $File[$i]['FileName'])."\">".basename($File[$i]['FileName'])."</a><br />\n"; }
+ if($dirstyle=="old") {
+ echo "<tr>";
+ echo "<td style=\"text-align: left;\"><img style=\"text-decoration: none;\" src=\"".$FilePic."\" alt=\"".$FileType."\" /> <a href=\"list".$_GET['tar'].$PathSep.preg_replace('{/$}', '', $File[$i]['FileName'])."\">".basename($File[$i]['FileName'])."</a></td>";
+ echo "<td> </td>";
+ echo "<td>".date("n/j/Y", $File[$i]['LastEdit'])."</td>";
+ echo "<td>".date("g:i:s A", $File[$i]['LastEdit'])."</td>";
+ echo "</tr>\n"; } } }
+if($File[$i]['FileType']=="7"&&$_GET['dir']==preg_replace("/^\\\\/isU", "/",dirname($File[$i]['FileName']))) {
+ if(count(explode(".",$File[$i]['FileName']))>1) {
+ $FileExp = strtolower(end(explode(".",$File[$i]['FileName']))); }
+ if(count(explode(".",$File[$i]['FileName']))<=1) {
+ $FileExp = "null"; }
+ if(isset($FileExp)) { $FileExt = $FileExp; }
+ if(in_array($FileExt, $txt_type)) {
+ $FilePic = $txt_image[$FileExt]; }
+ if(in_array($FileExt, $bin_type)) {
+ $FilePic = $bin_image[$FileExt]; }
+ if(in_array($FileExt, $img_type)) {
+ $FilePic = $img_image[$FileExt]; }
+ $FileType = "file";
+ if($urltype===1) {
+ if($dirstyle=="new") {
+ echo "<a href=\"?act=".$downloadlink."&tar=".$_GET['tar']."&file=".$File[$i]['FileName']."\"><img style=\"text-decoration: none;\" src=\"".$FilePic."\" alt=\"".$FileType."\" /></a> <a href=\"?act=".$urlview."&tar=".$_GET['tar']."&file=".$File[$i]['FileName']."\" title=\"".format_size($File[$i]['FileSize'])."\">".basename($File[$i]['FileName'])."</a><br />\n"; }
+ if($dirstyle=="old") {
+ echo "<tr>";
+ echo "<td style=\"text-align: left;\"><img style=\"text-decoration: none;\" src=\"".$FilePic."\" alt=\"".$FileType."\" /> <a href=\"?act=list&tar=".$_GET['tar']."&dir=".preg_replace('{/$}', '', $File[$i]['FileName'])."\">".basename($File[$i]['FileName'])."</a></td>";
+ echo "<td> </td>";
+ echo "<td>".date("n/j/Y", $File[$i]['LastEdit'])."</td>";
+ echo "<td>".date("g:i:s A", $File[$i]['LastEdit'])."</td>";
+ echo "</tr>\n"; } }
+ if($urltype===1) {
+ if($dirstyle=="new") {
+ echo "<a href=\"".$urlview.$_GET['tar'].$PathSep.$File[$i]['FileName']."\"><img style=\"text-decoration: none;\" src=\"".$FilePic."\" alt=\"".$FileType."\" /></a> <a href=\"view".$_GET['tar'].$PathSep.$File[$i]['FileName']."\" title=\"".format_size($File[$i]['FileSize'])."\">".basename($File[$i]['FileName'])."</a><br />\n"; }
+ if($dirstyle=="old") {
+ echo "<tr>";
+ echo "<td style=\"text-align: left;\"><img style=\"text-decoration: none;\" src=\"".$FilePic."\" alt=\"".$FileType."\" /> <a href=\"list".$_GET['tar'].$PathSep.preg_replace('{/$}', '', $File[$i]['FileName'])."\">".basename($File[$i]['FileName'])."</a></td>";
+ echo "<td> </td>";
+ echo "<td>".date("n/j/Y", $File[$i]['LastEdit'])."</td>";
+ echo "<td>".date("g:i:s A", $File[$i]['LastEdit'])."</td>";
+ echo "</tr>\n"; } } }
+++$i; }
+if($dirstyle=="old") {
+echo "</tbody></table><hr />\n"; } }
+if($dirstyle=="old") {
+echo "<address>".$appversion."</address>\n"; }
+?>
+ </body>
+</html>
+<?php } ?>
\ No newline at end of file
--- /dev/null
+<?php
+/*
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the Revised BSD License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ Revised BSD License for more details.
+
+ Copyright 2004-2011 iDB Support - http://idb.berlios.de/
+ Copyright 2004-2011 Game Maker 2k - http://gamemaker2k.org/
+ iUnTar ver. 4.7 by Kazuki Przyborowski & Josep Sanz Campderros
+
+ $FileInfo: untar.php - Last Update: 11/14/2011 Ver 4.7 - Author: cooldude2k $
+*/
+
+// PHP iUnTAR Version 4.7
+// license: Revised BSD license
+// Kazuki Przyborowski (http://ja.gamemaker2k.org/)
+// Josep Sanz Campderros (http://saltos.net/)
+function untar($tarfile,$outdir="./",$chmod=null,$extract=true,$lsonly=false,$findfile=null) {
+$TarSize = filesize($tarfile);
+$TarSizeEnd = $TarSize - 1024;
+if($extract!==true&&$extract!==false) {
+ $extract = false; }
+if($lsonly!==true&&$lsonly!==false) {
+ $lsonly = false; }
+if($extract===true) {
+ $lsonly = false; }
+if($extract===true) {
+if($outdir!=""&&!file_exists($outdir)) {
+ mkdir($outdir,0777); } }
+$thandle = fopen($tarfile, "rb");
+$i = 0;
+if($extract===false) {
+ $FileArray = null; $i = 0; }
+$outdir = preg_replace('{/$}', '', $outdir)."/";
+if(isset($findfile)) {
+$qfindfile = preg_quote($findfile,"/"); }
+if(!isset($findfile)) {
+$qfindfile = null; }
+while (ftell($thandle)<$TarSizeEnd) {
+ $FileName = null;
+ $FileMode = null;
+ $OwnerID = null;
+ $GroupID = null;
+ $FileSize = null;
+ $LastEdit = null;
+ $Checksum = null;
+ $FileType = null;
+ $LinkedFile = null;
+ $FileContent = null;
+ $FileName = $outdir.trim(fread($thandle,100));
+ fseek($thandle,56,SEEK_CUR);
+ $FileType = trim(fread($thandle,1));
+ fseek($thandle,-57,SEEK_CUR);
+ if($findfile!==null&&$FileType!="L"&&!preg_match("/".$qfindfile."/",$FileName)) {
+ fseek($thandle,8,SEEK_CUR);
+ fseek($thandle,8,SEEK_CUR);
+ fseek($thandle,8,SEEK_CUR);
+ $FileSize = octdec(trim(fread($thandle,12)));
+ fseek($thandle,12,SEEK_CUR);
+ fseek($thandle,8,SEEK_CUR);
+ $FileType = trim(fread($thandle,1));
+ fseek($thandle,100,SEEK_CUR);
+ fseek($thandle,255,SEEK_CUR);
+ if($FileType=="0"||$FileType=="7") {
+ fseek($thandle,$FileSize,SEEK_CUR); } }
+ if($findfile===null||$FileType=="L"||preg_match("/".$qfindfile."/",$FileName)) {
+ $FileMode = trim(fread($thandle,8));
+ if($chmod===null) {
+ $FileCHMOD = octdec("0".substr($FileMode,-3)); }
+ if($chmod!==null) {
+ $FileCHMOD = $chmod; }
+ $OwnerID = trim(fread($thandle,8));
+ $GroupID = trim(fread($thandle,8));
+ $FileSize = octdec(trim(fread($thandle,12)));
+ $LastEdit = octdec(trim(fread($thandle,12)));
+ $Checksum = octdec(trim(fread($thandle,8)));
+ $FileType = trim(fread($thandle,1));
+ $LinkedFile = trim(fread($thandle,100));
+ fseek($thandle,255,SEEK_CUR);
+ // LongLink support added by Josep Sanz Campderros
+ if($FileType=="L"&&$FileSize>0) {
+ $FileName = $outdir.trim(fread($thandle,$FileSize));
+ fseek($thandle,512-$FileSize,SEEK_CUR);
+ fseek($thandle,100,SEEK_CUR);
+ $FileMode = trim(fread($thandle,8));
+ if($chmod===null) {
+ $FileCHMOD = octdec("0".substr($FileMode,-3)); }
+ if($chmod!==null) {
+ $FileCHMOD = $chmod; }
+ $OwnerID = trim(fread($thandle,8));
+ $GroupID = trim(fread($thandle,8));
+ $FileSize = octdec(trim(fread($thandle,12)));
+ $LastEdit = trim(fread($thandle,12));
+ $Checksum = trim(fread($thandle,8));
+ $FileType = trim(fread($thandle,1));
+ $LinkedFile = trim(fread($thandle,100));
+ fseek($thandle,255,SEEK_CUR); } }
+ if($findfile===null||preg_match("/".$qfindfile."/",$FileName)) {
+ if($FileType=="0"||$FileType=="7") {
+ if($lsonly===true) {
+ fseek($thandle,$FileSize,SEEK_CUR); }
+ if($lsonly===false) {
+ // Empty files support added by Josep Sanz Campderros
+ if($FileSize===0) {
+ $FileContent = ""; }
+ if($FileSize>0) {
+ $FileContent = fread($thandle,$FileSize); } } }
+ if($FileType=="1") {
+ $FileContent = null; }
+ if($FileType=="2") {
+ $FileContent = null; }
+ if($FileType=="5") {
+ $FileContent = null; }
+ if($FileType=="0"||$FileType=="7") {
+ if($extract===true) {
+ $subhandle = fopen($FileName, "wb+");
+ fwrite($subhandle,$FileContent,$FileSize);
+ fclose($subhandle);
+ chmod($FileName,$FileCHMOD); } }
+ if($FileType=="1") {
+ if($extract===true) {
+ link($FileName,$LinkedFile); } }
+ if($FileType=="2") {
+ if($extract===true) {
+ symlink($LinkedFile,$FileName); } }
+ if($FileType=="5") {
+ if($extract===true) {
+ mkdir($FileName,$FileCHMOD); } }
+ if($FileType=="0"||$FileType=="1"||$FileType=="2"||$FileType=="5"||$FileType=="7") {
+ if($extract===false) {
+ $FileArray[$i]['FileName'] = $FileName;
+ $FileArray[$i]['FileMode'] = $FileMode;
+ $FileArray[$i]['OwnerID'] = $OwnerID;
+ $FileArray[$i]['GroupID'] = $GroupID;
+ $FileArray[$i]['FileSize'] = $FileSize;
+ $FileArray[$i]['LastEdit'] = $LastEdit;
+ $FileArray[$i]['Checksum'] = $Checksum;
+ $FileArray[$i]['FileType'] = $FileType;
+ $FileArray[$i]['LinkedFile'] = $LinkedFile;
+ if($lsonly===false) {
+ $FileArray[$i]['FileContent'] = $FileContent; } } } }
+ //touch($FileName,$LastEdit);
+ if($extract===false&&$findfile===null&&isset($FileArray[$i]['FileName'])) { ++$i; }
+ if($extract===false) {
+ if($findfile!==null&&preg_match("/".$qfindfile."/",$FileName)&&isset($FileArray[$i]['FileName'])) { ++$i; } }
+ if($extract===true) {
+ if($findfile!==null&&preg_match("/".$qfindfile."/",$FileName)) { ++$i; } }
+ if(($FileType=="0"||$FileType=="7")&$FileSize>0) {
+ $CheckSize = 512;
+ while ($CheckSize<$FileSize) {
+ if($CheckSize<$FileSize) {
+ $CheckSize = $CheckSize + 512; } }
+ $SeekSize = $CheckSize - $FileSize;
+ fseek($thandle,$SeekSize,SEEK_CUR); } }
+ fclose($thandle);
+ if($extract===true) {
+ return true; }
+ if($extract===false) {
+ return $FileArray; } }
+function iuntar($tarfile,$outdir="./",$chmod=null,$extract=true,$lsonly=false,$findfile=null) {
+ return untar($tarfile,$outdir,$chmod,$extract,$lsonly,$findfile); }
+?>
\ No newline at end of file
--- /dev/null
+<?php
+@error_reporting(E_ALL ^ E_NOTICE);
+function file_list_dir($dirname) {
+if ($handle = opendir($dirname)) {
+while (false !== ($file = readdir($handle))) {
+ if ($dirnum==null) { $dirnum = 0; }
+ if ($file != "." && $file != ".." && $file != ".htaccess" && $file != null) {
+ if(filetype($dirname.$file)=="file") {
+ $srcfile[$dirnum] = $file; }
+ if(filetype($dirname.$file)=="dir") {
+ $srcdir[$dirnum] = $file; }
+ ++$dirnum;
+ } }
+if($srcdir!=null) { asort($srcdir); }
+if($srcfile!=null) { asort($srcfile); }
+if($srcdir!=null&&$srcfile!=null) {
+$fulllist = array_merge($srcdir, $srcfile); }
+if($srcdir!=null&&$srcfile==null) { $fulllist = $srcdir; }
+if($srcdir==null&&$srcfile!=null) { $fulllist = $srcfile; }
+closedir($handle); }
+ return $fulllist; }
+function gzip($infile, $outfile, $param = 5)
+{
+ $fp = fopen($infile, "r");
+ $data = fread ($fp, filesize($infile));
+ fclose($fp);
+ $zp = gzopen($outfile, "w".$param);
+ gzwrite($zp, $data);
+ gzclose($zp);
+}
+function bzip($infile, $outfile)
+{
+ $fp = fopen($infile, "r");
+ $data = fread($fp, filesize($infile));
+ fclose($fp);
+ $zp = bzopen($outfile, "w");
+ bzwrite($zp, $data);
+ bzclose($zp);
+}
+//chdir("C:\iDB\themes");
+function make_ipack_1($packname,$ziptype,$delunzip,$encodetype,$decodetype) {
+if($packname==null||$encodetype==null||
+ $decodetype==null) { return false; }
+if(!function_exists($encodetype)||
+ !function_exists($decodetype)) { return false; }
+$fal = file_list_dir($packname."/");
+$num = count($fal)-1; $i = 0;
+$fp = fopen($packname.".php","w+");
+$filecont = '<?php'."\n";
+$filecont = $filecont.'if (!file_exists("'.$packname.'")&&filetype("'.$packname.'")!="dir") {'."\n".'mkdir("'.$packname.'"); }'."\n".'chdir("'.$packname.'");'."\n";
+while ($i <= $num) {
+ $falc[$i] = file_get_contents($packname."/".$fal[$i]);
+ $falc[$i] = $encodetype($falc[$i]);
+ $filecont = $filecont.'$filename['."'$i'".'] = "'.$fal[$i].'";'."\n";
+ $filecont = $filecont.'$filecont['."'$i'".'] = "'.$falc[$i].'";'."\n";
+ $filecont = $filecont.'$filemd5['."'$i'".'] = "'.md5_file($packname."/".$fal[$i]).'";'."\n";
+ $filecont = $filecont.'$filesha1['."'$i'".'] = "'.sha1_file($packname."/".$fal[$i]).'";'."\n";
+ $filecont = $filecont.'$filecont['."'$i'".'] = '.$decodetype.'($filecont['."'$i'".']);'."\n";
+ $filecont = $filecont.'unset($fp);'."\n".'$fp = fopen($filename['."'$i'".'],"w+");'."\n";
+ $filecont = $filecont.'fwrite($fp, $filecont['."'$i'".']);'."\n".'fclose($fp);'."\n";
+ ++$i; }
+$filecont = $filecont.'?>';
+fwrite($fp, $filecont);
+fclose($fp);
+if($ziptype=="gzip") {
+gzip($packname.".php", $packname.".php.gz"); }
+if($ziptype=="bzip2") {
+bzip($packname.".php", $packname.".php.bz2"); }
+if($ziptype=="gzip&bzip2"||$ziptype=="bzip2&gzip"||
+ $ziptype=="gzip+bzip2"||$ziptype=="bzip2+gzip") {
+gzip($packname.".php", $packname.".php.gz");
+bzip($packname.".php", $packname.".php.bz2"); }
+if($delunzip==true) {
+unlink($packname.".php"); }
+return true; }
+make_ipack_1("iDB","gzip&bzip2",false,"base64_encode","base64_decode");
+
+function make_ipack_2($packname,$ziptype,$delunzip,$encodetypeone,$encodetypetwo,$decodetypeone,$decodetypetwo) {
+if($packname==null||$encodetypeone==null||
+ $decodetypeone==null) { return false; }
+if($encodetypeone!=null) {
+if(!function_exists($encodetypeone)) { return false; } }
+if($encodetypetwo!=null) {
+if(!function_exists($encodetypetwo)) { return false; } }
+if($decodetypeone!=null) {
+if(!function_exists($decodetypeone)) { return false; } }
+if($decodetypetwo!=null) {
+if(!function_exists($decodetypetwo)) { return false; } }
+$fal = file_list_dir($packname."/");
+$num = count($fal)-1; $i = 0;
+$fp = fopen($packname.".php","w+");
+$filecont = '<?php'."\n";
+$filecont = $filecont.'if (!file_exists("'.$packname.'")&&filetype("'.$packname.'")!="dir") {'."\n".'mkdir("'.$packname.'"); }'."\n".'chdir("'.$packname.'");'."\n";
+while ($i <= $num) {
+ $falc[$i] = file_get_contents($packname."/".$fal[$i]);
+ $falc[$i] = $encodetypeone($falc[$i]); $falc[$i] = $encodetypetwo($falc[$i]);
+ $filecont = $filecont.'$filename['."'$i'".'] = "'.$fal[$i].'";'."\n";
+ $filecont = $filecont.'$filecont['."'$i'".'] = "'.$falc[$i].'";'."\n";
+ $filecont = $filecont.'$filemd5['."'$i'".'] = "'.md5_file($packname."/".$fal[$i]).'";'."\n";
+ $filecont = $filecont.'$filesha1['."'$i'".'] = "'.sha1_file($packname."/".$fal[$i]).'";'."\n";
+ $filecont = $filecont.'$filecont['."'$i'".'] = '.$decodetypeone.'($filecont['."'$i'".']);'."\n";
+ $filecont = $filecont.'$filecont['."'$i'".'] = '.$decodetypetwo.'($filecont['."'$i'".']);'."\n";
+ $filecont = $filecont.'unset($fp);'."\n".'$fp = fopen($filename['."'$i'".'],"w+");'."\n";
+ $filecont = $filecont.'fwrite($fp, $filecont['."'$i'".']);'."\n".'fclose($fp);'."\n";
+ ++$i; }
+$filecont = $filecont.'?>';
+fwrite($fp, $filecont);
+fclose($fp);
+if($ziptype=="gzip") {
+gzip($packname.".php", $packname.".php.gz"); }
+if($ziptype=="bzip2") {
+bzip($packname.".php", $packname.".php.bz2"); }
+if($ziptype=="gzip&bzip2"||$ziptype=="bzip2&gzip"||
+ $ziptype=="gzip+bzip2"||$ziptype=="bzip2+gzip") {
+gzip($packname.".php", $packname.".php.gz");
+bzip($packname.".php", $packname.".php.bz2"); }
+if($delunzip==true) {
+unlink($packname.".php"); }
+return true; }
+make_ipack_2("iDB","bzip2",false,"gzcompress","base64_encode","base64_decode","gzuncompress");
+?>
\ No newline at end of file
--- /dev/null
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+ Revised BSD License
+
+Copyright (c) 2004-2011 Game Maker 2k.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the distribution.
+
+ 3. Neither the name of Game Maker 2k nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGE.
+
+The views and conclusions contained in the software and documentation are those of the
+authors and should not be interpreted as representing official policies, either expressed
+or implied, of <copyright holder>.
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\ No newline at end of file
--- /dev/null
+<?php
+/*
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the Revised BSD License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ Revised BSD License for more details.
+
+ Copyright 2009-2011 iDB Support - http://idb.berlios.de/
+ Copyright 2009-2011 Game Maker 2k - http://gamemaker2k.org/
+
+ $FileInfo: index.php - Last Update: 08/02/2011 Ver 3.1.2 - Author: cooldude2k $
+*/
+@ini_set("html_errors", false);
+@ini_set("track_errors", false);
+@ini_set("display_errors", false);
+@ini_set("report_memleaks", false);
+@ini_set("display_startup_errors", false);
+//@ini_set("error_log","logs/error.log");
+//@ini_set("log_errors","On");
+@ini_set("docref_ext", "");
+@ini_set("docref_root", "http://php.net/");
+@ini_set("date.timezone","UTC");
+@ini_set("default_mimetype","text/html");
+@error_reporting(E_ALL ^ E_NOTICE);
+@set_time_limit(30); @ignore_user_abort(true);
+if(function_exists("date_default_timezone_set")) {
+ @date_default_timezone_set("UTC"); }
+function idb_output_handler($buffer) { return $buffer; }
+@ob_start("idb_output_handler");
+header("Cache-Control: private, no-cache, no-store, must-revalidate, pre-check=0, post-check=0, max-age=0");
+header("Pragma: private, no-cache, no-store, must-revalidate, pre-check=0, post-check=0, max-age=0");
+header("P3P: CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\"");
+header("Date: ".gmdate("D, d M Y H:i:s")." GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+header("Expires: ".gmdate("D, d M Y H:i:s")." GMT");
+output_reset_rewrite_vars();
+$_GET['file'] = null;
+if($_GET['file']==null) {
+$mirrors['mirror'] = array("prdownload.berlios.de","downloads.sourceforge.net","get.idb.s1.jcink.com","ihost.net46.net","idb.gamemaker2k.org","of.openfoundry.org");
+$mirrors['url'] = array("http://prdownload.berlios.de/idb/","http://downloads.sourceforge.net/intdb/","http://get.idb.s1.jcink.com/","http://download.ihost.net46.net/","ftp://ftp.berlios.de/pub/idb/nighty-ver/","http://of.openfoundry.org/download_path/idb/0.4.6.696/");
+$mirrors['name'] = array("BerliOS","SourceForge","Get iDB @ iDB.S1.Jcink.com","Get iDB @ IHost.Net46.net","iDB Support FTP","OpenFoundry");
+$mirrors['links'] = array("http://developer.berlios.de/projects/idb/","http://sourceforge.net/projects/intdb","http://get.idb.s1.jcink.com/","http://download.ihost.net46.net/","http://idb.gamemaker2k.org/","http://of.openfoundry.org/projects/1220");
+//$files = array("iDB.zip","iDB.tar.gz","iDB.tar.bz2","iDB.tar.lzma","iDB.tar.xz","iDB.7z","iDB.deb","iDB.rpm","iDB-Host.zip","iDB-Host.tar.gz","iDB-Host.lzma","iDB-Host.tar.xz","iDB-Host.tar.bz2","iDB-Host.7z","iDB-Host.deb","iDB-Host.rpm","iDBEH-Mod.zip","iDBEH-Mod.tar.gz","iDBEH-Mod.tar.bz2","iDBEH-Mod.tar.lzma","iDBEH-Mod.tar.xz","iDBEH-Mod.7z");
+$files = array("iDB.zip","iDB.tar.gz","iDB.tar.bz2","iDB.tar.xz","iDB.7z","iDB-Host.zip","iDB-Host.tar.gz","iDB-Host.tar.xz","iDB-Host.tar.bz2","iDB-Host.7z","iDBEH-Mod.zip","iDBEH-Mod.tar.gz","iDBEH-Mod.tar.bz2","iDBEH-Mod.tar.xz","iDBEH-Mod.7z","iDBEH-SubMod.zip","iDBEH-SubMod.tar.gz","iDBEH-SubMod.tar.bz2","iDBEH-SubMod.tar.xz","iDBEH-SubMod.7z","webinstaller.zip","webinstaller.tar.gz","webinstaller.tar.bz2","webinstaller.7z");
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<title> iDB Download List </title>
+<meta http-equiv="content-language" content="en-US">
+<meta http-equiv="content-type" content="text/html; charset=iso-8859-15">
+<meta name="Generator" content="EditPlus">
+<meta name="Author" content="Cool Dude 2k">
+<meta name="Keywords" content="iDB Download List">
+<meta name="Description" content="iDB Download List">
+<meta name="ROBOTS" content="Index, FOLLOW">
+<meta name="revisit-after" content="1 days">
+<meta name="GOOGLEBOT" content="Index, FOLLOW">
+<meta name="resource-type" content="document">
+<meta name="distribution" content="global">
+<link rel="icon" href="favicon.ico" type="image/icon">
+<link rel="shortcut icon" href="favicon.ico" type="image/icon">
+<?php echo "<!-- Katarzyna o_O -->"; ?>
+</head>
+
+<body>
+<?php $i = 0; $num = count($mirrors['mirror']);
+echo "<!-- Renee Sabonis ^_^ -->";
+while($i < $num) {
+$l = 0; $nums = count($files); ?>
+<ul><li><a href="<?php echo $mirrors['links'][$i]; ?>"><?php echo $mirrors['name'][$i]; ?></a><ul>
+<?php while($l < $nums) { ?>
+ <li><a href="<?php echo $mirrors['url'][$i]; ?><?php echo $files[$l]; ?>"><?php echo $files[$l]; ?></a></li>
+<?php ++$l; }
+echo "<!-- Renee Sabonis ^_^ -->"; ?>
+</ul></li></ul>
+<?php ++$i; } ?>
+<div class="copyright">Powered by <a href="http://idb.berlios.de/" title="iDB Al 0.4.7 SVN 753" onclick="window.open(this.href);return false;">iDB VerCheck</a> © <a href="http://idb.berlios.de/support/category.php?act=view&id=2" title="Game Maker 2k" onclick="window.open(this.href);return false;">Game Maker 2k</a> @ 2004 - 2011</div>
+<?php echo "<!-- Dagmara O_o -->"; ?>
+</body>
+</html>
+<?php } ?>
--- /dev/null
+<?php
+/*
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the Revised BSD License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ Revised BSD License for more details.
+
+ Copyright 2009-2010 iDB Support - http://idb.berlios.de/
+ Copyright 2009-2010 Game Maker 2k - http://gamemaker2k.org/
+
+ $FileInfo: index.php - Last Update: 4/27/2009 Ver 2.5 - Author: cooldude2k $
+*/
+header('Location: ../index.php');
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/*
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the Revised BSD License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ Revised BSD License for more details.
+
+ Copyright 2009-2010 iDB Support - http://idb.berlios.de/
+ Copyright 2009-2010 Game Maker 2k - http://gamemaker2k.org/
+ Kill Register Globals (Register Globals are very lame we dont need them anyways. :P)
+
+ $FileInfo: index.php - Last Update: 4/27/2009 Ver 2.5 - Author: cooldude2k $
+*/
+$File3Name = basename($_SERVER['SCRIPT_NAME']);
+if ($File3Name=="killqlobals.php"||$File3Name=="/killqlobals.php") {
+ require('index.php');
+ exit(); }
+function unregister_globals() {
+ $REQUEST = $_REQUEST;
+ $GET = $_GET;
+ $POST = $_POST;
+ $COOKIE = $_COOKIE;
+ if(isset($_SESSION)) {
+ $SESSION = $_SESSION; }
+ $FILES = $_FILES;
+ $ENV = $_ENV;
+ $SERVER = $_SERVER;
+ foreach($GLOBALS as $key => $value) {
+ if($key!='GLOBALS') {
+ unset($GLOBALS[$key]); } }
+ $_REQUEST = $REQUEST;
+ $_GET = $GET;
+ $_POST = $POST;
+ $_COOKIE = $COOKIE;
+ if(isset($SESSION)) {
+ $_SESSION = $SESSION; }
+ $_FILES = $FILES;
+ $_ENV = $ENV;
+ $_SERVER = $SERVER; }
+unregister_globals();
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/*
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the Revised BSD License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ Revised BSD License for more details.
+
+ Copyright 2009-2010 iDB Support - http://idb.berlios.de/
+ Copyright 2009-2010 Game Maker 2k - http://gamemaker2k.org/
+
+ $FileInfo: index.php - Last Update: 4/27/2009 Ver 2.5 - Author: cooldude2k $
+*/
+header('Location: ../index.php');
+?>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="version.xsl"?>
+
+<!DOCTYPE versioninfo [
+<!ELEMENT versioninfo (version*)>
+<!ELEMENT version (relname,reltype,reltypename,relnum,subtype,relsvnum,fullrel,fullname)>
+<!ELEMENT relname (#PCDATA)>
+<!ELEMENT reltype (#PCDATA)>
+<!ELEMENT reltypename (#PCDATA)>
+<!ELEMENT relnum (#PCDATA)>
+<!ELEMENT subtype (#PCDATA)>
+<!ELEMENT relsvnum (#PCDATA)>
+<!ELEMENT fullrel (#PCDATA)>
+<!ELEMENT fullname (#PCDATA)>
+]>
+
+<versioninfo>
+
+<version>
+<relname>iDB</relname>
+<reltype>Al</reltype>
+<reltypename>Alpha</reltypename>
+<relnum>0.4.6</relnum>
+<subtype>SVN</subtype>
+<relsvnum>696</relsvnum>
+<fullrel>iDB Al 0.4.6</fullrel>
+<fullname>iDB Al 0.4.6 SVN 696</fullname>
+</version>
+
+<version>
+<relname>iDB-Host</relname>
+<reltype>Al</reltype>
+<reltypename>Alpha</reltypename>
+<relnum>0.4.6</relnum>
+<subtype>SVN</subtype>
+<relsvnum>696</relsvnum>
+<fullrel>iDB-Host Al 0.4.6</fullrel>
+<fullname>iDB-Host Al 0.4.6 SVN 696</fullname>
+</version>
+
+<version>
+<relname>iDBEH-Mod</relname>
+<reltype>Al</reltype>
+<reltypename>Alpha</reltypename>
+<relnum>0.4.6</relnum>
+<subtype>SVN</subtype>
+<relsvnum>696</relsvnum>
+<fullrel>iDBEH-Mod Al 0.4.6</fullrel>
+<fullname>iDBEH-Mod Al 0.4.6 SVN 696</fullname>
+</version>
+
+</versioninfo>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:template match="/">
+ <html xsl:version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">
+ <body style="font-family:Arial;font-size:12pt;background-color:#EEEEEE">
+ <xsl:for-each select="versioninfo/version">
+ <div style="background-color:teal;color:white;padding:4px">
+ <span style="font-weight:bold"><xsl:value-of select="fullrel"/></span>
+ </div>
+ <div style="margin-left:20px;margin-bottom:1em;font-size:10pt">
+ <span style="font-style:italic"><xsl:value-of select="fullname"/></span>
+ </div>
+ </xsl:for-each>
+ </body>
+ </html>
+</xsl:template>
+
+</xsl:stylesheet>
--- /dev/null
+<?php
+/*
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the Revised BSD License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ Revised BSD License for more details.
+
+ Copyright 2009-2011 iDB Support - http://idb.berlios.de/
+ Copyright 2009-2011 Game Maker 2k - http://gamemaker2k.org/
+
+ $FileInfo: index.php - Last Update: 08/02/2011 Ver 3.1.2 - Author: cooldude2k $
+*/
+/* Change to your url. */
+@ini_set("html_errors", false);
+@ini_set("track_errors", false);
+@ini_set("display_errors", false);
+@ini_set("report_memleaks", false);
+@ini_set("display_startup_errors", false);
+//@ini_set("error_log","logs/error.log");
+//@ini_set("log_errors","On");
+@ini_set("docref_ext", "");
+@ini_set("docref_root", "http://php.net/");
+@ini_set("date.timezone","UTC");
+@ini_set("default_mimetype","text/html");
+@error_reporting(E_ALL ^ E_NOTICE);
+@set_time_limit(30); @ignore_user_abort(true);
+if(function_exists("date_default_timezone_set")) {
+ @date_default_timezone_set("UTC"); }
+function idb_output_handler($buffer) { return $buffer; }
+@ob_start("idb_output_handler");
+header("Cache-Control: private, no-cache, no-store, must-revalidate, pre-check=0, post-check=0, max-age=0");
+header("Pragma: private, no-cache, no-store, must-revalidate, pre-check=0, post-check=0, max-age=0");
+header("P3P: CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\"");
+header("Date: ".gmdate("D, d M Y H:i:s")." GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+header("Expires: ".gmdate("D, d M Y H:i:s")." GMT");
+output_reset_rewrite_vars();
+require_once('inc/killglobals.php');
+$site_url = "http://localhost/vercheck/";
+$agent_site_url = $site_url."?act=vercheck";
+$site_name = "iDB Version checker";
+$appname = "iDB VerCheck";
+$download_url = $site_url."download.php";
+$site_version = "3.1.2";
+$ver_exp = explode(".",$site_version);
+if(!isset($ver_exp[3])) { $ver_exp[3] = null; }
+$appver = array($ver_exp[0],$ver_exp[1],$ver_exp[2],$ver_exp[3]);//Version of program
+$csryear = "2004"; $cryear = date("Y"); if($cryear<=2004) { $cryear = "2005"; }
+$site_useragent = "Mozilla/5.0 (compatible; iDB-VerCheck/".$site_version."; +".$agent_site_url.")";
+// Programs to check for add to array.
+// $iDBArray = array("RDB", "iDB", "iDB-Host", "iDBEH-Mod");//ReneeDB
+$iDBArray = array("iDB", "iDB-Host", "iDBEH-Mod");
+@ini_set("user_agent", $site_useragent);
+if (function_exists("stream_context_create")) {
+$opts = array(
+ 'http' => array(
+ 'method' => "GET",
+ 'header' => "Accept-Language: *\r\n".
+ "User-Agent: ".$site_useragent."\r\n".
+ "Accept: */*\r\n".
+ "Connection: keep-alive\r\n".
+ "Referer: ".$agent_site_url."\r\n".
+ "From: ".$agent_site_url."\r\n".
+ "Via: ".$_SERVER['REMOTE_ADDR']."\r\n".
+ "Forwarded: ".$_SERVER['REMOTE_ADDR']."\r\n".
+ "X-Forwarded-For: ".$_SERVER['REMOTE_ADDR']."\r\n".
+ "Client-IP: ".$_SERVER['REMOTE_ADDR']."\r\n"
+ )
+);
+$context = stream_context_create($opts); }
+function version_info($proname,$subver,$ver,$supver,$reltype,$svnver,$showsvn) {
+ $return_var = $proname." ".$reltype." ".$subver.".".$ver.".".$supver;
+ if($showsvn==false) { $showsvn = null; }
+ if($showsvn==true) { $return_var .= " SVN ".$svnver; }
+ if($showsvn!=true&&$showsvn!=null) { $return_var .= " ".$showsvn." ".$svnver; }
+ return $return_var; }
+$appversion = version_info($appname,$appver[0],$appver[1],$appver[2],$appver[3]." Ver.",null,false);
+if(!isset($_GET['redirect'])) { $_GET['redirect'] = "off"; }
+ /**
+ * Returns true if $string is valid UTF-8 and false otherwise.
+ *
+ * @since 1.14
+ * @param [mixed] $string string to be tested
+ * @subpackage
+ */
+ function is_utf8($string) {
+
+ // From http://w3.org/International/questions/qa-forms-utf-8.html
+ return preg_match('%^(?:
+ [\x09\x0A\x0D\x20-\x7E] # ASCII
+ | [\xC2-\xDF][\x80-\xBF] # non-overlong 2-byte
+ | \xE0[\xA0-\xBF][\x80-\xBF] # excluding overlongs
+ | [\xE1-\xEC\xEE\xEF][\x80-\xBF]{2} # straight 3-byte
+ | \xED[\x80-\x9F][\x80-\xBF] # excluding surrogates
+ | \xF0[\x90-\xBF][\x80-\xBF]{2} # planes 1-3
+ | [\xF1-\xF3][\x80-\xBF]{3} # planes 4-15
+ | \xF4[\x80-\x8F][\x80-\xBF]{2} # plane 16
+ )*$%xs', $string);
+
+ }
+ # Original PHP code by Chirp Internet: www.chirp.com.au
+ # Please acknowledge use of this code by including this header.
+
+ function robots_allowed($url, $useragent=false)
+ {
+ global $context;
+ # parse url to retrieve host and path
+ $parsed = parse_url($url);
+
+ $agents = array(preg_quote('*'));
+ if($useragent) $agents[] = preg_quote($useragent);
+ $agents = implode('|', $agents);
+
+ # location of robots.txt file
+ if (function_exists("stream_context_create")) {
+ $robotstxt = file_get_contents("http://{$parsed['host']}/robots.txt",false,$context);
+ } else {
+ $robotstxt = file_get_contents("http://{$parsed['host']}/robots.txt");
+ }
+ if(!$robotstxt) { return true; }
+
+ $rules = array();
+ $ruleapplies = false;
+ foreach($robotstxt as $line) {
+ # skip blank lines
+ if(!$line = trim($line)) continue;
+
+ # following rules only apply if User-agent matches $useragent or '*'
+ if(preg_match('/User-agent: (.*)/i', $line, $match)) {
+ $ruleapplies = preg_match("/($agents)/i", $match[1]);
+ }
+ if($ruleapplies && preg_match('/Disallow:(.*)/i', $line, $regs)) {
+ # an empty rule implies full access - no further tests required
+ if(!$regs[1]) return true;
+ # add rules that apply to array for testing
+ $rules[] = preg_quote(trim($regs[1]), '/');
+ }
+ }
+
+ foreach($rules as $rule) {
+ # check if page is disallowed to us
+ if(preg_match("/^$rule/", $parsed['path'])) return false;
+ }
+
+ # page is not disallowed
+ return true;
+ }
+if(!isset($_SERVER['HTTP_USER_AGENT'])) {
+ $_SERVER['HTTP_USER_AGENT'] = null; }
+if (stristr($_SERVER["HTTP_USER_AGENT"],"W3C_Validator")) {
+ $_SERVER["HTTP_ACCEPT"] = "application/xml"; }
+if(!isset($_SERVER['HTTP_ACCEPT'])) {
+ $_SERVER['HTTP_ACCEPT'] = null; }
+if(!isset($_SERVER['PATH_INFO'])) {
+ $_SERVER['PATH_INFO'] = null; }
+if(!isset($_GET['vercheck'])) { $_GET['vercheck'] = null; }
+if($_GET['redirect']=="js") {
+header("Content-Type: application/javascript; charset=UTF-8"); }
+if($_GET['redirect']=="xml") {
+if (stristr($_SERVER["HTTP_USER_AGENT"],"W3C_Validator")) {
+ $_SERVER["HTTP_ACCEPT"] = "application/xml"; }
+if(stristr($_SERVER["HTTP_ACCEPT"],"application/xml") ) {
+header("Content-Type: application/xml; charset=UTF-8"); }
+else { header("Content-Type: text/xml; charset=UTF-8"); } }
+if(!isset($_GET['act'])) { $_GET['act'] = "vercheck"; }
+if(isset($_GET['act'])&&$_GET['act']!="update") {
+if(!isset($_GET['name'])&&!isset($_GET['bid'])) {
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<title> <?php echo $site_name; ?> </title>
+<meta http-equiv="content-language" content="en-US">
+<meta http-equiv="content-type" content="text/html; charset=iso-8859-15">
+<meta name="Generator" content="EditPlus">
+<meta name="Author" content="Cool Dude 2k">
+<meta name="Keywords" content="<?php echo $site_name; ?>">
+<meta name="Description" content="<?php echo $site_name; ?>">
+<meta name="ROBOTS" content="Index, FOLLOW">
+<meta name="revisit-after" content="1 days">
+<meta name="GOOGLEBOT" content="Index, FOLLOW">
+<meta name="resource-type" content="document">
+<meta name="distribution" content="global">
+<link rel="icon" href="favicon.ico" type="image/icon">
+<link rel="shortcut icon" href="favicon.ico" type="image/icon">
+<!-- Katarzyna O_o -->
+</head>
+
+<body>
+<!-- Renee Sabonis ^_^ -->
+<form method="get" action="?act=vercheck&vercheck=newtype&encoded=false">
+<div>
+<input type="hidden" id="act" name="act" value="vercheck" />
+<label for="bid">Insert board url:</label><br />
+<input type="text" id="bid" name="bid" /><br />
+<input type="hidden" id="vercheck" name="vercheck" value="newtype" />
+<input type="hidden" id="encoded" name="encoded" value="false" />
+<input type="submit" />
+</div>
+</form>
+
+<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> © <a href="http://idb.berlios.de/support/category.php?act=view&id=2" title="Game Maker 2k" onclick="window.open(this.href);return false;">Game Maker 2k</a> @ <?php echo $csryear." - ".$cryear; ?></div>
+<!-- Stephanie Braun o_O -->
+</body>
+</html>
+<?php exit(); } }
+if(isset($_GET['bid'])) {
+ if(!isset($_GET['encoded'])) {
+ $_GET['encoded'] = "true"; }
+ if($_GET['encoded']=="true") {
+ $_GET['bid'] = @base64_decode($_GET['bid']); }
+ $_GET['bid'] = @urldecode($_GET['bid']);
+ $_GET['bid'] = @strip_tags($_GET['bid']);
+ if(robots_allowed($_GET['bid'],"iDB-VerCheck")===false) {
+ echo "Error cannot prase this site. :P ";
+ /* Then we cant prase this site now*/ exit(); die(); }
+ $ChkURL = parse_url($_GET['bid']);
+ $HostIP = gethostbyname($ChkURL['host']);
+ if($_GET['vercheck']=="newtype") {
+ $actchange = preg_quote("act=view", '/');
+ $_GET['bid'] = preg_replace("/".$actchange."/i", "act=versioninfo", $_GET['bid']);
+ if (function_exists("stream_context_create")) {
+ $GetTitle = file_get_contents($_GET['bid'],false,$context);
+ } else {
+ $GetTitle = file_get_contents($_GET['bid']);
+ } }
+ if($_GET['vercheck']!="newtype") {
+ if (function_exists("stream_context_create")) {
+ $GetTitle = file_get_contents($_GET['bid'],false,$context);
+ } else {
+ $GetTitle = file_get_contents($_GET['bid']);
+ } }
+ $_GET['bid'] = htmlspecialchars($_GET['bid']);
+ preg_match_all("/<title>(.*?)<\/title>/i", $GetTitle, $GetFullTitle);
+ $GetConType = $GetTitle;
+ $GetTitle = htmlspecialchars(strip_tags(trim($GetFullTitle[1][0])));
+ if($_GET['vercheck']=="newtype") {
+ $prequote1 = preg_quote("<charset>", '/');
+ $prequote2 = preg_quote("</charset>", '/'); }
+ if($_GET['vercheck']!="newtype") {
+ $prequote1 = preg_quote("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=", '/');
+ $prequote2 = preg_quote("\" />", '/'); }
+ preg_match_all("/".$prequote1."(.*?)".$prequote2."/i", $GetConType, $GetCType);
+ $prequote1 = preg_quote("<name>", '/');
+ $prequote2 = preg_quote("</name>", '/');
+ preg_match_all("/".$prequote1."(.*?)".$prequote2."/i", $GetConType, $GetVerNum);
+ if(!isset($GetVerNum[1][0])) {
+ $prequote1 = preg_quote("<!-- generator=\"", '/');
+ $prequote2 = preg_quote("\" -->", '/');
+ preg_match_all("/".$prequote1."(.*?)".$prequote2."/i", $GetConType, $GetVerNum); }
+ if(!isset($GetVerNum[1][0])) {
+ $prequote1 = preg_quote("<meta name=\"Generator\" content=\"", '/');
+ $prequote2 = preg_quote("\" />", '/');
+ preg_match_all("/".$prequote1."(.*?)".$prequote2."/i", $GetConType, $GetVerNum); }
+ if(!isset($GetVerNum[1][0])) {
+ $prequote1 = preg_quote("<a href=\"http://idb.berlios.de/\" title=\"", '/');
+ $prequote2 = preg_quote("\" onclick=\"window.open(this.href);return false;\">", '/');
+ preg_match_all("/".$prequote1."(.*?)".$prequote2."/i", $GetConType, $GetVerNum); }
+ if(!isset($GetVerNum[1][0])) { $GetVerNum[1][0] = null; }
+ $GetVerNum = $GetVerNum[1][0];
+ $GetVerNum = preg_replace("/iDB EH Mod/i", "iDBEH-Mod", $GetVerNum);
+ $GetVerNum = preg_replace("/iDB EH/i", "iDB-Host", $GetVerNum);
+ $GetVerNum = preg_replace("/\s/i", "|", $GetVerNum);
+ if(!isset($_GET['name'])) { $_GET['name'] = $GetVerNum; }
+ if(!isset($GetCType[1][0])) {
+ if(is_utf8($GetTitle)==true) { $GetCType[1][0] = "UTF-8"; }
+ if(is_utf8($GetTitle)==false) { $GetCType[1][0] = "UTF-8";
+ $GetTitle = utf8_encode($GetTitle); }
+ $preq1 = preg_quote("&#", '/');
+ $GetTitle = preg_replace("/".$preq1."(.*?);/isU","&#\\1;",$GetTitle);
+ $preq2 = preg_quote("&#x", '/');
+ $GetTitle = preg_replace("/".$preq2."(.*?);/isU","&#x\\1;",$GetTitle);
+ if(!isset($GetCType[1][0])) { $GetCType[1][0] = null; }
+ $BoardLang = $GetCType[1][0];
+ if(isset($BoardLang)) {
+ if($BoardLang!="ISO-8859-15"&&$BoardLang!="ISO-8859-1"&&
+ $BoardLang!="UTF-8"&&$BoardLang!="CP866"&&
+ $BoardLang!="Windows-1251"&&$BoardLang!="Windows-1252"&&
+ $BoardLang!="KOI8-R"&&$BoardLang!="BIG5"&&
+ $BoardLang!="GB2312"&&$BoardLang!="BIG5-HKSCS"&&
+ $BoardLang!="Shift_JIS"&&$BoardLang!="EUC-JP") {
+ $BoardLang = "ISO-8859-15"; } }
+ $GetFullTitle = $GetTitle; } }
+if(!isset($_GET['bid'])) { $_GET['bid'] = null; }
+// Make the Query String if we are not useing &=
+function qstring($qstr=";",$qsep="=")
+{ $_GET = null; $_GET = array();
+if (!isset($_SERVER['QUERY_STRING'])) {
+$_SERVER['QUERY_STRING'] = getenv('QUERY_STRING'); }
+@ini_get("arg_separator.input", $qstr);
+$_SERVER['QUERY_STRING'] = urldecode($_SERVER['QUERY_STRING']);
+$preqs = explode($qstr,$_SERVER["QUERY_STRING"]);
+$qsnum = count($preqs); $qsi = 0;
+while ($qsi < $qsnum) {
+$preqst = explode($qsep,$preqs[$qsi],2);
+$fix1 = array(" ",'$'); $fix2 = array("_","_");
+$preqst[0] = str_replace($fix1, $fix2, $preqst[0]);
+$preqst[0] = killbadvars($preqst[0]);
+if($preqst[0]!=null) {
+$_GET[$preqst[0]] = $preqst[1]; }
+++$qsi; } return true; }
+if($_SERVER['PATH_INFO']==null) {
+ if(@getenv('PATH_INFO')!=null&&@getenv('PATH_INFO')!="1") {
+$_SERVER['PATH_INFO'] = @getenv('PATH_INFO'); }
+if(@getenv('PATH_INFO')==null) {
+$myscript = $_SERVER["SCRIPT_NAME"];
+$myphpath = $_SERVER["PHP_SELF"];
+$mypathinfo = str_replace($myscript, "", $myphpath);
+@putenv("PATH_INFO=".$mypathinfo); } }
+// Change Path info to Get Vars :
+function mrstring() {
+$urlvar = explode('/',$_SERVER['PATH_INFO']);
+$num=count($urlvar); $i=1;
+while ($i < $num) {
+//$urlvar[$i] = urldecode($urlvar[$i]);
+if(!isset($_GET[$urlvar[$i]])) { $_GET[$urlvar[$i]] = null; }
+if(!isset($urlvar[$i])) { $urlvar[$i] = null; }
+if($_GET[$urlvar[$i]]==null&&$urlvar[$i]!=null) {
+$fix1 = array(" ",'$'); $fix2 = array("_","_");
+$urlvar[$i] = str_replace($fix1, $fix2, $urlvar[$i]);
+$urlvar[$i] = killbadvars($urlvar[$i]);
+ $_GET[$urlvar[$i]] = $urlvar[$i+1]; }
+++$i; ++$i; } return true; }
+// Redirect to another file with ether timed or nontimed redirect
+function redirect($type,$file,$time=0,$url=null,$dbsr=true) {
+if($type!="location"&&$type!="refresh") { $type=="location"; }
+if($url!=null) { $file = $url.$file; }
+if($dbsr===true) { $file = str_replace("//", "/", $file); }
+if($type=="refresh") { header("Refresh: ".$time."; URL=".$file); }
+if($type=="location") { @session_write_close();
+header("Location: ".$file); } return true; }
+function redirects($type,$url,$time=0) {
+if($type!="location"&&$type!="refresh") { $type=="location"; }
+if($type=="refresh") { header("Refresh: ".$time."; URL=".$url); }
+if($type=="location") { header("Location: ".$url); } return true; }
+// Make xhtml tags
+function html_tag_make($name="br",$emptytag=true,$attbvar=null,$attbval=null,$extratest=null) {
+ $var_num = count($attbvar); $value_num = count($attbval);
+ if($var_num!=$value_num) {
+ echo "Erorr Number of Var and Values dont match!";
+ return false; } $i = 0;
+ while ($i < $var_num) {
+ if($i==0) { $mytag = "<".$name." ".$attbvar[$i]."=\"".$attbval[$i]."\""; }
+ if($i>=1) { $mytag = $mytag." ".$attbvar[$i]."=\"".$attbval[$i]."\""; }
+ if($i==$var_num-1) {
+ if($emptytag===false) { $mytag = $mytag.">"; }
+ if($emptytag===true) { $mytag = $mytag." />"; } } ++$i; }
+ if($attbvar==null&&$attbval==null) { $mytag = "<".$name;
+ if($emptytag===true) { $mytag = $mytag." />"; }
+ if($emptytag===false) { $mytag = $mytag.">"; } }
+ if($emptytag===false&&$extratest!=null) {
+ $mytag = $mytag.$extratest; $mytag = $mytag."</".$name.">"; }
+ return $mytag; }
+// Start a xml document
+function xml_tag_make($type,$attbs,$retval=false) {
+ $renee1 = explode("&",$attbs);
+ $reneenum=count($renee1);
+ $reneei=0; $attblist = null;
+ while ($reneei < $reneenum) {
+ $renee2 = explode("=",$renee1[$reneei]);
+ if($renee2[0]!=null||$renee2[1]!=null) {
+ $attblist = $attblist.' '.$renee2[0].'="'.$renee2[1].'"'; }
+ ++$reneei; }
+ if($retval!==false&&$retval!==true) { $retval=false; }
+ if($retval===false) {
+ echo '<?'.$type.$attblist.'?>'."\n"; }
+ if($retval===true) {
+ return '<?'.$type.$attblist.'?>'."\n"; } }
+// Start a xml document (old version)
+function xml_doc_start($ver,$encode,$retval=false) {
+ if($retval===false) {
+ echo xml_tag_make('xml','version='.$ver.'&encoding='.$encode,true); }
+ if($retval===true) {
+ return xml_tag_make('xml','version='.$ver.'&encoding='.$encode,true); } }
+if($_GET['redirect']!="on"&&$_GET['redirect']!="xml"&&$_GET['redirect']!="js") {
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<?php if(isset($GetFullTitle)) { ?>
+<title> <?php echo $site_name; ?> - Checking <?php echo $GetFullTitle; ?> </title>
+<?php } if(!isset($GetFullTitle)) { ?>
+<title> <?php echo $site_name; ?> </title>
+<?php } ?>
+<meta http-equiv="content-language" content="en-US">
+<?php if(isset($BoardLang)) { ?>
+<meta http-equiv="content-type" content="text/html; charset=<?php echo $BoardLang; ?>">
+<?php } if(!isset($BoardLang)) { ?>
+<meta http-equiv="content-type" content="text/html; charset=iso-8859-15">
+<?php } ?>
+<meta name="Generator" content="EditPlus">
+<meta name="Author" content="Cool Dude 2k">
+<meta name="Keywords" content="<?php echo $site_name; ?>">
+<meta name="Description" content="<?php echo $site_name; ?>">
+<meta name="ROBOTS" content="Index, FOLLOW">
+<meta name="revisit-after" content="1 days">
+<meta name="GOOGLEBOT" content="Index, FOLLOW">
+<meta name="resource-type" content="document">
+<meta name="distribution" content="global">
+<link rel="icon" href="favicon.ico" type="image/icon">
+<link rel="shortcut icon" href="favicon.ico" type="image/icon">
+<!-- Katarzyna O_o -->
+</head>
+
+<body>
+<!-- Renee Sabonis ^_^ -->
+<?php }
+if(!isset($_GET['act'])) { $_GET['act'] = null; }
+if(!isset($_GET['redirect'])) { $_GET['redirect'] = null; }
+if(isset($_GET['act'])&&$_GET['act']=="update") {
+if (function_exists("stream_context_create")) {
+ $GetNewVersion = file_get_contents("http://developer.berlios.de/project/showfiles.php?group_id=6135",false,$context);
+} else {
+ $GetNewVersion = file_get_contents("http://developer.berlios.de/project/showfiles.php?group_id=6135");
+}
+$prepreg1 = preg_quote("<TD colspan=\"3\"><h3>iDB</h3></TD>","/");
+$prepreg2 = preg_quote("</A></B></TD>","/");
+preg_match_all("/".$prepreg1."(.*)".$prepreg2."{1}/isU", $GetNewVersion, $NewVersionPart);
+$prepreg1 = preg_quote("SVN ","/");
+$prepreg2 = preg_quote("</A>","/");
+preg_match_all("/".$prepreg1."(.*)".$prepreg2."{1}/isU", $NewVersionPart[0][0], $NewVersionPart);
+$NewSVNPart = $NewVersionPart[1][0];
+if (function_exists("stream_context_create")) {
+ $GetSVNVersion = file_get_contents("http://intdb.svn.sourceforge.net/viewvc/intdb/trunk/inc/versioninfo.php?revision=".$NewSVNPart,false,$context);
+} else {
+ $GetSVNVersion = file_get_contents("http://intdb.svn.sourceforge.net/viewvc/intdb/trunk/inc/versioninfo.php?revision=".$NewSVNPart);
+}
+$newver['subver'] = $NewSVNPart;
+$prepreg1 = preg_quote("\$VER1[0] = ","/");
+$prepreg2 = preg_quote(";","/");
+preg_match_all("/".$prepreg1."(.*)".$prepreg2."{1}/isU", $GetSVNVersion, $GetVer0);
+$GetVer0 = $GetVer0[1][0];
+$prepreg1 = preg_quote("\$VER1[1] = ","/");
+$prepreg2 = preg_quote(";","/");
+preg_match_all("/".$prepreg1."(.*)".$prepreg2."{1}/isU", $GetSVNVersion, $GetVer1);
+$GetVer1 = $GetVer1[1][0];
+$prepreg1 = preg_quote("\$VER1[2] = ","/");
+$prepreg2 = preg_quote(";","/");
+preg_match_all("/".$prepreg1."(.*)".$prepreg2."{1}/isU", $GetSVNVersion, $GetVer2);
+$GetVer2 = $GetVer2[1][0];
+$newver['ver'] = $GetVer0.".".$GetVer1.".".$GetVer2;
+$prepreg1 = preg_quote("\$VER2[0] = \"","/");
+$prepreg2 = preg_quote("\";","/");
+preg_match_all("/".$prepreg1."(.*)".$prepreg2."{1}/isU", $GetSVNVersion, $GetFullVerType);
+$newver['fullreltype'] = $GetFullVerType[1][0];
+$prepreg1 = preg_quote("\$VER2[1] = \"","/");
+$prepreg2 = preg_quote("\";","/");
+preg_match_all("/".$prepreg1."(.*)".$prepreg2."{1}/isU", $GetSVNVersion, $GetVerType);
+$newver['reltype'] = $GetVerType[1][0];
+$prepreg1 = preg_quote("\$VER2[2] = \"","/");
+$prepreg2 = preg_quote("\";","/");
+preg_match_all("/".$prepreg1."(.*)".$prepreg2."{1}/isU", $GetSVNVersion, $GetVerSubType);
+$newver['subtype'] = $GetVerSubType[1][0];
+echo "Sorry need more info to check version.";
+$VersionXML = xml_doc_start("1.0","UTF-8",true);
+$VersionXML .= xml_tag_make("xml-stylesheet","type=text/xsl&href=version.xsl",true)."\n";
+$VersionXML .= "<!DOCTYPE versioninfo [\n";
+$VersionXML .= "<!ELEMENT versioninfo (version*)>\n";
+$VersionXML .= "<!ELEMENT version (relname,reltype,reltypename,relnum,subtype,relsvnum,fullrel,fullname)>\n";
+$VersionXML .= "<!ELEMENT relname (#PCDATA)>\n";
+$VersionXML .= "<!ELEMENT reltype (#PCDATA)>\n";
+$VersionXML .= "<!ELEMENT reltypename (#PCDATA)>\n";
+$VersionXML .= "<!ELEMENT relnum (#PCDATA)>\n";
+$VersionXML .= "<!ELEMENT subtype (#PCDATA)>\n";
+$VersionXML .= "<!ELEMENT relsvnum (#PCDATA)>\n";
+$VersionXML .= "<!ELEMENT fullrel (#PCDATA)>\n";
+$VersionXML .= "<!ELEMENT fullname (#PCDATA)>\n";
+$VersionXML .= "]>\n\n";
+$VersionXML .= "<versioninfo>\n\n";
+$VersionXML .= "<version>\n";
+$VersionXML .= "<relname>iDB</relname>\n";
+$VersionXML .= "<reltype>".$newver['reltype']."</reltype>\n";
+$VersionXML .= "<reltypename>".$newver['fullreltype']."</reltypename>\n";
+$VersionXML .= "<relnum>".$newver['ver']."</relnum>\n";
+$VersionXML .= "<subtype>".$newver['subtype']."</subtype>\n";
+$VersionXML .= "<relsvnum>".$newver['subver']."</relsvnum>\n";
+$VersionXML .= "<fullrel>iDB ".$newver['reltype']." ".$newver['ver']."</fullrel>\n";
+$VersionXML .= "<fullname>iDB ".$newver['reltype']." ".$newver['ver']." ".$newver['subtype']." ".$newver['subver']."</fullname>\n";
+$VersionXML .= "</version>\n\n";
+$VersionXML .= "<version>\n";
+$VersionXML .= "<relname>iDB-Host</relname>\n";
+$VersionXML .= "<reltype>".$newver['reltype']."</reltype>\n";
+$VersionXML .= "<reltypename>".$newver['fullreltype']."</reltypename>\n";
+$VersionXML .= "<relnum>".$newver['ver']."</relnum>\n";
+$VersionXML .= "<subtype>".$newver['subtype']."</subtype>\n";
+$VersionXML .= "<relsvnum>".$newver['subver']."</relsvnum>\n";
+$VersionXML .= "<fullrel>iDB-Host ".$newver['reltype']." ".$newver['ver']."</fullrel>\n";
+$VersionXML .= "<fullname>iDB-Host ".$newver['reltype']." ".$newver['ver']." ".$newver['subtype']." ".$newver['subver']."</fullname>\n";
+$VersionXML .= "</version>\n\n";
+$VersionXML .= "<version>\n";
+$VersionXML .= "<relname>iDBEH-Mod</relname>\n";
+$VersionXML .= "<reltype>".$newver['reltype']."</reltype>\n";
+$VersionXML .= "<reltypename>".$newver['fullreltype']."</reltypename>\n";
+$VersionXML .= "<relnum>".$newver['ver']."</relnum>\n";
+$VersionXML .= "<subtype>".$newver['subtype']."</subtype>\n";
+$VersionXML .= "<relsvnum>".$newver['subver']."</relsvnum>\n";
+$VersionXML .= "<fullrel>iDBEH-Mod ".$newver['reltype']." ".$newver['ver']."</fullrel>\n";
+$VersionXML .= "<fullname>iDBEH-Mod ".$newver['reltype']." ".$newver['ver']." ".$newver['subtype']." ".$newver['subver']."</fullname>\n";
+$VersionXML .= "</version>\n\n";
+$VersionXML .= "</versioninfo>";
+$fp = fopen("./inc/version.xml","w+");
+fwrite($fp, $VersionXML);
+fclose($fp); }
+
+if($_GET['act']!="update") {
+$VersionFile = file_get_contents("inc/version.xml");
+if(!isset($iDBArray)) {
+$iDBArray = array("iDB", "iDB-Host", "iDBEH-Mod"); }
+$NamePart = explode("|", $_GET['name']);
+if(count($NamePart)>=5) {
+$_GET['name'] = $NamePart[0];
+if(!isset($_GET['reltype'])&&isset($NamePart[1])) {
+ $_GET['reltype'] = $NamePart[1]; }
+if(!isset($_GET['ver'])&&isset($NamePart[2])) {
+ $_GET['ver'] = $NamePart[2]; }
+if(!isset($_GET['subtype'])&&isset($NamePart[3])) {
+ $_GET['subtype'] = $NamePart[3]; }
+if(!isset($_GET['subver'])&&isset($NamePart[4])) {
+ $_GET['subver'] = $NamePart[4]; } }
+if(count($NamePart)<5&&count($NamePart)!=1) {
+if(!isset($_GET['name'])||!isset($_GET['reltype'])||!isset($_GET['ver'])||
+ !isset($_GET['subtype'])||!isset($_GET['subver'])) {
+ echo "Sorry need more info to check version."; ?>
+
+<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> © <a href="http://idb.berlios.de/support/category.php?act=view&id=2" title="Game Maker 2k" onclick="window.open(this.href);return false;">Game Maker 2k</a> @ <?php echo $csryear." - ".$cryear; ?></div>
+<!-- Stephanie Braun o_O -->
+</body>
+</html>
+<?php exit(); } }
+if(!isset($_GET['name'])||!isset($_GET['reltype'])||!isset($_GET['ver'])||
+ !isset($_GET['subtype'])||!isset($_GET['subver'])) {
+ echo "Sorry need more info to check version."; ?>
+<?php exit(); }
+if(count($NamePart)==1) { $_GET['name'] = $NamePart[0]; }
+if(!in_array($_GET['name'],$iDBArray)) { echo "Sorry cound not find ".$_GET['name']."."; ?>
+
+<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> © <a href="http://idb.berlios.de/support/category.php?act=view&id=2" title="Game Maker 2k" onclick="window.open(this.href);return false;">Game Maker 2k</a> @ <?php echo $csryear." - ".$cryear; ?></div>
+</body>
+</html>
+<?php exit(); }
+$VerSplit = explode(".", $_GET['ver']);
+if(count($VerSplit)>3||count($VerSplit)<3) {
+echo "Sorry version number is not formated right"; exit(); }
+preg_match_all("/([a-zA-Z]+)([0-9]+)/i", $_GET['reltype'], $reltypeChCk);
+if(isset($reltypeChCk[0][0])) {
+$_GET['reltype'] = $reltypeChCk[1][0];
+$uvercheck['reltypex'] = $reltypeChCk[2][0]; }
+if(!isset($reltypeChCk[0][0])) {
+preg_match_all("/([a-zA-Z]+)/i", $_GET['reltype'], $reltypeChCk);
+$_GET['reltype'] = $reltypeChCk[1][0];
+$uvercheck['reltypex'] = "0"; }
+/*
+PA (Pre-Alpha) = 100
+A - Al (Alpha) = 200
+PB (Pre-Beta) = 300
+B - Be (Beta) = 400
+G - Ga (Gamma) = 500
+D - De (Delta) = 600
+O - Om (Omega) = 700
+Z - Ze (Zenith) = 800
+R - RC (Release Candidate) = 900
+F - FR (Final Release) = 950
+*/
+// Pre-Alpha
+if($_GET['reltype']=="PA") {
+ $uvercheck['reltypenum'] = 100 + $uvercheck['reltypex']; }
+// Alpha
+if($_GET['reltype']=="A"||
+ $_GET['reltype']=="Al") {
+ $uvercheck['reltypenum'] = 200 + $uvercheck['reltypex']; }
+// Pre-Beta
+if($_GET['reltype']=="PB") {
+ $uvercheck['reltypenum'] = 300 + $uvercheck['reltypex']; }
+// Beta
+if($_GET['reltype']=="B"||
+ $_GET['reltype']=="Be") {
+ $uvercheck['reltypenum'] = 400 + $uvercheck['reltypex']; }
+// Gamma
+if($_GET['reltype']=="G"||
+ $_GET['reltype']=="Ga") {
+ $uvercheck['reltypenum'] = 500 + $uvercheck['reltypex']; }
+// Delta
+if($_GET['reltype']=="D"||
+ $_GET['reltype']=="De") {
+ $uvercheck['reltypenum'] = 600 + $uvercheck['reltypex']; }
+// Omega
+if($_GET['reltype']=="O"||
+ $_GET['reltype']=="Om") {
+ $uvercheck['reltypenum'] = 700 + $uvercheck['reltypex']; }
+// Zenith
+if($_GET['reltype']=="Z"||
+ $_GET['reltype']=="Ze") {
+ $uvercheck['reltypenum'] = 800 + $uvercheck['reltypex']; }
+// Release Candidate
+if($_GET['reltype']=="R"||
+ $_GET['reltype']=="RC") {
+ $uvercheck['reltypenum'] = 900 + $uvercheck['reltypex']; }
+// Final Release
+if($_GET['reltype']=="F"||
+ $_GET['reltype']=="FR") {
+ $uvercheck['reltypenum'] = 950 + $uvercheck['reltypex']; }
+if($uvercheck['reltypex']!=0) {
+ $_GET['reltype'] = $_GET['reltype'].$uvercheck['reltypex']; }
+$FullRelNum = $VerSplit[0].$VerSplit[1].$VerSplit[2].".".$uvercheck['reltypenum'].$_GET['subver'];
+$prepreg1 = preg_quote("<version>\n<relname>".$_GET['name']."</relname>","/");
+$prepreg2 = preg_quote("</version>","/");
+preg_match_all("/".$prepreg1."(.*)".$prepreg2."{1}/isU", $VersionFile, $VersionPart);
+$VersionPart = $VersionPart[0][0];
+$prepreg1 = preg_quote("<relname>","/");
+$prepreg2 = preg_quote("</relname>","/");
+preg_match_all("/".$prepreg1."(.*)".$prepreg2."{1}/isU", $VersionPart, $NamePart);
+$vercheck['name'] = $NamePart[1][0];
+$prepreg1 = preg_quote("<reltype>","/");
+$prepreg2 = preg_quote("</reltype>","/");
+preg_match_all("/".$prepreg1."(.*)".$prepreg2."{1}/isU", $VersionPart, $RelTypePart);
+$vercheck['reltype'] = $RelTypePart[1][0];
+preg_match_all("/([a-zA-Z]+)([0-9]+)/i", $vercheck['reltype'], $reltypeChCk);
+if(isset($reltypeChCk[0][0])) {
+$vercheck['reltype'] = $reltypeChCk[1][0];
+$vercheck['reltypex'] = $reltypeChCk[2][0]; }
+if(!isset($reltypeChCk[0][0])) {
+preg_match_all("/([a-zA-Z]+)/i", $vercheck['reltype'], $reltypeChCk);
+$vercheck['reltype'] = $reltypeChCk[1][0];
+$vercheck['reltypex'] = "0"; }
+/*
+PA (Pre-Alpha) = 100
+A - Al (Alpha) = 200
+PB (Pre-Beta) = 300
+B - Be (Beta) = 400
+G - Ga (Gamma) = 500
+D - De (Delta) = 600
+O - Om (Omega) = 700
+Z - Ze (Zenith) = 800
+R - RC (Release Candidate) = 900
+F - FR (Final Release) = 950
+*/
+// Pre-Alpha
+if($vercheck['reltype']=="PA") {
+ $vercheck['reltypenum'] = 100 + $vercheck['reltypex']; }
+// Alpha
+if($vercheck['reltype']=="A"||
+ $vercheck['reltype']=="Al") {
+ $vercheck['reltypenum'] = 200 + $vercheck['reltypex']; }
+// Pre-Beta
+if($vercheck['reltype']=="PB") {
+ $vercheck['reltypenum'] = 300 + $vercheck['reltypex']; }
+// Beta
+if($vercheck['reltype']=="B"||
+ $vercheck['reltype']=="Be") {
+ $vercheck['reltypenum'] = 400 + $vercheck['reltypex']; }
+// Gamma
+if($vercheck['reltype']=="G"||
+ $vercheck['reltype']=="Ga") {
+ $vercheck['reltypenum'] = 500 + $vercheck['reltypex']; }
+// Delta
+if($vercheck['reltype']=="D"||
+ $vercheck['reltype']=="De") {
+ $vercheck['reltypenum'] = 600 + $vercheck['reltypex']; }
+// Omega
+if($vercheck['reltype']=="O"||
+ $vercheck['reltype']=="Om") {
+ $vercheck['reltypenum'] = 700 + $vercheck['reltypex']; }
+// Zenith
+if($vercheck['reltype']=="Z"||
+ $vercheck['reltype']=="Ze") {
+ $vercheck['reltypenum'] = 800 + $vercheck['reltypex']; }
+// Release Candidate
+if($vercheck['reltype']=="R"||
+ $vercheck['reltype']=="RC") {
+ $vercheck['reltypenum'] = 900 + $vercheck['reltypex']; }
+// Final Release
+if($vercheck['reltype']=="F"||
+ $vercheck['reltype']=="FR") {
+ $vercheck['reltypenum'] = 950 + $vercheck['reltypex']; }
+if($vercheck['reltypex']!=0) {
+ $vercheck['reltype'] = $vercheck['reltype'].$vercheck['reltypex']; }
+$prepreg1 = preg_quote("<relnum>","/");
+$prepreg2 = preg_quote("</relnum>","/");
+preg_match_all("/".$prepreg1."(.*)".$prepreg2."{1}/isU", $VersionPart, $RelNumPart);
+$vercheck['ver'] = $RelNumPart[1][0];
+$MyVerSplit = explode(".", $vercheck['ver']);
+$prepreg1 = preg_quote("<subtype>","/");
+$prepreg2 = preg_quote("</subtype>","/");
+preg_match_all("/".$prepreg1."(.*)".$prepreg2."{1}/isU", $VersionPart, $SubTypePart);
+$vercheck['subtype'] = $SubTypePart[1][0];
+$prepreg1 = preg_quote("<relsvnum>","/");
+$prepreg2 = preg_quote("</relsvnum>","/");
+preg_match_all("/".$prepreg1."(.*)".$prepreg2."{1}/isU", $VersionPart, $RelSVNumPart);
+$vercheck['subver'] = $RelSVNumPart[1][0];
+$MyFullRelNum = $MyVerSplit[0].$MyVerSplit[1].$MyVerSplit[2].".".$vercheck['reltypenum'].$vercheck['subver'];
+$DownloadLink = "<a href=\"".$download_url."\">".$download_url."</a>";
+if($_GET['redirect']!="on"&&$_GET['redirect']!="xml"&&$_GET['redirect']!="js") {
+echo "<div>"; }
+$actchange = preg_quote("act=versioninfo", '/');
+$_GET['bid'] = preg_replace("/".$actchange."/i", "act=view", $_GET['bid']);
+if($_GET['redirect']=="xml") {
+$VersionXML = xml_doc_start("1.0","UTF-8",true);
+$VersionXML .= "<!DOCTYPE versioninfo [\n";
+$VersionXML .= "<!ELEMENT versioninfo (version*)>\n";
+$VersionXML .= "<!ELEMENT version (reltype,relnum,subtype,relsvnum,results)>\n";
+$VersionXML .= "<!ELEMENT reltype (#PCDATA)>\n";
+$VersionXML .= "<!ELEMENT relnum (#PCDATA)>\n";
+$VersionXML .= "<!ELEMENT subtype (#PCDATA)>\n";
+$VersionXML .= "<!ELEMENT relsvnum (#PCDATA)>\n";
+$VersionXML .= "<!ELEMENT results (#PCDATA)>\n";
+$VersionXML .= "<!ENTITY nbsp \" \">\n";
+$VersionXML .= "]>\n\n";
+$VersionXML .= "<versioninfo>\n\n";
+$VersionXML .= "<version>\n";
+$VersionXML .= "<reltype>".$vercheck['reltype']."</reltype>\n";
+$VersionXML .= "<relnum>".$vercheck['ver']."</relnum>\n";
+$VersionXML .= "<subtype>".$vercheck['subtype']."</subtype>\n";
+$VersionXML .= "<relsvnum>".$vercheck['subver']."</relsvnum>\n";
+if($FullRelNum<$MyFullRelNum) {
+$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.\" /> Warning: A new version is available. <a href=\"".$download_url."\">Click Here</a>\n]]></results>\n"; }
+if($FullRelNum==$MyFullRelNum) {
+$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. ^_^ \" /> Congratulates: You have the latest version.\n]]></results>\n"; }
+if($FullRelNum>$MyFullRelNum) {
+$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.\" /> Warning: You seem to be using a nightly version. <a href=\"".$download_url."\">Click Here</a> for latest version.\n]]></results>\n"; }
+$VersionXML .= "</version>\n\n";
+$VersionXML .= "</versioninfo>";
+echo $VersionXML; }
+if($_GET['redirect']=="js") {
+$VersionJS = "function idbvercheck() \n{ \n";
+$VersionJS .= "document.getElementById('iverinfo').style.display = '';\n";
+$VersionJS .= "var vercheckinfo = 'Version Check info below: <br />';\n";
+$VersionJS .= "var yourverinfo = 'Your Version: ".$_GET['name']." ".$_GET['reltype']." ".$_GET['ver']." ".$_GET['subtype']." ".$_GET['subver']."';\n";
+$VersionJS .= "var myverinfo = 'Current Version: ".$vercheck['name']." ".$vercheck['reltype']." ".$vercheck['ver']." ".$vercheck['subtype']." ".$vercheck['subver']."<br />';\n";
+$VersionJS .= "var ourverinfo = yourverinfo+'<br />'+myverinfo;\n";
+if($_GET['bid']!==null) {
+$VersionJS .= "var checkingsite = 'Checking board: <a href=\"".$_GET['bid']."\" title=\"".$GetTitle."\">".$GetTitle."<\/a><br />';\n"; }
+if($_GET['bid']===null) {
+$VersionJS .= "var checkingsite = '';\n"; }
+$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> © <a href=\"http://idb.berlios.de/support/category.php?act=view&id=2\" title=\"Game Maker 2k\" onclick=\"window.open(this.href);return false;\">Game Maker 2k<\/a> @ ".$csryear." - ".$cryear."';\n";
+if($FullRelNum<$MyFullRelNum) {
+$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.\" /> Warning: A new version is available. <a href=\"".$download_url."\">Click Here<\/a><br />'+ourverinfo+checkingsite+'<br />';"; }
+if($FullRelNum==$MyFullRelNum) {
+$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. ^_^ \" /> Congratulates: You have the latest version.<br />'+ourverinfo+checkingsite+copyright+'<br />';"; }
+if($FullRelNum>$MyFullRelNum) {
+$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.\" \/> 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 />';"; }
+$VersionJS .= "\n} ";
+echo $VersionJS; }
+if($_GET['redirect']=="on") {
+if($FullRelNum<$MyFullRelNum) {
+redirect("location","old.png",FALSE,$site_url."inc/pics/",FALSE); }
+if($FullRelNum==$MyFullRelNum) {
+redirect("location","new.png",FALSE,$site_url."inc/pics/",FALSE); }
+if($FullRelNum>$MyFullRelNum) {
+redirect("location","beta.png",FALSE,$site_url."inc/pics/",FALSE); } }
+if($_GET['redirect']!="on"&&$_GET['redirect']!="xml"&&$_GET['redirect']!="js") {
+if($FullRelNum<$MyFullRelNum) { echo "You seem to be using a old version.\n<br />Goto link below to download new version.\n<br />".$DownloadLink; }
+if($FullRelNum==$MyFullRelNum) { echo "Congratulations you have the newest version. ^_^ \n<br />You dont need to do anything for now."; }
+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 />";
+echo "Goto link below to download latest version.\n<br />".$DownloadLink; }
+echo "\n<br />\n<br />";
+echo "Your Version: ".$_GET['name']." ".$_GET['reltype']." ".$_GET['ver']." ".$_GET['subtype']." ".$_GET['subver'];
+echo "\n<br />";
+echo "Current Version: ".$vercheck['name']." ".$vercheck['reltype']." ".$vercheck['ver']." ".$vercheck['subtype']." ".$vercheck['subver'];
+if($_GET['bid']!=null) {
+echo "\n<br />Checking board: <a href=\"".$_GET['bid']."\" title=\"".$GetTitle."\">".$GetTitle."</a>"; }
+echo "</div>"; } }
+if($_GET['redirect']!="on"&&$_GET['redirect']!="xml"&&$_GET['redirect']!="js") {
+?>
+
+<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> © <a href="http://idb.berlios.de/support/category.php?act=view&id=2" title="Game Maker 2k" onclick="window.open(this.href);return false;">Game Maker 2k</a> @ <?php echo $csryear." - ".$cryear; ?></div>
+<!-- Stephanie Braun o_O -->
+</body>
+</html>
+<?php } ?>
--- /dev/null
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+ Revised BSD License
+
+Copyright (c) 2004-2011 Game Maker 2k.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the distribution.
+
+ 3. Neither the name of Game Maker 2k nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGE.
+
+The views and conclusions contained in the software and documentation are those of the
+authors and should not be interpreted as representing official policies, either expressed
+or implied, of <copyright holder>.
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\ No newline at end of file
--- /dev/null
+<?php
+/*
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the Revised BSD License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ Revised BSD License for more details.
+
+ Copyright 2004-2011 iDB Support - http://idb.berlios.de/
+ Copyright 2004-2011 Game Maker 2k - http://gamemaker2k.org/
+ iUnTar ver. 4.7 by Kazuki Przyborowski & Josep Sanz Campderros
+
+ $FileInfo: untar.php - Last Update: 11/14/2011 Ver 4.7 - Author: cooldude2k $
+*/
+
+// PHP iUnTAR Version 4.7
+// license: Revised BSD license
+// Kazuki Przyborowski (http://ja.gamemaker2k.org/)
+// Josep Sanz Campderros (http://saltos.net/)
+function untar($tarfile,$outdir="./",$chmod=null,$extract=true,$lsonly=false,$findfile=null) {
+$TarSize = filesize($tarfile);
+$TarSizeEnd = $TarSize - 1024;
+if($extract!==true&&$extract!==false) {
+ $extract = false; }
+if($lsonly!==true&&$lsonly!==false) {
+ $lsonly = false; }
+if($extract===true) {
+ $lsonly = false; }
+if($extract===true) {
+if($outdir!=""&&!file_exists($outdir)) {
+ mkdir($outdir,0777); } }
+$thandle = fopen($tarfile, "rb");
+$i = 0;
+if($extract===false) {
+ $FileArray = null; $i = 0; }
+$outdir = preg_replace('{/$}', '', $outdir)."/";
+if(isset($findfile)) {
+$qfindfile = preg_quote($findfile,"/"); }
+if(!isset($findfile)) {
+$qfindfile = null; }
+while (ftell($thandle)<$TarSizeEnd) {
+ $FileName = null;
+ $FileMode = null;
+ $OwnerID = null;
+ $GroupID = null;
+ $FileSize = null;
+ $LastEdit = null;
+ $Checksum = null;
+ $FileType = null;
+ $LinkedFile = null;
+ $FileContent = null;
+ $FileName = $outdir.trim(fread($thandle,100));
+ fseek($thandle,56,SEEK_CUR);
+ $FileType = trim(fread($thandle,1));
+ fseek($thandle,-57,SEEK_CUR);
+ if($findfile!==null&&$FileType!="L"&&!preg_match("/".$qfindfile."/",$FileName)) {
+ fseek($thandle,8,SEEK_CUR);
+ fseek($thandle,8,SEEK_CUR);
+ fseek($thandle,8,SEEK_CUR);
+ $FileSize = octdec(trim(fread($thandle,12)));
+ fseek($thandle,12,SEEK_CUR);
+ fseek($thandle,8,SEEK_CUR);
+ $FileType = trim(fread($thandle,1));
+ fseek($thandle,100,SEEK_CUR);
+ fseek($thandle,255,SEEK_CUR);
+ if($FileType=="0"||$FileType=="7") {
+ fseek($thandle,$FileSize,SEEK_CUR); } }
+ if($findfile===null||$FileType=="L"||preg_match("/".$qfindfile."/",$FileName)) {
+ $FileMode = trim(fread($thandle,8));
+ if($chmod===null) {
+ $FileCHMOD = octdec("0".substr($FileMode,-3)); }
+ if($chmod!==null) {
+ $FileCHMOD = $chmod; }
+ $OwnerID = trim(fread($thandle,8));
+ $GroupID = trim(fread($thandle,8));
+ $FileSize = octdec(trim(fread($thandle,12)));
+ $LastEdit = octdec(trim(fread($thandle,12)));
+ $Checksum = octdec(trim(fread($thandle,8)));
+ $FileType = trim(fread($thandle,1));
+ $LinkedFile = trim(fread($thandle,100));
+ fseek($thandle,255,SEEK_CUR);
+ // LongLink support added by Josep Sanz Campderros
+ if($FileType=="L"&&$FileSize>0) {
+ $FileName = $outdir.trim(fread($thandle,$FileSize));
+ fseek($thandle,512-$FileSize,SEEK_CUR);
+ fseek($thandle,100,SEEK_CUR);
+ $FileMode = trim(fread($thandle,8));
+ if($chmod===null) {
+ $FileCHMOD = octdec("0".substr($FileMode,-3)); }
+ if($chmod!==null) {
+ $FileCHMOD = $chmod; }
+ $OwnerID = trim(fread($thandle,8));
+ $GroupID = trim(fread($thandle,8));
+ $FileSize = octdec(trim(fread($thandle,12)));
+ $LastEdit = trim(fread($thandle,12));
+ $Checksum = trim(fread($thandle,8));
+ $FileType = trim(fread($thandle,1));
+ $LinkedFile = trim(fread($thandle,100));
+ fseek($thandle,255,SEEK_CUR); } }
+ if($findfile===null||preg_match("/".$qfindfile."/",$FileName)) {
+ if($FileType=="0"||$FileType=="7") {
+ if($lsonly===true) {
+ fseek($thandle,$FileSize,SEEK_CUR); }
+ if($lsonly===false) {
+ // Empty files support added by Josep Sanz Campderros
+ if($FileSize===0) {
+ $FileContent = ""; }
+ if($FileSize>0) {
+ $FileContent = fread($thandle,$FileSize); } } }
+ if($FileType=="1") {
+ $FileContent = null; }
+ if($FileType=="2") {
+ $FileContent = null; }
+ if($FileType=="5") {
+ $FileContent = null; }
+ if($FileType=="0"||$FileType=="7") {
+ if($extract===true) {
+ $subhandle = fopen($FileName, "wb+");
+ fwrite($subhandle,$FileContent,$FileSize);
+ fclose($subhandle);
+ chmod($FileName,$FileCHMOD); } }
+ if($FileType=="1") {
+ if($extract===true) {
+ link($FileName,$LinkedFile); } }
+ if($FileType=="2") {
+ if($extract===true) {
+ symlink($LinkedFile,$FileName); } }
+ if($FileType=="5") {
+ if($extract===true) {
+ mkdir($FileName,$FileCHMOD); } }
+ if($FileType=="0"||$FileType=="1"||$FileType=="2"||$FileType=="5"||$FileType=="7") {
+ if($extract===false) {
+ $FileArray[$i]['FileName'] = $FileName;
+ $FileArray[$i]['FileMode'] = $FileMode;
+ $FileArray[$i]['OwnerID'] = $OwnerID;
+ $FileArray[$i]['GroupID'] = $GroupID;
+ $FileArray[$i]['FileSize'] = $FileSize;
+ $FileArray[$i]['LastEdit'] = $LastEdit;
+ $FileArray[$i]['Checksum'] = $Checksum;
+ $FileArray[$i]['FileType'] = $FileType;
+ $FileArray[$i]['LinkedFile'] = $LinkedFile;
+ if($lsonly===false) {
+ $FileArray[$i]['FileContent'] = $FileContent; } } } }
+ //touch($FileName,$LastEdit);
+ if($extract===false&&$findfile===null&&isset($FileArray[$i]['FileName'])) { ++$i; }
+ if($extract===false) {
+ if($findfile!==null&&preg_match("/".$qfindfile."/",$FileName)&&isset($FileArray[$i]['FileName'])) { ++$i; } }
+ if($extract===true) {
+ if($findfile!==null&&preg_match("/".$qfindfile."/",$FileName)) { ++$i; } }
+ if(($FileType=="0"||$FileType=="7")&$FileSize>0) {
+ $CheckSize = 512;
+ while ($CheckSize<$FileSize) {
+ if($CheckSize<$FileSize) {
+ $CheckSize = $CheckSize + 512; } }
+ $SeekSize = $CheckSize - $FileSize;
+ fseek($thandle,$SeekSize,SEEK_CUR); } }
+ fclose($thandle);
+ if($extract===true) {
+ return true; }
+ if($extract===false) {
+ return $FileArray; } }
+function iuntar($tarfile,$outdir="./",$chmod=null,$extract=true,$lsonly=false,$findfile=null) {
+ return untar($tarfile,$outdir,$chmod,$extract,$lsonly,$findfile); }
+
+//Check if zlib is loaded
+if(extension_loaded("zlib")) {
+function gunzip($infile, $outfile) {
+ $string = null;
+ $zp = gzopen($infile, "r");
+ while(!gzeof($zp))
+ $string .= gzread($zp, 4096);
+ gzclose($zp);
+ $fp = fopen($outfile, "w");
+ fwrite($fp, $string, strlen($string));
+ fclose($fp);
+}
+
+function gunzip2($infile, $outfile) {
+ $string = implode("", gzfile($infile));
+ $fp = fopen($outfile, "w");
+ fwrite($fp, $string, strlen($string));
+ fclose($fp);
+} }
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/*
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the Revised BSD License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ Revised BSD License for more details.
+
+ Copyright 2004-2010 iDB Support - http://idb.berlios.de/
+ Copyright 2004-2010 Game Maker 2k - http://gamemaker2k.org/
+
+ $FileInfo: webinstall.php - Last Update: 09/24/2010 Ver 3.0 - Author: cooldude2k $
+*/
+@ob_start();
+// FTP Download Info
+$FTPURL = "ftp.berlios.de";
+$FTPUSER = "anonymous";
+$FTPPASS = "";
+$FTPPATH = "/pub/idb/nighty-ver/tar/";
+// HTTP Download Info
+$HTTPURL = "http://download.berlios.de/idb/";
+// File Name Info for both FTP and HTTP
+$TARGZFILE = "iDB.tar.gz";
+$TARFILE = "iDB.tar";
+require_once("./untar.php");
+$mydir = addslashes(str_replace("\\","/",dirname(__FILE__)."/"));
+$conn_id = ftp_connect($FTPURL,21,90);
+$login_result = ftp_login($conn_id, $FTPUSER, $FTPPASS);
+if((!$conn_id)||(!$login_result)) {
+$tarhandle = fopen("./".$TARGZFILE, "a+");
+fwrite($tarhandle,file_get_contents($HTTPURL.$TARGZFILE));
+fclose($tarhandle);
+chmod("./".$TARGZFILE,0777);
+} else {
+ftp_pasv($conn_id, true);
+ftp_chdir($conn_id, $FTPPATH);
+ftp_get($conn_id, "./".$TARGZFILE, "./".$TARGZFILE, FTP_BINARY);
+ftp_close($conn_id); }
+gunzip("./".$TARGZFILE,"./".$TARFILE);
+unlink("./".$TARGZFILE);
+unlink("./LICENSE");
+untar("./".$TARFILE,"./");
+unlink("./".$TARFILE);
+unlink("./untar.php");
+unlink("./webinstall.php");
+header("Location: ./install.php");
+?>
\ No newline at end of file
--- /dev/null
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+ Revised BSD License
+
+Copyright (c) 2004-2011 Game Maker 2k.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the distribution.
+
+ 3. Neither the name of Game Maker 2k nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGE.
+
+The views and conclusions contained in the software and documentation are those of the
+authors and should not be interpreted as representing official policies, either expressed
+or implied, of <copyright holder>.
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\ No newline at end of file
--- /dev/null
+<?php
+/*
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the Revised BSD License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ Revised BSD License for more details.
+
+ Copyright 2004-2011 iDB Support - http://idb.berlios.de/
+ Copyright 2004-2011 Game Maker 2k - http://gamemaker2k.org/
+ iUnTar ver. 4.7 by Kazuki Przyborowski & Josep Sanz Campderros
+
+ $FileInfo: untar.php - Last Update: 11/14/2011 Ver 4.7 - Author: cooldude2k $
+*/
+
+// PHP iUnTAR Version 4.7
+// license: Revised BSD license
+// Kazuki Przyborowski (http://ja.gamemaker2k.org/)
+// Josep Sanz Campderros (http://saltos.net/)
+function untar($tarfile,$outdir="./",$chmod=null,$extract=true,$lsonly=false,$findfile=null) {
+$TarSize = filesize($tarfile);
+$TarSizeEnd = $TarSize - 1024;
+if($extract!==true&&$extract!==false) {
+ $extract = false; }
+if($lsonly!==true&&$lsonly!==false) {
+ $lsonly = false; }
+if($extract===true) {
+ $lsonly = false; }
+if($extract===true) {
+if($outdir!=""&&!file_exists($outdir)) {
+ mkdir($outdir,0777); } }
+$thandle = fopen($tarfile, "rb");
+$i = 0;
+if($extract===false) {
+ $FileArray = null; $i = 0; }
+$outdir = preg_replace('{/$}', '', $outdir)."/";
+if(isset($findfile)) {
+$qfindfile = preg_quote($findfile,"/"); }
+if(!isset($findfile)) {
+$qfindfile = null; }
+while (ftell($thandle)<$TarSizeEnd) {
+ $FileName = null;
+ $FileMode = null;
+ $OwnerID = null;
+ $GroupID = null;
+ $FileSize = null;
+ $LastEdit = null;
+ $Checksum = null;
+ $FileType = null;
+ $LinkedFile = null;
+ $FileContent = null;
+ $FileName = $outdir.str_replace("trunk/","",trim(fread($thandle,100)));
+ fseek($thandle,56,SEEK_CUR);
+ $FileType = trim(fread($thandle,1));
+ fseek($thandle,-57,SEEK_CUR);
+ if($findfile!==null&&$FileType!="L"&&!preg_match("/".$qfindfile."/",$FileName)) {
+ fseek($thandle,8,SEEK_CUR);
+ fseek($thandle,8,SEEK_CUR);
+ fseek($thandle,8,SEEK_CUR);
+ $FileSize = octdec(trim(fread($thandle,12)));
+ fseek($thandle,12,SEEK_CUR);
+ fseek($thandle,8,SEEK_CUR);
+ $FileType = trim(fread($thandle,1));
+ fseek($thandle,100,SEEK_CUR);
+ fseek($thandle,255,SEEK_CUR);
+ if($FileType=="0"||$FileType=="7") {
+ fseek($thandle,$FileSize,SEEK_CUR); } }
+ if($findfile===null||$FileType=="L"||preg_match("/".$qfindfile."/",$FileName)) {
+ $FileMode = trim(fread($thandle,8));
+ if($chmod===null) {
+ $FileCHMOD = octdec("0".substr($FileMode,-3)); }
+ if($chmod!==null) {
+ $FileCHMOD = $chmod; }
+ $OwnerID = trim(fread($thandle,8));
+ $GroupID = trim(fread($thandle,8));
+ $FileSize = octdec(trim(fread($thandle,12)));
+ $LastEdit = octdec(trim(fread($thandle,12)));
+ $Checksum = octdec(trim(fread($thandle,8)));
+ $FileType = trim(fread($thandle,1));
+ $LinkedFile = trim(fread($thandle,100));
+ fseek($thandle,255,SEEK_CUR);
+ // LongLink support added by Josep Sanz Campderros
+ if($FileType=="L"&&$FileSize>0) {
+ $FileName = $outdir.trim(fread($thandle,$FileSize));
+ fseek($thandle,512-$FileSize,SEEK_CUR);
+ fseek($thandle,100,SEEK_CUR);
+ $FileMode = trim(fread($thandle,8));
+ if($chmod===null) {
+ $FileCHMOD = octdec("0".substr($FileMode,-3)); }
+ if($chmod!==null) {
+ $FileCHMOD = $chmod; }
+ $OwnerID = trim(fread($thandle,8));
+ $GroupID = trim(fread($thandle,8));
+ $FileSize = octdec(trim(fread($thandle,12)));
+ $LastEdit = trim(fread($thandle,12));
+ $Checksum = trim(fread($thandle,8));
+ $FileType = trim(fread($thandle,1));
+ $LinkedFile = trim(fread($thandle,100));
+ fseek($thandle,255,SEEK_CUR); } }
+ if($findfile===null||preg_match("/".$qfindfile."/",$FileName)) {
+ if($FileType=="0"||$FileType=="7") {
+ if($lsonly===true) {
+ fseek($thandle,$FileSize,SEEK_CUR); }
+ if($lsonly===false) {
+ // Empty files support added by Josep Sanz Campderros
+ if($FileSize===0) {
+ $FileContent = ""; }
+ if($FileSize>0) {
+ $FileContent = fread($thandle,$FileSize); } } }
+ if($FileType=="1") {
+ $FileContent = null; }
+ if($FileType=="2") {
+ $FileContent = null; }
+ if($FileType=="5") {
+ $FileContent = null; }
+ if($FileType=="0"||$FileType=="7") {
+ if($extract===true) {
+ $subhandle = fopen($FileName, "wb+");
+ fwrite($subhandle,$FileContent,$FileSize);
+ fclose($subhandle);
+ chmod($FileName,$FileCHMOD); } }
+ if($FileType=="1") {
+ if($extract===true) {
+ link($FileName,$LinkedFile); } }
+ if($FileType=="2") {
+ if($extract===true) {
+ symlink($LinkedFile,$FileName); } }
+ if($FileType=="5") {
+ if($extract===true) {
+ mkdir($FileName,$FileCHMOD); } }
+ if($FileType=="0"||$FileType=="1"||$FileType=="2"||$FileType=="5"||$FileType=="7") {
+ if($extract===false) {
+ $FileArray[$i]['FileName'] = $FileName;
+ $FileArray[$i]['FileMode'] = $FileMode;
+ $FileArray[$i]['OwnerID'] = $OwnerID;
+ $FileArray[$i]['GroupID'] = $GroupID;
+ $FileArray[$i]['FileSize'] = $FileSize;
+ $FileArray[$i]['LastEdit'] = $LastEdit;
+ $FileArray[$i]['Checksum'] = $Checksum;
+ $FileArray[$i]['FileType'] = $FileType;
+ $FileArray[$i]['LinkedFile'] = $LinkedFile;
+ if($lsonly===false) {
+ $FileArray[$i]['FileContent'] = $FileContent; } } } }
+ //touch($FileName,$LastEdit);
+ if($extract===false&&$findfile===null&&isset($FileArray[$i]['FileName'])) { ++$i; }
+ if($extract===false) {
+ if($findfile!==null&&preg_match("/".$qfindfile."/",$FileName)&&isset($FileArray[$i]['FileName'])) { ++$i; } }
+ if($extract===true) {
+ if($findfile!==null&&preg_match("/".$qfindfile."/",$FileName)) { ++$i; } }
+ if(($FileType=="0"||$FileType=="7")&$FileSize>0) {
+ $CheckSize = 512;
+ while ($CheckSize<$FileSize) {
+ if($CheckSize<$FileSize) {
+ $CheckSize = $CheckSize + 512; } }
+ $SeekSize = $CheckSize - $FileSize;
+ fseek($thandle,$SeekSize,SEEK_CUR); } }
+ fclose($thandle);
+ if($extract===true) {
+ return true; }
+ if($extract===false) {
+ return $FileArray; } }
+function iuntar($tarfile,$outdir="./",$chmod=null,$extract=true,$lsonly=false,$findfile=null) {
+ return untar($tarfile,$outdir,$chmod,$extract,$lsonly,$findfile); }
+
+//Check if zlib is loaded
+if(extension_loaded("zlib")) {
+function gunzip($infile, $outfile) {
+ $string = null;
+ $zp = gzopen($infile, "r");
+ while(!gzeof($zp))
+ $string .= gzread($zp, 4096);
+ gzclose($zp);
+ $fp = fopen($outfile, "w");
+ fwrite($fp, $string, strlen($string));
+ fclose($fp);
+}
+
+function gunzip2($infile, $outfile) {
+ $string = implode("", gzfile($infile));
+ $fp = fopen($outfile, "w");
+ fwrite($fp, $string, strlen($string));
+ fclose($fp);
+} }
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/*
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the Revised BSD License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ Revised BSD License for more details.
+
+ Copyright 2004-2010 iDB Support - http://idb.berlios.de/
+ Copyright 2004-2010 Game Maker 2k - http://gamemaker2k.org/
+
+ $FileInfo: webinstall.php - Last Update: 09/24/2010 Ver 3.0 - Author: cooldude2k $
+*/
+@ob_start();
+// HTTP Download Info
+$HTTPURL = "http://intdb.svn.sourceforge.net/viewvc/intdb/trunk/?view=tar";
+// File Name Info for both FTP and HTTP
+$TARGZFILE = "iDB.tar.gz";
+$TARFILE = "iDB.tar";
+require_once("./untar.php");
+$mydir = addslashes(str_replace("\\","/",dirname(__FILE__)."/"));
+$tarhandle = fopen("./".$TARGZFILE, "a+");
+fwrite($tarhandle,file_get_contents($HTTPURL));
+fclose($tarhandle);
+chmod("./".$TARGZFILE,0777);
+gunzip("./".$TARGZFILE,"./".$TARFILE);
+unlink("./".$TARGZFILE);
+unlink("./LICENSE");
+untar("./".$TARFILE,"./");
+unlink("./".$TARFILE);
+unlink("./untar.php");
+unlink("./webinstall.php");
+header("Location: ./install.php");
+?>
\ No newline at end of file
--- /dev/null
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+ Revised BSD License
+
+Copyright (c) 2004-2011 Game Maker 2k.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the distribution.
+
+ 3. Neither the name of Game Maker 2k nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGE.
+
+The views and conclusions contained in the software and documentation are those of the
+authors and should not be interpreted as representing official policies, either expressed
+or implied, of <copyright holder>.
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\ No newline at end of file
--- /dev/null
+<?php
+/*
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the Revised BSD License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ Revised BSD License for more details.
+
+ Copyright 2004-2011 iDB Support - http://idb.berlios.de/
+ Copyright 2004-2011 Game Maker 2k - http://gamemaker2k.org/
+ iUnTar ver. 4.7 by Kazuki Przyborowski & Josep Sanz Campderros
+
+ $FileInfo: untar.php - Last Update: 11/14/2011 Ver 4.7 - Author: cooldude2k $
+*/
+
+// PHP iUnTAR Version 4.7
+// license: Revised BSD license
+// Kazuki Przyborowski (http://ja.gamemaker2k.org/)
+// Josep Sanz Campderros (http://saltos.net/)
+function untar($tarfile,$outdir="./",$chmod=null,$extract=true,$lsonly=false,$findfile=null) {
+$TarSize = filesize($tarfile);
+$TarSizeEnd = $TarSize - 1024;
+if($extract!==true&&$extract!==false) {
+ $extract = false; }
+if($lsonly!==true&&$lsonly!==false) {
+ $lsonly = false; }
+if($extract===true) {
+ $lsonly = false; }
+if($extract===true) {
+if($outdir!=""&&!file_exists($outdir)) {
+ mkdir($outdir,0777); } }
+$thandle = fopen($tarfile, "rb");
+$i = 0;
+if($extract===false) {
+ $FileArray = null; $i = 0; }
+$outdir = preg_replace('{/$}', '', $outdir)."/";
+if(isset($findfile)) {
+$qfindfile = preg_quote($findfile,"/"); }
+if(!isset($findfile)) {
+$qfindfile = null; }
+while (ftell($thandle)<$TarSizeEnd) {
+ $FileName = null;
+ $FileMode = null;
+ $OwnerID = null;
+ $GroupID = null;
+ $FileSize = null;
+ $LastEdit = null;
+ $Checksum = null;
+ $FileType = null;
+ $LinkedFile = null;
+ $FileContent = null;
+ $FileName = $outdir.trim(fread($thandle,100));
+ fseek($thandle,56,SEEK_CUR);
+ $FileType = trim(fread($thandle,1));
+ fseek($thandle,-57,SEEK_CUR);
+ if($findfile!==null&&$FileType!="L"&&!preg_match("/".$qfindfile."/",$FileName)) {
+ fseek($thandle,8,SEEK_CUR);
+ fseek($thandle,8,SEEK_CUR);
+ fseek($thandle,8,SEEK_CUR);
+ $FileSize = octdec(trim(fread($thandle,12)));
+ fseek($thandle,12,SEEK_CUR);
+ fseek($thandle,8,SEEK_CUR);
+ $FileType = trim(fread($thandle,1));
+ fseek($thandle,100,SEEK_CUR);
+ fseek($thandle,255,SEEK_CUR);
+ if($FileType=="0"||$FileType=="7") {
+ fseek($thandle,$FileSize,SEEK_CUR); } }
+ if($findfile===null||$FileType=="L"||preg_match("/".$qfindfile."/",$FileName)) {
+ $FileMode = trim(fread($thandle,8));
+ if($chmod===null) {
+ $FileCHMOD = octdec("0".substr($FileMode,-3)); }
+ if($chmod!==null) {
+ $FileCHMOD = $chmod; }
+ $OwnerID = trim(fread($thandle,8));
+ $GroupID = trim(fread($thandle,8));
+ $FileSize = octdec(trim(fread($thandle,12)));
+ $LastEdit = octdec(trim(fread($thandle,12)));
+ $Checksum = octdec(trim(fread($thandle,8)));
+ $FileType = trim(fread($thandle,1));
+ $LinkedFile = trim(fread($thandle,100));
+ fseek($thandle,255,SEEK_CUR);
+ // LongLink support added by Josep Sanz Campderros
+ if($FileType=="L"&&$FileSize>0) {
+ $FileName = $outdir.trim(fread($thandle,$FileSize));
+ fseek($thandle,512-$FileSize,SEEK_CUR);
+ fseek($thandle,100,SEEK_CUR);
+ $FileMode = trim(fread($thandle,8));
+ if($chmod===null) {
+ $FileCHMOD = octdec("0".substr($FileMode,-3)); }
+ if($chmod!==null) {
+ $FileCHMOD = $chmod; }
+ $OwnerID = trim(fread($thandle,8));
+ $GroupID = trim(fread($thandle,8));
+ $FileSize = octdec(trim(fread($thandle,12)));
+ $LastEdit = trim(fread($thandle,12));
+ $Checksum = trim(fread($thandle,8));
+ $FileType = trim(fread($thandle,1));
+ $LinkedFile = trim(fread($thandle,100));
+ fseek($thandle,255,SEEK_CUR); } }
+ if($findfile===null||preg_match("/".$qfindfile."/",$FileName)) {
+ if($FileType=="0"||$FileType=="7") {
+ if($lsonly===true) {
+ fseek($thandle,$FileSize,SEEK_CUR); }
+ if($lsonly===false) {
+ // Empty files support added by Josep Sanz Campderros
+ if($FileSize===0) {
+ $FileContent = ""; }
+ if($FileSize>0) {
+ $FileContent = fread($thandle,$FileSize); } } }
+ if($FileType=="1") {
+ $FileContent = null; }
+ if($FileType=="2") {
+ $FileContent = null; }
+ if($FileType=="5") {
+ $FileContent = null; }
+ if($FileType=="0"||$FileType=="7") {
+ if($extract===true) {
+ $subhandle = fopen($FileName, "wb+");
+ fwrite($subhandle,$FileContent,$FileSize);
+ fclose($subhandle);
+ chmod($FileName,$FileCHMOD); } }
+ if($FileType=="1") {
+ if($extract===true) {
+ link($FileName,$LinkedFile); } }
+ if($FileType=="2") {
+ if($extract===true) {
+ symlink($LinkedFile,$FileName); } }
+ if($FileType=="5") {
+ if($extract===true) {
+ mkdir($FileName,$FileCHMOD); } }
+ if($FileType=="0"||$FileType=="1"||$FileType=="2"||$FileType=="5"||$FileType=="7") {
+ if($extract===false) {
+ $FileArray[$i]['FileName'] = $FileName;
+ $FileArray[$i]['FileMode'] = $FileMode;
+ $FileArray[$i]['OwnerID'] = $OwnerID;
+ $FileArray[$i]['GroupID'] = $GroupID;
+ $FileArray[$i]['FileSize'] = $FileSize;
+ $FileArray[$i]['LastEdit'] = $LastEdit;
+ $FileArray[$i]['Checksum'] = $Checksum;
+ $FileArray[$i]['FileType'] = $FileType;
+ $FileArray[$i]['LinkedFile'] = $LinkedFile;
+ if($lsonly===false) {
+ $FileArray[$i]['FileContent'] = $FileContent; } } } }
+ //touch($FileName,$LastEdit);
+ if($extract===false&&$findfile===null&&isset($FileArray[$i]['FileName'])) { ++$i; }
+ if($extract===false) {
+ if($findfile!==null&&preg_match("/".$qfindfile."/",$FileName)&&isset($FileArray[$i]['FileName'])) { ++$i; } }
+ if($extract===true) {
+ if($findfile!==null&&preg_match("/".$qfindfile."/",$FileName)) { ++$i; } }
+ if(($FileType=="0"||$FileType=="7")&$FileSize>0) {
+ $CheckSize = 512;
+ while ($CheckSize<$FileSize) {
+ if($CheckSize<$FileSize) {
+ $CheckSize = $CheckSize + 512; } }
+ $SeekSize = $CheckSize - $FileSize;
+ fseek($thandle,$SeekSize,SEEK_CUR); } }
+ fclose($thandle);
+ if($extract===true) {
+ return true; }
+ if($extract===false) {
+ return $FileArray; } }
+function iuntar($tarfile,$outdir="./",$chmod=null,$extract=true,$lsonly=false,$findfile=null) {
+ return untar($tarfile,$outdir,$chmod,$extract,$lsonly,$findfile); }
+
+//Check if zlib is loaded
+if(extension_loaded("zlib")) {
+function gunzip($infile, $outfile) {
+ $string = null;
+ $zp = gzopen($infile, "r");
+ while(!gzeof($zp))
+ $string .= gzread($zp, 4096);
+ gzclose($zp);
+ $fp = fopen($outfile, "w");
+ fwrite($fp, $string, strlen($string));
+ fclose($fp);
+}
+
+function gunzip2($infile, $outfile) {
+ $string = implode("", gzfile($infile));
+ $fp = fopen($outfile, "w");
+ fwrite($fp, $string, strlen($string));
+ fclose($fp);
+} }
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/*
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the Revised BSD License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ Revised BSD License for more details.
+
+ Copyright 2004-2010 iDB Support - http://idb.berlios.de/
+ Copyright 2004-2010 Game Maker 2k - http://gamemaker2k.org/
+
+ $FileInfo: webinstall.php - Last Update: 09/24/2010 Ver 3.0 - Author: cooldude2k $
+*/
+@ob_start();
+// FTP Download Info
+$FTPURL = "ftp.berlios.de";
+$FTPUSER = "anonymous";
+$FTPPASS = "";
+$FTPPATH = "/pub/idb/nighty-ver/";
+// HTTP Download Info
+$HTTPURL = "http://download.berlios.de/idb/";
+// File Name Info for both FTP and HTTP
+$TARGZFILE = "iDB.tar.gz";
+$TARFILE = "iDB.tar";
+require_once("./untar.php");
+$mydir = addslashes(str_replace("\\","/",dirname(__FILE__)."/"));
+$conn_id = ftp_connect($FTPURL,21,90);
+$login_result = ftp_login($conn_id, $FTPUSER, $FTPPASS);
+if((!$conn_id)||(!$login_result)) {
+$tarhandle = fopen("./".$TARGZFILE, "a+");
+fwrite($tarhandle,file_get_contents($HTTPURL.$TARGZFILE));
+fclose($tarhandle);
+chmod("./".$TARGZFILE,0777);
+} else {
+ftp_pasv($conn_id, true);
+ftp_chdir($conn_id, $FTPPATH);
+ftp_get($conn_id, "./".$TARGZFILE, "./".$TARGZFILE, FTP_BINARY);
+ftp_close($conn_id); }
+gunzip("./".$TARGZFILE,"./".$TARFILE);
+unlink("./".$TARGZFILE);
+unlink("./LICENSE");
+untar("./".$TARFILE,"./");
+unlink("./".$TARFILE);
+unlink("./untar.php");
+unlink("./webinstall.php");
+header("Location: ./install.php");
+?>
\ No newline at end of file
--- /dev/null
+<?php
+$numob = count(ob_list_handlers()); $iob = 0;
+while ($iob < $numob) {
+ $old_ob_var[$iob] = ob_get_clean();
+ ++$iob; } @ob_start();
+if(!isset($_SERVER["HTTP_USER_AGENT"])) { $_SERVER["HTTP_USER_AGENT"] = null; }
+header("Content-Type: text/plain; charset=UTF-8");
+header("Content-Language: en");
+
+$CompressPage = "none";
+if(strstr($_SERVER['HTTP_ACCEPT_ENCODING'], "gzip")) {
+ $CompressPage = "gzip"; } elseif(strstr($_SERVER['HTTP_ACCEPT_ENCODING'], "deflate")) {
+ $CompressPage = "deflate"; } else { $CompressPage = "none"; }
+
+if($CompressPage=="gzip") {
+ header("Content-Encoding: gzip"); }
+if($CompressPage=="deflate") {
+ header("Content-Encoding: deflate"); }
+
+function ip2bin($ip)
+{
+ if(filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) !== false)
+ return base_convert(ip2long($ip),10,2);
+ if(filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) === false)
+ return false;
+ if(($ip_n = inet_pton($ip)) === false) return false;
+ $bits = 15; // 16 x 8 bit = 128bit (ipv6)
+ while ($bits >= 0)
+ {
+ $bin = sprintf("%08b",(ord($ip_n[$bits])));
+ $ipbin = $bin.$ipbin;
+ $bits--;
+ }
+ return $ipbin;
+}
+
+function bin2ip($bin)
+{
+ if(strlen($bin) <= 32) // 32bits (ipv4)
+ return long2ip(base_convert($bin,2,10));
+ if(strlen($bin) != 128)
+ return false;
+ $pad = 128 - strlen($bin);
+ for ($i = 1; $i <= $pad; $i++)
+ {
+ $bin = "0".$bin;
+ }
+ $bits = 0;
+ while ($bits <= 7)
+ {
+ $bin_part = substr($bin,($bits*16),16);
+ $ipv6 .= dechex(bindec($bin_part)).":";
+ $bits++;
+ }
+ return inet_ntop(inet_pton(substr($ipv6,0,-1)));
+}
+
+echo "-- Hosts information --\n\n";
+echo "IP: ".$_GET['query']."\n";
+echo "Host: ".gethostbyaddr($_GET['query'])."\n";
+echo "Long: ".sprintf("%u", ip2long($_GET['query']))."\n";
+echo "Long Alt: ".sprintf("%u", ip2long(long2ip(ip2long($_GET['query']))))."\n";
+echo "IP Bin: ".ip2bin($_GET['query'])."\n";
+
+if($CompressPage=="none") {
+ echo ob_get_clean(); }
+if($CompressPage=="gzip") {
+ echo gzencode(ob_get_clean()); }
+if($CompressPage=="deflate") {
+ echo gzcompress(ob_get_clean()); }
+?>
\ No newline at end of file