Update of /cvsroot/tutos/tutos/php
In directory sc8-pr-cvs1:/tmp/cvs-serv31154/php
Modified Files:
address.pinc address_new.php admin_show.php app_new.php
appointment.pinc base.pinc bug.pinc bug_new.php calendar.php
config_default.pinc database.pinc db.p3 fax_ins.php
fax_new.php file.pinc file_new.php file_overview.php
file_show.php location.pinc mail_new.php module_base.pinc
product.pinc scheme.php task.pinc task_new.php task_show.php
team.pinc timetrack_overview.php update.php user.pinc
webelements.p3
Log Message:
using table field sizes
Index: address.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/address.pinc,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -r1.81 -r1.82
--- address.pinc 18 Nov 2002 05:55:00 -0000 1.81
+++ address.pinc 30 Nov 2002 19:04:44 -0000 1.82
@@ -210,16 +210,16 @@
* save the objects data to the database
*/
function save () {
- global $current_user, $tutos;
+ global $table,$current_user, $tutos;
$msg = "";
$q = new query($this->dbconn);
$q->setTable($this->tablename);
$q->addFV("birthday",$this->birthday,"DATE");
- $q->addFV("title",$this->title,"STRING",10);
- $q->addFV("f_name",$this->f_name,"STRING",30);
- $q->addFV("m_name",$this->m_name,"STRING",3);
- $q->addFV("l_name",$this->l_name,"STRING",30);
+ $q->addFV("title",$this->title,"STRING",$table['address']['title'][size]);
+ $q->addFV("f_name",$this->f_name,"STRING",$table['address']['f_name'][size]);
+ $q->addFV("m_name",$this->m_name,"STRING",$table['address']['m_name'][size]);
+ $q->addFV("l_name",$this->l_name,"STRING",$table['address']['l_name'][size]);
$q->addFV("pic_id",$this->pic_file,"OBJ");
if ( $this->id < 0 ) {
Index: address_new.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/address_new.php,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- address_new.php 18 Nov 2002 05:55:01 -0000 1.43
+++ address_new.php 30 Nov 2002 19:04:45 -0000 1.44
@@ -18,7 +18,7 @@
*
*/
Function ask_location() {
- global $lang;
+ global $lang,$table;
$modloc = true;
@@ -28,8 +28,8 @@
$this->add_entry ($lang['AdrCategory'],'category',$this->loc->category,$modloc,30,3);
echo "</tr><tr>\n";
# Address Desription
- $this->add_entry ($lang['AdrDescription'],'lname',$this->loc->lname,$modloc,30);
- $this->add_entry ($lang['Description'],'desc1',$this->loc->desc1,$modloc,30);
+ $this->add_entry ($lang['AdrDescription'],'lname',$this->loc->lname,$modloc,$table['address1']['name'][size]);
+ $this->add_entry ($lang['Description'],'desc1',$this->loc->desc1,$modloc,$table['location']['desc1'][size]);
echo "</tr><tr>\n";
# COMPANY/NAME
@@ -37,7 +37,7 @@
echo $this->showfield($lang['Company']);
echo "<td><select name=\"c_id\">\n";
foreach($this->loc->cl as $i => $f ) {
- echo " <option value=\"". $i ."\">". $f->name ."</OPTION>\n";
+ echo " <option value=\"". $i ."\">". $f->name ."</option>\n";
}
echo " <option value=\"-1\">None</option>\n";
echo "</select>\n";
@@ -48,7 +48,7 @@
$this->add_entry ($lang['Company'],'company',$this->loc,$modloc,30);
}
# EMAIL
- $this->add_entry ($lang['AdrEmail']. " #1",'email_1',$this->loc->email_1,$modloc,60);
+ $this->add_entry ($lang['AdrEmail']. " #1",'email_1',$this->loc->email_1,$modloc,$table['location']['email_1'][size]);
echo "</tr><tr>\n";
# DEPARTMENT
@@ -56,7 +56,7 @@
echo $this->showfield($lang['Department']);
echo "<td><select name=\"d_id\">\n";
foreach($this->loc->dl as $i => $f ) {
- echo " <option value=\"". $i ."\">". $f->name ." / ". $f->company->name ."</OPTION>\n";
+ echo " <option value=\"". $i ."\">". $f->name ." / ". $f->company->name ."</option>\n";
}
echo " <option value=\"-1\">None</option>\n";
echo "</select>\n";
@@ -65,64 +65,64 @@
$this->add_entry ($lang['Department'],'department',$this->loc->department_name,$modloc,30);
}
# EMAIL
- $this->add_entry ($lang['AdrEmail']." #2",'email_2',$this->loc->email_2,$modloc,60);
+ $this->add_entry ($lang['AdrEmail']." #2",'email_2',$this->loc->email_2,$modloc,$table['location']['email_2'][size]);
echo "</tr><tr>\n";
# STREET
- $this->add_entry ($lang['Street'],'street1',$this->loc->street1,$modloc,30);
+ $this->add_entry ($lang['Street'],'street1',$this->loc->street1,$modloc,$table['location']['street1'][size]);
# PHONE
- $this->add_entry ($lang['Phone'] ." #1",'phone_1',$this->loc->phone_1,$modloc,30);
+ $this->add_entry ($lang['Phone'] ." #1",'phone_1',$this->loc->phone_1,$modloc,$table['location']['phone_1'][size]);
echo "</tr><tr>\n";
# STREET
- $this->add_entry ($lang['Street'],'street2',$this->loc->street2,$modloc,30);
+ $this->add_entry ($lang['Street'],'street2',$this->loc->street2,$modloc,$table['location']['street2'][size]);
# PHONE
- $this->add_entry ($lang['Phone'] ." #2",'phone_2',$this->loc->phone_2,$modloc,30);
+ $this->add_entry ($lang['Phone'] ." #2",'phone_2',$this->loc->phone_2,$modloc,$table['location']['phone_2'][size]);
echo "</tr><tr>\n";
# FAX
- $this->add_entry ($lang['AdrFax'],'fax_1',$this->loc->fax_1,$modloc,30);
+ $this->add_entry ($lang['AdrFax'],'fax_1',$this->loc->fax_1,$modloc,$table['location']['fax_1'][size]);
# CITY
- $this->add_entry ($lang['City'],'city',$this->loc->city,$modloc,30);
+ $this->add_entry ($lang['City'],'city',$this->loc->city,$modloc,$table['location']['city'][size]);
echo "</tr><tr>\n";
# ZIP
- $this->add_entry ($lang['ZIP'],'zip',$this->loc->zip,$modloc,10);
+ $this->add_entry ($lang['ZIP'],'zip',$this->loc->zip,$modloc,$table['location']['zip'][size]);
echo "<td colspan=\"2\"> </td>";
echo "</tr><tr>\n";
# STATE
- $this->add_entry ($lang['State'],'state',$this->loc->state,$modloc,30);
+ $this->add_entry ($lang['State'],'state',$this->loc->state,$modloc,$table['location']['state'][size]);
echo "<td colspan=\"2\"> </td>";
echo "</tr><tr>\n";
# COUNTRY
- $this->add_entry ($lang['Country'],'country',$this->loc->country,$modloc,3,3);
+ $this->add_entry ($lang['Country'],'country',$this->loc->country,$modloc,$table['location']['country'][size],3);
echo "</tr>\n";
- echo $this->setfocus("adrnew.lname");
+ echo $this->setfocus("adrnew.lname");
}
/**
*
*/
Function ask_address() {
- global $lang,$tutos;
+ global $lang,$table,$tutos;
echo "<tr>\n";
# TITLE
- $this->add_entry ($lang['AdrTitle'],'title',$this->obj->title,$this->modadr,10,3);
- echo "</tr><TR>\n";
+ $this->add_entry ($lang['AdrTitle'],'title',$this->obj->title,$this->modadr,$table['address']['title'][size],3);
+ echo "</tr><tr>\n";
# FIRST NAME
- $this->add_entry ($lang['AdrFirstName'],'f_name',$this->obj->f_name,$this->modadr,30,3);
+ $this->add_entry ($lang['AdrFirstName'],'f_name',$this->obj->f_name,$this->modadr,$table['address']['f_name'][size],3);
echo "</tr><tr>\n";
# MIDDLE NAME
- $this->add_entry ($lang['AdrMiddleName'],'m_name',$this->obj->m_name,$this->modadr,3,3);
+ $this->add_entry ($lang['AdrMiddleName'],'m_name',$this->obj->m_name,$this->modadr,$table['address']['m_name'][size],3);
echo "</tr><tr>\n";
# LAST NAME
- $this->add_entry ($lang['AdrLastName'],'l_name',$this->obj->l_name,$this->modadr,30,3);
+ $this->add_entry ($lang['AdrLastName'],'l_name',$this->obj->l_name,$this->modadr,$table['address']['l_name'][size],3);
echo "</tr><tr>\n";
# BIRTHDAY
@@ -150,7 +150,7 @@
*
*/
Function info() {
- global $lang;
+ global $lang,$table;
if ( isset($this->loc) ) {
echo "<form name=\"adrnew\" action=\"location_ins.php\" method=\"post\">\n";
@@ -213,11 +213,8 @@
function add_entry($text,$varname,$varvalue,$mod,$size,$width = 1) {
global $lang;
- if ($size > 30 ) {
- $showsize = 30;
- } else {
- $showsize = $size;
- }
+ $showsize = min($size,30);
+
if ( ($varname == 'f_name') ||
($varname == 'l_name') ||
($varname == 'lname') ||
@@ -268,7 +265,7 @@
$this->addHidden($varname,$varvalue);
}
} elseif ( $varname == "country" ) {
- SelectCntryCde($varname,$varvalue);
+ SelectCntryCde($varname,$varvalue);
} else {
if ( $mod == true ) {
echo "<input name=\"". $varname ."\" size=\"". $showsize ."\" maxlength=\"". $size ."\" value=\"". myentities($varvalue) ."\">";
@@ -325,7 +322,7 @@
echo "<P>\n";
if ( $this->obj->isUser() != 0 ) {
- $u = new tutos_user($this->dbconn);
+ $u = new tutos_user($this->dbconn);
$u->read($this->obj->id);
if ( $u->mod_ok() ) {
echo menulink("user_new.php?id=". $this->obj->id ,$lang['UserModify'],sprintf($lang['UserModInfo'],$this->obj->getFullName())) ."<BR>\n";
@@ -340,16 +337,16 @@
* prepare
*/
Function prepare() {
- global $msg,$lang,$HTTP_GET_VARS;
+ global $msg,$lang;
$this->name = $lang['Addresses'];
$this->obj = new tutos_address($this->dbconn);
- if ( isset($HTTP_GET_VARS['id']) ) {
- $id = $HTTP_GET_VARS['id'];
+ if ( isset($_GET['id']) ) {
+ $id = $_GET['id'];
}
- if ( isset($HTTP_GET_VARS['loc_id']) ) {
- $loc_id = $HTTP_GET_VARS['loc_id'];
+ if ( isset($_GET['loc_id']) ) {
+ $loc_id = $_GET['loc_id'];
}
@@ -381,33 +378,33 @@
if ( isset($this->loc->department) ) {
$this->loc->department_name = $this->loc->department->name;
}
- if ( isset($HTTP_GET_VARS['company']) ) {
- $this->loc->company_name = StripSlashes($HTTP_GET_VARS['company']);
+ if ( isset($_GET['company']) ) {
+ $this->loc->company_name = StripSlashes($_GET['company']);
}
- if ( isset($HTTP_GET_VARS['department']) ) {
- $this->loc->department_name = StripSlashes($HTTP_GET_VARS['department']);
+ if ( isset($_GET['department']) ) {
+ $this->loc->department_name = StripSlashes($_GET['department']);
}
- if ( isset($HTTP_GET_VARS['lname']) ) {
- $this->loc->lname = StripSlashes($HTTP_GET_VARS['lname']);
+ if ( isset($_GET['lname']) ) {
+ $this->loc->lname = StripSlashes($_GET['lname']);
}
- if ( isset($HTTP_GET_VARS['category']) ) {
- $this->loc->category = $HTTP_GET_VARS['category'];
+ if ( isset($_GET['category']) ) {
+ $this->loc->category = $_GET['category'];
}
- if ( isset($HTTP_GET_VARS['cploc']) ) {
- $this->loc->cploc = $HTTP_GET_VARS['cploc'];
+ if ( isset($_GET['cploc']) ) {
+ $this->loc->cploc = $_GET['cploc'];
} else {
$this->loc->cploc = 0;
}
- if ( isset($HTTP_GET_VARS['cl']) ) {
- $cl = $HTTP_GET_VARS['cl'];
+ if ( isset($_GET['cl']) ) {
+ $cl = $_GET['cl'];
foreach ($cl as $f) {
$c = new company($this->dbconn);
$c->read($f);
$this->loc->cl[$f] = $c;
}
}
- if ( isset($HTTP_GET_VARS['dl']) ) {
- $dl = $HTTP_GET_VARS['dl'];
+ if ( isset($_GET['dl']) ) {
+ $dl = $_GET['dl'];
foreach ($dl as $f) {
$d = new department($this->dbconn);
$d->read($f);
@@ -415,26 +412,26 @@
}
}
foreach($this->loc->larray as $i => $f) {
- if ( isset($HTTP_GET_VARS[$f]) ) {
- $this->loc->$f = StripSlashes($HTTP_GET_VARS[$f]);
+ if ( isset($_GET[$f]) ) {
+ $this->loc->$f = StripSlashes($_GET[$f]);
}
$i++;
}
} else {
- if ( isset($HTTP_GET_VARS['f_name']) ) {
- $this->obj->f_name = StripSlashes($HTTP_GET_VARS['f_name']);
+ if ( isset($_GET['f_name']) ) {
+ $this->obj->f_name = StripSlashes($_GET['f_name']);
}
- if ( isset($HTTP_GET_VARS['m_name']) ) {
- $this->obj->m_name = StripSlashes($HTTP_GET_VARS['m_name']);
+ if ( isset($_GET['m_name']) ) {
+ $this->obj->m_name = StripSlashes($_GET['m_name']);
}
- if ( isset($HTTP_GET_VARS['l_name']) ) {
- $this->obj->l_name = StripSlashes($HTTP_GET_VARS['l_name']);
+ if ( isset($_GET['l_name']) ) {
+ $this->obj->l_name = StripSlashes($_GET['l_name']);
}
- if ( isset($HTTP_GET_VARS['bd']) ) {
- $this->obj->birthday->setDateTime($HTTP_GET_VARS['bd']);
+ if ( isset($_GET['bd']) ) {
+ $this->obj->birthday->setDateTime($_GET['bd']);
}
- if ( isset($HTTP_GET_VARS['pic_path']) ) {
- $this->obj->pic_file->pic_path = StripSlashes($HTTP_GET_VARS['pic_path']);
+ if ( isset($_GET['pic_path']) ) {
+ $this->obj->pic_file->pic_path = StripSlashes($_GET['pic_path']);
} else {
$this->obj->pic_file->pic_path = "";
}
Index: admin_show.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/admin_show.php,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- admin_show.php 5 Nov 2002 19:57:45 -0000 1.45
+++ admin_show.php 30 Nov 2002 19:04:45 -0000 1.46
@@ -6,9 +6,9 @@
* @module admin_show
* @package BASE
*/
- include("webelements.p3");
- include("permission.p3");
- require 'db/table.pinc';
+ include 'webelements.p3';
+ include 'permission.p3';
+ require_once 'db/table.pinc';
/* Check if user is allowed to use it */
check_user();
@@ -79,41 +79,41 @@
$url['people'] = "user_overview.php";
getinfo();
- echo "<TABLE CLASS=single BORDER=0 CELLPADDING=3 CELLSPACING=0>\n";
- echo "<TR>\n";
- echo " <TH COLSPAN=6>". $lang['AdminDBInfo'] ." : ". $this->dbconn->db->alias ."</TH>\n";
- echo "</TR>\n";
- echo "<TR>\n";
+ echo "<table class=\"single\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\">\n";
+ echo "<tr>\n";
+ echo " <th colspan=\"6\">". $lang['AdminDBInfo'] ." : ". $this->dbconn->db->alias ."</th>\n";
+ echo "</tr>\n";
+ echo "<tr>\n";
echo $this->showfield($lang['AdminDBName']);
- echo " <TD COLSPAN=2>". $this->dbconn->db->getLink($this->dbconn->db->name) ."</TD>\n";
+ echo $this->showdata($this->dbconn->db->getLink($this->dbconn->db->name),2);
echo $this->showfield($lang['AdminDBUser']);
- echo " <TD COLSPAN=2>". $this->dbconn->db->user ."</TD>\n";
- echo "</TR>\n";
+ echo $this->showdata($this->dbconn->db->user,2);
+ echo "</tr>\n";
- echo "<TR>\n";
+ echo "<tr>\n";
if ( $this->dbconn->gettype() == "Oracle" ) {
echo $this->showfield($lang['AdminDBHome']);
- echo " <TD COLSPAN=5>". $this->dbconn->db->home ." </TD>\n";
+ echo $this->showdata($this->dbconn->db->home,5);
} else {
echo $this->showfield($lang['AdminDBHost']);
- echo " <TD COLSPAN=2>". $this->dbconn->db->host ."</TD>\n";
+ echo $this->showdata($this->dbconn->db->host,2);
if ( $this->dbconn->gettype() == "Postgres" ) {
echo $this->showfield($lang['AdminDBPort']);
- echo " <TD COLSPAN=2>". $this->dbconn->db->port ."</TD>\n";
+ echo $this->showdata($this->dbconn->db->port,2);
} else {
- echo " <TD COLSPAN=3> </TD>\n";
+ echo " <td colspan=\"3\"> </td>\n";
}
}
- echo "</TR>\n";
+ echo "</tr>\n";
- echo "<TR>\n";
- echo " <TH>". $lang['AdminDBTable'] ."</TH>\n";
- echo " <TH>". $lang['AdminDBCount'] ."</TH>\n";
- echo " <TH>". $lang['AdminDBTable'] ."</TH>\n";
- echo " <TH>". $lang['AdminDBCount'] ."</TH>\n";
- echo " <TH>". $lang['AdminDBTable'] ."</TH>\n";
- echo " <TH>". $lang['AdminDBCount'] ."</TH>\n";
- echo "</TR>\n";
+ echo "<tr>\n";
+ echo " <th>". $lang['AdminDBTable'] ."</th>\n";
+ echo " <th>". $lang['AdminDBCount'] ."</th>\n";
+ echo " <th>". $lang['AdminDBTable'] ."</th>\n";
+ echo " <th>". $lang['AdminDBCount'] ."</th>\n";
+ echo " <th>". $lang['AdminDBTable'] ."</th>\n";
+ echo " <th>". $lang['AdminDBCount'] ."</th>\n";
+ echo "</tr>\n";
@ksort($table);
@reset ($table);
$c = 0;
@@ -199,16 +199,16 @@
$adr->read($uid,1);
echo " <td colspan=\"1\">". $adr->getLink() ."</td>";
echo " <td align=\"right\">". makelink("user_new.php?uid=".$uid ,$result->get($a, "login")) ."</TD>";
- $ls = new DateTime($result->get($a, "last_seen"));
- echo " <TD COLSPAN=2>". $ls->getLinkDateTime() ."</TD>";
- echo " <TD> ". $result->get($a, "last_host") ."</TD>";
- echo " <TD ALIGN=center>". ($adr->disabled == 0 ? $lang['no']:$lang['yes']) ."</TD>";
+ $ls = $result->getDateTime($a, "last_seen");
+ echo " <td colspan=\"2\">". $ls->getLinkDateTime() ."</td>";
+ echo " <td> ". $result->get($a, "last_host") ."</td>";
+ echo " <td align=\"center\">". ($adr->disabled == 0 ? $lang['no']:$lang['yes']) ."</td>";
echo $this->OverviewRowEnd($line++);
unset($adr);
$a++;
}
$result->free();
- echo "</TABLE>\n";
+ echo "</table>\n";
}
/**
* navigation
@@ -216,10 +216,10 @@
Function navigate() {
global $lang;
- echo "<TR><TD>";
- echo menulink("acl_overview.php",$lang['ACLOverview'],$lang['ACLOverviewI']) ."<BR>\n";
- echo menulink("admin_sync.php",$lang['AdminDBSync'],$lang['AdminDBSync']) ."<BR>";
- echo "</TD></TR>";
+ echo "<tr><td>";
+ echo menulink("acl_overview.php",$lang['ACLOverview'],$lang['ACLOverviewI']) ."<br>\n";
+ echo menulink("admin_sync.php",$lang['AdminDBSync'],$lang['AdminDBSync']) ."<br>\n";
+ echo "</td></tr>";
}
/**
* preparation
Index: app_new.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/app_new.php,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- app_new.php 9 Nov 2002 19:51:57 -0000 1.44
+++ app_new.php 30 Nov 2002 19:04:45 -0000 1.45
@@ -46,28 +46,28 @@
echo $this->DataTableStart();
echo "<TR>\n";
- echo "<TH COLSPAN=6>";
+ echo "<th colspan=\"6\">";
if ( $this->obj->id > 0 ) {
echo $lang['ModOldAppoint'];
- echo "</TH>\n";
- echo "</TR><TR>\n";
- echo "<TD COLSPAN=5> <B>". $lang['AppCreatedBy'] ."</B> ". $this->obj->creator->getLink();
- echo " <B>". $lang['atDateTime'] ."</B> ". $this->obj->creation->getDateTime()."</TD>";
- echo "<TD ALIGN=right>" .acl_link($this->obj) ."</TD>\n";
- echo "</TR>\n";
+ echo "</th>\n";
+ echo "</tr><tr>\n";
+ echo "<td colspan=\"5\"> <b>". $lang['AppCreatedBy'] ."</b> ". $this->obj->creator->getLink();
+ echo " <b>". $lang['atDateTime'] ."</b> ". $this->obj->creation->getDateTime()."</td>";
+ echo "<td align=\"right\">" .acl_link($this->obj) ."</td>\n";
+ echo "</tr>\n";
} else {
echo $lang['CreateAppoint'];
- echo "</TH>\n";
+ echo "</th>\n";
}
$this->addHidden("creator",$this->obj->creator->id);
# START
- echo "<TR>";
+ echo "<tr>";
echo $this->showfieldc($lang['StartDate'],0,"start");
- echo "<TD COLSPAN=2>";
+ echo "<td colspan=\"2\">";
$this->obj->start->EnterDate("start");
- echo "</TD>";
- echo "<TD VALIGN=top> <B>";
+ echo "</td>";
+ echo "<td valign=\"top\"> <b>";
if ( !isset($_SERVER['HTTP_USER_AGENT']) || ereg("Lynx",$_SERVER['HTTP_USER_AGENT']) || ereg("w3m",$_SERVER['HTTP_USER_AGENT']) ) {
echo $lang['StartTime'];
} else {
@@ -78,35 +78,35 @@
echo $lang['StartTime'];
echo "</a>\n";
}
- echo "</B> <BR> <FONT SIZE=-1>(HH:MM)</FONT></TD>\n";
- echo "<TD COLSPAN=2>";
+ echo "</b> <br> <font size=\"-1\">(HH:MM)</font></td>\n";
+ echo "<td colspan=\"2\">";
$this->obj->start->EnterTime("start");
- echo "</TD>\n";
+ echo "</td>\n";
# END
- echo "</TR><TR>\n";
+ echo "</tr><tr>\n";
echo $this->showfieldc($lang['EndDate'],0,"end");
- echo "<TD COLSPAN=2>";
+ echo "<td colspan=\"2\">";
$this->obj->end->EnterDate("end");
- echo "</TD>\n";
- echo "<TD VALIGN=top> <B>";
+ echo "</td>\n";
+ echo "<td valign=\"top\"> <b>";
if ( !isset($_SERVER['HTTP_USER_AGENT']) || ereg("Lynx",$_SERVER['HTTP_USER_AGENT']) || ereg("w3m",$_SERVER['HTTP_USER_AGENT']) ) {
echo $lang['EndTime'];
} else {
- echo "<A HREF=\"JavaScript: var d = document.forms[0];
+ echo "<a href=\"JavaScript: var d = document.forms[0];
mywindow = window.open('', 'timer', 'width=120,height=420,top=100,left=450');
mywindow.location.href = '". $tutos['base'] ."/php/minitimer.php?f=end&". SID ."'; mywindow.focus();\"
onMouseOver=\"self.status='minitimer' ;return true\">";
echo $lang['EndTime'];
echo "</a>\n";
}
- echo "</B> <BR> <FONT SIZE=-1>(HH:MM)</FONT></TD>\n";
- echo "<TD COLSPAN=2>";
+ echo "</b> <br> <font size=\"-1\">(HH:MM)</font></td>\n";
+ echo "<td colspan=\"2\">";
$this->obj->end->EnterTime("end");
- echo "</TD>\n";
+ echo "</td>\n";
- echo "</TR><TR>\n";
+ echo "</tr><tr>\n";
# LOCATION
echo $this->showfieldc($lang['Location2'],0,"outside");
@@ -120,16 +120,16 @@
# Ignore times
echo " <td colspan=\"3\" valign=\"top\">\n";
- echo "<input type=\"checkbox\" name=\"t_ignore\" value=1 ". ($this->obj->t_ignore == 1 ? "CHECKED":"") .">\n";
+ echo "<input type=\"checkbox\" name=\"t_ignore\" value=1 ". ($this->obj->t_ignore == 1 ? "checked":"") .">\n";
echo $lang['IgnoreTime'] ."<br>\n";
- echo "<FONT SIZE=-1>". $lang['IgnoreTime2'] ."</FONT>";
- echo " </TD>\n";
+ echo "<font size=\"-1\">". $lang['IgnoreTime2'] ."</font>";
+ echo " </td>\n";
echo "</tr><tr>\n";
echo $this->showfield($lang['Description'],0,"descr");
echo " <td colspan=\"5\"><textarea wrap=\"virtual\" rows=\"3\" cols=\"40\" name=\"descr\">". $this->obj->descr ."</textarea>\n";
- echo " </TD>\n";
+ echo " </td>\n";
echo "</tr><tr>\n";
Index: appointment.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/appointment.pinc,v
retrieving revision 1.124
retrieving revision 1.125
diff -u -r1.124 -r1.125
--- appointment.pinc 27 Nov 2002 17:54:56 -0000 1.124
+++ appointment.pinc 30 Nov 2002 19:04:45 -0000 1.125
@@ -339,9 +339,8 @@
$this->mod_allow = $r->get($pos, "mod_allow");
$this->t_ignore = $r->get($pos, "t_ignore");
$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"));
+ $this->start = $r->getDateTime($pos, "a_start");
+ $this->end = $r->getDateTime($pos, "a_end");
$cid = $r->get($pos, "creator");
$this->creator = new tutos_address($this->dbconn);
@@ -635,13 +634,13 @@
* save the object to the database and sent mails if neccessary
*/
function save() {
- global $lang , $current_user, $tutos;
+ global $table,$lang , $current_user, $tutos;
$q = new query($this->dbconn);
$q->setTable($this->tablename);
$q->addFV("a_start",$this->start,"DATETIME");
$q->addFV("a_end",$this->end,"DATETIME");
- $q->addFV("description",$this->descr,"STRING",100);
+ $q->addFV("description",$this->descr,"STRING",$table['appointment1']['description'][size]);
$q->addFV("t_ignore",$this->t_ignore,"INT");
$q->addFV("outside",$this->outside,"INT");
$q->addFV("r_arg",$this->r_arg,"STRING",5);
Index: base.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/base.pinc,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- base.pinc 18 Nov 2002 05:55:01 -0000 1.34
+++ base.pinc 30 Nov 2002 19:04:45 -0000 1.35
@@ -107,7 +107,7 @@
global $g_hash;
$this->id = $r->get($pos, "id");
- $this->creation = new DateTime($r->get($pos, "creation"));
+ $this->creation = $r->getDateTime($pos, "creation");
acl_read($this);
$g_hash[$this->id] = &$this;
Index: bug.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/bug.pinc,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -r1.90 -r1.91
--- bug.pinc 29 Nov 2002 16:14:48 -0000 1.90
+++ bug.pinc 30 Nov 2002 19:04:45 -0000 1.91
@@ -163,7 +163,7 @@
$this->name = StripSlashes($r->get($pos, "name"));
$this->description = StripSlashes($r->get($pos, "description"));
$this->short = StripSlashes($r->get($pos, "short"));
- $this->parent = getObject($this->dbconn,$r->get($pos, "product_id"));
+ $this->parent = $r->getObject($pos, "product_id");
if ($this->name == "") {
$this->name = $this->getFullName();
@@ -183,7 +183,7 @@
}
$this->creator->read($r->get($pos, "creator"));
- $this->solvedate = new DateTime($r->get($pos, "solvedate"));
+ $this->solvedate = $r->getDateTime($pos, "solvedate");
# Check
if ( $this->solver->id == -1 ) {
@@ -829,7 +829,7 @@
$n1 = $r1->numrows();
$a1 = 0;
while ( ($a1 < $n1) && ($diff < 0) ) {
- $d1 = new DateTime($r1->get($a1, "r_time"));
+ $d1 = $r1->getDateTime($a1, "r_time");
$diff = $d1->getTimestamp() - $d->getTimeStamp() + ($tutos[bugremember] * 60);
$a1++;
}
Index: bug_new.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/bug_new.php,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- bug_new.php 29 Nov 2002 08:51:29 -0000 1.49
+++ bug_new.php 30 Nov 2002 19:04:45 -0000 1.50
@@ -27,7 +27,7 @@
Function info() {
global $lang,$tutos;
- echo "<form name=\"bugnew\" action=\"bug_ins.php\" method=\"POST\">\n";
+ echo "<form name=\"bugnew\" action=\"bug_ins.php\" method=\"post\">\n";
if ( $this->obj->id > 0 ) {
$this->addHidden("id",$this->obj->id);
} else {
@@ -41,7 +41,7 @@
echo $this->DataTableStart();
echo "<tr>\n";
- echo " <th colspan=\"4\">". sprintf($lang['Showing'],$lang[$this->obj->getType()])."</TH>\n";
+ echo " <th colspan=\"4\">". sprintf($lang['Showing'],$lang[$this->obj->getType()])."</th>\n";
echo "</tr>\n";
if ($this->obj->id > 0 ) {
@@ -185,33 +185,33 @@
* prepare
*/
Function prepare() {
- global $tutos,$lang,$HTTP_GET_VARS;
+ global $tutos,$lang;
$this->obj = new bug($this->dbconn);
$this->obj->newdesc = "";
- if ( isset($HTTP_GET_VARS['id']) ) {
- $this->obj->read($HTTP_GET_VARS['id']);
+ if ( isset($_GET['id']) ) {
+ $this->obj->read($_GET['id']);
$this->name = sprintf($lang['BugModifyI'],$this->obj->getFullName());
} else {
$this->name = $lang['BugCreate'];
}
- if ( isset($HTTP_GET_VARS['description']) ) {
- $this->obj->newdesc = StripSlashes($HTTP_GET_VARS['description']);
+ if ( isset($_GET['description']) ) {
+ $this->obj->newdesc = StripSlashes($_GET['description']);
}
- if ( isset($HTTP_GET_VARS['short']) ) {
- $this->obj->short = StripSlashes($HTTP_GET_VARS['short']);
+ if ( isset($_GET['short']) ) {
+ $this->obj->short = StripSlashes($_GET['short']);
}
- if ( isset($HTTP_GET_VARS['state']) ) {
- $this->obj->state = $HTTP_GET_VARS['state'];
+ if ( isset($_GET['state']) ) {
+ $this->obj->state = $_GET['state'];
}
- if ( isset($HTTP_GET_VARS['class']) ) {
- $this->obj->class = $HTTP_GET_VARS['class'];
+ if ( isset($_GET['class']) ) {
+ $this->obj->class = $_GET['class'];
}
- if ( isset($HTTP_GET_VARS['pid']) ) {
- $this->obj->parent = getObject($this->dbconn,$HTTP_GET_VARS['pid']);
+ if ( isset($_GET['pid']) ) {
+ $this->obj->parent = getObject($this->dbconn,$_GET['pid']);
}
# Get possible references
$this->obj->read_relations();
Index: calendar.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/calendar.php,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -r1.69 -r1.70
--- calendar.php 27 Nov 2002 17:54:56 -0000 1.69
+++ calendar.php 30 Nov 2002 19:04:45 -0000 1.70
@@ -247,7 +247,7 @@
echo $this->error ( sprintf($lang['Err0040'],$lang['Appointment']) );
$this->id = -1;
} else {
- $d = new DateTime($result->get(0, "a_start"));
+ $d = $result->getDateTime(0, "a_start");
$this->t = $d->getYYYYMMDD();
}
$result->free();
Index: config_default.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/config_default.pinc,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- config_default.pinc 27 Nov 2002 17:54:56 -0000 1.38
+++ config_default.pinc 30 Nov 2002 19:04:45 -0000 1.39
@@ -189,25 +189,14 @@
# reset lists
$tutos[ldapserver] = array();
$tutos[ldapport] = array();
-$tutos[ldapbasedn] = array();
#
$tutos[ldapserver][0] = $_SERVER["SERVER_NAME"];
$tutos[ldapport][0] = 389;
-$tutos[ldapbasedn][0] = "o=TUTOS";
#
# You may add your own ldap stuff
# by simply increasing the index [0] to other values
# AGAIN: do this in config.pinc not in config_default.pinc
-# (examples of public ldap servers below)
-#$tutos[ldapserver][1] = "ldap.bigfoot.com";
-#$tutos[ldapport][1] = 389;
-#$tutos[ldapbasedn][1] = "";
-#$tutos[ldapserver][2] = "directory.verisign.com";
-#$tutos[ldapport][2] = 389;
-#$tutos[ldapbasedn][2] = "";
-#$tutos[ldapserver][3] = "www.nldap.com";
-#$tutos[ldapport][3] = 389;
-#$tutos[ldapbasedn][3] = "";
+# (for examples of public ldap servers README.ldap)
#
#
# Support for X.509v3-Certs (this is alpha)
Index: database.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/database.pinc,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- database.pinc 27 Nov 2002 20:28:42 -0000 1.29
+++ database.pinc 30 Nov 2002 19:04:45 -0000 1.30
@@ -101,8 +101,8 @@
$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->lastanalyze = new DateTime($r->get($pos, "lastanalyze"));
+ $this->lastsync = $r->getDateTime($pos, "last_date");
+ $this->lastanalyze = $r->getDateTime($pos, "lastanalyze");
$this->lastid = $r->get($pos, "last_id");
$this->version = StripSlashes($r->get($pos, "version"));
$this->crypt = StripSlashes($r->get($pos, "cryptpw"));
@@ -110,8 +110,6 @@
$this->creator = new tutos_user($this->dbconn);
$this->creator->read($r->get($pos, "creator"));
- $this->id = $r->get($pos, "id");
- $this->creation = new DateTime($r->get($pos, "creation"));
$this->logo = @StripSlashes($r->get($pos, "logo"));
$this->logolink = @StripSlashes($r->get($pos, "logolink"));
@@ -119,8 +117,8 @@
$this->invautoname = @StripSlashes($r->get($pos, "invautoname"));
$this->vatlist = @StripSlashes($r->get($pos, "vatlist"));
- acl_read($this);
- $g_hash[$this->id] = &$this;
+ parent::read_result($r,$pos);
+ return;
}
/* ---------------------------------------------------------------------------
*/
Index: db.p3
===================================================================
RCS file: /cvsroot/tutos/tutos/php/db.p3,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -r1.102 -r1.103
--- db.p3 18 Nov 2002 05:55:01 -0000 1.102
+++ db.p3 30 Nov 2002 19:04:45 -0000 1.103
@@ -354,15 +354,65 @@
}
}
/**
- * Resultset base class
+ * Resultset base class (= template)
* @package DB
* @module result
*
*/
class result {
-
+ /**
+ * initialize
+ */
function result(&$dbconn) {
$this->dbconn = &$dbconn;
+ }
+ /**
+ * get a result entry
+ */
+ function get($pos,$fld) {
+ return "not implemented";
+ }
+ /**
+ * get a result entry as DateTime
+ */
+ function getDateTime($pos,$fld) {
+ return new DateTime($this->get($pos,$fld));
+ }
+ /**
+ * get a result entry as TUTOS object
+ */
+ function getObject($pos,$fld) {
+ return getObject($this->dbconn,$this->get($pos,$fld));
+ }
+ /**
+ * get the number of rows returned
+ */
+ function numrows() {
+ return "not implemented";
+ }
+ /**
+ * number of fields returned
+ */
+ function numfields() {
+ return "not implemented";
+ }
+ /**
+ * the DB name of a field
+ */
+ function fieldname($nr) {
+ return "not implemented";
+ }
+ /**
+ * the DB type of a field
+ */
+ function fieldtype($nr) {
+ return "not implemented";
+ }
+ /**
+ * free the result
+ */
+ function free() {
+ return "not implemented";
}
}
/**
Index: fax_ins.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/fax_ins.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- fax_ins.php 5 Nov 2002 19:57:47 -0000 1.15
+++ fax_ins.php 30 Nov 2002 19:04:45 -0000 1.16
@@ -2,9 +2,9 @@
/*
* Copyright 1999 - 2002 by Gero Kohnert
*/
- include("webelements.p3");
- include("permission.p3");
- include("note.pinc");
+ include_once 'webelements.p3';
+ include_once 'permission.p3';
+ include_once 'note.pinc';
/* Check if user is allowed to use it */
check_user();
@@ -14,27 +14,27 @@
$msg = "";
/* Check Input */
- if ( !isset($HTTP_POST_VARS['nr']) || empty($HTTP_POST_VARS['nr']) ) {
+ if ( !isset($_POST['nr']) || empty($_POST['nr']) ) {
$msg .= $lang['Err0031'] ."<BR>\n";
} else {
- $gotourl= addUrlParameter($gotourl,"nr=". UrlEncode($HTTP_POST_VARS['nr']));
+ $gotourl= addUrlParameter($gotourl,"nr=". UrlEncode($_POST['nr']));
}
- if ( isset($HTTP_POST_VARS['adr']) ) {
- $adr = UrlDecode($HTTP_POST_VARS['adr']);
+ if ( isset($_POST['adr']) ) {
+ $adr = UrlDecode($_POST['adr']);
}
- if ( isset($HTTP_POST_VARS['adrid']) ) {
- $gotourl= addUrlParameter($gotourl,"a=". $HTTP_POST_VARS['adrid']);
- $a = getObject($dbconn,$HTTP_POST_VARS['adrid']);
+ if ( isset($_POST['adrid']) ) {
+ $gotourl= addUrlParameter($gotourl,"a=". $_POST['adrid']);
+ $a = getObject($dbconn,$_POST['adrid']);
}
- if ( isset($HTTP_POST_VARS['locid']) ) {
- $gotourl= addUrlParameter($gotourl,"l=". $HTTP_POST_VARS['locid']);
+ if ( isset($_POST['locid']) ) {
+ $gotourl= addUrlParameter($gotourl,"l=". $_POST['locid']);
}
if ( ( ($tutos[faxmode] == 1) && !is_executable($tutos[faxspool]))
|| ($current_user->feature_ok(usefax,PERM_NEW) == 0)
|| ($tutos[demo] == 1) ) {
$msg .= $lang['Err0032'] ."<BR>\n";
}
- $gotourl= addUrlParameter($gotourl,"fax=". Base64_Encode($HTTP_POST_VARS['fax']));
+ $gotourl= addUrlParameter($gotourl,"fax=". Base64_Encode($_POST['fax']));
# Call faxspool
if ( $msg == "" ) {
@@ -67,13 +67,13 @@
$f = $hdr . $fax ."\n--\n";
$m->addBody($f);
$msg .= $m->send();
- $msg .= sprintf($lang['FaxSpooledTo'], $faxmail) ."<BR>\n";
+ $msg .= sprintf($lang['FaxSpooledTo'], $faxmail) ."<br>\n";
$gotourl = "fax_new.php";
} else {
$msg .= "Unknown faxmode ". $tutos[faxmode] ." please fix config.pinc<BR>";
}
- if ( isset($HTTP_POST_VARS['savenote']) ) {
- $x = getObject($dbconn,$HTTP_POST_VARS['savenote']);
+ if ( isset($_POST['savenote']) ) {
+ $x = getObject($dbconn,$_POST['savenote']);
$n = new note($dbconn);
$n->name = "FAX to ". $nr;
$n->note = $fax;
@@ -82,7 +82,7 @@
$dbconn->Begin("WORK");
$msg .= $n->save();
$dbconn->Commit("WORK");
- $msg .= "Fax was saved as a note for ". $x->getLink() ."<BR>";
+ $msg .= "Fax was saved as a note for ". $x->getLink() ."<br>";
$gotourl = $a->getURL();
}
} else {
Index: fax_new.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/fax_new.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- fax_new.php 5 Nov 2002 19:57:47 -0000 1.14
+++ fax_new.php 30 Nov 2002 19:04:46 -0000 1.15
@@ -19,47 +19,48 @@
Function info() {
global $lang,$tutos;
- echo "<br><br><center>\n";
-
echo "<form action=\"fax_ins.php\" method=\"post\">\n";
- DoubleTableStart();
+ echo $this->DataTableStart();
+ echo "<tr>\n";
+ echo " <th colspan=\"6\">". $this->name ."</th>\n";
+ echo "</tr>\n";
echo "<tr>\n";
- echo " <td class=\"desc\">". $lang['FaxTo'] ."</td>\n";
+ echo $this->showfieldc($lang['FaxTo'],0,"adr");
if ( $this->adr->id > 0 ) {
- echo " <TD COLSPAN=2>". $this->adr->getLink() ."</TD>\n";
+ echo " <td colspan=\"2\">". $this->adr->getLink() ."</td>\n";
$this->addHidden("adrid",$this->adr->id);
$this->addHidden("locid",$this->obj->id);
$this->addHidden("adr",UrlEncode($this->adr->getFullName()));
} else {
- echo " <TD COLSPAN=2><INPUT name=\"adr\"></TD>\n";
+ echo " <td colspan=\"2\"><input name=\"adr\"></td>\n";
}
- echo " <TD COLSPAN=1 CLASS=desc>". $lang['FaxNr'] ."</TD>\n";
- echo " <TD COLSPAN=2><INPUT name=\"nr\" value=\"". $this->nr ."\"></TD>\n";
- echo "</TR>\n";
+ echo $this->showfieldc($lang['FaxNr'],1,"nr");
+ echo " <td colspan=\"2\"><input name=\"nr\" value=\"". $this->nr ."\"></td>\n";
+ echo "</tr>\n";
- echo "<TR>\n";
- echo " <TD COLSPAN=6 ALIGN=center><TEXTAREA wrap=hard rows=20 cols=70 name=\"fax\">\n";
+ echo "<tr>\n";
+ echo " <td colspan=\"6\" align=\"center\"><textarea wrap=\"hard\" rows=\"20\" cols=\"70\" name=\"fax\">\n";
echo $this->text;
- echo "</TEXTAREA></TD>\n";
- echo "</TR>\n";
+ echo "</textarea></td>\n";
+ echo "</tr>\n";
if ( $this->adr->id > 0 ) {
if ( $this->user->feature_ok(usenotes,PERM_NEW) ) {
- echo "<TR>\n";
- echo " <TD COLSPAN=4 CLASS=desc> ". sprintf($lang['FaxNote'],$this->adr->getFullName()) ."</TD>\n";
- echo " <TD COLSPAN=2><INPUT type=\"checkbox\" name=\"savenote\" value=". $this->adr->id ."></TD>\n";
- echo "</TR>\n";
+ echo "<tr>\n";
+ echo " <td colspan=\"4\" class=\"desc\"> ". sprintf($lang['FaxNote'],$this->adr->getFullName()) ."</td>\n";
+ echo " <td colspan=\"2\"><input type=\"checkbox\" name=\"savenote\" value=". $this->adr->id ."></td>\n";
+ echo "</tr>\n";
}
}
- echo "<TR>\n";
+ echo "<tr>\n";
submit_reset(0,-1,2,1,2,0);
- echo "</TR>\n";
+ echo "</tr>\n";
- DoubleTableEnd();
+ echo $this->DataTableEnd();
hiddenFormElements();
echo $this->getHidden();
- echo "</FORM></CENTER>\n";
+ echo "</form>\n";
}
/**
* navigate
@@ -70,18 +71,18 @@
* prepare
*/
Function prepare() {
- global $msg,$HTTP_GET_VARS,$lang;
+ global $msg,$lang;
$this->name = $lang['FaxCreate'];
$this->obj = new location($this->dbconn);
- if ( isset($HTTP_GET_VARS['a']) ) {
- $this->adr = getObject($this->dbconn,$HTTP_GET_VARS['a']);
+ if ( isset($_GET['a']) ) {
+ $this->adr = getObject($this->dbconn,$_GET['a']);
}
- if ( isset($HTTP_GET_VARS['l']) ) {
- $this->obj->read($HTTP_GET_VARS['l']);
+ if ( isset($_GET['l']) ) {
+ $this->obj->read($_GET['l']);
}
- if ( isset($HTTP_GET_VARS['fax']) ) {
- $this->text = Base64_Decode($HTTP_GET_VARS['fax']);
+ if ( isset($_GET['fax']) ) {
+ $this->text = Base64_Decode($_GET['fax']);
} else {
$t = new DateTime();
$this->text = $t->getDateTime();
@@ -91,7 +92,7 @@
$this->text .= "\n";
$this->text .= $this->user->getFullName();
}
- $this->nr = eregi_replace("^\+\+","00",$HTTP_GET_VARS['nr']);
+ $this->nr = eregi_replace("^\+\+","00",$_GET['nr']);
$this->nr = eregi_replace("^\+","00",$this->nr);
$this->nr = eregi_replace("\(","",$this->nr);
$this->nr = eregi_replace("\)","",$this->nr);
Index: file.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/file.pinc,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -r1.84 -r1.85
--- file.pinc 23 Nov 2002 14:09:15 -0000 1.84
+++ file.pinc 30 Nov 2002 19:04:46 -0000 1.85
@@ -454,18 +454,18 @@
* Copy file to repository
*/
function save() {
- global $current_user, $tutos, $php_errormsg;
+ global $table,$current_user, $tutos, $php_errormsg;
$msg = "";
if ( !is_dir($this->base)) {
$x = @mkdir($this->base ,0755);
if ( $x == FALSE ) {
- $msg .= "<BR>Could not create ". $this->base . " ". $php_errormsg;
+ $msg .= "<br>Could not create ". $this->base . " ". $php_errormsg;
}
}
if ( $msg != "" ) {
$this->id = -1;
- $msg .= "<BR>FILE NOT SAVED";
+ $msg .= "<br>FILE NOT SAVED";
return $msg;
}
if ( $this->link_id == -1 ) {
@@ -511,15 +511,15 @@
return $msg;
}
- $q->addFV("name",$this->name,"STRING",200);
- $q->addFV("filename",$this->filename,"STRING",200);
- $q->addFV("loc",$this->fileloc,"STRING",200);
+ $q->addFV("name",$this->name,"STRING",$table['file']['name'][size]);
+ $q->addFV("filename",$this->filename,"STRING",$table['file']['filename'][size]);
+ $q->addFV("loc",$this->fileloc,"STRING",$table['file']['loc'][size]);
$q->addFV("logtxt",$this->logtxt,"TEXT");
- $q->addFV("version",$this->version,"STRING",10);
+ $q->addFV("version",$this->version,"STRING",$table['file']['version'][size]);
$q->addFV("link_id",$this->link_id,"");
$q->addFV("author",$this->author ,"OBJ");
$q->addFV("f_size",$this->filesize ,"");
- $q->addFV("type",$this->filetype ,"STRING",40);
+ $q->addFV("type",$this->filetype ,"STRING",$table['file']['type'][size]);
$q->addFV("locked",$this->locked ,"");
if ( $newfile == 1 ) {
Index: file_new.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/file_new.php,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- file_new.php 10 Nov 2002 11:45:56 -0000 1.37
+++ file_new.php 30 Nov 2002 19:04:46 -0000 1.38
@@ -25,7 +25,7 @@
* display the form
*/
Function info() {
- global $tutos,$lang;
+ global $tutos,$lang,$table;
echo "<form name=\"fileadd\" enctype=\"multipart/form-data\" method=\"post\" action=\"file_ins.php\">\n";
@@ -45,9 +45,9 @@
}
echo "<tr>\n";
echo $this->showfieldc($lang['FileNameDoc'],1,"name");
- echo " <td><input maxlength=\"200\" name=\"name\" value=\"". $this->obj->name ."\"></td>\n";
+ echo " <td><input maxlength=\"".$table['file']['name'][size]."\" name=\"name\" value=\"". $this->obj->name ."\"></td>\n";
echo $this->showfieldc($lang['FileVersion'],0,"version");
- echo " <td><input size=\"10\" maxlength=\"10\" name=\"version\" value=\"". $this->obj->version ."\"></td>\n";
+ echo " <td><input size=\"10\" maxlength=\"".$table['file']['version'][size]."\" name=\"version\" value=\"". $this->obj->version ."\"></td>\n";
echo "</tr>\n";
echo "<tr>\n";
Index: file_overview.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/file_overview.php,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- file_overview.php 10 Nov 2002 11:45:56 -0000 1.34
+++ file_overview.php 30 Nov 2002 19:04:46 -0000 1.35
@@ -112,7 +112,7 @@
* prepare
*/
Function prepare() {
- global $msg,$lang,$HTTP_GET_VARS;
+ global $msg,$lang;
$this->name = $lang['FileOverview'];
$this->link1 = "file_overview.php";
@@ -120,44 +120,44 @@
$this->q = "SELECT * FROM ". $this->dbconn->prefix ."files";
$pre = " WHERE " ;
- if ( isset($HTTP_GET_VARS['link_id']) ) {
- $this->q .= $pre . " link_id = ". $HTTP_GET_VARS['link_id'];
+ if ( isset($_GET['link_id']) ) {
+ $this->q .= $pre . " link_id = ". $_GET['link_id'];
$pre = " AND " ;
- $this->link1 = addUrlParameter($this->link1,"link_id=". $HTTP_GET_VARS['link_id']);
+ $this->link1 = addUrlParameter($this->link1,"link_id=". $_GET['link_id']);
}
- if ( isset($HTTP_GET_VARS['author']) ) {
- $this->q .= $pre . " author = ". $HTTP_GET_VARS['author'];
+ if ( isset($_GET['author']) ) {
+ $this->q .= $pre . " author = ". $_GET['author'];
$pre = " AND " ;
- $this->link1 = addUrlParameter($this->link1,"author=". $HTTP_GET_VARS['author']);
+ $this->link1 = addUrlParameter($this->link1,"author=". $_GET['author']);
}
- if ( isset($HTTP_GET_VARS['creator']) ) {
- $this->q .= $pre . " creator = ". $HTTP_GET_VARS['creator'];
+ if ( isset($_GET['creator']) ) {
+ $this->q .= $pre . " creator = ". $_GET['creator'];
$pre = " AND " ;
- $this->link1 = addUrlParameter($this->link1,"creator=". $HTTP_GET_VARS['creator']);
+ $this->link1 = addUrlParameter($this->link1,"creator=". $_GET['creator']);
}
- if ( isset($HTTP_GET_VARS['type']) ) {
- $this->q .= $pre . $this->dbconn->Like("type",$HTTP_GET_VARS['type']);
+ if ( isset($_GET['type']) ) {
+ $this->q .= $pre . $this->dbconn->Like("type",$_GET['type']);
$pre = " AND " ;
- $this->link1 = addUrlParameter($this->link1,"type=". UrlEncode($HTTP_GET_VARS['type']));
+ $this->link1 = addUrlParameter($this->link1,"type=". UrlEncode($_GET['type']));
}
- if ( isset($HTTP_GET_VARS['name']) && ($HTTP_GET_VARS['name'] != "") ) {
+ if ( isset($_GET['name']) && ($_GET['name'] != "") ) {
$this->q .= $pre . "(";
- $this->q .= $this->dbconn->Like("name",$HTTP_GET_VARS['name']);
- $this->q .= " OR ". $this->dbconn->Like("filename",$HTTP_GET_VARS['name']);
- $this->q .= " OR ". $this->dbconn->Like("version",$HTTP_GET_VARS['name']);
+ $this->q .= $this->dbconn->Like("name",$_GET['name']);
+ $this->q .= " OR ". $this->dbconn->Like("filename",$_GET['name']);
+ $this->q .= " OR ". $this->dbconn->Like("version",$_GET['name']);
# $this->q .= " OR ". $this->dbconn->Like("logtxt",$name);
$this->q .= ")";
$pre = " AND " ;
- $this->link1 = addUrlParameter($this->link1,"name=". UrlEncode($HTTP_GET_VARS['name']));
- $this->filter['name'] = $HTTP_GET_VARS['name'];
+ $this->link1 = addUrlParameter($this->link1,"name=". UrlEncode($_GET['name']));
+ $this->filter['name'] = $_GET['name'];
} else {
$this->filter['name'] = "";
}
# Start Date for search
$from = new DateTime(0);
- if ( isset($HTTP_GET_VARS['fd']) ) {
- $from->setDateTime($HTTP_GET_VARS['fd']);
+ if ( isset($_GET['fd']) ) {
+ $from->setDateTime($_GET['fd']);
} else {
$from->setDateTimeF("f");
# remember this
@@ -172,8 +172,8 @@
}
# End Date for search
$to = new DateTime(0);
- if ( isset($HTTP_GET_VARS['td']) ) {
- $to->setDateTime($HTTP_GET_VARS['td']);
+ if ( isset($_GET['td']) ) {
+ $to->setDateTime($_GET['td']);
} else {
$to->setDateTimeF("t");
# remember this
Index: file_show.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/file_show.php,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- file_show.php 10 Nov 2002 13:24:46 -0000 1.42
+++ file_show.php 30 Nov 2002 19:04:46 -0000 1.43
@@ -91,69 +91,69 @@
}
echo $this->DataTableStart();
- echo "<TR><TH COLSPAN=4>". $lang['FileDetail'] ."</TH></TR>\n";
+ echo "<tr><th colspan=\"4\">". $lang['FileDetail'] ."</th></tr>\n";
- echo "<TR>\n";
+ echo "<tr>\n";
echo $this->showfield($lang['FileNameDoc']);
echo $this->showdata($this->obj->name,1);
echo $this->showfield($lang['FileVersion']);
echo $this->showdata($this->obj->version,1);
- echo "</TR>\n";
+ echo "</tr>\n";
- echo "<TR>\n";
+ echo "<tr>\n";
echo $this->showfield($lang['FileName']);
echo $this->showdata($this->obj->filename,3);
- echo "</TR>\n";
+ echo "</tr>\n";
- echo "<TR>\n";
+ echo "<tr>\n";
echo $this->showfield($lang['created']);
echo $this->showdata($this->obj->creation->getDateTime(),4);
- echo "</TR>\n";
+ echo "</tr>\n";
- echo "<TR>\n";
+ echo "<tr>\n";
echo $this->showfield($lang['FileAuthor']);
echo $this->showdata($this->obj->author->getLink(),3);
- echo "</TR>\n";
+ echo "</tr>\n";
- echo "<TR>\n";
+ echo "<tr>\n";
echo $this->showfield($lang['FileReference']);
if ($this->obj->ref != -1 ) {
echo $this->showdata($lang[$this->obj->ref->gettype()] ." ". $this->obj->getRefLink(),3);
} else {
echo $this->showdata($lang['HistoryDeleted'] ." (". $this->obj->link_id .")",3);
}
- echo "</TR>\n";
+ echo "</tr>\n";
- echo "<TR>\n";
+ echo "<tr>\n";
echo $this->showfield($lang['FileSize']);
echo $this->showdata($this->obj->filesize ." Bytes",3);
- echo "</TR>\n";
+ echo "</tr>\n";
- echo "<TR>\n";
+ echo "<tr>\n";
echo $this->showfield($lang['FileType']);
echo $this->showdata($this->obj->filetype,3);
- echo "</TR>\n";
+ echo "</tr>\n";
if ( $this->obj->locked > 0 ) {
- echo "<TR>\n";
+ echo "<tr>\n";
echo $this->showfield($lang['FileLockedBy']);
echo $this->showdata($this->obj->locker->getMailLink(),3);
- echo "</TR>\n";
+ echo "</tr>\n";
}
- echo "<TR>\n";
+ echo "<tr>\n";
echo $this->showfield($lang['FileMore']);
- echo " <TD COLSPAN=3 CLASS=pre><FONT SIZE=-1><PRE>\n";
+ echo " <td colspan=\"3\" class=\"pre\"><font size=\"-1\"><pre>\n";
$this->obj->moreinfo();
- echo " </PRE></FONT></TD>\n";
- echo "</TR>\n";
+ echo " </pre></font></td>\n";
+ echo "</tr>\n";
$this->obj->make_vlist();
@reset($this->obj->vlist);
if (count($this->obj->vlist) > 0 ) {
- echo "<TR>\n";
+ echo "<tr>\n";
echo $this->showfield($lang['FileOldVersion']);
- echo " <TD COLSPAN=3><FONT SIZE=-1>\n";
+ echo " <td colspan=\"3\"><font size=\"-1\">\n";
while ( list ($i,$v) = @each ($this->obj->vlist) ) {
if ( ($this->obj->id > 0) && $this->obj->mod_ok() ) {
echo makelink("file_show.php?id=". $this->obj->id ."&format=download&version=".$v, $lang['FileDownload'] ." ". $lang['FileVersion'] ." ". $i , $v);
@@ -162,15 +162,15 @@
}
echo "<BR>\n";
}
- echo "</FONT></TD>\n";
- echo "</TR>\n";
+ echo "</font></td>\n";
+ echo "</tr>\n";
}
- echo "<TR>\n";
+ echo "<tr>\n";
echo $this->showfield($lang['FileLog']);
- echo " <TD COLSPAN=3 CLASS=pre><FONT SIZE=-1><PRE>\n";
+ echo " <td colspan=\"3\" class=\"pre\"><font size=\"-1\"><pre>\n";
echo $this->obj->logtxt;
- echo " </PRE></FONT></TD>\n";
- echo "</TR>\n";
+ echo " </pre></font></td>\n";
+ echo "</tr>\n";
# References to modules
show_module_infolists($this->user,$this->obj,4,$this->format);
Index: location.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/location.pinc,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- location.pinc 5 Nov 2002 19:57:47 -0000 1.34
+++ location.pinc 30 Nov 2002 19:04:46 -0000 1.35
@@ -220,7 +220,7 @@
* save to DB
*/
function save () {
- global $current_user, $tutos;
+ global $current_user, $tutos,$table;
$msg = "";
@@ -232,7 +232,7 @@
$i=0;
while($i < count($this->larray)) {
$f = $this->larray[$i];
- $q1->addFV($f,$this->$f,"STRING");
+ $q1->addFV($f,$this->$f,"STRING",$table['location'][$f][size]);
$i++;
}
if ( is_object($this->company) ) {
Index: mail_new.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/mail_new.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- mail_new.php 5 Nov 2002 19:57:47 -0000 1.14
+++ mail_new.php 30 Nov 2002 19:04:46 -0000 1.15
@@ -11,9 +11,9 @@
* @module mail_new
* @package mail
*/
- include("webelements.p3");
- include("permission.p3");
- include("mailbox.pinc");
+ include_once 'webelements.p3';
+ include_once 'permission.p3';
+ include_once 'mailbox.pinc';
/* Check if user is allowed to use it */
check_user();
@@ -30,61 +30,60 @@
Function info() {
global $tutos,$lang;
- echo "<form name=\"mailnew\" action=\"mail_ins.php\" method=\"POST\">\n";
+ echo "<form name=\"mailnew\" action=\"mail_ins.php\" method=\"post\">\n";
$this->addHidden("gotourl","mail_new.php");
echo $this->DataTableStart();
-
echo "<tr>\n";
echo " <th colspan=\"4\">". $lang['MailboxEmail'] ."</td>\n";
echo "</tr>\n";
- echo "<TR>\n";
- echo $this->showfieldc($lang['MailFrom'],0);
- echo " <TD COLSPAN=3>\n";
+ echo "<tr>\n";
+ echo $this->showfieldc($lang['MailFrom'],0,"from");
+ echo " <td colspan=\"3\">\n";
$d = $this->obj->from->default_email();
- echo "<SELECT NAME=\"from\">";
+ echo " <select name=\"from\">\n";
if ( isset($this->obj->from->location) ) {
@reset($this->obj->from->location);
while( list ($i,$f) = @each ($this->obj->from->location)) {
if ( $f->email_1 != "") {
- echo "<OPTION VALUE=\"1,". $f->id ."\" ". ($d == $f->email_1 ? "SELECTED" : "") .">". $f->email_1 ."</OPTION>";
+ echo " <option value=\"1,". $f->id ."\"". ($d == $f->email_1 ? " selected" : "") .">". $f->email_1 ."</option>\n";
}
if ( $f->email_2 != "") {
- echo "<OPTION VALUE=\"2,". $f->id ."\" ". ($d == $f->email_2 ? "SELECTED" : "") .">". $f->email_2 ."</OPTION>";
+ echo " <option value=\"2,". $f->id ."\"". ($d == $f->email_2 ? " selected" : "") .">". $f->email_2 ."</option>\n";
}
}
}
- echo "</SELECT>";
- echo " </TD>\n";
- echo "</TR>\n";
-
- echo "<TR>\n";
- echo $this->showfieldc($lang['MailTo'],1);
- echo " <TD COLSPAN=3>\n";
- echo " <INPUT size=40 maxlength=60 name=to value=\"". $this->obj->getToAscii() ."\">\n";
- echo " </TD>\n";
- echo "</TR>\n";
-
- echo "<TR>\n";
- echo $this->showfieldc($lang['MailCc'],0);
- echo " <TD COLSPAN=3>\n";
- echo " <INPUT size=40 maxlength=60 name=cc value=\"". $this->obj->getCcAscii() ."\">\n";
- echo " </TD>\n";
- echo "</TR>\n";
-
- echo "<TR>\n";
- echo $this->showfieldc($lang['MailSubject'],0);
- echo " <TD COLSPAN=3>\n";
- echo " <INPUT size=40 maxlength=60 name=subject value=\"". $this->obj->subject ."\">\n";
- echo " </TD>\n";
- echo "</TR>\n";
-
- echo "<TR>\n";
- echo " <TD COLSPAN=4>\n";
- echo " <TEXTAREA wrap=hard rows=20 cols=60 name=body>". $this->obj->body[0] ."</TEXTAREA>\n";
- echo " </TD>\n";
- echo "</TR>\n";
+ echo " </select>\n";
+ echo " </td>\n";
+ echo "</tr>\n";
+
+ echo "<tr>\n";
+ echo $this->showfieldc($lang['MailTo'],1,"to");
+ echo " <td colspan=\"3\">\n";
+ echo " <input size=\"40\" maxlength=\"60\" name=\"to\" value=\"". $this->obj->getToAscii() ."\">\n";
+ echo " </td>\n";
+ echo "</tr>\n";
+
+ echo "<tr>\n";
+ echo $this->showfieldc($lang['MailCc'],0,"cc");
+ echo " <td colspan=\"3\">\n";
+ echo " <input size=\"40\" maxlength=\"60\" name=\"cc\" value=\"". $this->obj->getCcAscii() ."\">\n";
+ echo " </td>\n";
+ echo "</tr>\n";
+
+ echo "<tr>\n";
+ echo $this->showfieldc($lang['MailSubject'],0,"subject");
+ echo " <td colspan=\"3\">\n";
+ echo " <input size=\"40\" maxlength=\"60\" name=\"subject\" value=\"". $this->obj->subject ."\">\n";
+ echo " </td>\n";
+ echo "</tr>\n";
+
+ echo "<tr>\n";
+ echo " <td colspan=\"4\">\n";
+ echo " <textarea wrap=\"hard\" rows=\"20\" cols=\"60\" name=\"body\">". $this->obj->body[0] ."</textarea>\n";
+ echo " </td>\n";
+ echo "</tr>\n";
submit_reset(0,1,1,1,1,0);
echo $this->DataTableEnd();
Index: module_base.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/module_base.pinc,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- module_base.pinc 24 Nov 2002 16:34:53 -0000 1.23
+++ module_base.pinc 30 Nov 2002 19:04:46 -0000 1.24
@@ -16,10 +16,14 @@
* load modules that want to work here
*/
Function loadmodule($key) {
- global $tutos,$lang,$current_user;
+ global $tutos,$lang,$current_user,$table,$tableidx,$sequence;
include_once $tutos['base'] ."/". $tutos[modules][$key][file];
ReadLang1($lang,dirname($tutos['base'] ."/". $tutos[modules][$key][file]),$current_user);
+
+ if (file_exists(dirname($tutos['base'] ."/". $tutos[modules][$key][file]) ."/mtable.pinc") ) {
+ @include_once dirname($tutos['base'] ."/". $tutos[modules][$key][file]) ."/mtable.pinc";
+ }
}
/**
* load modules that want to work here
Index: product.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/product.pinc,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -r1.103 -r1.104
--- product.pinc 24 Nov 2002 19:19:06 -0000 1.103
+++ product.pinc 30 Nov 2002 19:04:46 -0000 1.104
@@ -132,8 +132,8 @@
$this->state = $r->get($pos, "state");
$this->creator = new tutos_address($this->dbconn);
$this->creator->read($r->get($pos, "creator"));
- $this->p_start = new DateTime($r->get($pos, "p_start"));
- $this->p_end = new DateTime($r->get($pos, "p_end"));
+ $this->p_start = $r->getDateTime($pos, "p_start");
+ $this->p_end = $r->getDateTime($pos, "p_end");
parent::read_result($r,$pos);
#
Index: scheme.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/scheme.php,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- scheme.php 12 Nov 2002 20:22:29 -0000 1.38
+++ scheme.php 30 Nov 2002 19:04:46 -0000 1.39
@@ -541,7 +541,6 @@
@reset($tutos[modules]);
while ( list ($r,$x) = @each ($tutos[modules])) {
loadmodule($r);
- @include(dirname($tutos['base'] ."/". $tutos[modules][$r][file]) ."/mtable.pinc");
}
if ( isset($_GET['step']) && ($tutos[demo] == 0) ) {
$this->step = $_GET['step'];
Index: task.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/task.pinc,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -r1.95 -r1.96
--- task.pinc 17 Nov 2002 13:36:54 -0000 1.95
+++ task.pinc 30 Nov 2002 19:04:46 -0000 1.96
@@ -113,10 +113,10 @@
$this->name = StripSlashes($r->get($pos, "name"));
$this->desc = StripSlashes($r->get($pos, "description"));
- $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"));
+ $this->r_start = $r->getDateTime($pos, "r_start");
+ $this->r_end = $r->getDateTime($pos, "r_end");
+ $this->s_start = $r->getDateTime($pos, "s_start");
+ $this->s_end = $r->getDateTime($pos, "s_end");
parent::read_result($r,$pos);
Index: task_new.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/task_new.php,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- task_new.php 29 Nov 2002 08:51:30 -0000 1.42
+++ task_new.php 30 Nov 2002 19:04:46 -0000 1.43
@@ -25,8 +25,7 @@
*
*/
Function info() {
- global $tutos,$lang;
- global $current_user;
+ global $lang,$table;
echo "<form name=\"taskadd\" action=\"task_ins.php\" method=\"POST\">\n";
@@ -47,7 +46,7 @@
}
echo " <tr>\n";
echo $this->showfieldc($lang['TaskName'],1,"name");
- echo " <td><input size=\"40\" maxlength=\"40\" name=\"name\" value=\"". $this->obj->name ."\"></td>\n";
+ echo " <td><input size=\"". min($table['task']['name'][size],40) ."\" maxlength=\"". $table['task']['name'][size] ."\" name=\"name\" value=\"". $this->obj->name ."\"></td>\n";
echo $this->showfieldc($lang['TaskState'],0,"state");
echo " <td>\n";
echo " <select name=\"state\">\n";
@@ -91,7 +90,7 @@
echo " <tr>\n";
echo $this->showfieldc($lang['TaskVolumeDone'],0,"volume_done");
- if (array_key_exists((int)$current_user->id, $this->obj->worker)) {
+ if (array_key_exists((int)$this->user->id, $this->obj->worker)) {
echo " <td><input size=\"5\" name=\"volume_done\" value=\"". $this->obj->volume_done ."\"> ". $lang['hours'] ."</td>\n";
echo " </tr>\n";
}
@@ -142,7 +141,7 @@
* prepare
*/
Function prepare() {
- global $msg,$lang,$tutos;
+ global $msg,$lang;
$this->obj = new task($this->dbconn);
if ( isset($_GET['id']) ) {
Index: task_show.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/task_show.php,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- task_show.php 16 Nov 2002 12:05:03 -0000 1.50
+++ task_show.php 30 Nov 2002 19:04:46 -0000 1.51
@@ -103,20 +103,20 @@
$this->obj->readTasks();
if ( count($this->obj->tasklist) > 0 ) {
@reset($this->obj->tasklist);
- echo "<TR>\n";
+ echo "<tr>\n";
echo $this->showfield($lang['Tasks']);
- echo " <TD VALIGN=top COLSPAN=3>\n";
+ echo " <td valign=\"top\" colspan=\"3\">\n";
echo makelink("task_overview.php?id=". $this->obj->id,$lang['TaskOverview'],sprintf($lang['TaskOverviewInfo'],$this->obj->getFullName()));
- echo "<BR>\n";
+ echo "<br>\n";
$n = 0;
while ( list ($i,$f) = @each ($this->obj->tasklist) ) {
if ( $n > 2 ) {
}
- echo " ". $f->getLink() ."<BR>\n";
+ echo " ". $f->getLink() ."<br>\n";
$n++;
}
- echo " </TD>\n";
- echo "</TR>\n";
+ echo " </td>\n";
+ echo "</tr>\n";
}
if ( $this->user->feature_ok(usetimetrack,PERM_SEE) ) {
$timesum = 0.0;
@@ -206,8 +206,8 @@
echo " <tr>\n";
echo " <td colspan=\"2\">0 - 100 </td>\n";
echo " <td align=\"center\" colspan=\"". ($w - 5 * $s) ."\"><font color=\"red\">> 100</font></td>\n";
- echo " </TR>\n";
- echo " <TR>\n";
+ echo " </tr>\n";
+ echo " <tr>\n";
# Work done in time/volume
if ( Round($m2 * $p) > 0 ) {
echo " <td \" class=\"taskdone\"><img height=\"20\" width=\"". Round($m2 * $p)."\" src=\"". $tutos['base'] ."/html/green.png\" alt=\"--------\"></td>\n";
@@ -233,13 +233,13 @@
* prepare
*/
Function prepare() {
- global $msg,$lang,$HTTP_GET_VARS;
+ global $msg,$lang;
$this->name = $lang['TaskDetail'];
$this->obj = new task($this->dbconn);
- if ( isset($HTTP_GET_VARS['id']) ) {
- $this->obj->read($HTTP_GET_VARS['id']);
+ if ( isset($_GET['id']) ) {
+ $this->obj->read($_GET['id']);
}
if ( ! $this->obj->see_ok() ) {
Index: team.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/team.pinc,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -r1.62 -r1.63
--- team.pinc 5 Nov 2002 19:57:48 -0000 1.62
+++ team.pinc 30 Nov 2002 19:04:46 -0000 1.63
@@ -81,18 +81,19 @@
/**
* Read all a result
*/
- function read_result(&$r,$a) {
+ function read_result(&$r,$pos) {
global $g_hash;
- $this->id = $r->get($a, "id");
- $this->name = StripSlashes($r->get($a, "name"));
- $this->email = StripSlashes($r->get($a, "email"));
- $cid = $r->get($a, "owner");
+ $this->name = StripSlashes($r->get($pos, "name"));
+ $this->email = StripSlashes($r->get($pos, "email"));
+ $cid = $r->get($pos, "owner");
$this->owner = new tutos_address($this->dbconn);
$this->owner->read($cid);
$this->ids[$cid] = 1;
- $this->creation = new DateTime($r->get($a, "creation"));
- $this->creator->read($r->get($a, "creator"));
+ $this->creator->read($r->get($pos, "creator"));
+
+ parent::read_result($r,$pos);
+
# Teammember IDS
$q = "SELECT adr_id FROM ". $this->tablename2 ." WHERE team_id =". $this->id;
$r2 = $this->dbconn->Exec($q);
@@ -103,8 +104,8 @@
$a++;
}
$r2->free();
- acl_read($this);
- $g_hash[$this->id] = &$this;
+
+ return;
}
/**
* create address object for all teammembers
@@ -246,14 +247,14 @@
* del = array of userids to delete from the team
*/
function save($add,$del) {
- global $tutos,$current_user;
+ global $tutos,$current_user,$table;
$msg = "";
$q = new query($this->dbconn);
$q->setTable($this->tablename);
- $q->addFV("name",$this->name,"STRING",30);
+ $q->addFV("name",$this->name,"STRING",$table['team']['name'][size]);
$q->addFV("owner",$this->owner,"OBJ");
- $q->addFV("email",$this->email,"STRING",60);
+ $q->addFV("email",$this->email,"STRING",$table['team']['email'][size]);
$q->addFV("creator",$this->creator,"OBJ");
if ( $this->id < 0 ) {
Index: timetrack_overview.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/timetrack_overview.php,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- timetrack_overview.php 10 Nov 2002 11:45:56 -0000 1.58
+++ timetrack_overview.php 30 Nov 2002 19:04:46 -0000 1.59
@@ -327,12 +327,12 @@
* action
*/
Function action() {
- global $msg,$HTTP_GET_VARS,$tutos,$lang;
+ global $msg,$tutos,$lang;
- @reset($HTTP_GET_VARS['mark']);
- if ( $HTTP_GET_VARS['action'] == -2 ) {
+ @reset($_GET['mark']);
+ if ( $_GET['action'] == -2 ) {
$this->dbconn->Begin("WORK");
- while (list ($key,$val) = @each ($HTTP_GET_VARS['mark'])) {
+ while (list ($key,$val) = @each ($_GET['mark'])) {
$p = new timetrack($this->dbconn);
$p->read($val);
if ( $p->id != $val ) {
@@ -348,9 +348,9 @@
unset($p);
}
$this->dbconn->Commit("WORK");
- } else if ( ereg("^([S])(.*)",$HTTP_GET_VARS['action'],$a) ) {
+ } else if ( ereg("^([S])(.*)",$_GET['action'],$a) ) {
$this->dbconn->Begin("WORK");
- while (list ($key,$val) = @each ($HTTP_GET_VARS['mark'])) {
+ while (list ($key,$val) = @each ($_GET['mark'])) {
$p = new timetrack($this->dbconn);
$p->read($val);
if ( $p->id != $val ) {
@@ -374,7 +374,7 @@
* prepare
*/
Function prepare() {
- global $msg,$HTTP_GET_VARS,$HTTP_SESSION_VARS,$tutos,$lang;
+ global $msg,$tutos,$lang;
$this->name = $lang['TimetrackOverview'];
$this->link1 = "timetrack_overview.php";
@@ -382,39 +382,39 @@
$q = "SELECT * FROM ". $this->dbconn->prefix ."timetrack";
$pre = " WHERE ";
- if ( isset($HTTP_GET_VARS['id']) ) {
- $q .= $pre . "id =" . $HTTP_GET_VARS['id'];
+ if ( isset($_GET['id']) ) {
+ $q .= $pre . "id =" . $_GET['id'];
$pre = " AND ";
- $this->link1 = addUrlParameter($this->link1,"id=".$HTTP_GET_VARS['id']);
- $this->addHidden("id", $HTTP_GET_VARS['id']);
+ $this->link1 = addUrlParameter($this->link1,"id=".$_GET['id']);
+ $this->addHidden("id", $_GET['id']);
}
- if ( isset($HTTP_GET_VARS['link_id']) ) {
- $ref = getObject($this->dbconn,$HTTP_GET_VARS['link_id']);
+ if ( isset($_GET['link_id']) ) {
+ $ref = getObject($this->dbconn,$_GET['link_id']);
$this->name .= " : ".$ref->getFullName();
$q .= $pre . "link_id in (";
$sep = "";
- if ( ! isset($HTTP_GET_VARS['show']) ) {
- $q .= $sep . $HTTP_GET_VARS['link_id'];
+ if ( ! isset($_GET['show']) ) {
+ $q .= $sep . $_GET['link_id'];
$sep = ",";
- } else if ( $HTTP_GET_VARS['show'] == "Tasks" ) {
- $this->link1 = addUrlParameter($this->link1,"show=". $HTTP_GET_VARS['show']);
- $this->addHidden("show",$HTTP_GET_VARS['show']);
+ } else if ( $_GET['show'] == "Tasks" ) {
+ $this->link1 = addUrlParameter($this->link1,"show=". $_GET['show']);
+ $this->addHidden("show",$_GET['show']);
add_task_ids($ref,$q,$sep);
$sep = ",";
- } else if ( $HTTP_GET_VARS['show'] == "Bugs" ) {
- $this->link1 = addUrlParameter($this->link1,"show=". $HTTP_GET_VARS['show']);
- $this->addHidden("show",$HTTP_GET_VARS['show']);
+ } else if ( $_GET['show'] == "Bugs" ) {
+ $this->link1 = addUrlParameter($this->link1,"show=". $_GET['show']);
+ $this->addHidden("show",$_GET['show']);
add_bugs_ids($ref,$q,$sep);
$sep = ",";
- } else if ( $HTTP_GET_VARS['show'] == "Installations" ) {
- $this->link1 = addUrlParameter($this->link1,"show=". $HTTP_GET_VARS['show']);
- $this->addHidden("show",$HTTP_GET_VARS['show']);
+ } else if ( $_GET['show'] == "Installations" ) {
+ $this->link1 = addUrlParameter($this->link1,"show=". $_GET['show']);
+ $this->addHidden("show",$_GET['show']);
add_inst_ids($ref,$q,$sep);
$sep = ",";
- } else if ( $HTTP_GET_VARS['show'] == "all" ) {
- $this->link1 = addUrlParameter($this->link1,"show=". $HTTP_GET_VARS['show']);
- $this->addHidden("show",$HTTP_GET_VARS['show']);
- $q .= $sep . $HTTP_GET_VARS['link_id'];
+ } else if ( $_GET['show'] == "all" ) {
+ $this->link1 = addUrlParameter($this->link1,"show=". $_GET['show']);
+ $this->addHidden("show",$_GET['show']);
+ $q .= $sep . $_GET['link_id'];
$sep = ",";
add_task_ids($ref,$q,$sep);
add_bugs_ids($ref,$q,$sep);
@@ -422,25 +422,25 @@
}
$q .= ")";
$pre = " AND ";
- $this->link1 = addUrlParameter($this->link1,"link_id=". $HTTP_GET_VARS['link_id']);
- $this->addHidden("link_id",$HTTP_GET_VARS['link_id']);
+ $this->link1 = addUrlParameter($this->link1,"link_id=". $_GET['link_id']);
+ $this->addHidden("link_id",$_GET['link_id']);
}
# Search in description
- if ( isset($HTTP_GET_VARS['name']) && ! empty($HTTP_GET_VARS['name']) ) {
- $q .= $pre . $this->dbconn->Like("description",$HTTP_GET_VARS['name']);
- $this->link1 = addUrlParameter($this->link1,"name=". UrlEncode($HTTP_GET_VARS['name']));
+ if ( isset($_GET['name']) && ! empty($_GET['name']) ) {
+ $q .= $pre . $this->dbconn->Like("description",$_GET['name']);
+ $this->link1 = addUrlParameter($this->link1,"name=". UrlEncode($_GET['name']));
$pre = " AND ";
- $this->addHidden("name",$HTTP_GET_VARS['name']);
+ $this->addHidden("name",$_GET['name']);
}
# Start Date for search
$from = new DateTime(0);
- if ( isset($HTTP_GET_VARS['fd']) ) {
- $from->setDateTime($HTTP_GET_VARS['fd']);
+ if ( isset($_GET['fd']) ) {
+ $from->setDateTime($_GET['fd']);
} else {
$from->setDateTimeF("f");
# remember this
# session_register('ttsearchfrom');
- $HTTP_SESSION_VARS['ttsearchfrom'] = $from->getYYYYMMDD();
+ $_SESSION['ttsearchfrom'] = $from->getYYYYMMDD();
}
if ( $from->notime != 1 ) {
$q .= $pre ."( vtime >= ". $this->dbconn->Date($from) .")";
@@ -450,13 +450,13 @@
}
# End Date for search
$to = new DateTime(0);
- if ( isset($HTTP_GET_VARS['td']) ) {
- $to->setDateTime($HTTP_GET_VARS['td']);
+ if ( isset($_GET['td']) ) {
+ $to->setDateTime($_GET['td']);
} else {
$to->setDateTimeF("t");
# remember this
# session_register('ttsearchto');
- $HTTP_SESSION_VARS['ttsearchto'] = $to->getYYYYMMDD();
+ $_SESSION['ttsearchto'] = $to->getYYYYMMDD();
}
if ( $to->notime != 1 ) {
$q .= $pre ."( vtime <= ". $this->dbconn->Date($to) .")";
@@ -465,23 +465,23 @@
$this->addHidden("td",$to->getYYYYMMDD());
}
# Search for state
- if ( isset($HTTP_GET_VARS['state']) && ($HTTP_GET_VARS['state'] != -2) ) {
- $q .= $pre ." (state = ". $HTTP_GET_VARS['state'] .")";
+ if ( isset($_GET['state']) && ($_GET['state'] != -2) ) {
+ $q .= $pre ." (state = ". $_GET['state'] .")";
$pre = " AND ";
- $this->link1 = addUrlParameter($this->link1,"state=".$HTTP_GET_VARS['state']);
+ $this->link1 = addUrlParameter($this->link1,"state=".$_GET['state']);
# session_register('ttsearchstate');
- $HTTP_SESSION_VARS['ttsearchstate'] = $HTTP_GET_VARS['state'];
- $this->addHidden("state",$HTTP_GET_VARS['state']);
+ $_SESSION['ttsearchstate'] = $_GET['state'];
+ $this->addHidden("state",$_GET['state']);
}
# Search for worker
- if ( isset($HTTP_GET_VARS['worker']) ) {
- $x = getObject($this->dbconn,$HTTP_GET_VARS['worker']);
+ if ( isset($_GET['worker']) ) {
+ $x = getObject($this->dbconn,$_GET['worker']);
if ( $x->getType() == "address" ) {
- $q .= $pre . "adr_id =" . $HTTP_GET_VARS['worker'];
+ $q .= $pre . "adr_id =" . $_GET['worker'];
} else if ( $x->getType() == "user" ) {
- $q .= $pre . "adr_id =" . $HTTP_GET_VARS['worker'];
+ $q .= $pre . "adr_id =" . $_GET['worker'];
} else if ( $x->getType() == "team" ) {
- $q .= $pre . "adr_id in (" . $HTTP_GET_VARS['worker'];
+ $q .= $pre . "adr_id in (" . $_GET['worker'];
$x->read_member();
@reset($x->member);
while ( list ($i1,$f1) = @each ($x->member) ) {
@@ -492,8 +492,8 @@
$q .= $pre . "adr_id =" . $link_id;
}
$pre = " AND ";
- $this->link1 = addUrlParameter($this->link1,"worker=".$HTTP_GET_VARS['worker']);
- $this->addHidden("worker",$HTTP_GET_VARS['worker']);
+ $this->link1 = addUrlParameter($this->link1,"worker=".$_GET['worker']);
+ $this->addHidden("worker",$_GET['worker']);
}
check_dbacl( $q, $this->user->id);
Index: update.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/update.php,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- update.php 12 Nov 2002 20:22:30 -0000 1.26
+++ update.php 30 Nov 2002 19:04:46 -0000 1.27
@@ -171,7 +171,9 @@
# read the table definitions of modules
foreach ($tutos[modules] as $r => $x) {
- @include(dirname($tutos['base'] ."/". $tutos[modules][$r][file]) ."/mtable.pinc");
+ if (file_exists(dirname($tutos['base'] ."/". $tutos[modules][$r][file]) ."/mtable.pinc") ) {
+ @include_once dirname($tutos['base'] ."/". $tutos[modules][$r][file]) ."/mtable.pinc";
+ }
}
$this->name = $lang['DBUpdate'];
Index: user.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/user.pinc,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -r1.104 -r1.105
--- user.pinc 27 Nov 2002 17:54:56 -0000 1.104
+++ user.pinc 30 Nov 2002 19:04:46 -0000 1.105
@@ -132,8 +132,8 @@
$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->birthday = $r->getDateTime($pos, "birthday");
+ $this->last_seen = $r->getDateTime($pos, "last_seen");
$this->last_host = StripSlashes($r->get($pos, "last_host"));
$this->uid = $r->get($pos,"u_id");
$this->admin = $r->get($pos,"admin");
Index: webelements.p3
===================================================================
RCS file: /cvsroot/tutos/tutos/php/webelements.p3,v
retrieving revision 1.189
retrieving revision 1.190
diff -u -r1.189 -r1.190
--- webelements.p3 24 Nov 2002 16:34:53 -0000 1.189
+++ webelements.p3 30 Nov 2002 19:04:46 -0000 1.190
@@ -570,8 +570,8 @@
}
if($_SERVER['SERVER_PORT'] == 443) {
$r = sprintf("https://%s%s/",$_SERVER['HTTP_HOST'],$dir);
- } else if($_SERVER['SERVER_PORT'] == 80) {
- $r = sprintf("http://%s%s/",$_SERVER['HTTP_HOST'], $dir);
+# } else if($_SERVER['SERVER_PORT'] == 80) {
+# $r = sprintf("http://%s%s/",$_SERVER['HTTP_HOST'], $dir);
} else {
$r = sprintf("http://%s%s/",$_SERVER['HTTP_HOST'], $dir);
}
|