version 1.8, 2001/09/20 21:49:35
|
version 1.10, 2002/01/28 17:00:56
|
Line 58 my $dbh = DBI->connect("DBI:mysql:chgk",
|
Line 58 my $dbh = DBI->connect("DBI:mysql:chgk",
|
die "Can't connect to DB chgk\n"; |
die "Can't connect to DB chgk\n"; |
}; |
}; |
|
|
print header; |
print header(-charset=>'koi8-r'); |
|
|
|
|
################################################## |
################################################## |
Line 87 my $self=url();
|
Line 87 my $self=url();
|
############################################### |
############################################### |
print <<END; |
print <<END; |
<dl> |
<dl> |
|
<dt><a href="$self">Home</a></dt> |
<dt><a href="$self?rid=1&level=1000&clubs=0">Все регионы</a></dt> |
<dt><a href="$self?rid=1&level=1000&clubs=0">Все регионы</a></dt> |
<dt><a href="$self?rid=1&level=1000&clubs=1">Все клубы</a></dt> |
<dt><a href="$self?rid=1&level=1000&clubs=1">Все клубы</a></dt> |
<dt><a href="$self?addclub=1">Добавить клуб</a></dt> |
<dt><a href="$self?addclub=1">Добавить клуб</a></dt> |
Line 171 END
|
Line 172 END
|
о клубе</a></dt> |
о клубе</a></dt> |
<dt><a href="$self?whoiswho=1">Кто есть кто</a></dt> |
<dt><a href="$self?whoiswho=1">Кто есть кто</a></dt> |
</dl> |
</dl> |
|
<p align=center> |
|
END |
|
print &Include_virtual("../boris/register/regions.html"); |
|
print <<END; |
|
</p> |
END |
END |
} |
} |
|
|
Line 253 SELECT Name FROM Regions WHERE RID=$args
|
Line 259 SELECT Name FROM Regions WHERE RID=$args
|
|
|
# Frist, we print clubs |
# Frist, we print clubs |
if ($args{'clubs'}) { |
if ($args{'clubs'}) { |
|
$result .= ListRegionURLs(%args); |
$result .= ListClubs(%args); |
$result .= ListClubs(%args); |
} |
} |
$sth=$args{'dbh'}->prepare(" |
$sth=$args{'dbh'}->prepare(" |
Line 281 SELECT rid FROM Regions WHERE $clause OR
|
Line 288 SELECT rid FROM Regions WHERE $clause OR
|
} |
} |
|
|
############################################################ |
############################################################ |
|
# List the URLs of a given region |
|
########################################################### |
|
sub ListRegionURLs { |
|
my %args = @_; |
|
my $sth; |
|
$sth = $args{'dbh'}->prepare(" |
|
SELECT URL FROM Regions WHERE rid=$args{'rid'} and NOT ISNULL(URL)"); |
|
|
|
$sth->execute; |
|
|
|
if (!$sth->rows) { |
|
return ""; |
|
} |
|
|
|
my $result; |
|
|
|
$result=<<END; |
|
<dl><dt>Странички:</dt> |
|
<dd><dl>\n |
|
END |
|
|
|
while (my ($string)=$sth->fetchrow_array) { |
|
$string=htmlize($string); |
|
$result .= p($string); |
|
} |
|
$result .= "</dl></dd></dl>\n"; |
|
return $result; |
|
} |
|
|
|
|
|
############################################################ |
# List the clubs of a given region or a given association |
# List the clubs of a given region or a given association |
########################################################### |
########################################################### |
sub ListClubs { |
sub ListClubs { |
Line 729 sub AddClub {
|
Line 767 sub AddClub {
|
# Sending the letter with results |
# Sending the letter with results |
##################################################################### |
##################################################################### |
sub SendLetter { |
sub SendLetter { |
open(MAIL,"| $SENDMAIL -t -n"); |
open(MAIL,"| $SENDMAIL -t"); |
print MAIL <<END; |
print MAIL <<END; |
To: $TO |
To: $TO |
From: $FROM |
From: $FROM |