### Eclipse Workspace Patch 1.0
#P TYPO3_4-2
Index: typo3/sysext/adodb/adodb/tests/test2.php
===================================================================
--- typo3/sysext/adodb/adodb/tests/test2.php	(revision 4551)
+++ typo3/sysext/adodb/adodb/tests/test2.php	(working copy)
@@ -1,4 +1,8 @@
 <?php
+	// This checks for my own IP at home. You can just remove the if-statement.
+if (1==0 || ($_SERVER['REMOTE_ADDR']!='127.0.0.1'))	{
+	die('In the source distribution of TYPO3, this script is disabled by a die() function call.<br/><b>Fix:</b> Open this file and remove/out-comment the line that outputs this message!');
+}
 
 // BASIC ADO test
 
@@ -9,13 +13,13 @@
 	$access = 'd:\inetpub\wwwroot\php\NWIND.MDB';
 	$myDSN =  'PROVIDER=Microsoft.Jet.OLEDB.4.0;'
 		. 'DATA SOURCE=' . $access . ';';
-		
+
 	echo "<p>PHP ",PHP_VERSION,"</p>";
-	
+
 	$db->Connect($myDSN) || die('fail');
-	
+
 	print_r($db->ServerInfo());
-	
+
 	try {
 	$rs = $db->Execute("select $db->sysTimeStamp,* from adoxyz where id>02xx");
 	print_r($rs->fields);
Index: typo3/sysext/adodb/adodb/tests/test-datadict.php
===================================================================
--- typo3/sysext/adodb/adodb/tests/test-datadict.php	(revision 4551)
+++ typo3/sysext/adodb/adodb/tests/test-datadict.php	(working copy)
@@ -1,12 +1,17 @@
 <?php
+	// This checks for my own IP at home. You can just remove the if-statement.
+if (1==0 || ($_SERVER['REMOTE_ADDR']!='127.0.0.1'))	{
+	die('In the source distribution of TYPO3, this script is disabled by a die() function call.<br/><b>Fix:</b> Open this file and remove/out-comment the line that outputs this message!');
+}
+
 /*
 
-  V4.81 3 May 2006  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
-  Released under both BSD license and Lesser GPL library license. 
-  Whenever there is any discrepancy between the two licenses, 
-  the BSD license will take precedence.
-	
-  Set tabs to 4 for best viewing.
+	V4.81 3 May 2006  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+	Released under both BSD license and Lesser GPL library license.
+	Whenever there is any discrepancy between the two licenses,
+	the BSD license will take precedence.
+
+	Set tabs to 4 for best viewing.
 
 */
 
@@ -20,31 +25,31 @@
 
 	if (!$dict) continue;
 	$dict->debug = 1;
-	
+
 	$opts = array('REPLACE','mysql' => 'ENGINE=INNODB', 'oci8' => 'TABLESPACE USERS');
-	
+
 /*	$flds = array(
-		array('id',	'I',								
+		array('id',	'I',
 							'AUTO','KEY'),
-							
+
 		array('name' => 'firstname', 'type' => 'varchar','size' => 30,
 							'DEFAULT'=>'Joan'),
-							
+
 		array('lastname','varchar',28,
 							'DEFAULT'=>'Chen','key'),
-							
+
 		array('averylonglongfieldname','X',1024,
 							'NOTNULL','default' => 'test'),
-							
+
 		array('price','N','7.2',
 							'NOTNULL','default' => '0.00'),
-							
-		array('MYDATE', 'D', 
+
+		array('MYDATE', 'D',
 							'DEFDATE'),
 		array('TS','T',
 							'DEFTIMESTAMP')
 	);*/
-	
+
 	$flds = "
 ID            I           AUTO KEY,
 FIRSTNAME     VARCHAR(30) DEFAULT 'Joan' INDEX idx_name,
@@ -58,25 +63,25 @@
 
 	$sqla = $dict->CreateDatabase('KUTU',array('postgres'=>"LOCATION='/u01/postdata'"));
 	$dict->SetSchema('KUTU');
-	
+
 	$sqli = ($dict->CreateTableSQL('testtable',$flds, $opts));
 	$sqla = array_merge($sqla,$sqli);
-	
+
 	$sqli = $dict->CreateIndexSQL('idx','testtable','price,firstname,lastname',array('BITMAP','FULLTEXT','CLUSTERED','HASH'));
 	$sqla = array_merge($sqla,$sqli);
 	$sqli = $dict->CreateIndexSQL('idx2','testtable','price,lastname');//,array('BITMAP','FULLTEXT','CLUSTERED'));
 	$sqla = array_merge($sqla,$sqli);
-	
+
 	$addflds = array(array('height', 'F'),array('weight','F'));
 	$sqli = $dict->AddColumnSQL('testtable',$addflds);
 	$sqla = array_merge($sqla,$sqli);
 	$addflds = array(array('height', 'F','NOTNULL'),array('weight','F','NOTNULL'));
 	$sqli = $dict->AlterColumnSQL('testtable',$addflds);
 	$sqla = array_merge($sqla,$sqli);
-	
-	
+
+
 	printsqla($dbType,$sqla);
-	
+
 	if (file_exists('d:\inetpub\wwwroot\php\phplens\adodb\adodb.inc.php'))
 	if ($dbType == 'mysqlt') {
 		$db->Connect('localhost', "root", "", "test");
@@ -90,7 +95,7 @@
 		$sqla2 = $dict->ChangeTableSQL('adoxyz',$flds);
 		if ($sqla2) printsqla($dbType,$sqla2);
 	}
-	
+
 	if ($dbType == 'odbc_mssql') {
 		$dsn = $dsn = "PROVIDER=MSDASQL;Driver={SQL Server};Server=localhost;Database=northwind;";
 		if (@$db->Connect($dsn, "sa", "natsoft", "test"));
@@ -98,13 +103,13 @@
 		$sqla2 = $dict->ChangeTableSQL('adoxyz',$flds);
 		if ($sqla2) printsqla($dbType,$sqla2);
 	}
-	
-	
-	
+
+
+
 	adodb_pr($dict->databaseType);
 	printsqla($dbType, $dict->DropColumnSQL('table',array('my col','`col2_with_Quotes`','A_col3','col3(10)')));
 	printsqla($dbType, $dict->ChangeTableSQL('adoxyz','LASTNAME varchar(32)'));
-	
+
 }
 
 function printsqla($dbType,$sqla)
@@ -134,7 +139,7 @@
 averylonglongfieldname LONGTEXT NOT NULL,
 price            NUMERIC(7,2) NOT NULL DEFAULT 0.00,
 MYDATE           DATE DEFAULT CURDATE(),
-                 PRIMARY KEY (id, lastname)
+								 PRIMARY KEY (id, lastname)
 )TYPE=ISAM;
 CREATE FULLTEXT INDEX idx ON KUTU.testtable (firstname,lastname);
 CREATE INDEX idx2 ON KUTU.testtable (price,lastname);
@@ -161,17 +166,17 @@
 averylonglongfieldname CLOB NOT NULL,
 price            NUMBER(7,2) DEFAULT 0.00 NOT NULL,
 MYDATE           DATE DEFAULT TRUNC(SYSDATE),
-                 PRIMARY KEY (id, lastname)
+								 PRIMARY KEY (id, lastname)
 )TABLESPACE USERS;
 /
 DROP SEQUENCE KUTU.SEQ_testtable;
 /
 CREATE SEQUENCE KUTU.SEQ_testtable;
 /
-CREATE OR REPLACE TRIGGER KUTU.TRIG_SEQ_testtable BEFORE insert ON KUTU.testtable 
+CREATE OR REPLACE TRIGGER KUTU.TRIG_SEQ_testtable BEFORE insert ON KUTU.testtable
 		FOR EACH ROW
 		BEGIN
-		  select KUTU.SEQ_testtable.nextval into :new.id from dual;
+			select KUTU.SEQ_testtable.nextval into :new.id from dual;
 		END;
 /
 CREATE BITMAP INDEX idx ON KUTU.testtable (firstname,lastname);
@@ -179,12 +184,12 @@
 CREATE INDEX idx2 ON KUTU.testtable (price,lastname);
 /
 ALTER TABLE testtable ADD (
- height           NUMBER,
- weight           NUMBER);
+height           NUMBER,
+weight           NUMBER);
 /
 ALTER TABLE testtable MODIFY(
- height           NUMBER NOT NULL,
- weight           NUMBER NOT NULL);
+height           NUMBER NOT NULL,
+weight           NUMBER NOT NULL);
 /
 
 
@@ -203,7 +208,7 @@
 averylonglongfieldname TEXT NOT NULL,
 price            NUMERIC(7,2) DEFAULT 0.00 NOT NULL,
 MYDATE           DATE DEFAULT CURRENT_DATE,
-                 PRIMARY KEY (id, lastname)
+								 PRIMARY KEY (id, lastname)
 );
 CREATE INDEX idx ON KUTU.testtable USING HASH (firstname,lastname);
 CREATE INDEX idx2 ON KUTU.testtable (price,lastname);
@@ -224,13 +229,13 @@
 averylonglongfieldname TEXT NOT NULL,
 price            NUMERIC(7,2) DEFAULT 0.00 NOT NULL,
 MYDATE           DATETIME DEFAULT GetDate(),
-                 PRIMARY KEY (id, lastname)
+								 PRIMARY KEY (id, lastname)
 );
 CREATE CLUSTERED INDEX idx ON KUTU.testtable (firstname,lastname);
 CREATE INDEX idx2 ON KUTU.testtable (price,lastname);
 ALTER TABLE KUTU.testtable  ADD
- height           REAL,
- weight           REAL;
+height           REAL,
+weight           REAL;
 ALTER TABLE KUTU.testtable  ALTER COLUMN height           REAL NOT NULL;
 ALTER TABLE KUTU.testtable  ALTER COLUMN weight           REAL NOT NULL;
 
Index: typo3/sysext/adodb/adodb/tests/testcache.php
===================================================================
--- typo3/sysext/adodb/adodb/tests/testcache.php	(revision 4551)
+++ typo3/sysext/adodb/adodb/tests/testcache.php	(working copy)
@@ -1,14 +1,19 @@
 <html>
 <body>
 <?php
-/* 
+	// This checks for my own IP at home. You can just remove the if-statement.
+if (1==0 || ($_SERVER['REMOTE_ADDR']!='127.0.0.1'))	{
+	die('In the source distribution of TYPO3, this script is disabled by a die() function call.<br/><b>Fix:</b> Open this file and remove/out-comment the line that outputs this message!');
+}
+
+/*
 V4.80 8 Mar 2006  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
-  Released under both BSD license and Lesser GPL library license. 
-  Whenever there is any discrepancy between the two licenses, 
-  the BSD license will take precedence. 
-  Set tabs to 4 for best viewing.
-	
-  Latest version is available at http://adodb.sourceforge.net
+	Released under both BSD license and Lesser GPL library license.
+	Whenever there is any discrepancy between the two licenses,
+	the BSD license will take precedence.
+	Set tabs to 4 for best viewing.
+
+	Latest version is available at http://adodb.sourceforge.net
 */
 
 $ADODB_CACHE_DIR = dirname(tempnam('/tmp',''));
Index: typo3/sysext/adodb/adodb/tests/testpear.php
===================================================================
--- typo3/sysext/adodb/adodb/tests/testpear.php	(revision 4551)
+++ typo3/sysext/adodb/adodb/tests/testpear.php	(working copy)
@@ -1,12 +1,17 @@
 <?php
-/* 
+	// This checks for my own IP at home. You can just remove the if-statement.
+if (1==0 || ($_SERVER['REMOTE_ADDR']!='127.0.0.1'))	{
+	die('In the source distribution of TYPO3, this script is disabled by a die() function call.<br/><b>Fix:</b> Open this file and remove/out-comment the line that outputs this message!');
+}
+
+/*
 V4.80 8 Mar 2006  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
-  Released under both BSD license and Lesser GPL library license. 
-  Whenever there is any discrepancy between the two licenses, 
-  the BSD license will take precedence. 
-  Set tabs to 4 for best viewing.
-	
-  Latest version is available at http://adodb.sourceforge.net
+	Released under both BSD license and Lesser GPL library license.
+	Whenever there is any discrepancy between the two licenses,
+	the BSD license will take precedence.
+	Set tabs to 4 for best viewing.
+
+	Latest version is available at http://adodb.sourceforge.net
 */
 
 error_reporting(E_ALL);
Index: typo3/sysext/adodb/adodb/tests/test.php
===================================================================
--- typo3/sysext/adodb/adodb/tests/test.php	(revision 4551)
+++ typo3/sysext/adodb/adodb/tests/test.php	(working copy)
@@ -1,12 +1,17 @@
 <?php
-/* 
+	// This checks for my own IP at home. You can just remove the if-statement.
+if (1==0 || ($_SERVER['REMOTE_ADDR']!='127.0.0.1'))	{
+	die('In the source distribution of TYPO3, this script is disabled by a die() function call.<br/><b>Fix:</b> Open this file and remove/out-comment the line that outputs this message!');
+}
+
+/*
 V4.80 8 Mar 2006  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
-  Released under both BSD license and Lesser GPL library license. 
-  Whenever there is any discrepancy between the two licenses, 
-  the BSD license will take precedence. 
-  Set tabs to 4 for best viewing.
-	
-  Latest version is available at http://adodb.sourceforge.net
+	Released under both BSD license and Lesser GPL library license.
+	Whenever there is any discrepancy between the two licenses,
+	the BSD license will take precedence.
+	Set tabs to 4 for best viewing.
+
+	Latest version is available at http://adodb.sourceforge.net
 */
 
 
@@ -70,7 +75,7 @@
 global $CACHED; $CACHED++;
 }
 
-// the table creation code is specific to the database, so we allow the user 
+// the table creation code is specific to the database, so we allow the user
 // to define their own table creation stuff
 
 function testdb(&$db,$createtab="create table ADOXYZ (id int, firstname char(24), lastname char(24), created date)")
@@ -78,42 +83,42 @@
 GLOBAL $ADODB_vers,$ADODB_CACHE_DIR,$ADODB_FETCH_MODE,$ADODB_COUNTRECS;
 
 	//adodb_pr($db);
-	
+
 ?>	<form method=GET>
 	</p>
 	<table width=100% ><tr><td bgcolor=beige>&nbsp;</td></tr></table>
 	</p>
-<?php  
+<?php
 	$create =false;
 	/*$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
-	
+
 	$rs = $db->Execute('select lastname,firstname,lastname,id from ADOXYZ');
 	$arr = $rs->GetAssoc();
 	echo "<pre>";print_r($arr);
 	die();*/
-	
+
 	if (!$db) die("testdb: database not inited");
 	GLOBAL $EXECS, $CACHED;
-	
+
 	$EXECS = 0;
 	$CACHED = 0;
 	//$db->Execute("drop table adodb_logsql");
 	if ((rand()%3) == 0) @$db->Execute("delete from adodb_logsql");
 	$db->debug=1;
-	
+
 	$db->fnExecute = 'CountExecs';
 	$db->fnCacheExecute = 'CountCachedExecs';
-	
+
 	if (empty($_GET['nolog'])) {
 		echo "<h3>SQL Logging enabled</h3>";
 		$db->LogSQL();/*
 		$sql =
-"SELECT t1.sid, t1.sid, t1.title, t1.hometext, t1.notes, t1.aid, t1.informant, 
-t2.url, t2.email, t1.catid, t3.title, t1.topic, t4.topicname, t4.topicimage, 
-t4.topictext, t1.score, t1.ratings, t1.counter, t1.comments, t1.acomm 
-FROM `nuke_stories` `t1`, `nuke_authors` `t2`, `nuke_stories_cat` `t3`, `nuke_topics` `t4` 
-	WHERE ((t2.aid=t1.aid) AND (t3.catid=t1.catid) AND (t4.topicid=t1.topic) 
-	AND ((t1.alanguage='german') OR (t1.alanguage='')) AND (t1.ihome='0')) 
+"SELECT t1.sid, t1.sid, t1.title, t1.hometext, t1.notes, t1.aid, t1.informant,
+t2.url, t2.email, t1.catid, t3.title, t1.topic, t4.topicname, t4.topicimage,
+t4.topictext, t1.score, t1.ratings, t1.counter, t1.comments, t1.acomm
+FROM `nuke_stories` `t1`, `nuke_authors` `t2`, `nuke_stories_cat` `t3`, `nuke_topics` `t4`
+	WHERE ((t2.aid=t1.aid) AND (t3.catid=t1.catid) AND (t4.topicid=t1.topic)
+	AND ((t1.alanguage='german') OR (t1.alanguage='')) AND (t1.ihome='0'))
 	ORDER BY t1.time DESC";
 		$db->SelectLimit($sql);
 		echo $db->ErrorMsg();*/
@@ -121,16 +126,16 @@
 	$ADODB_CACHE_DIR = dirname(TempNam('/tmp','testadodb'));
 	$db->debug = false;
 	//print $db->UnixTimeStamp('2003-7-22 23:00:00');
-	
+
 	$phpv = phpversion();
 	if (defined('ADODB_EXTENSION')) $ext = ' &nbsp; Extension '.ADODB_EXTENSION.' installed';
 	else $ext = '';
 	print "<h3>ADODB Version: $ADODB_vers Host: <i>$db->host</i> &nbsp; Database: <i>$db->database</i> &nbsp; PHP: $phpv $ext</h3>";
-	
+
 	flush();
 
 	if (function_exists('date_default_timezone_set')) date_default_timezone_set('Asia/Kuala_Lumpur');
-	
+
 	$arr = $db->ServerInfo();
 	print_r($arr);
 	echo E_ALL,' ',E_STRICT, "<br>";
@@ -138,11 +143,11 @@
 	echo error_reporting(),'<p>';
 	flush();
 	#$db->debug=1;
-	$tt  = $db->Time(); 
+	$tt  = $db->Time();
 	if ($tt == 0) echo '<br><b>$db->Time failed</b>';
 	else echo "<br>db->Time: ".date('d-m-Y H:i:s',$tt);
 	echo '<br>';
-	
+
 	echo "Date=",$db->UserDate('2002-04-07'),'<br>';
 	print "<i>date1</i> (1969-02-20) = ".$db->DBDate('1969-2-20');
 	print "<br><i>date1</i> (1999-02-20) = ".$db->DBDate('1999-2-20');
@@ -153,7 +158,7 @@
 	print "<br><i>ts2</i> (1999-02-20) = ".$db->DBTimeStamp('1999-2-20');
 	print "<br><i>ts3</i> (1970-1-2 +/- timezone) = ".$db->DBTimeStamp(24*3600);
 	print "<br> Fractional TS (1999-2-20 13:40:50.91): ".$db->DBTimeStamp($db->UnixTimeStamp('1999-2-20 13:40:50.91+1'));
-	 $dd = $db->UnixDate('1999-02-20');
+	$dd = $db->UnixDate('1999-02-20');
 	print "<br>unixdate</i> 1999-02-20 = ".date('Y-m-d',$dd)."<p>";
 	print "<br><i>ts4</i> =".($db->UnixTimeStamp("19700101000101")+8*3600);
 	print "<br><i>ts5</i> =".$db->DBTimeStamp($db->UnixTimeStamp("20040110092123"));
@@ -176,9 +181,9 @@
 	$rs=$db->Execute('select * from ADOXYZ order by id');
 	if($rs === false) $create = true;
 	else $rs->Close();
-	
+
 	//if ($db->databaseType !='vfp') $db->Execute("drop table ADOXYZ");
-	
+
 	if ($create) {
 		if (false && $db->databaseType == 'ibase') {
 			print "<b>Please create the following table for testing:</b></p>$createtab</p>";
@@ -194,7 +199,7 @@
 	echo "<p>Testing Metatypes</p>";
 	$t = $db->MetaType('varchar');
 	if ($t != 'C') Err("Bad Metatype for varchar");
-	
+
 	$rs = $db->Execute("delete from ADOXYZ"); // some ODBC drivers will fail the drop so we delete
 	if ($rs) {
 		if(! $rs->EOF) print "<b>Error: </b>RecordSet returned by Execute('delete...') should show EOF</p>";
@@ -214,7 +219,7 @@
 	}
 	if ($rs) $rs->Close();
 	flush();
-	//$db->debug=true;	
+	//$db->debug=true;
 	print "<p>Testing Commit: ";
 	$time = $db->DBDate(time());
 	if (!$db->BeginTrans()) {
@@ -241,8 +246,8 @@
 			} else print "<b>Commit failed</b></p>";
 		}
 		if ($db->transCnt != 0) Err("Invalid transCnt = $db->transCnt (should be 0)");
-		
-		/* ROLLBACK */	
+
+		/* ROLLBACK */
 		if (!$db->BeginTrans()) print "<p><b>Error in BeginTrans</b>()</p>";
 		print "<p>Testing Rollback: ";
 		$db->Execute("insert into ADOXYZ (id,firstname,lastname,created) values (100,'Should Not','Exist (Rollback)',$time)");
@@ -253,13 +258,13 @@
 			if ($rs) $rs->Close();
 		} else
 			print "<b>Commit failed</b></p>";
-			
+
 		$rs = $db->Execute('delete from ADOXYZ where id>50');
 		if ($rs) $rs->Close();
-		
+
 		if ($db->transCnt != 0) Err("Invalid transCnt = $db->transCnt (should be 0)");
 	}
-	
+
 	if (1) {
 		print "<p>Testing MetaDatabases()</p>";
 		print_r( $db->MetaDatabases());
@@ -268,35 +273,35 @@
 		$a = $db->MetaTables();
 		if ($a===false) print "<b>MetaTables not supported</b></p>";
 		else {
-			print "Array of tables and views: "; 
+			print "Array of tables and views: ";
 			foreach($a as $v) print " ($v) ";
 			print '</p>';
 		}
-		
+
 		$a = $db->MetaTables('VIEW');
 		if ($a===false) print "<b>MetaTables not supported (views)</b></p>";
 		else {
-			print "Array of views: "; 
+			print "Array of views: ";
 			foreach($a as $v) print " ($v) ";
 			print '</p>';
 		}
-		
+
 		$a = $db->MetaTables(false,false,'aDo%');
 		if ($a===false) print "<b>MetaTables not supported (mask)</b></p>";
 		else {
-			print "Array of ado%: "; 
+			print "Array of ado%: ";
 			foreach($a as $v) print " ($v) ";
 			print '</p>';
 		}
-		
+
 		$a = $db->MetaTables('TABLE');
 		if ($a===false) print "<b>MetaTables not supported</b></p>";
 		else {
-			print "Array of tables: "; 
+			print "Array of tables: ";
 			foreach($a as $v) print " ($v) ";
 			print '</p>';
 		}
-		
+
 		$db->debug=0;
 		$rez = $db->MetaColumns("NOSUCHTABLEHERE");
 		if ($rez !== false) {
@@ -311,9 +316,9 @@
 			foreach($a as $v) {print_r($v); echo "<br>";}
 			echo "</font>";
 		}
-		
+
 		print "<p>Testing MetaIndexes</p>";
-		
+
 		$a = $db->MetaIndexes(('ADOXYZ'),true);
 		if ($a===false) print "<b>MetaIndexes not supported</b></p>";
 		else {
@@ -327,13 +332,13 @@
 	}
 	$rs = $db->Execute('delete from ADOXYZ');
 	if ($rs) $rs->Close();
-	
+
 	$db->debug = false;
-	
-	
+
+
 	switch ($db->databaseType) {
 	case 'vfp':
-		
+
 		if (0) {
 			// memo test
 			$rs = $db->Execute("select data from memo");
@@ -353,7 +358,7 @@
 		print_r($arr);
 		if (!$arr) Err("No MetaForeignKeys");
 		break;
-	
+
 	case 'odbc_mssql':
 	case 'mssqlpo':
 		print "<p>Testing Foreign Keys</p>";
@@ -361,17 +366,17 @@
 		print_r($arr);
 		if (!$arr) Err("Bad MetaForeignKeys");
 		if ($db->databaseType == 'odbc_mssql') break;
-	
-	case 'mssql': 
-	
-		
+
+	case 'mssql':
+
+
 /*
 ASSUME Northwind available...
 
 CREATE PROCEDURE SalesByCategory
 	@CategoryName nvarchar(15), @OrdYear nvarchar(4) = '1998'
 AS
-IF @OrdYear != '1996' AND @OrdYear != '1997' AND @OrdYear != '1998' 
+IF @OrdYear != '1996' AND @OrdYear != '1997' AND @OrdYear != '1998'
 BEGIN
 	SELECT @OrdYear = '1998'
 END
@@ -379,8 +384,8 @@
 SELECT ProductName,
 	TotalPurchase=ROUND(SUM(CONVERT(decimal(14,2), OD.Quantity * (1-OD.Discount) * OD.UnitPrice)), 0)
 FROM [Order Details] OD, Orders O, Products P, Categories C
-WHERE OD.OrderID = O.OrderID 
-	AND OD.ProductID = P.ProductID 
+WHERE OD.OrderID = O.OrderID
+	AND OD.ProductID = P.ProductID
 	AND P.CategoryID = C.CategoryID
 	AND C.CategoryName = @CategoryName
 	AND SUBSTRING(CONVERT(nvarchar(22), O.OrderDate, 111), 1, 4) = @OrdYear
@@ -409,35 +414,35 @@
 
 		$cat = 'Dairy Products';
 		$yr = '1998';
-		
+
 		$stmt = $db->PrepareSP('SalesByCategory');
 		$db->InParameter($stmt,$cat,'CategoryName');
 		$db->InParameter($stmt,$yr,'OrdYear');
 		$rs = $db->Execute($stmt);
 		rs2html($rs);
-		
+
 		$cat = 'Grains/Cereals';
 		$yr = 1998;
-		
+
 		$stmt = $db->PrepareSP('SalesByCategory');
 		$db->InParameter($stmt,$cat,'CategoryName');
 		$db->InParameter($stmt,$yr,'OrdYear');
 		$rs = $db->Execute($stmt);
 		rs2html($rs);
-		
+
 		$ADODB_FETCH_MODE = $assoc;
-		
+
 		/*
 		Test out params - works in PHP 4.2.3 and 4.3.3 and 4.3.8 but not 4.3.0:
-		
-			CREATE PROCEDURE at_date_interval 
-				@days INTEGER, 
-				@start VARCHAR(20) OUT, 
-				@end VARCHAR(20) OUT 	
-			AS 
-			BEGIN 
-				set @start = CONVERT(VARCHAR(20), getdate(), 101) 
-				set @end =CONVERT(VARCHAR(20), dateadd(day, @days, getdate()), 101 ) 
+
+			CREATE PROCEDURE at_date_interval
+				@days INTEGER,
+				@start VARCHAR(20) OUT,
+				@end VARCHAR(20) OUT
+			AS
+			BEGIN
+				set @start = CONVERT(VARCHAR(20), getdate(), 101)
+				set @end =CONVERT(VARCHAR(20), dateadd(day, @days, getdate()), 101 )
 			END
 			GO
 		*/
@@ -446,20 +451,20 @@
 		$days = 10;
 		$begin_date = '';
 		$end_date = '';
-		$db->InParameter($stmt,$days,'days', 4, SQLINT4); 
-		$db->OutParameter($stmt,$begin_date,'start', 20, SQLVARCHAR ); 
-		$db->OutParameter($stmt,$end_date,'end', 20, SQLVARCHAR ); 
+		$db->InParameter($stmt,$days,'days', 4, SQLINT4);
+		$db->OutParameter($stmt,$begin_date,'start', 20, SQLVARCHAR );
+		$db->OutParameter($stmt,$end_date,'end', 20, SQLVARCHAR );
 		$db->Execute($stmt);
 		if (empty($begin_date) or empty($end_date) or $begin_date == $end_date) {
 			Err("MSSQL SP Test for OUT Failed");
 			print "begin=$begin_date end=$end_date<p>";
 		} else print "(Today +10days) = (begin=$begin_date end=$end_date)<p>";
-	
+
 		$db->debug = $saved;
 		break;
-	case 'oci8': 
+	case 'oci8':
 	case 'oci8po':
-		
+
 		if (0) {
 		$t = getmicrotime();
 		$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
@@ -469,48 +474,48 @@
 		echo "<p>t = ",getmicrotime() - $t,"</p>";
 		die();
 		}
-		
+
 		# cleanup
 		$db->Execute("delete from photos where id=99 or id=1");
 		$db->Execute("insert into photos (id) values(1)");
 		$db->Execute("update photos set photo=null,descclob=null where id=1");
-		
+
 		$saved = $db->debug;
 		$db->debug=true;
-		
-		
+
+
 
 		/*
 		CREATE TABLE PHOTOS
 		(
-		  ID           NUMBER(16),
-		  PHOTO        BLOB,
-		  DESCRIPTION  VARCHAR2(4000 BYTE),
-		  DESCCLOB     CLOB
+			ID           NUMBER(16),
+			PHOTO        BLOB,
+			DESCRIPTION  VARCHAR2(4000 BYTE),
+			DESCCLOB     CLOB
 		);
-		
+
 		INSERT INTO PHOTOS (ID) VALUES(1);
 		*/
 		$s = '';
 		for ($i = 0; $i <= 500; $i++) {
 			$s .= '1234567890';
 		}
-		
+
 		$sql = "INSERT INTO photos ( ID, photo) ".
 			"VALUES ( :id, empty_blob() )".
 			" RETURNING photo INTO :xx";
 
-		
+
 		$blob_data = $s;
 		$id = 99;
-		
- 		$stmt = $db->PrepareSP($sql);
+
+		$stmt = $db->PrepareSP($sql);
 		$db->InParameter($stmt, $id, 'id');
 		$blob = $db->InParameter($stmt, $s, 'xx',-1, OCI_B_BLOB);
 		$db->StartTrans();
 		$result = $db->Execute($stmt);
 		$db->CompleteTrans();
-		
+
 		$s2= $db->GetOne("select photo from photos where id=99");
 		echo "<br>---$s2";
 		if ($s !== $s2) Err("insert blob does not match");
@@ -522,7 +527,7 @@
 			$s2= $db->GetOne("select photo from photos where id=1");
 			if ($s !== $s2) Err("updateblob does not match");
 		}
-		
+
 		print "<h4>Testing Clob: size=".strlen($s)."</h4>";
 		$ok = $db->UpdateClob('photos','descclob',$s,'id=1');
 		if (!$ok) Err("Clob failed 1");
@@ -530,8 +535,8 @@
 			$s2= $db->GetOne("select descclob from photos where id=1");
 			if ($s !== $s2) Err("updateclob does not match");
 		}
-		
-		
+
+
 		$s = '';
 		$s2 = '';
 		print "<h4>Testing Foreign Keys</h4>";
@@ -540,8 +545,8 @@
 		if (!$arr) Err("Bad MetaForeignKeys");
 /*
 -- TEST PACKAGE
--- "Set scan off" turns off substitution variables. 
-Set scan off; 
+-- "Set scan off" turns off substitution variables.
+Set scan off;
 
 CREATE OR REPLACE PACKAGE Adodb AS
 TYPE TabType IS REF CURSOR RETURN TAB%ROWTYPE;
@@ -570,7 +575,7 @@
 	BEGIN
 		output := 'Cinta Hati '||input;
 	END;
-	
+
 PROCEDURE data_in(input IN VARCHAR) IS
 	ignore varchar(1000);
 	BEGIN
@@ -588,7 +593,7 @@
 
 		print "<h4>Testing Cursor Variables</h4>";
 		$rs = $db->ExecuteCursor("BEGIN adodb.open_tab(:zz,'A%'); END;",'zz');
-	
+
 		if ($rs && !$rs->EOF) {
 			$v = $db->GetOne("SELECT count(*) FROM tab where tname like 'A%'");
 			if ($v == $rs->RecordCount()) print "Test 1 RowCount: OK<p>";
@@ -597,9 +602,9 @@
 			print "<b>Error in using Cursor Variables 1</b><p>";
 		}
 		$rs->Close();
-		
+
 		print "<h4>Testing Stored Procedures for oci8</h4>";
-		
+
 		$stmt = $db->PrepareSP("BEGIN adodb.data_out(:a1, :a2); END;");
 		$a1 = 'Malaysia';
 		//$a2 = ''; # a2 doesn't even need to be defined!
@@ -612,21 +617,21 @@
 		} else {
 			print "<b>Error in using Stored Procedure IN/Out Variables</b><p>";
 		}
-		
+
 		$tname = 'A%';
-		
+
 		$stmt = $db->PrepareSP('select * from tab where tname like :tablename');
 		$db->Parameter($stmt,$tname,'tablename');
 		$rs = $db->Execute($stmt);
 		rs2html($rs);
-		
+
 		$stmt = $db->PrepareSP("begin adodb.data_in(:a1); end;");
 		$db->InParameter($stmt,$a1,'a1');
 		$db->Execute($stmt);
-		
+
 		$db->debug = $saved;
 		break;
-	
+
 	default:
 		break;
 	}
@@ -644,14 +649,14 @@
 	$db->CompleteTrans();
 	$rs = $db->Execute('select * from ADOXYZ order by id');
 	if (!$rs || $rs->RecordCount() != 3) Err("Bad bulk insert");
-	
+
 	rs2html($rs);
-	
+
 	$db->Execute('delete from ADOXYZ');
-		
+
 	print "<p>Inserting 50 rows</p>";
 
-	for ($i = 0; $i < 5; $i++) {	
+	for ($i = 0; $i < 5; $i++) {
 
 	$time = $db->DBDate(time());
 	if (empty($_GET['hide'])) $db->debug = true;
@@ -659,20 +664,20 @@
 	case 'mssqlpo':
 	case 'mssql':
 		$sqlt = "CREATE TABLE mytable (
-  row1 INT  IDENTITY(1,1) NOT NULL,
-  row2 varchar(16),
-  PRIMARY KEY  (row1))";
-  		//$db->debug=1;
-  		if (!$db->Execute("delete from mytable")) 
+	row1 INT  IDENTITY(1,1) NOT NULL,
+	row2 varchar(16),
+	PRIMARY KEY  (row1))";
+			//$db->debug=1;
+			if (!$db->Execute("delete from mytable"))
 			$db->Execute($sqlt);
-			
+
 		$ok = $db->Execute("insert into mytable (row2) values ('test')");
 		$ins_id=$db->Insert_ID();
 		echo "Insert ID=";var_dump($ins_id);
 		if ($ins_id == 0) Err("Bad Insert_ID()");
 		$ins_id2 = $db->GetOne("select row1 from mytable");
 		if ($ins_id != $ins_id2) Err("Bad Insert_ID() 2");
-		
+
 		$arr = array(0=>'Caroline',1=>'Miranda');
 		$sql = "insert into ADOXYZ (id,firstname,lastname,created) values ($i*10+0,?,?,$time)";
 		break;
@@ -680,38 +685,38 @@
 	case 'mysqlt':
 	case 'mysql':
 		$sqlt = "CREATE TABLE `mytable` (
-  `row1` int(11) NOT NULL auto_increment,
-  `row2` varchar(16) NOT NULL default '',
-  PRIMARY KEY  (`row1`),
-  KEY `myindex` (`row1`,`row2`)
+	`row1` int(11) NOT NULL auto_increment,
+	`row2` varchar(16) NOT NULL default '',
+	PRIMARY KEY  (`row1`),
+	KEY `myindex` (`row1`,`row2`)
 ) ";
-		if (!$db->Execute("delete from mytable")) 
+		if (!$db->Execute("delete from mytable"))
 			$db->Execute($sqlt);
-			
+
 		$ok = $db->Execute("insert into mytable (row2) values ('test')");
 		$ins_id=$db->Insert_ID();
 		echo "Insert ID=";var_dump($ins_id);
 		if ($ins_id == 0) Err("Bad Insert_ID()");
 		$ins_id2 = $db->GetOne("select row1 from mytable");
 		if ($ins_id != $ins_id2) Err("Bad Insert_ID() 2");
-		
+
 	default:
 		$arr = array(0=>'Caroline',1=>'Miranda');
 		$sql = "insert into ADOXYZ (id,firstname,lastname,created) values ($i*10+0,?,?,$time)";
 		break;
-	
+
 	case 'oci8':
 	case 'oci805':
 		$arr = array('first'=>'Caroline','last'=>'Miranda');
 		$amt = rand() % 100;
-		$sql = "insert into ADOXYZ (id,firstname,lastname,created) values ($i*10+0,:first,:last,$time)";		
+		$sql = "insert into ADOXYZ (id,firstname,lastname,created) values ($i*10+0,:first,:last,$time)";
 		break;
 	}
 	if ($i & 1) {
 		$sql = $db->Prepare($sql);
 	}
 	$rs = $db->Execute($sql,$arr);
-		
+
 	if ($rs === false) Err( 'Error inserting with parameters');
 	else $rs->Close();
 	$db->debug = false;
@@ -732,45 +737,45 @@
 	$db->debug=1;
 	$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
 	$cnt = $db->GetOne("select count(*) from ADOXYZ");
-	$rs = $db->Execute('update ADOXYZ set id=id+1');	
+	$rs = $db->Execute('update ADOXYZ set id=id+1');
 	if (!is_object($rs)) {
 		print_r($rs);
 		err("Update should return object");
-	} 
+	}
 	if (!$rs) err("Update generated error");
-	
-	$nrows = $db->Affected_Rows();   
+
+	$nrows = $db->Affected_Rows();
 	if ($nrows === false) print "<p><b>Affected_Rows() not supported</b></p>";
 	else if ($nrows != $cnt)  print "<p><b>Affected_Rows() Error: $nrows returned (should be 50) </b></p>";
 	else print "<p>Affected_Rows() passed</p>";
 	}
-	
+
 	if ($db->dataProvider == 'oci8')  $array = array('zid'=>1,'zdate'=>date('Y-m-d',time()));
 	else $array=array(1,date('Y-m-d',time()));
-	
-	
+
+
 	#$array = array(1,date('Y-m-d',time()));
-	$id = $db->GetOne("select id from ADOXYZ 
+	$id = $db->GetOne("select id from ADOXYZ
 		where id=".$db->Param('zid')." and created>=".$db->Param('ZDATE')."",
 		$array);
 	if ($id != 1) Err("Bad bind; id=$id");
 	else echo "<br>Bind date/integer 1 passed";
-	
+
 	$array =array(1,$db->BindDate(time()));
-	$id = $db->GetOne("select id from ADOXYZ 
+	$id = $db->GetOne("select id from ADOXYZ
 		where id=".$db->Param('0')." and created>=".$db->Param('1')."",
 		$array);
 	if ($id != 1) Err("Bad bind; id=$id");
 	else echo "<br>Bind date/integer 2 passed";
-	
+
 	$db->debug = false;
 	$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
- //////////////////////////////////////////////////////////////////////////////////////////
-	
+//////////////////////////////////////////////////////////////////////////////////////////
+
 	$rs = $db->Execute("select * from ADOXYZ where firstname = 'not known'");
 	if (!$rs ||  !$rs->EOF) print "<p><b>Error on empty recordset</b></p>";
 	else if ($rs->RecordCount() != 0) {
-		print "<p><b>Error on RecordCount. Should be 0. Was ".$rs->RecordCount()."</b></p>"; 
+		print "<p><b>Error on RecordCount. Should be 0. Was ".$rs->RecordCount()."</b></p>";
 		print_r($rs->fields);
 	}
 	if ($db->databaseType !== 'odbc') {
@@ -793,24 +798,24 @@
 		else print "<p><b>Error in Execute of SELECT with random</b></p>";
 	}
 	$val = $db->GetOne("select count(*) from ADOXYZ");
-	 if ($val == 50) print "<p>GetOne returns ok</p>";
-	 else print "<p><b>Fail: GetOne returns $val</b></p>";
+	if ($val == 50) print "<p>GetOne returns ok</p>";
+	else print "<p><b>Fail: GetOne returns $val</b></p>";
 
-	 echo "<b>GetRow Test</b>";
+	echo "<b>GetRow Test</b>";
 	$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
 	$val1 = $db->GetRow("select count(*) from ADOXYZ");
 	$val2 = $db->GetRow("select count(*) from ADOXYZ");
-	 if ($val1[0] == 50 and sizeof($val1) == 1 and $val2[0] == 50 and sizeof($val2) == 1) print "<p>GetRow returns ok</p>";
-	 else {
-	 	print_r($val);
-	 	print "<p><b>Fail: GetRow returns {$val2[0]}</b></p>";
+	if ($val1[0] == 50 and sizeof($val1) == 1 and $val2[0] == 50 and sizeof($val2) == 1) print "<p>GetRow returns ok</p>";
+	else {
+		print_r($val);
+		print "<p><b>Fail: GetRow returns {$val2[0]}</b></p>";
 	}
 
 	print "<p>FetchObject/FetchNextObject Test</p>";
 	$rs = $db->Execute('select * from ADOXYZ');
 	if ($rs) {
 		if (empty($rs->connection)) print "<b>Connection object missing from recordset</b></br>";
-		
+
 		while ($o = $rs->FetchNextObject()) { // calls FetchObject internally
 			if (!is_string($o->FIRSTNAME) || !is_string($o->LASTNAME)) {
 				print_r($o);
@@ -836,14 +841,14 @@
 		}
 	}
 	$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
-	
+
 	$savefetch = $ADODB_FETCH_MODE;
 	$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
-	
+
 	print "<p>CacheSelectLimit  Test...</p>";
 	$db->debug=1;
 	$rs = $db->CacheSelectLimit('select  id, firstname from  ADOXYZ order by id',2);
-	
+
 	if ($rs && !$rs->EOF) {
 		if (isset($rs->fields[0])) {
 			Err("ASSOC has numeric fields");
@@ -851,7 +856,7 @@
 		}
 		if ($rs->fields['id'] != 1)  {Err("Error"); print_r($rs->fields);};
 		if (trim($rs->fields['firstname']) != 'Caroline')  {print Err("Error 2"); print_r($rs->fields);};
-		
+
 		$rs->MoveNext();
 		if ($rs->fields['id'] != 2)  {Err("Error 3"); print_r($rs->fields);};
 		$rs->MoveNext();
@@ -860,7 +865,7 @@
 			print_r($rs);
 		}
 	}
-	
+
 	print "<p>FETCH_MODE = ASSOC: Should get 1, Caroline</p>";
 	$rs = $db->SelectLimit('select id,firstname from ADOXYZ order by id',2);
 	if ($rs && !$rs->EOF) {
@@ -882,7 +887,7 @@
 			print_r($rs->fields);
 		}
 	}
-	
+
 	$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
 	print "<p>FETCH_MODE = NUM: Should get 1, Caroline</p>";
 	$rs = $db->SelectLimit('select id,firstname from ADOXYZ order by id',1);
@@ -895,7 +900,7 @@
 
 	}
 	$ADODB_FETCH_MODE = $savefetch;
-	
+
 	$db->debug = false;
 	print "<p>GetRowAssoc Upper: Should get 1, Caroline</p>";
 	$rs = $db->SelectLimit('select id,firstname from ADOXYZ order by id',1);
@@ -915,32 +920,32 @@
 		if (trim($arr['firstname']) != 'Caroline') {Err("Error 2"); print_r($arr);};
 
 	}
-	
+
 	print "<p>GetCol Test</p>";
 	$col = $db->GetCol('select distinct firstname from ADOXYZ order by 1');
 	if (!is_array($col)) Err("Col size is wrong");
 	if (trim($col[0]) != 'Alan' or trim($col[9]) != 'Yat Sun') Err("Col elements wrong");
 
 	$db->debug = true;
-	
-		
+
+
 	echo "<p>Date Update Test</p>";
 	$zdate = date('Y-m-d',time()+3600*24);
 	$zdate = $db->DBDate($zdate);
 	$db->Execute("update ADOXYZ set created=$zdate where id=1");
 	$row = $db->GetRow("select created,firstname from ADOXYZ where id=1");
 	print_r($row); echo "<br>";
-	
-	
-	
+
+
+
 	print "<p>SelectLimit Distinct Test 1: Should see Caroline, John and Mary</p>";
 	$rs = $db->SelectLimit('select distinct * from ADOXYZ order by id',3);
-	
-	
+
+
 	if ($rs && !$rs->EOF) {
 		if (trim($rs->fields[1]) != 'Caroline') Err("Error 1 (exp Caroline), ".$rs->fields[1]);
 		$rs->MoveNext();
-		
+
 		if (trim($rs->fields[1]) != 'John') Err("Error 2 (exp John), ".$rs->fields[1]);
 		$rs->MoveNext();
 		if (trim($rs->fields[1]) != 'Mary') Err("Error 3 (exp Mary),".$rs->fields[1]);
@@ -948,7 +953,7 @@
 		if (! $rs->EOF) Err("Error EOF");
 		//rs2html($rs);
 	} else Err("Failed SelectLimit Test 1");
-	
+
 	print "<p>SelectLimit Test 2: Should see Mary, George and Mr. Alan</p>";
 	$rs = $db->SelectLimit('select * from ADOXYZ order by id',3,2);
 	if ($rs && !$rs->EOF) {
@@ -961,8 +966,8 @@
 		if (! $rs->EOF) Err("Error EOF");
 	//	rs2html($rs);
 	}
-	 else Err("Failed SelectLimit Test 2 ". ($rs ? 'EOF':'no RS'));
-	
+	else Err("Failed SelectLimit Test 2 ". ($rs ? 'EOF':'no RS'));
+
 	print "<p>SelectLimit Test 3: Should see Wai Hun and Steven</p>";
 	$db->debug=1;
 	global $A; $A=1;
@@ -979,12 +984,12 @@
 		}
 		//rs2html($rs);
 	}
-	 else Err("Failed SelectLimit Test 3");
+	else Err("Failed SelectLimit Test 3");
 		$db->debug = false;
-	
-	
+
+
 	$rs = $db->Execute("select * from ADOXYZ order by id");
-	print "<p>Testing Move()</p>";	
+	print "<p>Testing Move()</p>";
 	if (!$rs)Err( "Failed Move SELECT");
 	else {
 		if (!$rs->Move(2)) {
@@ -996,13 +1001,13 @@
 				print "<p><b>$db->databaseType: MoveFirst failed -- probably cannot scroll backwards</b></p>";
 			}
 			else print "MoveFirst() OK<BR>";
-						
+
 						// Move(3) tests error handling -- MoveFirst should not move cursor
 			$rs->Move(3);
 			if (trim($rs->Fields("firstname")) != 'George') {
 				print '<p>'.$rs->Fields("id")."<b>$db->databaseType: Move(3) failed</b></p>";
 			} else print "Move(3) OK<BR>";
-						
+
 			$rs->Move(7);
 			if (trim($rs->Fields("firstname")) != 'Yat Sun') {
 				print '<p>'.$rs->Fields("id")."<b>$db->databaseType: Move(7) failed</b></p>";
@@ -1011,8 +1016,8 @@
 			if ($rs->EOF) Err("Move(7) is EOF already");
 			$rs->MoveLast();
 			if (trim($rs->Fields("firstname")) != 'Steven'){
-				 print '<p>'.$rs->Fields("id")."<b>$db->databaseType: MoveLast() failed</b></p>";
-				 print_r($rs);
+				print '<p>'.$rs->Fields("id")."<b>$db->databaseType: MoveLast() failed</b></p>";
+				print_r($rs);
 			}else print "MoveLast() OK<BR>";
 			$rs->MoveNext();
 			if (!$rs->EOF) err("Bad MoveNext");
@@ -1020,22 +1025,22 @@
 				$rs->Move(3);
 				if (trim($rs->Fields("firstname")) != 'George') {
 					print '<p>'.$rs->Fields("id")."<b>$db->databaseType: Move(3) after MoveLast failed</b></p>";
-					
+
 				} else print "Move(3) after MoveLast() OK<BR>";
 			}
-			
+
 			print "<p>Empty Move Test";
 			$rs = $db->Execute("select * from ADOXYZ where id > 0 and id < 0");
 			$rs->MoveFirst();
 			if (!$rs->EOF || $rs->fields) Err("Error in empty move first");
 		}
 	}
-	
+
 	$rs = $db->Execute('select * from ADOXYZ where id = 2');
 	if ($rs->EOF || !is_array($rs->fields)) Err("Error in select");
 	$rs->MoveNext();
 	if (!$rs->EOF) Err("Error in EOF (xx) ");
- //	$db->debug=true;
+//	$db->debug=true;
 	print "<p>Testing ADODB_FETCH_ASSOC and concat: concat firstname and lastname</p>";
 
 	$save = $ADODB_FETCH_MODE;
@@ -1055,14 +1060,14 @@
 	$ADODB_FETCH_MODE = $save;
 	print "<hr />Testing GetArray() ";
 	//$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
-	
+
 	$rs = $db->Execute("select * from ADOXYZ order by id");
 	if ($rs) {
 		$arr = $rs->GetArray(10);
 		if (sizeof($arr) != 10 || trim($arr[1][1]) != 'John' || trim($arr[1][2]) != 'Lim') print $arr[1][1].' '.$arr[1][2]."<b> &nbsp; ERROR</b><br>";
 		else print " OK<BR>";
 	}
-	
+
 	$arr = $db->GetArray("select x from ADOXYZ");
 	$e = $db->ErrorMsg(); $e2 = $db->ErrorNo();
 	echo "Testing error handling, should see illegal column 'x' error=<i>$e ($e2) </i><br>";
@@ -1072,11 +1077,11 @@
 	$fcnt = 0;
 	if ($rs)
 	while ($o = $rs->FetchNextObject()) {
-		$fcnt += 1;	
+		$fcnt += 1;
 	}
 	if ($fcnt == 1) print " OK<BR>";
 	else print "<b>FAILED</b><BR>";
-	
+
 	$stmt = $db->Prepare("select * from ADOXYZ where id < 3");
 	$rs = $db->Execute($stmt);
 	if (!$rs) Err("Prepare failed");
@@ -1092,14 +1097,14 @@
 	//print_r($arr);
 	print "<hr />";
 	$rs = $db->Execute("select distinct lastname,firstname,created from ADOXYZ");
-	
+
 	if ($rs) {
 		$arr = $rs->GetAssoc();
 		//print_r($arr);
 		if (empty($arr['See']) || trim(reset($arr['See'])) != 'Wai Hun') print $arr['See']." &nbsp; <b>ERROR</b><br>";
 		else print " OK 1";
 	}
-	
+
 	$arr = $db->GetAssoc("select distinct lastname,firstname from ADOXYZ");
 	if ($arr) {
 		//print_r($arr);
@@ -1112,41 +1117,41 @@
 	$query = $db->Prepare("select count(*) from ADOXYZ");
 	$rs = $db->CacheExecute(10,$query);
 	if (reset($rs->fields) != 50) echo Err("$cnt wrong for Prepare/CacheGetOne");
-	
+
 	for ($loop=0; $loop < 1; $loop++) {
 	print "Testing GetMenu() and CacheExecute<BR>";
 	$db->debug = true;
 	$rs = $db->CacheExecute(4,"select distinct firstname,lastname from ADOXYZ");
-	
-	
 
 
-	if ($rs) print 'With blanks, Steven selected:'. $rs->GetMenu('menu','Steven').'<BR>'; 
+
+
+	if ($rs) print 'With blanks, Steven selected:'. $rs->GetMenu('menu','Steven').'<BR>';
 	else print " Fail<BR>";
 	$rs = $db->CacheExecute(4,"select distinct firstname,lastname from ADOXYZ");
-	
+
 	if ($rs) print ' No blanks, Steven selected: '. $rs->GetMenu('menu','Steven',false).'<BR>';
 	else print " Fail<BR>";
-	
+
 	$rs = $db->CacheExecute(4,"select distinct firstname,lastname from ADOXYZ");
-	
+
 	if ($rs) print ' 1st line set to **** , Steven selected: '. $rs->GetMenu('menu','Steven','1st:****').'<BR>';
 	else print " Fail<BR>";
-	
+
+
 
-	
 	$rs = $db->CacheExecute(4,"select distinct firstname,lastname from ADOXYZ");
 	if ($rs) print ' Multiple, Alan selected: '. $rs->GetMenu('menu','Alan',false,true).'<BR>';
 	else print " Fail<BR>";
 	print '</p><hr />';
-	
+
 	$rs = $db->CacheExecute(4,"select distinct firstname,lastname from ADOXYZ");
 	if ($rs) {
 		print ' Multiple, Alan and George selected: '. $rs->GetMenu('menu',array('Alan','George'),false,true);
 		if (empty($rs->connection)) print "<b>Connection object missing from recordset</b></br>";
 	} else print " Fail<BR>";
 	print '</p><hr />';
-	
+
 	print "Testing GetMenu3()<br>";
 	$rs = $db->Execute("select ".$db->Concat('firstname',"'-'",'id').",id, lastname from ADOXYZ order by lastname,id");
 	if ($rs) print "Grouped Menu: ".$rs->GetMenu3('name');
@@ -1155,7 +1160,7 @@
 
 	print "Testing GetMenu2() <BR>";
 	$rs = $db->CacheExecute(4,"select distinct firstname,lastname from ADOXYZ");
-	if ($rs) print 'With blanks, Steven selected:'. $rs->GetMenu2('menu',('Oey')).'<BR>'; 
+	if ($rs) print 'With blanks, Steven selected:'. $rs->GetMenu2('menu',('Oey')).'<BR>';
 	else print " Fail<BR>";
 	$rs = $db->CacheExecute(6,"select distinct firstname,lastname from ADOXYZ");
 	if ($rs) print ' No blanks, Steven selected: '. $rs->GetMenu2('menu',('Oey'),false).'<BR>';
@@ -1167,55 +1172,55 @@
 	$rs = $db->CacheExecute(6,"select distinct firstname,lastname from ADOXYZ");
 	print_r($rs->fields); echo $rs->fetchMode;echo "<br>";
 	echo $rs->Fields('firstname');
-	
+
 	$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
 	$rs = $db->CacheExecute(6,"select distinct firstname,lastname from ADOXYZ");
 	print_r($rs->fields);echo "<br>";
 	echo $rs->Fields('firstname');
 	$db->debug = false;
-	
+
 	$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
 	// phplens
-	
+
 	$sql = 'select * from ADOXYZ where 0=1';
 	echo "<p>**Testing '$sql' (phplens compat 1)</p>";
 	$rs = $db->Execute($sql);
 	if (!$rs) err( "<b>No recordset returned for '$sql'</b>");
 	if (!$rs->FieldCount()) err( "<b>No fields returned for $sql</b>");
 	if (!$rs->FetchField(1)) err( "<b>FetchField failed for $sql</b>");
-	
+
 	$sql = 'select * from ADOXYZ order by 1';
 	echo "<p>**Testing '$sql' (phplens compat 2)</p>";
 	$rs = $db->Execute($sql);
 	if (!$rs) err( "<b>No recordset returned for '$sql'<br>".$db->ErrorMsg()."</b>");
-	
-	
+
+
 	$sql = 'select * from ADOXYZ order by 1,1';
 	echo "<p>**Testing '$sql' (phplens compat 3)</p>";
 	$rs = $db->Execute($sql);
 	if (!$rs) err( "<b>No recordset returned for '$sql'<br>".$db->ErrorMsg()."</b>");
-	
-	
+
+
 	// Move
 	$rs1 = $db->Execute("select id from ADOXYZ where id <= 2 order by 1");
 	$rs2 = $db->Execute("select id from ADOXYZ where id = 3 or id = 4 order by 1");
 
 	if ($rs1) $rs1->MoveLast();
 	if ($rs2) $rs2->MoveLast();
-	
+
 	if (empty($rs1) || empty($rs2) || $rs1->fields[0] != 2 || $rs2->fields[0] != 4) {
 		$a = $rs1->fields[0];
 		$b = $rs2->fields[0];
 		print "<p><b>Error in multiple recordset test rs1=$a rs2=$b (should be rs1=2 rs2=4)</b></p>";
 	} else
 		print "<p>Testing multiple recordsets OK</p>";
-		
-	
+
+
 	echo "<p> GenID test: ";
-	for ($i=1; $i <= 10; $i++) 
+	for ($i=1; $i <= 10; $i++)
 		echo  "($i: ",$val = $db->GenID($db->databaseType.'abcseq6' ,5), ") ";
 	if ($val == 0) Err("GenID not supported");
-	
+
 	if ($val) {
 		$db->DropSequence('abc_seq2');
 		$db->CreateSequence('abc_seq2');
@@ -1226,17 +1231,17 @@
 		if ($val != 1) Err("Drop and Create Sequence not supported ($val)");
 	}
 	echo "<p>";
-	
+
 	if (substr($db->dataProvider,0,3) != 'notused') { // used to crash ado
 		$sql = "select firstnames from ADOXYZ";
 		print "<p>Testing execution of illegal statement: <i>$sql</i></p>";
 		if ($db->Execute($sql) === false) {
 			print "<p>This returns the following ErrorMsg(): <i>".$db->ErrorMsg()."</i> and ErrorNo(): ".$db->ErrorNo().'</p>';
-		} else 
+		} else
 			print "<p><b>Error in error handling -- Execute() should return false</b></p>";
-	} else 
+	} else
 		print "<p><b>ADO skipped error handling of bad select statement</b></p>";
-	
+
 	print "<p>ASSOC TEST 2<br>";
 	$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
 	$rs = $db->query('select * from ADOXYZ order by id');
@@ -1247,38 +1252,38 @@
 		Err("Error No = $ee");
 	}
 	print_r($rs->fields);
-	for($i=0;$i<$rs->FieldCount();$i++) 
-	{ 
-		$fld=$rs->FetchField($i); 
-		print "<br> Field name is ".$fld->name; 
-		print " ".$rs->Fields($fld->name); 
-	} 
+	for($i=0;$i<$rs->FieldCount();$i++)
+	{
+		$fld=$rs->FetchField($i);
+		print "<br> Field name is ".$fld->name;
+		print " ".$rs->Fields($fld->name);
+	}
+
 
-		
 	print "<p>BOTH TEST 2<br>";
 	if ($db->dataProvider == 'ado') {
 		print "<b>ADODB_FETCH_BOTH not supported</b> for dataProvider=".$db->dataProvider."<br>";
 	} else {
 		$ADODB_FETCH_MODE = ADODB_FETCH_BOTH;
 		$rs = $db->query('select * from ADOXYZ order by id');
-		for($i=0;$i<$rs->FieldCount();$i++) 
-		{ 
-			$fld=$rs->FetchField($i); 
-			print "<br> Field name is ".$fld->name; 
-			print " ".$rs->Fields($fld->name); 
-		} 
+		for($i=0;$i<$rs->FieldCount();$i++)
+		{
+			$fld=$rs->FetchField($i);
+			print "<br> Field name is ".$fld->name;
+			print " ".$rs->Fields($fld->name);
+		}
 	}
-	
+
 	print "<p>NUM TEST 2<br>";
 	$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
 	$rs = $db->query('select * from ADOXYZ order by id');
-	for($i=0;$i<$rs->FieldCount();$i++) 
-	{ 
-		$fld=$rs->FetchField($i); 
-		print "<br> Field name is ".$fld->name; 
-		print " ".$rs->Fields($fld->name); 
-	} 
-	
+	for($i=0;$i<$rs->FieldCount();$i++)
+	{
+		$fld=$rs->FetchField($i);
+		print "<br> Field name is ".$fld->name;
+		print " ".$rs->Fields($fld->name);
+	}
+
 	print "<p>ASSOC Test of SelectLimit<br>";
 	$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
 	$rs = $db->selectlimit('select * from ADOXYZ order by id',3,4);
@@ -1292,8 +1297,8 @@
 		$rs->MoveNext();
 	}
 	if ($cnt != 3) print "<br><b>Count should be 3, instead it was $cnt</b></p>";
-	
-	
+
+
 	$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
 	if ($db->sysDate) {
 		$saved = $db->debug;
@@ -1303,7 +1308,7 @@
 			print "<p><b>Invalid date {$rs->fields[0]}</b></p>";
 		} else
 			print "<p>Passed \$sysDate test ({$rs->fields[0]})</p>";
-		
+
 		print_r($rs->FetchField(0));
 		print time();
 		$db->debug=$saved;
@@ -1314,14 +1319,14 @@
 	print "<p>Test CSV</p>";
 	include_once('../toexport.inc.php');
 	//$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
-	$rs = $db->SelectLimit('select id,firstname,lastname,created,\'He, he\' he,\'"\' q  from ADOXYZ',10);	
-	
+	$rs = $db->SelectLimit('select id,firstname,lastname,created,\'He, he\' he,\'"\' q  from ADOXYZ',10);
+
 	print "<pre>";
 	print rs2csv($rs);
 	print "</pre>";
-	
-	$rs = $db->SelectLimit('select id,firstname,lastname,created,\'The	"young man", he said\' from ADOXYZ',10);	
-	
+
+	$rs = $db->SelectLimit('select id,firstname,lastname,created,\'The	"young man", he said\' from ADOXYZ',10);
+
 	if (PHP_VERSION < 5) {
 		print "<pre>";
 		rs2tabout($rs);
@@ -1329,7 +1334,7 @@
 	}
 	print " CacheFlush ";
 	$db->CacheFlush();
-	
+
 	$date = $db->SQLDate('d-m-M-Y-\QQ h:i:s A');
 	$sql = "SELECT $date from ADOXYZ";
 	print "<p>Test SQLDate: ".htmlspecialchars($sql)."</p>";
@@ -1337,7 +1342,7 @@
 	$d = date('d-m-M-Y-').'Q'.(ceil(date('m')/3.0)).date(' h:i:s A');
 	if (!$rs) Err("SQLDate query returned no recordset");
 	else if ($d != $rs->fields[0]) Err("SQLDate 1 failed expected: <br>act:$d <br>sql:".$rs->fields[0]);
-	
+
 	$date = $db->SQLDate('d-m-M-Y-\QQ h:i:s A',$db->DBDate("1974-02-25"));
 	$sql = "SELECT $date from ADOXYZ";
 	print "<p>Test SQLDate: ".htmlspecialchars($sql)."</p>";
@@ -1351,27 +1356,27 @@
 	} else if ($d != reset($rs->fields)) {
 		Err("SQLDate 2 failed expected: <br>act:$d <br>sql:".$rs->fields[0].' <br>'.$db->ErrorMsg());
 	}
-	
-	
+
+
 	print "<p>Test Filter</p>";
 	$db->debug = 1;
-	
+
 	$rs = $db->SelectLimit('select * from ADOXYZ where id < 3 order by id');
-	
+
 	$rs = RSFilter($rs,'do_strtolower');
 	if (trim($rs->fields[1]) != 'caroline'  && trim($rs->fields[2]) != 'miranda') {
 		err('**** RSFilter failed');
 		print_r($rs->fields);
 	}
-	
+
 	rs2html($rs);
-		
+
 	$db->debug=1;
-	
-	
+
+
 	print "<p>Test Replace</p>";
-	
-	$ret = $db->Replace('ADOXYZ', 
+
+	$ret = $db->Replace('ADOXYZ',
 		array('id'=>1,'firstname'=>'Caroline','lastname'=>'Miranda'),
 		array('id'),
 		$autoq = true);
@@ -1390,24 +1395,24 @@
 		}
 		$ADODB_COUNTRECS = $savec;
 	}
-	$ret = $db->Replace('ADOXYZ', 
+	$ret = $db->Replace('ADOXYZ',
 		array('id'=>1000,'firstname'=>'Harun','lastname'=>'Al-Rashid'),
 		array('id','firstname'),
 		$autoq = true);
 	if ($ret != 2) print "<b>Replace failed: </b>";
 	print "test A return value=$ret (2 expected) <p>";
-	
-	$ret = $db->Replace('ADOXYZ', 
+
+	$ret = $db->Replace('ADOXYZ',
 		array('id'=>1000,'firstname'=>'Sherazade','lastname'=>'Al-Rashid'),
 		'id',
 		$autoq = true);
-	if ($ret != 1) 
+	if ($ret != 1)
 		if ($db->dataProvider == 'ibase' && $ret == 2);
 		else print "<b>Replace failed: </b>";
 	print "test B return value=$ret (1 or if ibase then 2 expected) <p>";
-	
+
 	print "<h3>rs2rs Test</h3>";
-	
+
 	$rs = $db->Execute('select * from ADOXYZ where id>= 1 order by id');
 	$rs = $db->_rs2rs($rs);
 	$rs->valueX = 'X';
@@ -1420,11 +1425,11 @@
 	include_once('../pivottable.inc.php');
 	print "<h3>Pivot Test</h3>";
 	$db->debug=true;
- 	$sql = PivotTableSQL(
- 		$db,  			# adodb connection
- 		'ADOXYZ',  		# tables
+	$sql = PivotTableSQL(
+		$db,  			# adodb connection
+		'ADOXYZ',  		# tables
 		'firstname',	# row fields
-		'lastname',		# column fields 
+		'lastname',		# column fields
 		false,			# join
 		'ID', 			# sum
 		'Sum ',			# label for sum
@@ -1434,17 +1439,17 @@
 	$rs = $db->Execute($sql);
 	if ($rs) rs2html($rs);
 	else Err("Pivot sql error");
-	
+
 	$pear = true; //true;
 	$db->debug=false;
-	
+
 	if ($pear) {
 	// PEAR TESTS BELOW
 	$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
-	
+
 	include_once "PEAR.php";
 	$rs = $db->query('select * from ADOXYZ where id>0 and id<10 order by id');
-	
+
 	$i = 0;
 	if ($rs && !$rs->EOF) {
 		while ($arr = $rs->fetchRow()) {
@@ -1459,20 +1464,20 @@
 		}
 		$rs->Close();
 	}
-	
-	
+
+
 	if ($i != $db->GetOne('select count(*) from ADOXYZ where id>0 and id<10')) {
 		print "<p><b>PEAR DB emulation error 1.1 EOF ($i)</b></p>";
 		$pear = false;
 	}
-	
+
 	$rs = $db->limitQuery('select * from ADOXYZ where id>0 order by id',$i=3,$top=3);
 	$i2 = $i;
 	if ($rs && !$rs->EOF) {
 
 		while (!is_object($rs->fetchInto($arr))) {
 			$i2++;
-			
+
 	//			print_r($arr);
 	//		print "$i ";print_r($arr);
 			if ($arr[0] != $i2) {
@@ -1491,7 +1496,7 @@
 	if ($pear) print "<p>PEAR DB emulation passed.</p>";
 	flush();
 
-	
+
 	$rs = $db->SelectLimit("select ".$db->sysDate." from ADOXYZ",1);
 	$date = $rs->fields[0];
 	if (!$date) Err("Bad sysDate");
@@ -1501,9 +1506,9 @@
 		else echo "Passed UserDate: $ds<p>";
 	}
 	$db->debug=1;
-	if ($db->dataProvider == 'oci8') 
+	if ($db->dataProvider == 'oci8')
 		$rs = $db->SelectLimit("select to_char(".$db->sysTimeStamp.",'YYYY-MM-DD HH24:MI:SS') from ADOXYZ",1);
-	else 
+	else
 		$rs = $db->SelectLimit("select ".$db->sysTimeStamp." from ADOXYZ",1);
 	$date = $rs->fields[0];
 	if (!$date) Err("Bad sysTimeStamp");
@@ -1511,7 +1516,7 @@
 		$ds = $db->UserTimeStamp($date,"H \\h\\r\\s-d m Y");
 		if ($ds != date("H \\h\\r\\s-d m Y")) Err("Bad UserTimeStamp: ".$ds.", correct is ".date("H \\h\\r\\s-d m Y"));
 		else echo "Passed UserTimeStamp: $ds<p>";
-		
+
 		$date = 100;
 		$ds = $db->UserTimeStamp($date,"H \\h\\r\\s-d m Y");
 		$ds2 = date("H \\h\\r\\s-d m Y",$date);
@@ -1519,12 +1524,12 @@
 		else echo "Passed UserTimeStamp 2: $ds<p>";
 	}
 	flush();
-	
+
 	if ($db->hasTransactions) {
 		$db->debug=1;
 		echo "<p>Testing StartTrans CompleteTrans</p>";
 		$db->raiseErrorFn = false;
-		
+
 		$db->SetTransactionMode('SERIALIZABLE');
 		$db->StartTrans();
 		$rs = $db->Execute('select * from notable');
@@ -1544,7 +1549,7 @@
 			if ($name == "Carolx") Err("Error: CompleteTrans (2) should have failed");
 			else echo "<p> -- Passed StartTrans test1 - rolling back</p>";
 		}
-		
+
 		$db->StartTrans();
 			$db->BeginTrans();
 		$db->Execute("update ADOXYZ set firstname='Carolx' where id=1");
@@ -1563,10 +1568,10 @@
 	$cnt = _adodb_getcount($db, 'select * from ADOXYZ where firstname in (select firstname from ADOXYZ)');
 	echo "<b>Count=</b> $cnt";
 	$db->debug=$saved;
-	
+
 	global $TESTERRS;
 	$debugerr = true;
-	
+
 	global $ADODB_LANG;$ADODB_LANG = 'fr';
 	$db->debug = false;
 	$TESTERRS = 0;
@@ -1587,35 +1592,35 @@
 	$rs = false;
 
 	flush();
-	
+
 	print "<p>SetFetchMode() tests</p>";
 	$db->SetFetchMode(ADODB_FETCH_ASSOC);
 	$rs = $db->SelectLimit('select firstname from ADOXYZ',1);
 	if (!isset($rs->fields['firstname'])) Err("BAD FETCH ASSOC");
-	
-	$ADODB_FETCH_MODE = ADODB_FETCH_NUM;	
+
+	$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
 	$rs = $db->SelectLimit('select firstname from ADOXYZ',1);
 	//var_dump($rs->fields);
 	if (!isset($rs->fields['firstname'])) Err("BAD FETCH ASSOC");
-	
-	$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;	
+
+	$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
 	$db->SetFetchMode(ADODB_FETCH_NUM);
 	$rs = $db->SelectLimit('select firstname from ADOXYZ',1);
 	if (!isset($rs->fields[0])) Err("BAD FETCH NUM");
-	
+
 	flush();
-	
+
 	print "<p>Test MetaTables again with SetFetchMode()</p>";
 	$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
 	$db->SetFetchMode(ADODB_FETCH_ASSOC);
 	print_r($db->MetaTables());
 	print "<p>";
-	
+
 	////////////////////////////////////////////////////////////////////
-	
+
 	print "<p>Testing Bad Connection</p>";
 	flush();
-	
+
 	if (true || PHP_VERSION < 5)  {
 		if ($db->dataProvider == 'odbtp') $db->databaseType = 'odbtp';
 		$conn = NewADOConnection($db->databaseType);
@@ -1623,13 +1628,13 @@
 		if (1) $conn->PConnect('abc','baduser','badpassword');
 		if ($TESTERRS == 2) print "raiseErrorFn tests passed<br>";
 		else print "<b>raiseErrorFn tests failed ($TESTERRS)</b><br>";
-		
+
 		flush();
 	}
 	////////////////////////////////////////////////////////////////////
-	
+
 	global $nocountrecs;
-	
+
 	if (isset($nocountrecs) && $ADODB_COUNTRECS) err("Error: \$ADODB_COUNTRECS is set");
 	if (empty($nocountrecs) && $ADODB_COUNTRECS==false) err("Error: \$ADODB_COUNTRECS is not set");
 
@@ -1644,10 +1649,10 @@
 	if ($rs2) $rs2->Close();
 	if ($rs) $rs->Close();
 	$db->Close();
-	
+
 	if ($db->transCnt != 0) Err("Error in transCnt=$db->transCnt (should be 0)");
-	
-	
+
+
 	printf("<p>Total queries=%d; total cached=%d</p>",$EXECS+$CACHED, $CACHED);
 	flush();
 }
@@ -1681,7 +1686,7 @@
 	CheckWS('mysqlt');
 	CheckWS('postgres');
 	CheckWS('oci8po');
-	
+
 	CheckWS('firebird');
 	CheckWS('sybase');
 	if (!ini_get('safe_mode')) CheckWS('informix');
@@ -1689,7 +1694,7 @@
 	CheckWS('ado_mssql');
 	CheckWS('ado_access');
 	CheckWS('mssql');
-	
+
 	CheckWS('vfp');
 	CheckWS('sqlanywhere');
 	CheckWS('db2');
@@ -1708,7 +1713,7 @@
 foreach($_GET as $k=>$v)  {
 	//global $$k;
 	$$k = $v;
-}	
+}
 if (strpos(PHP_VERSION,'5') === 0) {
 	//$testaccess=1;
 	//$testmssql = 1;
@@ -1720,11 +1725,11 @@
 <body bgcolor=white>
 <H1>ADODB Test</H1>
 
-This script tests the following databases: Interbase, Oracle, Visual FoxPro, Microsoft Access (ODBC and ADO), MySQL, MSSQL (ODBC, native, ADO). 
+This script tests the following databases: Interbase, Oracle, Visual FoxPro, Microsoft Access (ODBC and ADO), MySQL, MSSQL (ODBC, native, ADO).
 There is also support for Sybase, PostgreSQL.</p>
 For the latest version of ADODB, visit <a href=http://adodb.sourceforge.net/>adodb.sourceforge.net</a>.</p>
 
-Test <a href=test4.php>GetInsertSQL/GetUpdateSQL</a> &nbsp; 
+Test <a href=test4.php>GetInsertSQL/GetUpdateSQL</a> &nbsp;
 	<a href=testsessions.php>Sessions</a> &nbsp;
 	<a href=testpaging.php>Paging</a> &nbsp;
 	<a href=test-perf.php>Perf Monitor</a><p>
@@ -1740,4 +1745,4 @@
 ?>
 <p><i>ADODB Database Library  (c) 2000-2007 John Lim. All rights reserved. Released under BSD and LGPL, PHP <?php echo PHP_VERSION ?>.</i></p>
 </body>
-</html>
+</html>
\ No newline at end of file
Index: typo3/sysext/adodb/adodb/tests/test-php5.php
===================================================================
--- typo3/sysext/adodb/adodb/tests/test-php5.php	(revision 4551)
+++ typo3/sysext/adodb/adodb/tests/test-php5.php	(working copy)
@@ -1,10 +1,15 @@
 <?php
+	// This checks for my own IP at home. You can just remove the if-statement.
+if (1==0 || ($_SERVER['REMOTE_ADDR']!='127.0.0.1'))	{
+	die('In the source distribution of TYPO3, this script is disabled by a die() function call.<br/><b>Fix:</b> Open this file and remove/out-comment the line that outputs this message!');
+}
+
 /*
-  V4.81 3 May 2006  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
-  Released under both BSD license and Lesser GPL library license. 
-  Whenever there is any discrepancy between the two licenses, 
-  the BSD license will take precedence.
-  Set tabs to 8.
+	V4.81 3 May 2006  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+	Released under both BSD license and Lesser GPL library license.
+	Whenever there is any discrepancy between the two licenses,
+	the BSD license will take precedence.
+	Set tabs to 8.
  */
 
 
@@ -13,7 +18,7 @@
 $path = dirname(__FILE__);
 
 include("$path/../adodb-exceptions.inc.php");
-include("$path/../adodb.inc.php");	
+include("$path/../adodb.inc.php");
 
 echo "<h3>PHP ".PHP_VERSION."</h3>\n";
 try {
@@ -24,7 +29,7 @@
 switch($dbt) {
 case 'oci8po':
 	$db = NewADOConnection("oci8po");
-	
+
 	$db->Connect('','scott','natsoft');
 	break;
 default:
@@ -32,7 +37,7 @@
 	$db = NewADOConnection("mysql");
 	$db->Connect('localhost','root','','northwind');
 	break;
-	
+
 case 'mysqli':
 	$db = NewADOConnection("mysqli://root:@localhost/northwind");
 	//$db->Connect('localhost','root','','test');
@@ -87,16 +92,16 @@
 }
 
 try {
-	
+
 	ADOdb_Active_Record::SetDatabaseAdapter($db);
 	$a = new City();
-	
+
 	echo "<p>Successfully created City()<br>";
 	var_dump($a->GetPrimaryKeys());
 	$a->city = 'Kuala Lumpur';
 	$a->Save();
 	$a->Update();
-	$a->SetPrimaryKeys(array('city'));	
+	$a->SetPrimaryKeys(array('city'));
 	$a->country = "M'sia";
 	$a->save();
 	$a->Delete();
Index: typo3/sysext/adodb/adodb/tests/testpaging.php
===================================================================
--- typo3/sysext/adodb/adodb/tests/testpaging.php	(revision 4551)
+++ typo3/sysext/adodb/adodb/tests/testpaging.php	(working copy)
@@ -1,12 +1,17 @@
 <?php
-/* 
+	// This checks for my own IP at home. You can just remove the if-statement.
+if (1==0 || ($_SERVER['REMOTE_ADDR']!='127.0.0.1'))	{
+	die('In the source distribution of TYPO3, this script is disabled by a die() function call.<br/><b>Fix:</b> Open this file and remove/out-comment the line that outputs this message!');
+}
+
+/*
 V4.80 8 Mar 2006  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
-  Released under both BSD license and Lesser GPL library license. 
-  Whenever there is any discrepancy between the two licenses, 
-  the BSD license will take precedence. 
-  Set tabs to 4 for best viewing.
-	
-  Latest version is available at http://adodb.sourceforge.net
+	Released under both BSD license and Lesser GPL library license.
+	Whenever there is any discrepancy between the two licenses,
+	the BSD license will take precedence.
+	Set tabs to 4 for best viewing.
+
+	Latest version is available at http://adodb.sourceforge.net
 */
 
 error_reporting(E_ALL);
@@ -43,9 +48,9 @@
 if ($driver == 'oci8') {
 	$db = NewADOConnection('oci8');
 	$db->Connect('','scott','natsoft');
-	
-$sql = "select * from (select  ID, firstname as \"First Name\", lastname as \"Last Name\" from adoxyz 
-	 order  by  1)";
+
+$sql = "select * from (select  ID, firstname as \"First Name\", lastname as \"Last Name\" from adoxyz
+	order  by  1)";
 }
 
 if ($driver == 'access') {
Index: typo3/sysext/adodb/adodb/tests/testoci8.php
===================================================================
--- typo3/sysext/adodb/adodb/tests/testoci8.php	(revision 4551)
+++ typo3/sysext/adodb/adodb/tests/testoci8.php	(working copy)
@@ -1,14 +1,19 @@
 <html>
 <body>
 <?php
-/* 
+	// This checks for my own IP at home. You can just remove the if-statement.
+if (1==0 || ($_SERVER['REMOTE_ADDR']!='127.0.0.1'))	{
+	die('In the source distribution of TYPO3, this script is disabled by a die() function call.<br/><b>Fix:</b> Open this file and remove/out-comment the line that outputs this message!');
+}
+
+/*
 V4.80 8 Mar 2006  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
-  Released under both BSD license and Lesser GPL library license. 
-  Whenever there is any discrepancy between the two licenses, 
-  the BSD license will take precedence. 
-  Set tabs to 4 for best viewing.
-	
-  Latest version is available at http://adodb.sourceforge.net
+	Released under both BSD license and Lesser GPL library license.
+	Whenever there is any discrepancy between the two licenses,
+	the BSD license will take precedence.
+	Set tabs to 4 for best viewing.
+
+	Latest version is available at http://adodb.sourceforge.net
 */
 error_reporting(63);
 include("../adodb.inc.php");
@@ -16,7 +21,7 @@
 
 if (0) {
 	$db = ADONewConnection('oci8po');
-	
+
 	$db->PConnect('','scott','natsoft');
 	if (!empty($testblob)) {
 		$varHoldingBlob = 'ABC DEF GEF John TEST';
@@ -24,9 +29,9 @@
 		// create table atable (id integer, ablob blob);
 		$db->Execute('insert into ATABLE (id,ablob) values('.$num.',empty_blob())');
 		$db->UpdateBlob('ATABLE', 'ablob', $varHoldingBlob, 'id='.$num, 'BLOB');
-		
+
 		$rs = &$db->Execute('select * from atable');
-		
+
 		if (!$rs) die("Empty RS");
 		if ($rs->EOF) die("EOF RS");
 		rs2html($rs);
@@ -36,7 +41,7 @@
 	$rs = &$db->Execute(
 		$stmt,
 		array($i));
-			
+
 		if (!$rs) die("Empty RS");
 		if ($rs->EOF) die("EOF RS");
 		rs2html($rs);
@@ -53,9 +58,9 @@
 	// prepare not quite ready for prime time
 	//$rs = $db->Execute($stmt,array('empno'=>3775,'ename'=>'John'));
 	if (!$rs) die("Empty RS");
-	
+
 	$db->setfetchmode(ADODB_FETCH_NUM);
-	
+
 	$vv = 'A%';
 	$stmt = $db->PrepareSP("BEGIN adodb.open_tab2(:rs,:tt); END;",true);
 	$db->OutParameter($stmt, $cur, 'rs', -1, OCI_B_CURSOR);
Index: typo3/sysext/adodb/adodb/tests/testmssql.php
===================================================================
--- typo3/sysext/adodb/adodb/tests/testmssql.php	(revision 4551)
+++ typo3/sysext/adodb/adodb/tests/testmssql.php	(working copy)
@@ -1,18 +1,22 @@
 <?php
+	// This checks for my own IP at home. You can just remove the if-statement.
+if (1==0 || ($_SERVER['REMOTE_ADDR']!='127.0.0.1'))	{
+	die('In the source distribution of TYPO3, this script is disabled by a die() function call.<br/><b>Fix:</b> Open this file and remove/out-comment the line that outputs this message!');
+}
 
-/** 
+/**
  * @version V4.50 6 July 2004 (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
- * Released under both BSD license and Lesser GPL library license. 
- * Whenever there is any discrepancy between the two licenses, 
- * the BSD license will take precedence. 
+ * Released under both BSD license and Lesser GPL library license.
+ * Whenever there is any discrepancy between the two licenses,
+ * the BSD license will take precedence.
  *
  * Set tabs to 4 for best viewing.
- * 
+ *
  * Latest version is available at http://php.weblogs.com
  *
  * Test GetUpdateSQL and GetInsertSQL.
  */
- 
+
 error_reporting(E_ALL);
 
 
@@ -64,11 +68,11 @@
 $conn->UpdateBlobFile('blobtest','b1','../cute_icons_for_site/adodb.gif','id=1');
 $rs = $conn->Execute('select b1 from blobtest where id=1');
 
-$output = "c:\\temp\\test_out-".date('H-i-s').".gif"; 
+$output = "c:\\temp\\test_out-".date('H-i-s').".gif";
 print "Saving file <b>$output</b>, size=".strlen($rs->fields[0])."<p>";
-$fd = fopen($output, "wb"); 
-fwrite($fd, $rs->fields[0]); 
-fclose($fd); 
+$fd = fopen($output, "wb");
+fwrite($fd, $rs->fields[0]);
+fclose($fd);
 
 print " <a href=file://$output>View Image</a>";
 //$rs = $conn->Execute('SELECT id,SUBSTRING(b1, 1, 10) FROM blobtest');
Index: typo3/sysext/adodb/adodb/tests/testoci8cursor.php
===================================================================
--- typo3/sysext/adodb/adodb/tests/testoci8cursor.php	(revision 4551)
+++ typo3/sysext/adodb/adodb/tests/testoci8cursor.php	(working copy)
@@ -1,21 +1,26 @@
 <?php
-/* 
+	// This checks for my own IP at home. You can just remove the if-statement.
+if (1==0 || ($_SERVER['REMOTE_ADDR']!='127.0.0.1'))	{
+	die('In the source distribution of TYPO3, this script is disabled by a die() function call.<br/><b>Fix:</b> Open this file and remove/out-comment the line that outputs this message!');
+}
+
+/*
 V4.80 8 Mar 2006  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
-  Released under both BSD license and Lesser GPL library license. 
-  Whenever there is any discrepancy between the two licenses, 
-  the BSD license will take precedence. 
-  Set tabs to 4 for best viewing.
-	
-  Latest version is available at http://adodb.sourceforge.net
+	Released under both BSD license and Lesser GPL library license.
+	Whenever there is any discrepancy between the two licenses,
+	the BSD license will take precedence.
+	Set tabs to 4 for best viewing.
+
+	Latest version is available at http://adodb.sourceforge.net
 */
 
 /*
 	Test for Oracle Variable Cursors, which are treated as ADOdb recordsets.
-	
-	We have 2 examples. The first shows us using the Parameter statement. 
+
+	We have 2 examples. The first shows us using the Parameter statement.
 	The second shows us using the new ExecuteCursor($sql, $cursorName)
 	function.
-	
+
 ------------------------------------------------------------------
 -- TEST PACKAGE YOU NEED TO INSTALL ON ORACLE - run from sql*plus
 ------------------------------------------------------------------
@@ -25,7 +30,7 @@
 CREATE OR REPLACE PACKAGE adodb AS
 TYPE TabType IS REF CURSOR RETURN tab%ROWTYPE;
 PROCEDURE open_tab (tabcursor IN OUT TabType,tablenames in varchar);
-PROCEDURE data_out(input IN varchar, output OUT varchar); 
+PROCEDURE data_out(input IN varchar, output OUT varchar);
 
 procedure myproc (p1 in number, p2 out number);
 END adodb;
@@ -36,12 +41,12 @@
 	BEGIN
 		OPEN tabcursor FOR SELECT * FROM tab where tname like tablenames;
 	END open_tab;
-	
+
 PROCEDURE data_out(input IN varchar, output OUT varchar) IS
 	BEGIN
 		output := 'Cinta Hati '||input;
 	END;
-	
+
 procedure myproc (p1 in number, p2 out number) as
 begin
 p2 := p1;
@@ -68,24 +73,24 @@
 */
 
 	define('MYNUM',5);
-	
+
 
 	$rs = $db->ExecuteCursor("BEGIN adodb.open_tab(:RS,'A%'); END;");
-	
+
 	if ($rs && !$rs->EOF) {
 		print "Test 1 RowCount: ".$rs->RecordCount()."<p>";
 	} else {
 		print "<b>Error in using Cursor Variables 1</b><p>";
 	}
-	
+
 	print "<h4>Testing Stored Procedures for oci8</h4>";
-	
+
 	$stid = $db->PrepareSP('BEGIN adodb.myproc('.MYNUM.', :myov); END;');
 	$db->OutParameter($stid, $myov, 'myov');
 	$db->Execute($stid);
 	if ($myov != MYNUM) print "<p><b>Error with myproc</b></p>";
-	
-	
+
+
 	$stmt = $db->PrepareSP("BEGIN adodb.data_out(:a1, :a2); END;",true);
 	$a1 = 'Malaysia';
 	//$a2 = ''; # a2 doesn't even need to be defined!
@@ -98,14 +103,14 @@
 	} else {
 		print "<b>Error in using Stored Procedure IN/Out Variables</b><p>";
 	}
-	
-	
+
+
 	$tname = 'A%';
-	
+
 	$stmt = $db->PrepareSP('select * from tab where tname like :tablename');
 	$db->Parameter($stmt,$tname,'tablename');
 	$rs = $db->Execute($stmt);
 	rs2html($rs);
-		
-		
+
+
 ?>
\ No newline at end of file
Index: typo3/sysext/adodb/adodb/tests/benchmark.php
===================================================================
--- typo3/sysext/adodb/adodb/tests/benchmark.php	(revision 4551)
+++ typo3/sysext/adodb/adodb/tests/benchmark.php	(working copy)
@@ -3,25 +3,30 @@
 <html>
 <head>
 	<title>ADODB Benchmarks</title>
-</head> 
+</head>
 
 <body>
-<?php 
+<?php
+	// This checks for my own IP at home. You can just remove the if-statement.
+if (1==0 || ($_SERVER['REMOTE_ADDR']!='127.0.0.1'))	{
+	die('In the source distribution of TYPO3, this script is disabled by a die() function call.<br/><b>Fix:</b> Open this file and remove/out-comment the line that outputs this message!');
+}
+
 /*
 V4.81 3 May 2006  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
-  Released under both BSD license and Lesser GPL library license. 
-  Whenever there is any discrepancy between the two licenses, 
-  the BSD license will take precedence.
-  
-  Benchmark code to test the speed to the ADODB library with different databases.
-  This is a simplistic benchmark to be used as the basis for further testing.
-  It should not be used as proof of the superiority of one database over the other.
-*/ 
- 
+	Released under both BSD license and Lesser GPL library license.
+	Whenever there is any discrepancy between the two licenses,
+	the BSD license will take precedence.
+
+	Benchmark code to test the speed to the ADODB library with different databases.
+	This is a simplistic benchmark to be used as the basis for further testing.
+	It should not be used as proof of the superiority of one database over the other.
+*/
+
 $testmssql = true;
 //$testvfp = true;
 $testoracle = true;
-$testado = true; 
+$testado = true;
 $testibase = true;
 $testaccess = true;
 $testmysql = true;
@@ -37,37 +42,37 @@
 GLOBAL $ADODB_version,$ADODB_FETCH_MODE;
 
 	adodb_backtrace();
-	
+
 	$max = 100;
 	$sql = 'select * from ADOXYZ';
 	$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
-	
+
 	//print "<h3>ADODB Version: $ADODB_version Host: <i>$db->host</i> &nbsp; Database: <i>$db->database</i></h3>";
-	
-	// perform query once to cache results so we are only testing throughput 
+
+	// perform query once to cache results so we are only testing throughput
 	$rs = $db->Execute($sql);
 	if (!$rs){
 		print "Error in recordset<p>";
 		return;
-	}	
+	}
 	$arr = $rs->GetArray();
 	//$db->debug = true;
 	global $ADODB_COUNTRECS;
 	$ADODB_COUNTRECS = false;
 	$start = microtime();
 	for ($i=0; $i < $max; $i++) {
-		$rs =& $db->Execute($sql);	
+		$rs =& $db->Execute($sql);
 		$arr =& $rs->GetArray();
-	   //		 print $arr[0][1];
+		//		 print $arr[0][1];
 	}
 	$end =  microtime();
 	$start = explode(' ',$start);
 	$end = explode(' ',$end);
-	
+
 	//print_r($start);
 	//print_r($end);
-	
-	  //  print_r($arr);
+
+		//  print_r($arr);
 	$total = $end[0]+trim($end[1]) - $start[0]-trim($start[1]);
 	printf ("<p>seconds = %8.2f for %d iterations each with %d records</p>",$total,$max, sizeof($arr));
 	flush();
@@ -81,4 +86,4 @@
 
 
 </body>
-</html>
+</html>
\ No newline at end of file
Index: typo3/sysext/adodb/adodb/tests/time.php
===================================================================
--- typo3/sysext/adodb/adodb/tests/time.php	(revision 4551)
+++ typo3/sysext/adodb/adodb/tests/time.php	(working copy)
@@ -1,14 +1,18 @@
 <?php
+	// This checks for my own IP at home. You can just remove the if-statement.
+if (1==0 || ($_SERVER['REMOTE_ADDR']!='127.0.0.1'))	{
+	die('In the source distribution of TYPO3, this script is disabled by a die() function call.<br/><b>Fix:</b> Open this file and remove/out-comment the line that outputs this message!');
+}
 
 include_once('../adodb-time.inc.php');
 //adodb_date_test();
 ?>
-<?php 
-//require("adodb-time.inc.php"); 
+<?php
+//require("adodb-time.inc.php");
 
-$datestring = "1963-12-04"; // string normally from mySQL 
+$datestring = "1963-12-04"; // string normally from mySQL
 $stringArray = explode("-", $datestring);
-$date = adodb_mktime(0,0,0,$stringArray[1],$stringArray[2],$stringArray[0]); 
+$date = adodb_mktime(0,0,0,$stringArray[1],$stringArray[2],$stringArray[0]);
 
 $convertedDate = date("d-M-Y", $date); // converted string to UK style date
 
Index: typo3/sysext/adodb/adodb/tests/client.php
===================================================================
--- typo3/sysext/adodb/adodb/tests/client.php	(revision 4551)
+++ typo3/sysext/adodb/adodb/tests/client.php	(working copy)
@@ -1,37 +1,41 @@
 <html>
 <body bgcolor=white>
 <?php
-/** 
+	// This checks for my own IP at home. You can just remove the if-statement.
+if (1==0 || ($_SERVER['REMOTE_ADDR']!='127.0.0.1'))	{
+	die('In the source distribution of TYPO3, this script is disabled by a die() function call.<br/><b>Fix:</b> Open this file and remove/out-comment the line that outputs this message!');
+}
+
+/**
  * V4.50 6 July 2004  (c) 2001-2002 John Lim (jlim#natsoft.com.my). All rights reserved.
- * Released under both BSD license and Lesser GPL library license. 
-  Whenever there is any discrepancy between the two licenses, 
-  the BSD license will take precedence. 
- * 
+ * Released under both BSD license and Lesser GPL library license.
+	Whenever there is any discrepancy between the two licenses,
+	the BSD license will take precedence.
+ *
  * set tabs to 8
  */
- 
- // documentation on usage is at http://php.weblogs.com/adodb_csv
- 
- echo PHP_VERSION,'<br>';
- var_dump(parse_url('odbc_mssql://userserver/'));
- die();
- 
+
+// documentation on usage is at http://php.weblogs.com/adodb_csv
+
+echo PHP_VERSION,'<br>';
+var_dump(parse_url('odbc_mssql://userserver/'));
+
 include('../adodb.inc.php');
 include('../tohtml.inc.php');
 
- function &send2server($url,$sql)
- {
+function &send2server($url,$sql)
+{
 	$url .= '?sql='.urlencode($sql);
 	print "<p>$url</p>";
 	$rs = csv2rs($url,$err);
 	if ($err) print $err;
 	return $rs;
- }
- 
- function print_pre($s)
- {
- 	print "<pre>";print_r($s);print "</pre>";
- }
+}
+
+function print_pre($s)
+{
+	print "<pre>";print_r($s);print "</pre>";
+}
 
 
 $serverURL = 'http://localhost/php/phplens/adodb/server.php';
@@ -42,37 +46,37 @@
 $sql3 = "insert into products (productname) values ('testprod 2')";
 $sql4 = "delete from products where productid>80";
 $sql5 = 'select * from products';
-	
+
 if ($testhttp) {
 	print "<a href=#c>Client Driver Tests</a><p>";
 	print "<h3>Test Error</h3>";
 	$rs = send2server($serverURL,$sql1);
 	print_pre($rs);
 	print "<hr />";
-	
+
 	print "<h3>Test Insert</h3>";
-	
+
 	$rs = send2server($serverURL,$sql2);
 	print_pre($rs);
 	print "<hr />";
-	
+
 	print "<h3>Test Insert2</h3>";
-	
+
 	$rs = send2server($serverURL,$sql3);
 	print_pre($rs);
 	print "<hr />";
-	
+
 	print "<h3>Test Delete</h3>";
-	
+
 	$rs = send2server($serverURL,$sql4);
 	print_pre($rs);
 	print "<hr />";
-	
-	
+
+
 	print "<h3>Test Select</h3>";
 	$rs = send2server($serverURL,$sql5);
 	if ($rs) rs2html($rs);
-	
+
 	print "<hr />";
 }
 
@@ -112,21 +116,21 @@
 adorecordset Object
 (
 	[dataProvider] => native
-	[fields] => 
+	[fields] =>
 	[blobSize] => 64
-	[canSeek] => 
+	[canSeek] =>
 	[EOF] => 1
-	[emptyTimeStamp] =>  
-	[emptyDate] =>  
-	[debug] => 
+	[emptyTimeStamp] =>
+	[emptyDate] =>
+	[debug] =>
 	[timeToLive] => 0
-	[bind] => 
+	[bind] =>
 	[_numOfRows] => -1
 	[_numOfFields] => 0
 	[_queryID] => 1
 	[_currentRow] => -1
-	[_closed] => 
-	[_inited] => 
+	[_closed] =>
+	[_inited] =>
 	[sql] => insert into products (productname) values ('testprod')
 	[affectedrows] => 1
 	[insertid] => 81
@@ -141,21 +145,21 @@
 adorecordset Object
 (
 	[dataProvider] => native
-	[fields] => 
+	[fields] =>
 	[blobSize] => 64
-	[canSeek] => 
+	[canSeek] =>
 	[EOF] => 1
-	[emptyTimeStamp] =>  
-	[emptyDate] =>  
-	[debug] => 
+	[emptyTimeStamp] =>
+	[emptyDate] =>
+	[debug] =>
 	[timeToLive] => 0
-	[bind] => 
+	[bind] =>
 	[_numOfRows] => -1
 	[_numOfFields] => 0
 	[_queryID] => 1
 	[_currentRow] => -1
-	[_closed] => 
-	[_inited] => 
+	[_closed] =>
+	[_inited] =>
 	[sql] => insert into products (productname) values ('testprod')
 	[affectedrows] => 1
 	[insertid] => 82
@@ -170,29 +174,29 @@
 adorecordset Object
 (
 	[dataProvider] => native
-	[fields] => 
+	[fields] =>
 	[blobSize] => 64
-	[canSeek] => 
+	[canSeek] =>
 	[EOF] => 1
-	[emptyTimeStamp] =>  
-	[emptyDate] =>  
-	[debug] => 
+	[emptyTimeStamp] =>
+	[emptyDate] =>
+	[debug] =>
 	[timeToLive] => 0
-	[bind] => 
+	[bind] =>
 	[_numOfRows] => -1
 	[_numOfFields] => 0
 	[_queryID] => 1
 	[_currentRow] => -1
-	[_closed] => 
-	[_inited] => 
+	[_closed] =>
+	[_inited] =>
 	[sql] => delete from products where productid>80
 	[affectedrows] => 2
 	[insertid] => 0
 )
 
 [more stuff deleted]
- .
- . 
- .
+.
+.
+.
 */
-?>
+?>
\ No newline at end of file
Index: typo3/sysext/adodb/adodb/tests/test-active-recs2.php
===================================================================
--- typo3/sysext/adodb/adodb/tests/test-active-recs2.php	(revision 4551)
+++ typo3/sysext/adodb/adodb/tests/test-active-recs2.php	(working copy)
@@ -1,4 +1,9 @@
 <?php
+	// This checks for my own IP at home. You can just remove the if-statement.
+if (1==0 || ($_SERVER['REMOTE_ADDR']!='127.0.0.1'))	{
+	die('In the source distribution of TYPO3, this script is disabled by a die() function call.<br/><b>Fix:</b> Open this file and remove/out-comment the line that outputs this message!');
+}
+
 error_reporting(E_ALL);
 include('../adodb.inc.php');
 
Index: typo3/sysext/adodb/adodb/tests/test3.php
===================================================================
--- typo3/sysext/adodb/adodb/tests/test3.php	(revision 4551)
+++ typo3/sysext/adodb/adodb/tests/test3.php	(working copy)
@@ -1,10 +1,15 @@
 <?php
+	// This checks for my own IP at home. You can just remove the if-statement.
+if (1==0 || ($_SERVER['REMOTE_ADDR']!='127.0.0.1'))	{
+	die('In the source distribution of TYPO3, this script is disabled by a die() function call.<br/><b>Fix:</b> Open this file and remove/out-comment the line that outputs this message!');
+}
+
 /*
-  V4.80 8 Mar 2006  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
-  Released under both BSD license and Lesser GPL library license. 
-  Whenever there is any discrepancy between the two licenses, 
-  the BSD license will take precedence.
-  Set tabs to 8.
+	V4.80 8 Mar 2006  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+	Released under both BSD license and Lesser GPL library license.
+	Whenever there is any discrepancy between the two licenses,
+	the BSD license will take precedence.
+	Set tabs to 8.
  */
 
 
@@ -13,7 +18,7 @@
 $path = dirname(__FILE__);
 
 include("$path/../adodb-exceptions.inc.php");
-include("$path/../adodb.inc.php");	
+include("$path/../adodb.inc.php");
 
 try {
 $db = NewADOConnection("oci8");
Index: typo3/sysext/adodb/adodb/tests/tmssql.php
===================================================================
--- typo3/sysext/adodb/adodb/tests/tmssql.php	(revision 4551)
+++ typo3/sysext/adodb/adodb/tests/tmssql.php	(working copy)
@@ -1,18 +1,23 @@
 <?php
+	// This checks for my own IP at home. You can just remove the if-statement.
+if (1==0 || ($_SERVER['REMOTE_ADDR']!='127.0.0.1'))	{
+	die('In the source distribution of TYPO3, this script is disabled by a die() function call.<br/><b>Fix:</b> Open this file and remove/out-comment the line that outputs this message!');
+}
+
 error_reporting(E_ALL);
-ini_set('mssql.datetimeconvert',0); 
+ini_set('mssql.datetimeconvert',0);
 
 function tmssql()
 {
 	print "<h3>mssql</h3>";
 	$db = mssql_connect('JAGUAR\vsdotnet','adodb','natsoft') or die('No Connection');
 	mssql_select_db('northwind',$db);
-	
+
 	$rs = mssql_query('select getdate() as date',$db);
 	$o = mssql_fetch_row($rs);
 	print_r($o);
 	mssql_free_result($rs);
-	
+
 	print "<p>Delete</p>"; flush();
 	$rs2 = mssql_query('delete from adoxyz',$db);
 	$p = mssql_num_rows($rs2);
@@ -29,7 +34,7 @@
 	$password = 'natsoft';
 	$hostname = 'JAGUAR\vsdotnet';
 	$databasename = 'northwind';
-	
+
 	$dsn = "mssql://$username:$password@$hostname/$databasename";
 	$conn = &DB::connect($dsn);
 	print "date=".$conn->GetOne('select getdate()')."<br>";
@@ -53,16 +58,6 @@
 	$rs = $conn->Execute('delete from tester');
 	print "date=".$conn->GetOne('select getdate()')."<br>";
 }
-
-
-$ACCEPTIP = '127.0.0.1';
-
-$remote = $_SERVER["REMOTE_ADDR"]; 
-
-if (!empty($ACCEPTIP))
- if ($remote != '127.0.0.1' && $remote != $ACCEPTIP) 
- 	die("Unauthorised client: '$remote'");
-	
 ?>
 <a href=tmssql.php?do=tmssql>mssql</a>
 <a href=tmssql.php?do=tpear>pear</a>
Index: typo3/sysext/adodb/adodb/tests/test4.php
===================================================================
--- typo3/sysext/adodb/adodb/tests/test4.php	(revision 4551)
+++ typo3/sysext/adodb/adodb/tests/test4.php	(working copy)
@@ -1,18 +1,22 @@
 <?php
+	// This checks for my own IP at home. You can just remove the if-statement.
+if (1==0 || ($_SERVER['REMOTE_ADDR']!='127.0.0.1'))	{
+	die('In the source distribution of TYPO3, this script is disabled by a die() function call.<br/><b>Fix:</b> Open this file and remove/out-comment the line that outputs this message!');
+}
 
-/** 
+/**
  * @version V4.50 6 July 2004 (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
- * Released under both BSD license and Lesser GPL library license. 
- * Whenever there is any discrepancy between the two licenses, 
- * the BSD license will take precedence. 
+ * Released under both BSD license and Lesser GPL library license.
+ * Whenever there is any discrepancy between the two licenses,
+ * the BSD license will take precedence.
  *
  * Set tabs to 4 for best viewing.
- * 
+ *
  * Latest version is available at http://php.weblogs.com
  *
  * Test GetUpdateSQL and GetInsertSQL.
  */
- 
+
 error_reporting(E_ALL);
 function testsql()
 {
@@ -28,9 +32,9 @@
 // This code tests an insert
 
 $sql = "
-SELECT * 
-FROM ADOXYZ WHERE id = -1"; 
-// Select an empty record from the database 
+SELECT *
+FROM ADOXYZ WHERE id = -1";
+// Select an empty record from the database
 
 
 #$conn = &ADONewConnection("mssql");  // create a connection
@@ -90,9 +94,9 @@
 // This code tests an update
 
 $sql = "
-SELECT * 
-FROM ADOXYZ WHERE lastname=".$conn->Param('var'). " ORDER BY 1"; 
-// Select a record to update 
+SELECT *
+FROM ADOXYZ WHERE lastname=".$conn->Param('var'). " ORDER BY 1";
+// Select a record to update
 
 $varr = array('var'=>$record['lastname'].'');
 $rs = $conn->Execute($sql,$varr); // Execute the query and get the existing record to update
Index: typo3/sysext/adodb/adodb/tests/testsessions.php
===================================================================
--- typo3/sysext/adodb/adodb/tests/testsessions.php	(revision 4551)
+++ typo3/sysext/adodb/adodb/tests/testsessions.php	(working copy)
@@ -1,13 +1,17 @@
 <?php
+	// This checks for my own IP at home. You can just remove the if-statement.
+if (1==0 || ($_SERVER['REMOTE_ADDR']!='127.0.0.1'))	{
+	die('In the source distribution of TYPO3, this script is disabled by a die() function call.<br/><b>Fix:</b> Open this file and remove/out-comment the line that outputs this message!');
+}
 
-/* 
+/*
 V4.80 8 Mar 2006  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
-  Released under both BSD license and Lesser GPL library license. 
-  Whenever there is any discrepancy between the two licenses, 
-  the BSD license will take precedence. 
-  Set tabs to 4 for best viewing.
-	
-  Latest version is available at http://adodb.sourceforge.net
+	Released under both BSD license and Lesser GPL library license.
+	Whenever there is any discrepancy between the two licenses,
+	the BSD license will take precedence.
+	Set tabs to 4 for best viewing.
+
+	Latest version is available at http://adodb.sourceforge.net
 */
 
 function NotifyExpire($ref,$key)
@@ -16,7 +20,7 @@
 }
 
 //-------------------------------------------------------------------
-	
+
 error_reporting(E_ALL);
 
 
@@ -28,7 +32,7 @@
 
 #### CONNECTION
 switch($db) {
-case 'oci8': 
+case 'oci8':
 	$options['table'] = 'adodb_sessions2';
 	ADOdb_Session::config('oci8', '', 'jcollect', 'natsoft', '',$options);
 	break;
@@ -36,7 +40,7 @@
 case 'postgres':
 	ADOdb_Session::config('postgres', 'localhost', 'tester', 'test', 'test',$options);
 	break;
-	
+
 case 'mysql':
 default:
 	ADOdb_Session::config('mysql', 'localhost', 'root', '', 'xphplens_2',$options);
@@ -44,9 +48,9 @@
 
 
 }
-	
 
-	
+
+
 #### SETUP NOTIFICATION
 	$USER = 'JLIM'.rand();
 	$ADODB_SESSION_EXPIRE_NOTIFY = array('USER','NotifyExpire');
@@ -55,22 +59,22 @@
 	session_start();
 
 	adodb_session_regenerate_id();
-	
-### SETUP SESSION VARIABLES 
+
+### SETUP SESSION VARIABLES
 	if (empty($_SESSION['MONKEY'])) $_SESSION['MONKEY'] = array(1,'abc',44.41);
 	else $_SESSION['MONKEY'][0] += 1;
 	if (!isset($_GET['nochange'])) @$_SESSION['AVAR'] += 1;
 
-	
+
 ### START DISPLAY
 	print "<h3>PHP ".PHP_VERSION."</h3>";
 	print "<p><b>\$_SESSION['AVAR']={$_SESSION['AVAR']}</b></p>";
-	
+
 	print "<hr /> <b>Cookies</b>: ";
 	print_r($_COOKIE);
-	
+
 	var_dump($_SESSION['MONKEY']);
-	
+
 ### RANDOMLY PERFORM Garbage Collection
 ### In real-production environment, this is done for you
 ### by php's session extension, which calls adodb_sess_gc()
@@ -78,10 +82,10 @@
 ### session.cookie_lifetime and session.gc_probability
 
 	if (rand() % 5 == 0) {
-	
+
 		print "<hr /><p><b>Garbage Collection</b></p>";
 		adodb_sess_gc(10);
-		
+
 		if (rand() % 2 == 0) {
 			print "<p>Random session destroy</p>";
 			session_destroy();
Index: typo3/sysext/adodb/adodb/tests/test-pgblob.php
===================================================================
--- typo3/sysext/adodb/adodb/tests/test-pgblob.php	(revision 4551)
+++ typo3/sysext/adodb/adodb/tests/test-pgblob.php	(working copy)
@@ -1,4 +1,8 @@
 <?php
+	// This checks for my own IP at home. You can just remove the if-statement.
+if (1==0 || ($_SERVER['REMOTE_ADDR']!='127.0.0.1'))	{
+	die('In the source distribution of TYPO3, this script is disabled by a die() function call.<br/><b>Fix:</b> Open this file and remove/out-comment the line that outputs this message!');
+}
 
 function getmicrotime()
 {
@@ -10,11 +14,11 @@
 function doloop()
 {
 global $db,$MAX;
-	
-	$sql = "select id,firstname,lastname from adoxyz where 
+
+	$sql = "select id,firstname,lastname from adoxyz where
 		firstname not like ? and lastname not like ? and id=?";
 	$offset = 0;
-	/*$sql = "select * from juris9.employee join juris9.emp_perf_plan on epp_empkey = emp_id 
+	/*$sql = "select * from juris9.employee join juris9.emp_perf_plan on epp_empkey = emp_id
 		where emp_name not like ? and emp_name not like ? and emp_id=28000+?";
 	$offset = 28000;*/
 	for ($i=1; $i <= $MAX; $i++) {
Index: typo3/sysext/adodb/adodb/tests/pdo.php
===================================================================
--- typo3/sysext/adodb/adodb/tests/pdo.php	(revision 4551)
+++ typo3/sysext/adodb/adodb/tests/pdo.php	(working copy)
@@ -1,84 +1,89 @@
 <?php
+	// This checks for my own IP at home. You can just remove the if-statement.
+if (1==0 || ($_SERVER['REMOTE_ADDR']!='127.0.0.1'))	{
+	die('In the source distribution of TYPO3, this script is disabled by a die() function call.<br/><b>Fix:</b> Open this file and remove/out-comment the line that outputs this message!');
+}
+
 error_reporting(E_ALL);
 include('../adodb.inc.php');
 
 echo "<pre>";
 try {
 	echo "New Connection\n";
-	
-	
+
+
 	$dsn = 'pdo_mysql://root:@localhost/northwind?persist';
-	
+
 	if (!empty($dsn)) {
 		$DB =& NewADOConnection($dsn) || die("CONNECT FAILED");
 		$connstr = $dsn;
 	} else {
-	
+
 		$DB = NewADOConnection('pdo');
-		
+
 		echo "Connect\n";
-		
+
 		$u = ''; $p = '';
 		/*
 		$connstr = 'odbc:nwind';
-		
+
 		$connstr = 'oci:';
 		$u = 'scott';
 		$p = 'natsoft';
-		
-		
+
+
 		$connstr ="sqlite:d:\inetpub\adodb\sqlite.db";
 		*/
-		
+
 		$connstr = "mysql:dbname=northwind";
 		$u = 'root';
-		
+
 		$connstr = "pgsql:dbname=test";
 		$u = 'tester';
 		$p = 'test';
-		
+
 		$DB->Connect($connstr,$u,$p) || die("CONNECT FAILED");
-	
+
 	}
-	
+
 	echo "connection string=$connstr\n Execute\n";
-	
+
 	//$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
 	$rs = $DB->Execute("select * from ADOXYZ where id<3");
 	if  ($DB->ErrorNo()) echo "*** errno=".$DB->ErrorNo() . " ".($DB->ErrorMsg())."\n";
-	
-	
+
+
 	//print_r(get_class_methods($DB->_stmt));
-	
+
 	if (!$rs) die("NO RS");
-	
+
 	echo "Meta\n";
 	for ($i=0; $i < $rs->NumCols(); $i++) {
 		var_dump($rs->FetchField($i));
 		echo "<br>";
 	}
-	
+
 	echo "FETCH\n";
 	$cnt = 0;
 	while (!$rs->EOF) {
-		adodb_pr($rs->fields); 
+		adodb_pr($rs->fields);
 		$rs->MoveNext();
 		if ($cnt++ > 1000) break;
 	}
-	
+
 	echo "<br>--------------------------------------------------------<br>\n\n\n";
-	
+
 	$stmt = $DB->PrepareStmt("select * from ADOXYZ");
-	
+
 	$rs = $stmt->Execute();
 	$cols = $stmt->NumCols(); // execute required
-	
+
 	echo "COLS = $cols";
 	for($i=1;$i<=$cols;$i++) {
 		$v = $stmt->_stmt->getColumnMeta($i);
 		var_dump($v);
 	}
-	
+
 	echo "e=".$stmt->ErrorNo() . " ".($stmt->ErrorMsg())."\n";
 	while ($arr = $rs->FetchRow()) {
 		adodb_pr($arr);
Index: typo3/sysext/adodb/adodb/tests/test-xmlschema.php
===================================================================
--- typo3/sysext/adodb/adodb/tests/test-xmlschema.php	(revision 4551)
+++ typo3/sysext/adodb/adodb/tests/test-xmlschema.php	(working copy)
@@ -1,4 +1,8 @@
 <?PHP
+	// This checks for my own IP at home. You can just remove the if-statement.
+if (1==0 || ($_SERVER['REMOTE_ADDR']!='127.0.0.1'))	{
+	die('In the source distribution of TYPO3, this script is disabled by a die() function call.<br/><b>Fix:</b> Open this file and remove/out-comment the line that outputs this message!');
+}
 
 // V4.50 6 July 2004
 
@@ -13,7 +17,7 @@
 // To create a schema object and build the query array.
 $schema = new adoSchema( $db );
 
-// To upgrade an existing schema object, use the following 
+// To upgrade an existing schema object, use the following
 // To upgrade an existing database to the provided schema,
 // uncomment the following line:
 #$schema->upgradeSchema();
Index: typo3/sysext/adodb/adodb/tests/testdatabases.inc.php
===================================================================
--- typo3/sysext/adodb/adodb/tests/testdatabases.inc.php	(revision 4551)
+++ typo3/sysext/adodb/adodb/tests/testdatabases.inc.php	(working copy)
@@ -1,21 +1,25 @@
 <?php
-  
+	// This checks for my own IP at home. You can just remove the if-statement.
+if (1==0 || ($_SERVER['REMOTE_ADDR']!='127.0.0.1'))	{
+	die('In the source distribution of TYPO3, this script is disabled by a die() function call.<br/><b>Fix:</b> Open this file and remove/out-comment the line that outputs this message!');
+}
+
 /*
 V4.80 8 Mar 2006  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
-  Released under both BSD license and Lesser GPL library license. 
-  Whenever there is any discrepancy between the two licenses, 
-  the BSD license will take precedence.
-*/ 
- 
- /* this file is used by the ADODB test program: test.php */
- ?>
+	Released under both BSD license and Lesser GPL library license.
+	Whenever there is any discrepancy between the two licenses,
+	the BSD license will take precedence.
+*/
+
+/* this file is used by the ADODB test program: test.php */
+?>
 
 <table><tr valign=top><td>
 <form method=get>
 <input type=checkbox name="testaccess" value=1 <?php echo !empty($testaccess) ? 'checked' : '' ?>> <b>Access</b><br>
 <input type=checkbox name="testibase" value=1 <?php echo !empty($testibase) ? 'checked' : '' ?>> <b>Interbase</b><br>
 <input type=checkbox name="testmssql" value=1 <?php echo !empty($testmssql) ? 'checked' : '' ?>> <b>MSSQL</b><br>
- <input type=checkbox name="testmysql" value=1 <?php echo !empty($testmysql) ? 'checked' : '' ?>> <b>MySQL</b><br>
+<input type=checkbox name="testmysql" value=1 <?php echo !empty($testmysql) ? 'checked' : '' ?>> <b>MySQL</b><br>
 <input type=checkbox name="testmysqlodbc" value=1 <?php echo !empty($testmysqlodbc) ? 'checked' : '' ?>> <b>MySQL ODBC</b><br>
 <input type=checkbox name="testmysqli" value=1 <?php echo !empty($testmysqli) ? 'checked' : '' ?>> <b>MySQLi</b>
 <br>
@@ -76,12 +80,12 @@
 		print "ERROR: PostgreSQL requires a database called test on server, user tester, password test.<BR>".$db->ErrorMsg();
 }
 
-if (!empty($testpgodbc)) { 
-	
+if (!empty($testpgodbc)) {
+
 	$db = &ADONewConnection('odbc');
 	$db->hasTransactions = false;
 	print "<h1>Connecting $db->databaseType...</h1>";
-	
+
 	if ($db->PConnect('Postgresql')) {
 		$db->hasTransactions = true;
 		testdb($db,
@@ -95,8 +99,8 @@
 	print "<h1>Connecting $db->databaseType...</h1>";
 	if ($db->PConnect("localhost:d:\\firebird\\151\\examples\\EMPLOYEE.fdb", "sysdba", "masterkey", ""))
 		testdb($db,"create table ADOXYZ (id integer, firstname char(24), lastname char(24),price numeric(12,2),created date)");
-	 else print "ERROR: Interbase test requires a database called employee.gdb".'<BR>'.$db->ErrorMsg();
-	
+	else print "ERROR: Interbase test requires a database called employee.gdb".'<BR>'.$db->ErrorMsg();
+
 }
 
 
@@ -105,16 +109,16 @@
 	$dsn = "sqlite://$path/";
 	$db = ADONewConnection($dsn);
 	//echo $dsn;
-	
+
 	//$db = &ADONewConnection('sqlite');
-	
+
 
 	if ($db && $db->PConnect("d:\\inetpub\\adodb\\sqlite.db", "", "", "")) {
 		print "<h1>Connecting $db->databaseType...</h1>";
 		testdb($db,"create table ADOXYZ (id int, firstname char(24), lastname char(24),created datetime)");
-	} else 
+	} else
 		print "ERROR: SQLite";
-	
+
 }
 
 if (!empty($testpdopgsql)) {
@@ -133,7 +137,7 @@
 	$db = &ADONewConnection('pdo');
 	print "<h1>Connecting $db->databaseType...</h1>";
 	$db->Connect($connstr,$u,$p) || die("CONNECT FAILED");
-	
+
 	testdb($db,
 		"create table ADOXYZ (id int, firstname char(24), lastname char(24), created date)");
 }
@@ -144,7 +148,7 @@
 	$db = &ADONewConnection('pdo');
 	print "<h1>Connecting $db->databaseType...</h1>";
 	$db->Connect($connstr,$u,$p) || die("CONNECT FAILED");
-	
+
 	testdb($db,
 		"create table ADOXYZ (id int, firstname char(24), lastname char(24), created date)");
 }
@@ -189,19 +193,19 @@
 	$access = 'd:\inetpub\wwwroot\php\NWIND.MDB';
 	$dsn = "nwind";
 	$dsn = "Driver={Microsoft Access Driver (*.mdb)};Dbq=$access;Uid=Admin;Pwd=;";
-	
+
 	//$dsn =  'Provider=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=' . $access . ';';
 	if ($db->PConnect($dsn, "", "", ""))
 		testdb($db,"create table ADOXYZ (id int, firstname char(24), lastname char(24),created datetime)");
 	else print "ERROR: Access test requires a Windows ODBC DSN=nwind, Access driver";
-	
+
 }
 
 if (!empty($testaccess) && !empty($testado)) { // ADO ACCESS
 
 	$db = &ADONewConnection("ado_access");
 	print "<h1>Connecting $db->databaseType...</h1>";
-	
+
 	$access = 'd:\inetpub\wwwroot\php\NWIND.MDB';
 	$myDSN =  'PROVIDER=Microsoft.Jet.OLEDB.4.0;'
 		. 'DATA SOURCE=' . $access . ';';
@@ -211,7 +215,7 @@
 		print "ADO version=".$db->_connectionID->version."<br>";
 		testdb($db,"create table ADOXYZ (id int, firstname char(24), lastname char(24),created datetime)");
 	} else print "ERROR: Access test requires a Access database $access".'<BR>'.$db->ErrorMsg();
-	
+
 }
 
 if (!empty($testvfp)) { // ODBC
@@ -220,16 +224,16 @@
 
 	if ( $db->PConnect("vfp-adoxyz")) {
 		testdb($db,"create table d:\\inetpub\\adodb\\ADOXYZ (id int, firstname char(24), lastname char(24),created date)");
-	 } else print "ERROR: Visual FoxPro test requires a Windows ODBC DSN=vfp-adoxyz, VFP driver";
-	
+	} else print "ERROR: Visual FoxPro test requires a Windows ODBC DSN=vfp-adoxyz, VFP driver";
+
 	echo "<hr />";
 	$db = &ADONewConnection('odbtp');
-	
+
 	if ( $db->PConnect('localhost','DRIVER={Microsoft Visual FoxPro Driver};SOURCETYPE=DBF;SOURCEDB=d:\inetpub\adodb;EXCLUSIVE=NO;')) {
 	print "<h1>Connecting $db->databaseType...</h1>";flush();
 	testdb($db,"create table d:\\inetpub\\adodb\\ADOXYZ (id int, firstname char(24), lastname char(24),created date)");
-	 } else print "ERROR: Visual FoxPro odbtp requires a Windows ODBC DSN=vfp-adoxyz, VFP driver";
-	
+	} else print "ERROR: Visual FoxPro odbtp requires a Windows ODBC DSN=vfp-adoxyz, VFP driver";
+
 }
 
 
@@ -242,7 +246,7 @@
 	$user = 'root'; $password = ''; $database = 'northwind';
 	$db = &ADONewConnection("mysqlt://$user:$password@$server/$database?persist");
 	print "<h1>Connecting $db->databaseType...</h1>";
-	
+
 	if (true || $db->PConnect($server, "root", "", "northwind")) {
 		//$db->Execute("DROP TABLE ADOXYZ") || die('fail drop');
 		//$db->debug=1;$db->Execute('drop table ADOXYZ');
@@ -268,7 +272,7 @@
 
 // REQUIRES MySQL server at localhost with database 'test'
 if (!empty($testmysqlodbc)) { // MYSQL
-	
+
 	$db = &ADONewConnection('odbc');
 	$db->hasTransactions = false;
 	print "<h1>Connecting $db->databaseType...</h1>";
@@ -294,22 +298,22 @@
 
 ADOLoadCode('oci805');
 ADOLoadCode("oci8po");
-	
+
 if (!empty($testoracle)) {
 	$dsn = "oci8po://juris10:natsoft@sherkhan?persist";
 	$db = ADONewConnection($dsn );//'oci8');
-	
+
 	//$db->debug=1;
 	print "<h1>Connecting $db->databaseType...</h1>";
 	if (true || $db->Connect('', "scott", "natsoft",''))
 		testdb($db,"create table ADOXYZ (id int, firstname varchar(24), lastname varchar(24),created date)");
-	else 
+	else
 		print "ERROR: Oracle test requires an Oracle server setup with scott/natsoft".'<BR>'.$db->ErrorMsg();
 
 }
 ADOLoadCode("oracle"); // no longer supported
-if (false && !empty($testoracle)) { 
-	
+if (false && !empty($testoracle)) {
+
 	$db = ADONewConnection();
 	print "<h1>Connecting $db->databaseType...</h1>";
 	if ($db->PConnect("", "scott", "tiger", "natsoft.domain"))
@@ -323,16 +327,16 @@
 	if (PHP_VERSION>=5.1) {
 		$db = ADONewConnection("db2");
 		print "<h1>Connecting $db->databaseType...</h1>";
-		
+
 		#$db->curMode = SQL_CUR_USE_ODBC;
 		#$dsn = "driver={IBM db2 odbc DRIVER};Database=test;hostname=localhost;port=50000;protocol=TCPIP; uid=natsoft; pwd=guest";
 		if ($db->Connect('localhost','natsoft','guest','test')) {
 			testdb($db,"create table ADOXYZ (id int, firstname varchar(24), lastname varchar(24),created date)");
 		} else print "ERROR: DB2 test requires an server setup with odbc data source db2_sample".'<BR>'.$db->ErrorMsg();
-	} else { 
+	} else {
 		$db = ADONewConnection("odbc_db2");
 		print "<h1>Connecting $db->databaseType...</h1>";
-		
+
 		$dsn = "db2test";
 		#$db->curMode = SQL_CUR_USE_ODBC;
 		#$dsn = "driver={IBM db2 odbc DRIVER};Database=test;hostname=localhost;port=50000;protocol=TCPIP; uid=natsoft; pwd=guest";
@@ -343,14 +347,14 @@
 echo "<hr />";
 flush();
 	$dsn = "driver={IBM db2 odbc DRIVER};Database=sample;hostname=localhost;port=50000;protocol=TCPIP; uid=root; pwd=natsoft";
-	
+
 	$db = ADONewConnection('odbtp');
 	if ($db->Connect('127.0.0.1',$dsn)) {
-		
+
 		$db->debug=1;
-		 $arr = $db->GetArray( "||SQLProcedures" ); adodb_pr($arr);
-	     $arr = $db->GetArray( "||SQLProcedureColumns|||GET_ROUTINE_SAR" );adodb_pr($arr);
-	
+		$arr = $db->GetArray( "||SQLProcedures" ); adodb_pr($arr);
+			 $arr = $db->GetArray( "||SQLProcedureColumns|||GET_ROUTINE_SAR" );adodb_pr($arr);
+
 		testdb($db,"create table ADOXYZ (id int, firstname varchar(24), lastname varchar(24),created date)");
 	} else echo ("ERROR Connection");
 	echo $db->ErrorMsg();
@@ -366,7 +370,7 @@
 	$db = ADONewConnection("mssqlpo");
 	//$db->debug=1;
 	print "<h1>Connecting $db->databaseType...</h1>";
-	
+
 	$ok = $db->Connect('','adodb','natsoft','northwind');
 
 	if ($ok or $db->PConnect("mangrove", "sa", "natsoft", "ai")) {
@@ -374,18 +378,18 @@
 	//	$db->Execute('drop table adoxyz');
 		testdb($db,"create table ADOXYZ (id int, firstname char(24) null, lastname char(24) null,created datetime null)");
 	} else print "ERROR: MSSQL test 2 requires a MS SQL 7 on a server='192.168.0.1', userid='adodb', password='natsoft', database='ai'".'<BR>'.$db->ErrorMsg();
-	
+
 }
 
 
 ADOLoadCode('odbc_mssql');
 if (!empty($testmssql)) { // MS SQL Server via ODBC
 	$db = ADONewConnection();
-	
+
 	print "<h1>Connecting $db->databaseType...</h1>";
-	
+
 	$dsn = "PROVIDER=MSDASQL;Driver={SQL Server};Server=$server;Database=northwind;";
-	
+
 	if ($db->PConnect($dsn, "adodb", "natsoft", ""))  {
 		testdb($db,"create table ADOXYZ (id int, firstname char(24) null, lastname char(24) null,created datetime null)");
 	}
@@ -395,19 +399,19 @@
 
 ADOLoadCode("ado_mssql");
 if (!empty($testmssql) && !empty($testado) ) { // ADO ACCESS MSSQL -- thru ODBC -- DSN-less
-	
+
 	$db = &ADONewConnection("ado_mssql");
 	//$db->debug=1;
 	print "<h1>Connecting DSN-less $db->databaseType...</h1>";
-	
+
 	$myDSN="PROVIDER=MSDASQL;DRIVER={SQL Server};"
 		. "SERVER=$server;DATABASE=NorthWind;UID=adodb;PWD=natsoft;Trusted_Connection=No";
 
-		
+
 	if ($db->PConnect($myDSN, "", "", ""))
 		testdb($db,"create table ADOXYZ (id int, firstname char(24) null, lastname char(24) null,created datetime null)");
 	else print "ERROR: MSSQL test 2 requires MS SQL 7";
-	
+
 }
 
 if (!empty($testmssql) && !empty($testado)) { // ADO ACCESS MSSQL with OLEDB provider
@@ -425,11 +429,11 @@
 
 if (extension_loaded('odbtp') && !empty($testmssql)) { // MS SQL Server via ODBC
 	$db = ADONewConnection('odbtp');
-	
+
 	$dsn = "PROVIDER=MSDASQL;Driver={SQL Server};Server=$server;Database=northwind;uid=adodb;pwd=natsoft";
-	
+
 	if ($db->PConnect('localhost',$dsn, "", ""))  {
-		print "<h1>Connecting $db->databaseType...</h1>";				
+		print "<h1>Connecting $db->databaseType...</h1>";
 		testdb($db,"create table ADOXYZ (id int, firstname char(24) null, lastname char(24) null,created datetime null)");
 	}
 	else print "ERROR: MSSQL test 1 requires a MS SQL 7 server setup with DSN setup";
Index: typo3/sysext/adodb/adodb/tests/test-active-record.php
===================================================================
--- typo3/sysext/adodb/adodb/tests/test-active-record.php	(revision 4551)
+++ typo3/sysext/adodb/adodb/tests/test-active-record.php	(working copy)
@@ -1,8 +1,12 @@
 <?php
+	// This checks for my own IP at home. You can just remove the if-statement.
+if (1==0 || ($_SERVER['REMOTE_ADDR']!='127.0.0.1'))	{
+	die('In the source distribution of TYPO3, this script is disabled by a die() function call.<br/><b>Fix:</b> Open this file and remove/out-comment the line that outputs this message!');
+}
 
 	include_once('../adodb.inc.php');
 	include_once('../adodb-active-record.inc.php');
-	
+
 	// uncomment the following if you want to test exceptions
 	if (@$_GET['except']) {
 		if (PHP_VERSION >= 5) {
@@ -16,20 +20,20 @@
 	ADOdb_Active_Record::SetDatabaseAdapter($db);
 
 	$db->Execute("CREATE TEMPORARY TABLE `persons` (
-	                `id` int(10) unsigned NOT NULL auto_increment,
-	                `name_first` varchar(100) NOT NULL default '',
-	                `name_last` varchar(100) NOT NULL default '',
-	                `favorite_color` varchar(100) NOT NULL default '',
-	                PRIMARY KEY  (`id`)
-	            ) ENGINE=MyISAM;
-	           ");
-			   
+									`id` int(10) unsigned NOT NULL auto_increment,
+									`name_first` varchar(100) NOT NULL default '',
+									`name_last` varchar(100) NOT NULL default '',
+									`favorite_color` varchar(100) NOT NULL default '',
+									PRIMARY KEY  (`id`)
+							) ENGINE=MyISAM;
+						 ");
+
 	class Person extends ADOdb_Active_Record{}
 	$person = new Person();
-	
+
 	echo "<p>Output of getAttributeNames: ";
 	var_dump($person->getAttributeNames());
-	
+
 	/**
 	 * Outputs the following:
 	 * array(4) {
@@ -43,40 +47,40 @@
 	 *    string(13) "favorite_color"
 	 *  }
 	 */
-	
+
 	$person = new Person();
 	$person->name_first = 'Andi';
 	$person->name_last  = 'Gutmans';
 	$person->save(); // this save() will fail on INSERT as favorite_color is a must fill...
-	
-	
+
+
 	$person = new Person();
 	$person->name_first     = 'Andi';
 	$person->name_last      = 'Gutmans';
 	$person->favorite_color = 'blue';
 	$person->save(); // this save will perform an INSERT successfully
-	
+
 	echo "<p>The Insert ID generated:"; print_r($person->id);
-	
+
 	$person->favorite_color = 'red';
 	$person->save(); // this save() will perform an UPDATE
-	
+
 	$person = new Person();
 	$person->name_first     = 'John';
 	$person->name_last      = 'Lim';
 	$person->favorite_color = 'lavender';
 	$person->save(); // this save will perform an INSERT successfully
-	
+
 	// load record where id=2 into a new ADOdb_Active_Record
 	$person2 = new Person();
 	$person2->Load('id=2');
-	
+
 	var_dump($person2);
-	
+
 	$activeArr = $db->GetActiveRecordsClass($class = "Person",$table = "persons","id=".$db->Param(0),array(2));
 	$person2 =& $activeArr[0];
-	echo "<p>Name (should be John): ",$person->name_first, " <br> Class (should be Person): ",get_class($person2);	
-	
+	echo "<p>Name (should be John): ",$person->name_first, " <br> Class (should be Person): ",get_class($person2);
+
 
 
 ?>
\ No newline at end of file
Index: typo3/sysext/adodb/adodb/tests/testgenid.php
===================================================================
--- typo3/sysext/adodb/adodb/tests/testgenid.php	(revision 4551)
+++ typo3/sysext/adodb/adodb/tests/testgenid.php	(working copy)
@@ -1,7 +1,12 @@
 <?php
+	// This checks for my own IP at home. You can just remove the if-statement.
+if (1==0 || ($_SERVER['REMOTE_ADDR']!='127.0.0.1'))	{
+	die('In the source distribution of TYPO3, this script is disabled by a die() function call.<br/><b>Fix:</b> Open this file and remove/out-comment the line that outputs this message!');
+}
+
 /*
-	V4.50 6 July 2004 
-	
+	V4.50 6 July 2004
+
 	Run multiple copies of this php script at the same time
 	to test unique generation of id's in multiuser mode
 */
@@ -12,16 +17,16 @@
 function testdb(&$db,$createtab="create table ADOXYZ (id int, firstname char(24), lastname char(24), created date)")
 {
 	$table = 'adodbseq';
-	
+
 	$db->Execute("drop table $table");
 	//$db->debug=true;
-	
+
 	$ctr = 5000;
 	$lastnum = 0;
-	
+
 	while (--$ctr >= 0) {
 		$num = $db->GenID($table);
-		if ($num === false) {	
+		if ($num === false) {
 			print "GenID returned false";
 			break;
 		}
Index: typo3/sysext/adodb/adodb/tests/test_rs_array.php
===================================================================
--- typo3/sysext/adodb/adodb/tests/test_rs_array.php	(revision 4551)
+++ typo3/sysext/adodb/adodb/tests/test_rs_array.php	(working copy)
@@ -1,4 +1,8 @@
 <?php
+	// This checks for my own IP at home. You can just remove the if-statement.
+if (1==0 || ($_SERVER['REMOTE_ADDR']!='127.0.0.1'))	{
+	die('In the source distribution of TYPO3, this script is disabled by a die() function call.<br/><b>Fix:</b> Open this file and remove/out-comment the line that outputs this message!');
+}
 
 include_once('../adodb.inc.php');
 $rs = new ADORecordSet_array();
@@ -40,8 +44,4 @@
 	print_r($rs->fields);echo "<br>";
 	$rs->MoveNext();
 }
-
-
-
-die();
 ?>
\ No newline at end of file
Index: typo3/sysext/adodb/adodb/tests/test-perf.php
===================================================================
--- typo3/sysext/adodb/adodb/tests/test-perf.php	(revision 4551)
+++ typo3/sysext/adodb/adodb/tests/test-perf.php	(working copy)
@@ -1,4 +1,8 @@
 <?php
+	// This checks for my own IP at home. You can just remove the if-statement.
+if (1==0 || ($_SERVER['REMOTE_ADDR']!='127.0.0.1'))	{
+	die('In the source distribution of TYPO3, this script is disabled by a die() function call.<br/><b>Fix:</b> Open this file and remove/out-comment the line that outputs this message!');
+}
 
 include_once('../adodb-perf.inc.php');
 
@@ -9,7 +13,7 @@
 	foreach($_GET as $k => $v) {
 		if (strncmp($k,'test',4) == 0) $_SESSION['_db'] = $k;
 	}
-} 
+}
 
 if (isset($_SESSION['_db'])) {
 	$_db = $_SESSION['_db'];
@@ -21,13 +25,13 @@
 include_once('testdatabases.inc.php');
 
 
-function testdb($db) 
+function testdb($db)
 {
 	if (!$db) return;
 	echo "<font size=1>";print_r($db->ServerInfo()); echo " user=".$db->user."</font>";
-	
-	$perf = NewPerfMonitor($db); 
-	
+
+	$perf = NewPerfMonitor($db);
+
 	# unit tests
 	if (0) {
 		//$DB->debug=1;
@@ -37,14 +41,14 @@
 		echo($perf->ExpensiveSQL());
 		echo($perf->InvalidSQL());
 		echo $perf->Tables();
-	
+
 		echo "<pre>";
 		echo $perf->HealthCheckCLI();
 		$perf->Poll(3);
 		die();
 	}
-	
+
 	if ($perf) $perf->UI(3);
 }
- 
-?>
+
+?>
\ No newline at end of file
Index: typo3/sysext/adodb/adodb/tests/test5.php
===================================================================
--- typo3/sysext/adodb/adodb/tests/test5.php	(revision 4551)
+++ typo3/sysext/adodb/adodb/tests/test5.php	(working copy)
@@ -1,16 +1,21 @@
 <?php
-/* 
+	// This checks for my own IP at home. You can just remove the if-statement.
+if (1==0 || ($_SERVER['REMOTE_ADDR']!='127.0.0.1'))	{
+	die('In the source distribution of TYPO3, this script is disabled by a die() function call.<br/><b>Fix:</b> Open this file and remove/out-comment the line that outputs this message!');
+}
+
+/*
 V4.80 8 Mar 2006  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
-  Released under both BSD license and Lesser GPL library license. 
-  Whenever there is any discrepancy between the two licenses, 
-  the BSD license will take precedence. 
-  Set tabs to 4 for best viewing.
-	
-  Latest version is available at http://adodb.sourceforge.net
+	Released under both BSD license and Lesser GPL library license.
+	Whenever there is any discrepancy between the two licenses,
+	the BSD license will take precedence.
+	Set tabs to 4 for best viewing.
+
+	Latest version is available at http://adodb.sourceforge.net
 */
 
 
-// Select an empty record from the database 
+// Select an empty record from the database
 
 include('../adodb.inc.php');
 include('../tohtml.inc.php');
