#!/usr/local/bin/perl use strict; use warnings; use CGI; use DBI; my $query = new CGI; my $dbroot = "/var/www/html/lextypedb/db"; my $cssdir = "/lextypedb"; my $cgidir = "/cgi-bin/lextypedb_tools"; my $charset = "utf-8"; my $version = "???"; if(-e "params"){ open(PARAM, "params"); while(){ chomp; (my $para, my $val) = split /=/;#/ if($para eq "dbroot"){ $dbroot = $val; }elsif($para eq "charset"){ $charset = $val; }elsif($para eq "cssdir"){ $cssdir = $val; }elsif($para eq "cgidir"){ $cgidir = $val; }elsif($para eq "version"){ $version = $val; } } open(PARAM, "params"); } #Retrieve all lexical types. my $list_table = 'list_tbl'; my $dbname = $dbroot."/"."lt.db"; my $dbh = DBI->connect("dbi:SQLite:dbname=$dbname", "", "", {AutoCommit => 0}); my $sth = $dbh->prepare( "select * from $list_table" ); $sth->execute; my $total=0; my $out = "
Lexical Type | Linguistic Name | Example (Lexicon, Corpus) |
---|---|---|
".$row[0]." | "; $out .= "".$row[1]." | "; $out .= "".$examples." (".$row[3].", ".$row[4].")"." | "; $out .= "
$mes