- Add location and contact info for each tour. Dump this in the CSV dump of

the tours, but don't show it to the students at all.
This commit is contained in:
dave 2007-01-20 08:10:26 +00:00
parent eff2190ac1
commit 82b8b75b25
4 changed files with 22 additions and 6 deletions

View File

@ -51,7 +51,9 @@ $table['header']=array( i18n("ID"),
i18n("Description"),
i18n("Capacity"),
i18n("Minimum Grade"),
i18n("Maximum Grade"));
i18n("Maximum Grade"),
i18n("Contact"),
i18n("Location"));
$q=mysql_query("SELECT *
@ -68,9 +70,13 @@ while($r=mysql_fetch_object($q))
// print_r($judge_subdivs);
$n = str_replace("\r","", $r->name);
$n = str_replace("\n","", $n);
$n = str_replace("\n"," ", $n);
$d = str_replace("\r","", $r->description);
$d = str_replace("\n","", $d);
$d = str_replace("\n"," ", $d);
$c = str_replace("\r","", $r->contact);
$c = str_replace("\n"," ", $c);
$l = str_replace("\r","", $r->location);
$l = str_replace("\n"," ", $l);
$tmp=array(
$r->id,
@ -78,7 +84,10 @@ while($r=mysql_fetch_object($q))
mysql_escape_string($d),
$r->capacity,
$r->grade_min,
$r->grade_max
$r->grade_max,
mysql_escape_string($c),
mysql_escape_string($l)
);
// print_r($tmp);
$table['data'][]=$tmp;

View File

@ -1 +1 @@
35
36

5
db/db.update.36.sql Normal file
View File

@ -0,0 +1,5 @@
-- Add 2 fields to tours
ALTER TABLE `tours` ADD `contact` TINYTEXT NOT NULL ,
ADD `location` TINYTEXT NOT NULL ;

View File

@ -6,7 +6,9 @@ $tours_fields = array( 'name' => 'Tour Name',
'capacity' => 'Capacity',
'grade_min' => 'Minimum Grade',
'grade_max' => 'Maximum Grade',
'year' => 'Year');
'year' => 'Year',
'contact' => 'Contact',
'location' => 'Location');
class tours {