package gerne; use strict; use html; @gerne::ISA=qw(record); sub selectBox { my $name=shift; my $value=shift; my $q=&sql::select(qq(select * from gerne order by name;)); my @items=(0 , "なし") ; while (my $r=$q->next) { push @items, $r->{mainkey}; push @items, &html::escape($r->{name}); } &html::selectBox(\@items, $name ,$value); } sub gerneLink { my $t=shift; $t->icon . &html::link("$t->{name}","searchByGerne", {gerne=>$t->primaryKey} ); } sub icon { my $t=shift; &html::link(qq(), "searchByGerne", {gerne=>$t->primaryKey} ); } sub link { my $t=shift; $t->gerneLink; } sub searchBy { my $t=shift; use search; my $s=new search; $s->addGerne($t->{mainkey}); $s->showResult; } sub new{ my $className=shift; my $primaryKey=shift; #新しいレコードの場合空 &record::init($className,$primaryKey); } 1;