/dd/ -> 0_1003_inc.php
1 <?php
2
3 // Changes ownerid, date, lastmoddate, lastmodby into viewable/editable fields
4 // Introduces datatype user and date
5
6 unset($rdesc);
7 $rdesc=$db->Execute("SELECT real_tablename,table_desc_name FROM tableoftables");
8 while (!($rdesc->EOF)) {
9 if($rdesc->fields[table_desc_name]) {
10 $rmax=$db->Execute("SELECT max(sortkey) FROM ".$rdesc->fields[table_desc_name]);
11 $sortkeymax=$rmax->fields[0];
12 $sortkeymax+=10;
13 $db->Execute("UPDATE ".$rdesc->fields[table_desc_name]." SET label='Submitted by',display_record='Y',datatype='user',sortkey='$sortkeymax' WHERE label='ownerid' AND columnname='ownerid'");
14 $sortkeymax+=10;
15 $db->Execute("UPDATE ".$rdesc->fields[table_desc_name]." SET label='Date entered',display_record='Y',datatype='date',sortkey='$sortkeymax' WHERE label='date' AND columnname='date'");
16 $sortkeymax+=10;
17 $db->Execute("UPDATE ".$rdesc->fields[table_desc_name]." SET label='Last modified on',datatype='date',sortkey='$sortkeymax' WHERE label='lastmoddate' AND columnname='lastmoddate'");
18 $sortkeymax+=10;
19 $db->Execute("UPDATE ".$rdesc->fields[table_desc_name]." SET label='Last modified by',datatype='user',sortkey='$sortkeymax' WHERE label='lastmodby' AND columnname='lastmodby'");
20 }
21 $rdesc->MoveNext();
22 }
23
24 ?>