You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(183) |
Dec
(82) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(16) |
Feb
(3) |
Mar
|
Apr
(8) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Matt M. <pro...@us...> - 2004-11-23 02:29:26
|
Update of /cvsroot/webschool/webschool/install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31410/install Modified Files: step3.php Log Message: Tried to take a stab at XHTML Transitional Compat. HAHAHAHAHAHAHAHA Index: step3.php =================================================================== RCS file: /cvsroot/webschool/webschool/install/step3.php,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** step3.php 23 Nov 2004 01:24:01 -0000 1.24 --- step3.php 23 Nov 2004 02:29:06 -0000 1.25 *************** *** 248,251 **** --- 248,252 ---- $query = eregi_replace("table_user_academia", $_REQUEST['dbprefix']."user_academia", $query); $query = eregi_replace("table_calender", $_REQUEST['dbprefix']."calender", $query); + $query = eregi_replace("table_files", $_REQUEST['dbprefix']."files", $query); return $query; } |
From: Matt M. <pro...@us...> - 2004-11-23 02:29:26
|
Update of /cvsroot/webschool/webschool/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31410/lib Modified Files: db.php Log Message: Tried to take a stab at XHTML Transitional Compat. HAHAHAHAHAHAHAHA Index: db.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/db.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** db.php 1 Nov 2004 23:06:38 -0000 1.6 --- db.php 23 Nov 2004 02:29:06 -0000 1.7 *************** *** 37,41 **** DEFINE("_USER_ACADEMIA_", _db_prefix_."user_academia"); DEFINE("_ASSIGNMENTS_", _db_prefix_."assignments"); ! --- 37,42 ---- DEFINE("_USER_ACADEMIA_", _db_prefix_."user_academia"); DEFINE("_ASSIGNMENTS_", _db_prefix_."assignments"); ! DEFINE("_CALENDER_", _db_prefix_."calender"); ! DEFINE("_FILES_", _db_prefix_."files"); |
From: Matt M. <pro...@us...> - 2004-11-23 02:27:20
|
Update of /cvsroot/webschool/webschool/files In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30836/files Log Message: Directory /cvsroot/webschool/webschool/files added to the repository |
From: Matt M. <pro...@us...> - 2004-11-23 01:41:16
|
Update of /cvsroot/webschool/webschool/lib/adodb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21876/lib/adodb Added Files: adodb-perf.inc.php.#.LENS-03-09-05 Log Message: --- NEW FILE: adodb-perf.inc.php.#.LENS-03-09-05 --- <?php /* V4.23 16 June 2004 (c) 2000-2004 John Lim (jl...@na...). 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. See License.txt. Set tabs to 4 for best viewing. Latest version is available at http://adodb.sourceforge.net Library for basic performance monitoring and tuning. My apologies if you see code mixed with presentation. The presentation suits my needs. If you want to separate code from presentation, be my guest. Patches are welcome. */ if (!defined(ADODB_DIR)) include_once(dirname(__FILE__).'/adodb.inc.php'); include_once(ADODB_DIR.'/tohtml.inc.php'); // avoids localization problems where , is used instead of . function adodb_round($n,$prec) { return number_format($n, $prec, '.', ''); } /* return microtime value as a float */ function adodb_microtime() { $t = microtime(); $t = explode(' ',$t); return (float)$t[1]+ (float)$t[0]; } /* sql code timing */ function& adodb_log_sql(&$conn,$sql,$inputarr) { global $HTTP_SERVER_VARS; $perf_table = adodb_perf::table(); $conn->fnExecute = false; $t0 = microtime(); $rs =& $conn->Execute($sql,$inputarr); $t1 = microtime(); if (!empty($conn->_logsql)) { $conn->_logsql = false; // disable logsql error simulation $dbT = $conn->databaseType; $a0 = split(' ',$t0); $a0 = (float)$a0[1]+(float)$a0[0]; $a1 = split(' ',$t1); $a1 = (float)$a1[1]+(float)$a1[0]; $time = $a1 - $a0; if (!$rs) { $errM = $conn->ErrorMsg(); $errN = $conn->ErrorNo(); $conn->lastInsID = 0; $tracer = substr('ERROR: '.htmlspecialchars($errM),0,250); } else { $tracer = ''; $errM = ''; $errN = 0; $dbg = $conn->debug; $conn->debug = false; if (!is_object($rs) || $rs->dataProvider == 'empty') $conn->_affected = $conn->affected_rows(true); $conn->lastInsID = @$conn->Insert_ID(); $conn->debug = $dbg; } if (isset($HTTP_SERVER_VARS['HTTP_HOST'])) { $tracer .= '<br>'.$HTTP_SERVER_VARS['HTTP_HOST']; if (isset($HTTP_SERVER_VARS['PHP_SELF'])) $tracer .= $HTTP_SERVER_VARS['PHP_SELF']; } else if (isset($HTTP_SERVER_VARS['PHP_SELF'])) $tracer .= '<br>'.$HTTP_SERVER_VARS['PHP_SELF']; //$tracer .= (string) adodb_backtrace(false); $tracer = substr($tracer,0,500); if (is_array($inputarr)) { if (is_array(reset($inputarr))) $params = 'Array sizeof='.sizeof($inputarr); else { $params = ''; $params = implode(', ',$inputarr); if (strlen($params) >= 3000) $params = substr($params, 0, 3000); } } else { $params = ''; } if (is_array($sql)) $sql = $sql[0]; $arr = array('b'=>trim(substr($sql,0,230)), 'c'=>substr($sql,0,3900), 'd'=>$params,'e'=>$tracer,'f'=>adodb_round($time,6)); //var_dump($arr); $saved = $conn->debug; $conn->debug = 0; if ($conn->dataProvider == 'oci8' && $dbT != 'oci8po') { $isql = "insert into $perf_table values($conn->sysTimeStamp,:b,:c,:d,:e,:f)"; } else if ($dbT == 'odbc_mssql' || $dbT == 'informix') { $timer = $arr['f']; if ($dbT == 'informix') $sql2 = substr($sql2,0,230); $sql1 = $conn->qstr($arr['b']); $sql2 = $conn->qstr($arr['c']); $params = $conn->qstr($arr['d']); $tracer = $conn->qstr($arr['e']); $isql = "insert into $perf_table (created,sql0,sql1,params,tracer,timer) values($conn->sysTimeStamp,$sql1,$sql2,$params,$tracer,$timer)"; if ($dbT == 'informix') $isql = str_replace(chr(10),' ',$isql); $arr = false; } else { $isql = "insert into $perf_table (created,sql0,sql1,params,tracer,timer) values( $conn->sysTimeStamp,?,?,?,?,?)"; } $ok = $conn->Execute($isql,$arr); $conn->debug = $saved; if ($ok) { $conn->_logsql = true; } else { $err2 = $conn->ErrorMsg(); $conn->_logsql = true; // enable logsql error simulation $perf =& NewPerfMonitor($conn); if ($perf) { if ($perf->CreateLogTable()) $ok = $conn->Execute($isql,$arr); } else { $ok = $conn->Execute("create table $perf_table ( created varchar(50), sql0 varchar(250), sql1 varchar(4000), params varchar(3000), tracer varchar(500), timer decimal(16,6))"); } if (!$ok) { ADOConnection::outp( "<b>LOGSQL Insert Failed</b>: $isql<br>$err2</br>"); $conn->_logsql = false; } } $conn->_errorMsg = $errM; $conn->_errorCode = $errN; } $conn->fnExecute = 'adodb_log_sql'; return $rs; } /* The settings data structure is an associative array that database parameter per element. Each database parameter element in the array is itself an array consisting of: 0: category code, used to group related db parameters 1: either a. sql string to retrieve value, eg. "select value from v\$parameter where name='db_block_size'", b. array holding sql string and field to look for, e.g. array('show variables','table_cache'), c. a string prefixed by =, then a PHP method of the class is invoked, e.g. to invoke $this->GetIndexValue(), set this array element to '=GetIndexValue', 2: description of the database parameter */ class adodb_perf { var $conn; var $color = '#F0F0F0'; var $table = '<table border=1 bgcolor=white>'; var $titles = '<tr><td><b>Parameter</b></td><td><b>Value</b></td><td><b>Description</b></td></tr>'; var $warnRatio = 90; var $tablesSQL = false; var $cliFormat = "%32s => %s \r\n"; var $sql1 = 'sql1'; // used for casting sql1 to text for mssql var $explain = true; var $helpurl = "<a href=http://phplens.com/adodb/reference.functions.fnexecute.and.fncacheexecute.properties.html#logsql>LogSQL help</a>"; var $createTableSQL = false; var $maxLength = 2000; // Sets the tablename to be used function table($newtable = false) { static $_table; if (!empty($newtable)) $_table = $newtable; if (empty($_table)) $_table = 'adodb_logsql'; return $_table; } // returns array with info to calculate CPU Load function _CPULoad() { /* cpu 524152 2662 2515228 336057010 cpu0 264339 1408 1257951 168025827 cpu1 259813 1254 1257277 168031181 page 622307 25475680 swap 24 1891 intr 890153570 868093576 6 0 4 4 0 6 1 2 0 0 0 124 0 8098760 2 13961053 0 0 0 0 0 0 0 0 0 0 0 0 0 16 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 disk_io: (3,0):(3144904,54369,610378,3090535,50936192) (3,1):(3630212,54097,633016,3576115,50951320) ctxt 66155838 btime 1062315585 processes 69293 */ // Algorithm is taken from // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/example__obtaining_raw_performance_data.asp if (strncmp(PHP_OS,'WIN',3)==0) { @$c = new COM("WinMgmts:{impersonationLevel=impersonate}!Win32_PerfRawData_PerfOS_Processor.Name='_Total'"); if (!$c) return false; $info[0] = $c->PercentProcessorTime; $info[1] = 0; $info[2] = 0; $info[3] = $c->TimeStamp_Sys100NS; //print_r($info); return $info; } // Algorithm - Steve Blinch (BlitzAffe Online, http://www.blitzaffe.com) $statfile = '/proc/stat'; if (!file_exists($statfile)) return false; $fd = fopen($statfile,"r"); if (!$fd) return false; $statinfo = explode("\n",fgets($fd, 1024)); fclose($fd); foreach($statinfo as $line) { $info = explode(" ",$line); if($info[0]=="cpu") { array_shift($info); // pop off "cpu" if(!$info[0]) array_shift($info); // pop off blank space (if any) return $info; } } return false; } /* NOT IMPLEMENTED */ function MemInfo() { /* total: used: free: shared: buffers: cached: Mem: 1055289344 917299200 137990144 0 165437440 599773184 Swap: 2146775040 11055104 2135719936 MemTotal: 1030556 kB MemFree: 134756 kB MemShared: 0 kB Buffers: 161560 kB Cached: 581384 kB SwapCached: 4332 kB Active: 494468 kB Inact_dirty: 322856 kB Inact_clean: 24256 kB Inact_target: 168316 kB HighTotal: 131064 kB HighFree: 1024 kB LowTotal: 899492 kB LowFree: 133732 kB SwapTotal: 2096460 kB SwapFree: 2085664 kB Committed_AS: 348732 kB */ } /* Remember that this is client load, not db server load! */ var $_lastLoad; function CPULoad() { $info = $this->_CPULoad(); if (!$info) return false; if (empty($this->_lastLoad)) { sleep(1); $this->_lastLoad = $info; $info = $this->_CPULoad(); } $last = $this->_lastLoad; $this->_lastLoad = $info; $d_user = $info[0] - $last[0]; $d_nice = $info[1] - $last[1]; $d_system = $info[2] - $last[2]; $d_idle = $info[3] - $last[3]; //printf("Delta - User: %f Nice: %f System: %f Idle: %f<br>",$d_user,$d_nice,$d_system,$d_idle); if (strncmp(PHP_OS,'WIN',3)==0) { if ($d_idle < 1) $d_idle = 1; return 100*(1-$d_user/$d_idle); }else { $total=$d_user+$d_nice+$d_system+$d_idle; if ($total<1) $total=1; return 100*($d_user+$d_nice+$d_system)/$total; } } function Tracer($sql) { $perf_table = adodb_perf::table(); $saveE = $this->conn->fnExecute; $this->conn->fnExecute = false; $sqlq = $this->conn->qstr($sql); $arr = $this->conn->GetArray( "select count(*),tracer from $perf_table where sql1=$sqlq group by tracer order by 1 desc"); $s = ''; if ($arr) { $s .= '<h3>Scripts Affected</h3>'; foreach($arr as $k) { $s .= sprintf("%4d",$k[0]).' '.strip_tags($k[1]).'<br>'; } } $this->conn->fnExecute = $saveE; return $s; } /* Explain Plan for $sql. If only a snippet of the $sql is passed in, then $partial will hold the crc32 of the actual sql. */ function Explain($sql,$partial=false) { return false; } function InvalidSQL($numsql = 10) { global $HTTP_GET_VARS; if (isset($HTTP_GET_VARS['sql'])) return; $s = '<h3>Invalid SQL</h3>'; $saveE = $this->conn->fnExecute; $this->conn->fnExecute = false; $perf_table = adodb_perf::table(); $rs =& $this->conn->SelectLimit("select distinct count(*),sql1,tracer as error_msg from $perf_table where tracer like 'ERROR:%' group by sql1,tracer order by 1 desc",$numsql);//,$numsql); $this->conn->fnExecute = $saveE; if ($rs) { $s .= rs2html($rs,false,false,false,false); } else return "<p>$this->helpurl. ".$this->conn->ErrorMsg()."</p>"; return $s; } /* This script identifies the longest running SQL */ function _SuspiciousSQL($numsql = 10) { global $ADODB_FETCH_MODE,$HTTP_GET_VARS; $perf_table = adodb_perf::table(); $saveE = $this->conn->fnExecute; $this->conn->fnExecute = false; if (isset($HTTP_GET_VARS['exps']) && isset($HTTP_GET_VARS['sql'])) { $partial = !empty($HTTP_GET_VARS['part']); echo "<a name=explain></a>".$this->Explain($HTTP_GET_VARS['sql'],$partial)."\n"; } if (isset($HTTP_GET_VARS['sql'])) return; $sql1 = $this->sql1; $save = $ADODB_FETCH_MODE; $ADODB_FETCH_MODE = ADODB_FETCH_NUM; //$this->conn->debug=1; $rs =& $this->conn->SelectLimit( "select avg(timer) as avg_timer,$sql1,count(*),max(timer) as max_timer,min(timer) as min_timer from $perf_table where {$this->conn->upperCase}({$this->conn->substr}(sql0,1,5)) not in ('DROP ','INSER','COMMI','CREAT') and (tracer is null or tracer not like 'ERROR:%') group by sql1 order by 1 desc",$numsql); $ADODB_FETCH_MODE = $save; $this->conn->fnExecute = $saveE; if (!$rs) return "<p>$this->helpurl. ".$this->conn->ErrorMsg()."</p>"; $s = "<h3>Suspicious SQL</h3> <font size=1>The following SQL have high average execution times</font><br> <table border=1 bgcolor=white><tr><td><b>Avg Time</b><td><b>Count</b><td><b>SQL</b><td><b>Max</b><td><b>Min</b></tr>\n"; $max = $this->maxLength; while (!$rs->EOF) { $sql = $rs->fields[1]; $raw = urlencode($sql); if (strlen($raw)>$max-100) { $sql2 = substr($sql,0,$max-500); $raw = urlencode($sql2).'&part='.crc32($sql); } $prefix = "<a target=sql".rand()." href=\"?hidem=1&exps=1&sql=".$raw."&x#explain\">"; $suffix = "</a>"; if ($this->explain == false || strlen($prefix)>$max) { $suffix = ' ... <i>String too long for GET parameter: '.strlen($prefix).'</i>'; $prefix = ''; } $s .= "<tr><td>".adodb_round($rs->fields[0],6)."<td align=right>".$rs->fields[2]."<td><font size=-1>".$prefix.htmlspecialchars($sql).$suffix."</font>". "<td>".$rs->fields[3]."<td>".$rs->fields[4]."</tr>"; $rs->MoveNext(); } return $s."</table>"; } function CheckMemory() { return ''; } function SuspiciousSQL($numsql=10) { return adodb_perf::_SuspiciousSQL($numsql); } function ExpensiveSQL($numsql=10) { return adodb_perf::_ExpensiveSQL($numsql); } /* This reports the percentage of load on the instance due to the most expensive few SQL statements. Tuning these statements can often make huge improvements in overall system performance. */ function _ExpensiveSQL($numsql = 10) { global $HTTP_GET_VARS,$ADODB_FETCH_MODE; $perf_table = adodb_perf::table(); $saveE = $this->conn->fnExecute; $this->conn->fnExecute = false; if (isset($HTTP_GET_VARS['expe']) && isset($HTTP_GET_VARS['sql'])) { $partial = !empty($HTTP_GET_VARS['part']); echo "<a name=explain></a>".$this->Explain($HTTP_GET_VARS['sql'],$partial)."\n"; } if (isset($HTTP_GET_VARS['sql'])) return; $sql1 = $this->sql1; $save = $ADODB_FETCH_MODE; $ADODB_FETCH_MODE = ADODB_FETCH_NUM; $rs =& $this->conn->SelectLimit( "select sum(timer) as total,$sql1,count(*),max(timer) as max_timer,min(timer) as min_timer from $perf_table where {$this->conn->upperCase}({$this->conn->substr}(sql0,1,5)) not in ('DROP ','INSER','COMMI','CREAT') and (tracer is null or tracer not like 'ERROR:%') group by sql1 order by 1 desc",$numsql); $this->conn->fnExecute = $saveE; $ADODB_FETCH_MODE = $save; if (!$rs) return "<p>$this->helpurl. ".$this->conn->ErrorMsg()."</p>"; $s = "<h3>Expensive SQL</h3> <font size=1>Tuning the following SQL will reduce the server load substantially</font><br> <table border=1 bgcolor=white><tr><td><b>Load</b><td><b>Count</b><td><b>SQL</b><td><b>Max</b><td><b>Min</b></tr>\n"; $max = $this->maxLength; while (!$rs->EOF) { $sql = $rs->fields[1]; $raw = urlencode($sql); if (strlen($raw)>$max-100) { $sql2 = substr($sql,0,$max-500); $raw = urlencode($sql2).'&part='.crc32($sql); } $prefix = "<a target=sqle".rand()." href=\"?hidem=1&expe=1&sql=".$raw."&x#explain\">"; $suffix = "</a>"; if($this->explain == false || strlen($prefix>$max)) { $prefix = ''; $suffix = ''; } $s .= "<tr><td>".adodb_round($rs->fields[0],6)."<td align=right>".$rs->fields[2]."<td><font size=-1>".$prefix.htmlspecialchars($sql).$suffix."</font>". "<td>".$rs->fields[3]."<td>".$rs->fields[4]."</tr>"; $rs->MoveNext(); } return $s."</table>"; } /* Raw function to return parameter value from $settings. */ function DBParameter($param) { if (empty($this->settings[$param])) return false; $sql = $this->settings[$param][1]; return $this->_DBParameter($sql); } /* Raw function returning array of poll paramters */ function &PollParameters() { $arr[0] = (float)$this->DBParameter('data cache hit ratio'); $arr[1] = (float)$this->DBParameter('data reads'); $arr[2] = (float)$this->DBParameter('data writes'); $arr[3] = (integer) $this->DBParameter('current connections'); return $arr; } /* Low-level Get Database Parameter */ function _DBParameter($sql) { $savelog = $this->conn->LogSQL(false); if (is_array($sql)) { global $ADODB_FETCH_MODE; $sql1 = $sql[0]; $key = $sql[1]; if (sizeof($sql)>2) $pos = $sql[2]; else $pos = 1; if (sizeof($sql)>3) $coef = $sql[3]; else $coef = false; $ret = false; $save = $ADODB_FETCH_MODE; $ADODB_FETCH_MODE = ADODB_FETCH_NUM; $rs = $this->conn->Execute($sql1); $ADODB_FETCH_MODE = $save; if ($rs) { while (!$rs->EOF) { $keyf = reset($rs->fields); if (trim($keyf) == $key) { $ret = $rs->fields[$pos]; if ($coef) $ret *= $coef; break; } $rs->MoveNext(); } $rs->Close(); } $this->conn->LogSQL($savelog); return $ret; } else { if (strncmp($sql,'=',1) == 0) { $fn = substr($sql,1); return $this->$fn(); } $sql = str_replace('$DATABASE',$this->conn->database,$sql); $ret = $this->conn->GetOne($sql); $this->conn->LogSQL($savelog); return $ret; } } /* Warn if cache ratio falls below threshold. Displayed in "Description" column. */ function WarnCacheRatio($val) { if ($val < $this->warnRatio) return '<font color=red><b>Cache ratio should be at least '.$this->warnRatio.'%</b></font>'; else return ''; } /***********************************************************************************************/ // HIGH LEVEL UI FUNCTIONS /***********************************************************************************************/ function UI($pollsecs=5) { global $HTTP_GET_VARS,$HTTP_SERVER_VARS,$HTTP_POST_VARS; $perf_table = adodb_perf::table(); $conn = $this->conn; $app = $conn->host; if ($conn->host && $conn->database) $app .= ', db='; $app .= $conn->database; if ($app) $app .= ', '; $savelog = $this->conn->LogSQL(false); $info = $conn->ServerInfo(); if (isset($HTTP_GET_VARS['clearsql'])) { $this->conn->Execute("delete from $perf_table"); } $this->conn->LogSQL($savelog); // magic quotes if (isset($HTTP_GET_VARS['sql']) && get_magic_quotes_gpc()) { $_GET['sql'] = $HTTP_GET_VARS['sql'] = str_replace(array("\\'",'\"'),array("'",'"'),$HTTP_GET_VARS['sql']); } if (!isset($_SESSION['ADODB_PERF_SQL'])) $nsql = $_SESSION['ADODB_PERF_SQL'] = 10; else $nsql = $_SESSION['ADODB_PERF_SQL']; $app .= $info['description']; if (isset($HTTP_GET_VARS['do'])) $do = $HTTP_GET_VARS['do']; else if (isset($HTTP_POST_VARS['do'])) $do = $HTTP_POST_VARS['do']; else if (isset($HTTP_GET_VARS['sql'])) $do = 'viewsql'; else $do = 'stats'; if (isset($HTTP_GET_VARS['nsql'])) { if ($HTTP_GET_VARS['nsql'] > 0) $nsql = $_SESSION['ADODB_PERF_SQL'] = (integer) $HTTP_GET_VARS['nsql']; } echo "<title>ADOdb Performance Monitor on $app</title><body bgcolor=white>"; if ($do == 'viewsql') $form = "<td><form># SQL:<input type=hidden value=viewsql name=do> <input type=text size=4 name=nsql value=$nsql><input type=submit value=Go></td></form>"; else $form = "<td> </td>"; $allowsql = !defined('ADODB_PERF_NO_RUN_SQL'); if (empty($HTTP_GET_VARS['hidem'])) echo "<table border=1 width=100% bgcolor=lightyellow><tr><td colspan=2> <b><a href=http://php.weblogs.com/adodb?perf=1>ADOdb</a> Performance Monitor</b> <font size=1>for $app</font></tr><tr><td> <a href=?do=stats><b>Performance Stats</b></a> <a href=?do=viewsql><b>View SQL</b></a> <a href=?do=tables><b>View Tables</b></a> <a href=?do=poll><b>Poll Stats</b></a>", $allowsql ? ' <a href=?do=dosql><b>Run SQL</b></a>' : '', "$form", "</tr></table>"; switch ($do) { default: case 'stats': echo $this->HealthCheck(); //$this->conn->debug=1; echo $this->CheckMemory(); break; case 'poll': echo "<iframe width=720 height=80% src=\"{$HTTP_SERVER_VARS['PHP_SELF']}?do=poll2&hidem=1\"></iframe>"; break; case 'poll2': echo "<pre>"; $this->Poll($pollsecs); break; case 'dosql': if (!$allowsql) break; $this->DoSQLForm(); break; case 'viewsql': if (empty($HTTP_GET_VARS['hidem'])) echo " <a href=\"?do=viewsql&clearsql=1\">Clear SQL Log</a><br>"; echo($this->SuspiciousSQL($nsql)); echo($this->ExpensiveSQL($nsql)); echo($this->InvalidSQL($nsql)); break; case 'tables': echo $this->Tables(); break; } global $ADODB_vers; echo "<p><div align=center><font size=1>$ADODB_vers Sponsored by <a href=http://phplens.com/>phpLens</a></font></div>"; } /* Runs in infinite loop, returning real-time statistics */ function Poll($secs=5) { $this->conn->fnExecute = false; //$this->conn->debug=1; if ($secs <= 1) $secs = 1; echo "Accumulating statistics, every $secs seconds...\n";flush(); $arro =& $this->PollParameters(); $cnt = 0; set_time_limit(0); sleep($secs); while (1) { $arr =& $this->PollParameters(); $hits = sprintf('%2.2f',$arr[0]); $reads = sprintf('%12.4f',($arr[1]-$arro[1])/$secs); $writes = sprintf('%12.4f',($arr[2]-$arro[2])/$secs); $sess = sprintf('%5d',$arr[3]); $load = $this->CPULoad(); if ($load !== false) { $oslabel = 'WS-CPU%'; $osval = sprintf(" %2.1f ",(float) $load); }else { $oslabel = ''; $osval = ''; } if ($cnt % 10 == 0) echo " Time ".$oslabel." Hit% Sess Reads/s Writes/s\n"; $cnt += 1; echo date('H:i:s').' '.$osval."$hits $sess $reads $writes\n"; flush(); sleep($secs); $arro = $arr; } } /* Returns basic health check in a command line interface */ function HealthCheckCLI() { return $this->HealthCheck(true); } /* Returns basic health check as HTML */ function HealthCheck($cli=false) { $saveE = $this->conn->fnExecute; $this->conn->fnExecute = false; if ($cli) $html = ''; else $html = $this->table.'<tr><td colspan=3><h3>'.$this->conn->databaseType.'</h3></td></tr>'.$this->titles; $oldc = false; $bgc = ''; foreach($this->settings as $name => $arr) { if ($arr === false) break; if (!is_string($name)) { if ($cli) $html .= " -- $arr -- \n"; else $html .= "<tr bgcolor=$this->color><td colspan=3><i>$arr</i> </td></tr>"; continue; } if (!is_array($arr)) break; $category = $arr[0]; $how = $arr[1]; if (sizeof($arr)>2) $desc = $arr[2]; else $desc = ' '; if ($category == 'HIDE') continue; $val = $this->_DBParameter($how); if ($desc && strncmp($desc,"=",1) === 0) { $fn = substr($desc,1); $desc = $this->$fn($val); } if ($val === false) { $m = $this->conn->ErrorMsg(); $val = "Error: $m"; } else { if (is_numeric($val) && $val >= 256*1024) { if ($val % (1024*1024) == 0) { $val /= (1024*1024); $val .= 'M'; } else if ($val % 1024 == 0) { $val /= 1024; $val .= 'K'; } //$val = htmlspecialchars($val); } } if ($category != $oldc) { $oldc = $category; //$bgc = ($bgc == ' bgcolor='.$this->color) ? ' bgcolor=white' : ' bgcolor='.$this->color; } if (strlen($desc)==0) $desc = ' '; if (strlen($val)==0) $val = ' '; if ($cli) { $html .= str_replace(' ','',sprintf($this->cliFormat,strip_tags($name),strip_tags($val),strip_tags($desc))); }else { $html .= "<tr$bgc><td>".$name.'</td><td>'.$val.'</td><td>'.$desc."</td></tr>\n"; } } if (!$cli) $html .= "</table>\n"; $this->conn->fnExecute = $saveE; return $html; } function Tables($orderby='1') { if (!$this->tablesSQL) return false; $savelog = $this->conn->LogSQL(false); $rs = $this->conn->Execute($this->tablesSQL.' order by '.$orderby); $this->conn->LogSQL($savelog); $html = rs2html($rs,false,false,false,false); return $html; } function CreateLogTable() { if (!$this->createTableSQL) return false; $savelog = $this->conn->LogSQL(false); $ok = $this->conn->Execute($this->createTableSQL); $this->conn->LogSQL($savelog); return ($ok) ? true : false; } function DoSQLForm() { global $HTTP_SERVER_VARS,$HTTP_GET_VARS,$HTTP_POST_VARS,$HTTP_SESSION_VARS; $HTTP_VARS = array_merge($HTTP_GET_VARS,$HTTP_POST_VARS); $PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF']; $sql = isset($HTTP_VARS['sql']) ? $HTTP_VARS['sql'] : ''; if (isset($HTTP_SESSION_VARS['phplens_sqlrows'])) $rows = $HTTP_SESSION_VARS['phplens_sqlrows']; else $rows = 3; if (isset($HTTP_VARS['SMALLER'])) { $rows /= 2; if ($rows < 3) $rows = 3; $HTTP_SESSION_VARS['phplens_sqlrows'] = $rows; } if (isset($HTTP_VARS['BIGGER'])) { $rows *= 2; $HTTP_SESSION_VARS['phplens_sqlrows'] = $rows; } ?> <form method="POST" action="<?php echo $PHP_SELF ?>"> <table><tr> <td> Form size: <input type="submit" value=" < " name="SMALLER"><input type="submit" value=" > > " name="BIGGER"> </td> <td align=right> <input type="submit" value=" Run SQL Below " name="RUN"><input type=hidden name=do value=dosql> </td></tr> <tr> <td colspan=2><textarea rows=<?php print $rows; ?> name="sql" cols="80"><?php print htmlspecialchars($sql) ?></textarea> </td> </tr> </table> </form> <?php if (!isset($HTTP_VARS['sql'])) return; $sql = $this->undomq(trim($sql)); if (substr($sql,strlen($sql)-1) === ';') { $print = true; $sqla = $this->SplitSQL($sql); } else { $print = false; $sqla = array($sql); } foreach($sqla as $sqls) { if (!$sqls) continue; if ($print) { print "<p>".htmlspecialchars($sqls)."</p>"; flush(); } $savelog = $this->conn->LogSQL(false); $rs = $this->conn->Execute($sqls); $this->conn->LogSQL($savelog); if ($rs && is_object($rs) && !$rs->EOF) { rs2html($rs); while ($rs->NextRecordSet()) { print "<table width=98% bgcolor=#C0C0FF><tr><td> </td></tr></table>"; rs2html($rs); } } else { $e1 = (integer) $this->conn->ErrorNo(); $e2 = $this->conn->ErrorMsg(); if (($e1) || ($e2)) { if (empty($e1)) $e1 = '-1'; // postgresql fix print ' '.$e1.': '.$e2; } else { print "<p>No Recordset returned<br></p>"; } } } // foreach } function SplitSQL($sql) { $arr = explode(';',$sql); return $arr; } function undomq(&$m) { if (get_magic_quotes_gpc()) { // undo the damage $m = str_replace('\\\\','\\',$m); $m = str_replace('\"','"',$m); $m = str_replace('\\\'','\'',$m); } return $m; } } ?> |
From: Matt M. <pro...@us...> - 2004-11-23 01:41:15
|
Update of /cvsroot/webschool/webschool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21876 Added Files: file.php Log Message: --- NEW FILE: file.php --- <?PHP /* Webschool Copyright (C) 2004 ProgrammerMatt Developers & Contributors: ProgrammerMatt Pro...@bl... jsvoyager Gen...@gm... This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. (license.txt) */ ?> |
From: Matt M. <pro...@us...> - 2004-11-23 01:41:15
|
Update of /cvsroot/webschool/webschool/mysql In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21876/mysql Modified Files: webschool.sql Log Message: Index: webschool.sql =================================================================== RCS file: /cvsroot/webschool/webschool/mysql/webschool.sql,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** webschool.sql 23 Nov 2004 01:24:02 -0000 1.50 --- webschool.sql 23 Nov 2004 01:41:04 -0000 1.51 *************** *** 103,107 **** ) TYPE=MyISAM AUTO_INCREMENT=2 ; ! INSERT INTO `table_pages` VALUES (1, 'WebSchool Installed Successfully!', 2, '<span>Congratulations, WebSchool has been installed successfully!</span><br /><br />Welcome to WebSchool version 0.0.6. Please note that this version of WebSchool is a <b>alpha</b> and is accordingly not designed for production environments.<br /><br />Limited documentation is available from the <a href="mod.php?mod=Articles&op=view&id=1"><span style="font-style: italic;">Introduction to WebSchool</span> </a>article. Further documentation is planed for our full release, but until then, fell free to visit our <a href="http://dev.bluemavid.net" title="WebSchool Forums">forums</a> for support. Please also note the following important information:<br /><ul><li>The username to get into the administration area is <span style="font-weight: bold;">Administrator</span> and the password is what you set it to in the setup. Please change this as soon as possible.</li><li>Limited documentation is available from the <a href="mod.php?mod=Articles&op=view&id=1"><span style="font-style: italic;">Introduction to WebSchool</span></a> article. This includes basic features and how to administer them.</li><li>The debug information below can be turned off by changing the "debug" option in the Config area of the Admin Control Panel.<br /></li></ul><br />We hope you enjoy this beta release of WebSchool.<br /><br /><span style="font-family: arial,helvetica,sans-serif;">The WebSchool Development Team</span>', '1099153213', '1099153213', '0', 2, ''); DROP TABLE IF EXISTS `table_permissions`; --- 103,107 ---- ) TYPE=MyISAM AUTO_INCREMENT=2 ; ! INSERT INTO `table_pages` VALUES (1, 'WebSchool Installed Successfully!', 2, '<span>Congratulations, WebSchool has been installed successfully!</span><br /><br />Welcome to WebSchool version 0.0.6. Please note that this version of WebSchool is a <b>alpha</b> and is accordingly not designed for production environments.<br /><br />Limited documentation is available from the <a href="mod.php?mod=Articles&op=view&id=1"><span style="font-style: italic;">Introduction to WebSchool</span> </a>article. Further documentation is planed for our full release, but until then, fell free to visit our <a href="http://dev.bluemavid.net" title="WebSchool Forums">forums</a> for support. Please also note the following important information:<br /><ul><li>The username to get into the administration area is <span style="font-weight: bold;">Administrator</span> and the password is what you set it to in the setup. Please change this as soon as possible.</li><li>Limited documentation is available from the <a href="mod.php?mod=Articles&op=view&id=1"><span style="font-style: italic;">Introduction to WebSchool</span></a> article. This includes basic features and how to administer them.</li><li>The debug information below can be turned off by changing the "debug" option in the <a href="admin.php?amod=Config">Config</a> area of the <a href="admin.php">Admin Control Panel.</a><br /></li></ul><br />We hope you enjoy this beta release of WebSchool.<br /><br /><span style="font-family: arial,helvetica,sans-serif;">The WebSchool Development Team</span>', '1099153213', '1099153213', '0', 2, ''); DROP TABLE IF EXISTS `table_permissions`; |
From: Matt M. <pro...@us...> - 2004-11-23 01:41:13
|
Update of /cvsroot/webschool/webschool/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21876/lib Modified Files: auth.php Log Message: Index: auth.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/auth.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** auth.php 20 Nov 2004 01:27:36 -0000 1.8 --- auth.php 23 Nov 2004 01:41:03 -0000 1.9 *************** *** 23,26 **** --- 23,27 ---- } + //definition so that we can check in other files if this authentication library is loaded Define("_AUTHLOADED_", true); *************** *** 31,41 **** //initialize user*s* var, which is used with the // ResolveUserID function $query = "SELECT * FROM "._USERS_; db(__FILE__,__LINE__, $query); while($user = dbr()){ ! $users[$user['id']]['fname'] = $user['fname']; ! $users[$user['id']]['lname'] = $user['lname']; ! $users[$user['id']]['username'] = $user['username']; } --- 32,46 ---- //initialize user*s* var, which is used with the // ResolveUserID function + //global encapsilation for all users + /* + ProgrammerMatt: Reconsidering this. In a production environment with a large sum of users, this + could consume a great ammountt of server resources + */ $query = "SELECT * FROM "._USERS_; db(__FILE__,__LINE__, $query); while($user = dbr()){ ! $users[$user['id']] = $user; ! } *************** *** 115,123 **** global $user; $user = dbr(); ! db(__FILE__,__LINE__,"SELECT * FROM "._PERMISSIONS_." WHERE userid='".$id."'"); global $perm; $perm = dbr(); ! db(__FILE__,__LINE__,"SELECT name, value FROM "._CONFIG_); global $config; --- 120,128 ---- global $user; $user = dbr(); ! //get their permissions db(__FILE__,__LINE__,"SELECT * FROM "._PERMISSIONS_." WHERE userid='".$id."'"); global $perm; $perm = dbr(); ! //get configuration stuff db(__FILE__,__LINE__,"SELECT name, value FROM "._CONFIG_); global $config; |
Update of /cvsroot/webschool/webschool/lib/adodb/perf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19610/lib/adodb/perf Modified Files: perf-db2.inc.php perf-informix.inc.php perf-mssql.inc.php perf-mysql.inc.php perf-oci8.inc.php perf-postgres.inc.php Log Message: ADODB Updated Index: perf-postgres.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/perf/perf-postgres.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** perf-postgres.inc.php 19 Oct 2004 00:57:11 -0000 1.2 --- perf-postgres.inc.php 23 Nov 2004 01:31:09 -0000 1.3 *************** *** 2,6 **** /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 2,6 ---- /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: perf-mssql.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/perf/perf-mssql.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** perf-mssql.inc.php 19 Oct 2004 00:57:11 -0000 1.2 --- perf-mssql.inc.php 23 Nov 2004 01:31:09 -0000 1.3 *************** *** 2,6 **** /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 2,6 ---- /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: perf-oci8.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/perf/perf-oci8.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** perf-oci8.inc.php 19 Oct 2004 00:57:11 -0000 1.2 --- perf-oci8.inc.php 23 Nov 2004 01:31:09 -0000 1.3 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: perf-db2.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/perf/perf-db2.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** perf-db2.inc.php 19 Oct 2004 00:57:11 -0000 1.2 --- perf-db2.inc.php 23 Nov 2004 01:31:09 -0000 1.3 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: perf-informix.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/perf/perf-informix.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** perf-informix.inc.php 19 Oct 2004 00:57:11 -0000 1.2 --- perf-informix.inc.php 23 Nov 2004 01:31:09 -0000 1.3 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: perf-mysql.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/perf/perf-mysql.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** perf-mysql.inc.php 19 Oct 2004 00:57:11 -0000 1.2 --- perf-mysql.inc.php 23 Nov 2004 01:31:09 -0000 1.3 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, |
Update of /cvsroot/webschool/webschool/lib/adodb/drivers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19610/lib/adodb/drivers Modified Files: adodb-access.inc.php adodb-ado.inc.php adodb-ado5.inc.php adodb-ado_access.inc.php adodb-ado_mssql.inc.php adodb-borland_ibase.inc.php adodb-csv.inc.php adodb-db2.inc.php adodb-fbsql.inc.php adodb-firebird.inc.php adodb-ibase.inc.php adodb-informix.inc.php adodb-informix72.inc.php adodb-ldap.inc.php adodb-mssql.inc.php adodb-mssqlpo.inc.php adodb-mysql.inc.php adodb-mysqli.inc.php adodb-mysqlt.inc.php adodb-netezza.inc.php adodb-oci8.inc.php adodb-oci805.inc.php adodb-oci8po.inc.php adodb-odbc.inc.php adodb-odbc_mssql.inc.php adodb-odbc_oracle.inc.php adodb-odbtp.inc.php adodb-odbtp_unicode.inc.php adodb-oracle.inc.php adodb-pdo.inc.php adodb-postgres.inc.php adodb-postgres64.inc.php adodb-postgres7.inc.php adodb-proxy.inc.php adodb-sapdb.inc.php adodb-sqlanywhere.inc.php adodb-sqlite.inc.php adodb-sqlitepo.inc.php adodb-sybase.inc.php adodb-vfp.inc.php Log Message: ADODB Updated Index: adodb-odbtp_unicode.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/drivers/adodb-odbtp_unicode.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-odbtp_unicode.inc.php 19 Oct 2004 00:57:10 -0000 1.2 --- adodb-odbtp_unicode.inc.php 23 Nov 2004 01:31:09 -0000 1.3 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: adodb-sybase.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/drivers/adodb-sybase.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-sybase.inc.php 19 Oct 2004 00:57:10 -0000 1.2 --- adodb-sybase.inc.php 23 Nov 2004 01:31:09 -0000 1.3 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim. All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim. All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, *************** *** 95,99 **** } ! function SelectDB($dbName) { $this->databaseName = $dbName; if ($this->_connectionID) { --- 95,100 ---- } ! function SelectDB($dbName) ! { $this->databaseName = $dbName; if ($this->_connectionID) { *************** *** 106,113 **** Note: This function is NOT available for Microsoft SQL Server. */ ! function ErrorMsg() { if ($this->_logsql) return $this->_errorMsg; ! $this->_errorMsg = sybase_get_last_message(); return $this->_errorMsg; } --- 107,118 ---- Note: This function is NOT available for Microsoft SQL Server. */ ! ! function ErrorMsg() { if ($this->_logsql) return $this->_errorMsg; ! if (function_exists('sybase_get_last_message')) ! $this->_errorMsg = sybase_get_last_message(); ! else ! $this->_errorMsg = isset($php_errormsg) ? $php_errormsg : 'SYBASE error messages not supported on this platform'; return $this->_errorMsg; } *************** *** 152,161 **** return $rs; } ! $cnt = ($nrows > 0) ? $nrows : 0; if ($offset > 0 && $cnt) $cnt += $offset; $this->Execute("set rowcount $cnt"); $rs =& ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,0); ! $this->Execute("set rowcount 0"); return $rs; --- 157,166 ---- return $rs; } ! $cnt = ($nrows >= 0) ? $nrows : 999999999; if ($offset > 0 && $cnt) $cnt += $offset; $this->Execute("set rowcount $cnt"); $rs =& ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,0); ! $this->Execute("set rowcount 0"); return $rs; Index: adodb-odbc_oracle.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/drivers/adodb-odbc_oracle.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-odbc_oracle.inc.php 19 Oct 2004 00:57:10 -0000 1.2 --- adodb-odbc_oracle.inc.php 23 Nov 2004 01:31:09 -0000 1.3 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, *************** *** 39,80 **** function &MetaTables() { ! if ($this->metaTablesSQL) { ! $rs = $this->Execute($this->metaTablesSQL); ! if ($rs === false) return false; ! $arr = $rs->GetArray(); ! $arr2 = array(); ! for ($i=0; $i < sizeof($arr); $i++) { ! $arr2[] = $arr[$i][0]; ! } ! $rs->Close(); ! return $arr2; } ! return false; } function &MetaColumns($table) { - if (!empty($this->metaColumnsSQL)) { ! $rs = $this->Execute(sprintf($this->metaColumnsSQL,strtoupper($table))); ! if ($rs === false) return false; ! ! $retarr = array(); ! while (!$rs->EOF) { //print_r($rs->fields); ! $fld = new ADOFieldObject(); ! $fld->name = $rs->fields[0]; ! $fld->type = $rs->fields[1]; ! $fld->max_length = $rs->fields[2]; ! ! ! if ($ADODB_FETCH_MODE == ADODB_FETCH_NUM) $retarr[] = $fld; ! else $retarr[strtoupper($fld->name)] = $fld; ! ! $rs->MoveNext(); ! } ! $rs->Close(); ! return $retarr; } ! return false; } --- 39,77 ---- function &MetaTables() { ! $false = false; ! $rs = $this->Execute($this->metaTablesSQL); ! if ($rs === false) return $false; ! $arr = $rs->GetArray(); ! $arr2 = array(); ! for ($i=0; $i < sizeof($arr); $i++) { ! $arr2[] = $arr[$i][0]; } ! $rs->Close(); ! return $arr2; } function &MetaColumns($table) { ! $rs = $this->Execute(sprintf($this->metaColumnsSQL,strtoupper($table))); ! if ($rs === false) { ! $false = false; ! return $false; } ! $retarr = array(); ! while (!$rs->EOF) { //print_r($rs->fields); ! $fld = new ADOFieldObject(); ! $fld->name = $rs->fields[0]; ! $fld->type = $rs->fields[1]; ! $fld->max_length = $rs->fields[2]; ! ! ! if ($ADODB_FETCH_MODE == ADODB_FETCH_NUM) $retarr[] = $fld; ! else $retarr[strtoupper($fld->name)] = $fld; ! ! $rs->MoveNext(); ! } ! $rs->Close(); ! return $retarr; } Index: adodb-odbtp.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/drivers/adodb-odbtp.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-odbtp.inc.php 19 Oct 2004 00:57:10 -0000 1.2 --- adodb-odbtp.inc.php 23 Nov 2004 01:31:09 -0000 1.3 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, *************** *** 308,313 **** $ADODB_FETCH_MODE = $savem; ! if (!$rs) return false; ! while (!$rs->EOF) { //print_r($rs->fields); --- 308,315 ---- $ADODB_FETCH_MODE = $savem; ! if (!$rs || $rs->EOF) { ! $false = false; ! return $false; ! } while (!$rs->EOF) { //print_r($rs->fields); *************** *** 364,369 **** $arr[$constr[11]][$constr[2]][] = $constr[7].'='.$constr[3]; } ! if (!$arr) return false; ! $arr2 = array(); --- 366,374 ---- $arr[$constr[11]][$constr[2]][] = $constr[7].'='.$constr[3]; } ! if (!$arr) { ! $false = false; ! return $false; ! } ! $arr2 = array(); Index: adodb-ado.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/drivers/adodb-ado.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-ado.inc.php 19 Oct 2004 00:57:10 -0000 1.2 --- adodb-ado.inc.php 23 Nov 2004 01:31:09 -0000 1.3 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, *************** *** 173,177 **** { $table = strtoupper($table); ! $arr= array(); $dbc = $this->_connectionID; --- 173,177 ---- { $table = strtoupper($table); ! $arr = array(); $dbc = $this->_connectionID; *************** *** 197,202 **** $adors->Close(); } ! ! return $arr; } --- 197,202 ---- $adors->Close(); } ! $false = false; ! return empty($arr) ? $false : $arr; } *************** *** 209,212 **** --- 209,213 ---- $dbc = $this->_connectionID; + $false = false; // return rs *************** *** 231,249 **** $rs = $oCmd->Execute(); $e = $dbc->Errors; ! if ($dbc->Errors->Count > 0) return false; return $rs; } $rs = @$dbc->Execute($sql,$this->_affectedRows, $this->_execute_option); ! /* ! $rs = new COM('ADODB.Recordset'); ! if ($rs) { ! $rs->Open ($sql, $dbc, $this->_cursor_type,$this->_lock_type, $this->_execute_option); ! } ! */ ! if ($dbc->Errors->Count > 0) return false; ! if (! $rs) return false; ! if ($rs->State == 0) return true; // 0 = adStateClosed means no records returned return $rs; } --- 232,248 ---- $rs = $oCmd->Execute(); $e = $dbc->Errors; ! if ($dbc->Errors->Count > 0) return $false; return $rs; } $rs = @$dbc->Execute($sql,$this->_affectedRows, $this->_execute_option); ! ! if ($dbc->Errors->Count > 0) return $false; ! if (! $rs) return $false; ! if ($rs->State == 0) { ! $true = true; ! return $true; // 0 = adStateClosed means no records returned ! } return $rs; } Index: adodb-netezza.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/drivers/adodb-netezza.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-netezza.inc.php 19 Oct 2004 00:57:10 -0000 1.2 --- adodb-netezza.inc.php 23 Nov 2004 01:31:09 -0000 1.3 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jlim#natsoft.com.my). All rights reserved. First cut at the Netezza Driver by Josh Eldridge joshuae74#hotmail.com --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jlim#natsoft.com.my). All rights reserved. First cut at the Netezza Driver by Josh Eldridge joshuae74#hotmail.com Index: adodb-postgres.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/drivers/adodb-postgres.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-postgres.inc.php 19 Oct 2004 00:57:10 -0000 1.2 --- adodb-postgres.inc.php 23 Nov 2004 01:31:09 -0000 1.3 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: adodb-oracle.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/drivers/adodb-oracle.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-oracle.inc.php 19 Oct 2004 00:57:10 -0000 1.2 --- adodb-oracle.inc.php 23 Nov 2004 01:31:09 -0000 1.3 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: adodb-mssql.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/drivers/adodb-mssql.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-mssql.inc.php 19 Oct 2004 00:57:10 -0000 1.2 --- adodb-mssql.inc.php 23 Nov 2004 01:31:09 -0000 1.3 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: adodb-pdo.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/drivers/adodb-pdo.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-pdo.inc.php 19 Oct 2004 00:57:10 -0000 1.2 --- adodb-pdo.inc.php 23 Nov 2004 01:31:09 -0000 1.3 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 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, --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 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, Index: adodb-ado_access.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/drivers/adodb-ado_access.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-ado_access.inc.php 19 Oct 2004 00:57:10 -0000 1.2 --- adodb-ado_access.inc.php 23 Nov 2004 01:31:09 -0000 1.3 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: adodb-fbsql.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/drivers/adodb-fbsql.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-fbsql.inc.php 19 Oct 2004 00:57:10 -0000 1.2 --- adodb-fbsql.inc.php 23 Nov 2004 01:31:09 -0000 1.3 *************** *** 1,5 **** <?php /* ! @version V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /* ! @version V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: adodb-postgres64.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/drivers/adodb-postgres64.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-postgres64.inc.php 19 Oct 2004 00:57:10 -0000 1.2 --- adodb-postgres64.inc.php 23 Nov 2004 01:31:09 -0000 1.3 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, *************** *** 129,138 **** return $arr; } ! /* function IfNull( $field, $ifNull ) { ! return " NULLIF($field, $ifNull) "; // if PGSQL } ! */ // get the last id - never tested function pg_insert_id($tablename,$fieldname) --- 129,138 ---- return $arr; } ! function IfNull( $field, $ifNull ) { ! return " coalesce($field, $ifNull) "; } ! // get the last id - never tested function pg_insert_id($tablename,$fieldname) *************** *** 201,210 **** function &MetaTables($ttype=false,$showSchema=false,$mask=false) ! { if ($mask) { $save = $this->metaTablesSQL; $mask = $this->qstr(strtolower($mask)); ! $this->metaTablesSQL = " ! select tablename,'T' from pg_tables where tablename like $mask union select viewname,'V' from pg_views where viewname like $mask"; } --- 201,224 ---- function &MetaTables($ttype=false,$showSchema=false,$mask=false) ! { ! $info = $this->ServerInfo(); ! if ($info['version'] >= 7.3) { ! $this->metaTablesSQL = "select tablename,'T' from pg_tables where tablename not like 'pg\_%' ! and schemaname not in ( 'pg_catalog','information_schema') ! union ! select viewname,'V' from pg_views where viewname not like 'pg\_%' and schemaname not in ( 'pg_catalog','information_schema') "; ! } if ($mask) { $save = $this->metaTablesSQL; $mask = $this->qstr(strtolower($mask)); ! if ($info['version']>=7.3) ! $this->metaTablesSQL = " ! select tablename,'T' from pg_tables where tablename like $mask and schemaname not in ( 'pg_catalog','information_schema') ! union ! select viewname,'V' from pg_views where viewname like $mask and schemaname not in ( 'pg_catalog','information_schema') "; ! else ! $this->metaTablesSQL = " ! select tablename,'T' from pg_tables where tablename like $mask ! union select viewname,'V' from pg_views where viewname like $mask"; } *************** *** 334,337 **** --- 348,360 ---- } + /* + Hueristic - not guaranteed to work. + */ + function GuessOID($oid) + { + if (strlen($oid)>16) return false; + return is_numeric($oid); + } + /* * If an OID is detected, then we use pg_lo_* to open the oid file and read the *************** *** 342,359 **** * * see http://www.postgresql.org/idocs/index.php?largeobjects.html */ ! function BlobDecode( $blob) ! { ! if (strlen($blob) > 24) return $blob; ! @pg_exec($this->_connectionID,"begin"); $fd = @pg_lo_open($this->_connectionID,$blob,"r"); if ($fd === false) { ! @pg_exec($this->_connectionID,"commit"); return $blob; } ! $realblob = @pg_loreadall($fd); @pg_loclose($fd); ! @pg_exec($this->_connectionID,"commit"); return $realblob; } --- 365,386 ---- * * see http://www.postgresql.org/idocs/index.php?largeobjects.html + * + * Since adodb 4.54, this returns the blob, instead of sending it to stdout. Also + * added maxsize parameter, which defaults to $db->maxblobsize if not defined. */ ! function BlobDecode($blob,$maxsize=false,$hastrans=true) ! { ! if (!$this->GuessOID($blob)) return $blob; ! if ($hastrans) @pg_exec($this->_connectionID,"begin"); $fd = @pg_lo_open($this->_connectionID,$blob,"r"); if ($fd === false) { ! if ($hastrans) @pg_exec($this->_connectionID,"commit"); return $blob; } ! if (!$maxsize) $maxsize = $this->maxblobsize; ! $realblob = @pg_loread($fd,$maxsize); @pg_loclose($fd); ! if ($hastrans) @pg_exec($this->_connectionID,"commit"); return $realblob; } *************** *** 411,416 **** $ADODB_FETCH_MODE = $save; ! if ($rs === false) return false; ! if (!empty($this->metaKeySQL)) { // If we want the primary keys, we have to issue a separate query --- 438,445 ---- $ADODB_FETCH_MODE = $save; ! if ($rs === false) { ! $false = false; ! return $false; ! } if (!empty($this->metaKeySQL)) { // If we want the primary keys, we have to issue a separate query *************** *** 465,469 **** if ($fld->max_length <= 0) $fld->max_length = $rs->fields[3]-4; if ($fld->max_length <= 0) $fld->max_length = -1; ! // dannym // 5 hasdefault; 6 num-of-column --- 494,501 ---- if ($fld->max_length <= 0) $fld->max_length = $rs->fields[3]-4; if ($fld->max_length <= 0) $fld->max_length = -1; ! if ($fld->type == 'numeric') { ! $fld->scale = $fld->max_length & 0xFFFF; ! $fld->max_length >>= 16; ! } // dannym // 5 hasdefault; 6 num-of-column *************** *** 539,543 **** if (!is_object($rs)) { ! return FALSE; } --- 571,576 ---- if (!is_object($rs)) { ! $false = false; ! return $false; } Index: adodb-proxy.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/drivers/adodb-proxy.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-proxy.inc.php 19 Oct 2004 00:57:10 -0000 1.2 --- adodb-proxy.inc.php 23 Nov 2004 01:31:09 -0000 1.3 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: adodb-sqlanywhere.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/drivers/adodb-sqlanywhere.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-sqlanywhere.inc.php 19 Oct 2004 00:57:10 -0000 1.2 --- adodb-sqlanywhere.inc.php 23 Nov 2004 01:31:09 -0000 1.3 *************** *** 1,5 **** <?php /* ! version V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. --- 1,5 ---- <?php /* ! version V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Index: adodb-informix72.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/drivers/adodb-informix72.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-informix72.inc.php 19 Oct 2004 00:57:10 -0000 1.2 --- adodb-informix72.inc.php 23 Nov 2004 01:31:09 -0000 1.3 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim. All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim. All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, *************** *** 343,347 **** function _seek($row) { ! return @ifx_fetch_row($this->_queryID, $row); } --- 343,347 ---- function _seek($row) { ! return @ifx_fetch_row($this->_queryID, (int) $row); } Index: adodb-sqlitepo.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/drivers/adodb-sqlitepo.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-sqlitepo.inc.php 19 Oct 2004 00:57:10 -0000 1.2 --- adodb-sqlitepo.inc.php 23 Nov 2004 01:31:09 -0000 1.3 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: adodb-vfp.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/drivers/adodb-vfp.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-vfp.inc.php 19 Oct 2004 00:57:10 -0000 1.2 --- adodb-vfp.inc.php 23 Nov 2004 01:31:09 -0000 1.3 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: adodb-db2.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/drivers/adodb-db2.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-db2.inc.php 19 Oct 2004 00:57:10 -0000 1.2 --- adodb-db2.inc.php 23 Nov 2004 01:31:09 -0000 1.3 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, *************** *** 146,151 **** $ADODB_FETCH_MODE = $savem; ! if (!$rs) return false; ! $rs->_has_stupid_odbc_fetch_api_change = $this->_has_stupid_odbc_fetch_api_change; --- 146,153 ---- $ADODB_FETCH_MODE = $savem; ! if (!$rs) { ! $false = false; ! return $false; ! } $rs->_has_stupid_odbc_fetch_api_change = $this->_has_stupid_odbc_fetch_api_change; Index: adodb-sapdb.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/drivers/adodb-sapdb.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-sapdb.inc.php 19 Oct 2004 00:57:10 -0000 1.2 --- adodb-sapdb.inc.php 23 Nov 2004 01:31:09 -0000 1.3 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, *************** *** 27,32 **** var $sysDate = 'DATE'; var $sysTimeStamp = 'TIMESTAMP'; ! var $fmtDate = "\\D\\A\\T\\E('Y-m-d')"; /// used by DBDate() as the default date format used by the database ! var $fmtTimeStamp = "\\T\\I\\M\\E\\S\\T\\A\\M\\P('Y-m-d','H:i:s')"; /// used by DBTimeStamp as the default timestamp fmt. var $hasInsertId = true; var $_bindInputArray = true; --- 27,32 ---- var $sysDate = 'DATE'; var $sysTimeStamp = 'TIMESTAMP'; ! var $fmtDate = "'Y-m-d'"; /// used by DBDate() as the default date format used by the database ! var $fmtTimeStamp = "'Y-m-d H:i:s'"; /// used by DBTimeStamp as the default timestamp fmt. var $hasInsertId = true; var $_bindInputArray = true; *************** *** 119,122 **** --- 119,132 ---- } else { $fld->default_value = $column[6]; + switch($fld->type) { + case 'VARCHAR': + case 'CHARACTER': + case 'LONG': + $fld->default_value = $column[6]; + break; + default: + $fld->default_value = trim($column[6]); + break; + } } } Index: adodb-odbc.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/drivers/adodb-odbc.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-odbc.inc.php 19 Oct 2004 00:57:10 -0000 1.2 --- adodb-odbc.inc.php 23 Nov 2004 01:31:09 -0000 1.3 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 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, --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 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, *************** *** 276,281 **** $ADODB_FETCH_MODE = $savem; ! if (!$rs) return false; ! $rs->_has_stupid_odbc_fetch_api_change = $this->_has_stupid_odbc_fetch_api_change; --- 276,283 ---- $ADODB_FETCH_MODE = $savem; ! if (!$rs) { ! $false = false; ! return $false; ! } $rs->_has_stupid_odbc_fetch_api_change = $this->_has_stupid_odbc_fetch_api_change; *************** *** 373,376 **** --- 375,379 ---- global $ADODB_FETCH_MODE; + $false = false; if ($this->uCaseTables) $table = strtoupper($table); $schema = ''; *************** *** 418,430 **** break; } ! if (empty($qid)) return false; ! $rs = new ADORecordSet_odbc($qid); $ADODB_FETCH_MODE = $savem; ! if (!$rs) return false; ! $rs->_has_stupid_odbc_fetch_api_change = $this->_has_stupid_odbc_fetch_api_change; $rs->_fetch(); $retarr = array(); --- 421,433 ---- break; } ! if (empty($qid)) return $false; ! $rs =& new ADORecordSet_odbc($qid); $ADODB_FETCH_MODE = $savem; ! if (!$rs) return $false; $rs->_has_stupid_odbc_fetch_api_change = $this->_has_stupid_odbc_fetch_api_change; $rs->_fetch(); + $retarr = array(); *************** *** 445,450 **** */ while (!$rs->EOF) { ! //adodb_pr($rs->fields); ! if (strtoupper($rs->fields[2]) == $table && (!$schema || strtoupper($rs->fields[1]) == $schema)) { $fld = new ADOFieldObject(); $fld->name = $rs->fields[3]; --- 448,453 ---- */ while (!$rs->EOF) { ! // adodb_pr($rs->fields); ! if (strtoupper(trim($rs->fields[2])) == $table && (!$schema || strtoupper($rs->fields[1]) == $schema)) { $fld = new ADOFieldObject(); $fld->name = $rs->fields[3]; *************** *** 471,475 **** $rs->Close(); //-- crashes 4.03pl1 -- why? ! return $retarr; } --- 474,478 ---- $rs->Close(); //-- crashes 4.03pl1 -- why? ! return empty($retarr) ? $false : $retarr; } Index: adodb-sqlite.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/drivers/adodb-sqlite.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-sqlite.inc.php 19 Oct 2004 00:57:10 -0000 1.2 --- adodb-sqlite.inc.php 23 Nov 2004 01:31:09 -0000 1.3 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, *************** *** 110,114 **** $rs = $this->Execute("select * from $tab limit 1"); ! if (!$rs) return false; $arr = array(); for ($i=0,$max=$rs->_numOfFields; $i < $max; $i++) { --- 110,117 ---- $rs = $this->Execute("select * from $tab limit 1"); ! if (!$rs) { ! $false = false; ! return $false; ! } $arr = array(); for ($i=0,$max=$rs->_numOfFields; $i < $max; $i++) { *************** *** 256,259 **** --- 259,263 ---- default: $this->fetchMode = SQLITE_BOTH; break; } + $this->adodbFetchMode = $mode; $this->_queryID = $queryID; Index: adodb-csv.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/drivers/adodb-csv.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-csv.inc.php 19 Oct 2004 00:57:10 -0000 1.2 --- adodb-csv.inc.php 23 Nov 2004 01:31:09 -0000 1.3 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: adodb-access.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/drivers/adodb-access.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-access.inc.php 19 Oct 2004 00:57:10 -0000 1.2 --- adodb-access.inc.php 23 Nov 2004 01:31:09 -0000 1.3 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: adodb-ado5.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/drivers/adodb-ado5.inc.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** adodb-ado5.inc.php 19 Oct 2004 00:57:10 -0000 1.1 --- adodb-ado5.inc.php 23 Nov 2004 01:31:09 -0000 1.2 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, *************** *** 242,247 **** $rs = @$dbc->Execute($sql,$this->_affectedRows, $this->_execute_option); ! ! if ($dbc->Errors->Count > 0) return false; if (! $rs) return false; --- 242,246 ---- $rs = @$dbc->Execute($sql,$this->_affectedRows, $this->_execute_option); ! if ($dbc->Errors->Count > 0) return false; if (! $rs) return false; Index: adodb-oci8.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/drivers/adodb-oci8.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-oci8.inc.php 19 Oct 2004 00:57:10 -0000 1.2 --- adodb-oci8.inc.php 23 Nov 2004 01:31:09 -0000 1.3 *************** *** 2,6 **** /* ! version V4.53 14 Sept 2004 (c) 2000-2004 John Lim. All rights reserved. Released under both BSD license and Lesser GPL library license. --- 2,6 ---- /* ! version V4.54 5 Nov 2004 (c) 2000-2004 John Lim. All rights reserved. Released under both BSD license and Lesser GPL library license. *************** *** 108,112 **** if (isset($savem)) $this->SetFetchMode($savem); $ADODB_FETCH_MODE = $save; ! if (!$rs) return false; $retarr = array(); while (!$rs->EOF) { //print_r($rs->fields); --- 108,115 ---- if (isset($savem)) $this->SetFetchMode($savem); $ADODB_FETCH_MODE = $save; ! if (!$rs) { ! $false = false; ! return $false; ! } $retarr = array(); while (!$rs->EOF) { //print_r($rs->fields); *************** *** 204,213 **** //if ($argHostname) print "<p>Connect: 1st argument should be left blank for $this->databaseType</p>"; if ($mode==1) { ! $this->_connectionID = OCIPLogon($argUsername,$argPassword, $argDatabasename); if ($this->_connectionID && $this->autoRollback) OCIrollback($this->_connectionID); } else if ($mode==2) { ! $this->_connectionID = OCINLogon($argUsername,$argPassword, $argDatabasename); } else { ! $this->_connectionID = OCILogon($argUsername,$argPassword, $argDatabasename); } if ($this->_connectionID === false) return false; --- 207,227 ---- //if ($argHostname) print "<p>Connect: 1st argument should be left blank for $this->databaseType</p>"; if ($mode==1) { ! $this->_connectionID = ($this->charSet) ? ! OCIPLogon($argUsername,$argPassword, $argDatabasename) ! : ! OCIPLogon($argUsername,$argPassword, $argDatabasename, $this->charSet) ! ; if ($this->_connectionID && $this->autoRollback) OCIrollback($this->_connectionID); } else if ($mode==2) { ! $this->_connectionID = ($this->charSet) ? ! OCINLogon($argUsername,$argPassword, $argDatabasename) ! : ! OCINLogon($argUsername,$argPassword, $argDatabasename, $this->charSet); ! } else { ! $this->_connectionID = ($this->charSet) ? ! OCILogon($argUsername,$argPassword, $argDatabasename) ! : ! OCILogon($argUsername,$argPassword, $argDatabasename,$this->charSet); } if ($this->_connectionID === false) return false; *************** *** 474,481 **** // Let Oracle return the name of the columns ! $q_fields = "SELECT * FROM (".$sql.") WHERE NULL = NULL"; ! if (!$stmt = OCIParse($this->_connectionID, $q_fields)) { ! return false; ! } if (is_array($inputarr)) { --- 488,498 ---- // Let Oracle return the name of the columns ! $q_fields = "SELECT * FROM (".$sql.") WHERE NULL = NULL"; ! ! $false = false; ! if (! $stmt_arr = $this->Prepare($q_fields)) { ! return $false; ! } ! $stmt = $stmt_arr[1]; if (is_array($inputarr)) { *************** *** 500,504 **** if (!OCIExecute($stmt, OCI_DEFAULT)) { OCIFreeStatement($stmt); ! return false; } --- 517,521 ---- if (!OCIExecute($stmt, OCI_DEFAULT)) { OCIFreeStatement($stmt); ! return $false; } *************** *** 634,639 **** if ($sttype == 'BEGIN' || $sttype == 'DECLARE') { return array($sql,$stmt,0,$BINDNUM, ($cursor) ? OCINewCursor($this->_connectionID) : false); ! } ! return array($sql,$stmt,0,$BINDNUM); } --- 651,655 ---- if ($sttype == 'BEGIN' || $sttype == 'DECLARE') { return array($sql,$stmt,0,$BINDNUM, ($cursor) ? OCINewCursor($this->_connectionID) : false); ! } return array($sql,$stmt,0,$BINDNUM); } *************** *** 793,797 **** 4. $db->prepare('insert into table (a,b,c) values (:0,:1,:2)'); ! $db->$bind($stmt,1); $db->bind($stmt,2); $db->bind($stmt,3); $db->execute($stmt); */ --- 809,813 ---- 4. $db->prepare('insert into table (a,b,c) values (:0,:1,:2)'); ! $db->bind($stmt,1); $db->bind($stmt,2); $db->bind($stmt,3); $db->execute($stmt); */ *************** *** 1218,1222 **** { if ($this->connection->_stmt === $this->_queryID) $this->connection->_stmt = false; ! OCIFreeStatement($this->_queryID); $this->_queryID = false; --- 1234,1238 ---- { if ($this->connection->_stmt === $this->_queryID) $this->connection->_stmt = false; ! @OCIFreeStatement($this->_queryID); $this->_queryID = false; Index: adodb-ibase.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/drivers/adodb-ibase.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-ibase.inc.php 19 Oct 2004 00:57:10 -0000 1.2 --- adodb-ibase.inc.php 23 Nov 2004 01:31:09 -0000 1.3 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, *************** *** 476,534 **** global $ADODB_FETCH_MODE; ! if ($this->metaColumnsSQL) { ! ! $save = $ADODB_FETCH_MODE; ! $ADODB_FETCH_MODE = ADODB_FETCH_NUM; ! ! $rs = $this->Execute(sprintf($this->metaColumnsSQL,strtoupper($table))); ! $ADODB_FETCH_MODE = $save; ! if ($rs === false) return false; ! ! $retarr = array(); //OPN STUFF start ! $dialect3 = ($this->dialect==3 ? true : false); ! //OPN STUFF end ! while (!$rs->EOF) { //print_r($rs->fields); ! $fld = new ADOFieldObject(); ! $fld->name = trim($rs->fields[0]); ! //OPN STUFF start ! $this->_ConvertFieldType($fld, $rs->fields[7], $rs->fields[3], $rs->fields[4], $rs->fields[5], $rs->fields[6], $dialect3); ! if (isset($rs->fields[1]) && $rs->fields[1]) { ! $fld->not_null = true; ! } ! if (isset($rs->fields[2])) { ! ! $fld->has_default = true; ! $d = substr($rs->fields[2],strlen('default ')); ! switch ($fld->type) ! { ! case 'smallint': ! case 'integer': $fld->default_value = (int) $d; break; ! case 'char': ! case 'blob': ! case 'text': ! case 'varchar': $fld->default_value = (string) substr($d,1,strlen($d)-2); break; ! case 'double': ! case 'float': $fld->default_value = (float) $d; break; ! default: $fld->default_value = $d; break; ! } ! // case 35:$tt = 'TIMESTAMP'; break; ! } ! if ((isset($rs->fields[5])) && ($fld->type == 'blob')) { ! $fld->sub_type = $rs->fields[5]; ! } else { ! $fld->sub_type = null; ! } ! //OPN STUFF end ! if ($ADODB_FETCH_MODE == ADODB_FETCH_NUM) $retarr[] = $fld; ! else $retarr[strtoupper($fld->name)] = $fld; ! $rs->MoveNext(); } ! $rs->Close(); ! return $retarr; } ! return false; } --- 476,533 ---- global $ADODB_FETCH_MODE; ! $save = $ADODB_FETCH_MODE; ! $ADODB_FETCH_MODE = ADODB_FETCH_NUM; ! ! $rs = $this->Execute(sprintf($this->metaColumnsSQL,strtoupper($table))); ! ! $ADODB_FETCH_MODE = $save; ! if ($rs === false) { ! $false = false; ! return $false; ! } ! $retarr = array(); ! //OPN STUFF start ! $dialect3 = ($this->dialect==3 ? true : false); ! //OPN STUFF end ! while (!$rs->EOF) { //print_r($rs->fields); ! $fld = new ADOFieldObject(); ! $fld->name = trim($rs->fields[0]); //OPN STUFF start ! $this->_ConvertFieldType($fld, $rs->fields[7], $rs->fields[3], $rs->fields[4], $rs->fields[5], $rs->fields[6], $dialect3); ! if (isset($rs->fields[1]) && $rs->fields[1]) { ! $fld->not_null = true; ! } ! if (isset($rs->fields[2])) { ! $fld->has_default = true; ! $d = substr($rs->fields[2],strlen('default ')); ! switch ($fld->type) ! { ! case 'smallint': ! case 'integer': $fld->default_value = (int) $d; break; ! case 'char': ! case 'blob': ! case 'text': ! case 'varchar': $fld->default_value = (string) substr($d,1,strlen($d)-2); break; ! case 'double': ! case 'float': $fld->default_value = (float) $d; break; ! default: $fld->default_value = $d; break; ! } ! // case 35:$tt = 'TIMESTAMP'; break; } ! if ((isset($rs->fields[5])) && ($fld->type == 'blob')) { ! $fld->sub_type = $rs->fields[5]; ! } else { ! $fld->sub_type = null; ! } ! //OPN STUFF end ! if ($ADODB_FETCH_MODE == ADODB_FETCH_NUM) $retarr[] = $fld; ! else $retarr[strtoupper($fld->name)] = $fld; ! ! $rs->MoveNext(); } ! $rs->Close(); ! return empty($retarr) ? false : $retarr; } Index: adodb-mysqli.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/drivers/adodb-mysqli.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-mysqli.inc.php 19 Oct 2004 00:57:10 -0000 1.2 --- adodb-mysqli.inc.php 23 Nov 2004 01:31:09 -0000 1.3 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, *************** *** 180,184 **** function _insertid() { - // $this->_connectionID = $this->mysqli_resolve_link($this->_connectionID); $result = @mysqli_insert_id($this->_connectionID); if ($result == -1){ --- 180,183 ---- *************** *** 191,195 **** function _affectedrows() { - // $this->_connectionID = $this->mysqli_resolve_link($this->_connectionID); $result = @mysqli_affected_rows($this->_connectionID); if ($result == -1) { --- 190,193 ---- *************** *** 239,298 **** function &MetaDatabases() ! { ! $query = "SHOW DATABASES"; ! $ret =& $this->Execute($query); return $ret; ! } function &MetaIndexes ($table, $primary = FALSE) { ! // save old fetch mode ! global $ADODB_FETCH_MODE; ! ! $save = $ADODB_FETCH_MODE; ! $ADODB_FETCH_MODE = ADODB_FETCH_NUM; ! if ($this->fetchMode !== FALSE) { ! $savem = $this->SetFetchMode(FALSE); ! } ! ! // get index details ! $rs = $this->Execute(sprintf('SHOW INDEXES FROM %s',$table)); ! ! // restore fetchmode ! if (isset($savem)) { ! $this->SetFetchMode($savem); ! } ! $ADODB_FETCH_MODE = $save; ! ! if (!is_object($rs)) { ! return FALSE; ! } ! ! $indexes = array (); ! ! // parse index data into array ! while ($row = $rs->FetchRow()) { ! if ($primary == FALSE AND $row[2] == 'PRIMARY') { ! continue; ! } ! ! if (!isset($indexes[$row[2]])) { ! $indexes[$row[2]] = array( ! 'unique' => ($row[1] == 0), ! 'columns' => array() ! ); ! } ! ! $indexes[$row[2]]['columns'][$row[3] - 1] = $row[4]; ! } ! ! // sort columns by order in the index ! foreach ( array_keys ($indexes) as $index ) ! { ! ksort ($indexes[$index]['columns']); ! } ! ! return $indexes; } --- 237,296 ---- function &MetaDatabases() ! { ! $query = "SHOW DATABASES"; ! $ret =& $this->Execute($query); return $ret; ! } function &MetaIndexes ($table, $primary = FALSE) { ! // save old fetch mode ! global $ADODB_FETCH_MODE; ! ! $save = $ADODB_FETCH_MODE; ! $ADODB_FETCH_MODE = ADODB_FETCH_NUM; ! if ($this->fetchMode !== FALSE) { ! $savem = $this->SetFetchMode(FALSE); ! } ! ! // get index details ! $rs = $this->Execute(sprintf('SHOW INDEXES FROM %s',$table)); ! ! // restore fetchmode ! if (isset($savem)) { ! $this->SetFetchMode($savem); ! } ! $ADODB_FETCH_MODE = $save; ! ! if (!is_object($rs)) { ! return FALSE; ! } ! ! $indexes = array (); ! ! // parse index data into array ! while ($row = $rs->FetchRow()) { ! if ($primary == FALSE AND $row[2] == 'PRIMARY') { ! continue; ! } ! ! if (!isset($indexes[$row[2]])) { ! $indexes[$row[2]] = array( ! 'unique' => ($row[1] == 0), ! 'columns' => array() ! ); ! } ! ! $indexes[$row[2]]['columns'][$row[3] - 1] = $row[4]; ! } ! ! // sort columns by order in the index ! foreach ( array_keys ($indexes) as $index ) ! { ! ksort ($indexes[$index]['columns']); ! } ! ! return $indexes; } Index: adodb-postgres7.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/drivers/adodb-postgres7.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-postgres7.inc.php 19 Oct 2004 00:57:10 -0000 1.2 --- adodb-postgres7.inc.php 23 Nov 2004 01:31:09 -0000 1.3 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: adodb-mysql.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/drivers/adodb-mysql.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-mysql.inc.php 19 Oct 2004 00:57:10 -0000 1.2 --- adodb-mysql.inc.php 23 Nov 2004 01:31:09 -0000 1.3 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, *************** *** 80,83 **** --- 80,84 ---- global $ADODB_FETCH_MODE; + $false = false; $save = $ADODB_FETCH_MODE; $ADODB_FETCH_MODE = ADODB_FETCH_NUM; *************** *** 96,100 **** if (!is_object($rs)) { ! return FALSE; } --- 97,101 ---- if (!is_object($rs)) { ! return $false; } *************** *** 369,420 **** function &MetaColumns($table) { - if (!$this->metaColumnsSQL) - return false; global $ADODB_FETCH_MODE; ! $save = $ADODB_FETCH_MODE; ! $ADODB_FETCH_MODE = ADODB_FETCH_NUM; ! if ($this->fetchMode !== false) ! $savem = $this->SetFetchMode(false); ! $rs = $this->Execute(sprintf($this->metaColumnsSQL,$table)); ! if (isset($savem)) $this->SetFetchMode($savem); ! $ADODB_FETCH_MODE = $save; ! if (!is_object($rs)) ! return false; ! $retarr = array(); ! while (!$rs->EOF){ ! $fld = new ADOFieldObject(); ! $fld->name = $rs->fields[0]; ! $type = $rs->fields[1]; ! ! // split type into type(length): ! $fld->scale = null; if (preg_match("/^(.+)\((\d+),(\d+)/", $type, $query_array)) { ! $fld->type = $query_array[1]; ! $fld->max_length = is_numeric($query_array[2]) ? $query_array[2] : -1; ! $fld->scale = is_numeric($query_array[3]) ? $query_array[3] : -1; ! } elseif (preg_match("/^(.+)\((\d+)/", $type, $query_array)) { ! $fld->type = $query_array[1]; ! $fld->max_length = is_numeric($query_array[2]) ? $query_array[2] : -1; ! } else { $fld->type = $type; ! $fld->max_length = -1; ! } ! $fld->not_null = ($rs->fields[2] != 'YES'); ! $fld->primary_key = ($rs->fields[3] == 'PRI'); ! $fld->auto_increment = (strpos($rs->fields[5], 'auto_increment') !== false); $fld->binary = (strpos($type,'blob') !== false); $fld->unsigned = (strpos($type,'unsigned') !== false); ! if (!$fld->binary) { ! $d = $rs->fields[4]; if ($d != '' && $d != 'NULL') { ! $fld->has_default = true; ! $fld->default_value = $d; ! } else { ! $fld->has_default = false; ! } } if ($save == ADODB_FETCH_NUM) { --- 370,420 ---- function &MetaColumns($table) { global $ADODB_FETCH_MODE; ! $save = $ADODB_FETCH_MODE; ! $ADODB_FETCH_MODE = ADODB_FETCH_NUM; ! if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false); ! $rs = $this->Execute(sprintf($this->metaColumnsSQL,$table)); ! if (isset($savem)) $this->SetFetchMode($savem); ! $ADODB_FETCH_MODE = $save; ! if (!is_object($rs)) { ! $false = false; ! return $false; ! } ! $retarr = array(); ! while (!$rs->EOF){ ! $fld = new ADOFieldObject(); ! $fld->name = $rs->fields[0]; ! $type = $rs->fields[1]; ! ! // split type into type(length): ! $fld->scale = null; if (preg_match("/^(.+)\((\d+),(\d+)/", $type, $query_array)) { ! $fld->type = $query_array[1]; ! $fld->max_length = is_numeric($query_array[2]) ? $query_array[2] : -1; ! $fld->scale = is_numeric($query_array[3]) ? $query_array[3] : -1; ! } elseif (preg_match("/^(.+)\((\d+)/", $type, $query_array)) { ! $fld->type = $query_array[1]; ! $fld->max_length = is_numeric($query_array[2]) ? $query_array[2] : -1; ! } else { $fld->type = $type; ! $fld->max_length = -1; ! } ! $fld->not_null = ($rs->fields[2] != 'YES'); ! $fld->primary_key = ($rs->fields[3] == 'PRI'); ! $fld->auto_increment = (strpos($rs->fields[5], 'auto_increment') !== false); $fld->binary = (strpos($type,'blob') !== false); $fld->unsigned = (strpos($type,'unsigned') !== false); ! if (!$fld->binary) { ! $d = $rs->fields[4]; if ($d != '' && $d != 'NULL') { ! $fld->has_default = true; ! $fld->default_value = $d; ! } else { ! $fld->has_default = false; } + } if ($save == ADODB_FETCH_NUM) { Index: adodb-informix.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/drivers/adodb-informix.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-informix.inc.php 19 Oct 2004 00:57:10 -0000 1.2 --- adodb-informix.inc.php 23 Nov 2004 01:31:09 -0000 1.3 *************** *** 1,5 **** <?php /** ! * @version V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. * Released under both BSD license and Lesser GPL library license. * Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /** ! * @version V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. * Released under both BSD license and Lesser GPL library license. * Whenever there is any discrepancy between the two licenses, Index: adodb-borland_ibase.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/drivers/adodb-borland_ibase.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-borland_ibase.inc.php 19 Oct 2004 00:57:10 -0000 1.2 --- adodb-borland_ibase.inc.php 23 Nov 2004 01:31:09 -0000 1.3 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: adodb-oci8po.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/drivers/adodb-oci8po.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-oci8po.inc.php 19 Oct 2004 00:57:10 -0000 1.2 --- adodb-oci8po.inc.php 23 Nov 2004 01:31:09 -0000 1.3 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim. All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim. All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: adodb-ldap.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/drivers/adodb-ldap.inc.php,v retrieving revision 1.2 retrieving revisi... [truncated message content] |
From: Matt M. <pro...@us...> - 2004-11-23 01:31:23
|
Update of /cvsroot/webschool/webschool/lib/adodb/session/old In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19610/lib/adodb/session/old Modified Files: adodb-cryptsession.php adodb-session-clob.php adodb-session.php Log Message: ADODB Updated Index: adodb-session.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/session/old/adodb-session.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-session.php 19 Oct 2004 00:57:12 -0000 1.2 --- adodb-session.php 23 Nov 2004 01:31:10 -0000 1.3 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: adodb-cryptsession.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/session/old/adodb-cryptsession.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-cryptsession.php 19 Oct 2004 00:57:11 -0000 1.2 --- adodb-cryptsession.php 23 Nov 2004 01:31:09 -0000 1.3 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: adodb-session-clob.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/session/old/adodb-session-clob.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-session-clob.php 19 Oct 2004 00:57:12 -0000 1.2 --- adodb-session-clob.php 23 Nov 2004 01:31:10 -0000 1.3 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, |
From: Matt M. <pro...@us...> - 2004-11-23 01:31:23
|
Update of /cvsroot/webschool/webschool/lib/adodb/datadict In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19610/lib/adodb/datadict Modified Files: datadict-access.inc.php datadict-db2.inc.php datadict-firebird.inc.php datadict-generic.inc.php datadict-ibase.inc.php datadict-informix.inc.php datadict-mssql.inc.php datadict-mysql.inc.php datadict-oci8.inc.php datadict-postgres.inc.php datadict-sybase.inc.php Log Message: ADODB Updated Index: datadict-oci8.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/datadict/datadict-oci8.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** datadict-oci8.inc.php 19 Oct 2004 00:57:09 -0000 1.2 --- datadict-oci8.inc.php 23 Nov 2004 01:31:08 -0000 1.3 *************** *** 2,6 **** /** ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 2,6 ---- /** ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: datadict-ibase.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/datadict/datadict-ibase.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** datadict-ibase.inc.php 19 Oct 2004 00:57:09 -0000 1.2 --- datadict-ibase.inc.php 23 Nov 2004 01:31:08 -0000 1.3 *************** *** 2,6 **** /** ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 2,6 ---- /** ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: datadict-db2.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/datadict/datadict-db2.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** datadict-db2.inc.php 19 Oct 2004 00:57:09 -0000 1.2 --- datadict-db2.inc.php 23 Nov 2004 01:31:08 -0000 1.3 *************** *** 2,6 **** /** ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 2,6 ---- /** ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: datadict-access.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/datadict/datadict-access.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** datadict-access.inc.php 19 Oct 2004 00:57:09 -0000 1.2 --- datadict-access.inc.php 23 Nov 2004 01:31:08 -0000 1.3 *************** *** 2,6 **** /** ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 2,6 ---- /** ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: datadict-mysql.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/datadict/datadict-mysql.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** datadict-mysql.inc.php 19 Oct 2004 00:57:09 -0000 1.2 --- datadict-mysql.inc.php 23 Nov 2004 01:31:08 -0000 1.3 *************** *** 2,6 **** /** ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 2,6 ---- /** ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, *************** *** 30,33 **** --- 30,34 ---- $len = $fieldobj->max_length; } + $is_serial = is_object($fieldobj) && $fieldobj->primary_key && $fieldobj->auto_increment; $len = -1; // mysql max_length is not accurate *************** *** 67,75 **** case 'INT': ! case 'INTEGER': return (!empty($fieldobj->primary_key)) ? 'R' : 'I'; ! case 'TINYINT': return (!empty($fieldobj->primary_key)) ? 'R' : 'I1'; ! case 'SMALLINT': return (!empty($fieldobj->primary_key)) ? 'R' : 'I2'; ! case 'MEDIUMINT': return (!empty($fieldobj->primary_key)) ? 'R' : 'I4'; ! case 'BIGINT': return (!empty($fieldobj->primary_key)) ? 'R' : 'I8'; default: return 'N'; } --- 68,76 ---- case 'INT': ! case 'INTEGER': return $is_serial ? 'R' : 'I'; ! case 'TINYINT': return $is_serial ? 'R' : 'I1'; ! case 'SMALLINT': return $is_serial ? 'R' : 'I2'; ! case 'MEDIUMINT': return $is_serial ? 'R' : 'I4'; ! case 'BIGINT': return $is_serial ? 'R' : 'I8'; default: return 'N'; } Index: datadict-mssql.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/datadict/datadict-mssql.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** datadict-mssql.inc.php 19 Oct 2004 00:57:09 -0000 1.2 --- datadict-mssql.inc.php 23 Nov 2004 01:31:08 -0000 1.3 *************** *** 2,6 **** /** ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 2,6 ---- /** ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: datadict-firebird.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/datadict/datadict-firebird.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** datadict-firebird.inc.php 19 Oct 2004 00:57:09 -0000 1.2 --- datadict-firebird.inc.php 23 Nov 2004 01:31:08 -0000 1.3 *************** *** 2,6 **** /** ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 2,6 ---- /** ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: datadict-informix.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/datadict/datadict-informix.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** datadict-informix.inc.php 19 Oct 2004 00:57:09 -0000 1.2 --- datadict-informix.inc.php 23 Nov 2004 01:31:08 -0000 1.3 *************** *** 2,6 **** /** ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 2,6 ---- /** ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: datadict-generic.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/datadict/datadict-generic.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** datadict-generic.inc.php 19 Oct 2004 00:57:09 -0000 1.2 --- datadict-generic.inc.php 23 Nov 2004 01:31:08 -0000 1.3 *************** *** 2,6 **** /** ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 2,6 ---- /** ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: datadict-sybase.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/datadict/datadict-sybase.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** datadict-sybase.inc.php 19 Oct 2004 00:57:09 -0000 1.2 --- datadict-sybase.inc.php 23 Nov 2004 01:31:08 -0000 1.3 *************** *** 2,6 **** /** ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 2,6 ---- /** ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: datadict-postgres.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/datadict/datadict-postgres.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** datadict-postgres.inc.php 19 Oct 2004 00:57:09 -0000 1.2 --- datadict-postgres.inc.php 23 Nov 2004 01:31:08 -0000 1.3 *************** *** 2,6 **** /** ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 2,6 ---- /** ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, *************** *** 30,33 **** --- 30,36 ---- $len = $fieldobj->max_length; } + $is_serial = is_object($fieldobj) && $fieldobj->primary_key && $fieldobj->unique && + $fieldobj->has_default && substr($fieldobj->default_value,0,8) == 'nextval('; + switch (strtoupper($t)) { case 'INTERVAL': *************** *** 62,71 **** return 'T'; ! case 'INTEGER': return (empty($fieldobj->primary_key) && empty($fieldobj->unique))? 'I' : 'R'; case 'SMALLINT': ! case 'INT2': return (empty($fieldobj->primary_key) && empty($fieldobj->unique))? 'I2' : 'R'; ! case 'INT4': return (empty($fieldobj->primary_key) && empty($fieldobj->unique))? 'I4' : 'R'; case 'BIGINT': ! case 'INT8': return (empty($fieldobj->primary_key) && empty($fieldobj->unique))? 'I8' : 'R'; case 'OID': --- 65,74 ---- return 'T'; ! case 'INTEGER': return !$is_serial ? 'I' : 'R'; case 'SMALLINT': ! case 'INT2': return !$is_serial ? 'I2' : 'R'; ! case 'INT4': return !$is_serial ? 'I4' : 'R'; case 'BIGINT': ! case 'INT8': return !$is_serial ? 'I8' : 'R'; case 'OID': *************** *** 114,117 **** --- 117,154 ---- /** + * Adding a new Column + * + * reimplementation of the default function as postgres does NOT allow to set the default in the same statement + * + * @param string $tabname table-name + * @param string $flds column-names and types for the changed columns + * @return array with SQL strings + */ + function AddColumnSQL($tabname, $flds) + { + $tabname = $this->TableName ($tabname); + $sql = array(); + list($lines,$pkey) = $this->_GenFields($flds); + $alter = 'ALTER TABLE ' . $tabname . $this->addCol . ' '; + foreach($lines as $v) { + if (($not_null = preg_match('/NOT NULL/i',$v))) { + $v = preg_replace('/NOT NULL/i','',$v); + } + if (preg_match('/^([^ ]+) .*(DEFAULT [^ ]+)/',$v,$matches)) { + list(,$colname,$default) = $matches; + $sql[] = $alter . str_replace($default,'',$v); + $sql[] = 'ALTER TABLE '.$tabname.' ALTER COLUMN '.$colname.' SET ' . $default; + } else { + $sql[] = $alter . $v; + } + if ($not_null) { + list($colname) = explode(' ',$v); + $sql[] = 'ALTER TABLE '.$tabname.' ALTER COLUMN '.$colname.' SET NOT NULL'; + } + } + return $sql; + } + + /** * Change the definition of one column * *************** *** 165,170 **** * @param string $tabname table-name * @param string $dropflds column-names to drop ! * @param string $tableflds complete defintion of the new table, eg. for postgres, default '' ! * @param array/ $tableoptions options for the new table see CreateTableSQL, default '' * @return array with SQL strings */ --- 202,207 ---- * @param string $tabname table-name * @param string $dropflds column-names to drop ! * @param string $tableflds complete defintion of the new table, eg. for postgres ! * @param array/string $tableoptions options for the new table see CreateTableSQL, default '' * @return array with SQL strings */ *************** *** 175,179 **** foreach($this->MetaColumns($tabname) as $fld) { if (!$dropflds || !in_array($fld->name,$dropflds)) { ! $copyflds[] = $fld->name; // identify the sequence name and the fld its on if ($fld->primary_key && $fld->has_default && --- 212,222 ---- foreach($this->MetaColumns($tabname) as $fld) { if (!$dropflds || !in_array($fld->name,$dropflds)) { ! // we need to explicit convert varchar to a number to be able to do an AlterColumn of a char column to a nummeric one ! if (preg_match('/'.$fld->name.' (I|I2|I4|I8|N|F)/i',$tableflds,$matches) && ! in_array($fld->type,array('varchar','char','text','bytea'))) { ! $copyflds[] = "to_number($fld->name,'S99D99')"; ! } else { ! $copyflds[] = $fld->name; ! } // identify the sequence name and the fld its on if ($fld->primary_key && $fld->has_default && *************** *** 193,196 **** --- 236,240 ---- $aSql[] = "INSERT INTO $tabname SELECT $copyflds FROM $tempname"; if ($seq_name && $seq_fld) { // if we have a sequence we need to set it again + $seq_name = $tabname.'_'.$seq_fld.'_seq'; // has to be the name of the new implicit sequence $aSql[] = "SELECT setval('$seq_name',MAX($seq_fld)) FROM $tabname"; } |
From: Matt M. <pro...@us...> - 2004-11-23 01:31:23
|
Update of /cvsroot/webschool/webschool/lib/adodb/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19610/lib/adodb/tests Modified Files: benchmark.php test-datadict.php test-php5.php test.php test3.php test4.php test5.php testcache.php testdatabases.inc.php testoci8.php testoci8cursor.php testpaging.php testpear.php testsessions.php Log Message: ADODB Updated Index: testoci8cursor.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/tests/testoci8cursor.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** testoci8cursor.php 19 Oct 2004 00:57:13 -0000 1.3 --- testoci8cursor.php 23 Nov 2004 01:31:10 -0000 1.4 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: testsessions.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/tests/testsessions.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** testsessions.php 19 Oct 2004 00:57:13 -0000 1.3 --- testsessions.php 23 Nov 2004 01:31:10 -0000 1.4 *************** *** 2,6 **** /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 2,6 ---- /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: test-datadict.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/tests/test-datadict.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** test-datadict.php 19 Oct 2004 00:57:12 -0000 1.3 --- test-datadict.php 23 Nov 2004 01:31:10 -0000 1.4 *************** *** 2,6 **** /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 2,6 ---- /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: testpear.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/tests/testpear.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** testpear.php 19 Oct 2004 00:57:13 -0000 1.3 --- testpear.php 23 Nov 2004 01:31:10 -0000 1.4 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: test4.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/tests/test4.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** test4.php 19 Oct 2004 00:57:13 -0000 1.3 --- test4.php 23 Nov 2004 01:31:10 -0000 1.4 *************** *** 83,90 **** $sql = " SELECT * ! FROM ADOXYZ WHERE lastname=".$conn->qstr($record['lastname']). " ORDER BY 1"; // Select a record to update ! $rs = $conn->Execute($sql); // Execute the query and get the existing record to update if (!$rs || $rs->EOF) print "<p><b>No record found!</b></p>"; --- 83,91 ---- $sql = " 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 if (!$rs || $rs->EOF) print "<p><b>No record found!</b></p>"; *************** *** 103,108 **** $updateSQL = $conn->GetUpdateSQL($rs, $record); ! ! $conn->Execute($updateSQL); // Update the record in the database if ($conn->Affected_Rows() != 1)print "<p><b>Error1 </b>: Rows Affected=".$conn->Affected_Rows().", should be 1</p>"; --- 104,108 ---- $updateSQL = $conn->GetUpdateSQL($rs, $record); ! $conn->Execute($updateSQL,$varr); // Update the record in the database if ($conn->Affected_Rows() != 1)print "<p><b>Error1 </b>: Rows Affected=".$conn->Affected_Rows().", should be 1</p>"; *************** *** 112,116 **** $record['num'] = 331; $updateSQL = $conn->GetUpdateSQL($rs, $record); ! $conn->Execute($updateSQL); // Update the record in the database if ($conn->Affected_Rows() != 1)print "<p><b>Error 2</b>: Rows Affected=".$conn->Affected_Rows().", should be 1</p>"; --- 112,116 ---- $record['num'] = 331; $updateSQL = $conn->GetUpdateSQL($rs, $record); ! $conn->Execute($updateSQL,$varr); // Update the record in the database if ($conn->Affected_Rows() != 1)print "<p><b>Error 2</b>: Rows Affected=".$conn->Affected_Rows().", should be 1</p>"; Index: test.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/tests/test.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** test.php 19 Oct 2004 00:57:12 -0000 1.3 --- test.php 23 Nov 2004 01:31:10 -0000 1.4 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, *************** *** 276,279 **** --- 276,285 ---- } + $db->debug=0; + $rez = $db->MetaColumns("NOSUCHTABLEHERE"); + if ($rez !== false) { + Err("MetaColumns error handling failed"); + var_dump($rez); + } $db->debug=1; $a = $db->MetaColumns('ADOXYZ'); *************** *** 462,465 **** --- 468,473 ---- /* -- TEST PACKAGE + -- "Set scan off" turns off substitution variables. + Set scan off; CREATE OR REPLACE PACKAGE Adodb AS *************** *** 468,472 **** PROCEDURE open_tab2 (tabcursor IN OUT TabType,tablenames IN OUT VARCHAR) ; PROCEDURE data_out(input IN VARCHAR, output OUT VARCHAR); ! PROCEDURE myproc (p1 IN NUMBER, p2 OUT NUMBER); END Adodb; --- 476,480 ---- PROCEDURE open_tab2 (tabcursor IN OUT TabType,tablenames IN OUT VARCHAR) ; PROCEDURE data_out(input IN VARCHAR, output OUT VARCHAR); ! PROCEDURE data_in(input IN VARCHAR); PROCEDURE myproc (p1 IN NUMBER, p2 OUT NUMBER); END Adodb; *************** *** 485,493 **** tablenames := 'TEST'; END open_tab2; ! 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 --- 493,507 ---- tablenames := 'TEST'; END open_tab2; ! PROCEDURE data_out(input IN VARCHAR, output OUT VARCHAR) IS BEGIN output := 'Cinta Hati '||input; END; + + PROCEDURE data_in(input IN VARCHAR) IS + ignore varchar(1000); + BEGIN + ignore := input; + END; PROCEDURE myproc (p1 IN NUMBER, p2 OUT NUMBER) AS *************** *** 498,502 **** / - */ $rs = $db->ExecuteCursor("BEGIN adodb.open_tab(:zz,'A%'); END;",'zz'); --- 512,515 ---- *************** *** 525,529 **** } - $tname = 'A%'; --- 538,541 ---- *************** *** 533,536 **** --- 545,552 ---- rs2html($rs); + $stmt = $db->PrepareSP("begin adodb.data_in(:a1); end;"); + $db->InParameter($stmt,$a1,'a1'); + $db->Execute($stmt); + $db->debug = $saved; break; *************** *** 1034,1038 **** $ADODB_FETCH_MODE = ADODB_FETCH_NUM; $rs = &$db->CacheExecute(6,"select distinct firstname,lastname from ADOXYZ"); ! print_r($rs->fields);echo "<br>"; echo $rs->Fields('firstname'); --- 1050,1054 ---- $ADODB_FETCH_MODE = ADODB_FETCH_NUM; $rs = &$db->CacheExecute(6,"select distinct firstname,lastname from ADOXYZ"); ! print_r($rs->fields); echo $rs->fetchMode;echo "<br>"; echo $rs->Fields('firstname'); Index: testoci8.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/tests/testoci8.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** testoci8.php 19 Oct 2004 00:57:13 -0000 1.3 --- testoci8.php 23 Nov 2004 01:31:10 -0000 1.4 *************** *** 3,7 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 3,7 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: testdatabases.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/tests/testdatabases.inc.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** testdatabases.inc.php 19 Oct 2004 00:57:13 -0000 1.3 --- testdatabases.inc.php 23 Nov 2004 01:31:10 -0000 1.4 *************** *** 2,6 **** /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 2,6 ---- /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, *************** *** 260,268 **** } ! /* ! if (!empty($testmssql)) { // MS SQL Server via ODBC $db = ADONewConnection('odbtp'); ! $dsn = "PROVIDER=MSDASQL;Driver={SQL Server};Server=localhost;Database=northwind;uid=adodb;pwd=natsoft"; if ($db->PConnect('localhost',$dsn, "", "")) { --- 260,269 ---- } ! ! $server = 'sherkhan'; ! 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, "", "")) { *************** *** 273,279 **** } - */ ! $server = 'sherkhan'; ADOLoadCode('odbc_mssql'); if (!empty($testmssql)) { // MS SQL Server via ODBC --- 274,279 ---- } ! ADOLoadCode('odbc_mssql'); if (!empty($testmssql)) { // MS SQL Server via ODBC *************** *** 284,288 **** $dsn = "PROVIDER=MSDASQL;Driver={SQL Server};Server=$server;Database=northwind;"; ! if ($db->PConnect($dsn, "sa", "natsoft", "")) { testdb($db,"create table ADOXYZ (id int, firstname char(24) null, lastname char(24) null,created datetime null)"); } --- 284,288 ---- $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)"); } *************** *** 299,303 **** $myDSN="PROVIDER=MSDASQL;DRIVER={SQL Server};" ! . "SERVER=$server;DATABASE=NorthWind;UID=sa;PWD=natsoft;Trusted_Connection=No" ; --- 299,303 ---- $myDSN="PROVIDER=MSDASQL;DRIVER={SQL Server};" ! . "SERVER=$server;DATABASE=NorthWind;UID=adodb;PWD=natsoft;Trusted_Connection=No" ; *************** *** 315,319 **** print "<h1>Connecting $db->databaseType...</h1>"; ! $ok = $db->Connect('','sa','natsoft','northwind'); if ($ok or $db->PConnect("mangrove", "sa", "natsoft", "ai")) { --- 315,319 ---- print "<h1>Connecting $db->databaseType...</h1>"; ! $ok = $db->Connect('','adodb','natsoft','northwind'); if ($ok or $db->PConnect("mangrove", "sa", "natsoft", "ai")) { *************** *** 321,325 **** // $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='sa', password='natsoft', database='ai'".'<BR>'.$db->ErrorMsg(); } --- 321,325 ---- // $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(); } Index: testpaging.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/tests/testpaging.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** testpaging.php 19 Oct 2004 00:57:13 -0000 1.3 --- testpaging.php 23 Nov 2004 01:31:10 -0000 1.4 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: benchmark.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/tests/benchmark.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** benchmark.php 19 Oct 2004 00:57:12 -0000 1.3 --- benchmark.php 23 Nov 2004 01:31:10 -0000 1.4 *************** *** 9,13 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 9,13 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: test-php5.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/tests/test-php5.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** test-php5.php 19 Oct 2004 00:57:12 -0000 1.3 --- test-php5.php 23 Nov 2004 01:31:10 -0000 1.4 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: test3.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/tests/test3.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** test3.php 19 Oct 2004 00:57:13 -0000 1.3 --- test3.php 23 Nov 2004 01:31:10 -0000 1.4 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: test5.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/tests/test5.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** test5.php 19 Oct 2004 00:57:13 -0000 1.3 --- test5.php 23 Nov 2004 01:31:10 -0000 1.4 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: testcache.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/tests/testcache.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** testcache.php 19 Oct 2004 00:57:13 -0000 1.3 --- testcache.php 23 Nov 2004 01:31:10 -0000 1.4 *************** *** 3,7 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 3,7 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, |
From: Matt M. <pro...@us...> - 2004-11-23 01:31:22
|
Update of /cvsroot/webschool/webschool/lib/adodb/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19610/lib/adodb/docs Modified Files: docs-adodb.htm docs-datadict.htm docs-perf.htm docs-session.htm Log Message: ADODB Updated Index: docs-perf.htm =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/docs/docs-perf.htm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** docs-perf.htm 19 Oct 2004 00:57:10 -0000 1.2 --- docs-perf.htm 23 Nov 2004 01:31:08 -0000 1.3 *************** *** 19,23 **** <body> <h3>The ADOdb Performance Monitoring Library</h3> ! <p>V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jlim#natsoft.com.my)</p> <p><font size="1">This software is dual licensed using BSD-Style and LGPL. This means you can use it in compiled proprietary and commercial --- 19,23 ---- <body> <h3>The ADOdb Performance Monitoring Library</h3> ! <p>V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jlim#natsoft.com.my)</p> <p><font size="1">This software is dual licensed using BSD-Style and LGPL. This means you can use it in compiled proprietary and commercial Index: docs-datadict.htm =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/docs/docs-datadict.htm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** docs-datadict.htm 19 Oct 2004 00:57:10 -0000 1.2 --- docs-datadict.htm 23 Nov 2004 01:31:08 -0000 1.3 *************** *** 21,25 **** <body style="background-color: rgb(255, 255, 255);"> <h2>ADOdb Data Dictionary Library for PHP</h2> ! <p>V4.53 14 Sept 2004 (c) 2000-2004 John Lim (<a href="mailto:jlim#natsoft.com.my">jlim#natsoft.com.my</a>).<br> AXMLS (c) 2004 ars Cognita, Inc</p> --- 21,25 ---- <body style="background-color: rgb(255, 255, 255);"> <h2>ADOdb Data Dictionary Library for PHP</h2> ! <p>V4.54 5 Nov 2004 (c) 2000-2004 John Lim (<a href="mailto:jlim#natsoft.com.my">jlim#natsoft.com.my</a>).<br> AXMLS (c) 2004 ars Cognita, Inc</p> Index: docs-session.htm =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/docs/docs-session.htm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** docs-session.htm 19 Oct 2004 00:57:10 -0000 1.2 --- docs-session.htm 23 Nov 2004 01:31:08 -0000 1.3 *************** *** 22,26 **** <h3>ADODB Session Management Manual</h3> <p> ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jlim#natsoft.com.my) </p> <p> <font size="1">This software is dual licensed using BSD-Style and --- 22,26 ---- <h3>ADODB Session Management Manual</h3> <p> ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jlim#natsoft.com.my) </p> <p> <font size="1">This software is dual licensed using BSD-Style and Index: docs-adodb.htm =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/docs/docs-adodb.htm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** docs-adodb.htm 19 Oct 2004 00:57:09 -0000 1.2 --- docs-adodb.htm 23 Nov 2004 01:31:08 -0000 1.3 *************** *** 1,5 **** ! <html> ! <head> ! <title>ADODB Manual</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> --- 1,5 ---- ! <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> ! <html><head><title>ADODB Manual</title> ! <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> [...5510 lines suppressed...] ! </font></p><p><font color="#000000">The odbc driver's FetchField() field names did not obey ADODB_ASSOC_CASE. Fixed. ! </font></p><p><font color="#000000">Some bugs in adodb_backtrace() fixed. ! </font></p><p><font color="#000000">Added "INT IDENTITY" type to adorecordset::MetaType() to support odbc_mssql properly. ! </font></p><p><font color="#000000">MetaColumns() for oci8, mssql, odbc revised to support scale. Also minor revisions to odbc MetaColumns() for vfp and db2 compat. ! </font></p><p><font color="#000000">Added unsigned support to mysql datadict class. Thx to iamsure. ! </font></p><p><font color="#000000">Infinite loop in mssql MoveNext() fixed when ADODB_FETCH_ASSOC used. Thx to Josh R, Night_Wulfe#hotmail.com. ! </font></p><p><font color="#000000">ChangeTableSQL contributed by Florian Buzin. ! </font></p><p><font color="#000000">The odbc_mssql driver now sets CONCAT_NULL_YIELDS_NULL OFF for compat with mssql driver. ! </font></p><hr> ! <p><font color="#000000"><strong>0.10 Sept 9 2000</strong> First release ! </font></p><h3><font color="#000000"><strong>Old changelog history moved to <a href="old-changelog.htm">old-changelog.htm</a>. ! </strong></font></h3> ! <p><font color="#000000"> </font></p> ! <p><font color="#000000"> </font> ! </p></body></html> \ No newline at end of file |
From: Matt M. <pro...@us...> - 2004-11-23 01:31:19
|
Update of /cvsroot/webschool/webschool/lib/adodb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19610/lib/adodb Modified Files: adodb-php4.inc.php adodb-xmlschema.inc.php adodb.inc.php toexport.inc.php tohtml.inc.php Log Message: ADODB Updated Index: adodb-php4.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/adodb-php4.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-php4.inc.php 19 Oct 2004 00:57:08 -0000 1.2 --- adodb-php4.inc.php 23 Nov 2004 01:31:08 -0000 1.3 *************** *** 2,6 **** /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 2,6 ---- /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: toexport.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/toexport.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** toexport.inc.php 19 Oct 2004 00:57:09 -0000 1.2 --- toexport.inc.php 23 Nov 2004 01:31:08 -0000 1.3 *************** *** 2,6 **** /** ! * @version V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. * Released under both BSD license and Lesser GPL library license. * Whenever there is any discrepancy between the two licenses, --- 2,6 ---- /** ! * @version V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. * Released under both BSD license and Lesser GPL library license. * Whenever there is any discrepancy between the two licenses, Index: tohtml.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/tohtml.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tohtml.inc.php 19 Oct 2004 00:57:09 -0000 1.2 --- tohtml.inc.php 23 Nov 2004 01:31:08 -0000 1.3 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: adodb.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/adodb.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb.inc.php 19 Oct 2004 00:57:09 -0000 1.2 --- adodb.inc.php 23 Nov 2004 01:31:08 -0000 1.3 *************** *** 15,19 **** \mainpage ! @version V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jlim\@natsoft.com.my). All rights reserved. Released under both BSD license and Lesser GPL library license. You can choose which license --- 15,19 ---- \mainpage ! @version V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jlim#natsoft.com.my). All rights reserved. Released under both BSD license and Lesser GPL library license. You can choose which license *************** *** 173,177 **** * ADODB version as a string. */ ! $ADODB_vers = 'V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jlim#natsoft.com.my). All rights reserved. Released BSD & LGPL.'; /** --- 173,177 ---- * ADODB version as a string. */ ! $ADODB_vers = 'V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jlim#natsoft.com.my). All rights reserved. Released BSD & LGPL.'; /** *************** *** 241,245 **** var $password = ''; /// Password for the username. For security, we no longer store it. var $debug = false; /// if set to true will output sql statements ! var $maxblobsize = 256000; /// maximum size of blobs or large text fields -- some databases die otherwise like foxpro var $concat_operator = '+'; /// default concat operator -- change to || for Oracle/Interbase var $substr = 'substr'; /// substring operator --- 241,245 ---- var $password = ''; /// Password for the username. For security, we no longer store it. var $debug = false; /// if set to true will output sql statements ! var $maxblobsize = 262144; /// maximum size of blobs or large text fields (262144 = 256K)-- some db's die otherwise like foxpro var $concat_operator = '+'; /// default concat operator -- change to || for Oracle/Interbase var $substr = 'substr'; /// substring operator *************** *** 253,257 **** var $replaceQuote = "\\'"; /// string to use to replace quotes var $nameQuote = '"'; /// string to use to quote identifiers and names ! var $charSet=false; /// character set to use - only for interbase var $metaDatabasesSQL = ''; var $metaTablesSQL = ''; --- 253,257 ---- var $replaceQuote = "\\'"; /// string to use to replace quotes var $nameQuote = '"'; /// string to use to quote identifiers and names ! var $charSet=false; /// character set to use - only for interbase, postgres and oci8 var $metaDatabasesSQL = ''; var $metaTablesSQL = ''; *************** *** 801,805 **** foreach($arr as $v) { $sql .= $sqlarr[$i]; ! // from Ron Baldwin <ron...@so...> // Only quote string types if (gettype($v) == 'string') --- 801,805 ---- foreach($arr as $v) { $sql .= $sqlarr[$i]; ! // from Ron Baldwin <ron.baldwin#sourceprose.com> // Only quote string types if (gettype($v) == 'string') *************** *** 859,864 **** $fn($this->databaseType,'EXECUTE',$this->ErrorNo(),$this->ErrorMsg(),$sql,$inputarr,$this); } ! ! return false; } --- 859,864 ---- $fn($this->databaseType,'EXECUTE',$this->ErrorNo(),$this->ErrorMsg(),$sql,$inputarr,$this); } ! $false = false; ! return $false; } *************** *** 949,953 **** /** ! * Portable Insert ID. Pablo Roca <pab...@mv...> * * @return the last inserted ID. All databases support this. But aware possible --- 949,953 ---- /** ! * Portable Insert ID. Pablo Roca <pabloroca#mvps.org> * * @return the last inserted ID. All databases support this. But aware possible *************** *** 1156,1161 **** function &_rs2rs(&$rs,$nrows=-1,$offset=-1,$close=true) { ! if (! $rs) return false; ! $dbtype = $rs->databaseType; if (!$dbtype) { --- 1156,1163 ---- function &_rs2rs(&$rs,$nrows=-1,$offset=-1,$close=true) { ! if (! $rs) { ! $false = false; ! return $false; ! } $dbtype = $rs->databaseType; if (!$dbtype) { *************** *** 1200,1205 **** { $rs =& $this->Execute($sql, $inputarr); ! if (!$rs) return false; ! $arr =& $rs->GetAssoc($force_array,$first2cols); return $arr; --- 1202,1209 ---- { $rs =& $this->Execute($sql, $inputarr); ! if (!$rs) { ! $false = false; ! return $false; ! } $arr =& $rs->GetAssoc($force_array,$first2cols); return $arr; *************** *** 1213,1218 **** } $rs =& $this->CacheExecute($secs2cache, $sql, $inputarr); ! if (!$rs) return false; ! $arr =& $rs->GetAssoc($force_array,$first2cols); return $arr; --- 1217,1224 ---- } $rs =& $this->CacheExecute($secs2cache, $sql, $inputarr); ! if (!$rs) { ! $false = false; ! return $false; ! } $arr =& $rs->GetAssoc($force_array,$first2cols); return $arr; *************** *** 1326,1330 **** if (!$rs) if (defined('ADODB_PEAR')) return ADODB_PEAR_Error(); ! else return false; $arr =& $rs->GetArray(); $rs->Close(); --- 1332,1339 ---- if (!$rs) if (defined('ADODB_PEAR')) return ADODB_PEAR_Error(); ! else { ! $false = false; ! return $false; ! } $arr =& $rs->GetArray(); $rs->Close(); *************** *** 1348,1353 **** if (!$rs) if (defined('ADODB_PEAR')) return ADODB_PEAR_Error(); ! else return false; ! $arr =& $rs->GetArray(); $rs->Close(); --- 1357,1364 ---- if (!$rs) if (defined('ADODB_PEAR')) return ADODB_PEAR_Error(); ! else { ! $false = false; ! return $false; ! } $arr =& $rs->GetArray(); $rs->Close(); *************** *** 1379,1383 **** } ! return false; } --- 1390,1395 ---- } ! $false = false; ! return $false; } *************** *** 1391,1395 **** return $arr; } ! return false; } --- 1403,1408 ---- return $arr; } ! $false = false; ! return $false; } *************** *** 1866,1871 **** global $ADODB_FETCH_MODE; - if ($mask) return false; if ($this->metaTablesSQL) { // complicated state saving by the need for backward compat --- 1879,1887 ---- global $ADODB_FETCH_MODE; + $false = false; + if ($mask) { + return $false; + } if ($this->metaTablesSQL) { // complicated state saving by the need for backward compat *************** *** 1879,1883 **** $ADODB_FETCH_MODE = $save; ! if ($rs === false) return false; $arr =& $rs->GetArray(); $arr2 = array(); --- 1895,1899 ---- $ADODB_FETCH_MODE = $save; ! if ($rs === false) return $false; $arr =& $rs->GetArray(); $arr2 = array(); *************** *** 1900,1904 **** return $arr2; } ! return false; } --- 1916,1920 ---- return $arr2; } ! return $false; } *************** *** 1926,1929 **** --- 1942,1947 ---- global $ADODB_FETCH_MODE; + $false = false; + if (!empty($this->metaColumnsSQL)) { *************** *** 1937,1941 **** if (isset($savem)) $this->SetFetchMode($savem); $ADODB_FETCH_MODE = $save; ! if ($rs === false) return false; $retarr = array(); --- 1955,1959 ---- if (isset($savem)) $this->SetFetchMode($savem); $ADODB_FETCH_MODE = $save; ! if ($rs === false || $rs->EOF) return $false; $retarr = array(); *************** *** 1958,1962 **** return $retarr; } ! return false; } --- 1976,1980 ---- return $retarr; } ! return $false; } *************** *** 1970,1974 **** function &MetaIndexes($table, $primary = false, $owner = false) { ! return FALSE; } --- 1988,1993 ---- function &MetaIndexes($table, $primary = false, $owner = false) { ! $false = false; ! return false; } *************** *** 1982,1987 **** { $objarr =& $this->MetaColumns($table); ! if (!is_array($objarr)) return false; ! $arr = array(); if ($numIndexes) { --- 2001,2008 ---- { $objarr =& $this->MetaColumns($table); ! if (!is_array($objarr)) { ! $false = false; ! return $false; ! } $arr = array(); if ($numIndexes) { *************** *** 2063,2066 **** --- 2084,2088 ---- { if (is_object($v)) { + // odbtp support //( [year] => 2004 [month] => 9 [day] => 4 [hour] => 12 [minute] => 44 [second] => 8 [fraction] => 0 ) return adodb_mktime($v->hour,$v->minute,$v->second,$v->month,$v->day, $v->year); *************** *** 2086,2089 **** --- 2108,2112 ---- { if (is_object($v)) { + // odbtp support //( [year] => 2004 [month] => 9 [day] => 4 [hour] => 12 [minute] => 44 [second] => 8 [fraction] => 0 ) return adodb_mktime($v->hour,$v->minute,$v->second,$v->month,$v->day, $v->year); *************** *** 2529,2533 **** $cols = $this->_numOfFields; if ($cols < 2) { ! return false; } $numIndex = isset($this->fields[0]); --- 2552,2557 ---- $cols = $this->_numOfFields; if ($cols < 2) { ! $false = false; ! return $false; } $numIndex = isset($this->fields[0]); *************** *** 2692,2696 **** function &FetchRow() { ! if ($this->EOF) return false; $arr = $this->fields; $this->_currentRow++; --- 2716,2723 ---- function &FetchRow() { ! if ($this->EOF) { ! $false = false; ! return $false; ! } $arr = $this->fields; $this->_currentRow++; *************** *** 3353,3357 **** function Fields($colname) { ! if ($this->fetchMode & ADODB_FETCH_ASSOC) { if (!isset($this->fields[$colname])) $colname = strtolower($colname); return $this->fields[$colname]; --- 3380,3385 ---- function Fields($colname) { ! $mode = isset($this->adodbFetchMode) ? $this->adodbFetchMode : $this->fetchMode; ! if ($mode & ADODB_FETCH_ASSOC) { if (!isset($this->fields[$colname])) $colname = strtolower($colname); return $this->fields[$colname]; *************** *** 3496,3500 **** if (!defined('ADODB_ASSOC_CASE')) define('ADODB_ASSOC_CASE',2); $errorfn = (defined('ADODB_ERROR_HANDLER')) ? ADODB_ERROR_HANDLER : false; ! if (strpos($db,'://')) { $origdsn = $db; --- 3524,3528 ---- if (!defined('ADODB_ASSOC_CASE')) define('ADODB_ASSOC_CASE',2); $errorfn = (defined('ADODB_ERROR_HANDLER')) ? ADODB_ERROR_HANDLER : false; ! $false = false; if (strpos($db,'://')) { $origdsn = $db; *************** *** 3504,3512 **** $db = str_replace('@/','@adodb-fakehost/',$db); $dsna = parse_url($db); ! if (!$dsna) return false; $dsna['host'] = ''; } $db = @$dsna['scheme']; ! if (!$db) return false; $dsna['host'] = isset($dsna['host']) ? rawurldecode($dsna['host']) : ''; $dsna['user'] = isset($dsna['user']) ? rawurldecode($dsna['user']) : ''; --- 3532,3540 ---- $db = str_replace('@/','@adodb-fakehost/',$db); $dsna = parse_url($db); ! if (!$dsna) return $false; $dsna['host'] = ''; } $db = @$dsna['scheme']; ! if (!$db) return $false; $dsna['host'] = isset($dsna['host']) ? rawurldecode($dsna['host']) : ''; $dsna['user'] = isset($dsna['user']) ? rawurldecode($dsna['user']) : ''; *************** *** 3553,3557 **** ADOConnection::outp( "<p>ADONewConnection: Unable to load database driver '$db'</p>",false); ! return false; } --- 3581,3585 ---- ADOConnection::outp( "<p>ADONewConnection: Unable to load database driver '$db'</p>",false); ! return $false; } *************** *** 3559,3563 **** if (!class_exists($cls)) { adodb_backtrace(); ! return false; } --- 3587,3591 ---- if (!class_exists($cls)) { adodb_backtrace(); ! return $false; } *************** *** 3596,3600 **** $ok = $obj->PConnect($dsna['host'], $dsna['user'], $dsna['pass'], $dsna['path']); ! if (!$ok) return false; } } --- 3624,3628 ---- $ok = $obj->PConnect($dsna['host'], $dsna['user'], $dsna['pass'], $dsna['path']); ! if (!$ok) return $false; } } *************** *** 3630,3639 **** function &NewPerfMonitor(&$conn) { $drivername = _adodb_getdriver($conn->dataProvider,$conn->databaseType,true); ! if (!$drivername || $drivername == 'generic') return false; include_once(ADODB_DIR.'/adodb-perf.inc.php'); @include_once(ADODB_DIR."/perf/perf-$drivername.inc.php"); $class = "Perf_$drivername"; ! if (!class_exists($class)) return false; $perf =& new $class($conn); --- 3658,3668 ---- function &NewPerfMonitor(&$conn) { + $false = false; $drivername = _adodb_getdriver($conn->dataProvider,$conn->databaseType,true); ! if (!$drivername || $drivername == 'generic') return $false; include_once(ADODB_DIR.'/adodb-perf.inc.php'); @include_once(ADODB_DIR."/perf/perf-$drivername.inc.php"); $class = "Perf_$drivername"; ! if (!class_exists($class)) return $false; $perf =& new $class($conn); *************** *** 3643,3646 **** --- 3672,3676 ---- function &NewDataDictionary(&$conn,$drivername=false) { + $false = false; if (!$drivername) $drivername = _adodb_getdriver($conn->dataProvider,$conn->databaseType); *************** *** 3651,3655 **** if (!file_exists($path)) { ADOConnection::outp("Database driver '$path' not available"); ! return false; } include_once($path); --- 3681,3685 ---- if (!file_exists($path)) { ADOConnection::outp("Database driver '$path' not available"); ! return $false; } include_once($path); |
From: Matt M. <pro...@us...> - 2004-11-23 01:24:32
|
Update of /cvsroot/webschool/webschool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18055 Modified Files: CHANGELOG.txt INSTALL.txt README.txt admin.php index.php Log Message: Started updating ADODB, then realized that I had other changes. Wanted to save a working version to CVS Index: CHANGELOG.txt =================================================================== RCS file: /cvsroot/webschool/webschool/CHANGELOG.txt,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** CHANGELOG.txt 2 Nov 2004 04:29:24 -0000 1.13 --- CHANGELOG.txt 23 Nov 2004 01:24:01 -0000 1.14 *************** *** 1 **** ! Largely inactive. \ No newline at end of file --- 1,2 ---- ! 11/22/2004 ! -Converted some things to lang files. \ No newline at end of file Index: admin.php =================================================================== RCS file: /cvsroot/webschool/webschool/admin.php,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** admin.php 19 Nov 2004 03:26:58 -0000 1.31 --- admin.php 23 Nov 2004 01:24:01 -0000 1.32 *************** *** 28,31 **** --- 28,32 ---- //guest are not allowed! let them log on, though. allow certian actions, even //though they are guests. + //allowed actions while not logged in: login, lostpass, resetpass if( GetUser() == 1 && ( $_GET['action'] != "login" && $_GET['action'] != "lostpass" && $_GET['action'] != "resetpass") ) { *************** *** 41,44 **** --- 42,46 ---- } + //this section will eventually facilitate username searching, though not yet. if($_GET['action'] == "finduser") { $smarty->display("admin.finduser.tpl"); *************** *** 47,67 **** } //recovering lost password if( $_GET['action'] == "lostpass" ) { if( !isset( $_POST['username'] ) ){ $smarty->display("admin.lostpass.tpl"); } else { $newpasscode = rand(1, 9999999999999); $newpasscode = sha1($newpasscode); dbn(__FILE__,__LINE__,"UPDATE "._USERS_." SET newpasscode='".$newpasscode."' WHERE username='".$_POST['username']."'"); db(__FILE__,__LINE__,"SELECT * FROM "._USERS_." WHERE username='".$_POST['username']."'"); $passto = dbr(); mail($passto['email'], $lang['passrecover']['emailsubject'], sprintf($lang['passrecover']['emailbody'], $passto['fname'], $passto['lname'], $_POST['username'], $newpasscode )); $smarty->assign("recoveredusername", $_POST['username']); $smarty->display("admin.lostpass.tpl"); ! db(__FILE__,__LINE__, "SELECT email FROM {_USERS_} WHERE id=2"); $adminemail = dbr(); ! mail($adminemail['email'], "Password reset request from {$_POST['username']}", "They have requested a password reset"); } --- 49,82 ---- } + //recovering lost password if( $_GET['action'] == "lostpass" ) { + //if they have not entered their username yet, prompt them to do so if( !isset( $_POST['username'] ) ){ $smarty->display("admin.lostpass.tpl"); + //this part adds a check code to the user table under the username. It then emails the user + //with the email addr specified under the email field in the database with a link to reset their password } else { + //generate passcode $newpasscode = rand(1, 9999999999999); $newpasscode = sha1($newpasscode); + + //put pass code in database dbn(__FILE__,__LINE__,"UPDATE "._USERS_." SET newpasscode='".$newpasscode."' WHERE username='".$_POST['username']."'"); + + //find the user's email db(__FILE__,__LINE__,"SELECT * FROM "._USERS_." WHERE username='".$_POST['username']."'"); $passto = dbr(); + + //send the email, revise this to use a webschool mail function in the future mail($passto['email'], $lang['passrecover']['emailsubject'], sprintf($lang['passrecover']['emailbody'], $passto['fname'], $passto['lname'], $_POST['username'], $newpasscode )); + //let them know that the email was sent $smarty->assign("recoveredusername", $_POST['username']); $smarty->display("admin.lostpass.tpl"); ! //send the admin a notification ! db(__FILE__,__LINE__, "SELECT email FROM "._USERS_." WHERE id=2"); $adminemail = dbr(); ! mail($adminemail['email'], sprintf($lang['passrecover']['adminnotifysubject'], $_POST['username']), sprintf($lang['passrecover']['adminnotify'], $passto['fname'], $passto['lname'])); } *************** *** 69,77 **** --- 84,96 ---- die(); } + + //resetting lost password if( $_GET['action'] == "resetpass" ) { + //find the specified users passcode from database db(__FILE__,__LINE__,"SELECT * FROM "._USERS_." WHERE username='".$_GET['username']."'"); $test = dbr(); + //if no passcode is specified in the url, or they do not match if( $test['newpasscode'] == "" || $test['newpasscode'] != $_GET['newpasscode']) { //die hacker *************** *** 79,85 **** --- 98,108 ---- } + //if they have not typed their new password if( !isset( $_POST['newpass'] ) ){ + //show form $smarty->display("admin.resetpass.tpl"); + //if they have } else { + //update their password and unset passcode dbn(__FILE__,__LINE__,"UPDATE "._USERS_." SET password='".sha1($_POST['newpass'])."', newpasscode='' WHERE username='".$_REQUEST['username']."'"); } *************** *** 136,151 **** } db(__FILE__,__LINE__, "Select * From "._AMODS_); - db2(__FILE__,__LINE__, "Select * FROM "._PERMISSIONS_." WHERE userid='".$user['id']."'"); - $permtest= dbr2(); while( $row = dbr() ) { ! if ($permtest[$row['permname']] > 0){ $smarty->append("CPItems", $row); } } ! ! if( isset( $_GET['amod']) ) { db(__FILE__,__LINE__,"SELECT filename FROM "._AMODS_." WHERE name='".$_REQUEST['amod']."'"); --- 159,174 ---- } + //showing admin pannel + //get all aMods from database db(__FILE__,__LINE__, "Select * From "._AMODS_); while( $row = dbr() ) { ! //see if they have permission to use this aMod ! if ($perm[$row['permname']] > 0){ $smarty->append("CPItems", $row); } } ! //are they attempting to load an aMod if( isset( $_GET['amod']) ) { db(__FILE__,__LINE__,"SELECT filename FROM "._AMODS_." WHERE name='".$_REQUEST['amod']."'"); Index: INSTALL.txt =================================================================== RCS file: /cvsroot/webschool/webschool/INSTALL.txt,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** INSTALL.txt 2 Nov 2004 04:29:24 -0000 1.8 --- INSTALL.txt 23 Nov 2004 01:24:01 -0000 1.9 *************** *** 3,9 **** ========= Built in installer. ! Upgrade: ========= ! Not supported. \ No newline at end of file --- 3,9 ---- ========= Built in installer. ! Point your browser to the installation and make sure your server has write permissions to /webschool/lib Upgrade: ========= ! Not supported yet. \ No newline at end of file Index: README.txt =================================================================== RCS file: /cvsroot/webschool/webschool/README.txt,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** README.txt 2 Nov 2004 04:29:24 -0000 1.5 --- README.txt 23 Nov 2004 01:24:01 -0000 1.6 *************** *** 1 **** ! Docs relocated to docs/ directory \ No newline at end of file --- 1,3 ---- ! WebSchool aims to be a complete website solution for colleges and high schools. Main points of emphasize are: News, Articles, Pages, Sports, Assignment Trackers, Class viewing and more. We are currently alpha, so many things are changing very rapidly. Please bear through it with us. Any bug fixes you may discover and fix would be greatly appreciated. Please send all comments/issues/answers/questions/critizisms/congragulations/rebuttals to: pro...@gm... ! ! Other docs relocated to the /docs/ directory. \ No newline at end of file Index: index.php =================================================================== RCS file: /cvsroot/webschool/webschool/index.php,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** index.php 22 Nov 2004 03:57:13 -0000 1.27 --- index.php 23 Nov 2004 01:24:01 -0000 1.28 *************** *** 22,25 **** --- 22,26 ---- include("lib/header.php"); + db(__FILE__,__LINE__,"SELECT * FROM "._PAGES_." WHERE onindex!='0' ORDER BY onindex DESC "); while ($row = dbr()) { *************** *** 36,59 **** //recent news ! db(__FILE__,__LINE__,"SELECT prettytitle, published, id, lastupdate FROM "._NEWS_." WHERE published!='' ORDER By published DESC LIMIT ".$config['recentnews']); while( $row = dbr() ) { ! $smarty->append("recentnews", array("lastupdate"=>$row['lastupdate'], "published"=>$row['published'], "id"=>$row['id'], "prettytitle"=>$row['prettytitle']) ); ! //$recentnews .= date("m/d/y",$row['published']).": <a href=\"mod.php?mod=News&op=view&id=".$row['id']."\">".$row['prettytitle']."</a><br>"; } //recent articles ! db2(__FILE__,__LINE__,"SELECT prettytitle, published, id, lastupdate FROM "._ARTICLES_." WHERE published != '' ORDER BY published DESC LIMIT ".$config['recentarticles']); while( $row = dbr2() ) { ! $smarty->append("recentarticles", array("lastupdate"=>$row['lastupdate'], "published"=>$row['published'], "id"=>$row['id'], "prettytitle"=>$row['prettytitle']) ); ! //$recentarticles .= date("m/d/y",$row['published']).": <a href=\"mod.php?mod=Articles&op=view&id=".$row['id']."\">".$row['prettytitle']."</a><br>"; } ! db3(__FILE__,__LINE__,"SELECT prettytitle, published, id, lastupdate FROM "._PAGES_." WHERE published!='' && onindex=0 ORDER BY published DESC LIMIT ".$config['recentpages']); while( $row = dbr3() ) { ! $smarty->append("recentpages", array("lastupdate"=>$row['lastupdate'], "published"=>$row['published'], "id"=>$row['id'], "prettytitle"=>$row['prettytitle']) ); ! //$recentpages .= date("m/d/y",$row['published']).": <a href=\"mod.php?mod=Pages&id=".$row['id']."\">".$row['prettytitle']."</a><br>"; } --- 37,63 ---- //recent news ! db(__FILE__,__LINE__,"SELECT prettytitle, published, id, lastupdate FROM "._NEWS_." WHERE published!='' ORDER By lastupdate DESC LIMIT ".$config['recentnews']); while( $row = dbr() ) { ! $smarty->append("recentnews", ! array("lastupdate"=>$row['lastupdate'], "published"=>$row['published'], ! "id"=>$row['id'], "prettytitle"=>$row['prettytitle']) ); } //recent articles ! db2(__FILE__,__LINE__,"SELECT prettytitle, published, id, lastupdate FROM "._ARTICLES_." WHERE published != '' ORDER BY lastupdate DESC LIMIT ".$config['recentarticles']); while( $row = dbr2() ) { ! $smarty->append("recentarticles", ! array("lastupdate"=>$row['lastupdate'], "published"=>$row['published'], ! "id"=>$row['id'], "prettytitle"=>$row['prettytitle']) ); } ! db3(__FILE__,__LINE__,"SELECT prettytitle, published, id, lastupdate FROM "._PAGES_." WHERE published!='' && onindex='0' ORDER BY lastupdate DESC LIMIT ".$config['recentpages']); while( $row = dbr3() ) { ! $smarty->append("recentpages", ! array("lastupdate"=>$row['lastupdate'], "published"=>$row['published'], ! "id"=>$row['id'], "prettytitle"=>$row['prettytitle']) ); } |
From: Matt M. <pro...@us...> - 2004-11-23 01:24:32
|
Update of /cvsroot/webschool/webschool/lib/adodb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18055/lib/adodb Modified Files: adodb-csvlib.inc.php adodb-datadict.inc.php adodb-error.inc.php adodb-errorhandler.inc.php adodb-exceptions.inc.php adodb-iterator.inc.php adodb-lib.inc.php adodb-pager.inc.php adodb-pear.inc.php adodb-perf.inc.php Log Message: Started updating ADODB, then realized that I had other changes. Wanted to save a working version to CVS Index: adodb-errorhandler.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/adodb-errorhandler.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-errorhandler.inc.php 19 Oct 2004 00:57:08 -0000 1.2 --- adodb-errorhandler.inc.php 23 Nov 2004 01:24:02 -0000 1.3 *************** *** 1,5 **** <?php /** ! * @version V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. * Released under both BSD license and Lesser GPL library license. * Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /** ! * @version V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. * Released under both BSD license and Lesser GPL library license. * Whenever there is any discrepancy between the two licenses, Index: adodb-perf.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/adodb-perf.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-perf.inc.php 19 Oct 2004 00:57:08 -0000 1.2 --- adodb-perf.inc.php 23 Nov 2004 01:24:02 -0000 1.3 *************** *** 1,5 **** <?php /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, *************** *** 81,85 **** //$tracer .= (string) adodb_backtrace(false); ! $tracer = substr($tracer,0,500); if (is_array($inputarr)) { --- 81,85 ---- //$tracer .= (string) adodb_backtrace(false); ! $tracer = (string) substr($tracer,0,500); if (is_array($inputarr)) { *************** *** 683,686 **** --- 683,687 ---- sleep($secs); while (1) { + $arr =& $this->PollParameters(); *************** *** 703,706 **** --- 704,709 ---- flush(); + if (connection_aborted()|| connection_timeout()) return; + sleep($secs); $arro = $arr; Index: adodb-iterator.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/adodb-iterator.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-iterator.inc.php 19 Oct 2004 00:57:08 -0000 1.2 --- adodb-iterator.inc.php 23 Nov 2004 01:24:02 -0000 1.3 *************** *** 2,6 **** /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 2,6 ---- /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: adodb-pear.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/adodb-pear.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-pear.inc.php 19 Oct 2004 00:57:08 -0000 1.2 --- adodb-pear.inc.php 23 Nov 2004 01:24:02 -0000 1.3 *************** *** 1,5 **** <?php /** ! * @version V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. * Released under both BSD license and Lesser GPL library license. * Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /** ! * @version V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. * Released under both BSD license and Lesser GPL library license. * Whenever there is any discrepancy between the two licenses, *************** *** 161,164 **** --- 161,165 ---- foreach($options as $k => $v) { switch(strtolower($k)) { + case 'persist': case 'persistent': $persist = $v; break; #ibase *************** *** 207,211 **** if (!is_object($value)) return false; $class = get_class($value); ! return $class = 'pear_error' || is_subclass_of($value, 'pear_error') || $class == 'db_error' || is_subclass_of($value, 'db_error'); } --- 208,212 ---- if (!is_object($value)) return false; $class = get_class($value); ! return $class == 'pear_error' || is_subclass_of($value, 'pear_error') || $class == 'db_error' || is_subclass_of($value, 'db_error'); } Index: adodb-datadict.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/adodb-datadict.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-datadict.inc.php 19 Oct 2004 00:57:08 -0000 1.2 --- adodb-datadict.inc.php 23 Nov 2004 01:24:02 -0000 1.3 *************** *** 2,6 **** /** ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 2,6 ---- /** ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, *************** *** 23,27 **** function Lens_ParseTest() { ! $str = "`zcol ACOL` NUMBER(32,2) DEFAULT 'The \"cow\" (and Jim''s dog) jumps over the moon' PRIMARY, INTI INT AUTO DEFAULT 0"; print "<p>$str</p>"; $a= Lens_ParseArgs($str); --- 23,27 ---- function Lens_ParseTest() { ! $str = "`zcol ACOL` NUMBER(32,2) DEFAULT 'The \"cow\" (and Jim''s dog) jumps over the moon' PRIMARY, INTI INT AUTO DEFAULT 0, zcol2\"afs ds"; print "<p>$str</p>"; $a= Lens_ParseArgs($str); *************** *** 31,34 **** --- 31,35 ---- } + if (!function_exists('ctype_alnum')) { function ctype_alnum($text) { *************** *** 154,157 **** --- 155,159 ---- $pos += 1; } + if ($intoken) $tokens[$stmtno][] = implode('',$tokarr); return $tokens; Index: adodb-error.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/adodb-error.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-error.inc.php 19 Oct 2004 00:57:08 -0000 1.2 --- adodb-error.inc.php 23 Nov 2004 01:24:02 -0000 1.3 *************** *** 1,5 **** <?php /** ! * @version V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. * Released under both BSD license and Lesser GPL library license. * Whenever there is any discrepancy between the two licenses, --- 1,5 ---- <?php /** ! * @version V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. * Released under both BSD license and Lesser GPL library license. * Whenever there is any discrepancy between the two licenses, Index: adodb-lib.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/adodb-lib.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-lib.inc.php 19 Oct 2004 00:57:08 -0000 1.2 --- adodb-lib.inc.php 23 Nov 2004 01:24:02 -0000 1.3 *************** *** 8,12 **** /* ! @version V4.53 14 Sept 2004 (c) 2000-2004 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, --- 8,12 ---- /* ! @version V4.54 5 Nov 2004 (c) 2000-2004 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, *************** *** 23,26 **** --- 23,27 ---- { if (is_array($an_array)) { + $new_array = array(); foreach($an_array as $key=>$value) $new_array[strtoupper($key)] = $value; *************** *** 115,124 **** if ($multiple or is_array($defstr)) { if ($size==0) $size=5; ! $attr = " multiple size=$size"; if (!strpos($name,'[]')) $name .= '[]'; ! } else if ($size) $attr = " size=$size"; else $attr =''; ! ! $s = "<select name=\"$name\"$attr $selectAttr>"; if ($blank1stItem) if (is_string($blank1stItem)) { --- 116,125 ---- if ($multiple or is_array($defstr)) { if ($size==0) $size=5; ! $attr = ' multiple size="'.$size.'"'; if (!strpos($name,'[]')) $name .= '[]'; ! } else if ($size) $attr = ' size="'.$size.'"'; else $attr =''; ! ! $s = '<select name="'.$name.'"'.$attr.' '.$selectAttr.'>'; if ($blank1stItem) if (is_string($blank1stItem)) { Index: adodb-csvlib.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/adodb-csvlib.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-csvlib.inc.php 19 Oct 2004 00:57:08 -0000 1.2 --- adodb-csvlib.inc.php 23 Nov 2004 01:24:02 -0000 1.3 *************** *** 9,13 **** /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 9,13 ---- /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: adodb-pager.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/adodb-pager.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-pager.inc.php 19 Oct 2004 00:57:08 -0000 1.2 --- adodb-pager.inc.php 23 Nov 2004 01:24:02 -0000 1.3 *************** *** 2,6 **** /* ! V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 2,6 ---- /* ! V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: adodb-exceptions.inc.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/adodb/adodb-exceptions.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adodb-exceptions.inc.php 19 Oct 2004 00:57:08 -0000 1.2 --- adodb-exceptions.inc.php 23 Nov 2004 01:24:02 -0000 1.3 *************** *** 2,6 **** /** ! * @version V4.53 14 Sept 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. * Released under both BSD license and Lesser GPL library license. * Whenever there is any discrepancy between the two licenses, --- 2,6 ---- /** ! * @version V4.54 5 Nov 2004 (c) 2000-2004 John Lim (jl...@na...). All rights reserved. * Released under both BSD license and Lesser GPL library license. * Whenever there is any discrepancy between the two licenses, *************** *** 70,74 **** { global $ADODB_EXCEPTION; ! if (is_string($ADODB_EXCEPTION)) $errfn = $ADODB_EXCEPTION; else $errfn = 'ADODB_EXCEPTION'; --- 70,75 ---- { global $ADODB_EXCEPTION; ! ! if (error_reporting() == 0) return; // obey @ protocol if (is_string($ADODB_EXCEPTION)) $errfn = $ADODB_EXCEPTION; else $errfn = 'ADODB_EXCEPTION'; |
From: Matt M. <pro...@us...> - 2004-11-23 01:24:32
|
Update of /cvsroot/webschool/webschool/theme/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18055/theme/templates Modified Files: admin.lostpass.tpl footer.tpl index.tpl Log Message: Started updating ADODB, then realized that I had other changes. Wanted to save a working version to CVS Index: admin.lostpass.tpl =================================================================== RCS file: /cvsroot/webschool/webschool/theme/templates/admin.lostpass.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** admin.lostpass.tpl 30 Oct 2004 21:56:59 -0000 1.1 --- admin.lostpass.tpl 23 Nov 2004 01:24:03 -0000 1.2 *************** *** 1,11 **** {if $recoveredusername == ""} ! Please enter your username to recieve a new password. Your old one cannot be restored.<br /> <form action="admin.php?action=lostpass" method="POST"> ! <b>Username:</b> <input type="text" name="username" id="username"><br /> ! <center><input type="submit" value="Recieve New Pass"></center> {else} ! A link has been sent to the email associated with the user account: <b>{$recoveredusername}</b> with information on how to ! reset your password. A notification has also been sent to the administrator.<br /> ! <center><input type="button" value="Close" onclick="javascript:window.close();"></center> {/if} --- 1,10 ---- {if $recoveredusername == ""} ! {$lang.passrecover.lost}<br /> <form action="admin.php?action=lostpass" method="POST"> ! <b>{$lang.login_username}</b> <input type="text" name="username" id="username"><br /> ! <center><input type="submit" value="{$lang.passrecover.recievenewpass}"></center> {else} ! {$lang.passrecover.sent}<b>{$recoveredusername}</b><br /> ! <center><input type="button" value="{$lang.close}" onclick="javascript:window.close();"></center> {/if} Index: footer.tpl =================================================================== RCS file: /cvsroot/webschool/webschool/theme/templates/footer.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** footer.tpl 27 Oct 2004 00:56:44 -0000 1.1 --- footer.tpl 23 Nov 2004 01:24:03 -0000 1.2 *************** *** 6,10 **** <center> <font size="-2"> ! SQL Queries: {$sqlqueries} <b>|</b> Execution Time: {$executiontime} milli-seconds ({$dbprecent}% in SQL ~{$dbtime} Milliseconds) </font> </center> --- 6,10 ---- <center> <font size="-2"> ! {$lang.stats.sqlqueries}: {$sqlqueries} <b>|</b> {$lang.stats.executiontime}: {$executiontime} {$lang.stats.milliseconds} ({$dbprecent}% {$lang.stats.insql} ~{$dbtime} {$lang.stats.milliseconds}) </font> </center> *************** *** 17,24 **** <table border="1" cellspacing="5" cellpadding="5"> <tr><td> <font size="-2"> ! This page has been generated by <a href="http://sourceforge.net/projects/webschool">WebSchool</a> Version 0.0.6<br> ! <a href="http://sourceforge.net/projects/webschool">Webschool</a> is copyright 2004 Individual Authors<br> </font> </td></tr> </table> --- 17,26 ---- <table border="1" cellspacing="5" cellpadding="5"> <tr><td> + <center> <font size="-2"> ! {$lang.generatedby} <a href="http://sourceforge.net/projects/webschool">WebSchool</a> {$lang.preversion} {$lang.version}<br> ! <a href="http://sourceforge.net/projects/webschool">Webschool</a> {$lang.copyright}<br> </font> + </center> </td></tr> </table> Index: index.tpl =================================================================== RCS file: /cvsroot/webschool/webschool/theme/templates/index.tpl,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** index.tpl 22 Nov 2004 03:57:14 -0000 1.8 --- index.tpl 23 Nov 2004 01:24:03 -0000 1.9 *************** *** 31,50 **** <center><table><tr><td> ! {include file="tablehead.tpl" tbwidth="310" tbtitle="Recent News"} {foreach from=$recentnews item=v key=k} ! {$v.published|date_format}: <a href="mod.php?mod=News&op=view&id={$v.id}">{$v.prettytitle}</a>{if $v.published != $v.lastupdate}(Updated){/if}<br> {/foreach} {include file="tablefoot.tpl"} </td><td> ! {include file="tablehead.tpl" tbwidth="310" tbtitle="Recent Articles"} {foreach from=$recentarticles item=v key=k} ! {$v.published|date_format}: <a href="mod.php?mod=Articles&op=view&id={$v.id}">{$v.prettytitle}</a>{if $v.published != $v.lastupdate}(Updated){/if}<br> {/foreach} {include file="tablefoot.tpl"} </td></tr></table> <br /> ! {include file="tablehead.tpl" tbwidth="324" tbtitle="Recent Page Updates"} {foreach from=$recentpages item=v key=k} ! {$v.published|date_format}: <a href="mod.php?mod=Pages&op=view&id={$v.id}">{$v.prettytitle}</a>{if $v.published != $v.lastupdate}(Updated){/if}<br> {/foreach} {include file="tablefoot.tpl"} --- 31,50 ---- <center><table><tr><td> ! {include file="tablehead.tpl" tbwidth="310" tbtitle=$lang.index.recentnews} {foreach from=$recentnews item=v key=k} ! {$v.published|date_format}: <a href="mod.php?mod=News&op=view&id={$v.id}">{$v.prettytitle}</a>{if $v.published != $v.lastupdate}($lang.index.updated){/if}<br> {/foreach} {include file="tablefoot.tpl"} </td><td> ! {include file="tablehead.tpl" tbwidth="310" tbtitle=$lang.index.recentarticles} {foreach from=$recentarticles item=v key=k} ! {$v.published|date_format}: <a href="mod.php?mod=Articles&op=view&id={$v.id}">{$v.prettytitle}</a>{if $v.published != $v.lastupdate}($lang.index.updated){/if}<br> {/foreach} {include file="tablefoot.tpl"} </td></tr></table> <br /> ! {include file="tablehead.tpl" tbwidth="324" tbtitle=$lang.index.recentpages} {foreach from=$recentpages item=v key=k} ! {$v.published|date_format}: <a href="mod.php?mod=Pages&op=view&id={$v.id}">{$v.prettytitle}</a>{if $v.published != $v.lastupdate}($lang.index.updated){/if}<br> {/foreach} {include file="tablefoot.tpl"} *************** *** 53,55 **** </td> ! </tr> --- 53,55 ---- </td> ! </tr> \ No newline at end of file |
From: Matt M. <pro...@us...> - 2004-11-23 01:24:32
|
Update of /cvsroot/webschool/webschool/mysql In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18055/mysql Modified Files: webschool.sql Log Message: Started updating ADODB, then realized that I had other changes. Wanted to save a working version to CVS Index: webschool.sql =================================================================== RCS file: /cvsroot/webschool/webschool/mysql/webschool.sql,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** webschool.sql 20 Nov 2004 01:50:51 -0000 1.49 --- webschool.sql 23 Nov 2004 01:24:02 -0000 1.50 *************** *** 103,107 **** ) TYPE=MyISAM AUTO_INCREMENT=2 ; ! INSERT INTO `table_pages` VALUES (1, 'WebSchool Installed Successfully!', 2, '<span>Congratulations, WebSchool has been installed successfully!</span><br /><br />Welcome to WebSchool version 0.0.6. Please note that this version of WebSchool is a <b>alpha</b> and is accordingly not designed for production environments.<br /><br />Limited documentation is available from the <a href="mod.php?mod=Articles&op=view&id=1"><span style="font-style: italic;">Introduction to WebSchool</span> </a>article. Further documentation is planed for our full release, but until then, fell free to visit our <a href="http://dev.bluemavid.net" title="WebSchool Forums">forums</a> for support. Please also note the following important information:<br /><ul><li>The username to get into the administration area is <span style="font-weight: bold;">Administrator</span> and the password is what you set it to in the setup. Please change this as soon as possible.</li><li>Limited documentation is available from the <a href="mod.php?mod=Articles&op=view&id=1"><span style="font-style: italic;">Introduction to WebSchool</span></a> article. This includes basic features and how to administer them.</li><li>The debug information below can be turned off by changing the "debug" option in the Config area of the Admin Control Panel.<br /></li></ul><br />We hope you enjoy this beta release of WebSchool.<br /><br /><span style="font-family: arial,helvetica,sans-serif;">The WebSchool Development Team</span>', '127', '1099153213', '0', 2, ''); DROP TABLE IF EXISTS `table_permissions`; --- 103,107 ---- ) TYPE=MyISAM AUTO_INCREMENT=2 ; ! INSERT INTO `table_pages` VALUES (1, 'WebSchool Installed Successfully!', 2, '<span>Congratulations, WebSchool has been installed successfully!</span><br /><br />Welcome to WebSchool version 0.0.6. Please note that this version of WebSchool is a <b>alpha</b> and is accordingly not designed for production environments.<br /><br />Limited documentation is available from the <a href="mod.php?mod=Articles&op=view&id=1"><span style="font-style: italic;">Introduction to WebSchool</span> </a>article. Further documentation is planed for our full release, but until then, fell free to visit our <a href="http://dev.bluemavid.net" title="WebSchool Forums">forums</a> for support. Please also note the following important information:<br /><ul><li>The username to get into the administration area is <span style="font-weight: bold;">Administrator</span> and the password is what you set it to in the setup. Please change this as soon as possible.</li><li>Limited documentation is available from the <a href="mod.php?mod=Articles&op=view&id=1"><span style="font-style: italic;">Introduction to WebSchool</span></a> article. This includes basic features and how to administer them.</li><li>The debug information below can be turned off by changing the "debug" option in the Config area of the Admin Control Panel.<br /></li></ul><br />We hope you enjoy this beta release of WebSchool.<br /><br /><span style="font-family: arial,helvetica,sans-serif;">The WebSchool Development Team</span>', '1099153213', '1099153213', '0', 2, ''); DROP TABLE IF EXISTS `table_permissions`; |
From: Matt M. <pro...@us...> - 2004-11-23 01:24:32
|
Update of /cvsroot/webschool/webschool/install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18055/install Modified Files: step3.php Log Message: Started updating ADODB, then realized that I had other changes. Wanted to save a working version to CVS Index: step3.php =================================================================== RCS file: /cvsroot/webschool/webschool/install/step3.php,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** step3.php 8 Nov 2004 08:37:03 -0000 1.23 --- step3.php 23 Nov 2004 01:24:01 -0000 1.24 *************** *** 18,22 **** //this is the new installation part ! DEFINE("_WEBSCHOOLVERSION_", "0.0.6a"); if( _InInstall_ && $_REQUEST['installtype'] == "install"){ --- 18,22 ---- //this is the new installation part ! DEFINE("_WEBSCHOOLVERSION_", "0.0.6-CVS"); if( _InInstall_ && $_REQUEST['installtype'] == "install"){ |
From: Matt M. <pro...@us...> - 2004-11-23 01:24:31
|
Update of /cvsroot/webschool/webschool/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18055/lib Modified Files: mainfile.php Log Message: Started updating ADODB, then realized that I had other changes. Wanted to save a working version to CVS Index: mainfile.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/mainfile.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** mainfile.php 20 Nov 2004 01:50:50 -0000 1.8 --- mainfile.php 23 Nov 2004 01:24:02 -0000 1.9 *************** *** 35,39 **** include("lib/config.php"); //make sure it is installed and configured for the 0.0.3 version (future upgrade stuff) ! if( (!_installed_) || (_webschoolversion_ != "0.0.6a") ) { header("Location: install/install.php"); } --- 35,39 ---- include("lib/config.php"); //make sure it is installed and configured for the 0.0.3 version (future upgrade stuff) ! if( (!_installed_) || (_webschoolversion_ != "0.0.6-CVS") ) { header("Location: install/install.php"); } *************** *** 105,108 **** --- 105,113 ---- ///This function, used in smarty, creates an option list with the names of user with given criteria + /* + ProgrammerMatt: Considering that production users may have well over 1000 users, this could be time consuming task and would + result in a huge select box, un-idealic for searching. I think that the "finduser" feature to-be-implemented in admin.php will + easily, and conviently replace this + */ $smarty->register_function("html_option_users", "html_option_users"); function html_option_users($args){ |
From: Matt M. <pro...@us...> - 2004-11-23 01:24:29
|
Update of /cvsroot/webschool/webschool/lang/english In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18055/lang/english Modified Files: admin.lang.php errors.lang.php lang.php Log Message: Started updating ADODB, then realized that I had other changes. Wanted to save a working version to CVS Index: errors.lang.php =================================================================== RCS file: /cvsroot/webschool/webschool/lang/english/errors.lang.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** errors.lang.php 29 Oct 2004 16:42:50 -0000 1.1 --- errors.lang.php 23 Nov 2004 01:24:02 -0000 1.2 *************** *** 1,13 **** <? ! $lang['error']['title'] = "An error has occured"; ! $lang['error']['inescapable'] = "This error has halted the execution of this script"; ! $lang['error']['illegaloperation'] = "An illegal operation has been preformed"; ! $lang['error']['accessdenied'] = "Access is denied"; ! $lang['error']['actioncanceled'] = "Action has been canceled"; ! $lang['error']['configerror'] = "There was a problem with the configuration"; ?> \ No newline at end of file --- 1,13 ---- <? ! $lang['error']['title'] = "An error has occured"; ! $lang['error']['inescapable'] = "This error has halted the execution of this script"; ! $lang['error']['illegaloperation'] = "An illegal operation has been preformed"; ! $lang['error']['accessdenied'] = "Access is denied"; ! $lang['error']['actioncanceled'] = "Action has been canceled"; ! $lang['error']['configerror'] = "There was a problem with the configuration"; ?> \ No newline at end of file Index: admin.lang.php =================================================================== RCS file: /cvsroot/webschool/webschool/lang/english/admin.lang.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** admin.lang.php 5 Nov 2004 02:53:15 -0000 1.2 --- admin.lang.php 23 Nov 2004 01:24:02 -0000 1.3 *************** *** 2,7 **** //password recovery ! $lang['passrecover']['emailsubject'] = "Password Recovery"; ! $lang['passrecover']['emailbody'] = "%s %s, <br /><br /> <p> This is an automatically generated mail message sent in response to your request to reset your password. Your old password will continue working untill you visit this link and reset it. **REVISE THIS MESSAGE**: <a href='admin.php?action=resetpass&username=%s&newpasscode=%s'>Link</a>"; ?> \ No newline at end of file --- 2,27 ---- //password recovery ! $lang['passrecover']['emailsubject'] = "Password Recovery"; ! $lang['passrecover']['emailbody'] = "%s %s, <br /><br /> <p> This is an automatically generated mail " ! . "message sent in response to your request to reset your password. Your old password " ! . "will continue working untill you visit this link and reset it. **REVISE THIS MESSAGE**: " ! . "<a href='admin.php?action=resetpass&username=%s&newpasscode=%s'>Link</a>"; ! $lang['passrecover']['adminnotify'] = "%s %s has requested that they be sent a link to reset their password. It is recommended" ! . "that you check with them to make sure that this is not a hacking attempt"; ! $lang['passrecover']['adminnotifysubject'] = "%s has requested a password reset"; ! ! $lang['passrecover']['lost_sentlink'] = "A link with information on how to reset your password has been sent to the email associated with the user account: "; ! $lang['passrecover']['lost'] = "Please enter your username to recieve a new password. Your old one cannot be restored."; ! $lang['passrecover']['recievenewpass'] = "Recieve New Pass"; ! ! ! //login messages ! $lang["login_usernotfound"] = "Username %s not found"; ! $lang["login_passfail"] = "Passwords do not match"; ! $lang["login_userislocked"] = "User %s is locked"; ! $lang["login_username"] = "Username: "; ! $lang["login_password"] = "Password: "; ! $lang["login_tabletitle"] = "Admin Login"; + ?> \ No newline at end of file Index: lang.php =================================================================== RCS file: /cvsroot/webschool/webschool/lang/english/lang.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** lang.php 31 Oct 2004 01:02:02 -0000 1.5 --- lang.php 23 Nov 2004 01:24:02 -0000 1.6 *************** *** 1,32 **** <? //messages ! $lang["default_tabletitle"] = "WebSchool"; //authentication messages ! $lang["auth_denied"] = "<center><h2>Access Denied</h2></center><br>Access is denied to: <b>".$user['prettyname']."</b><br>You lack sufficient privilages to access this Administrative Module"; ! $lang["auth_action_denied"] = "<center><h2>Action Cancelled</h2></center><br>This action has been cancelled because you lack sufficient privilages to preform this activity."; ! //login messages ! $lang["login_usernotfound"] = "Username %s not found"; ! $lang["login_passfail"] = "Passwords do not match"; ! $lang["login_userislocked"] = "User %s is locked"; ! $lang["login_username"] = "Username: "; ! $lang["login_password"] = "Password: "; ! $lang["login_tabletitle"] = "Admin Login"; ! //months ! $lang["months"]["january"] = "January"; ! $lang["months"]["february"] = "February"; ! $lang["months"]["march"] = "March"; ! $lang["months"]["april"] = "April"; ! $lang["months"]["may"] = "May"; ! $lang["months"]["june"] = "June"; ! $lang["months"]["july"] = "July"; ! $lang["months"]["august"] = "August"; ! $lang["months"]["september"] = "September"; ! $lang["months"]["october"] = "October"; ! $lang["months"]["november"] = "November"; ! $lang["months"]["december"] = "December"; ?> \ No newline at end of file --- 1,46 ---- <? //messages ! $lang["default_tabletitle"] = "WebSchool"; //authentication messages ! $lang["auth_denied"] = "<center><h2>Access Denied</h2></center><br>Access is denied to: <b>".$user['prettyname']."</b><br>You lack sufficient privilages to access this Administrative Module"; ! $lang["auth_action_denied"] = "<center><h2>Action Cancelled</h2></center><br>This action has been cancelled because you lack sufficient privilages to preform this activity."; ! //months ! $lang["months"]["january"] = "January"; ! $lang["months"]["february"] = "February"; ! $lang["months"]["march"] = "March"; ! $lang["months"]["april"] = "April"; ! $lang["months"]["may"] = "May"; ! $lang["months"]["june"] = "June"; ! $lang["months"]["july"] = "July"; ! $lang["months"]["august"] = "August"; ! $lang["months"]["september"] = "September"; ! $lang["months"]["october"] = "October"; ! $lang["months"]["november"] = "November"; ! $lang["months"]["december"] = "December"; ! ! //index ! $lang["index"]["updated"] = "(Updated)"; ! $lang["index"]["recentpages"] = "Recent Page Updates"; ! $lang["index"]["recentarticles"] = "Recent Article Updates"; ! $lang["index"]["recentnews"] = "Recent News Updates"; + //misc + $lang['close'] = "Close"; ! ! //stats ! $lang['stats']['sqlqueries'] = "SQL Queries"; ! $lang['stats']['executiontime'] = "Execution Time"; ! $lang['stats']['milliseconds'] = "milli-seconds"; ! $lang['stats']['insql'] = "in SQL"; ! ! //copyright ! $lang['preversion'] = "Version"; ! $lang['version'] = "0.0.6-CVS"; ! // IT IS A BREACH OF COPYRIGHT LAW TO MODIFY THE BELOW LINES EXCEPT WITH PURPOSE OF TRANSLATION ! $lang['generatedby'] = "This page has been generated by "; ! $lang['copyright'] = "is copyright individual authors"; ?> \ No newline at end of file |
From: Matt M. <pro...@us...> - 2004-11-22 03:57:27
|
Update of /cvsroot/webschool/webschool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29585 Modified Files: index.php Log Message: took some html out of php in the index file Index: index.php =================================================================== RCS file: /cvsroot/webschool/webschool/index.php,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** index.php 1 Nov 2004 23:06:37 -0000 1.26 --- index.php 22 Nov 2004 03:57:13 -0000 1.27 *************** *** 36,61 **** //recent news ! db(__FILE__,__LINE__,"SELECT prettytitle, published, id FROM "._NEWS_." WHERE published!='' ORDER By published DESC LIMIT ".$config['recentnews']); ! $recentnews=""; while( $row = dbr() ) { ! $recentnews .= date("m/d/y",$row['published']).": <a href=\"mod.php?mod=News&op=view&id=".$row['id']."\">".$row['prettytitle']."</a><br>"; } ! $smarty->assign("recentnews", $recentnews); //recent articles db2(__FILE__,__LINE__,"SELECT prettytitle, published, id, lastupdate FROM "._ARTICLES_." WHERE published != '' ORDER BY published DESC LIMIT ".$config['recentarticles']); - $recentarticles=""; while( $row = dbr2() ) { ! $recentarticles .= date("m/d/y",$row['published']).": <a href=\"mod.php?mod=Articles&op=view&id=".$row['id']."\">".$row['prettytitle']."</a><br>"; } - $smarty->assign("recentarticles", $recentarticles); ! db3(__FILE__,__LINE__,"SELECT prettytitle, published, id FROM "._PAGES_." WHERE published!='' && onindex=0 ORDER BY published DESC LIMIT ".$config['recentpages']); ! $recentpages=""; while( $row = dbr3() ) { ! $recentpages .= date("m/d/y",$row['published']).": <a href=\"mod.php?mod=Pages&id=".$row['id']."\">".$row['prettytitle']."</a><br>"; } ! $smarty->assign("recentpages", $recentpages); //_____ Center Data --- 36,61 ---- //recent news ! db(__FILE__,__LINE__,"SELECT prettytitle, published, id, lastupdate FROM "._NEWS_." WHERE published!='' ORDER By published DESC LIMIT ".$config['recentnews']); while( $row = dbr() ) { ! $smarty->append("recentnews", array("lastupdate"=>$row['lastupdate'], "published"=>$row['published'], "id"=>$row['id'], "prettytitle"=>$row['prettytitle']) ); ! //$recentnews .= date("m/d/y",$row['published']).": <a href=\"mod.php?mod=News&op=view&id=".$row['id']."\">".$row['prettytitle']."</a><br>"; } ! //recent articles db2(__FILE__,__LINE__,"SELECT prettytitle, published, id, lastupdate FROM "._ARTICLES_." WHERE published != '' ORDER BY published DESC LIMIT ".$config['recentarticles']); while( $row = dbr2() ) { ! $smarty->append("recentarticles", array("lastupdate"=>$row['lastupdate'], "published"=>$row['published'], "id"=>$row['id'], "prettytitle"=>$row['prettytitle']) ); ! //$recentarticles .= date("m/d/y",$row['published']).": <a href=\"mod.php?mod=Articles&op=view&id=".$row['id']."\">".$row['prettytitle']."</a><br>"; } ! ! db3(__FILE__,__LINE__,"SELECT prettytitle, published, id, lastupdate FROM "._PAGES_." WHERE published!='' && onindex=0 ORDER BY published DESC LIMIT ".$config['recentpages']); while( $row = dbr3() ) { ! $smarty->append("recentpages", array("lastupdate"=>$row['lastupdate'], "published"=>$row['published'], "id"=>$row['id'], "prettytitle"=>$row['prettytitle']) ); ! //$recentpages .= date("m/d/y",$row['published']).": <a href=\"mod.php?mod=Pages&id=".$row['id']."\">".$row['prettytitle']."</a><br>"; } ! //_____ Center Data |
From: Matt M. <pro...@us...> - 2004-11-22 03:57:27
|
Update of /cvsroot/webschool/webschool/theme/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29585/theme/templates Modified Files: index.tpl Log Message: took some html out of php in the index file Index: index.tpl =================================================================== RCS file: /cvsroot/webschool/webschool/theme/templates/index.tpl,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** index.tpl 1 Nov 2004 23:06:40 -0000 1.7 --- index.tpl 22 Nov 2004 03:57:14 -0000 1.8 *************** *** 32,45 **** <center><table><tr><td> {include file="tablehead.tpl" tbwidth="310" tbtitle="Recent News"} ! {$recentnews} {include file="tablefoot.tpl"} </td><td> {include file="tablehead.tpl" tbwidth="310" tbtitle="Recent Articles"} ! {$recentarticles} {include file="tablefoot.tpl"} </td></tr></table> <br /> {include file="tablehead.tpl" tbwidth="324" tbtitle="Recent Page Updates"} ! {$recentpages} {include file="tablefoot.tpl"} </center> --- 32,51 ---- <center><table><tr><td> {include file="tablehead.tpl" tbwidth="310" tbtitle="Recent News"} ! {foreach from=$recentnews item=v key=k} ! {$v.published|date_format}: <a href="mod.php?mod=News&op=view&id={$v.id}">{$v.prettytitle}</a>{if $v.published != $v.lastupdate}(Updated){/if}<br> ! {/foreach} {include file="tablefoot.tpl"} </td><td> {include file="tablehead.tpl" tbwidth="310" tbtitle="Recent Articles"} ! {foreach from=$recentarticles item=v key=k} ! {$v.published|date_format}: <a href="mod.php?mod=Articles&op=view&id={$v.id}">{$v.prettytitle}</a>{if $v.published != $v.lastupdate}(Updated){/if}<br> ! {/foreach} {include file="tablefoot.tpl"} </td></tr></table> <br /> {include file="tablehead.tpl" tbwidth="324" tbtitle="Recent Page Updates"} ! {foreach from=$recentpages item=v key=k} ! {$v.published|date_format}: <a href="mod.php?mod=Pages&op=view&id={$v.id}">{$v.prettytitle}</a>{if $v.published != $v.lastupdate}(Updated){/if}<br> ! {/foreach} {include file="tablefoot.tpl"} </center> |
From: jsvoyager <jsv...@us...> - 2004-11-21 20:20:46
|
Update of /cvsroot/webschool/webschool/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32446/admin Modified Files: academia.php Log Message: Haven't done this in a while, so thought I should Index: academia.php =================================================================== RCS file: /cvsroot/webschool/webschool/admin/academia.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** academia.php 10 Nov 2004 05:15:15 -0000 1.2 --- academia.php 21 Nov 2004 20:19:24 -0000 1.3 *************** *** 64,69 **** dbn(__FILE__,__LINE__,$query); - - Header("Location: {$AMOD}"); }else{ //Show the add class page --- 64,67 ---- *************** *** 93,96 **** --- 91,95 ---- }elseif (isset($_GET['assign'])){ //Modify an assignment + echo ("Still debating what I want to do..."); }else{ error(__FILE__,__LINE__,"Unknown: What to modify", -1, true); *************** *** 99,104 **** --- 98,107 ---- if (isset($_GET['aid'])){ //Delete a class + $query = "DELETE FROM "._ACADEMIA_." WHERE id='" . $_GET['aid'] . "'"; + dbn(__FILE__,__LINE__,$query); }elseif (isset($_GET['assign'])){ //Delete an assignment + $query = "DELETE FROM "._ASSIGNMENTS_." WHERE id='" . $_GET['assign'] . "'"; + dbn(__FILE__,__LINE__,$query); }else{ error(__FILE__,__LINE__,"Unknown: What to delete", -1, true); *************** *** 107,114 **** --- 110,135 ---- if (isset($_GET['aid'])){ //Delete all assignments from a class + $query = "DELETE FROM "._ASSIGNMENTS_." WHERE aid='" . $_GET['aid'] . "'"; + dbn(__FILE__,__LINE__,$query); }elseif (isset($_GET['assign'])){ //Delete a single assignments + $query = "DELETE FROM "._ASSIGNMENTS_." WHERE id='" . $_GET['assign'] . "'"; + dbn(__FILE__,__LINE__,$query); }else{ //No specific given, so clear all assignments from all (owned) classes + //Get owned classes, if not admin + if ($perm['academia'] < 3){ + $query2 = "SELECT * FROM "._ACADEMIA_." WHERE instructor='" . $user['id'] . "'"; + }else{ + $query2 = "SELECT * FROM "._ACADEMIA_; + } + db(__FILE__,__LINE__,$query2); + + $query3 = "DELETE FROM "._ASSIGNMENTS_." WHERE "; + while ($class = dbr()){ + $query3 .= "aid='" . $class['id'] . "' OR "; + } + $query3 .= " id='-1'"; + dbn(__FILE__,__LINE__,$query3); } }elseif ($_GET['op'] == "clearfile"){ *************** *** 116,120 **** //Delete all files from a class }elseif (isset($_GET['assign'])){ ! //Delete all files associated with a give assignenment }elseif (isset($_GET['file'])){ //Delete a specific file --- 137,141 ---- //Delete all files from a class }elseif (isset($_GET['assign'])){ ! //Delete all files associated with a given assignenment }elseif (isset($_GET['file'])){ //Delete a specific file |
From: jsvoyager <jsv...@us...> - 2004-11-21 20:20:44
|
Update of /cvsroot/webschool/webschool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32446 Modified Files: mod.php Log Message: Haven't done this in a while, so thought I should Index: mod.php =================================================================== RCS file: /cvsroot/webschool/webschool/mod.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** mod.php 18 Nov 2004 01:30:20 -0000 1.17 --- mod.php 21 Nov 2004 20:19:23 -0000 1.18 *************** *** 37,40 **** --- 37,42 ---- } elseif ( is_dir(_fileroot_."mods/".$item) ){ + } elseif ( is_dir(_fileroot_."mods/".$item) ){ + /* foreach ($modules as $k=>$v) { if ($v['dirname'] == $item) { *************** *** 42,45 **** --- 44,54 ---- } } + + foreach ($modules as $k=>$v) { + if( $modules[$k]['found'] !== true ) { + echo "PROBLEM in $v"; + } + } + */ } |