tutos-commits Mailing List for TUTOS (Page 450)
Projects / CRM / PLM / Calendar / Tasks / SCRUM / Test / Inventory
Brought to you by:
gokohnert
You can subscribe to this list here.
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(13) |
Aug
(214) |
Sep
(144) |
Oct
(22) |
Nov
(22) |
Dec
(93) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2002 |
Jan
(25) |
Feb
(31) |
Mar
(92) |
Apr
(70) |
May
(103) |
Jun
(130) |
Jul
(265) |
Aug
(325) |
Sep
(233) |
Oct
(244) |
Nov
(261) |
Dec
(157) |
| 2003 |
Jan
(101) |
Feb
(135) |
Mar
(148) |
Apr
(164) |
May
(53) |
Jun
(116) |
Jul
(149) |
Aug
(126) |
Sep
(45) |
Oct
(109) |
Nov
(36) |
Dec
(61) |
| 2004 |
Jan
(131) |
Feb
(236) |
Mar
(278) |
Apr
(259) |
May
(92) |
Jun
(110) |
Jul
(150) |
Aug
(64) |
Sep
(141) |
Oct
(141) |
Nov
(146) |
Dec
(65) |
| 2005 |
Jan
(70) |
Feb
(77) |
Mar
(129) |
Apr
(153) |
May
(161) |
Jun
(63) |
Jul
(42) |
Aug
(16) |
Sep
(30) |
Oct
(3) |
Nov
(8) |
Dec
(40) |
| 2006 |
Jan
(114) |
Feb
(16) |
Mar
(12) |
Apr
(15) |
May
(4) |
Jun
(9) |
Jul
(69) |
Aug
(27) |
Sep
(12) |
Oct
(80) |
Nov
(62) |
Dec
(41) |
| 2007 |
Jan
(34) |
Feb
(2) |
Mar
(38) |
Apr
(82) |
May
(61) |
Jun
(37) |
Jul
(16) |
Aug
(64) |
Sep
(7) |
Oct
(52) |
Nov
(18) |
Dec
(28) |
| 2008 |
Jan
(168) |
Feb
(26) |
Mar
(27) |
Apr
(19) |
May
(10) |
Jun
(58) |
Jul
(58) |
Aug
(91) |
Sep
(14) |
Oct
(23) |
Nov
(56) |
Dec
(38) |
| 2009 |
Jan
(58) |
Feb
(90) |
Mar
(204) |
Apr
(90) |
May
(27) |
Jun
(177) |
Jul
(116) |
Aug
(53) |
Sep
(42) |
Oct
(120) |
Nov
(51) |
Dec
(58) |
| 2010 |
Jan
(117) |
Feb
(231) |
Mar
(163) |
Apr
(90) |
May
(40) |
Jun
(139) |
Jul
(49) |
Aug
(118) |
Sep
(25) |
Oct
(80) |
Nov
(102) |
Dec
(99) |
| 2011 |
Jan
(176) |
Feb
(42) |
Mar
(60) |
Apr
(52) |
May
(30) |
Jun
(29) |
Jul
(27) |
Aug
(16) |
Sep
(51) |
Oct
(70) |
Nov
(63) |
Dec
(58) |
| 2012 |
Jan
(28) |
Feb
(26) |
Mar
(7) |
Apr
(12) |
May
(41) |
Jun
(61) |
Jul
(59) |
Aug
(38) |
Sep
(30) |
Oct
(28) |
Nov
(14) |
Dec
(31) |
| 2013 |
Jan
(24) |
Feb
(54) |
Mar
(45) |
Apr
(22) |
May
(35) |
Jun
(8) |
Jul
(18) |
Aug
(38) |
Sep
(11) |
Oct
(8) |
Nov
(19) |
Dec
(20) |
| 2014 |
Jan
(20) |
Feb
(22) |
Mar
(4) |
Apr
(6) |
May
(13) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(6) |
| 2015 |
Jan
|
Feb
(1) |
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(1) |
| 2016 |
Jan
(4) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
(2) |
Aug
(4) |
Sep
(1) |
Oct
(1) |
Nov
(1) |
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
(8) |
Aug
(13) |
Sep
(12) |
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
| 2021 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Gero K. <gok...@us...> - 2001-09-27 20:22:01
|
Update of /cvsroot/tutos/tutos/php
In directory usw-pr-cvs1:/tmp/cvs-serv17683/php
Modified Files:
watchlist_del.php
Log Message:
removed garbage
Index: watchlist_del.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/watchlist_del.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** watchlist_del.php 2001/09/27 19:46:44 1.10
--- watchlist_del.php 2001/09/27 20:21:58 1.11
***************
*** 13,22 ****
include("appointment.pinc");
include("timetrack.pinc");
- Add a
-
- include ("timetrack.pinc");
-
- at the beginning of php/watchlist_ins.php" and also
- in "php/watchlist_del.php"
/* Check if user is allowed to use it */
--- 13,16 ----
|
|
From: Gero K. <gok...@us...> - 2001-09-27 19:58:39
|
Update of /cvsroot/tutos/tutos/php
In directory usw-pr-cvs1:/tmp/cvs-serv8267/php
Modified Files:
map_select.php
Log Message:
better readable headline
Index: map_select.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/map_select.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** map_select.php 2001/09/10 16:43:22 1.4
--- map_select.php 2001/09/27 19:58:36 1.5
***************
*** 9,13 ****
include("webelements.p3");
include("permission.p3");
- include("bug.pinc");
/* Check if user is allowed to use it */
--- 9,12 ----
***************
*** 27,31 ****
echo " <input type=\"hidden\" name=\"event\" value=\"find_search\">\n";
DoubleTableStart();
! echo "<TR><TH COLSPAN=2>". sprintf($lang['MapHeader'],"<A HREF=\"http://www.mapquest.com\" TARGET=map>www.mapquest.com</A>") ."</TH></TR>\n";
echo "<TR></TR>\n";
--- 26,30 ----
echo " <input type=\"hidden\" name=\"event\" value=\"find_search\">\n";
DoubleTableStart();
! echo "<TR><TH COLSPAN=2>". sprintf($lang['MapHeader'],"<A CLASS=nodeco HREF=\"http://www.mapquest.com\" TARGET=map>www.mapquest.com</A>") ."</TH></TR>\n";
echo "<TR></TR>\n";
|
Update of /cvsroot/tutos/tutos/php In directory usw-pr-cvs1:/tmp/cvs-serv5490/php Modified Files: de.p3 en.p3 es-mx.p3 es.p3 fr.p3 it.p3 ko.p3 nl.p3 pl.p3 pt-br.p3 ru.p3 tw.p3 zh.p3 Log Message: language extended Index: de.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/de.p3,v retrieving revision 1.73 retrieving revision 1.74 diff -C2 -r1.73 -r1.74 *** de.p3 2001/09/19 20:51:38 1.73 --- de.p3 2001/09/27 19:48:39 1.74 *************** *** 569,572 **** --- 569,573 ---- $lang['Location'] = "Anschrift"; $lang['Location2'] = "Ort"; + $lang['AdrTitle'] = "Anrede"; $lang['AdrFirstName'] = "Vorname"; $lang['AdrMiddleName'] = "2. Vorname"; Index: en.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/en.p3,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -r1.66 -r1.67 *** en.p3 2001/09/19 20:51:38 1.66 --- en.p3 2001/09/27 19:48:41 1.67 *************** *** 569,572 **** --- 569,573 ---- $lang['Location'] = "Location"; $lang['Location2'] = "Location"; + $lang['AdrTitle'] = "Title"; $lang['AdrFirstName'] = "First Name"; $lang['AdrMiddleName'] = "Middle Inital"; Index: es-mx.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/es-mx.p3,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** es-mx.p3 2001/09/13 19:08:00 1.1 --- es-mx.p3 2001/09/27 19:48:41 1.2 *************** *** 571,574 **** --- 571,575 ---- $lang['Location'] = "ubicación"; $lang['Location2'] = "donde"; + $lang['AdrTitle'] = "Title"; $lang['AdrFirstName'] = "Nombre"; $lang['AdrMiddleName'] = "Iniciales"; *************** *** 764,767 **** --- 765,769 ---- $lang['DBrelogin'] = "use Database"; $lang['DBreloginI'] = "relogin on %s"; + $lang['DBOverview'] = "Database Overview"; # Permissions Index: es.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/es.p3,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -r1.50 -r1.51 *** es.p3 2001/09/13 19:08:00 1.50 --- es.p3 2001/09/27 19:48:41 1.51 *************** *** 571,574 **** --- 571,575 ---- $lang['Location'] = "ubicación"; $lang['Location2'] = "donde"; + $lang['AdrTitle'] = "Title"; $lang['AdrFirstName'] = "Nombre"; $lang['AdrMiddleName'] = "Iniciales"; *************** *** 764,767 **** --- 765,769 ---- $lang['DBrelogin'] = "use Database"; $lang['DBreloginI'] = "relogin on %s"; + $lang['DBOverview'] = "Database Overview"; # Permissions Index: fr.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/fr.p3,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -r1.49 -r1.50 *** fr.p3 2001/09/13 19:08:00 1.49 --- fr.p3 2001/09/27 19:48:41 1.50 *************** *** 571,574 **** --- 571,575 ---- $lang['Location'] = "Lieu"; $lang['Location2'] = "Lieu"; + $lang['AdrTitle'] = "Title"; $lang['AdrFirstName'] = "Prenom"; $lang['AdrMiddleName'] = "2eme Prénom"; *************** *** 764,767 **** --- 765,769 ---- $lang['DBrelogin'] = "use Database"; $lang['DBreloginI'] = "relogin on %s"; + $lang['DBOverview'] = "Database Overview"; # Permissions Index: it.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/it.p3,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -r1.58 -r1.59 *** it.p3 2001/09/13 19:08:00 1.58 --- it.p3 2001/09/27 19:48:41 1.59 *************** *** 569,572 **** --- 569,573 ---- $lang['Location'] = "Locazione"; $lang['Location2'] = "Locazione"; + $lang['AdrTitle'] = "Title"; $lang['AdrFirstName'] = "Nome"; $lang['AdrMiddleName'] = "2.Nome"; *************** *** 762,765 **** --- 763,767 ---- $lang['DBrelogin'] = "use Database"; $lang['DBreloginI'] = "relogin on %s"; + $lang['DBOverview'] = "Database Overview"; # Permissions Index: ko.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/ko.p3,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** ko.p3 2001/09/13 19:08:00 1.24 --- ko.p3 2001/09/27 19:48:41 1.25 *************** *** 569,572 **** --- 569,573 ---- $lang['Location'] = "Location"; $lang['Location2'] = "Location"; + $lang['AdrTitle'] = "Title"; $lang['AdrFirstName'] = "¼º"; $lang['AdrMiddleName'] = "Middle Inital"; *************** *** 762,765 **** --- 763,767 ---- $lang['DBrelogin'] = "use Database"; $lang['DBreloginI'] = "relogin on %s"; + $lang['DBOverview'] = "Database Overview"; # Permissions Index: nl.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/nl.p3,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** nl.p3 2001/09/13 19:08:00 1.17 --- nl.p3 2001/09/27 19:48:41 1.18 *************** *** 571,574 **** --- 571,575 ---- $lang['Location'] = "Lokatie"; $lang['Location2'] = "Soort"; + $lang['AdrTitle'] = "Title"; $lang['AdrFirstName'] = "Voornaam"; $lang['AdrMiddleName'] = "Initaal"; *************** *** 764,767 **** --- 765,769 ---- $lang['DBrelogin'] = "use Database"; $lang['DBreloginI'] = "relogin on %s"; + $lang['DBOverview'] = "Database Overview"; # Permissions Index: pl.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/pl.p3,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** pl.p3 2001/09/13 19:08:00 1.22 --- pl.p3 2001/09/27 19:48:41 1.23 *************** *** 575,578 **** --- 575,579 ---- $lang['Location'] = "Miejsce"; $lang['Location2'] = "Miejsce"; + $lang['AdrTitle'] = "Title"; $lang['AdrFirstName'] = "Imiê"; $lang['AdrMiddleName'] = "Inicja³ drugiego imienia"; *************** *** 768,771 **** --- 769,773 ---- $lang['DBrelogin'] = "use Database"; $lang['DBreloginI'] = "relogin on %s"; + $lang['DBOverview'] = "Database Overview"; # Permissions Index: pt-br.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/pt-br.p3,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -r1.37 -r1.38 *** pt-br.p3 2001/09/13 19:08:00 1.37 --- pt-br.p3 2001/09/27 19:48:41 1.38 *************** *** 571,574 **** --- 571,575 ---- $lang['Location'] = "Localização"; $lang['Location2'] = "Localização"; + $lang['AdrTitle'] = "Title"; $lang['AdrFirstName'] = "Primeiro nome"; $lang['AdrMiddleName'] = "Inicial do meio"; *************** *** 764,767 **** --- 765,769 ---- $lang['DBrelogin'] = "use Database"; $lang['DBreloginI'] = "relogin on %s"; + $lang['DBOverview'] = "Database Overview"; # Permissions Index: ru.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/ru.p3,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -r1.44 -r1.45 *** ru.p3 2001/09/13 19:08:00 1.44 --- ru.p3 2001/09/27 19:48:41 1.45 *************** *** 569,572 **** --- 569,573 ---- $lang['Location'] = "íÅÓÔÏ"; $lang['Location2'] = "íÅÓÔÏ"; + $lang['AdrTitle'] = "Title"; $lang['AdrFirstName'] = "éÍÑ"; $lang['AdrMiddleName'] = "ïÔÞÅÓÔ×Ï"; *************** *** 762,765 **** --- 763,767 ---- $lang['DBrelogin'] = "use Database"; $lang['DBreloginI'] = "relogin on %s"; + $lang['DBOverview'] = "Database Overview"; # Permissions Index: tw.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/tw.p3,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -r1.44 -r1.45 *** tw.p3 2001/09/13 19:08:00 1.44 --- tw.p3 2001/09/27 19:48:41 1.45 *************** *** 573,576 **** --- 573,577 ---- $lang['Location'] = "¦ì¸m"; $lang['Location2'] = "¦ì¸m"; + $lang['AdrTitle'] = "Title"; $lang['AdrFirstName'] = "¦W"; $lang['AdrMiddleName'] = "§O¦W"; *************** *** 766,769 **** --- 767,771 ---- $lang['DBrelogin'] = "use Database"; $lang['DBreloginI'] = "relogin on %s"; + $lang['DBOverview'] = "Database Overview"; # Permissions Index: zh.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/zh.p3,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -r1.44 -r1.45 *** zh.p3 2001/09/13 19:08:00 1.44 --- zh.p3 2001/09/27 19:48:41 1.45 *************** *** 573,576 **** --- 573,577 ---- $lang['Location'] = "λÖÃ"; $lang['Location2'] = "λÖÃ"; + $lang['AdrTitle'] = "Title"; $lang['AdrFirstName'] = "Ãû"; $lang['AdrMiddleName'] = "±ðÃû"; *************** *** 766,769 **** --- 767,771 ---- $lang['DBrelogin'] = "use Database"; $lang['DBreloginI'] = "relogin on %s"; + $lang['DBOverview'] = "Database Overview"; # Permissions |
|
From: Gero K. <gok...@us...> - 2001-09-27 19:46:47
|
Update of /cvsroot/tutos/tutos/php
In directory usw-pr-cvs1:/tmp/cvs-serv5059/php
Modified Files:
watchlist_del.php
Log Message:
bugfix 465142
Index: watchlist_del.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/watchlist_del.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** watchlist_del.php 2001/09/11 19:53:03 1.9
--- watchlist_del.php 2001/09/27 19:46:44 1.10
***************
*** 10,14 ****
--- 10,23 ----
include("bug.pinc");
include("installation.pinc");
+ include("file.pinc");
+ include("appointment.pinc");
+ include("timetrack.pinc");
+ Add a
+ include ("timetrack.pinc");
+
+ at the beginning of php/watchlist_ins.php" and also
+ in "php/watchlist_del.php"
+
/* Check if user is allowed to use it */
check_user();
***************
*** 42,44 ****
* $Author$
*/
! ?>
\ No newline at end of file
--- 51,53 ----
* $Author$
*/
! ?>
|
|
From: Gero K. <gok...@us...> - 2001-09-27 19:40:23
|
Update of /cvsroot/tutos/tutos/php
In directory usw-pr-cvs1:/tmp/cvs-serv3591/php
Modified Files:
address.pinc address_ins.php address_new.php address_show.php
address_tools.p3
Log Message:
added title field
Index: address.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/address.pinc,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -r1.46 -r1.47
*** address.pinc 2001/09/19 20:46:07 1.46
--- address.pinc 2001/09/27 19:40:20 1.47
***************
*** 45,48 ****
--- 45,49 ----
$this->id = $r->get($pos, "id");
+ $this->larray[] = "title";
$this->larray[] = "l_name";
$this->larray[] = "f_name";
***************
*** 193,196 ****
--- 194,207 ----
}
/* ---------------------------------------------------------------------------
+ * set the title
+ */
+ function setTitle($new) {
+ if ( $this->title != $new ) {
+ $this->modified[] = array ( "field" => "AdrTitle" , "old" => $this->title , "new" => $new );
+ $this->title = $new;
+ }
+ return;
+ }
+ /* ---------------------------------------------------------------------------
* set the first name
*/
***************
*** 236,239 ****
--- 247,252 ----
$flds = "id";
$vals = $this->id;
+ $flds .= ",title";
+ $vals .= "," . $this->dbconn->String($this->title) ;
$flds .= ",f_name";
$vals .= "," . $this->dbconn->String($this->f_name) ;
***************
*** 263,267 ****
} else {
$q = "UPDATE addresses SET ";
! $q .= " f_name = " . $this->dbconn->String($this->f_name);
$q .= ", l_name = " . $this->dbconn->String($this->l_name);
$q .= ", m_name = " . $this->dbconn->String($this->m_name);
--- 276,281 ----
} else {
$q = "UPDATE addresses SET ";
! $q .= " title = " . $this->dbconn->String($this->title);
! $q .= ", f_name = " . $this->dbconn->String($this->f_name);
$q .= ", l_name = " . $this->dbconn->String($this->l_name);
$q .= ", m_name = " . $this->dbconn->String($this->m_name);
Index: address_ins.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/address_ins.php,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** address_ins.php 2001/09/19 20:46:07 1.17
--- address_ins.php 2001/09/27 19:40:20 1.18
***************
*** 104,107 ****
--- 104,108 ----
if ( $msg == "" ) {
+ $a->setTitle($title);
$a->setFName($f_name);
$a->setLName($l_name);
Index: address_new.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/address_new.php,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -r1.19 -r1.20
*** address_new.php 2001/09/16 16:35:38 1.19
--- address_new.php 2001/09/27 19:40:20 1.20
***************
*** 115,118 ****
--- 115,122 ----
# FIRST NAME
+ add_entry ($lang['AdrTitle'],'title',$address->title,$modadr,10,3);
+ echo "</TR><TR>\n";
+
+ # FIRST NAME
add_entry ($lang['AdrFirstName'],'f_name',$address->f_name,$modadr,30,3);
echo "</TR><TR>\n";
Index: address_show.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/address_show.php,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -r1.19 -r1.20
*** address_show.php 2001/09/10 16:35:44 1.19
--- address_show.php 2001/09/27 19:40:20 1.20
***************
*** 40,43 ****
--- 40,45 ----
echo "<TR><TH COLSPAN=". $x .">". $lang['AddressEntries'] ."</TH></TR>\n";
+ Show_LocFields($lang['AdrTitle'],$a,"title",0);
+
Show_LocFields($lang['AdrFirstName'],$a,"f_name",0);
Index: address_tools.p3
===================================================================
RCS file: /cvsroot/tutos/tutos/php/address_tools.p3,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -r1.32 -r1.33
*** address_tools.p3 2001/09/19 20:46:07 1.32
--- address_tools.p3 2001/09/27 19:40:20 1.33
***************
*** 121,137 ****
echo " </TABLE>\n";
echo " </TD>\n";
! } elseif ( $name == "f_name" ) {
echo " <TD COLSPAN=". $s ."> ". htmlspecialchars($a->$name) ." </TD>\n";
! if ( $a->pic_id < 1) {
! echo " <TD COLSPAN=1 ROWSPAN=4 VALIGN=top ALIGN=right> </TD>\n";
! } else {
! # $a->read_picture();
! echo " <TD COLSPAN=1 ROWSPAN=4 VALIGN=top ALIGN=right>\n";
! echo makelink("file_show.php?format=show&id=". $a->pic_id,
! "<IMG HEIGHT=80 BORDER=0 SRC=\"". addSessionKey("file_show.php?format=show&id=". $a->pic_id) ."\">");
! echo "</TD>\n";
! }
} else {
! echo " <TD COLSPAN=$s> ". htmlspecialchars($a->$name) ." </TD>\n";
}
}
--- 121,137 ----
echo " </TABLE>\n";
echo " </TD>\n";
! } elseif ( $name == "title" ) {
echo " <TD COLSPAN=". $s ."> ". htmlspecialchars($a->$name) ." </TD>\n";
! if ( $a->pic_id < 1) {
! echo " <TD COLSPAN=1 ROWSPAN=5 VALIGN=top ALIGN=right> </TD>\n";
! } else {
! # $a->read_picture();
! echo " <TD COLSPAN=1 ROWSPAN=5 VALIGN=top ALIGN=right>\n";
! echo makelink("file_show.php?format=show&id=". $a->pic_id,
! "<IMG HEIGHT=80 BORDER=0 SRC=\"". addSessionKey("file_show.php?format=show&id=". $a->pic_id) ."\">");
! echo "</TD>\n";
! }
} else {
! echo " <TD COLSPAN=". $s ."> ". htmlspecialchars($a->$name) ." </TD>\n";
}
}
|
|
From: Gero K. <gok...@us...> - 2001-09-27 19:35:37
|
Update of /cvsroot/tutos/tutos/php
In directory usw-pr-cvs1:/tmp/cvs-serv2247/php
Modified Files:
url.pinc
Log Message:
bugfix 465312
Index: url.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/url.pinc,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -r1.27 -r1.28
*** url.pinc 2001/09/19 20:50:10 1.27
--- url.pinc 2001/09/27 19:35:35 1.28
***************
*** 129,144 ****
}
/* ---------------------------------------------------------------------------
! * Return a link to this appointment
*/
function getUrl() {
- # Do not use makelink here !!!
return $this->url;
}
/* ---------------------------------------------------------------------------
! * Return a link to this appointment
*/
function getLink() {
# Do not use makelink here !!!
! return "<A HREF=".$this->url .">". $this->name . "</A>";
}
/* ---------------------------------------------------------------------------
--- 129,143 ----
}
/* ---------------------------------------------------------------------------
! * Return the url
*/
function getUrl() {
return $this->url;
}
/* ---------------------------------------------------------------------------
! * Return a link
*/
function getLink() {
# Do not use makelink here !!!
! return "<A HREF=".$this->url ." TARGET=url>". $this->name . "</A>";
}
/* ---------------------------------------------------------------------------
|
|
From: Gero K. <gok...@us...> - 2001-09-27 19:34:30
|
Update of /cvsroot/tutos/tutos/php
In directory usw-pr-cvs1:/tmp/cvs-serv1948/php
Modified Files:
minical.php Date.pinc
Log Message:
bugfix 465562 465096 / new holiday file inclusion
Index: minical.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/minical.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** minical.php 2001/08/30 13:21:30 1.7
--- minical.php 2001/09/27 19:34:27 1.8
***************
*** 41,45 ****
}
if ( $m == -1 ) {
! $m = Date("m");
}
if ( $y == -1 ) {
--- 41,45 ----
}
if ( $m == -1 ) {
! $m = Date("n");
}
if ( $y == -1 ) {
***************
*** 77,80 ****
--- 77,82 ----
$ts = mktime(12,0,0,$m,1,$y);
+ $today=Date("Ymd",time());
+
/* Back to last Monday before ts */
while ( Date("D",$ts) != "Mon" ) {
***************
*** 96,106 ****
$col = "";
! if ($xm != $m ) {
$col = "appday";
} else if ($wd == 0 ) {
$col = "holiday";
! } else if ( ( $xm == $m ) && ( $xd == $d ) && ( $xy == $y ) ) {
! $col = "today";
! }
echo "<TD ALIGN=right CLASS=". $col .">\n";
echo "<FONT SIZE=-1>\n";
--- 98,108 ----
$col = "";
! if ( $today == Date("Ymd",$ts) ) {
! $col = "today";
! } else if ($xm != $m ) {
$col = "appday";
} else if ($wd == 0 ) {
$col = "holiday";
! }
echo "<TD ALIGN=right CLASS=". $col .">\n";
echo "<FONT SIZE=-1>\n";
Index: Date.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/Date.pinc,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -r1.37 -r1.38
*** Date.pinc 2001/09/19 20:50:10 1.37
--- Date.pinc 2001/09/27 19:34:27 1.38
***************
*** 58,84 ****
}
! if ($tutos[holiday]['AT'] == 1) {
! include "holiday_de_at.pinc";
}
- if ($tutos[holiday]['DE'] == 1) {
- include "holiday_de.pinc";
- }
-
- if ($tutos[holiday]['HU'] == 1) {
- include "holiday_hu.pinc";
- }
-
- if ($tutos[holiday]['IT'] == 1) {
- include "holiday_it.pinc";
- }
-
- if ($tutos[holiday]['US'] == 1) {
- include "holiday_us.pinc";
- }
-
- if ($tutos[holiday]['MX'] == 1) {
- include "holiday_mx.pinc";
- }
return;
}
--- 58,68 ----
}
! @reset($tutos[holiday]);
! while( list ($i,$f) = @each ($tutos[holiday])) {
! if ($f == 1) {
! include "holiday_". strtolower($i) .".pinc";
! }
}
return;
}
***************
*** 673,677 ****
*/
function EnterDate($name,$none = 0) {
! global $HTTP_USER_AGENT, $tutos;
if ( $tutos['df'] == 1 ) {
--- 657,661 ----
*/
function EnterDate($name,$none = 0) {
! global $PHPSESSID,$HTTP_USER_AGENT, $tutos;
if ( $tutos['df'] == 1 ) {
***************
*** 696,700 ****
mywindow = window.open('', 'calendar', 'width=200,height=200,top=100,left=100');
mywindow.location.href = 'minical.php?f=".$name."&n=".$none."&d=".
! $this->day ."&m=". $this->month ."&y=". $this->year ."';
mywindow.focus();
\" "self.status='minical' ;return true\">\n";
--- 680,685 ----
mywindow = window.open('', 'calendar', 'width=200,height=200,top=100,left=100');
mywindow.location.href = 'minical.php?f=".$name."&n=".$none."&d=".
! $this->day ."&m=". $this->month ."&y=". $this->year
! ."&PHPSESSID=". $PHPSESSID ."';
mywindow.focus();
\" "self.status='minical' ;return true\">\n";
|
|
From: Gero K. <gok...@us...> - 2001-09-27 19:30:24
|
Update of /cvsroot/tutos/tutos/php
In directory usw-pr-cvs1:/tmp/cvs-serv857/php
Added Files:
holiday_es.pinc holiday_fr.pinc holiday_ko.pinc
holiday_nl.pinc holiday_pl.pinc holiday_ru.pinc
Log Message:
Initial Checkin
--- NEW FILE: holiday_es.pinc ---
<?
/*
* Copyright 2001 by Gero Kohnert
*
* CVS Info: $Id: holiday_es.pinc,v 1.1 2001/09/27 19:30:21 gokohnert Exp $
* $Author: gokohnert $
*/
$tutos[cal][] = array(
array( Date => "12-10", Desc => "Columbusday (ES)"),
);
?>
--- NEW FILE: holiday_fr.pinc ---
<?
/*
* Copyright 2001 by Gero Kohnert
*
* CVS Info: $Id: holiday_fr.pinc,v 1.1 2001/09/27 19:30:21 gokohnert Exp $
* $Author: gokohnert $
*/
$tutos[cal][] = array(
array( Date => "14-07", Desc => "National Holiday (F)"),
);
?>
--- NEW FILE: holiday_ko.pinc ---
<?
/*
* Copyright 2001 by Gero Kohnert
*
* CVS Info: $Id: holiday_ko.pinc,v 1.1 2001/09/27 19:30:21 gokohnert Exp $
* $Author: gokohnert $
*/
$tutos[cal][] = array(
array( Date => "15-08", Desc => "National Holiday (KO)"),
);
?>
--- NEW FILE: holiday_nl.pinc ---
<?
/*
* Copyright 2001 by Gero Kohnert
*
* CVS Info: $Id: holiday_nl.pinc,v 1.1 2001/09/27 19:30:21 gokohnert Exp $
* $Author: gokohnert $
*/
$tutos[cal][] = array(
array( Date => "30-04", Desc => "Königinnentag (NL)"),
);
?>
--- NEW FILE: holiday_pl.pinc ---
<?
/*
* Copyright 2001 by Gero Kohnert
*
* CVS Info: $Id: holiday_pl.pinc,v 1.1 2001/09/27 19:30:21 gokohnert Exp $
* $Author: gokohnert $
*/
$tutos[cal][] = array(
array( Date => "03-05", Desc => "National Holiday (PL)"),
);
?>
--- NEW FILE: holiday_ru.pinc ---
<?
/*
* Copyright 2001 by Gero Kohnert
*
* CVS Info: $Id: holiday_ru.pinc,v 1.1 2001/09/27 19:30:21 gokohnert Exp $
* $Author: gokohnert $
*/
$tutos[cal][] = array(
array( Date => "12-06", Desc => "National Holiday (RU)"),
);
?>
|
|
From: Gero K. <gok...@us...> - 2001-09-19 20:51:41
|
Update of /cvsroot/tutos/tutos/php
In directory usw-pr-cvs1:/tmp/cvs-serv601/php
Modified Files:
check.php config.pinc de.p3 en.p3 install.php location.pinc
location_ins.php message_overview.php mytutos.php note.pinc
note_overview.php res_cal.php scheme.php
Log Message:
pre holiday checkin
Index: check.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/check.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** check.php 2001/09/16 19:29:00 1.16
--- check.php 2001/09/19 20:51:38 1.17
***************
*** 31,35 ****
$q = "SELECT * FROM calendar WHERE remember > 0 AND remembered = 0";
$r = $dbconn->Exec($q);
! $n = DB_NumRows($r);
$a = 0;
while ($a < $n) {
--- 31,35 ----
$q = "SELECT * FROM calendar WHERE remember > 0 AND remembered = 0";
$r = $dbconn->Exec($q);
! $n = $r->numrows();
$a = 0;
while ($a < $n) {
***************
*** 96,100 ****
$r2 = $dbconn->Exec($q);
}
! $dbconn->FreeResult ($r);
#
# Checking for OPEN bugs that stay for too long
--- 96,100 ----
$r2 = $dbconn->Exec($q);
}
! $r->free();
#
# Checking for OPEN bugs that stay for too long
***************
*** 103,107 ****
$q = "SELECT * FROM bugs WHERE state = 1";
$r = $dbconn->Exec($q);
! $n = DB_NumRows($r);
$a = 0;
while ($a < $n) {
--- 103,107 ----
$q = "SELECT * FROM bugs WHERE state = 1";
$r = $dbconn->Exec($q);
! $n = $r->numrows();
$a = 0;
while ($a < $n) {
***************
*** 120,127 ****
$q1 = "SELECT * FROM bugremember WHERE id = ". $b->id;
$r1 = $dbconn->Exec($q1);
! $n1 = DB_NumRows($r1);
$a1 = 0;
while ( ($a1 < $n1) && ($diff < 0) ) {
! $d1 = new DateTime(DB_Result($r1, $a1, "r_time"));
$diff = $d1->getTimestamp() - $d->getTimeStamp() + ($tutos[bugremember] * 60);
$a1++;
--- 120,127 ----
$q1 = "SELECT * FROM bugremember WHERE id = ". $b->id;
$r1 = $dbconn->Exec($q1);
! $n1 = $r1->numrows();
$a1 = 0;
while ( ($a1 < $n1) && ($diff < 0) ) {
! $d1 = new DateTime($r1->get($a1, "r_time"));
$diff = $d1->getTimestamp() - $d->getTimeStamp() + ($tutos[bugremember] * 60);
$a1++;
***************
*** 177,181 ****
}
}
! $dbconn->FreeResult ($r);
}
--- 177,181 ----
}
}
! $r->free();
}
***************
*** 187,191 ****
$q = "SELECT * FROM notes WHERE remember < ". $dbconn->DateTime($r) ." ";
$r = $dbconn->Exec($q);
! $n = DB_NumRows($r);
$a = 0;
while ($a < $n) {
--- 187,191 ----
$q = "SELECT * FROM notes WHERE remember < ". $dbconn->DateTime($r) ." ";
$r = $dbconn->Exec($q);
! $n = $r->numrows();
$a = 0;
while ($a < $n) {
***************
*** 228,232 ****
$a++;
}
! $dbconn->FreeResult ($r);
#
#
--- 228,232 ----
$a++;
}
! $r->free();
#
#
Index: config.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/config.pinc,v
retrieving revision 1.71
retrieving revision 1.72
diff -C2 -r1.71 -r1.72
*** config.pinc 2001/09/16 19:29:00 1.71
--- config.pinc 2001/09/19 20:51:38 1.72
***************
*** 86,98 ****
$tutos[repository][2] = "../repository2";
# --------------------------
! # $tutos[dbname][3] = "webber";
! # $tutos[dbhost][3] = "DataMiner01";
! # $tutos[dbport][3] = 5432;
! # $tutos[dbuser][3] = "nobody";
! # $tutos[dbpasswd][3] = "";
! # $tutos[dbtype][3] = 1;
! # $tutos[dbalias][3] = "EA1";
! # $tutos[cryptpw][3] = 0;
! # $tutos[repository][3] = "../repository3";
# --------------------------
#
--- 86,99 ----
$tutos[repository][2] = "../repository2";
# --------------------------
! $tutos[dbname][3] = "TDB";
! $tutos[dbhost][3] = "faust";
! $tutos[dbport][3] = 0;
! $tutos[dbuser][3] = "wwwrun";
! $tutos[dbpasswd][3] = "tutos";
! $tutos[dbtype][3] = 3;
! $tutos[dbalias][3] = "ORA Faust";
! $tutos[cryptpw][3] = 1;
! $tutos[repository][3] = "../repository3";
! $tutos[dbhome][3] = "/opt/oracle/";
# --------------------------
#
Index: de.p3
===================================================================
RCS file: /cvsroot/tutos/tutos/php/de.p3,v
retrieving revision 1.72
retrieving revision 1.73
diff -C2 -r1.72 -r1.73
*** de.p3 2001/09/13 20:38:08 1.72
--- de.p3 2001/09/19 20:51:38 1.73
***************
*** 762,765 ****
--- 762,766 ----
$lang['DBrelogin'] = "Datenbank benutzen";
$lang['DBreloginI'] = "Anmelden mit Datenbank %s";
+ $lang['DBOverview'] = "Datenbankübersicht";
# Permissions
Index: en.p3
===================================================================
RCS file: /cvsroot/tutos/tutos/php/en.p3,v
retrieving revision 1.65
retrieving revision 1.66
diff -C2 -r1.65 -r1.66
*** en.p3 2001/09/13 19:08:00 1.65
--- en.p3 2001/09/19 20:51:38 1.66
***************
*** 762,765 ****
--- 762,766 ----
$lang['DBrelogin'] = "use Database";
$lang['DBreloginI'] = "relogin on %s";
+ $lang['DBOverview'] = "Database Overview";
# Permissions
Index: install.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/install.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** install.php 2001/09/10 19:52:51 1.4
--- install.php 2001/09/19 20:51:38 1.5
***************
*** 108,116 ****
echo " <I>$q</I><BR>\n";
$r = $dbconn->Exec($q);
! if ( 1 != DB_NumRows($r)) {
echo " <SPAN CLASS=warn>failed</SPAN><BR>\n";
return -1;
}
! DB_FreeResult ($r);
# Creating a superuser
--- 108,116 ----
echo " <I>$q</I><BR>\n";
$r = $dbconn->Exec($q);
! if ( 1 != $r->numrows()) {
echo " <SPAN CLASS=warn>failed</SPAN><BR>\n";
return -1;
}
! $r->free();
# Creating a superuser
Index: location.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/location.pinc,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** location.pinc 2001/09/17 20:18:52 1.15
--- location.pinc 2001/09/19 20:51:38 1.16
***************
*** 32,45 ****
$r = $obj->dbconn->Exec($q);
! $n = $obj->dbconn->NumRows($r);
$a = 0;
while ( $a < $n ) {
! $l_id = DB_Result($r, $a, "loc_id");
! $obj->loc[$l_id] = StripSlashes(DB_Result($r, $a, "name"));
$a++;
}
! $obj->dbconn->FreeResult ($r);
$obj->rl1 = 1;
return;
--- 32,45 ----
$r = $obj->dbconn->Exec($q);
! $n = $r->numrows();
$a = 0;
while ( $a < $n ) {
! $l_id = $r->get($a, "loc_id");
! $obj->loc[$l_id] = StripSlashes($r->get($a, "name"));
$a++;
}
! $r->free();
$obj->rl1 = 1;
return;
***************
*** 144,148 ****
$i=0;
! if ( DB_NumRows($result) != 1 ) {
return;
}
--- 144,148 ----
$i=0;
! if ( $result->numrows() != 1 ) {
return;
}
***************
*** 150,157 ****
@reset($this->larray);
while( list ($i,$f) = @each ($this->larray)) {
! $this->$f = StripSlashes(DB_Result($result, 0, "$f"));
}
! $c_id = DB_Result($result, 0, "c_id");
! $d_id = DB_Result($result, 0, "d_id");
if ( !empty($d_id) ) {
--- 150,157 ----
@reset($this->larray);
while( list ($i,$f) = @each ($this->larray)) {
! $this->$f = StripSlashes($result->get(0, "$f"));
}
! $c_id = $result->get(0, "c_id");
! $d_id = $result->get(0, "d_id");
if ( !empty($d_id) ) {
***************
*** 164,169 ****
}
! $this->category = DB_Result($result, 0, "category");
! $this->id = DB_Result($result, 0, "id");
$g_loc[$this->id] = $this;
--- 164,169 ----
}
! $this->category = $result->get(0, "category");
! $this->id = $result->get(0, "id");
$g_loc[$this->id] = $this;
Index: location_ins.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/location_ins.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** location_ins.php 2001/09/17 20:18:52 1.14
--- location_ins.php 2001/09/19 20:51:38 1.15
***************
*** 76,80 ****
$regex = '^([._a-z0-9-]+[._a-z0-9-]*)@(([a-z0-9-]+\.)*([a-z0-9-]+)(\.[a-z]{2,3}))$';
if ( isset($email_1) ) {
! $email_1 = trim($emai_1);
if ( ($email_1 != "") && !eregi($regex,$email_1)) {
$msg .= sprintf($lang['Err0043'],$email_1);
--- 76,80 ----
$regex = '^([._a-z0-9-]+[._a-z0-9-]*)@(([a-z0-9-]+\.)*([a-z0-9-]+)(\.[a-z]{2,3}))$';
if ( isset($email_1) ) {
! $email_1 = trim($email_1);
if ( ($email_1 != "") && !eregi($regex,$email_1)) {
$msg .= sprintf($lang['Err0043'],$email_1);
***************
*** 127,129 ****
* $Author$
*/
! ?>
\ No newline at end of file
--- 127,129 ----
* $Author$
*/
! ?>
Index: message_overview.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/message_overview.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** message_overview.php 2001/09/16 19:29:00 1.5
--- message_overview.php 2001/09/19 20:51:38 1.6
***************
*** 18,22 ****
$result = $dbconn->Exec($query);
! $n = DB_NumRows($result);
if ( 0 == $n) {
return;
--- 18,22 ----
$result = $dbconn->Exec($query);
! $n = $result->numrows();
if ( 0 == $n) {
return;
***************
*** 39,44 ****
while ( ($a < $n) && ($a < $end) ) {
echo "<TR>\n";
! echo " <TD>". DB_Result($result, $a, "ts") ."</TD>\n";
! echo " <TD>". DB_Result($result, $a, $dbconn->colname("message")) ."</TD>\n";
echo "</TR>\n";
$a++;
--- 39,44 ----
while ( ($a < $n) && ($a < $end) ) {
echo "<TR>\n";
! echo " <TD>". $result->get($a, "ts") ."</TD>\n";
! echo " <TD>". $result->get($a, $dbconn->colname("message")) ."</TD>\n";
echo "</TR>\n";
$a++;
***************
*** 47,50 ****
--- 47,51 ----
ShowBackForwardNav($link1,2,$start,$a,$n);
echo "</TABLE>\n";
+ $result->free();
}
Index: mytutos.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/mytutos.php,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -r1.37 -r1.38
*** mytutos.php 2001/09/10 16:57:32 1.37
--- mytutos.php 2001/09/19 20:51:38 1.38
***************
*** 157,161 ****
$q .= ") order by creation DESC";
$r = $adr->dbconn->Exec($q);
! $n = DB_NumRows($r);
$a = 0;
--- 157,161 ----
$q .= ") order by creation DESC";
$r = $adr->dbconn->Exec($q);
! $n = $r->numrows();
$a = 0;
***************
*** 175,179 ****
echo " <TR>\n";
echo " <TD>" . $f->getLink() ."</TD>\n";
! $role = DB_Result($r, $a, "role_id");
if ( $f->creator->id == $adr->id ) {
echo " <TD> </TD>\n";
--- 175,179 ----
echo " <TR>\n";
echo " <TD>" . $f->getLink() ."</TD>\n";
! $role = $r->get($a, "role_id");
if ( $f->creator->id == $adr->id ) {
echo " <TD> </TD>\n";
***************
*** 187,191 ****
}
info_table_end();
! $adr->dbconn->FreeResult($r);
}
/* ---------------------------------------------------------------------------
--- 187,191 ----
}
info_table_end();
! $r->free();
}
/* ---------------------------------------------------------------------------
***************
*** 197,201 ****
$q = "SELECT * from bugs where (creator = ". $adr->id ." or solver = ". $adr->id .") and state <> 4 order by creation DESC";
$r = $adr->dbconn->Exec($q);
! $n = DB_NumRows($r);
$a = 0;
--- 197,201 ----
$q = "SELECT * from bugs where (creator = ". $adr->id ." or solver = ". $adr->id .") and state <> 4 order by creation DESC";
$r = $adr->dbconn->Exec($q);
! $n = $r->numrows();
$a = 0;
***************
*** 217,221 ****
}
info_table_end();
! $adr->dbconn->FreeResult($r);
}
/* ---------------------------------------------------------------------------
--- 217,221 ----
}
info_table_end();
! $r->free();
}
/* ---------------------------------------------------------------------------
***************
*** 227,231 ****
$q = "SELECT * from notes where creator = ". $adr->id ." or link_id = ". $adr->id ." order by creation DESC";
$r = $adr->dbconn->Exec($q);
! $n = DB_NumRows($r);
$a = 0;
--- 227,231 ----
$q = "SELECT * from notes where creator = ". $adr->id ." or link_id = ". $adr->id ." order by creation DESC";
$r = $adr->dbconn->Exec($q);
! $n = $r->numrows();
$a = 0;
***************
*** 248,252 ****
}
info_table_end();
! $adr->dbconn->FreeResult($r);
}
/* ---------------------------------------------------------------------------
--- 248,252 ----
}
info_table_end();
! $r->free();
}
/* ---------------------------------------------------------------------------
***************
*** 258,262 ****
$q = "SELECT * from files where author = ". $adr->id ." or creator = ". $adr->id ." or link_id = ". $adr->id ." order by creation DESC";
$r = $adr->dbconn->Exec($q);
! $n = DB_NumRows($r);
$a = 0;
--- 258,262 ----
$q = "SELECT * from files where author = ". $adr->id ." or creator = ". $adr->id ." or link_id = ". $adr->id ." order by creation DESC";
$r = $adr->dbconn->Exec($q);
! $n = $r->numrows();
$a = 0;
***************
*** 278,282 ****
}
info_table_end();
! $adr->dbconn->FreeResult($r);
}
/* ---------------------------------------------------------------------------
--- 278,282 ----
}
info_table_end();
! $r->free();
}
/* ---------------------------------------------------------------------------
Index: note.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/note.pinc,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -r1.40 -r1.41
*** note.pinc 2001/09/16 19:08:33 1.40
--- note.pinc 2001/09/19 20:51:38 1.41
***************
*** 65,69 ****
$q = "SELECT * from notes where link_id = ". $obj->id ." order by creation desc";
$r = $obj->dbconn->Exec($q);
! $n = DB_NumRows($r);
$a = 0;
while ($a < $n) {
--- 65,69 ----
$q = "SELECT * from notes where link_id = ". $obj->id ." order by creation desc";
$r = $obj->dbconn->Exec($q);
! $n = $r->numrows();
$a = 0;
while ($a < $n) {
***************
*** 75,78 ****
--- 75,79 ----
$a++;
}
+ $r->free();
return;
}
***************
*** 97,115 ****
/* ---------------------------------------------------------------------------
*/
! function read_result (&$result, $pos ) {
global $g_note;
! $this->link_id = DB_Result($result, $pos, "link_id");
! $this->name = StripSlashes(DB_Result($result, $pos, "name"));
! $this->note = StripSlashes(DB_Result($result, $pos, "note"));
! $this->id = DB_Result($result, $pos, "id");
! $this->creation = new DateTime(DB_Result($result, $pos, "creation"));
!
! $r = DB_Result($result, $pos, "remember");
! if ( $r != "" ) {
! $this->remember = new DateTime($r);
}
! $cid = DB_Result($result, $pos, "creator");
$this->creator = new tutos_address($this->dbconn);
$this->creator->read($cid);
--- 98,116 ----
/* ---------------------------------------------------------------------------
*/
! function read_result (&$r, $pos ) {
global $g_note;
! $this->link_id = $r->get($pos, "link_id");
! $this->name = StripSlashes($r->get($pos, "name"));
! $this->note = StripSlashes($r->get($pos, "note"));
! $this->id = $r->get($pos, "id");
! $this->creation = new DateTime($r->get($pos, "creation"));
!
! $x = $r->get($pos, "remember");
! if ( $x != "" ) {
! $this->remember = new DateTime($x);
}
! $cid = $r->get($pos, "creator");
$this->creator = new tutos_address($this->dbconn);
$this->creator->read($cid);
***************
*** 134,143 ****
$q = "SELECT * from notes where id = ". $id;
$r = $this->dbconn->Exec($q);
! $n = DB_NumRows($r);
if ( 0 == $n) {
return;
}
$this->read_result($r,0);
! $this->dbconn->FreeResult ($r);
}
/* ---------------------------------------------------------------------------
--- 135,144 ----
$q = "SELECT * from notes where id = ". $id;
$r = $this->dbconn->Exec($q);
! $n = $r->numrows();
if ( 0 == $n) {
return;
}
$this->read_result($r,0);
! $r->free();
}
/* ---------------------------------------------------------------------------
Index: note_overview.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/note_overview.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** note_overview.php 2001/09/10 16:39:04 1.9
--- note_overview.php 2001/09/19 20:51:38 1.10
***************
*** 24,28 ****
global $lang,$tutos,$link1,$format,$filter;
! $n = $dbconn->NumRows($result);
if ( 0 == $n) {
echo $lang['Err0048'];
--- 24,28 ----
global $lang,$tutos,$link1,$format,$filter;
! $n = $result->numrows();
if ( 0 == $n) {
echo $lang['Err0048'];
***************
*** 132,135 ****
--- 132,137 ----
$filter['name'] = $name;
+ } else {
+ $filter['name'] = "";
}
***************
*** 300,303 ****
--- 302,306 ----
HTML_Base3();
+ $result->free();
$dbconn->Close();
?>
Index: res_cal.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/res_cal.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** res_cal.php 2001/09/10 16:43:22 1.15
--- res_cal.php 2001/09/19 20:51:38 1.16
***************
*** 81,88 ****
$result1 = $dbconn->Exec($q1);
! $n1 = DB_NumRows($result1);
$result2 = $dbconn->Exec($q2);
! $n2 = DB_NumRows($result2);
--- 81,88 ----
$result1 = $dbconn->Exec($q1);
! $n1 = $result1->numrows();
$result2 = $dbconn->Exec($q2);
! $n2 = $result2->numrows();
***************
*** 132,136 ****
$a++;
}
! $dbconn->FreeResult ($result1);
echo "<!-- $n1 $n2 $maxr -->\n";
--- 132,136 ----
$a++;
}
! $result1->free();
echo "<!-- $n1 $n2 $maxr -->\n";
***************
*** 189,193 ****
$a++;
}
! $dbconn->FreeResult ($result2);
echo "<TR>\n";
--- 189,193 ----
$a++;
}
! $result2->free();
echo "<TR>\n";
Index: scheme.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/scheme.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** scheme.php 2001/09/16 19:23:54 1.7
--- scheme.php 2001/09/19 20:51:38 1.8
***************
*** 58,62 ****
$dbconn->Begin("WORK");
! if ( ($r != "") && (1 == $dbconn->NumRows($r)) ) {
$q = "drop sequence id";
$r = $dbconn->Exec($q,0);
--- 58,62 ----
$dbconn->Begin("WORK");
! if ( ($r != "") && (1 == $r->numrows()) ) {
$q = "drop sequence id";
$r = $dbconn->Exec($q,0);
***************
*** 120,127 ****
! echo @$dbconn->NumRows($r);flush();
# return;
! if ( $r == "" || (1 != $dbconn->NumRows($r))) {
echo " Does not exist<BR>\n";
flush();
--- 120,127 ----
! echo @$r->numrows();flush();
# return;
! if ( $r == "" || (1 != $r->numrows())) {
echo " Does not exist<BR>\n";
flush();
|
|
From: Gero K. <gok...@us...> - 2001-09-19 20:51:17
|
Update of /cvsroot/tutos/tutos/php
In directory usw-pr-cvs1:/tmp/cvs-serv527/php
Modified Files:
admin_show.php admin_sync.php
Log Message:
more table handling
Index: admin_show.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/admin_show.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -r1.18 -r1.19
*** admin_show.php 2001/09/17 20:29:31 1.18
--- admin_show.php 2001/09/19 20:51:14 1.19
***************
*** 32,35 ****
--- 32,36 ----
$counts['mailboxes'] = 0;
$counts['resources'] = 0;
+ $counts['tutos_dbs'] = 0;
$counts['watchlist'] = 0;
$counts['history'] = 0;
***************
*** 38,48 ****
$q = "SELECT count(*) as c from ". $i;
$r = $dbconn->exec($q);
! if ( 1 != $dbconn->NumRows($r)) {
HTML_Footer();
$dbconn->Close();
exit;
}
! $counts[$i] = $dbconn->result($r, 0, "c");
! $dbconn->FreeResult($r);
}
}
--- 39,49 ----
$q = "SELECT count(*) as c from ". $i;
$r = $dbconn->exec($q);
! if ( 1 != $r->numrows()) {
HTML_Footer();
$dbconn->Close();
exit;
}
! $counts[$i] = $r->get(0, "c");
! $r->free();
}
}
***************
*** 69,72 ****
--- 70,74 ----
$url['companies'] = "company_overview.php";
$url['resources'] = "resource_overview.php";
+ $url['tutos_dbs'] = "database_overview.php";
$url['watchlist'] = "watchlist_overview.php";
$url['history'] = "history_show.php";
***************
*** 87,92 ****
echo "<TR>\n";
if ( $dbconn->gettype() == "Oracle" ) {
! showfield($lang['ProdPath']);
! echo " <TD COLSPAN=3>". $dbconn->db->path ."</TD>\n";
} else {
showfield($lang['AdminDBHost']);
--- 89,94 ----
echo "<TR>\n";
if ( $dbconn->gettype() == "Oracle" ) {
! showfield($lang['AdminDBHome']);
! echo " <TD COLSPAN=3>". $dbconn->db->home ." </TD>\n";
} else {
showfield($lang['AdminDBHost']);
***************
*** 136,140 ****
$q = "SELECT * from people order by last_seen DESC";
$r = $dbconn->Exec($q);
! $n = $dbconn->NumRows($r);
$a = 0;
$line = 1;
--- 138,142 ----
$q = "SELECT * from people order by last_seen DESC";
$r = $dbconn->Exec($q);
! $n = $r->numrows();
$a = 0;
$line = 1;
***************
*** 147,160 ****
echo "<TR CLASS=line". $line .">\n";
$adr = new tutos_address($dbconn);
! $adr->read($dbconn->Result($r, $a, "adr_id"));
! $uid = $dbconn->Result($r, $a, "id");
echo " <TD>". $adr->getLink() ."</TD>";
! echo " <TD ALIGN=right>". makelink("user_new.php?id=".$adr->id ,$dbconn->Result($r, $a, "login")) ."</TD>";
! $ls = new DateTime($dbconn->Result($r, $a, "last_seen"));
echo " <TD>". $ls->getLinkDateTime() ."</TD>";
! echo " <TD> ". $dbconn->Result($r, $a, "last_host") ."</TD>";
echo "</TR>\n";
$a++;
}
echo "</TABLE>\n";
}
--- 149,163 ----
echo "<TR CLASS=line". $line .">\n";
$adr = new tutos_address($dbconn);
! $adr->read($r->get($a, "adr_id"));
! $uid = $r->get($a, "id");
echo " <TD>". $adr->getLink() ."</TD>";
! echo " <TD ALIGN=right>". makelink("user_new.php?id=".$adr->id ,$r->get($a, "login")) ."</TD>";
! $ls = new DateTime($r->get($a, "last_seen"));
echo " <TD>". $ls->getLinkDateTime() ."</TD>";
! echo " <TD> ". $r->get($a, "last_host") ."</TD>";
echo "</TR>\n";
$a++;
}
+ $r->free();
echo "</TABLE>\n";
}
Index: admin_sync.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/admin_sync.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** admin_sync.php 2001/09/16 19:22:22 1.3
--- admin_sync.php 2001/09/19 20:51:14 1.4
***************
*** 33,36 ****
--- 33,39 ----
$table[] = "acl";
$table[] = "history";
+ $table[] = "watchlist";
+ $table[] = "mailboxes";
+ $table[] = "messages";
/* ---------------------------------------------------------------------------
***************
*** 46,53 ****
$q = "SELECT * from ". $f;
$r = $dbconn1->Exec("SELECT * from ". $f);
! $n = $dbconn1->numrows($r);
! $fc = $dbconn1->numfields($r);
echo "<B>SOURCE:</B> ". $q ." ===> ". $n ." Entries <BR>\n";
!
$q = "DELETE from ". $f;
$dbconn2->Exec($q);
--- 49,59 ----
$q = "SELECT * from ". $f;
$r = $dbconn1->Exec("SELECT * from ". $f);
! $n = $r->numrows();
! $fc = $r->numfields();
echo "<B>SOURCE:</B> ". $q ." ===> ". $n ." Entries <BR>\n";
! if ( $fc == 0 ) {
! echo "<SPAN CLASS=warn> ". $fc ." COLUMNS ???</SPAN><BR>\n";
! return;
! }
$q = "DELETE from ". $f;
$dbconn2->Exec($q);
***************
*** 61,71 ****
$pre = "(";
while ( $b < $fc ) {
! $fv = $dbconn1->result($r,$a,$b);
if ( $fv == "" ) {
$b++;
continue;
}
! $ft = $dbconn1->fieldtype($r,$b);
! $fn = $dbconn1->fieldname($r,$b);
# OLD VERSION
if ( ($f == "products") && ( ($fn == "manager") || ($fn == "seller") || ($fn == "manager2") ) ) {
--- 67,77 ----
$pre = "(";
while ( $b < $fc ) {
! $fn = strtoupper($r->fieldname($b));
! $fv = $r->get($a,$fn);
if ( $fv == "" ) {
$b++;
continue;
}
! $ft = strtoupper($r->fieldtype($b));
# OLD VERSION
if ( ($f == "products") && ( ($fn == "manager") || ($fn == "seller") || ($fn == "manager2") ) ) {
***************
*** 73,77 ****
continue;
}
! if ( ($f == "files") && ( ($fn == "size") ) ) {
$b++;
continue;
--- 79,83 ----
continue;
}
! if ( ($f == "files") && ( ($fn == "SIZE") ) ) {
$b++;
continue;
***************
*** 80,95 ****
$flds .= $pre. $dbconn2->colname($fn);
! if ( ($ft == "varchar") || ($ft == "string") || ($ft == "blob") || ($ft == "text") ) {
$vals .= $pre. $dbconn2->String($fv);
! } else if ( $ft == "date" ) {
$dt = new DateTime($fv);
$vals .= $pre. $dbconn2->Date($dt);
! } else if ( ($ft == "timestamp") || ($ft == "datetime") ) {
$dt = new DateTime($fv);
$vals .= $pre. $dbconn2->DateTime($dt);
! } else if ( eregi("^int",$ft) || ($ft == "real") || ($ft == "float8") ) {
$vals .= $pre. $fv;
} else {
! $vals .= $pre."<SPAN CLASS=warn>". $ft. "</SPAN> ". $dbconn1->result($r,$a,$b);
echo $flds . $vals ;
exit;
--- 86,101 ----
$flds .= $pre. $dbconn2->colname($fn);
! if ( ($ft == "VARCHAR") || ($ft == "VARCHAR2") || ($ft == "STRING") || ($ft == "TEXT") || ($ft == "VARYING")) {
$vals .= $pre. $dbconn2->String($fv);
! } else if ( $ft == "DATE" ) {
$dt = new DateTime($fv);
$vals .= $pre. $dbconn2->Date($dt);
! } else if ( ($ft == "TIMESTAMP") || ($ft == "DATETIME") ) {
$dt = new DateTime($fv);
$vals .= $pre. $dbconn2->DateTime($dt);
! } else if ( eregi("^INT",$ft) || ($ft == "REAL") || ($ft == "FLOAT8") || ($ft == "LONG") ) {
$vals .= $pre. $fv;
} else {
! $vals .= $pre."<SPAN CLASS=warn>". $ft. "</SPAN> ". $r->get($a,$b);
echo $flds . $vals ;
exit;
***************
*** 98,101 ****
--- 104,112 ----
$b++;
}
+ if ( $pre == "(" ) {
+ echo "<SPAN CLASS=warn> no values ???</SPAN><BR>\n";
+ return;
+ }
+
$flds .= ")";
$vals .= ")";
***************
*** 108,112 ****
echo " <===<BR>\n";
! $dbconn1->freeresult($r);
flush();
--- 119,123 ----
echo " <===<BR>\n";
! $r->free();
flush();
***************
*** 238,243 ****
echo "<TR>\n";
showfield("History new");
! echo " <TD>". $dbconn1->numrows($r1) ."</TD>\n";
! echo " <TD>". $dbconn2->numrows($r2) ."</TD>\n";
echo "</TR>\n";
--- 249,254 ----
echo "<TR>\n";
showfield("History new");
! echo " <TD>". $r1->numrows() ."</TD>\n";
! echo " <TD>". $r2->numrows() ."</TD>\n";
echo "</TR>\n";
***************
*** 256,261 ****
echo "<TR>\n";
showfield("History del");
! echo " <TD>". $dbconn1->numrows($r3) ."</TD>\n";
! echo " <TD>". $dbconn2->numrows($r4) ."</TD>\n";
echo "</TR>\n";
--- 267,272 ----
echo "<TR>\n";
showfield("History del");
! echo " <TD>". $r3->numrows() ."</TD>\n";
! echo " <TD>". $r4->numrows() ."</TD>\n";
echo "</TR>\n";
|
|
From: Gero K. <gok...@us...> - 2001-09-19 20:50:13
|
Update of /cvsroot/tutos/tutos/php
In directory usw-pr-cvs1:/tmp/cvs-serv32745/php
Modified Files:
acl.pinc acl_overview.php bug.pinc bug_overview.php db.p3
history.pinc watchlist_overview.php webelements.p3
calendar.php Date.pinc url.pinc
Log Message:
new resultset classes for databases
Index: acl.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/acl.pinc,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** acl.pinc 2001/09/16 19:29:00 1.16
--- acl.pinc 2001/09/19 20:50:10 1.17
***************
*** 57,64 ****
$r = $obj->dbconn->Exec($q);
! $n = DB_NumRows($r);
$a = 0;
while ($a < $n) {
! $obj->acl[DB_Result($r, $a, "adr_id")] = DB_Result($r, $a, "perm");
$a++;
}
--- 57,64 ----
$r = $obj->dbconn->Exec($q);
! $n = $r->numrows();
$a = 0;
while ($a < $n) {
! $obj->acl[$r->get($a, "adr_id")] = $r->get($a, "perm");
$a++;
}
***************
*** 67,71 ****
$obj->acl[0] = $tutos[seeok];
}
! $obj->dbconn->FreeResult ($r);
return;
}
--- 67,71 ----
$obj->acl[0] = $tutos[seeok];
}
! $r->free();
return;
}
Index: acl_overview.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/acl_overview.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** acl_overview.php 2001/09/16 19:29:00 1.7
--- acl_overview.php 2001/09/19 20:50:10 1.8
***************
*** 66,70 ****
$result = $dbconn->Exec($query);
! $n = DB_NumRows($result);
if ( 0 == $n) {
echo "<SPAN CLASS=warn>". $lang['Err0048'] ."</SPAN>";
--- 66,70 ----
$result = $dbconn->Exec($query);
! $n = $result->numrows();
if ( 0 == $n) {
echo "<SPAN CLASS=warn>". $lang['Err0048'] ."</SPAN>";
***************
*** 87,96 ****
while ( ($a < $n) && ($a < $end) ) {
! $g = DB_Result($result, $a, "id");
$obj = getObject($dbconn,$g);
$q = "SELECT * FROM acl WHERE obj_id=". $g;
$r = $dbconn->Exec($q);
! $n2 = DB_NumRows($r);
echo "<TR>\n";
--- 87,96 ----
while ( ($a < $n) && ($a < $end) ) {
! $g = $result->get($a, "id");
$obj = getObject($dbconn,$g);
$q = "SELECT * FROM acl WHERE obj_id=". $g;
$r = $dbconn->Exec($q);
! $n2 = $r->numrows();
echo "<TR>\n";
***************
*** 114,118 ****
echo "<TR>";
}
! $h = DB_Result($r, $b, "adr_id");
$o = getObject($dbconn,$h);
if ( $o != -1 ) {
--- 114,118 ----
echo "<TR>";
}
! $h = $r->get($b, "adr_id");
$o = getObject($dbconn,$h);
if ( $o != -1 ) {
***************
*** 126,130 ****
}
echo "<TD>";
! $p = DB_Result($r, $b, "perm");
if ( $p == 1 ) {
echo $lang['ACLread'];
--- 126,130 ----
}
echo "<TD>";
! $p = $r->get($b, "perm");
if ( $p == 1 ) {
echo $lang['ACLread'];
Index: bug.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/bug.pinc,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -r1.42 -r1.43
*** bug.pinc 2001/09/17 20:24:55 1.42
--- bug.pinc 2001/09/19 20:50:10 1.43
***************
*** 62,66 ****
$q = "SELECT * from bugs where product_id = ". $obj->id;
$r = $obj->dbconn->Exec($q);
! $n = DB_NumRows($r);
$a = 0;
while ($a < $n) {
--- 62,66 ----
$q = "SELECT * from bugs where product_id = ". $obj->id;
$r = $obj->dbconn->Exec($q);
! $n = $r->numrows();
$a = 0;
while ($a < $n) {
***************
*** 72,76 ****
$a++;
}
! $obj->dbconn->FreeResult ($r);
return;
}
--- 72,76 ----
$a++;
}
! $r->free();
return;
}
***************
*** 161,171 ****
/* ---------------------------------------------------------------------------
*/
! function read_result (&$result, $pos ) {
global $g_bug, $current_user;
! $this->id = DB_Result($result, $pos, "id");
! $this->description = StripSlashes(DB_Result($result, $pos, "description"));
! $this->short = StripSlashes(DB_Result($result, $pos, "short"));
! $this->parent = getObject($this->dbconn,DB_result($result, $pos, "product_id"));
if ( $this->parent == -1 ) {
--- 161,171 ----
/* ---------------------------------------------------------------------------
*/
! function read_result (&$r, $pos ) {
global $g_bug, $current_user;
! $this->id = $r->get($pos, "id");
! $this->description = StripSlashes($r->get($pos, "description"));
! $this->short = StripSlashes($r->get($pos, "short"));
! $this->parent = getObject($this->dbconn,$r->get($pos, "product_id"));
if ( $this->parent == -1 ) {
***************
*** 173,181 ****
exit;
}
! $this->class = DB_Result($result, $pos, "class");
! $this->state = DB_Result($result, $pos, "state");
! $s = DB_Result($result, $pos, "solver");
$this->solver->read($s);
--- 173,181 ----
exit;
}
! $this->class = $r->get($pos, "class");
! $this->state = $r->get($pos, "state");
! $s = $r->get($pos, "solver");
$this->solver->read($s);
***************
*** 185,192 ****
$this->solver->read_member();
}
! $this->creator->read(DB_Result($result, $pos, "creator"));
! $this->solvedate = new DateTime(DB_Result($result, $pos, "solvedate"));
! $this->creation = new DateTime(DB_Result($result, $pos, "creation"));
# Check
--- 185,192 ----
$this->solver->read_member();
}
! $this->creator->read($r->get($pos, "creator"));
! $this->solvedate = new DateTime($r->get($pos, "solvedate"));
! $this->creation = new DateTime($r->get($pos, "creation"));
# Check
***************
*** 224,233 ****
$q = "SELECT * from bugs where id = ". $id;
$r = $this->dbconn->Exec($q);
! $n = DB_NumRows($r);
if ( 0 == $n) {
return;
}
$this->read_result($r,0);
! $this->dbconn->FreeResult ($r);
}
/* ---------------------------------------------------------------------------
--- 224,233 ----
$q = "SELECT * from bugs where id = ". $id;
$r = $this->dbconn->Exec($q);
! $n = $r->numrows();
if ( 0 == $n) {
return;
}
$this->read_result($r,0);
! $r->free();
}
/* ---------------------------------------------------------------------------
Index: bug_overview.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/bug_overview.php,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -r1.21 -r1.22
*** bug_overview.php 2001/09/10 16:39:04 1.21
--- bug_overview.php 2001/09/19 20:50:10 1.22
***************
*** 21,25 ****
global $lang,$tutos,$link1,$format,$filter;
! $n = $dbconn->NumRows($result);
if ( 0 == $n) {
echo "<SPAN CLASS=warn>". $lang['Err0048'] ."</SPAN>";
--- 21,25 ----
global $lang,$tutos,$link1,$format,$filter;
! $n = $result->numrows();
if ( 0 == $n) {
echo "<SPAN CLASS=warn>". $lang['Err0048'] ."</SPAN>";
***************
*** 109,113 ****
global $lang,$tutos,$link,$format;
! $n = $dbconn->NumRows($result);
if ( 0 == $n) {
echo $lang['Err0048'];
--- 109,113 ----
global $lang,$tutos,$link,$format;
! $n = $result->numrows();
if ( 0 == $n) {
echo $lang['Err0048'];
Index: db.p3
===================================================================
RCS file: /cvsroot/tutos/tutos/php/db.p3,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -r1.47 -r1.48
*** db.p3 2001/09/16 19:22:22 1.47
--- db.p3 2001/09/19 20:50:10 1.48
***************
*** 145,168 ****
return $db->getConnection();
}
! /* ---------------------------------------------------------------------------
! * Get the number of rows in an result
*/
! Function DB_NumRows (&$r) {
! global $dbconn;
! return $dbconn->numrows($r);
! };
! /* ---------------------------------------------------------------------------
! * Close the Database
*/
! Function DB_FreeResult (&$r) {
! global $dbconn;
! return $dbconn->freeresult($r);
! };
! /* ---------------------------------------------------------------------------
! * Execute and Check
! */
! Function DB_result (&$r,$pos,$fld) {
! global $dbconn;
! return $dbconn->result($r,$pos,$fld);
}
--- 145,166 ----
return $db->getConnection();
}
! /*
! * Database base class
*/
! class db {
! /* ---------------------------------------------------------------------------
! * handle reserved words in this database type
! */
! function colname($col) {
! if ( isset($this->col[strtoupper($col)]) ) {
! return $this->col[strtoupper($col)];
! }
! return $col;
! }
! }
! /*
! * Resultset base class
*/
! class result {
}
Index: history.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/history.pinc,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** history.pinc 2001/09/17 20:18:14 1.16
--- history.pinc 2001/09/19 20:50:10 1.17
***************
*** 23,44 ****
}
$r = $obj->dbconn->Exec($q);
! $n = $obj->dbconn->NumRows($r);
$a = 0;
while ($a < $n) {
$adr = new tutos_address($obj->dbconn);
! $adr->read($obj->dbconn->Result($r, $a, "adr_id"));
! $m_time = new DateTime(DB_Result($r, $a, "m_time"));
! $obj->history[] = array ( "field" => StripSlashes($obj->dbconn->Result($r, $a, "m_field")) ,
! "old" => StripSlashes($obj->dbconn->Result($r, $a, "val_old")) ,
! "new" => StripSlashes($obj->dbconn->Result($r, $a, "val_new")),
"adr_id" => $adr,
! "obj_id" => $obj->dbconn->Result($r, $a, "obj_id"),
"m_time" => $m_time
);
$a++;
}
! $obj->dbconn->FreeResult ($r);
return;
}
--- 23,44 ----
}
$r = $obj->dbconn->Exec($q);
! $n = $r->numrows();
$a = 0;
while ($a < $n) {
$adr = new tutos_address($obj->dbconn);
! $adr->read($r->get($a, "adr_id"));
! $m_time = new DateTime($r->get($a, "m_time"));
! $obj->history[] = array ( "field" => StripSlashes($r->get($a, "m_field")) ,
! "old" => StripSlashes($r->get($a, "val_old")) ,
! "new" => StripSlashes($r->get($a, "val_new")),
"adr_id" => $adr,
! "obj_id" => $r->get($a, "obj_id"),
"m_time" => $m_time
);
$a++;
}
! $r->free();
return;
}
***************
*** 56,69 ****
$q = "SELECT * from watchlist where obj_id = ". $obj->id ;
$r = $obj->dbconn->Exec($q);
! $n = DB_NumRows($r);
$a = 0;
while ($a < $n) {
$adr = new tutos_address($obj->dbconn);
! $adr->read(DB_Result($r, $a, "adr_id"));
$obj->watchlist[$adr->id] = $adr;
$a++;
}
! $obj->dbconn->FreeResult ($r);
return;
}
--- 56,69 ----
$q = "SELECT * from watchlist where obj_id = ". $obj->id ;
$r = $obj->dbconn->Exec($q);
! $n = $r->numrows();
$a = 0;
while ($a < $n) {
$adr = new tutos_address($obj->dbconn);
! $adr->read($r->get($a, "adr_id"));
$obj->watchlist[$adr->id] = $adr;
$a++;
}
! $r->free();
return;
}
Index: watchlist_overview.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/watchlist_overview.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** watchlist_overview.php 2001/09/10 16:37:54 1.14
--- watchlist_overview.php 2001/09/19 20:50:10 1.15
***************
*** 18,25 ****
*
*/
! Function info(&$dbconn,$adr,$id,&$result,$start=0) {
global $current_user,$lang,$tutos,$link1;
! $n = DB_NumRows($result);
if ( 0 == $n) {
echo "<B><I>". $lang['Err0048']."</I></B>";
--- 18,25 ----
*
*/
! Function info(&$dbconn,$adr,$id,&$r,$start=0) {
global $current_user,$lang,$tutos,$link1;
! $n = $r->numrows();
if ( 0 == $n) {
echo "<B><I>". $lang['Err0048']."</I></B>";
***************
*** 65,70 ****
while ( ($a < $n) && ($a < $end) ) {
! $oid = DB_Result($result, $a, "obj_id");
! $aid = DB_Result($result, $a, "adr_id");
$obj = getObject($dbconn,$oid);
$aobj = getObject($dbconn,$aid);
--- 65,70 ----
while ( ($a < $n) && ($a < $end) ) {
! $oid = $r->get($a, "obj_id");
! $aid = $r->get($a, "adr_id");
$obj = getObject($dbconn,$oid);
$aobj = getObject($dbconn,$aid);
***************
*** 157,161 ****
}
! $result = $dbconn->Exec($q);
if ( ! isset($start) ) {
--- 157,161 ----
}
! $r = $dbconn->Exec($q);
if ( ! isset($start) ) {
***************
*** 166,172 ****
navigate($link1);
HTML_Base2($msg);
! info($dbconn,$adr,$id,$result,$start);
HTML_Base3();
!
$dbconn->Close();
?>
--- 166,172 ----
navigate($link1);
HTML_Base2($msg);
! info($dbconn,$adr,$id,$r,$start);
HTML_Base3();
! $r->free();
$dbconn->Close();
?>
Index: webelements.p3
===================================================================
RCS file: /cvsroot/tutos/tutos/php/webelements.p3,v
retrieving revision 1.81
retrieving revision 1.82
diff -C2 -r1.81 -r1.82
*** webelements.p3 2001/09/17 20:30:43 1.81
--- webelements.p3 2001/09/19 20:50:10 1.82
***************
*** 576,580 ****
echo menulink("mytutos.php" ,$tutos[image][user] . $current_user->getFullName(),$current_user->getFullName()) ."<BR>\n";
if ( $current_user->admin != 0 ) {
! echo menulink("admin_show.php" ,$tutos[image][user] . $lang['UserAdmin'] , $lang['UserAdmin']) ."<BR>\n";
}
}
--- 576,580 ----
echo menulink("mytutos.php" ,$tutos[image][user] . $current_user->getFullName(),$current_user->getFullName()) ."<BR>\n";
if ( $current_user->admin != 0 ) {
! echo menulink("admin_show.php" ,$tutos[image][user] . $lang['UserAdmin'] , $lang['UserAdmin']) ."<BR>\n";
}
}
***************
*** 964,968 ****
$q = "SELECT * from products WHERE". $dbconn->Like("name",$name,"version");
$r = $dbconn->Exec($q);
! $n = DB_NumRows($r);
if ( 0 == $n) {
$msg .= sprintf($lang['Err0004'],$name) ."<BR>";
--- 964,968 ----
$q = "SELECT * from products WHERE". $dbconn->Like("name",$name,"version");
$r = $dbconn->Exec($q);
! $n = $r->numrows();
if ( 0 == $n) {
$msg .= sprintf($lang['Err0004'],$name) ."<BR>";
***************
*** 975,979 ****
$a = 0;
while ( $a < $n ) {
! $gotourl .="&pl[]=". DB_Result($r, $a, "id");
$a++;
}
--- 975,979 ----
$a = 0;
while ( $a < $n ) {
! $gotourl .="&pl[]=". $r->get($a, "id");
$a++;
}
***************
*** 981,988 ****
$p = new product($dbconn);
$p->read_result($r,0);
! $dbconn->FreeResult($r);
return $p;
}
! $dbconn->FreeResult($r);
return;
}
--- 981,988 ----
$p = new product($dbconn);
$p->read_result($r,0);
! $r->free();
return $p;
}
! $r->free();
return;
}
***************
*** 1012,1016 ****
$q1 = "SELECT * from addresses WHERE". $dbconn->Like ("f_name",$name,"m_name","l_name");
$r1 = $dbconn->Exec($q1);
! $n1 = DB_NumRows($r1);
$n += $n1;
}
--- 1012,1016 ----
$q1 = "SELECT * from addresses WHERE". $dbconn->Like ("f_name",$name,"m_name","l_name");
$r1 = $dbconn->Exec($q1);
! $n1 = $r1->numrows();
$n += $n1;
}
***************
*** 1018,1022 ****
$q2 = "SELECT * from teams WHERE". $dbconn->Like ("name",$name);
$r2 = $dbconn->Exec($q2);
! $n2 = DB_NumRows($r2);
$n += $n2;
}
--- 1018,1022 ----
$q2 = "SELECT * from teams WHERE". $dbconn->Like ("name",$name);
$r2 = $dbconn->Exec($q2);
! $n2 = $r2->numrows();
$n += $n2;
}
***************
*** 1024,1028 ****
$q3 = "SELECT * from departments WHERE". $dbconn->Like("name",$name);
$r3 = $dbconn->Exec($q3);
! $n3 = DB_NumRows($r3);
$n += $n3;
}
--- 1024,1028 ----
$q3 = "SELECT * from departments WHERE". $dbconn->Like("name",$name);
$r3 = $dbconn->Exec($q3);
! $n3 = $r3->numrows();
$n += $n3;
}
***************
*** 1030,1034 ****
$q4 = "SELECT * from companies WHERE". $dbconn->Like("name",$name);
$r4 = $dbconn->Exec($q4);
! $n4 = DB_NumRows($r4);
$n += $n4;
}
--- 1030,1034 ----
$q4 = "SELECT * from companies WHERE". $dbconn->Like("name",$name);
$r4 = $dbconn->Exec($q4);
! $n4 = $r4->numrows();
$n += $n4;
}
***************
*** 1037,1049 ****
if ( strstr($mode,"c") != FALSE ) {
$msg .= sprintf($lang['Err0012'],$name) ."<BR>";
! DB_FreeResult($r4);
}
if ( strstr($mode,"d") != FALSE ) {
$msg .= sprintf($lang['Err0013'],$name) ."<BR>";
! DB_FreeResult($r3);
}
if ( strstr($mode,"a") != FALSE ) {
$msg .= sprintf($lang['Err0019'],$name,$n) ."<BR>";
! DB_FreeResult($r1);
}
return;
--- 1037,1053 ----
if ( strstr($mode,"c") != FALSE ) {
$msg .= sprintf($lang['Err0012'],$name) ."<BR>";
! $r4->free();
}
if ( strstr($mode,"d") != FALSE ) {
$msg .= sprintf($lang['Err0013'],$name) ."<BR>";
! $r3->free();
}
+ if ( strstr($mode,"t") != FALSE ) {
+ $msg .= sprintf($lang['Err0013'],$name) ."<BR>";
+ $r2->free();
+ }
if ( strstr($mode,"a") != FALSE ) {
$msg .= sprintf($lang['Err0019'],$name,$n) ."<BR>";
! $r1->free();
}
return;
***************
*** 1054,1058 ****
# Ask for detailed selection
$msg .= $lang['Err0006'] ."<BR>";
- DB_FreeResult($r);
return;
}
--- 1058,1061 ----
***************
*** 1065,1096 ****
$a = 0;
while ( $a < $n1 ) {
! $gotourl = addUrlParameter($gotourl,$field2."[]=".DB_Result($r1, $a, "id"));
$a++;
}
! DB_FreeResult($r1);
}
if ( strstr($mode,"t") != FALSE ) {
$a = 0;
while ( $a < $n2 ) {
! $gotourl = addUrlParameter($gotourl,$field2."[]=".DB_Result($r2, $a, "id"));
$a++;
}
! DB_FreeResult($r2);
}
if ( strstr($mode,"d") != FALSE ) {
$a = 0;
while ( $a < $n3 ) {
! $gotourl = addUrlParameter($gotourl,$field2."[]=".DB_Result($r3, $a, "id"));
$a++;
}
! DB_FreeResult($r3);
}
if ( strstr($mode,"c") != FALSE ) {
$a = 0;
while ( $a < $n4 ) {
! $gotourl = addUrlParameter($gotourl,$field2."[]=".DB_Result($r4, $a, "id"));
$a++;
}
! DB_FreeResult($r4);
}
return;
--- 1068,1099 ----
$a = 0;
while ( $a < $n1 ) {
! $gotourl = addUrlParameter($gotourl,$field2."[]=".$r1->get($a, "id"));
$a++;
}
! $r1->free();
}
if ( strstr($mode,"t") != FALSE ) {
$a = 0;
while ( $a < $n2 ) {
! $gotourl = addUrlParameter($gotourl,$field2."[]=".$r2->get($a, "id"));
$a++;
}
! $r2->free();
}
if ( strstr($mode,"d") != FALSE ) {
$a = 0;
while ( $a < $n3 ) {
! $gotourl = addUrlParameter($gotourl,$field2."[]=".$r3->get($a, "id"));
$a++;
}
! $r3->free();
}
if ( strstr($mode,"c") != FALSE ) {
$a = 0;
while ( $a < $n4 ) {
! $gotourl = addUrlParameter($gotourl,$field2."[]=".$r4->get($a, "id"));
$a++;
}
! $r4->free();
}
return;
***************
*** 1114,1127 ****
if ( strstr($mode,"a") != FALSE ) {
! $dbconn->FreeResult($r1);
}
if ( strstr($mode,"t") != FALSE ) {
! $dbconn->FreeResult($r2);
}
if ( strstr($mode,"d") != FALSE ) {
! $dbconn->FreeResult($r3);
}
if ( strstr($mode,"c") != FALSE ) {
! $dbconn->FreeResult($r4);
}
return $a;
--- 1117,1130 ----
if ( strstr($mode,"a") != FALSE ) {
! $r1->free();
}
if ( strstr($mode,"t") != FALSE ) {
! $r2->free();
}
if ( strstr($mode,"d") != FALSE ) {
! $r3->free();
}
if ( strstr($mode,"c") != FALSE ) {
! $r4->free();
}
return $a;
***************
*** 1197,1201 ****
$q = "SELECT id from ". $i ." where id =". $id;
$r = $dbconn->Exec($q);
! $n = DB_NumRows($r);
if ( 0 != $n) {
$found = 1;
--- 1200,1204 ----
$q = "SELECT id from ". $i ." where id =". $id;
$r = $dbconn->Exec($q);
! $n = $r->numrows();
if ( 0 != $n) {
$found = 1;
***************
*** 1217,1293 ****
case 1:
$ref = new appointment($dbconn);
! $ref->read(DB_Result($r, 0, "id"));
break;
case 2:
$ref = new product($dbconn);
! $ref->read(DB_Result($r, 0, "id"));
break;
case 3:
$ref = new bug($dbconn);
! $ref->read(DB_Result($r, 0, "id"));
break;
case 4:
$ref = new tutos_address($dbconn);
! $ref->read(DB_Result($r, 0, "id"));
break;
case 5:
$ref = new company($dbconn);
! $ref->read(DB_Result($r, 0, "id"));
break;
case 6:
$ref = new department($dbconn);
! $ref->read(DB_Result($r, 0, "id"));
break;
case 7:
$ref = new installation($dbconn);
! $ref->read(DB_Result($r, 0, "id"));
break;
case 8:
$ref = new team($dbconn);
! $ref->read(DB_Result($r, 0, "id"));
break;
case 9:
$ref = new note($dbconn);
! $ref->read(DB_Result($r, 0, "id"));
break;
case 10:
$ref = new url($dbconn);
! $ref->read(DB_Result($r, 0, "id"));
break;
case 11:
$ref = new task($dbconn);
! $ref->read(DB_Result($r, 0, "id"));
break;
case 12:
$ref = new file($dbconn);
! $ref->read(DB_Result($r, 0, "id"));
break;
case 13:
$ref = new mailbox($dbconn);
! $ref->read(DB_Result($r, 0, "id"));
break;
case 14:
$ref = new tutos_user($dbconn);
! $ref->read(DB_Result($r, 0, "id"),1);
break;
case 15:
$ref = new location($dbconn);
! $ref->read(DB_Result($r, 0, "id"));
break;
case 16:
$ref = new timetrack($dbconn);
! $ref->read(DB_Result($r, 0, "id"));
break;
case 17:
$ref = new resource($dbconn);
! $ref->read(DB_Result($r, 0, "id"));
break;
case 18:
$ref = new location($dbconn);
! $ref->read(DB_Result($r, 0, "id"));
break;
case 19:
$ref = new database($dbconn);
! $ref->read(DB_Result($r, 0, "id"));
break;
default:
--- 1220,1296 ----
case 1:
$ref = new appointment($dbconn);
! $ref->read($r->get(0, "id"));
break;
case 2:
$ref = new product($dbconn);
! $ref->read($r->get(0, "id"));
break;
case 3:
$ref = new bug($dbconn);
! $ref->read($r->get(0, "id"));
break;
case 4:
$ref = new tutos_address($dbconn);
! $ref->read($r->get(0, "id"));
break;
case 5:
$ref = new company($dbconn);
! $ref->read($r->get(0, "id"));
break;
case 6:
$ref = new department($dbconn);
! $ref->read($r->get(0, "id"));
break;
case 7:
$ref = new installation($dbconn);
! $ref->read($r->get(0, "id"));
break;
case 8:
$ref = new team($dbconn);
! $ref->read($r->get(0, "id"));
break;
case 9:
$ref = new note($dbconn);
! $ref->read($r->get(0, "id"));
break;
case 10:
$ref = new url($dbconn);
! $ref->read($r->get(0, "id"));
break;
case 11:
$ref = new task($dbconn);
! $ref->read($r->get(0, "id"));
break;
case 12:
$ref = new file($dbconn);
! $ref->read($r->get(0, "id"));
break;
case 13:
$ref = new mailbox($dbconn);
! $ref->read($r->get(0, "id"));
break;
case 14:
$ref = new tutos_user($dbconn);
! $ref->read($r->get(0, "id"),1);
break;
case 15:
$ref = new location($dbconn);
! $ref->read($r->get(0, "id"));
break;
case 16:
$ref = new timetrack($dbconn);
! $ref->read($r->get(0, "id"));
break;
case 17:
$ref = new resource($dbconn);
! $ref->read($r->get(0, "id"));
break;
case 18:
$ref = new location($dbconn);
! $ref->read($r->get(0, "id"));
break;
case 19:
$ref = new database($dbconn);
! $ref->read($r->get(0, "id"));
break;
default:
***************
*** 1295,1298 ****
--- 1298,1302 ----
break;
}
+ $r->free();
return $ref;
}
Index: calendar.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/calendar.php,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -r1.30 -r1.31
*** calendar.php 2001/09/10 16:43:22 1.30
--- calendar.php 2001/09/19 20:50:10 1.31
***************
*** 255,259 ****
$query = "SELECT a_start FROM calendar where id =". $id;
$result = $dbconn->Exec($query);
! if ( 1 != DB_NumRows($result)) {
echo "<B>Problem: <I>Appointment ". $id ." not found</I></B>";
HTML_Footer();
--- 255,259 ----
$query = "SELECT a_start FROM calendar where id =". $id;
$result = $dbconn->Exec($query);
! if ( 1 != $result->numrows()) {
echo "<B>Problem: <I>Appointment ". $id ." not found</I></B>";
HTML_Footer();
***************
*** 261,267 ****
exit;
}
! $dbconn->FreeResult ($result);
! $d = new DateTime(DB_Result($result, 0, "a_start"));
$t = $d->getYYYYMMDD();
}
--- 261,267 ----
exit;
}
! $d = new DateTime($result->get(0, "a_start"));
$t = $d->getYYYYMMDD();
+ $result->free();
}
Index: Date.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/Date.pinc,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -r1.36 -r1.37
*** Date.pinc 2001/09/16 19:29:00 1.36
--- Date.pinc 2001/09/19 20:50:10 1.37
***************
*** 580,584 ****
$this->format = 8;
} else {
! echo "<BR>DT: Unknown DateTimeFormat<SPAN CLASS=warn>". $str ." fix it in Date.pinc</SPAN>". strlen($str) ." <BR>";
$this->format = 0;
return;
--- 580,584 ----
$this->format = 8;
} else {
! echo "<BR>DT: Unknown DateTimeFormat <SPAN CLASS=warn>". $str ." fix it in Date.pinc</SPAN> len:". strlen($str) ." <BR>";
$this->format = 0;
return;
Index: url.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/url.pinc,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -r1.26 -r1.27
*** url.pinc 2001/09/16 19:29:00 1.26
--- url.pinc 2001/09/19 20:50:10 1.27
***************
*** 68,72 ****
$q = "SELECT * from urls where link_id = ". $obj->id ." order by name";
$r = $obj->dbconn->Exec($q);
! $n = DB_NumRows($r);
$a = 0;
while ($a < $n) {
--- 68,72 ----
$q = "SELECT * from urls where link_id = ". $obj->id ." order by name";
$r = $obj->dbconn->Exec($q);
! $n = $r->numrows();
$a = 0;
while ($a < $n) {
***************
*** 76,79 ****
--- 76,80 ----
$a++;
}
+ $r->free();
return;
}
***************
*** 107,111 ****
$q = "SELECT * from urls where id = ". $id;
$r = $this->dbconn->Exec($q);
! $n = $this->dbconn->NumRows($r);
if ( 0 == $n) {
$this->id = -1;
--- 108,112 ----
$q = "SELECT * from urls where id = ". $id;
$r = $this->dbconn->Exec($q);
! $n = $r->numrows();
if ( 0 == $n) {
$this->id = -1;
***************
*** 113,127 ****
}
$this->read_result($r,0);
! $this->dbconn->FreeResult ($r);
}
/* ---------------------------------------------------------------------------
*/
! function read_result (&$result, $pos ) {
global $g_url;
! $this->link_id = DB_Result($result, $pos, "link_id");
! $this->name = StripSlashes(DB_Result($result, $pos, "name"));
! $this->url = StripSlashes(DB_Result($result, $pos, "url"));
! $this->id = DB_Result($result, $pos, "id");
$g_url[$this->id] = $this;
--- 114,128 ----
}
$this->read_result($r,0);
! $r->free();
}
/* ---------------------------------------------------------------------------
*/
! function read_result (&$r, $pos ) {
global $g_url;
! $this->link_id = $r->get($pos, "link_id");
! $this->name = StripSlashes($r->get($pos, "name"));
! $this->url = StripSlashes($r->get($pos, "url"));
! $this->id = $r->get($pos, "id");
$g_url[$this->id] = $this;
|
|
From: Gero K. <gok...@us...> - 2001-09-19 20:48:36
|
Update of /cvsroot/tutos/tutos/php
In directory usw-pr-cvs1:/tmp/cvs-serv32172/php
Modified Files:
file.pinc file_overview.php department.pinc department_ins.php
mailbox.pinc mailbox_new.php mailbox_overview.php
mailbox_show.php permission.p3 user.pinc user_ins.php
resource.pinc resource_overview.php
Log Message:
new resultset classes for databases
Index: file.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/file.pinc,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -r1.41 -r1.42
*** file.pinc 2001/09/16 19:08:33 1.41
--- file.pinc 2001/09/19 20:48:33 1.42
***************
*** 57,61 ****
}
$r = $obj->dbconn->Exec($q);
! $n = DB_NumRows($r);
$a = 0;
while ($a < $n) {
--- 57,61 ----
}
$r = $obj->dbconn->Exec($q);
! $n = $r->numrows();
$a = 0;
while ($a < $n) {
***************
*** 67,70 ****
--- 67,71 ----
$a++;
}
+ $r->free();
return;
}
***************
*** 115,142 ****
$q = "SELECT * from files where id = ". $id;
$r = $this->dbconn->Exec($q);
! $n = DB_NumRows($r);
if ( 0 == $n) {
return;
}
$this->read_result($r,0);
! $this->dbconn->FreeResult ($r);
}
/* ---------------------------------------------------------------------------
*/
! function read_result(&$result, $pos ) {
global $g_file;
! $this->id = DB_Result($result, $pos, "id");
! $this->link_id = DB_Result($result, $pos, "link_id");
! $this->name = StripSlashes(DB_Result($result, $pos, "name"));
! $this->fileloc = StripSlashes(DB_Result($result, $pos, "loc"));
! $this->filetype = StripSlashes(DB_Result($result, $pos, $this->dbconn->colname("type")));
! $this->filename = StripSlashes(DB_Result($result, $pos, "filename"));
! $this->filesize = DB_Result($result, $pos, "f_size");
! $this->vsys = DB_Result($result, $pos, "vsys");
! $this->version = StripSlashes(DB_Result($result, $pos, "version"));
! $this->logtxt = StripSlashes(DB_Result($result, $pos, "logtxt"));
! $this->locked = DB_Result($result, $pos, "locked");
if ( $this->locked > 0 ) {
$this->locker = new tutos_address($this->dbconn);
--- 116,143 ----
$q = "SELECT * from files where id = ". $id;
$r = $this->dbconn->Exec($q);
! $n = $r->numrows();
if ( 0 == $n) {
return;
}
$this->read_result($r,0);
! $r->free();
}
/* ---------------------------------------------------------------------------
*/
! function read_result(&$r, $pos ) {
global $g_file;
! $this->id = $r->get($pos, "id");
! $this->link_id = $r->get($pos, "link_id");
! $this->name = StripSlashes($r->get($pos, "name"));
! $this->fileloc = StripSlashes($r->get($pos, "loc"));
! $this->filetype = StripSlashes($r->get($pos, $this->dbconn->colname("type")));
! $this->filename = StripSlashes($r->get($pos, "filename"));
! $this->filesize = $r->get($pos, "f_size");
! $this->vsys = $r->get($pos, "vsys");
! $this->version = StripSlashes($r->get($pos, "version"));
! $this->logtxt = StripSlashes($r->get($pos, "logtxt"));
! $this->locked = $r->get($pos, "locked");
if ( $this->locked > 0 ) {
$this->locker = new tutos_address($this->dbconn);
***************
*** 144,153 ****
}
! $this->creation = new DateTime(DB_Result($result, $pos, "creation"));
! $cid = DB_Result($result, $pos, "creator");
$this->creator = new tutos_address($this->dbconn);
$this->creator->read($cid);
! $cid = DB_Result($result, $pos, "author");
$this->author = new tutos_address($this->dbconn);
$this->author->read($cid);
--- 145,154 ----
}
! $this->creation = new DateTime($r->get($pos, "creation"));
! $cid = $r->get($pos, "creator");
$this->creator = new tutos_address($this->dbconn);
$this->creator->read($cid);
! $cid = $r->get($pos, "author");
$this->author = new tutos_address($this->dbconn);
$this->author->read($cid);
Index: file_overview.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/file_overview.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** file_overview.php 2001/09/10 16:39:04 1.10
--- file_overview.php 2001/09/19 20:48:33 1.11
***************
*** 19,23 ****
global $lang,$tutos,$current_user,$link1,$filter;
! $n = $dbconn->NumRows($r);
if ( 0 == $n) {
echo "<SPAN CLASS=warn>". $lang['Err0048'] ."</SPAN>";
--- 19,23 ----
global $lang,$tutos,$current_user,$link1,$filter;
! $n = $r->numrows();
if ( 0 == $n) {
echo "<SPAN CLASS=warn>". $lang['Err0048'] ."</SPAN>";
***************
*** 199,202 ****
--- 199,203 ----
HTML_Base3();
+ $r->free();
$dbconn->Close();
?>
Index: department.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/department.pinc,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -r1.25 -r1.26
*** department.pinc 2001/09/16 19:08:33 1.25
--- department.pinc 2001/09/19 20:48:33 1.26
***************
*** 41,45 ****
$query = "SELECT * FROM departments WHERE id = ". $id;
$result = $this->dbconn->Exec($query);
! $n = DB_NumRows($result);
if ( 0 == $n) {
$this->id = -1;
--- 41,45 ----
$query = "SELECT * FROM departments WHERE id = ". $id;
$result = $this->dbconn->Exec($query);
! $n = $result->numrows();
if ( 0 == $n) {
$this->id = -1;
***************
*** 47,64 ****
}
$this->read_result($result,0);
! $this->dbconn->FreeResult ($result);
}
/* ---------------------------------------------------------------------------
*
*/
! function read_result ( $result,$pos ) {
global $g_dep;
if ( ! isset($pos) ) return;
! $this->id = DB_Result($result, $pos, "id");
! $this->c_id = DB_Result($result, $pos, "c_id");
! $this->name = StripSlashes(DB_Result($result, $pos, "name"));
! $this->creation->setDateTime(DB_Result($result, $pos, "creation"));
if ( !empty($this->c_id) ) {
$this->company->read($this->c_id);
--- 47,64 ----
}
$this->read_result($result,0);
! $result->free();
}
/* ---------------------------------------------------------------------------
*
*/
! function read_result ( &$r,$pos ) {
global $g_dep;
if ( ! isset($pos) ) return;
! $this->id = $r->get($pos, "id");
! $this->c_id = $r->get($pos, "c_id");
! $this->name = StripSlashes($r->get($pos, "name"));
! $this->creation->setDateTime($r->get($pos, "creation"));
if ( !empty($this->c_id) ) {
$this->company->read($this->c_id);
***************
*** 112,116 ****
$q = "SELECT a.* FROM addresses a, location l, adrloc r WHERE l.d_id = ". $this->id ." AND a.id = r.adr_id AND r.loc_id = l.id ORDER BY l_name";
$r = $this->dbconn->Exec($q);
! $n = DB_NumRows($r);
$a = 0;
while ( $a < $n ) {
--- 112,116 ----
$q = "SELECT a.* FROM addresses a, location l, adrloc r WHERE l.d_id = ". $this->id ." AND a.id = r.adr_id AND r.loc_id = l.id ORDER BY l_name";
$r = $this->dbconn->Exec($q);
! $n = $r->numrows();
$a = 0;
while ( $a < $n ) {
***************
*** 121,125 ****
}
! $this->dbconn->FreeResult ($r);
}
/* ---------------------------------------------------------------------------
--- 121,125 ----
}
! $r->free();
}
/* ---------------------------------------------------------------------------
***************
*** 159,162 ****
--- 159,172 ----
}
/* ---------------------------------------------------------------------------
+ * set the name
+ */
+ function setName($name) {
+ if ( $this->name != $name ) {
+ $this->modified[] = array ( "field" => "Department" , "old" => $this->name , "new" => $name );
+ $this->name = $name;
+ }
+ return;
+ }
+ /* ---------------------------------------------------------------------------
*
*/
***************
*** 266,269 ****
--- 276,285 ----
function getFullName () {
return $this->name ;
+ }
+ /* ---------------------------------------------------------------------------
+ * This is not a user
+ */
+ function isUser () {
+ return 0;
}
/* ---------------------------------------------------------------------------
Index: department_ins.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/department_ins.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** department_ins.php 2001/09/10 16:40:40 1.7
--- department_ins.php 2001/09/19 20:48:33 1.8
***************
*** 51,55 ****
$q = "SELECT * FROM departments WHERE name = '". $name ."' AND c_id = ". $d->company->id;
$r = $dbconn->Exec($q);
! $n = DB_NumRows($r);
if ( 0 != $n) {
$x = new department($dbconn);
--- 51,55 ----
$q = "SELECT * FROM departments WHERE name = '". $name ."' AND c_id = ". $d->company->id;
$r = $dbconn->Exec($q);
! $n = $r->numrows();
if ( 0 != $n) {
$x = new department($dbconn);
***************
*** 57,65 ****
$msg .= sprintf($lang['Err0045'],$x->getLink()) ."<BR>";
}
}
}
if ( $msg == "" ) {
! $d->name = $name;
$d->c_id = $d->company->id;
$msg = $d->save();
--- 57,66 ----
$msg .= sprintf($lang['Err0045'],$x->getLink()) ."<BR>";
}
+ $r->free();
}
}
if ( $msg == "" ) {
! $d->setName($name);
$d->c_id = $d->company->id;
$msg = $d->save();
Index: mailbox.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/mailbox.pinc,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -r1.19 -r1.20
*** mailbox.pinc 2001/09/16 19:08:33 1.19
--- mailbox.pinc 2001/09/19 20:48:33 1.20
***************
*** 20,24 ****
$q = "SELECT * from mailboxes where link_id = ". $obj->id;
$r = $obj->dbconn->Exec($q);
! $n = DB_NumRows($r);
$a = 0;
while ($a < $n) {
--- 20,24 ----
$q = "SELECT * from mailboxes where link_id = ". $obj->id;
$r = $obj->dbconn->Exec($q);
! $n = $r->numrows();
$a = 0;
while ($a < $n) {
***************
*** 256,271 ****
* read the data from DB result
*/
! function read_result ($result, $pos ) {
global $g_mbox;
! $this->id = DB_Result($result, $pos, "id");
! $this->host = DB_Result($result, $pos, "host");
! $this->type = DB_Result($result, $pos, $this->dbconn->colname("type"));
! $this->port = DB_Result($result, $pos, "port");
! $this->user = DB_Result($result, $pos, "uname");
! $this->pw = DB_Result($result, $pos, "pw");
! $this->path = DB_Result($result, $pos, "path");
! $this->email = DB_Result($result, $pos, "email");
! $this->parent = getObject($this->dbconn,DB_Result($result, $pos, "link_id"));
if ( $this->port == "" ) {
--- 256,271 ----
* read the data from DB result
*/
! function read_result (&$r, $pos ) {
global $g_mbox;
! $this->id = $r->get($pos, "id");
! $this->host = $r->get($pos, "host");
! $this->type = $r->get($pos, $this->dbconn->colname("type"));
! $this->port = $r->get($pos, "port");
! $this->user = $r->get($pos, "uname");
! $this->pw = $r->get($pos, "pw");
! $this->path = $r->get($pos, "path");
! $this->email = $r->get($pos, "email");
! $this->parent = getObject($this->dbconn,$r->get($pos, "link_id"));
if ( $this->port == "" ) {
***************
*** 297,307 ****
$q = "SELECT * from mailboxes where id = ". $id;
$r = $this->dbconn->Exec($q);
! $n = DB_NumRows($r);
if ( 0 == $n) {
! $this->dbconn->FreeResult ($r);
return;
}
$this->read_result($r,0);
! $this->dbconn->FreeResult ($r);
}
/* ---------------------------------------------------------------------------
--- 297,307 ----
$q = "SELECT * from mailboxes where id = ". $id;
$r = $this->dbconn->Exec($q);
! $n = $r->numrows();
if ( 0 == $n) {
! $r->free();
return;
}
$this->read_result($r,0);
! $r->free();
}
/* ---------------------------------------------------------------------------
Index: mailbox_new.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/mailbox_new.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** mailbox_new.php 2001/09/13 14:49:48 1.9
--- mailbox_new.php 2001/09/19 20:48:33 1.10
***************
*** 17,21 ****
global $lang , $current_user;
! echo "<TABLE BORDER=0 CELLSPACING=0>\n";
echo "<FORM action=\"mailbox_ins.php\" method=\"POST\">\n";
hiddenFormElements();
--- 17,21 ----
global $lang , $current_user;
! echo "<TABLE CLASS=single BORDER=0 CELLSPACING=0 CELLPADDING=3>\n";
echo "<FORM action=\"mailbox_ins.php\" method=\"POST\">\n";
hiddenFormElements();
***************
*** 26,32 ****
echo "<TR><TH COLSPAN=6>";
if ( $m->id > 0 ) {
! echo sprintf($lang['MailboxModifyI'],$m->parent->getLink());
} else {
! echo sprintf($lang['MailboxCreateI'],$m->parent->getLink());
}
echo "</TH></TR>\n";
--- 26,32 ----
echo "<TR><TH COLSPAN=6>";
if ( $m->id > 0 ) {
! echo sprintf($lang['MailboxModifyI'],menulink($m->parent->getURL(),$m->parent->getFullName()));
} else {
! echo sprintf($lang['MailboxCreateI'],menulink($m->parent->getURL(),$m->parent->getFullName()));
}
echo "</TH></TR>\n";
***************
*** 65,73 ****
echo "<TR>\n";
showfieldc($lang['MailboxUser'],1);
! echo " <TD COLSPAN=2>\n";
echo " <INPUT size=20 maxlength=20 name=user value=\"". htmlentities($m->user) ."\">\n";
- echo " <B>". $lang['MailboxPass'] ."</B>\n";
- echo " <INPUT type=password name=pw value=". $m->pw .">\n";
echo " </TD>\n";
echo "</TR>\n";
--- 65,74 ----
echo "<TR>\n";
showfieldc($lang['MailboxUser'],1);
! echo " <TD COLSPAN=1>\n";
echo " <INPUT size=20 maxlength=20 name=user value=\"". htmlentities($m->user) ."\">\n";
echo " </TD>\n";
+ showfieldc($lang['MailboxPass'],0);
+ echo " <TD COLSPAN=3>\n";
+ echo " <INPUT type=password name=pw value=". $m->pw .">\n";
echo "</TR>\n";
***************
*** 81,88 ****
if ( $m->mod_ok() != 0 ) {
echo "<TR>\n";
! echo " <TD> <B>OK ?</B></TD>\n";
! echo " <TD><CENTER><input type=\"submit\" value=\"". $lang['Enter'] ."\"></CENTER></TD>\n";
! echo " <TD> <B>". $lang['Reset'] ."</B></TD>\n";
! echo " <TD><CENTER><input type=\"reset\" value=\"". $lang['Reset'] ."\"></CENTER></TD>\n";
echo "</TR>\n";
}
--- 82,90 ----
if ( $m->mod_ok() != 0 ) {
echo "<TR>\n";
! if ($m->id > 0 ) {
! submit_reset(0,1,2,1,2,0);
! } else {
! submit_reset(0,-1,2,1,2,0);
! }
echo "</TR>\n";
}
***************
*** 101,105 ****
echo "<TR><TD>";
if ( $m->del_ok() ) {
! echo makelink("mailbox_del.php?id=". $m->id ,$lang['Delete'],sprintf($lang['MailboxDelI'],$m->getFullname())) ." <BR>";
}
echo " \n";
--- 103,107 ----
echo "<TR><TD>";
if ( $m->del_ok() ) {
! echo menulink("mailbox_del.php?id=". $m->id ,$lang['Delete'],sprintf($lang['MailboxDelI'],$m->getFullname())) ." <BR>";
}
echo " \n";
Index: mailbox_overview.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/mailbox_overview.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** mailbox_overview.php 2001/09/10 16:40:40 1.15
--- mailbox_overview.php 2001/09/19 20:48:33 1.16
***************
*** 65,69 ****
echo menulink($m->parent->getUrl(),$m->parent->getFullname());
if ( $m->email != "" ) {
! echo " mails sent to <". AsEmail($m->email,$m->email) .">\n";
}
echo " </TH>\n";
--- 65,69 ----
echo menulink($m->parent->getUrl(),$m->parent->getFullname());
if ( $m->email != "" ) {
! echo " mails sent to <". $m->email .">\n";
}
echo " </TH>\n";
***************
*** 239,241 ****
CVS Info: $Id$
$Author$
! -->
\ No newline at end of file
--- 239,241 ----
CVS Info: $Id$
$Author$
! -->
Index: mailbox_show.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/mailbox_show.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** mailbox_show.php 2001/09/10 16:40:40 1.13
--- mailbox_show.php 2001/09/19 20:48:33 1.14
***************
*** 304,308 ****
showfield($lang['MailSubject']);
! echo " <TD>". $s[0]->text ."</TD>\n";
echo "</TR>\n";
--- 304,308 ----
showfield($lang['MailSubject']);
! echo " <TD>". $s[0]->text ." </TD>\n";
echo "</TR>\n";
Index: permission.p3
===================================================================
RCS file: /cvsroot/tutos/tutos/php/permission.p3,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -r1.42 -r1.43
*** permission.p3 2001/09/16 19:29:00 1.42
--- permission.p3 2001/09/19 20:48:33 1.43
***************
*** 234,240 ****
}
/* OK there is a user and a Password so lets check */
! if ( 1 != $dbconn->NumRows($result)) {
ReadLang($lang);
! logmessage("not unique ". $dbconn->NumRows($result) ." Result for ". $uname ." / ". $pw);
logmessage($query);
login_form($PHP_SELF,$lang['Err0027']);
--- 234,240 ----
}
/* OK there is a user and a Password so lets check */
! if ( 1 != $result->numrows()) {
ReadLang($lang);
! logmessage("not unique ". $result->numrows() ." Result for ". $uname ." / ". $pw);
logmessage($query);
login_form($PHP_SELF,$lang['Err0027']);
Index: user.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/user.pinc,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -r1.49 -r1.50
*** user.pinc 2001/09/16 19:25:35 1.49
--- user.pinc 2001/09/19 20:48:33 1.50
***************
*** 85,89 ****
}
$result = $this->dbconn->Exec($query);
! if ( 0 != $this->dbconn->NumRows($result) ) {
$this->read_result($result,0);
} else {
--- 85,89 ----
}
$result = $this->dbconn->Exec($query);
! if ( 0 != $result->numrows() ) {
$this->read_result($result,0);
} else {
***************
*** 95,104 ****
$g_usr[$this->id] = $this;
}
! $this->dbconn->FreeResult ($result);
}
/* ---------------------------------------------------------------------------
* Read all a result
*/
! function read_result(&$result,$pos) {
global $g_usr;
--- 95,104 ----
$g_usr[$this->id] = $this;
}
! $result->free();
}
/* ---------------------------------------------------------------------------
* Read all a result
*/
! function read_result(&$r,$pos) {
global $g_usr;
***************
*** 106,134 ****
while($i < count($this->larray)) {
$f = $this->larray[$i];
! $this->$f = StripSlashes(DB_Result($result, $pos, "$f"));
$i++;
}
! $this->id = @DB_Result($result, $pos, "adr_id");
! $this->birthday = new DateTime(DB_Result($result, $pos, "birthday"));
! $this->last_seen = new DateTime(DB_Result($result, $pos, "last_seen"));
! $this->last_host = StripSlashes(DB_Result($result, $pos, "last_host"));
! $this->uid = DB_Result($result, $pos, "u_id");
! $this->admin = DB_Result($result, $pos,$this->dbconn->colname("admin"));
! #echo "<BR>LOGIN: ". $this->login;
! #echo "<BR>ADMIN: ". $this->admin;
! #echo "<BR>LAST: ". DB_Result($result, $pos, "last_seen");
! #echo "<BR>LAST: ". $this->last_seen->getDateTime();
! $this->prefteam = DB_Result($result, $pos, "prefteam");
! # $this->p[useoverlib] = DB_Result($result, $pos, "overlib");
! $this->lang = StripSlashes(DB_Result($result, $pos, "lang"));
if ( $this->lang == "" ) {
$this->lang = "auto";
}
! $this->tz = StripSlashes(DB_Result($result, $pos, "tz"));
- $this->theme = StripSlashes(DB_Result($result, $pos, "theme"));
-
$this->readTeamList();
--- 106,128 ----
while($i < count($this->larray)) {
$f = $this->larray[$i];
! $this->$f = StripSlashes($r->get($pos, "$f"));
$i++;
}
! $this->id = $r->get($pos, "adr_id");
! $this->birthday = new DateTime($r->get($pos, "birthday"));
! $this->last_seen = new DateTime($r->get($pos, "last_seen"));
! $this->last_host = StripSlashes($r->get($pos, "last_host"));
! $this->uid = $r->get($pos, "u_id");
! $this->admin = $r->get($pos,$this->dbconn->colname("admin"));
! $this->prefteam = $r->get($pos, "prefteam");
! $this->lang = StripSlashes($r->get($pos, "lang"));
if ( $this->lang == "" ) {
$this->lang = "auto";
}
! $this->tz = StripSlashes($r->get($pos, "tz"));
! $this->theme = StripSlashes($r->get($pos, "theme"));
$this->readTeamList();
***************
*** 231,239 ****
$q = "SELECT * FROM acl where obj_id < 0 AND adr_id = ". $this->id;
$r = $this->dbconn->Exec($q);
! $n = $this->dbconn->NumRows($r);
$a = 0;
while ( $a < $n ) {
! $p = $this->dbconn->Result($r, $a, "perm");
! $obj_id = (integer)$this->dbconn->Result($r, $a, "obj_id");
if ($tutos[$obj_id] == 1) {
$this->p[$obj_id] = $p;
--- 225,233 ----
$q = "SELECT * FROM acl where obj_id < 0 AND adr_id = ". $this->id;
$r = $this->dbconn->Exec($q);
! $n = $r->numrows();
$a = 0;
while ( $a < $n ) {
! $p = $r->get($a, "perm");
! $obj_id = (integer)$r->get($a, "obj_id");
if ($tutos[$obj_id] == 1) {
$this->p[$obj_id] = $p;
***************
*** 243,247 ****
$a++;
}
! $this->dbconn->FreeResult ($r);
return;
}
--- 237,241 ----
$a++;
}
! $r->free();
return;
}
***************
*** 271,275 ****
$q = "SELECT * from products ORDER by name";
$result = $this->dbconn->Exec($q);
! $n = $this->dbconn->NumRows($result);
if ( $n == 0 ) {
--- 265,269 ----
$q = "SELECT * from products ORDER by name";
$result = $this->dbconn->Exec($q);
! $n = $result->numrows();
if ( $n == 0 ) {
***************
*** 295,299 ****
$a++;
}
! $this->dbconn->FreeResult ($result);
unset($p);
$r .= "\n</SELECT>\n";
--- 289,293 ----
$a++;
}
! $result->free();
unset($p);
$r .= "\n</SELECT>\n";
***************
*** 348,361 ****
$q = "SELECT distinct u.adr_id ,d.f_name , d.l_name FROM people u,addresses d , acl a WHERE (u.id = a.obj_id) AND (u.adr_id = d.id) AND (a.perm > 0) AND $t2 ORDER by l_name";
$r = $this->dbconn->Exec($q);
! $n = DB_NumRows($r);
$a = 0;
while ( $a < $n ) {
! $id = DB_Result($r, $a, "adr_id");
! $l_name = DB_Result($r, $a, "l_name");
! $f_name = DB_Result($r, $a, "f_name");
$this->parties[$id] = $f_name ." ". $l_name;
$this->a_parties[$id] = $f_name ." ". $l_name;
$a++;
}
#
# teams we may see by special (ACL) allowance
--- 342,356 ----
$q = "SELECT distinct u.adr_id ,d.f_name , d.l_name FROM people u,addresses d , acl a WHERE (u.id = a.obj_id) AND (u.adr_id = d.id) AND (a.perm > 0) AND $t2 ORDER by l_name";
$r = $this->dbconn->Exec($q);
! $n = $r->numrows();
$a = 0;
while ( $a < $n ) {
! $id = $r->get($a, "adr_id");
! $l_name = $r->get($a, "l_name");
! $f_name = $r->get($a, "f_name");
$this->parties[$id] = $f_name ." ". $l_name;
$this->a_parties[$id] = $f_name ." ". $l_name;
$a++;
}
+ $r->free();
#
# teams we may see by special (ACL) allowance
***************
*** 363,397 ****
$q = "SELECT distinct t.id ,t.name from teams t , acl a WHERE (t.id = a.obj_id) AND (a.perm > 0) AND $t2 ORDER by t.name";
$r = $this->dbconn->Exec($q);
! $n = DB_NumRows($r);
$a = 0;
while ( $a < $n ) {
! $id = DB_Result($r, $a, "id");
! $name = DB_Result($r, $a, "name");
$this->parties[$id] = $lang['team'] ." ". $name;
$this->t_parties[$id] = $lang['team'] ." ".$name;
$a++;
}
#
# Members of our teams
#
$q = "SELECT distinct a.id ,a.l_name ,a.f_name FROM addresses a, adrteam t WHERE t.adr_id = a.id AND $t1 ORDER by a.l_name";
-
$r = $this->dbconn->exec($q);
! $n = DB_NumRows($r);
$a = 0;
while ( $a < $n ) {
! $id = DB_Result($r, $a, "id");
! $l_name = DB_Result($r, $a, "l_name");
! $f_name = DB_Result($r, $a, "f_name");
$this->parties[$id] = $f_name ." ". $l_name;
$this->a_parties[$id] = $f_name ." ". $l_name;
$a++;
}
!
# Self
$this->parties[$this->id] = $this->getFullName();
$this->a_parties[$this->id] = $this->getFullName();
-
- $this->dbconn->FreeResult ($r);
}
/* ---------------------------------------------------------------------------
--- 358,390 ----
$q = "SELECT distinct t.id ,t.name from teams t , acl a WHERE (t.id = a.obj_id) AND (a.perm > 0) AND $t2 ORDER by t.name";
$r = $this->dbconn->Exec($q);
! $n = $r->numrows();
$a = 0;
while ( $a < $n ) {
! $id = $r->get($a, "id");
! $name = $r->get($a, "name");
$this->parties[$id] = $lang['team'] ." ". $name;
$this->t_parties[$id] = $lang['team'] ." ".$name;
$a++;
}
+ $r->free();
#
# Members of our teams
#
$q = "SELECT distinct a.id ,a.l_name ,a.f_name FROM addresses a, adrteam t WHERE t.adr_id = a.id AND $t1 ORDER by a.l_name";
$r = $this->dbconn->exec($q);
! $n = $r->numrows();
$a = 0;
while ( $a < $n ) {
! $id = $r->get($a, "id");
! $l_name = $r->get($a, "l_name");
! $f_name = $r->get($a, "f_name");
$this->parties[$id] = $f_name ." ". $l_name;
$this->a_parties[$id] = $f_name ." ". $l_name;
$a++;
}
! $r->free();
# Self
$this->parties[$this->id] = $this->getFullName();
$this->a_parties[$this->id] = $this->getFullName();
}
/* ---------------------------------------------------------------------------
Index: user_ins.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/user_ins.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** user_ins.php 2001/09/16 19:25:35 1.11
--- user_ins.php 2001/09/19 20:48:33 1.12
***************
*** 51,55 ****
$q = "SELECT * FROM people WHERE admin = 1";
$r = $dbconn->Exec($q);
! $n = $dbconn->NumRows($r);
if ( $n == 1 ) {
$msg .= $lang['Err0047'] ."<BR>";
--- 51,55 ----
$q = "SELECT * FROM people WHERE admin = 1";
$r = $dbconn->Exec($q);
! $n = $r->numrows();
if ( $n == 1 ) {
$msg .= $lang['Err0047'] ."<BR>";
Index: resource.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/resource.pinc,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -r1.19 -r1.20
*** resource.pinc 2001/09/16 19:08:33 1.19
--- resource.pinc 2001/09/19 20:48:33 1.20
***************
*** 76,80 ****
$r = $obj->dbconn->Exec($q);
! $n = DB_NumRows($r);
$a = 0;
--- 76,80 ----
$r = $obj->dbconn->Exec($q);
! $n = $r->numrows();
$a = 0;
***************
*** 85,102 ****
$a++;
}
!
$q = "SELECT * FROM res_use WHERE obj_id = ". $obj->id;
$r = $obj->dbconn->Exec($q);
! $n = DB_NumRows($r);
$a = 0;
while ($a < $n) {
! $x = DB_Result($r,$a, "res_id");
$p = $obj->reslist[$x] ;
$obj->resuselist[$x] = $p;
$a++;
}
!
return;
}
--- 85,102 ----
$a++;
}
! $r->free();
$q = "SELECT * FROM res_use WHERE obj_id = ". $obj->id;
$r = $obj->dbconn->Exec($q);
! $n = $r->numrows();
$a = 0;
while ($a < $n) {
! $x = $r->get($a, "res_id");
$p = $obj->reslist[$x] ;
$obj->resuselist[$x] = $p;
$a++;
}
! $r->free();
return;
}
***************
*** 156,176 ****
$q = "SELECT * from resources WHERE id = ". $id;
$r = $this->dbconn->Exec($q);
! $n = DB_NumRows($r);
if ( 0 == $n) {
return;
}
$this->read_result($r,0);
! $this->dbconn->FreeResult ($r);
}
/* ---------------------------------------------------------------------------
*/
! function read_result (&$result, $pos ) {
global $g_res;
! $this->name = StripSlashes(DB_Result($result, $pos, "name"));
! $this->desc = StripSlashes(DB_Result($result, $pos, "description"));
! $this->creator->read(DB_Result($result, $pos, "creator"));
! $this->id = DB_Result($result, $pos, "id");
! $this->creation = new DateTime(DB_Result($result, $pos, "creation"));
acl_read($this);
--- 156,176 ----
$q = "SELECT * from resources WHERE id = ". $id;
$r = $this->dbconn->Exec($q);
! $n = $r->numrows();
if ( 0 == $n) {
return;
}
$this->read_result($r,0);
! $r->free();
}
/* ---------------------------------------------------------------------------
*/
! function read_result (&$r, $pos ) {
global $g_res;
! $this->name = StripSlashes($r->get($pos, "name"));
! $this->desc = StripSlashes($r->get($pos, "description"));
! $this->creator->read($r->get($pos, "creator"));
! $this->id = $r->get($pos, "id");
! $this->creation = new DateTime($r->get($pos, "creation"));
acl_read($this);
***************
*** 184,192 ****
$q = "SELECT * from res_use WHERE res_id = ". $this->id ." ORDER by obj_id DESC";
$r = $this->dbconn->Exec($q);
! $n = DB_NumRows($r);
$a = 0;
while ($a < $n) {
! $i = DB_Result($r, $a, "obj_id");
$obj = getObject($this->dbconn,$i);
if ( $obj != -1 ) {
--- 184,192 ----
$q = "SELECT * from res_use WHERE res_id = ". $this->id ." ORDER by obj_id DESC";
$r = $this->dbconn->Exec($q);
! $n = $r->numrows();
$a = 0;
while ($a < $n) {
! $i = $r->get($a, "obj_id");
$obj = getObject($this->dbconn,$i);
if ( $obj != -1 ) {
***************
*** 195,199 ****
$a++;
}
! $this->dbconn->FreeResult ($r);
}
/* ---------------------------------------------------------------------------
--- 195,199 ----
$a++;
}
! $r->free();
}
/* ---------------------------------------------------------------------------
Index: resource_overview.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/resource_overview.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** resource_overview.php 2001/09/16 19:29:00 1.9
--- resource_overview.php 2001/09/19 20:48:33 1.10
***************
*** 16,20 ****
global $lang,$tutos,$link1;
! $n = $dbconn->NumRows($result);
if ( 0 == $n) {
echo $lang['Err0048'];
--- 16,20 ----
global $lang,$tutos,$link1;
! $n = $result->numrows();
if ( 0 == $n) {
echo $lang['Err0048'];
***************
*** 97,102 ****
$q .= " DESC ";
}
! $link1 = addUrlParameter($link1,"xf=".UrlEncode($f));
! $link1 = addUrlParameter($link1,"xo=". $o);
} else {
$q .= " ORDER by name";
--- 97,102 ----
$q .= " DESC ";
}
! $link1 = addUrlParameter($link1,"xf=".UrlEncode($xf));
! $link1 = addUrlParameter($link1,"xo=". $xo);
} else {
$q .= " ORDER by name";
***************
*** 120,122 ****
CVS Info: $Id$
$Author$
! -->
\ No newline at end of file
--- 120,122 ----
CVS Info: $Id$
$Author$
! -->
|
|
From: Gero K. <gok...@us...> - 2001-09-19 20:47:32
|
Update of /cvsroot/tutos/tutos/php
In directory usw-pr-cvs1:/tmp/cvs-serv31946/php
Modified Files:
team.pinc team_ins.php team_overview.php installation.pinc
installation_overview.php task.pinc timetrack.pinc
timetrack_overview.php app_ins.php app_new.php app_new_r.php
app_overview.php app_show.php appointment.pinc
Log Message:
new resultset classes for databases
Index: team.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/team.pinc,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -r1.33 -r1.34
*** team.pinc 2001/09/16 19:08:33 1.33
--- team.pinc 2001/09/19 20:47:29 1.34
***************
*** 41,45 ****
$query = "SELECT adr_id FROM people";
$result = $this->dbconn->Exec($query);
! $n = DB_NumRows($result);
if ( 0 == $n) {
echo "<B>Problem: <I>Team $id not found</I></B>";
--- 41,45 ----
$query = "SELECT adr_id FROM people";
$result = $this->dbconn->Exec($query);
! $n = $result->numrows();
if ( 0 == $n) {
echo "<B>Problem: <I>Team $id not found</I></B>";
***************
*** 52,56 ****
while ( $a < $n ) {
! $this->ids[DB_Result($result, $a, "adr_id")] = 1 ;
$a++;
}
--- 52,56 ----
while ( $a < $n ) {
! $this->ids[$result->get($a, "adr_id")] = 1 ;
$a++;
}
***************
*** 59,66 ****
$query = "SELECT * FROM teams WHERE id = ". $id;
$result = $this->dbconn->Exec($query);
! $n = DB_NumRows($result);
if ( 0 == $n) {
# echo "<B>Problem: <I>Team $id not found</I></B>";
! $this->id = -1;
return;
}
--- 59,66 ----
$query = "SELECT * FROM teams WHERE id = ". $id;
$result = $this->dbconn->Exec($query);
! $n = $result->numrows();
if ( 0 == $n) {
# echo "<B>Problem: <I>Team $id not found</I></B>";
! $this->id = -1;
return;
}
***************
*** 69,98 ****
}
! $this->dbconn->FreeResult ($result);
}
/* ---------------------------------------------------------------------------
* Read all a result
*/
! function read_result(&$result,$a) {
global $g_team;
! $this->id = DB_Result($result, $a, "id");
! $this->name = StripSlashes(DB_Result($result, $a, "name"));
! $cid = DB_Result($result, $a, "owner");
$this->owner = new tutos_address($this->dbconn);
$this->owner->read($cid);
$this->ids[$cid] = 1;
! $this->creation = new DateTime(DB_Result($result, $a, "creation"));
# Teammember IDS
$q = "SELECT adr_id FROM adrteam WHERE team_id =". $this->id;
! $r = $this->dbconn->Exec($q);
! $n = DB_NumRows($r);
$a = 0;
while ( $a < $n ) {
! $this->ids[DB_Result($r, $a, "adr_id")] = 1;
$a++;
}
! $this->dbconn->FreeResult ($r);
acl_read($this);
$g_team[$this->id] = $this;
--- 69,98 ----
}
! $result->free();
}
/* ---------------------------------------------------------------------------
* Read all a result
*/
! function read_result(&$r,$a) {
global $g_team;
! $this->id = $r->get($a, "id");
! $this->name = StripSlashes($r->get($a, "name"));
! $cid = $r->get($a, "owner");
$this->owner = new tutos_address($this->dbconn);
$this->owner->read($cid);
$this->ids[$cid] = 1;
! $this->creation = new DateTime($r->get($a, "creation"));
# Teammember IDS
$q = "SELECT adr_id FROM adrteam WHERE team_id =". $this->id;
! $r2 = $this->dbconn->Exec($q);
! $n = $r2->numrows();
$a = 0;
while ( $a < $n ) {
! $this->ids[$r2->get($a, "adr_id")] = 1;
$a++;
}
! $r2->free();
acl_read($this);
$g_team[$this->id] = $this;
***************
*** 112,119 ****
$q .= " ORDER by a.l_name";
$result = $this->dbconn->Exec($q);
! $n = DB_NumRows($result);
$a = 0;
while ( $a < $n ) {
! $aid = DB_Result($result, $a, "id");
$x = new tutos_address($this->dbconn);
$x->read_result($result,$a);
--- 112,119 ----
$q .= " ORDER by a.l_name";
$result = $this->dbconn->Exec($q);
! $n = $result->numrows();
$a = 0;
while ( $a < $n ) {
! $aid = $result->get($a, "id");
$x = new tutos_address($this->dbconn);
$x->read_result($result,$a);
***************
*** 121,125 ****
$a++;
}
! $this->dbconn->FreeResult ($result);
# $this->member[$this->owner->id] = $this->owner;
--- 121,125 ----
$a++;
}
! $result->free();
# $this->member[$this->owner->id] = $this->owner;
***************
*** 322,325 ****
--- 322,331 ----
}
return acl_mod_ok($this);
+ }
+ /* ---------------------------------------------------------------------------
+ * This is not a user
+ */
+ function isUser () {
+ return 0;
}
/* ---------------------------------------------------------------------------
Index: team_ins.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/team_ins.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** team_ins.php 2001/09/16 19:13:20 1.9
--- team_ins.php 2001/09/19 20:47:29 1.10
***************
*** 43,47 ****
$q = "SELECT * FROM teams WHERE name = '". $name ."'";
$r = $dbconn->Exec($q);
! $n = DB_NumRows($r);
if ( 0 != $n) {
$x = new team($dbconn);
--- 43,47 ----
$q = "SELECT * FROM teams WHERE name = '". $name ."'";
$r = $dbconn->Exec($q);
! $n = $r->numrows();
if ( 0 != $n) {
$x = new team($dbconn);
***************
*** 49,52 ****
--- 49,53 ----
$msg .= sprintf($lang['Err0046'],$x->getLink()) ."<BR>";
}
+ $r->free();
}
}
Index: team_overview.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/team_overview.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** team_overview.php 2001/09/11 21:05:39 1.9
--- team_overview.php 2001/09/19 20:47:29 1.10
***************
*** 15,19 ****
global $tutos,$lang,$link1;
! $n = $dbconn->NumRows($result);
if ( 0 == $n) {
echo "<SPAN CLASS=warn>". $lang['Err0048'] ."</SPAN>";
--- 15,19 ----
global $tutos,$lang,$link1;
! $n = $result->numrows();
if ( 0 == $n) {
echo "<SPAN CLASS=warn>". $lang['Err0048'] ."</SPAN>";
Index: installation.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/installation.pinc,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -r1.32 -r1.33
*** installation.pinc 2001/09/17 20:27:06 1.32
--- installation.pinc 2001/09/19 20:47:29 1.33
***************
*** 68,72 ****
}
$r = $obj->dbconn->Exec($q);
! $n = DB_NumRows($r);
$a = 0;
while ($a < $n) {
--- 68,72 ----
}
$r = $obj->dbconn->Exec($q);
! $n = $r->numrows();
$a = 0;
while ($a < $n) {
***************
*** 80,83 ****
--- 80,84 ----
$a++;
}
+ $r->free();
return;
}
***************
*** 114,149 ****
if ( isset($g_ins[$id]) ) {
- # Hashed
- # echo "\n<!-- FOUND INS ". $id ." -->\n";
$this = $g_ins[$id];
return;
}
- # echo "\n<!-- INS ". $id ." -->\n";
$query = "SELECT * FROM installations WHERE id = ". $id;
$result = $this->dbconn->Exec($query);
! $n = DB_NumRows($result);
if ( 0 == $n) {
return;
}
$this->read_result($result,0);
}
/* ---------------------------------------------------------------------------
*/
! function read_result ($result, $pos ) {
global $g_ins;
! $this->id = DB_Result($result, $pos, "id");
! $this->money = DB_Result($result, $pos, "money");
! $this->currency = DB_Result($result, $pos, "currency");
!
! $cid = DB_Result($result, $pos, "customer_id");
! $iid = DB_Result($result, $pos, "installer_id");
! $sid = DB_Result($result, $pos, "seller_id");
! $pid = DB_Result($result, $pos, "product_id");
! $this->salesdate->setDateTime(DB_Result($result, $pos, "salesdate"));
! $this->instdate->setDateTime(DB_Result($result, $pos, "instdate"));
$this->product->read($pid);
--- 115,148 ----
if ( isset($g_ins[$id]) ) {
$this = $g_ins[$id];
return;
}
$query = "SELECT * FROM installations WHERE id = ". $id;
$result = $this->dbconn->Exec($query);
! $n = $result->numrows();
if ( 0 == $n) {
return;
}
$this->read_result($result,0);
+ $result->free();
}
/* ---------------------------------------------------------------------------
*/
! function read_result (&$r, $pos ) {
global $g_ins;
! $this->id = $r->get($pos, "id");
! $this->money = $r->get($pos, "money");
! $this->currency = $r->get($pos, "currency");
!
! $cid = $r->get($pos, "customer_id");
! $iid = $r->get($pos, "installer_id");
! $sid = $r->get($pos, "seller_id");
! $pid = $r->get($pos, "product_id");
! $this->salesdate->setDateTime($r->get($pos, "salesdate"));
! $this->instdate->setDateTime($r->get($pos, "instdate"));
$this->product->read($pid);
Index: installation_overview.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/installation_overview.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** installation_overview.php 2001/09/17 20:27:06 1.10
--- installation_overview.php 2001/09/19 20:47:29 1.11
***************
*** 19,23 ****
global $lang,$link1,$tutos;
! $n = $dbconn->NumRows($result);
if ( 0 == $n) {
echo $lang['Err0048'];
--- 19,23 ----
global $lang,$link1,$tutos;
! $n = $result->numrows();
if ( 0 == $n) {
echo $lang['Err0048'];
***************
*** 138,141 ****
--- 138,142 ----
HTML_Base3();
+ $r->free();
$dbconn->Close();
?>
Index: task.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/task.pinc,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -r1.46 -r1.47
*** task.pinc 2001/09/16 19:08:33 1.46
--- task.pinc 2001/09/19 20:47:29 1.47
***************
*** 11,15 ****
*/
function addTaskCal(&$obj, &$r,&$from,&$to) {
! $n = DB_NumRows($r);
$a = 0;
while ( $a < $n ) {
--- 11,15 ----
*/
function addTaskCal(&$obj, &$r,&$from,&$to) {
! $n = $r->numrows();
$a = 0;
while ( $a < $n ) {
***************
*** 36,40 ****
$obj->callist[] = $o;
}
! $obj->dbconn->FreeResult ($r);
}
/* --------------------------------------------------------------------------
--- 36,40 ----
$obj->callist[] = $o;
}
! $r->free();
}
/* --------------------------------------------------------------------------
***************
*** 107,111 ****
$q .= " ORDER by s_start";
$r = $obj->dbconn->Exec($q);
! $n = DB_NumRows($r);
$a = 0;
while ($a < $n) {
--- 107,111 ----
$q .= " ORDER by s_start";
$r = $obj->dbconn->Exec($q);
! $n = $r->numrows();
$a = 0;
while ($a < $n) {
***************
*** 126,130 ****
# echo "TL: " .$obj->getLink() ." $norecur ". count($obj->tasklist)."<BR>\n";
!
return;
}
--- 126,130 ----
# echo "TL: " .$obj->getLink() ." $norecur ". count($obj->tasklist)."<BR>\n";
! $r->free();
return;
}
***************
*** 215,238 ****
/* ---------------------------------------------------------------------------
*/
! function read_result (&$result, $pos ) {
global $current_user, $tutos, $g_task;
! $this->id = DB_Result($result, $pos, "id");
! $this->p_id = DB_Result($result, $pos, "p_id");
$this->parent = getObject($this->dbconn,$this->p_id);
! $this->state = DB_Result($result, $pos, "status");
! $this->volume = DB_Result($result, $pos, "volume");
! $this->volume_done = DB_Result($result, $pos, "volume_done");
! $this->name = StripSlashes(DB_Result($result, $pos, "name"));
! $this->desc = StripSlashes(DB_Result($result, $pos, "description"));
! $this->creation = new DateTime(DB_Result($result, $pos, "creation"));
!
! $this->r_start = new DateTime(DB_Result($result, $pos, "r_start"));
! $this->r_end = new DateTime(DB_Result($result, $pos, "r_end"));
! $this->s_start = new DateTime(DB_Result($result, $pos, "s_start"));
! $this->s_end = new DateTime(DB_Result($result, $pos, "s_end"));
! $cid = DB_Result($result, $pos, "worker");
$this->worker = GetObject($this->dbconn,$cid);
if ( $this->worker == -1 ) {
--- 215,238 ----
/* ---------------------------------------------------------------------------
*/
! function read_result (&$r, $pos ) {
global $current_user, $tutos, $g_task;
! $this->id = $r->get($pos, "id");
! $this->p_id = $r->get($pos, "p_id");
$this->parent = getObject($this->dbconn,$this->p_id);
! $this->state = $r->get($pos, "status");
! $this->volume = $r->get($pos, "volume");
! $this->volume_done = $r->get($pos, "volume_done");
! $this->name = StripSlashes($r->get($pos, "name"));
! $this->desc = StripSlashes($r->get($pos, "description"));
! $this->creation = new DateTime($r->get($pos, "creation"));
!
! $this->r_start = new DateTime($r->get($pos, "r_start"));
! $this->r_end = new DateTime($r->get($pos, "r_end"));
! $this->s_start = new DateTime($r->get($pos, "s_start"));
! $this->s_end = new DateTime($r->get($pos, "s_end"));
! $cid = $r->get($pos, "worker");
$this->worker = GetObject($this->dbconn,$cid);
if ( $this->worker == -1 ) {
***************
*** 240,244 ****
}
! $cid = DB_Result($result, $pos, "creator");
$this->creator = new tutos_address($this->dbconn);
$this->creator->read($cid);
--- 240,244 ----
}
! $cid = $r->get($pos, "creator");
$this->creator = new tutos_address($this->dbconn);
$this->creator->read($cid);
***************
*** 291,300 ****
$q = "SELECT * from tasks where id = ". $id;
$r = $this->dbconn->Exec($q);
! $n = DB_NumRows($r);
if ( 0 == $n) {
return;
}
$this->read_result($r,0);
! $this->dbconn->FreeResult ($r);
}
/* ---------------------------------------------------------------------------
--- 291,300 ----
$q = "SELECT * from tasks where id = ". $id;
$r = $this->dbconn->Exec($q);
! $n = $r->numrows();
if ( 0 == $n) {
return;
}
$this->read_result($r,0);
! $r->free();
}
/* ---------------------------------------------------------------------------
Index: timetrack.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/timetrack.pinc,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -r1.18 -r1.19
*** timetrack.pinc 2001/09/11 21:00:09 1.18
--- timetrack.pinc 2001/09/19 20:47:29 1.19
***************
*** 15,19 ****
# FIXME (mybe we should rebook the efforts to the user himself) !!
$q = "DELETE FROM timetrack WHERE link_id = ". $obj->id;
! $r = $obj->dbconn->Exec($q);
return $msg;
}
--- 15,19 ----
# FIXME (mybe we should rebook the efforts to the user himself) !!
$q = "DELETE FROM timetrack WHERE link_id = ". $obj->id;
! $obj->dbconn->Exec($q);
return $msg;
}
***************
*** 35,43 ****
}
$r = $obj->dbconn->Exec($q);
! $n = DB_NumRows($r);
if ( $n == 0 ) {
return;
}
! $obj->timetracksum = DB_Result($r,0,"XX");
}
--- 35,45 ----
}
$r = $obj->dbconn->Exec($q);
! $n = $r->numrows();
if ( $n == 0 ) {
return;
}
! $obj->timetracksum = $r->get(0,"XX");
! $r->free();
! return;
}
***************
*** 64,72 ****
/* ---------------------------------------------------------------------------
*/
! function read_result ($result, $pos ) {
global $g_tt;
! $this->id = DB_Result($result, $pos, "id");
! $this->wid = DB_Result($result, $pos, "adr_id");
$this->worker = new tutos_address($this->dbconn);
$this->worker->read($this->wid);
--- 66,74 ----
/* ---------------------------------------------------------------------------
*/
! function read_result (&$r, $pos ) {
global $g_tt;
! $this->id = $r->get($pos, "id");
! $this->wid = $r->get($pos, "adr_id");
$this->worker = new tutos_address($this->dbconn);
$this->worker->read($this->wid);
***************
*** 75,85 ****
$this->worker->read($this->wid);
}
! $this->link_id = DB_Result($result, $pos, "link_id");
$this->ref = getObject($this->dbconn,$this->link_id);
! $this->desc = StripSlashes(DB_Result($result, $pos, "description"));
! $this->volume = DB_Result($result, $pos, "volume");
! $this->creation->setDateTime(DB_Result($result, $pos, "creation"));
! $this->wday->setDateTime(DB_Result($result, $pos, "vtime"));
$g_tt[$this->id] = $this;
--- 77,87 ----
$this->worker->read($this->wid);
}
! $this->link_id = $r->get($pos, "link_id");
$this->ref = getObject($this->dbconn,$this->link_id);
! $this->desc = StripSlashes($r->get($pos, "description"));
! $this->volume = $r->get($pos, "volume");
! $this->creation->setDateTime($r->get($pos, "creation"));
! $this->wday->setDateTime($r->get($pos, "vtime"));
$g_tt[$this->id] = $this;
***************
*** 101,105 ****
$q = "SELECT * FROM timetrack WHERE id =". $id;
$r = $this->dbconn->Exec($q);
! $n = DB_NumRows($r);
if ( 0 == $n) {
$this->name = "<B>Problem: <I>Timetrack Fraction $id not found<I></B>";
--- 103,107 ----
$q = "SELECT * FROM timetrack WHERE id =". $id;
$r = $this->dbconn->Exec($q);
! $n = $r->numrows();
if ( 0 == $n) {
$this->name = "<B>Problem: <I>Timetrack Fraction $id not found<I></B>";
***************
*** 107,111 ****
}
$this->read_result($r,0);
! $this->dbconn->FreeResult ($r);
}
/* ---------------------------------------------------------------------------
--- 109,113 ----
}
$this->read_result($r,0);
! $r->free();
}
/* ---------------------------------------------------------------------------
***************
*** 167,175 ****
$q .= " WHERE id = ". $this->id;
! # Prepare the history
$this->modified[] = array ( "field" => "TimetrackModify" ,
"old" => "" ,
"new" => $this->volume,
! "obj_id" => $this->link_id
);
}
--- 169,177 ----
$q .= " WHERE id = ". $this->id;
! # Prepare the history FIX ME !!
$this->modified[] = array ( "field" => "TimetrackModify" ,
"old" => "" ,
"new" => $this->volume,
! "obj_id" => $this->id
);
}
***************
*** 219,222 ****
--- 221,231 ----
}
/* ---------------------------------------------------------------------------
+ *
+ */
+ function see_ok() {
+ global $tutos;
+ return $tutos[seeok];
+ }
+ /* ---------------------------------------------------------------------------
* Return a url that displays this timetrack fraction
*/
***************
*** 225,228 ****
--- 234,258 ----
}
/* ---------------------------------------------------------------------------
+ * Return a url that displays this timetrack fraction
+ */
+ function getFullName() {
+ return $this->volume ."@" . $this->wday->getDate();
+ }
+ /* ---------------------------------------------------------------------------
+ * Return a link to this bug
+ */
+ function getLink($text = "") {
+ global $lang;
+
+ if ( $text == "" ) {
+ $text = htmlentities($this->getFullName());
+ }
+ if ( $this->see_ok() ) {
+ return makelink($this->getURL() , $text ,sprintf($lang['timetrack'],$this->getFullName()));
+ } else {
+ return $text;
+ }
+ }
+ /* ---------------------------------------------------------------------------
* Return a data as comma seperated values string
*/
***************
*** 250,252 ****
}
$includes[timetrack.pinc] = 1;
! ?>
\ No newline at end of file
--- 280,282 ----
}
$includes[timetrack.pinc] = 1;
! ?>
Index: timetrack_overview.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/timetrack_overview.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** timetrack_overview.php 2001/09/10 16:37:54 1.14
--- timetrack_overview.php 2001/09/19 20:47:29 1.15
***************
*** 23,27 ****
global $lang, $tutos, $link1;
! $n = $dbconn->NumRows($r);
if ( 0 == $n) {
echo $lang['Err0048'];
--- 23,27 ----
global $lang, $tutos, $link1;
! $n = $r->numrows();
if ( 0 == $n) {
echo $lang['Err0048'];
***************
*** 43,47 ****
# Fill the sum
while ( $a < $start ) {
! $sum += DB_Result($r, $a, "volume");
$a++;
}
--- 43,47 ----
# Fill the sum
while ( $a < $start ) {
! $sum += $r->get($a, "volume");
$a++;
}
***************
*** 84,88 ****
# Fill the sum
while ( $a < $n ) {
! $sum += DB_Result($r, $a, "volume");
$a++;
}
--- 84,88 ----
# Fill the sum
while ( $a < $n ) {
! $sum += $r->get($a, "volume");
$a++;
}
***************
*** 101,105 ****
global $lang,$tutos,$link,$format;
! $n = $dbconn->NumRows($r);
if ( 0 == $n) {
echo $lang['Err0048'];
--- 101,105 ----
global $lang,$tutos,$link,$format;
! $n = $r->numrows();
if ( 0 == $n) {
echo $lang['Err0048'];
***************
*** 119,126 ****
* Statistical Timetrack Info
*/
! Function statinfo(&$dbconn,&$r) {
global $lang,$tutos,$link,$format;
! $n = DB_NumRows($r);
if ( 0 == $n) {
echo $lang['Err0048'];
--- 119,126 ----
* Statistical Timetrack Info
*/
! Function statinfo(&$dbconn,&$result) {
global $lang,$tutos,$link,$format;
! $n = $result->numrows();
if ( 0 == $n) {
echo $lang['Err0048'];
***************
*** 131,135 ****
while ( $a < $n ) {
$tt = new timetrack($dbconn);
! $tt->read_result($r,$a);
if ( !isset($w[$tt->worker->id]) ) {
$w[$tt->worker->id] = 0;
--- 131,135 ----
while ( $a < $n ) {
$tt = new timetrack($dbconn);
! $tt->read_result($result,$a);
if ( !isset($w[$tt->worker->id]) ) {
$w[$tt->worker->id] = 0;
***************
*** 337,340 ****
--- 337,341 ----
HTML_Base3();
}
+ $r->free();
$dbconn->Close();
?>
Index: app_ins.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/app_ins.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** app_ins.php 2001/09/10 16:40:40 1.5
--- app_ins.php 2001/09/19 20:47:29 1.6
***************
*** 151,155 ****
#
if ( !isset($descr) || empty($descr) ) {
! $msg .= $lang['Err0003'] ."<BR>";
} else {
$gotourl="$gotourl&descr=". UrlEncode(StripSlashes($descr));
--- 151,155 ----
#
if ( !isset($descr) || empty($descr) ) {
! # $msg .= $lang['Err0003'] ."<BR>";
} else {
$gotourl="$gotourl&descr=". UrlEncode(StripSlashes($descr));
***************
*** 159,162 ****
--- 159,163 ----
# VISITOR
#
+ $a->visitor = new tutos_address($dbconn);
if ( isset($vfn) && !empty($vfn) ) {
$a->visitor = check_address($vfn,"vfn","vl","acd");
***************
*** 171,174 ****
--- 172,176 ----
# PRODUCT
#
+ $a->product = new product($dbconn);
if ( isset($pfn) && !empty($pfn) ) {
$a->product = check_product($pfn);
Index: app_new.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/app_new.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** app_new.php 2001/09/10 16:40:40 1.7
--- app_new.php 2001/09/19 20:47:29 1.8
***************
*** 123,127 ****
echo "</TR><TR>\n";
! echo " <TD VALIGN=top> <B>". $lang['Description'] ." </B><FONT COLOR=red>(*)</FONT></TD>";
echo " <TD COLSPAN=5><TEXTAREA wrap=virtual rows=3 cols=40 name=\"descr\">". $a->descr ."</TEXTAREA>\n";
echo " </TD>\n";
--- 123,127 ----
echo "</TR><TR>\n";
! echo " <TD VALIGN=top> <B>". $lang['Description'] ." </B></TD>";
echo " <TD COLSPAN=5><TEXTAREA wrap=virtual rows=3 cols=40 name=\"descr\">". $a->descr ."</TEXTAREA>\n";
echo " </TD>\n";
***************
*** 230,233 ****
--- 230,234 ----
echo "<TABLE>";
echo "<TR><TD>";
+ echo menulink("app_select.php" ,$lang['Search'],$lang['SearchForApp']) . "<BR>";
echo menulink("app_new.php" ,$lang['NewEntry'],$lang['NewAppointInfo']) . "<BR>";
echo menulink("app_new_r.php" ,$lang['NewAppointR'],$lang['NewAppointInfoR']) . "<BR>";
Index: app_new_r.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/app_new_r.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** app_new_r.php 2001/09/10 16:40:40 1.7
--- app_new_r.php 2001/09/19 20:47:29 1.8
***************
*** 140,144 ****
echo "</TR><TR>\n";
! echo " <TD VALIGN=top> <B>". $lang['Description'] ." </B><FONT COLOR=red>(*)</FONT></TD>";
echo " <TD COLSPAN=5><TEXTAREA wrap=virtual rows=3 cols=40 name=\"descr\">". $a->descr ."</TEXTAREA>\n";
echo " </TD>\n";
--- 140,144 ----
echo "</TR><TR>\n";
! echo " <TD VALIGN=top> <B>". $lang['Description'] ." </B></TD>";
echo " <TD COLSPAN=5><TEXTAREA wrap=virtual rows=3 cols=40 name=\"descr\">". $a->descr ."</TEXTAREA>\n";
echo " </TD>\n";
***************
*** 202,205 ****
--- 202,206 ----
echo "<TABLE>";
echo "<TR><TD>";
+ echo menulink("app_select.php" ,$lang['Search'],$lang['SearchForApp']) . "<BR>";
echo menulink("app_new.php" ,$lang['NewEntry'],$lang['NewAppointInfo']) . "<BR>";
echo menulink("app_new_r.php" ,$lang['NewAppointR'],$lang['NewAppointInfoR']) . "<BR>";
Index: app_overview.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/app_overview.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** app_overview.php 2001/09/10 16:40:40 1.5
--- app_overview.php 2001/09/19 20:47:29 1.6
***************
*** 18,22 ****
global $lang,$tutos,$link1;
! $n = DB_NumRows($result);
if ( 0 == $n) {
echo $lang['Err0048'];
--- 18,22 ----
global $lang,$tutos,$link1;
! $n = $result->numrows();
if ( 0 == $n) {
echo $lang['Err0048'];
***************
*** 24,28 ****
}
! echo "<TABLE BORDER=1 CELLPADDING=3 CELLSPACING=0>\n";
echo "<TR>\n";
echo " <TH>ID</TH>\n";
--- 24,28 ----
}
! echo "<TABLE CLASS=singe BORDER=1 CELLPADDING=3 CELLSPACING=0>\n";
echo "<TR>\n";
echo " <TH>ID</TH>\n";
***************
*** 210,215 ****
HTML_Base3();
$dbconn->Close();
-
?>
<!--
--- 210,215 ----
HTML_Base3();
+ $result->free();
$dbconn->Close();
?>
<!--
Index: app_show.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/app_show.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** app_show.php 2001/09/10 16:40:40 1.5
--- app_show.php 2001/09/19 20:47:29 1.6
***************
*** 115,122 ****
echo "</TR>\n";
! echo "<TR>\n";
! showfield($lang['Description']);
! echo " <TD COLSPAN=3>". urlReplace($a->descr) ." </TD>\n";
! echo "</TR>\n";
echo "<TR>\n";
--- 115,124 ----
echo "</TR>\n";
! if ( $a->descr != "" ) {
! echo "<TR>\n";
! showfield($lang['Description']);
! echo " <TD COLSPAN=3>". urlReplace($a->descr) ." </TD>\n";
! echo "</TR>\n";
! }
echo "<TR>\n";
***************
*** 189,192 ****
--- 191,195 ----
echo "<TABLE>";
echo "<TR><TD>";
+ echo menulink("app_select.php" ,$lang['Search'],$lang['SearchForApp']) . "<BR>";
echo menulink("app_new.php" ,$lang['NewEntry'],$lang['NewAppointInfo']) . "<BR>";
echo menulink("app_new_r.php" ,$lang['NewAppointR'],$lang['NewAppointInfoR']) . "<BR>";
Index: appointment.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/appointment.pinc,v
retrieving revision 1.59
retrieving revision 1.60
diff -C2 -r1.59 -r1.60
*** appointment.pinc 2001/09/17 20:25:30 1.59
--- appointment.pinc 2001/09/19 20:47:29 1.60
***************
*** 13,17 ****
*/
function addAppsCal(&$obj, &$r,&$from,&$to) {
! $n = $obj->dbconn->NumRows($r);
$a = 0;
while ( $a < $n ) {
--- 13,17 ----
*/
function addAppsCal(&$obj, &$r,&$from,&$to) {
! $n = $r->numrows();
$a = 0;
while ( $a < $n ) {
***************
*** 40,44 ****
$obj->callist[] = $o;
}
! $obj->dbconn->FreeResult ($r);
}
/* --------------------------------------------------------------------------
--- 40,44 ----
$obj->callist[] = $o;
}
! $r->free();
}
/* --------------------------------------------------------------------------
***************
*** 149,155 ****
echo " ";
if ( $f->outside ) {
! echo $lang['VisitAt'] .": ";
} else {
! echo $lang['VisitFrom'] .": ";
}
echo $f->visitor->getLink();
--- 149,155 ----
echo " ";
if ( $f->outside ) {
! echo $lang['VisitAt'] .": ";
} else {
! echo $lang['VisitFrom'] .": ";
}
echo $f->visitor->getLink();
***************
*** 183,187 ****
$q .= " ORDER BY a_start DESC";
$r = $obj->dbconn->Exec($q);
! $n = DB_NumRows($r);
$a = 0;
while ($a < $n) {
--- 183,187 ----
$q .= " ORDER BY a_start DESC";
$r = $obj->dbconn->Exec($q);
! $n = $r->numrows();
$a = 0;
while ($a < $n) {
***************
*** 193,196 ****
--- 193,197 ----
$a++;
}
+ $r->free();
return;
}
***************
*** 238,257 ****
/* ---------------------------------------------------------------------------
*/
! function read_result ($result, $pos ) {
global $g_app;
! $this->id = DB_Result($result, $pos, "id");
! $this->trace = DB_Result($result, $pos, "trace");
! $this->mod_allow = DB_Result($result, $pos, "mod_allow");
! $this->descr = StripSlashes(DB_Result($result, $pos, "description"));
! $this->start = new DateTime(DB_Result($result, $pos, "a_start"));
! $this->end = new DateTime(DB_Result($result, $pos, "a_end"));
! $this->creation = new DateTime(DB_Result($result, $pos, "creation"));
! $cid = DB_Result($result, $pos, "creator");
$this->creator = new tutos_address($this->dbconn);
$this->creator->read($cid);
! $vid = DB_Result($result, $pos, "visitor");
$this->visitor->read($vid);
if ($this->visitor->id == -1) {
--- 239,258 ----
/* ---------------------------------------------------------------------------
*/
! function read_result (&$r, $pos ) {
global $g_app;
! $this->id = $r->get($pos, "id");
! $this->trace = $r->get($pos, "trace");
! $this->mod_allow = $r->get($pos, "mod_allow");
! $this->descr = StripSlashes($r->get($pos, "description"));
! $this->start = new DateTime($r->get($pos, "a_start"));
! $this->end = new DateTime($r->get($pos, "a_end"));
! $this->creation = new DateTime($r->get($pos, "creation"));
! $cid = $r->get($pos, "creator");
$this->creator = new tutos_address($this->dbconn);
$this->creator->read($cid);
! $vid = $r->get($pos, "visitor");
$this->visitor->read($vid);
if ($this->visitor->id == -1) {
***************
*** 264,277 ****
}
! $pid = DB_Result($result, $pos, "product");
$this->product->read($pid);
! $this->remember = DB_Result($result, $pos, "remember");
! $this->remembered = DB_Result($result, $pos, "remembered");
! $this->outside = DB_Result($result, $pos, "outside");
!
! $this->repeat = DB_Result($result, $pos, "repeat");
! $this->r_arg = DB_Result($result, $pos, "r_arg");
! $this->r_ignore = DB_Result($result, $pos, "r_ignore");
# Checks
--- 265,278 ----
}
! $pid = $r->get($pos, "product");
$this->product->read($pid);
! $this->remember = $r->get($pos, "remember");
! $this->remembered = $r->get($pos, "remembered");
! $this->outside = $r->get($pos, "outside");
!
! $this->repeat = $r->get($pos, "repeat");
! $this->r_arg = $r->get($pos, "r_arg");
! $this->r_ignore = $r->get($pos, "r_ignore");
# Checks
***************
*** 316,320 ****
$query = "SELECT * FROM calendar WHERE id = ". $id;
$result = $this->dbconn->Exec($query);
! $i = $this->dbconn->NumRows($result);
if ( 1 != $i) {
return;
--- 317,321 ----
$query = "SELECT * FROM calendar WHERE id = ". $id;
$result = $this->dbconn->Exec($query);
! $i = $result->numrows();
if ( 1 != $i) {
return;
***************
*** 322,326 ****
$this->read_result($result,0);
! $this->dbconn->FreeResult ($result);
}
--- 323,327 ----
$this->read_result($result,0);
! $result->free();
}
***************
*** 341,348 ****
$result = $this->dbconn->Exec($query);
! $n = $this->dbconn->NumRows($result);
$a = 0;
while ($a < $n) {
! $xx = DB_Result($result, $a, "adr_id");
$this->participant[$xx] = new tutos_address($this->dbconn);
$this->participant[$xx]->read($xx);
--- 342,349 ----
$result = $this->dbconn->Exec($query);
! $n = $result->numrows();
$a = 0;
while ($a < $n) {
! $xx = $result->get($a, "adr_id");
$this->participant[$xx] = new tutos_address($this->dbconn);
$this->participant[$xx]->read($xx);
***************
*** 352,360 ****
$this->participant[$xx]->read($xx);
}
! $this->participant_state[$xx] = DB_Result($result, $a, "state");
$a++;
}
! $this->dbconn->FreeResult($result);
$this->participants_is_read = 1;
}
--- 353,361 ----
$this->participant[$xx]->read($xx);
}
! $this->participant_state[$xx] = $result->get($a, "state");
$a++;
}
! $result->free();
$this->participants_is_read = 1;
}
|
|
From: Gero K. <gok...@us...> - 2001-09-19 20:46:10
|
Update of /cvsroot/tutos/tutos/php
In directory usw-pr-cvs1:/tmp/cvs-serv31621/php
Modified Files:
company.pinc company_ins.php company_overview.php
company_show.php address.pinc address_ins.php
address_overview.php address_tools.p3 product.pinc
product_ins.php product_overview.php
Log Message:
new resultset classes for databases
Index: company.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/company.pinc,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -r1.25 -r1.26
*** company.pinc 2001/09/16 19:08:33 1.25
--- company.pinc 2001/09/19 20:46:07 1.26
***************
*** 46,50 ****
$query = "SELECT * FROM companies WHERE id = ". $id;
$result = $this->dbconn->Exec($query);
! $n = DB_NumRows($result);
if ( 0 == $n) {
$this->id = -1;
--- 46,50 ----
$query = "SELECT * FROM companies WHERE id = ". $id;
$result = $this->dbconn->Exec($query);
! $n = $result->numrows();
if ( 0 == $n) {
$this->id = -1;
***************
*** 56,67 ****
*
*/
! function read_result ( $result,$pos ) {
global $g_com;
if ( ! isset($pos) ) return;
! $this->id = DB_Result($result, $pos, "id");
! $this->name = StripSlashes(DB_Result($result, $pos, "name"));
! $this->creation->setDateTime(DB_Result($result, $pos, "creation"));
acl_read($this);
$g_com[$this->id] = $this;
--- 56,67 ----
*
*/
! function read_result ( &$r,$pos ) {
global $g_com;
if ( ! isset($pos) ) return;
! $this->id = $r->get($pos, "id");
! $this->name = StripSlashes($r->get($pos, "name"));
! $this->creation->setDateTime($r->get($pos, "creation"));
acl_read($this);
$g_com[$this->id] = $this;
***************
*** 112,116 ****
$q = "SELECT a.* FROM addresses a, location l, adrloc r WHERE l.c_id =". $this->id ." AND a.id = r.adr_id AND r.loc_id = l.id AND ( l.d_id is null OR l.d_id = -1 ) ORDER BY l_name";
$r = $this->dbconn->Exec($q);
! $n = DB_NumRows($r);
$a = 0;
while ( $a < $n ) {
--- 112,116 ----
$q = "SELECT a.* FROM addresses a, location l, adrloc r WHERE l.c_id =". $this->id ." AND a.id = r.adr_id AND r.loc_id = l.id AND ( l.d_id is null OR l.d_id = -1 ) ORDER BY l_name";
$r = $this->dbconn->Exec($q);
! $n = $r->numrows();
$a = 0;
while ( $a < $n ) {
***************
*** 120,125 ****
$a++;
}
!
! $this->dbconn->FreeResult ($r);
}
/* ---------------------------------------------------------------------------
--- 120,124 ----
$a++;
}
! $r->free();
}
/* ---------------------------------------------------------------------------
***************
*** 133,137 ****
$q = "SELECT * FROM departments WHERE c_id = ". $this->id ." ORDER BY name";
$r = $this->dbconn->Exec($q);
! $n = DB_NumRows($r);
$a = 0;
while ( $a < $n ) {
--- 132,136 ----
$q = "SELECT * FROM departments WHERE c_id = ". $this->id ." ORDER BY name";
$r = $this->dbconn->Exec($q);
! $n = $r->numrows();
$a = 0;
while ( $a < $n ) {
***************
*** 142,146 ****
}
! $this->dbconn->FreeResult ($r);
}
/* ---------------------------------------------------------------------------
--- 141,145 ----
}
! $r->free();
}
/* ---------------------------------------------------------------------------
***************
*** 187,190 ****
--- 186,199 ----
}
/* ---------------------------------------------------------------------------
+ * set the name
+ */
+ function setName($name) {
+ if ( $this->name != $name ) {
+ $this->modified[] = array ( "field" => "Company" , "old" => $this->name , "new" => $name );
+ $this->name = $name;
+ }
+ return;
+ }
+ /* ---------------------------------------------------------------------------
*
*/
***************
*** 294,297 ****
--- 303,312 ----
return $text;
}
+ }
+ /* ---------------------------------------------------------------------------
+ * This is not a user
+ */
+ function isUser () {
+ return 0;
}
/* ---------------------------------------------------------------------------
Index: company_ins.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/company_ins.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** company_ins.php 2001/09/10 16:40:40 1.6
--- company_ins.php 2001/09/19 20:46:07 1.7
***************
*** 37,41 ****
$q = "SELECT * FROM companies WHERE name = '". $name ."'";
$r = $dbconn->Exec($q);
! $n = DB_NumRows($r);
if ( 0 != $n) {
$x = new company($dbconn);
--- 37,41 ----
$q = "SELECT * FROM companies WHERE name = '". $name ."'";
$r = $dbconn->Exec($q);
! $n = $r->numrows();
if ( 0 != $n) {
$x = new company($dbconn);
***************
*** 43,51 ****
$msg .= sprintf($lang['Err0044'],$x->getLink()) ."<BR>";
}
}
}
if ( $msg == "" ) {
! $c->name = $name;
$msg = $c->save();
--- 43,52 ----
$msg .= sprintf($lang['Err0044'],$x->getLink()) ."<BR>";
}
+ $r->free();
}
}
if ( $msg == "" ) {
! $c->setName($name);
$msg = $c->save();
Index: company_overview.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/company_overview.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** company_overview.php 2001/09/10 16:40:40 1.12
--- company_overview.php 2001/09/19 20:46:07 1.13
***************
*** 15,19 ****
global $lang,$tutos,$link1;
! $n = DB_NumRows($result);
if ( 0 == $n) {
echo $lang['Err0048'];
--- 15,19 ----
global $lang,$tutos,$link1;
! $n = $result->numrows();
if ( 0 == $n) {
echo $lang['Err0048'];
***************
*** 112,116 ****
$result = $dbconn->Exec($query);
! if (DB_NumRows($result) == 1) {
$c = new company($dbconn);
$c->read_result($result,0);
--- 112,116 ----
$result = $dbconn->Exec($query);
! if ($result->numrows() == 1) {
$c = new company($dbconn);
$c->read_result($result,0);
***************
*** 130,133 ****
--- 130,134 ----
HTML_Base3();
}
+ $result->free();
$dbconn->Close();
?>
Index: company_show.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/company_show.php,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -r1.19 -r1.20
*** company_show.php 2001/09/16 19:11:58 1.19
--- company_show.php 2001/09/19 20:46:07 1.20
***************
*** 73,77 ****
# No departments
! if ( DB_numrows($ra) > 0 ) {
echo "<TR>\n";
echo " <TH COLSPAN=". $cols ."><B>". $lang['CompanyMembers'] ."</B></TH>\n";
--- 73,77 ----
# No departments
! if ( $ra->numrows() > 0 ) {
echo "<TR>\n";
echo " <TH COLSPAN=". $cols ."><B>". $lang['CompanyMembers'] ."</B></TH>\n";
***************
*** 273,276 ****
--- 273,277 ----
HTML_Base3();
+ $ra->free();
$dbconn->Close();
?>
Index: address.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/address.pinc,v
retrieving revision 1.45
retrieving revision 1.46
diff -C2 -r1.45 -r1.46
*** address.pinc 2001/09/17 20:18:52 1.45
--- address.pinc 2001/09/19 20:46:07 1.46
***************
*** 38,47 ****
* Read all a result
*/
! function read_result(&$result,$pos) {
global $g_adr;
if ( ! isset($pos) ) return;
! $this->id = $this->dbconn->Result($result, $pos, "id");
$this->larray[] = "l_name";
--- 38,47 ----
* Read all a result
*/
! function read_result(&$r,$pos) {
global $g_adr;
if ( ! isset($pos) ) return;
! $this->id = $r->get($pos, "id");
$this->larray[] = "l_name";
***************
*** 52,65 ****
while($i < count($this->larray)) {
$f = $this->larray[$i];
! $this->$f = StripSlashes($this->dbconn->Result($result, $pos, "$f"));
$i++;
}
! $this->birthday->setDateTime($this->dbconn->Result($result, $pos, "birthday"));
$this->readTeamList();
! $this->pic_id = $this->dbconn->Result($result, $pos, "pic_id");
! $cid = $this->dbconn->Result($result, $pos, "creator");
if ( isset($cid) ) {
if ( $cid != $this->id ) {
--- 52,65 ----
while($i < count($this->larray)) {
$f = $this->larray[$i];
! $this->$f = StripSlashes($r->get($pos, "$f"));
$i++;
}
! $this->birthday->setDateTime($r->get($pos, "birthday"));
$this->readTeamList();
! $this->pic_id = $r->get($pos, "pic_id");
! $cid = $r->get($pos, "creator");
if ( isset($cid) ) {
if ( $cid != $this->id ) {
***************
*** 91,100 ****
$query = "SELECT * FROM addresses WHERE id = ". $id;
$r = $this->dbconn->Exec($query);
! if ( $this->dbconn->NumRows($r) != 0 ) {
$this->read_result($r,0);
} else {
$this->id = -1;
}
! $this->dbconn->FreeResult ($r);
}
--- 91,100 ----
$query = "SELECT * FROM addresses WHERE id = ". $id;
$r = $this->dbconn->Exec($query);
! if ( $r->numrows() != 0 ) {
$this->read_result($r,0);
} else {
$this->id = -1;
}
! $r->free();
}
***************
*** 418,429 ****
$q = "SELECT distinct team_id,name from adrteam a, teams t WHERE a.team_id = t.id AND a.adr_id =". $this->id;
$r = $this->dbconn->Exec($q);
! $n = $this->dbconn->NumRows($r);
$a = 0;
while ( $a < $n ) {
! $this->teamids[$this->dbconn->Result($r, $a, "team_id")] = $this->dbconn->Result($r, $a, "name");
$a++;
}
! $this->dbconn->FreeResult ($r);
}
/* ---------------------------------------------------------------------------
--- 418,429 ----
$q = "SELECT distinct team_id,name from adrteam a, teams t WHERE a.team_id = t.id AND a.adr_id =". $this->id;
$r = $this->dbconn->Exec($q);
! $n = $r->numrows();
$a = 0;
while ( $a < $n ) {
! $this->teamids[$r->get($a, "team_id")] = $r->get($a, "name");
$a++;
}
! $r->free();
}
/* ---------------------------------------------------------------------------
***************
*** 470,475 ****
$q = "SELECT * from people where adr_id = ". $this->id;
$r = $this->dbconn->Exec($q);
! $n = $this->dbconn->NumRows($r);
! $this->dbconn->FreeResult ($r);
return $n;
}
--- 470,475 ----
$q = "SELECT * from people where adr_id = ". $this->id;
$r = $this->dbconn->Exec($q);
! $n = $r->numrows();
! $r->free();
return $n;
}
Index: address_ins.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/address_ins.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** address_ins.php 2001/09/17 20:18:52 1.16
--- address_ins.php 2001/09/19 20:46:07 1.17
***************
*** 76,80 ****
}
$r = $dbconn->Exec($q);
! $n = $dbconn->NumRows($r);
if ( 0 != $n) {
$x = new tutos_address($dbconn);
--- 76,80 ----
}
$r = $dbconn->Exec($q);
! $n = $r->numrows();
if ( 0 != $n) {
$x = new tutos_address($dbconn);
***************
*** 82,85 ****
--- 82,86 ----
$msg .= sprintf($lang['Err0039'],$x->getLink()) ."<BR>";
}
+ $r->free();
}
}
Index: address_overview.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/address_overview.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** address_overview.php 2001/09/16 19:20:00 1.8
--- address_overview.php 2001/09/19 20:46:07 1.9
***************
*** 108,115 ****
$result = $dbconn->Exec($q);
! $n = DB_NumRows($result);
$a = 0;
while ( $a < $n ) {
! $aids = $aids . "," . DB_Result($result,$a,"adr_id");
$a++;
}
--- 108,115 ----
$result = $dbconn->Exec($q);
! $n = $result->numrows();
$a = 0;
while ( $a < $n ) {
! $aids = $aids . "," . $result->get($a,"adr_id");
$a++;
}
***************
*** 168,172 ****
! if (DB_NumRows($result) == 1) {
$address = new tutos_address($dbconn);
$address->read_result($result,0);
--- 168,172 ----
! if ($result->numrows() == 1) {
$address = new tutos_address($dbconn);
$address->read_result($result,0);
***************
*** 182,185 ****
--- 182,186 ----
HTML_Base3();
}
+ $result->free();
$dbconn->Close();
?>
Index: address_tools.p3
===================================================================
RCS file: /cvsroot/tutos/tutos/php/address_tools.p3,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -r1.31 -r1.32
*** address_tools.p3 2001/09/10 16:35:44 1.31
--- address_tools.p3 2001/09/19 20:46:07 1.32
***************
*** 166,174 ****
*
*/
! Function address_overview (&$dbconn,&$result) {
global $lang , $ashow , $atool, $tutos;
! $n = $dbconn->NumRows($result);
if ( 0 == $n) {
# echo "<B>Problem: <I>Address not found</I></B>";
--- 166,174 ----
*
*/
! Function address_overview (&$dbconn,&$r) {
global $lang , $ashow , $atool, $tutos;
! $n = $r->numrows();
if ( 0 == $n) {
# echo "<B>Problem: <I>Address not found</I></B>";
***************
*** 241,245 ****
while ( ($a < $n) && ($a < $end) ) {
$address = new tutos_address($dbconn);
! $address->read_result($result,$a);
$c = 1;
--- 241,245 ----
while ( ($a < $n) && ($a < $end) ) {
$address = new tutos_address($dbconn);
! $address->read_result($r,$a);
$c = 1;
Index: product.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/product.pinc,v
retrieving revision 1.45
retrieving revision 1.46
diff -C2 -r1.45 -r1.46
*** product.pinc 2001/09/16 19:08:33 1.45
--- product.pinc 2001/09/19 20:46:07 1.46
***************
*** 183,187 ****
$r = $obj->dbconn->Exec($q1);
! $n = DB_NumRows($r);
if ( $n == 0 ) {
return;
--- 183,187 ----
$r = $obj->dbconn->Exec($q1);
! $n = $r->numrows();
if ( $n == 0 ) {
return;
***************
*** 191,195 ****
$x = "";
while ($a < $n) {
! $x .= $pre1 . DB_Result($r,$a, "pro_id");
$pre1 = ",";
$a++;
--- 191,195 ----
$x = "";
while ($a < $n) {
! $x .= $pre1 . $r->get($a, "pro_id");
$pre1 = ",";
$a++;
***************
*** 201,205 ****
$q .= " ORDER BY creation DESC";
$r = $obj->dbconn->Exec($q);
! $n = DB_NumRows($r);
$a = 0;
--- 201,205 ----
$q .= " ORDER BY creation DESC";
$r = $obj->dbconn->Exec($q);
! $n = $r->numrows();
$a = 0;
***************
*** 261,284 ****
/* ---------------------------------------------------------------------------
*/
! function read_result ($result, $pos ) {
global $g_pro;
! $this->id = DB_Result($result, $pos, "id");
! $this->name = StripSlashes(DB_Result($result, $pos, "name"));
! $this->version = StripSlashes(DB_Result($result, $pos, "version"));
! $this->description = StripSlashes(DB_Result($result, $pos, "description"));
! $this->desc1 = StripSlashes(DB_Result($result, $pos, "desc1"));
! $this->desc2 = StripSlashes(DB_Result($result, $pos, "desc2"));
! $this->path = StripSlashes(DB_Result($result, $pos, "path"));
! $this->price = DB_Result($result, $pos, "price");
! $this->cost = DB_Result($result, $pos, "cost");
! $this->currency = StripSlashes(DB_Result($result, $pos, "currency"));
! $this->probability = DB_Result($result, $pos, "probability");
! $this->state = DB_Result($result, $pos, "state");
$this->creator = new tutos_address($this->dbconn);
! $this->creator->read(DB_Result($result, $pos, "creator"));
! $this->creation = new DateTime(DB_Result($result, $pos, "creation"));
! $this->p_start = new DateTime(DB_Result($result, $pos, "p_start"));
! $this->p_end = new DateTime(DB_Result($result, $pos, "p_end"));
#
# Roles
--- 261,284 ----
/* ---------------------------------------------------------------------------
*/
! function read_result (&$r, $pos ) {
global $g_pro;
! $this->id = $r->get($pos, "id");
! $this->name = StripSlashes($r->get($pos, "name"));
! $this->version = StripSlashes($r->get($pos, "version"));
! $this->description = StripSlashes($r->get($pos, "description"));
! $this->desc1 = StripSlashes($r->get($pos, "desc1"));
! $this->desc2 = StripSlashes($r->get($pos, "desc2"));
! $this->path = StripSlashes($r->get($pos, "path"));
! $this->price = $r->get($pos, "price");
! $this->cost = $r->get($pos, "cost");
! $this->currency = StripSlashes($r->get($pos, "currency"));
! $this->probability = $r->get($pos, "probability");
! $this->state = $r->get($pos, "state");
$this->creator = new tutos_address($this->dbconn);
! $this->creator->read($r->get($pos, "creator"));
! $this->creation = new DateTime($r->get($pos, "creation"));
! $this->p_start = new DateTime($r->get($pos, "p_start"));
! $this->p_end = new DateTime($r->get($pos, "p_end"));
#
# Roles
***************
*** 302,313 ****
$q = "SELECT * FROM projectclass".$c." WHERE pro_id = ". $this->id;
$r = $this->dbconn->Exec($q);
! $n = DB_NumRows($r);
$a = 0;
while ($a < $n) {
! $class = DB_Result($r, $a, "class_id");
$this->cl[$c][$class] = $class;
$a++;
}
! $this->dbconn->FreeResult ($r);
}
/* ---------------------------------------------------------------------------
--- 302,313 ----
$q = "SELECT * FROM projectclass".$c." WHERE pro_id = ". $this->id;
$r = $this->dbconn->Exec($q);
! $n = $r->numrows();
$a = 0;
while ($a < $n) {
! $class = $r->get($a, "class_id");
$this->cl[$c][$class] = $class;
$a++;
}
! $r->free();
}
/* ---------------------------------------------------------------------------
***************
*** 317,325 ****
$q = "SELECT * FROM projectroles WHERE pro_id = ". $this->id;
$r = $this->dbconn->Exec($q);
! $n = DB_NumRows($r);
$a = 0;
while ($a < $n) {
! $role = DB_Result($r, $a, "role_id");
! $adr_id = DB_Result($r, $a, "adr_id");
$obj = new tutos_address($this->dbconn);
$obj->read($adr_id);
--- 317,325 ----
$q = "SELECT * FROM projectroles WHERE pro_id = ". $this->id;
$r = $this->dbconn->Exec($q);
! $n = $r->numrows();
$a = 0;
while ($a < $n) {
! $role = $r->get($a, "role_id");
! $adr_id = $r->get($a, "adr_id");
$obj = new tutos_address($this->dbconn);
$obj->read($adr_id);
***************
*** 342,346 ****
}
! $this->dbconn->FreeResult ($r);
}
/* ---------------------------------------------------------------------------
--- 342,346 ----
}
! $r->free();
}
/* ---------------------------------------------------------------------------
***************
*** 401,410 ****
$q = "SELECT * FROM products WHERE id =". $id;
$r = $this->dbconn->Exec($q);
! $n = DB_NumRows($r);
if ( 0 == $n) {
return;
}
$this->read_result($r,0);
! $this->dbconn->FreeResult ($r);
}
/* ---------------------------------------------------------------------------
--- 401,410 ----
$q = "SELECT * FROM products WHERE id =". $id;
$r = $this->dbconn->Exec($q);
! $n = $r->numrows();
if ( 0 == $n) {
return;
}
$this->read_result($r,0);
! $r->free();
}
/* ---------------------------------------------------------------------------
Index: product_ins.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/product_ins.php,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -r1.20 -r1.21
*** product_ins.php 2001/09/16 14:28:50 1.20
--- product_ins.php 2001/09/19 20:46:07 1.21
***************
*** 138,142 ****
$q = "SELECT * FROM products WHERE name = '". $name ."' AND version = '". $version ."'";
$r = $dbconn->Exec($q);
! $n = DB_NumRows($r);
if ( 0 != $n) {
$x = new product($dbconn);
--- 138,142 ----
$q = "SELECT * FROM products WHERE name = '". $name ."' AND version = '". $version ."'";
$r = $dbconn->Exec($q);
! $n = $r->numrows();
if ( 0 != $n) {
$x = new product($dbconn);
***************
*** 144,150 ****
$msg .= sprintf($lang['Err0036'],$x->getLink()) ."<BR>";
}
}
}
-
if ( $msg == "" ) {
--- 144,150 ----
$msg .= sprintf($lang['Err0036'],$x->getLink()) ."<BR>";
}
+ $r->free();
}
}
if ( $msg == "" ) {
Index: product_overview.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/product_overview.php,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -r1.28 -r1.29
*** product_overview.php 2001/09/16 19:16:58 1.28
--- product_overview.php 2001/09/19 20:46:07 1.29
***************
*** 19,23 ****
global $lang,$pshow,$tutos,$current_user,$link1,$format,$filter;
! $n = $dbconn->NumRows($result);
if ( 0 == $n) {
echo "<SPAN CLASS=warn>". $lang['Err0048'] ."</SPAN>";
--- 19,23 ----
global $lang,$pshow,$tutos,$current_user,$link1,$format,$filter;
! $n = $result->numrows();
if ( 0 == $n) {
echo "<SPAN CLASS=warn>". $lang['Err0048'] ."</SPAN>";
***************
*** 400,404 ****
global $lang,$pshow,$flds,$tutos;
! $n = $dbconn->NumRows($result);
if ( 0 == $n) {
echo $lang['Err0048'];
--- 400,404 ----
global $lang,$pshow,$flds,$tutos;
! $n = $result->numrows();
if ( 0 == $n) {
echo $lang['Err0048'];
***************
*** 797,809 ****
$q1 = "SELECT * from projectclass". $cl ." WHERE class_id = ". $$x;
$r = $dbconn->Exec($q1);
! $n = $dbconn->NumRows($r);
$a = 0;
$pre1 = "";
$z = "";
while ($a < $n) {
! $z .= $pre1 . DB_Result($r,$a, "pro_id");
$pre1 = ",";
$a++;
}
if ( $z != "" ) {
$q .= $pre ." id in (". $z .")";
--- 797,810 ----
$q1 = "SELECT * from projectclass". $cl ." WHERE class_id = ". $$x;
$r = $dbconn->Exec($q1);
! $n = $r->numrows();
$a = 0;
$pre1 = "";
$z = "";
while ($a < $n) {
! $z .= $pre1 . $r->get($a, "pro_id");
$pre1 = ",";
$a++;
}
+ $r->free();
if ( $z != "" ) {
$q .= $pre ." id in (". $z .")";
***************
*** 859,878 ****
$mpre = ",";
! $qarg .= "&mid[]=".$f1;
$link1 = addUrlParameter($link1,"rid[]=".$f1);
$link2 = addUrlParameter($link2,"rid[]=".$f1);
$hidden .= "<INPUT TYPE=hidden NAME=\"rid[]\" VALUE=\"". $f1 ."\">\n";
}
! $q1 = "SELECT pro_id FROM projectroles WHERE role_id in (". $role .") AND adr_id in (". $ml .")";
$r = $dbconn->Exec($q1);
! $n = $dbconn->NumRows($r);
$a = 0;
$pre1 = "";
$x = "";
while ($a < $n) {
! $x .= $pre1 . DB_Result($r,$a, "pro_id");
$pre1 = ",";
$a++;
}
if ( $x != "" ) {
$q .= $pre ." id in (". $x .")";
--- 860,884 ----
$mpre = ",";
! $qarg .= "&rid[]=".$f1;
$link1 = addUrlParameter($link1,"rid[]=".$f1);
$link2 = addUrlParameter($link2,"rid[]=".$f1);
$hidden .= "<INPUT TYPE=hidden NAME=\"rid[]\" VALUE=\"". $f1 ."\">\n";
}
! if ( isset($role) ) {
! $q1 = "SELECT pro_id FROM projectroles WHERE role_id in (". $role .") AND adr_id in (". $ml .")";
! } else {
! $q1 = "SELECT pro_id FROM projectroles WHERE adr_id in (". $ml .")";
! }
$r = $dbconn->Exec($q1);
! $n = $r->numrows();
$a = 0;
$pre1 = "";
$x = "";
while ($a < $n) {
! $x .= $pre1 . $r->get($a, "pro_id");
$pre1 = ",";
$a++;
}
+ $r->free();
if ( $x != "" ) {
$q .= $pre ." id in (". $x .")";
***************
*** 945,949 ****
if ( ! isset($format) ) {
! if ($dbconn->NumRows($result) == 1) {
$p = new product($dbconn);
$p->read_result($result,0);
--- 951,955 ----
if ( ! isset($format) ) {
! if ($result->numrows() == 1) {
$p = new product($dbconn);
$p->read_result($result,0);
|
|
From: Gero K. <gok...@us...> - 2001-09-19 20:45:14
|
Update of /cvsroot/tutos/tutos/php
In directory usw-pr-cvs1:/tmp/cvs-serv31432/php
Modified Files:
db_interbase.pinc db_msql.pinc db_mysql.pinc db_ora.pinc
db_pg.pinc db_sybase.pinc database.pinc database_ins.php
database_new.php database_overview.php database_show.php
Log Message:
new resultset classes for databases
Index: db_interbase.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/db_interbase.pinc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** db_interbase.pinc 2001/09/16 19:22:22 1.1
--- db_interbase.pinc 2001/09/19 20:45:09 1.2
***************
*** 11,15 ****
* postgres database connection class
*/
! class db_interbase {
/* ---------------------------------------------------------------------------
*/
--- 11,15 ----
* postgres database connection class
*/
! class db_interbase extends db {
/* ---------------------------------------------------------------------------
*/
***************
*** 21,27 ****
$this->openfunc = 'ibase_pconnect';
! $this->col["message"] = "T_message";
! $this->col["type"] = "T_type";
! $this->col["admin"] = "T_admin";
}
/* ---------------------------------------------------------------------------
--- 21,27 ----
$this->openfunc = 'ibase_pconnect';
! $this->col["MESSAGE"] = "T_message";
! $this->col["TYPE"] = "T_type";
! $this->col["ADMIN"] = "T_admin";
}
/* ---------------------------------------------------------------------------
***************
*** 51,79 ****
/* ---------------------------------------------------------------------------
*/
- function numrows(&$r) {
- return count($r);
- }
- /* ---------------------------------------------------------------------------
- */
- function numfields(&$r) {
- return count($r[0]);
- }
- /* ---------------------------------------------------------------------------
- */
- function fieldname(&$r,$nr) {
- # return pg_fieldname($r,$nr);
- }
- /* ---------------------------------------------------------------------------
- */
- function fieldtype(&$r,$nr) {
- # return pg_fieldtype($r,$nr);
- }
- /* ---------------------------------------------------------------------------
- */
- function freeresult(&$r) {
- unset($r);
- }
- /* ---------------------------------------------------------------------------
- */
function notime() {
if ( $this->version == 1 ) {
--- 51,54 ----
***************
*** 126,130 ****
$fn = ibase_field_info($r,$c);
if ( isset( $row[$c] ) ) {
! $result[$x][$fn['alias']] = $row[$c];
# echo $x ." ". $c ." N:". $fn['name'] ." A:". $fn['alias'] ." V:". $row[$c] ."<BR>\n";
}
--- 101,105 ----
$fn = ibase_field_info($r,$c);
if ( isset( $row[$c] ) ) {
! $result[$x][strtoupper($fn['alias'])] = $row[$c];
# echo $x ." ". $c ." N:". $fn['name'] ." A:". $fn['alias'] ." V:". $row[$c] ."<BR>\n";
}
***************
*** 132,148 ****
$x++;
}
! ibase_free_result($r);
! return $result;
! }
! /* ---------------------------------------------------------------------------
! */
! function result(&$r,$pos,$fld) {
! $fld = strtoupper($fld);
! #echo "<BR>POS:".$pos ." | FLD:". $fld ." | * ". var_dump($r[$pos][$fld]) ."<BR>\n";
! if ( isset($r[$pos][$fld]) ) {
! return $r[$pos][$fld];
! } else {
! return;
! }
}
/* ---------------------------------------------------------------------------
--- 107,115 ----
$x++;
}
!
! $x = new result_interbase();
! $x->rs = $r;
! $x->result = $result;
! return $x;
}
/* ---------------------------------------------------------------------------
***************
*** 150,160 ****
function nextID() {
$query = "select id from ids";
! $result = $this->exec($query);
! if ( ($result == "") || (1 != $this->numrows($result)) ) {
Fatal_Error("got no id",$query);
}
# echo var_dump($result);
! $id = $this->result($result,0,"id");
! $this->freeresult ($result);
$query = "update ids set id = 0";
--- 117,127 ----
function nextID() {
$query = "select id from ids";
! $r = $this->exec($query);
! if ( ($r == "") || (1 != $r->numrows()) ) {
Fatal_Error("got no id",$query);
}
# echo var_dump($result);
! $id = $r->get(0,"id");
! $r->free();
$query = "update ids set id = 0";
***************
*** 167,171 ****
function setSeqID($id) {
$query = "set generator id to ". $id;
! $result = $this->exec($query);
return $id;
}
--- 134,138 ----
function setSeqID($id) {
$query = "set generator id to ". $id;
! $this->exec($query);
return $id;
}
***************
*** 179,183 ****
$t = str_replace("'","''",$t);
return "'". $t ."'";
- # return "'". AddSlashes($t) ."'";
}
/* ---------------------------------------------------------------------------
--- 146,149 ----
***************
*** 286,302 ****
}
/* ---------------------------------------------------------------------------
- * handle reserved words in this database type
*/
! function colname($col) {
! if ( isset($this->col[$col]) ) {
! return $this->col[$col];
! }
! return $col;
}
/* ---------------------------------------------------------------------------
*/
! function gettype() {
! return "Interbase";
}
}
$includes['db_interbase.pinc'] = 1;
--- 252,306 ----
}
/* ---------------------------------------------------------------------------
*/
! function gettype() {
! return "Interbase";
}
+ }
+ /*
+ * Postgres Resultset
+ */
+ class result_interbase extends result {
+ var $rs;
+
/* ---------------------------------------------------------------------------
*/
! function get($pos,$fld) {
! $fld = strtoupper($fld);
! if ( isset($this->result[$pos][$fld]) ) {
! return $this->result[$pos][$fld];
! } else {
! # echo "<BR>POS:".$pos ." | FLD:". $fld ." | * ". var_dump($r[$pos][$fld]) ."<BR>\n";
! return;
! }
! }
! /* ---------------------------------------------------------------------------
! */
! function numrows() {
! return count($this->result);
}
+ /* ---------------------------------------------------------------------------
+ */
+ function numfields() {
+ return ibase_num_fields($this->rs);
+ }
+ /* ---------------------------------------------------------------------------
+ */
+ function fieldname($nr) {
+ $fn = ibase_field_info($this->rs,$nr);
+ return $fn['alias'];
+ }
+ /* ---------------------------------------------------------------------------
+ */
+ function fieldtype($nr) {
+ $fn = ibase_field_info($this->rs,$nr);
+ return $fn['type'];
+ }
+ /* ---------------------------------------------------------------------------
+ */
+ function free() {
+ unset($this->result);
+ return ibase_free_result($this->rs);
+ }
+
}
$includes['db_interbase.pinc'] = 1;
Index: db_msql.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/db_msql.pinc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** db_msql.pinc 2001/09/16 19:22:22 1.2
--- db_msql.pinc 2001/09/19 20:45:09 1.3
***************
*** 11,15 ****
* MS SQL Server database connection class
*/
! class db_msql {
/* ---------------------------------------------------------------------------
*/
--- 11,15 ----
* MS SQL Server database connection class
*/
! class db_msql extends db {
/* ---------------------------------------------------------------------------
*/
***************
*** 236,248 ****
return "DBerror: ". $this->getFullname() ." noconn ";
}
- }
- /* ---------------------------------------------------------------------------
- * handle reserved words in this database type
- */
- function colname($col) {
- if ( isset($this->col[$col]) ) {
- return $this->col[$col];
- }
- return $col;
}
/* ---------------------------------------------------------------------------
--- 236,239 ----
Index: db_mysql.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/db_mysql.pinc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** db_mysql.pinc 2001/09/16 19:22:22 1.2
--- db_mysql.pinc 2001/09/19 20:45:09 1.3
***************
*** 11,15 ****
* mysql database connection class
*/
! class db_mysql {
/* ---------------------------------------------------------------------------
*/
--- 11,15 ----
* mysql database connection class
*/
! class db_mysql extends db {
/* ---------------------------------------------------------------------------
*/
***************
*** 46,74 ****
/* ---------------------------------------------------------------------------
*/
- function numrows(&$r) {
- return mysql_num_rows($r);
- }
- /* ---------------------------------------------------------------------------
- */
- function numfields(&$r) {
- return mysql_Num_Fields($r);
- }
- /* ---------------------------------------------------------------------------
- */
- function fieldname(&$r,$nr) {
- return mysql_field_name($r,$nr);
- }
- /* ---------------------------------------------------------------------------
- */
- function fieldtype(&$r,$nr) {
- return mysql_field_type($r,$nr);
- }
- /* ---------------------------------------------------------------------------
- */
- function freeresult(&$r) {
- return mysql_free_result($r);
- }
- /* ---------------------------------------------------------------------------
- */
function notime() {
return ("-1");
--- 46,49 ----
***************
*** 96,119 ****
}
}
! return $result;
}
/* ---------------------------------------------------------------------------
*/
- function result(&$r,$pos,$fld) {
- return mysql_Result($r, $pos, $fld);
- }
- /* ---------------------------------------------------------------------------
- */
function nextid() {
$query = "UPDATE id set nextval=last_insert_id(nextval+1)";
! $result = $this->exec($query);
$query = "SELECT last_insert_id()";
! $result = $this->exec($query);
! if ( 1 != $this->numrows($result)) {
Fatal_Error("got no id",$query);
}
! $id = mysql_result($result, 0,0);
! $this->freeresult ($result);
return $id;
}
--- 71,91 ----
}
}
! $r = new result_mysql();
! $r->rs = $result;
! return $r;
}
/* ---------------------------------------------------------------------------
*/
function nextid() {
$query = "UPDATE id set nextval=last_insert_id(nextval+1)";
! $this->exec($query);
$query = "SELECT last_insert_id()";
! $r = $this->exec($query);
! if ( 1 != $r->numrows()) {
Fatal_Error("got no id",$query);
}
! $id = $r->get(0,0);
! $r->free();
return $id;
}
***************
*** 122,126 ****
function setSeqID($id) {
$query = "UPDATE id set nextval = ".$id;
! $result = $this->exec($query);
return $id;
}
--- 94,98 ----
function setSeqID($id) {
$query = "UPDATE id set nextval = ".$id;
! $this->exec($query);
return $id;
}
***************
*** 129,138 ****
function getSeqID() {
$query = "SELECT nextval from id";
! $result = $this->exec($query);
! if ( ($result == "") || (1 != $this->numrows($result)) ) {
Fatal_Error("got no id",$query);
}
! $id = mysql_result($result, 0,0);
! $this->freeresult ($result);
return $id;
}
--- 101,110 ----
function getSeqID() {
$query = "SELECT nextval from id";
! $r = $this->exec($query);
! if ( ($r == "") || (1 != $r->numrows()) ) {
Fatal_Error("got no id",$query);
}
! $id = $r->get(0,0);
! $r->free();
return $id;
}
***************
*** 246,263 ****
}
/* ---------------------------------------------------------------------------
- * handle reserved words in this database type
*/
! function colname($col) {
! if ( isset($this->col[$col]) ) {
! return $this->col[$col];
! }
! return $col;
}
/* ---------------------------------------------------------------------------
*/
! function gettype() {
! return "MySQL";
}
}
$includes['db_mysql.pinc'] = 1;
?>
--- 218,266 ----
}
/* ---------------------------------------------------------------------------
*/
! function gettype() {
! return "MySQL";
}
+ }
+
+ /*
+ * MysQL Resultset
+ */
+ class result_mysql extends result {
+ var $rs;
+
/* ---------------------------------------------------------------------------
*/
! function get($pos,$fld) {
! return mysql_Result($this->rs, $pos, $fld);
}
+ /* ---------------------------------------------------------------------------
+ */
+ function numrows() {
+ return mysql_num_rows($this->rs);
+ }
+ /* ---------------------------------------------------------------------------
+ */
+ function numfields() {
+ return mysql_Num_Fields($this->rs);
+ }
+ /* ---------------------------------------------------------------------------
+ */
+ function fieldname($nr) {
+ return mysql_field_name($this->rs,$nr);
+ }
+ /* ---------------------------------------------------------------------------
+ */
+ function fieldtype($nr) {
+ return mysql_field_type($this->rs,$nr);
+ }
+ /* ---------------------------------------------------------------------------
+ */
+ function free() {
+ return mysql_free_result($this->rs);
+ }
+
}
+
$includes['db_mysql.pinc'] = 1;
?>
Index: db_ora.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/db_ora.pinc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** db_ora.pinc 2001/09/16 19:22:22 1.2
--- db_ora.pinc 2001/09/19 20:45:09 1.3
***************
*** 11,15 ****
* oracle database connection class
*/
! class db_ora {
/* ---------------------------------------------------------------------------
*/
--- 11,15 ----
* oracle database connection class
*/
! class db_ora extends db {
/* ---------------------------------------------------------------------------
*/
***************
*** 46,74 ****
/* ---------------------------------------------------------------------------
*/
- function numrows(&$r) {
- return count($r);
- }
- /* ---------------------------------------------------------------------------
- */
- function numfields(&$r) {
- return count($r[0]);
- }
- /* ---------------------------------------------------------------------------
- */
- function fieldname(&$r,$nr) {
- }
- /* ---------------------------------------------------------------------------
- */
- function fieldtype(&$r,$nr) {
-
- }
- /* ---------------------------------------------------------------------------
- */
- function freeresult(&$r) {
- unset($r);
- return;
- }
- /* ---------------------------------------------------------------------------
- */
function notime() {
#return ("'1970-1-1 00:00:00'");
--- 46,49 ----
***************
*** 86,98 ****
$msg = "No Connection";
}
! //echo "Q: $query<BR>";
if (0) {
$cur = Ora_Do($this->conn,$query);
}
! $cur = ora_open($this->conn);
! if ( $cur == false ) {
! Ora_Close($cur);
if ($showerror == 1) {
Fatal_Error("Exec ". $this->conn ." CUR=0|". $this->error(),$query);
--- 61,75 ----
$msg = "No Connection";
}
! # echo "Q: $query<BR>";
if (0) {
$cur = Ora_Do($this->conn,$query);
}
+
+ $x = new result_ora();
! $x->cur = ora_open($this->conn);
! if ( $x->cur == false ) {
! Ora_Close($x->cur);
if ($showerror == 1) {
Fatal_Error("Exec ". $this->conn ." CUR=0|". $this->error(),$query);
***************
*** 102,113 ****
}
! # Parse will fail on nonexitant tables
! $p = ora_parse($cur,$query);
! # echo "P: ".$p ." ". getType($p)." ". $query ."<BR>";flush();
!
if ( false == $p ) {
! Ora_Close($cur);
if ($showerror == 1) {
! Fatal_Error("Exec ". $this->conn ." !PARSE|". $this->error(),$query);
} else {
return "";
--- 79,88 ----
}
! # Parse will fail on nonexistant tables
! $p = ora_parse($x->cur,$query);
if ( false == $p ) {
! # echo "P: ".$p ." ". getType($p)." ". $query ."<BR>";flush();
if ($showerror == 1) {
! Fatal_Error("Exec ". $this->conn ." !PARSE|". $this->error($x->cur),$query);
} else {
return "";
***************
*** 116,142 ****
$this->lastquery = $query;
! if ( ! ora_exec($cur) ) {
! Ora_Close($cur);
if ($showerror == 1) {
! Fatal_Error("Exec ". $this->conn ." !EXEC|". $this->error($cur),$query);
} else {
return "";
}
}
! if ( ora_numrows($cur) != 0 ) {
# A Insert or Update
# echo "ROWS: $numrows COLS: $numcols | $query<BR>";flush();
! Ora_Close($cur);
! return array();
}
- $numrows = ora_numrows($cur);
- $numcols = ora_numcols($cur);
//echo "ROWS: $numrows COLS: $numcols | $query<BR>";
! if ( ! @ora_fetch($cur) ) {
! return array();
}
$row = 0;
--- 91,119 ----
$this->lastquery = $query;
! $p = ora_exec($x->cur);
! if ( false == $p ) {
! echo "E: ".$p ." ". getType($p)." ". $query ." ". ora_errorcode($x->cur) ."<BR>";flush();
if ($showerror == 1) {
! Fatal_Error("Exec ". $this->conn ." !EXEC|". $this->error($x->cur),$query);
} else {
+ Ora_Close($cur);
return "";
}
}
+
+ $numrows = ora_numrows($x->cur);
+ $numcols = ora_numcols($x->cur);
! if ( $numrows == 0 ) {
# A Insert or Update
# echo "ROWS: $numrows COLS: $numcols | $query<BR>";flush();
! return $x;
}
//echo "ROWS: $numrows COLS: $numcols | $query<BR>";
! if ( ! @ora_fetch($x->cur) ) {
! return $x;
}
$row = 0;
***************
*** 144,159 ****
do {
for ($c = 0 ; $c < $numcols; $c++) {
! $result[$row][@ora_columnname($cur,$c)] = Ora_GetColumn($cur,$c);
//echo "SET ROWS: $row COLS: $fld | ".$r[$pos][$fld]."<BR>";
}
$row++;
! } while ( 1 == @Ora_Fetch($cur) );
if ( $row == 0 ) {
! $result = array();
}
} else {
$result = 1;
}
- Ora_Close($cur);
if ( ! $result) {
--- 121,135 ----
do {
for ($c = 0 ; $c < $numcols; $c++) {
! $result[$row][@ora_columnname($x->cur,$c)] = Ora_GetColumn($x->cur,$c);
//echo "SET ROWS: $row COLS: $fld | ".$r[$pos][$fld]."<BR>";
}
$row++;
! } while ( 1 == @Ora_Fetch($x->cur) );
if ( $row == 0 ) {
! $result = array();
}
} else {
$result = 1;
}
if ( ! $result) {
***************
*** 164,175 ****
}
}
! return $result;
! }
! /* ---------------------------------------------------------------------------
! */
! function result(&$r,$pos,$fld) {
! # Copy the whole thing
! $x = $r[$pos][strtoupper($fld)];
! #echo "GET ROWS: $pos COLS: $fld | ".$x."<BR>";
return $x;
}
--- 140,147 ----
}
}
!
!
! $x->result = $result;
!
return $x;
}
***************
*** 178,187 ****
function nextid() {
$query = "SELECT id.nextval FROM dual";
! $result = $this->exec($query);
! if ( 1 != $this->numrows($result)) {
Fatal_Error("got no id",$query);
}
! $id = $this->result($result, 0, "nextval");
! $this->freeresult ($result);
return $id;
}
--- 150,159 ----
function nextid() {
$query = "SELECT id.nextval FROM dual";
! $r = $this->exec($query);
! if ( 1 != $r->numrows()) {
Fatal_Error("got no id",$query);
}
! $id = $r->get(0, "nextval");
! $r->free();
return $id;
}
***************
*** 189,192 ****
--- 161,173 ----
*/
function setSeqID($id) {
+ $query = "DROP SEQUENCE id";
+ $r = $this->exec($query);
+ $r->free();
+
+ $query = "CREATE SEQUENCE id start with ". $id;
+ $r = $this->exec($query);
+ $r->free();
+
+ return $id;
}
/* ---------------------------------------------------------------------------
***************
*** 194,203 ****
function getSeqID() {
$query = "SELECT id.currval FROM dual";
! $result = $this->exec($query);
! if ( 1 != $this->numrows($result)) {
Fatal_Error("got no id",$query);
}
! $id = $this->result($result, 0, "currval");
! $this->freeresult ($result);
return $id;
}
--- 175,184 ----
function getSeqID() {
$query = "SELECT id.currval FROM dual";
! $r = $this->exec($query);
! if ( 1 != $r->numrows()) {
Fatal_Error("got no id",$query);
}
! $id = $r->get(0, "currval");
! $r->free();
return $id;
}
***************
*** 252,256 ****
*/
function password($pw) {
! if ( $this->crypt != 1 ) {
return "'". $pw ."'";
}
--- 233,237 ----
*/
function password($pw) {
! if ( $this->db->crypt != 1 ) {
return "'". $pw ."'";
}
***************
*** 322,338 ****
}
/* ---------------------------------------------------------------------------
- * handle reserved words in this database type
*/
! function colname($col) {
! if ( isset($this->col[$col]) ) {
! return $this->col[$col];
! }
! return $col;
}
/* ---------------------------------------------------------------------------
*/
! function gettype() {
! return "Oracle";
}
}
$includes['db_ora.pinc'] = 1;
--- 303,355 ----
}
/* ---------------------------------------------------------------------------
*/
! function gettype() {
! return "Oracle";
}
+ }
+ /*
+ * Postgres Resultset
+ */
+ class result_ora extends result {
+ var $rs;
+ var $cur;
+
/* ---------------------------------------------------------------------------
*/
! function get($pos,$fld) {
! # Copy the whole thing
! $x = $this->result[$pos][strtoupper($fld)];
! #echo "GET ROWS: $pos COLS: $fld | ".$x."|<BR>";
! return $x;
!
! }
! /* ---------------------------------------------------------------------------
! */
! function numrows() {
! return count($this->result);
}
+ /* ---------------------------------------------------------------------------
+ */
+ function numfields() {
+ return count($this->result[0]);
+ }
+ /* ---------------------------------------------------------------------------
+ */
+ function fieldname($nr) {
+ Ora_ColumnName($this->cur,$nr);
+ }
+ /* ---------------------------------------------------------------------------
+ */
+ function fieldtype($nr) {
+ Ora_ColumnType($this->cur,$nr);
+ }
+ /* ---------------------------------------------------------------------------
+ */
+ function free() {
+ Ora_Close($this->cur);
+ unset($this->result);
+ return;
+ }
+
}
$includes['db_ora.pinc'] = 1;
Index: db_pg.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/db_pg.pinc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** db_pg.pinc 2001/09/16 19:22:22 1.2
--- db_pg.pinc 2001/09/19 20:45:09 1.3
***************
*** 11,15 ****
* postgres database connection class
*/
! class db_pg {
/* ---------------------------------------------------------------------------
*/
--- 11,15 ----
* postgres database connection class
*/
! class db_pg extends db {
/* ---------------------------------------------------------------------------
*/
***************
*** 52,81 ****
unset($this->conn);
$this->conn = -1;
! }
! }
! /* ---------------------------------------------------------------------------
! */
! function numrows(&$r) {
! return pg_NumRows($r);
! }
! /* ---------------------------------------------------------------------------
! */
! function numfields(&$r) {
! return pg_NumFields($r);
! }
! /* ---------------------------------------------------------------------------
! */
! function fieldname(&$r,$nr) {
! return pg_fieldname($r,$nr);
! }
! /* ---------------------------------------------------------------------------
! */
! function fieldtype(&$r,$nr) {
! return pg_fieldtype($r,$nr);
! }
! /* ---------------------------------------------------------------------------
! */
! function freeresult(&$r) {
! return pg_FreeResult($r);
}
/* ---------------------------------------------------------------------------
--- 52,56 ----
unset($this->conn);
$this->conn = -1;
! }
}
/* ---------------------------------------------------------------------------
***************
*** 117,126 ****
}
}
! return $result;
! }
! /* ---------------------------------------------------------------------------
! */
! function result(&$r,$pos,$fld) {
! return pg_Result($r, $pos, $fld);
}
/* ---------------------------------------------------------------------------
--- 92,98 ----
}
}
! $r = new result_pg();
! $r->rs = $result;
! return $r;
}
/* ---------------------------------------------------------------------------
***************
*** 128,137 ****
function nextID() {
$query = "SELECT nextval ('id')";
! $result = $this->exec($query);
! if ( ($result == "") || (1 != $this->numrows($result)) ) {
Fatal_Error("got no id",$query);
}
! $id = pg_Result($result, 0, "nextval");
! $this->freeresult ($result);
return $id;
}
--- 100,109 ----
function nextID() {
$query = "SELECT nextval ('id')";
! $r = $this->exec($query);
! if ( ($r == "") || (1 != $r->numrows()) ) {
Fatal_Error("got no id",$query);
}
! $id = $r->get(0, "nextval");
! $r->free();
return $id;
}
***************
*** 147,156 ****
function getSeqID() {
$query = "SELECT currval ('id')";
! $result = $this->exec($query);
! if ( ($result == "") || (1 != $this->numrows($result)) ) {
Fatal_Error("got no id",$query);
}
! $id = pg_Result($result, 0, "currval");
! $this->freeresult ($result);
return $id;
}
--- 119,128 ----
function getSeqID() {
$query = "SELECT currval ('id')";
! $r = $this->exec($query);
! if ( ($r == "") || (1 != $r->numrows()) ) {
Fatal_Error("got no id",$query);
}
! $id = $r->get(0, "currval");
! $r->free();
return $id;
}
***************
*** 269,286 ****
}
/* ---------------------------------------------------------------------------
- * handle reserved words in this database type
*/
! function colname($col) {
! if ( isset($this->col[$col]) ) {
! return $this->col[$col];
! }
! return $col;
}
/* ---------------------------------------------------------------------------
*/
! function gettype() {
! return "Postgres";
}
}
$includes['db_pg.pinc'] = 1;
! ?>
\ No newline at end of file
--- 241,287 ----
}
/* ---------------------------------------------------------------------------
*/
! function gettype() {
! return "Postgres";
}
+ }
+ /*
+ * Postgres Resultset
+ */
+ class result_pg extends result {
+ var $rs;
+
/* ---------------------------------------------------------------------------
*/
! function get($pos,$fld) {
! return pg_Result($this->rs, $pos, $fld);
! }
! /* ---------------------------------------------------------------------------
! */
! function numrows() {
! return pg_NumRows($this->rs);
}
+ /* ---------------------------------------------------------------------------
+ */
+ function numfields() {
+ return pg_NumFields($this->rs);
+ }
+ /* ---------------------------------------------------------------------------
+ */
+ function fieldname($nr) {
+ return pg_fieldname($this->rs,$nr);
+ }
+ /* ---------------------------------------------------------------------------
+ */
+ function fieldtype($nr) {
+ return pg_fieldtype($this->rs,$nr);
+ }
+ /* ---------------------------------------------------------------------------
+ */
+ function free() {
+ return pg_FreeResult($this->rs);
+ }
+
}
$includes['db_pg.pinc'] = 1;
! ?>
Index: db_sybase.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/db_sybase.pinc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** db_sybase.pinc 2001/09/16 19:22:22 1.2
--- db_sybase.pinc 2001/09/19 20:45:09 1.3
***************
*** 11,15 ****
* Sybase database connection class
*/
! class db_sybase {
/* ---------------------------------------------------------------------------
*/
--- 11,15 ----
* Sybase database connection class
*/
! class db_sybase extends db {
/* ---------------------------------------------------------------------------
*/
***************
*** 49,77 ****
/* ---------------------------------------------------------------------------
*/
- function numrows(&$r) {
- return sybase_num_rows($r);
- }
- /* ---------------------------------------------------------------------------
- */
- function numfields(&$r) {
- return sybase_Num_Fields($r);
- }
- /* ---------------------------------------------------------------------------
- */
- function fieldname(&$r,$nr) {
- return sybase_fieldname($r,$nr);
- }
- /* ---------------------------------------------------------------------------
- */
- function fieldtype(&$r,$nr) {
- return sybase_fieldtype($r,$nr);
- }
- /* ---------------------------------------------------------------------------
- */
- function freeresult(&$r) {
- return sybase_FreeResult($r);
- }
- /* ---------------------------------------------------------------------------
- */
function notime() {
return ("null");
--- 49,52 ----
***************
*** 93,102 ****
$this->lastquery = $query;
! return $qi;
! }
! /* ---------------------------------------------------------------------------
! */
! function result(&$r,$pos,$fld) {
! return sybase_Result($r, $pos, $fld);
}
/* ---------------------------------------------------------------------------
--- 68,74 ----
$this->lastquery = $query;
! $x = new result_sybase();
! $x->rs = $qi;
! return $x;
}
/* ---------------------------------------------------------------------------
***************
*** 238,253 ****
}
/* ---------------------------------------------------------------------------
- * handle reserved words in this database type
*/
! function colname($col) {
! if ( isset($this->col[$col]) ) {
! return $this->col[$col];
! }
! return $col;
}
/* ---------------------------------------------------------------------------
*/
! function gettype() {
! return "SYBASE";
}
}
--- 210,255 ----
}
/* ---------------------------------------------------------------------------
*/
! function gettype() {
! return "SYBASE";
}
+ }
+
+
+ /*
+ * MysQL Resultset
+ */
+ class result_sybase extends result {
+ var $rs;
+
/* ---------------------------------------------------------------------------
*/
! function get($pos,$fld) {
! return sybase_Result($this->rs, $pos, $fld);
! }
! /* ---------------------------------------------------------------------------
! */
! function numrows() {
! return sybase_num_rows($this->rs);
! }
! /* ---------------------------------------------------------------------------
! */
! function numfields() {
! return sybase_Num_Fields($this->rs);
! }
! /* ---------------------------------------------------------------------------
! */
! function fieldname($nr) {
! return sybase_fieldname($this->rs,$nr);
! }
! /* ---------------------------------------------------------------------------
! */
! function fieldtype($nr) {
! return sybase_fieldtype($this->rs,$nr);
! }
! /* ---------------------------------------------------------------------------
! */
! function free() {
! return sybase_FreeResult($this->rs);
}
}
Index: database.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/database.pinc,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** database.pinc 2001/09/16 19:22:22 1.4
--- database.pinc 2001/09/19 20:45:09 1.5
***************
*** 18,22 ****
$q = "SELECT * from tutos_dbs order by name";
$r = $dbconn->Exec($q);
! $n = DB_NumRows($r);
$a = 0;
while ($a < $n) {
--- 18,22 ----
$q = "SELECT * from tutos_dbs order by name";
$r = $dbconn->Exec($q);
! $n = $r->numrows();
$a = 0;
while ($a < $n) {
***************
*** 34,37 ****
--- 34,38 ----
$dblist[$d->id] = $d;
}
+ $r->free();
return $dblist;
}
***************
*** 75,96 ****
/* ---------------------------------------------------------------------------
*/
! function read_result (&$result, $pos ) {
global $g_res;
! $this->name = StripSlashes(DB_Result($result, $pos, "name"));
! $this->alias = StripSlashes(DB_Result($result, $pos, "dbalias"));
! $this->host = StripSlashes(DB_Result($result, $pos, "dbhost"));
! $this->port = StripSlashes(DB_Result($result, $pos, "dbport"));
! $this->user = StripSlashes(DB_Result($result, $pos, "dbuser"));
! $this->pass = StripSlashes(DB_Result($result, $pos, "dbpass"));
! $this->home = StripSlashes(DB_Result($result, $pos, "dbhome"));
! $this->type = StripSlashes(DB_Result($result, $pos, "dbtype"));
! $this->repository = StripSlashes(DB_Result($result, $pos, "repository"));
! $this->lastsync = new DateTime(DB_Result($result, $pos, "last_date"));
! $this->lastid = DB_Result($result, $pos, "last_id");
!
! $this->creator->read(DB_Result($result, $pos, "creator"));
! $this->id = DB_Result($result, $pos, "id");
! $this->creation = new DateTime(DB_Result($result, $pos, "creation"));
acl_read($this);
--- 76,97 ----
/* ---------------------------------------------------------------------------
*/
! function read_result (&$r, $pos ) {
global $g_res;
! $this->name = StripSlashes($r->get($pos, "name"));
! $this->alias = StripSlashes($r->get($pos, "dbalias"));
! $this->host = StripSlashes($r->get($pos, "dbhost"));
! $this->port = StripSlashes($r->get($pos, "dbport"));
! $this->user = StripSlashes($r->get($pos, "dbuser"));
! $this->pass = StripSlashes($r->get($pos, "dbpass"));
! $this->home = StripSlashes($r->get($pos, "dbhome"));
! $this->type = StripSlashes($r->get($pos, "dbtype"));
! $this->repository = StripSlashes($r->get($pos, "repository"));
! $this->lastsync = new DateTime($r->get($pos, "last_date"));
! $this->lastid = $r->get($pos, "last_id");
!
! $this->creator->read($r->get($pos, "creator"));
! $this->id = $r->get($pos, "id");
! $this->creation = new DateTime($r->get($pos, "creation"));
acl_read($this);
***************
*** 132,141 ****
$q = "SELECT * from tutos_dbs WHERE id = ". $id;
$r = $this->dbconn->Exec($q);
! $n = DB_NumRows($r);
if ( 0 == $n) {
return;
}
$this->read_result($r,0);
! $this->dbconn->FreeResult ($r);
}
/* ---------------------------------------------------------------------------
--- 133,142 ----
$q = "SELECT * from tutos_dbs WHERE id = ". $id;
$r = $this->dbconn->Exec($q);
! $n = $r->numrows();
if ( 0 == $n) {
return;
}
$this->read_result($r,0);
! $r->free();
}
/* ---------------------------------------------------------------------------
Index: database_ins.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/database_ins.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** database_ins.php 2001/09/16 19:22:22 1.3
--- database_ins.php 2001/09/19 20:45:09 1.4
***************
*** 46,53 ****
$gotourl = addUrlParameter($gotourl,"pass=". UrlEncode(StripSlashes($pass)));
! $pass = trim($home);
$gotourl = addUrlParameter($gotourl,"home=". UrlEncode(StripSlashes($home)));
! $pass = trim($rep);
$gotourl = addUrlParameter($gotourl,"rep=". UrlEncode(StripSlashes($rep)));
--- 46,53 ----
$gotourl = addUrlParameter($gotourl,"pass=". UrlEncode(StripSlashes($pass)));
! $home = trim($home);
$gotourl = addUrlParameter($gotourl,"home=". UrlEncode(StripSlashes($home)));
! $rep = trim($rep);
$gotourl = addUrlParameter($gotourl,"rep=". UrlEncode(StripSlashes($rep)));
Index: database_new.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/database_new.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** database_new.php 2001/09/16 19:22:22 1.3
--- database_new.php 2001/09/19 20:45:09 1.4
***************
*** 52,56 ****
@reset($obj->tlist);
while ( list ($i,$f) = @each ($obj->tlist) ) {
! echo "<OPTION VALUE=". $i .">". htmlentities($f) ."</OPTION>\n";
}
echo "</SELECT></TD>\n";
--- 52,56 ----
@reset($obj->tlist);
while ( list ($i,$f) = @each ($obj->tlist) ) {
! echo "<OPTION VALUE=". $i ." ". ($obj->type == $i ? "selected":"") .">". htmlentities($f) ."</OPTION>\n";
}
echo "</SELECT></TD>\n";
***************
*** 59,65 ****
echo "<TR>\n";
showfieldc($lang['AdminDBUser'],1);
! echo "<TD COLSPAN=1><INPUT SIZE=10 MAXLENGTH=30 name=\"user\" value=\"". $obj->user ."\"></TD>\n";
showfieldc($lang['AdminDBPass'],0);
! echo "<TD COLSPAN=1><INPUT SIZE=10 MAXLENGTH=30 name=\"pass\" value=\"". $obj->pass ."\"></TD>\n";
echo "</TR>\n";
--- 59,65 ----
echo "<TR>\n";
showfieldc($lang['AdminDBUser'],1);
! echo "<TD COLSPAN=1><INPUT SIZE=10 MAXLENGTH=30 name=\"user\" value=\"". htmlentities($obj->user) ."\"></TD>\n";
showfieldc($lang['AdminDBPass'],0);
! echo "<TD COLSPAN=1><INPUT SIZE=10 MAXLENGTH=30 name=\"pass\" value=\"". htmlentities($obj->pass) ."\"></TD>\n";
echo "</TR>\n";
***************
*** 71,75 ****
echo "<TR>\n";
showfieldc($lang['AdminDBHome'],0);
! echo "<TD COLSPAN=3><INPUT SIZE=60 MAXLENGTH=60 name=\"rep\" value=\"". htmlentities($obj->home) ."\"></TD>\n";
echo "</TR>\n";
--- 71,75 ----
echo "<TR>\n";
showfieldc($lang['AdminDBHome'],0);
! echo "<TD COLSPAN=3><INPUT SIZE=60 MAXLENGTH=60 name=\"home\" value=\"". htmlentities($obj->home) ."\"></TD>\n";
echo "</TR>\n";
Index: database_overview.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/database_overview.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** database_overview.php 2001/09/16 19:22:22 1.1
--- database_overview.php 2001/09/19 20:45:09 1.2
***************
*** 15,19 ****
global $lang,$tutos,$link1;
! $n = DB_NumRows($result);
if ( 0 == $n) {
echo $lang['Err0048'];
--- 15,19 ----
global $lang,$tutos,$link1;
! $n = $result->numrows();
if ( 0 == $n) {
echo $lang['Err0048'];
***************
*** 118,121 ****
--- 118,122 ----
HTML_Base3();
+ $result->free();
$dbconn->Close();
?>
Index: database_show.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/database_show.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** database_show.php 2001/09/16 19:22:22 1.3
--- database_show.php 2001/09/19 20:45:09 1.4
***************
*** 58,62 ****
echo "</TR><TR>\n";
showfield($lang['AdminDBHome']);
! echo " <TD COLSPAN=3>". $obj->home ."</TD>\n";
}
if ( ($tutos[usedocmanagement] == 1) ) {
--- 58,62 ----
echo "</TR><TR>\n";
showfield($lang['AdminDBHome']);
! echo " <TD COLSPAN=3>". $obj->home ." </TD>\n";
}
if ( ($tutos[usedocmanagement] == 1) ) {
|
|
From: Gero K. <gok...@us...> - 2001-09-17 20:30:45
|
Update of /cvsroot/tutos/tutos/php
In directory usw-pr-cvs1:/tmp/cvs-serv7294/php
Modified Files:
webelements.p3
Log Message:
more object searching
Index: webelements.p3
===================================================================
RCS file: /cvsroot/tutos/tutos/php/webelements.p3,v
retrieving revision 1.80
retrieving revision 1.81
diff -C2 -r1.80 -r1.81
*** webelements.p3 2001/09/16 19:08:33 1.80
--- webelements.p3 2001/09/17 20:30:43 1.81
***************
*** 230,233 ****
--- 230,235 ----
$lang['resource'] = &$lang['Resource'];
$lang['database'] = &$lang['DB'];
+ $lang['location'] = &$lang['Location'];
+ $lang['url'] = &$lang['URL'];
$lang['NoteReferences'][1] = &$lang['Company'];
***************
*** 1155,1158 ****
--- 1157,1174 ----
if ( empty($id) ) return -1;
+ if ( isset($g_adr[$id]) ) {
+ return $g_adr[$id];
+ }
+ if ( isset($g_app[$id]) ) {
+ return $g_app[$id];
+ }
+ if ( isset($g_pro[$id]) ) {
+ return $g_pro[$id];
+ }
+ if ( isset($g_com[$id]) ) {
+ return $g_com[$id];
+ }
+
+
$type = -1;
$tutos[tables]['calendar'] = 1;
***************
*** 1173,1177 ****
$tutos[tables]['timetrack'] = 16;
$tutos[tables]['resources'] = 17;
! $tutos[tables]['tutos_dbs'] = 18;
$found = 0;
--- 1189,1194 ----
$tutos[tables]['timetrack'] = 16;
$tutos[tables]['resources'] = 17;
! $tutos[tables]['location'] = 18;
! $tutos[tables]['tutos_dbs'] = 19;
$found = 0;
***************
*** 1267,1270 ****
--- 1284,1291 ----
break;
case 18:
+ $ref = new location($dbconn);
+ $ref->read(DB_Result($r, 0, "id"));
+ break;
+ case 19:
$ref = new database($dbconn);
$ref->read(DB_Result($r, 0, "id"));
|
|
From: Gero K. <gok...@us...> - 2001-09-17 20:30:00
|
Update of /cvsroot/tutos/tutos In directory usw-pr-cvs1:/tmp/cvs-serv7002 Modified Files: Makefile.in Log Message: added database_overview Index: Makefile.in =================================================================== RCS file: /cvsroot/tutos/tutos/Makefile.in,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -r1.67 -r1.68 *** Makefile.in 2001/09/16 19:22:21 1.67 --- Makefile.in 2001/09/17 20:29:58 1.68 *************** *** 11,14 **** --- 11,17 ---- # # $Log$ + # Revision 1.68 2001/09/17 20:29:58 gokohnert + # added database_overview + # # Revision 1.67 2001/09/16 19:22:21 gokohnert # added interbase support *************** *** 264,267 **** --- 267,271 ---- php/database_new.php \ php/database_show.php \ + php/database_overview.php \ php/db.p3 \ php/db_msql.pinc \ |
|
From: Gero K. <gok...@us...> - 2001-09-17 20:29:34
|
Update of /cvsroot/tutos/tutos/php
In directory usw-pr-cvs1:/tmp/cvs-serv6869/php
Modified Files:
admin_show.php
Log Message:
added history table
Index: admin_show.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/admin_show.php,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** admin_show.php 2001/09/10 19:43:26 1.17
--- admin_show.php 2001/09/17 20:29:31 1.18
***************
*** 33,36 ****
--- 33,37 ----
$counts['resources'] = 0;
$counts['watchlist'] = 0;
+ $counts['history'] = 0;
reset ($counts);
while ( list ($i,$f) = @each ($counts) ) {
***************
*** 69,72 ****
--- 70,74 ----
$url['resources'] = "resource_overview.php";
$url['watchlist'] = "watchlist_overview.php";
+ $url['history'] = "history_show.php";
$url['messages'] = "message_overview.php";
|
|
From: Gero K. <gok...@us...> - 2001-09-17 20:27:09
|
Update of /cvsroot/tutos/tutos/php
In directory usw-pr-cvs1:/tmp/cvs-serv6032/php
Modified Files:
installation.pinc installation_overview.php
Log Message:
added back/forward navigation
Index: installation.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/installation.pinc,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -r1.31 -r1.32
*** installation.pinc 2001/09/16 19:08:33 1.31
--- installation.pinc 2001/09/17 20:27:06 1.32
***************
*** 235,238 ****
--- 235,240 ----
*/
function getLink($text = "") {
+ global $lang;
+
if ( $text == "" ) {
$text = htmlentities($this->getFullname());
Index: installation_overview.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/installation_overview.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** installation_overview.php 2001/09/16 19:29:00 1.9
--- installation_overview.php 2001/09/17 20:27:06 1.10
***************
*** 16,21 ****
*
*/
! Function info(&$dbconn,&$result) {
! global $lang,$link1;
$n = $dbconn->NumRows($result);
--- 16,21 ----
*
*/
! Function info(&$dbconn,&$result,$start=0) {
! global $lang,$link1,$tutos;
$n = $dbconn->NumRows($result);
***************
*** 34,40 ****
echo "</TR>\n";
! $a = 0;
$line = 0;
! while ( $a < $n ) {
if ( $line == 1 ) {
$line = 2;
--- 34,48 ----
echo "</TR>\n";
! if ( $start == -1 ) {
! $a = $n - $tutos[maxshow];
! $end = $n;
! $start = $a;
! } else {
! $a = $start;
! $end = $start + $tutos[maxshow];
! }
!
$line = 0;
! while ( ($a < $n) && ($a < $end) ) {
if ( $line == 1 ) {
$line = 2;
***************
*** 120,127 ****
HTML_Base1();
navigate();
HTML_Base2($msg);
! info($dbconn,$r);
HTML_Base3();
--- 128,139 ----
+ if ( (! isset($start)) || ($start < 0) ) {
+ $start = 0;
+ }
+
HTML_Base1();
navigate();
HTML_Base2($msg);
! info($dbconn,$r,$start);
HTML_Base3();
|
|
From: Gero K. <gok...@us...> - 2001-09-17 20:25:33
|
Update of /cvsroot/tutos/tutos/php
In directory usw-pr-cvs1:/tmp/cvs-serv5649/php
Modified Files:
appointment.pinc
Log Message:
html fixes/entities
Index: appointment.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/appointment.pinc,v
retrieving revision 1.58
retrieving revision 1.59
diff -C2 -r1.58 -r1.59
*** appointment.pinc 2001/09/16 19:29:00 1.58
--- appointment.pinc 2001/09/17 20:25:30 1.59
***************
*** 846,855 ****
}
if ( $text != -1 ) {
! return makelink($url ,htmlentities($text),$info);
}
if ( $this->repeat == 0 ) {
! return makelink($url , $this->start->GetDate() ,$info) . " " . $this->descr;
} else {
! return makelink($url , "®". $this->start->GetDate() ,$info) . " " . $this->descr;
}
}
--- 846,855 ----
}
if ( $text != -1 ) {
! return makelink($url,$text,$info);
}
if ( $this->repeat == 0 ) {
! return makelink($url , htmlentities($this->start->GetDate()) ,$info) . " " . $this->descr;
} else {
! return makelink($url , htmlentities("®". $this->start->GetDate()) ,$info) . " " . $this->descr;
}
}
|
|
From: Gero K. <gok...@us...> - 2001-09-17 20:24:58
|
Update of /cvsroot/tutos/tutos/php
In directory usw-pr-cvs1:/tmp/cvs-serv5452/php
Modified Files:
bug.pinc bug_ins.php
Log Message:
moved transaction block to bug_ins
Index: bug.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/bug.pinc,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -r1.41 -r1.42
*** bug.pinc 2001/09/16 19:08:33 1.41
--- bug.pinc 2001/09/17 20:24:55 1.42
***************
*** 385,392 ****
$this->state = $state;
if ( $state == 3 ) {
! $this->solvedate = new DateTime();
}
if ( $state == 4 ) {
! $this->solvedate = new DateTime();
}
}
--- 385,392 ----
$this->state = $state;
if ( $state == 3 ) {
! $this->solvedate = new DateTime();
}
if ( $state == 4 ) {
! $this->solvedate = new DateTime();
}
}
***************
*** 656,664 ****
# Make the DB access
- $this->dbconn->Begin("WORK");
$r = $this->dbconn->Exec($q);
$msg .= acl_save($this);
$msg .= history_save($this);
- $this->dbconn->Commit("WORK");
return $msg;
--- 656,662 ----
Index: bug_ins.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/bug_ins.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** bug_ins.php 2001/09/10 16:39:04 1.9
--- bug_ins.php 2001/09/17 20:24:55 1.10
***************
*** 137,141 ****
--- 137,143 ----
}
+ $dbconn->Begin("WORK");
$msg .= $b->save();
+ $dbconn->Commit("WORK");
|
|
From: Gero K. <gok...@us...> - 2001-09-17 20:18:55
|
Update of /cvsroot/tutos/tutos/php
In directory usw-pr-cvs1:/tmp/cvs-serv3998/php
Modified Files:
address.pinc address_ins.php location.pinc location_ins.php
Log Message:
added history management
Index: address.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/address.pinc,v
retrieving revision 1.44
retrieving revision 1.45
diff -C2 -r1.44 -r1.45
*** address.pinc 2001/09/16 19:20:00 1.44
--- address.pinc 2001/09/17 20:18:52 1.45
***************
*** 193,196 ****
--- 193,226 ----
}
/* ---------------------------------------------------------------------------
+ * set the first name
+ */
+ function setFName($new) {
+ if ( $this->f_name != $new ) {
+ $this->modified[] = array ( "field" => "AdrFirstName" , "old" => $this->f_name , "new" => $new );
+ $this->f_name = $new;
+ }
+ return;
+ }
+ /* ---------------------------------------------------------------------------
+ * set the last name
+ */
+ function setLName($new) {
+ if ( $this->l_name != $new ) {
+ $this->modified[] = array ( "field" => "AdrLastName" , "old" => $this->l_name , "new" => $new );
+ $this->l_name = $new;
+ }
+ return;
+ }
+ /* ---------------------------------------------------------------------------
+ * set the middle name
+ */
+ function setMName($new) {
+ if ( $this->m_name != $new ) {
+ $this->modified[] = array ( "field" => "AdrMiddleName" , "old" => $this->m_name , "new" => $new );
+ $this->m_name = $new;
+ }
+ return;
+ }
+ /* ---------------------------------------------------------------------------
*
*/
***************
*** 199,206 ****
$msg = "";
- unset ($this->modified);
$b = $this->dbconn->Date($this->birthday);
if ( -1 == $this->id ) {
$this->id = $this->dbconn->NextID();
$flds = "id";
--- 229,236 ----
$msg = "";
$b = $this->dbconn->Date($this->birthday);
if ( -1 == $this->id ) {
+ $this->modified = array();
$this->id = $this->dbconn->NextID();
$flds = "id";
***************
*** 242,248 ****
- $this->dbconn->Begin("WORK");
$this->dbconn->Exec($q);
$msg .= acl_save($this);
# The Owner can delete his picture
--- 272,278 ----
$this->dbconn->Exec($q);
$msg .= acl_save($this);
+ $msg .= history_save($this);
# The Owner can delete his picture
***************
*** 251,255 ****
$msg .= acl_save($this->pic_file);
}
- $this->dbconn->Commit("WORK");
return $msg;
--- 281,284 ----
Index: address_ins.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/address_ins.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** address_ins.php 2001/09/16 19:20:00 1.15
--- address_ins.php 2001/09/17 20:18:52 1.16
***************
*** 103,112 ****
if ( $msg == "" ) {
! $a->f_name = $f_name;
! $a->l_name = $l_name;
! $a->m_name = $m_name;
$a->pic_id = $a->pic_file->id;
$a->birthday = $birthday;
$msg = $a->save();
$gotourl = "address_new.php?id=". $a->id;
}
--- 103,116 ----
if ( $msg == "" ) {
! $a->setFName($f_name);
! $a->setLName($l_name);
! $a->setMName($m_name);
$a->pic_id = $a->pic_file->id;
$a->birthday = $birthday;
+
+ $dbconn->Begin("WORK");
$msg = $a->save();
+ $dbconn->Commit("WORK");
+
$gotourl = "address_new.php?id=". $a->id;
}
Index: location.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/location.pinc,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** location.pinc 2001/09/11 19:32:17 1.14
--- location.pinc 2001/09/17 20:18:52 1.15
***************
*** 121,124 ****
--- 121,133 ----
/* ---------------------------------------------------------------------------
+ * Return a link to this address
+ */
+ function getLink($text = "") {
+ global $lang;
+
+ if (empty($this->id)) return;
+ return $lang['location'];
+ }
+ /* ---------------------------------------------------------------------------
*
*/
***************
*** 190,193 ****
--- 199,213 ----
$q1 = "INSERT INTO location (". $fields .") VALUES (". $values .")";
$q2 = "INSERT INTO adrloc (loc_id,adr_id,name,category) VALUES (". $this->id .",". $this->adr_id .",". $this->dbconn->String($this->lname) .",". $this->category .")";
+
+ $this->modified[] = array ( "field" => "created" ,
+ "old" => $this->getType() ,
+ "new" => $this->id,
+ "obj_id" => $this->id
+ );
+ $this->modified[] = array ( "field" => "AdrLNew" ,
+ "old" => "-1",
+ "new" => $this->id,
+ "obj_id" => $this->adr_id
+ );
} else {
#
***************
*** 215,220 ****
$q2 = "UPDATE adrloc set name = ". $this->dbconn->String($this->lname) ." , category =". $this->category ." WHERE loc_id = ". $this->id ." AND adr_id = ". $this->adr_id;
}
! $r = $this->dbconn->Exec($q1);
! $r = $this->dbconn->Exec($q2);
return $msg;
--- 235,242 ----
$q2 = "UPDATE adrloc set name = ". $this->dbconn->String($this->lname) ." , category =". $this->category ." WHERE loc_id = ". $this->id ." AND adr_id = ". $this->adr_id;
}
! $this->dbconn->Exec($q1);
! $this->dbconn->Exec($q2);
! $msg .= acl_save($this);
! $msg .= history_save($this);
return $msg;
***************
*** 234,237 ****
--- 256,262 ----
$q = "DELETE FROM adrloc WHERE loc_id = ". $this->id ;
$r = $this->dbconn->Exec($q);
+
+ $msg .= history_delete($this);
+ $msg .= acl_delete_obj($this);
$this->modified[] = array ( "field" => "Delete" , "old" => $this->getType() , "new" => -1 );
Index: location_ins.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/location_ins.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** location_ins.php 2001/09/10 16:39:04 1.13
--- location_ins.php 2001/09/17 20:18:52 1.14
***************
*** 105,109 ****
--- 105,111 ----
}
if ( $msg == "" ) {
+ $dbconn->Begin("WORK");
$l->save();
+ $dbconn->Commit("WORK");
if ( $p->getType() == "address" ) {
$gotourl = "address_new.php";
|
|
From: Gero K. <gok...@us...> - 2001-09-17 20:18:17
|
Update of /cvsroot/tutos/tutos/php
In directory usw-pr-cvs1:/tmp/cvs-serv3890/php
Modified Files:
history_show.php history.pinc
Log Message:
extended for everything view
Index: history_show.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/history_show.php,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** history_show.php 2001/09/16 19:23:41 1.17
--- history_show.php 2001/09/17 20:18:14 1.18
***************
*** 14,17 ****
--- 14,18 ----
include("file.pinc");
include("timetrack.pinc");
+ include("resource.pinc");
/* Check if user is allowed to use it */
***************
*** 24,33 ****
global $current_user,$lang,$tutos,$link1;
echo "<TABLE CLASS=single BORDER=0 CELLPADDING=3 CELLSPACING=0>\n";
echo "<TR>\n";
if ( $obj != -1 ) {
! echo " <TH COLSPAN=5>". sprintf($lang['HistoryShow'],$lang[$obj->getType()],menulink($obj->getURL(),$obj->getFullName())) ."</TH>\n";
} else {
! echo " <TH COLSPAN=5>". sprintf($lang['HistoryShow'],"","(". $lang['HistoryDeleted']) .")</TH>\n";
# Pseudo empty object
$obj = new note($current_user->dbconn);
--- 25,43 ----
global $current_user,$lang,$tutos,$link1;
+ if ( $id == -1 ) {
+ $cols = 7;
+ } else {
+ $cols = 5;
+ }
echo "<TABLE CLASS=single BORDER=0 CELLPADDING=3 CELLSPACING=0>\n";
echo "<TR>\n";
if ( $obj != -1 ) {
! echo " <TH COLSPAN=". $cols .">". sprintf($lang['HistoryShow'],$lang[$obj->getType()],menulink($obj->getURL(),$obj->getFullName())) ."</TH>\n";
} else {
! if ( $id != -1 ) {
! echo " <TH COLSPAN=". $cols .">". sprintf($lang['HistoryShow'],"","(". $lang['HistoryDeleted']) .")</TH>\n";
! } else {
! echo " <TH COLSPAN=". $cols .">". sprintf($lang['HistoryShow'],"","\"". $lang['AppEverything']) ."\"</TH>\n";
! }
# Pseudo empty object
$obj = new note($current_user->dbconn);
***************
*** 37,40 ****
--- 47,54 ----
echo "<TR>\n";
+ if ( $id == -1 ) {
+ echo order_header("","Type");
+ echo order_header("","ID");
+ }
echo order_header("",$lang['HistoryFld']);
echo order_header("",$lang['HistoryOldV']);
***************
*** 68,71 ****
--- 82,93 ----
}
echo "<TR CLASS=line". $line .">\n";
+ if ( $id == -1 ) {
+ $x = getObject($obj->dbconn,$f["obj_id"]);
+ if ( $x == -1 ) {
+ echo " <TD COLSPAN=2><B> ". $f["obj_id"] ."</B></TD>\n";
+ } else {
+ echo " <TD> ". $lang[$x->getType()] ."</TD><TD> <B>". $x->getLink() ."</B></TD>\n";
+ }
+ }
if ( isset( $lang[$f["field"]]) ) {
echo " <TD><B> ". $lang[$f["field"]] ."</B></TD>\n";
***************
*** 175,179 ****
$a++;
}
! ShowBackForwardNav($link1,5,$start,$a,$n);
echo "</TABLE>\n";
}
--- 197,201 ----
$a++;
}
! ShowBackForwardNav($link1,$cols,$start,$a,$n);
echo "</TABLE>\n";
}
***************
*** 201,208 ****
}
} else {
! $id = -1;
! $obj = -1;
! $msg .= "Missing ID";
! HTML_Header("ERROR");
}
--- 223,236 ----
}
} else {
! if ($current_user->admin != 0 ) {
! $id = -1;
! $obj = -1;
! HTML_Header(sprintf($lang['HistoryDetail'],"\"". $lang['AppEverything'] ."\""));
! } else {
! $id = -1;
! $obj = -1;
! $msg .= "Missing ID";
! HTML_Header("ERROR");
! }
}
Index: history.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/history.pinc,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** history.pinc 2001/09/10 16:37:54 1.15
--- history.pinc 2001/09/17 20:18:14 1.16
***************
*** 17,21 ****
$obj->history = array();
! $q = "SELECT * from history where obj_id = ". $obj->id ." order by m_time";
$r = $obj->dbconn->Exec($q);
$n = $obj->dbconn->NumRows($r);
--- 17,25 ----
$obj->history = array();
! if ( $obj->id == -1 ) {
! $q = "SELECT * from history order by m_time";
! } else {
! $q = "SELECT * from history where obj_id = ". $obj->id ." order by m_time";
! }
$r = $obj->dbconn->Exec($q);
$n = $obj->dbconn->NumRows($r);
***************
*** 23,34 ****
while ($a < $n) {
$adr = new tutos_address($obj->dbconn);
! $adr->read(DB_Result($r, $a, "adr_id"));
$m_time = new DateTime(DB_Result($r, $a, "m_time"));
! $obj->history[] = array ( "field" => StripSlashes(DB_Result($r, $a, "m_field")) ,
! "old" => StripSlashes(DB_Result($r, $a, "val_old")) ,
! "new" => StripSlashes(DB_Result($r, $a, "val_new")),
"adr_id" => $adr,
"m_time" => $m_time
);
--- 27,39 ----
while ($a < $n) {
$adr = new tutos_address($obj->dbconn);
! $adr->read($obj->dbconn->Result($r, $a, "adr_id"));
$m_time = new DateTime(DB_Result($r, $a, "m_time"));
! $obj->history[] = array ( "field" => StripSlashes($obj->dbconn->Result($r, $a, "m_field")) ,
! "old" => StripSlashes($obj->dbconn->Result($r, $a, "val_old")) ,
! "new" => StripSlashes($obj->dbconn->Result($r, $a, "val_new")),
"adr_id" => $adr,
+ "obj_id" => $obj->dbconn->Result($r, $a, "obj_id"),
"m_time" => $m_time
);
|
|
From: Gero K. <gok...@us...> - 2001-09-16 19:29:03
|
Update of /cvsroot/tutos/tutos/php
In directory usw-pr-cvs1:/tmp/cvs-serv21193/php
Modified Files:
Date.pinc acl.pinc acl_overview.php app_del.php
appointment.pinc check.php config.pinc file_show.php
graph_bars.php installation_overview.php message_overview.php
permission.p3 resource_overview.php url.pinc
Log Message:
updates
Index: Date.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/Date.pinc,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -r1.35 -r1.36
*** Date.pinc 2001/09/12 21:07:54 1.35
--- Date.pinc 2001/09/16 19:29:00 1.36
***************
*** 569,572 ****
--- 569,582 ----
$this->sec = 0;
$this->format = 8;
+ } else
+ if ( ereg( "^([0-1][0-9])/([0-3][0-9])/([0-9]{4})$", $str, $regs ) ) {
+ # Init via MM/DD/YYYY
+ $this->month = $regs[1];
+ $this->day = $regs[2];
+ $this->year = $regs[3];
+ $this->hour = 0;
+ $this->min = 0;
+ $this->sec = 0;
+ $this->format = 8;
} else {
echo "<BR>DT: Unknown DateTimeFormat<SPAN CLASS=warn>". $str ." fix it in Date.pinc</SPAN>". strlen($str) ." <BR>";
Index: acl.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/acl.pinc,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** acl.pinc 2001/09/10 16:40:40 1.15
--- acl.pinc 2001/09/16 19:29:00 1.16
***************
*** 127,144 ****
# Rights granted explicit for current_user
if ( ($i > 0) && ($current_user->id == $i) && ($f > $level) ) {
! return $f;
}
# Rights we got via team membership
if ( count($current_user->teamids) > 0 ) {
! @reset($current_user->teamids);
! while ( list ($i2,$f2) = @each ($current_user->teamids) ) {
! if ( ($i == $i2) && ($f > $level) ) {
! return $f;
! }
! }
}
# Everybody
if ( ($i == 0) && ($f > $level) ) {
! return $f;
}
}
--- 127,144 ----
# Rights granted explicit for current_user
if ( ($i > 0) && ($current_user->id == $i) && ($f > $level) ) {
! return $f;
}
# Rights we got via team membership
if ( count($current_user->teamids) > 0 ) {
! @reset($current_user->teamids);
! while ( list ($i2,$f2) = @each ($current_user->teamids) ) {
! if ( ($i == $i2) && ($f > $level) ) {
! return $f;
! }
! }
}
# Everybody
if ( ($i == 0) && ($f > $level) ) {
! return $f;
}
}
Index: acl_overview.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/acl_overview.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** acl_overview.php 2001/09/10 19:42:49 1.6
--- acl_overview.php 2001/09/16 19:29:00 1.7
***************
*** 33,37 ****
if ( $current_user->admin == 0) {
! echo "Only admins are allowed to see this\n";
return;
}
--- 33,37 ----
if ( $current_user->admin == 0) {
! echo "<SPAN CLASS=warn>Only admins are allowed to see this</SPAN>\n";
return;
}
Index: app_del.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/app_del.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** app_del.php 2001/09/11 19:41:36 1.3
--- app_del.php 2001/09/16 19:29:00 1.4
***************
*** 10,14 ****
include("note.pinc");
include("resource.pinc");
- include("url.pinc");
/* Check if user is allowed to use it */
--- 10,13 ----
Index: appointment.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/appointment.pinc,v
retrieving revision 1.57
retrieving revision 1.58
diff -C2 -r1.57 -r1.58
*** appointment.pinc 2001/09/11 19:41:36 1.57
--- appointment.pinc 2001/09/16 19:29:00 1.58
***************
*** 335,338 ****
--- 335,340 ----
};
+ $this->participant = array();
+
/* Get the list of participants */
$query = "SELECT * FROM participants WHERE app_id = ". $this->id;
***************
*** 386,389 ****
--- 388,394 ----
return 0;
}
+
+ $this->read_participants();
+
if ( $this->creator->id == $current_user->id ) {
# the creator is allowed
***************
*** 398,411 ****
@reset($this->participant);
while ( list ($i,$f) = @each ($this->participant) ) {
! if ($f->getType() == "address") {
! if ( $current_user->id == $i ) {
! return $tutos[delok];
! }
! } else if ($f->getType() == "team") {
! $f->read_member();
! if ( $f->is_member($current_user) ) {
! return $tutos[delok];
! }
! }
}
}
--- 403,416 ----
@reset($this->participant);
while ( list ($i,$f) = @each ($this->participant) ) {
! if ($f->getType() == "address") {
! if ( $current_user->id == $i ) {
! return $tutos[delok];
! }
! } else if ($f->getType() == "team") {
! $f->read_member();
! if ( $f->is_member($current_user) ) {
! return $tutos[delok];
! }
! }
}
}
***************
*** 841,845 ****
}
if ( $text != -1 ) {
! return makelink($url ,$text,$info);
}
if ( $this->repeat == 0 ) {
--- 846,850 ----
}
if ( $text != -1 ) {
! return makelink($url ,htmlentities($text),$info);
}
if ( $this->repeat == 0 ) {
Index: check.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/check.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** check.php 2001/09/10 16:57:32 1.15
--- check.php 2001/09/16 19:29:00 1.16
***************
*** 12,18 ****
include("appointment.pinc");
include("bug.pinc");
- include("mail.pinc");
include("note.pinc");
- include("history.pinc");
include("task.pinc");
include("timetrack.pinc");
--- 12,16 ----
Index: config.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/config.pinc,v
retrieving revision 1.70
retrieving revision 1.71
diff -C2 -r1.70 -r1.71
*** config.pinc 2001/09/12 21:07:54 1.70
--- config.pinc 2001/09/16 19:29:00 1.71
***************
*** 76,88 ****
$tutos[repository][1] = "../repository1";
# --------------------------
! # $tutos[dbname][2] = "tutos";
! # $tutos[dbhost][2] = "faust";
! # $tutos[dbport][2] = 5432;
! # $tutos[dbuser][2] = "wwwrun";
! # $tutos[dbpasswd][2] = "";
! # $tutos[dbtype][2] = 1;
! # $tutos[dbalias][2] = "FAUST";
! # $tutos[cryptpw][2] = 1;
! # $tutos[repository][2] = "../repository2";
# --------------------------
# $tutos[dbname][3] = "webber";
--- 76,88 ----
$tutos[repository][1] = "../repository1";
# --------------------------
! $tutos[dbname][2] = "/tmp/tutos.gdb";
! $tutos[dbhost][2] = "localhost";
! $tutos[dbport][2] = 5432;
! $tutos[dbuser][2] = "wwwrun";
! $tutos[dbpasswd][2] = "tutos";
! $tutos[dbtype][2] = 7;
! $tutos[dbalias][2] = "IBASE";
! $tutos[cryptpw][2] = 0;
! $tutos[repository][2] = "../repository2";
# --------------------------
# $tutos[dbname][3] = "webber";
***************
*** 363,366 ****
--- 363,367 ----
$tutos[useldap] = 1;
$tutos[usevcard] = 1;
+ $tutos[useurl] = 1;
#
# Permission levels (do not change this !)
Index: file_show.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/file_show.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** file_show.php 2001/09/11 21:06:53 1.16
--- file_show.php 2001/09/16 19:29:00 1.17
***************
*** 171,181 ****
$f->show($version);
} else if ( $format == "download" ) {
! if ( ($f->filetype != "") && ($f->version == $version) ) {
! Header("Content-type: ". $f->filetype);
} else {
! Header("Content-type: text/plain");
}
- Header("Content-Disposition: attachment; filename=\"". $f->filename ."\"");
- Header("Content-Description: Upload from TUTOS" );
$f->download($version);
} else {
--- 171,195 ----
$f->show($version);
} else if ( $format == "download" ) {
! // see also
! // http://www.phpbuilder.com/forum/archives/1/2001/3/4/113046
! // http://ppewww.ph.gla.ac.uk/~flavell/www/content-type.html
! // http://msdn.microsoft.com/library/default.asp?url=/workshop/networking/moniker/overview/appendix_a.asp
! if (strstr($HTTP_SERVER_VARS["HTTP_USER_AGENT"],"MSIE 5")) {
! Header("Expires:");
! Header("Cache-Control:");
! Header("Pragma:");
! Header("Content-Type: application/octet-stream");
! Header("Connection: close");
! Header("Content-Transfer-Encoding: binary");
! Header("Content-Disposition: attachment;filename=\"". $f->filename ."\"");
} else {
! if ( ($f->filetype != "") && ($f->version == $version) ) {
! Header("Content-type: ". $f->filetype);
! } else {
! Header("Content-type: text/plain");
! }
! Header("Content-Disposition: attachment; filename=\"". $f->filename ."\"");
! Header("Content-Description: Upload from TUTOS" );
}
$f->download($version);
} else {
Index: graph_bars.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/graph_bars.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** graph_bars.php 2001/09/06 10:51:59 1.7
--- graph_bars.php 2001/09/16 19:29:00 1.8
***************
*** 13,23 ****
check_user();
function basic (&$f,&$t0,&$t1) {
- define (red,1);
- define (green,2);
- define (blue,3);
- define (yellow,4);
--- 13,23 ----
check_user();
+ define (red,1);
+ define (green,2);
+ define (blue,3);
+ define (yellow,4);
function basic (&$f,&$t0,&$t1) {
Index: installation_overview.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/installation_overview.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** installation_overview.php 2001/09/10 16:39:04 1.8
--- installation_overview.php 2001/09/16 19:29:00 1.9
***************
*** 17,31 ****
*/
Function info(&$dbconn,&$result) {
! global $lang;
! $n = DB_NumRows($result);
if ( 0 == $n) {
! echo "<B>Problem: <I>No Installations found</I></B>";
return;
}
! echo "<TABLE BORDER=0 CELLPADDING=3 CELLSPACING=0>\n";
echo "<TR>\n";
! echo "<TH>#</TH><TH>". $lang['Product'] ."</TH><TH>". $lang['Customer'] ."</TH><TH>". $lang['Date'] ."</TH>\n";
echo "</TR>\n";
--- 17,35 ----
*/
Function info(&$dbconn,&$result) {
! global $lang,$link1;
! $n = $dbconn->NumRows($result);
if ( 0 == $n) {
! echo $lang['Err0048'];
return;
}
! echo "<TABLE CLASS=single BORDER=0 CELLPADDING=3 CELLSPACING=0>\n";
echo "<TR>\n";
! echo order_header("","#");
! echo order_header("",$lang['Product']);
! echo order_header("",$lang['Customer']);
! echo order_header("instdate",$lang['Date'],$link1);
!
echo "</TR>\n";
***************
*** 53,56 ****
--- 57,63 ----
echo "</TR>\n";
}
+
+ ShowBackForwardNav($link1,4,$start,$a,$n);
+
echo "</TABLE>\n";
***************
*** 75,82 ****
--- 82,91 ----
HTML_Header($lang['InstOverview']);
+ $link1 = "installation_overview.php";
$q = "SELECT * FROM installations";
$pre = " WHERE ";
if ( isset($link_id) ) {
+ $link1 = addUrlParameter($link1,"link_id=". $link_id);
$o = getObject($dbconn,$link_id);
if ( $o->id > 0 ) {
***************
*** 94,99 ****
}
- $q .= " ORDER by instdate";
$r = $dbconn->Exec($q);
--- 103,120 ----
}
+ # sorting
+ if ( isset($xf) && isset($xo) ) {
+ $q .=" ORDER by " . $xf;
+ if ( $xo == 1 ) {
+ $q .= " ASC ";
+ } else {
+ $q .= " DESC ";
+ }
+ $link1 = addUrlParameter($link1,"xf=".UrlEncode($f));
+ $link1 = addUrlParameter($link1,"xo=". $o);
+ } else {
+ $q .= " ORDER by instdate";
+ }
$r = $dbconn->Exec($q);
Index: message_overview.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/message_overview.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** message_overview.php 2001/09/10 16:40:40 1.4
--- message_overview.php 2001/09/16 19:29:00 1.5
***************
*** 40,44 ****
echo "<TR>\n";
echo " <TD>". DB_Result($result, $a, "ts") ."</TD>\n";
! echo " <TD>". DB_Result($result, $a, "message") ."</TD>\n";
echo "</TR>\n";
$a++;
--- 40,44 ----
echo "<TR>\n";
echo " <TD>". DB_Result($result, $a, "ts") ."</TD>\n";
! echo " <TD>". DB_Result($result, $a, $dbconn->colname("message")) ."</TD>\n";
echo "</TR>\n";
$a++;
Index: permission.p3
===================================================================
RCS file: /cvsroot/tutos/tutos/php/permission.p3,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -r1.41 -r1.42
*** permission.p3 2001/09/10 16:57:32 1.41
--- permission.p3 2001/09/16 19:29:00 1.42
***************
*** 7,10 ****
--- 7,11 ----
*/
+ # Files noted here are included everywhere
include("db.p3");
include("acl.pinc");
***************
*** 13,16 ****
--- 14,18 ----
include("history.pinc");
include("mail.pinc");
+ include("url.pinc");
***************
*** 161,165 ****
$now = new DateTime();
! $query = "INSERT into messages (ts,message) values (". $dbconn->DateTime($now) .",". $dbconn->String($msg) .")";
$r = $dbconn->Exec($query);
--- 163,167 ----
$now = new DateTime();
! $query = "INSERT into messages (ts,". $dbconn->colname("message") .") values (". $dbconn->DateTime($now) .",". $dbconn->String($msg) .")";
$r = $dbconn->Exec($query);
Index: resource_overview.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/resource_overview.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** resource_overview.php 2001/09/10 16:37:54 1.8
--- resource_overview.php 2001/09/16 19:29:00 1.9
***************
*** 16,20 ****
global $lang,$tutos,$link1;
! $n = DB_NumRows($result);
if ( 0 == $n) {
echo $lang['Err0048'];
--- 16,20 ----
global $lang,$tutos,$link1;
! $n = $dbconn->NumRows($result);
if ( 0 == $n) {
echo $lang['Err0048'];
***************
*** 23,28 ****
echo "<TABLE CLASS=single BORDER=0 CELLPADDING=3 CELLSPACING=0>\n";
echo "<TR>\n";
! echo order_header("name",$lang['ResName']);
! echo order_header("",$lang['ResDesc']);
echo "</TR>\n";
--- 23,28 ----
echo "<TABLE CLASS=single BORDER=0 CELLPADDING=3 CELLSPACING=0>\n";
echo "<TR>\n";
! echo order_header("name",$lang['ResName'],$link1);
! echo order_header("",$lang['ResDesc'],$link1);
echo "</TR>\n";
Index: url.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/url.pinc,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -r1.25 -r1.26
*** url.pinc 2001/09/13 15:12:18 1.25
--- url.pinc 2001/09/16 19:29:00 1.26
***************
*** 130,133 ****
--- 130,140 ----
* Return a link to this appointment
*/
+ function getUrl() {
+ # Do not use makelink here !!!
+ return $this->url;
+ }
+ /* ---------------------------------------------------------------------------
+ * Return a link to this appointment
+ */
function getLink() {
# Do not use makelink here !!!
|
|
From: Gero K. <gok...@us...> - 2001-09-16 19:29:02
|
Update of /cvsroot/tutos/tutos/homepage In directory usw-pr-cvs1:/tmp/cvs-serv21193/homepage Modified Files: download.html Log Message: updates Index: download.html =================================================================== RCS file: /cvsroot/tutos/tutos/homepage/download.html,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -r1.32 -r1.33 *** download.html 2001/08/31 12:01:59 1.32 --- download.html 2001/09/16 19:29:00 1.33 *************** *** 14,18 **** There you could find the subpackages fro <B>"php"</B> and/or <B>"java"</B>. You do not need the <B>"all"</B> package to use TUTOS. <P> ! If you have problems with downloading please try this link <A HREF=ftp://ftp://tutos.sourceforge.net/pub/tutos" rel="nofollow">tutos.sourceforge.net/pub/tutos>ftp://tutos.sourceforge.net/pub/tutos</A> <P> <UL> --- 14,18 ---- There you could find the subpackages fro <B>"php"</B> and/or <B>"java"</B>. You do not need the <B>"all"</B> package to use TUTOS. <P> ! If you have problems with downloading please try this link <A HREF=http://www.tutos.org/download" rel="nofollow">http://www.tutos.org/download>http://www.tutos.org/download</A> <P> <UL> |