- Timestamp:
- 09/26/13 15:41:49 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/2.5.1-evolucao/phpgwapi/inc/adodb/tests/testsessions.php
r34 r8222 2 2 3 3 /* 4 V4.80 8 Mar 2006 (c) 2000-20 07 John Lim (jlim#natsoft.com.my). All rights reserved.4 V4.80 8 Mar 2006 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved. 5 5 Released under both BSD license and Lesser GPL library license. 6 6 Whenever there is any discrepancy between the two licenses, … … 24 24 include('../session/adodb-cryptsession2.php'); 25 25 26 $options['debug'] = 99; 26 27 $options['debug'] = 1; 27 28 $db = 'postgres'; 28 29 … … 31 32 case 'oci8': 32 33 $options['table'] = 'adodb_sessions2'; 33 ADOdb_Session::config('oci8', ' ', 'jcollect', 'natsoft', '',$options);34 ADOdb_Session::config('oci8', 'mobydick', 'jdev', 'natsoft', 'mobydick',$options); 34 35 break; 35 36 36 37 case 'postgres': 37 ADOdb_Session::config('postgres', 'localhost', 'tester', 'test', 'test',$options); 38 $options['table'] = 'sessions2'; 39 ADOdb_Session::config('postgres', 'localhost', 'postgres', 'natsoft', 'northwind',$options); 38 40 break; 39 41 40 42 case 'mysql': 41 43 default: 44 $options['table'] = 'sessions2'; 42 45 ADOdb_Session::config('mysql', 'localhost', 'root', '', 'xphplens_2',$options); 43 46 break; … … 84 87 85 88 if (rand() % 2 == 0) { 86 print "<p>Random session destroy</p>";89 print "<p>Random own session destroy</p>"; 87 90 session_destroy(); 88 91 } 92 } else { 93 $DB = ADODB_Session::_conn(); 94 $sessk = $DB->qstr('%AZ'.rand().time()); 95 $olddate = $DB->DBTimeStamp(time()-30*24*3600); 96 $rr = $DB->qstr(rand()); 97 $DB->Execute("insert into {$options['table']} (sesskey,expiry,expireref,sessdata,created,modified) values ($sessk,$olddate, $rr,'',$olddate,$olddate)"); 89 98 } 90 99 ?>
Note: See TracChangeset
for help on using the changeset viewer.