version 1.12, 2002/08/12 21:10:55
|
version 1.17, 2003/09/04 21:09:47
|
Line 53 my $dbh = DBI->connect("DBI:mysql:chgk",
|
Line 53 my $dbh = DBI->connect("DBI:mysql:chgk",
|
or do { |
or do { |
print h1("Временные проблемы") . "База данных временно не |
print h1("Временные проблемы") . "База данных временно не |
работает. Заходите попозже."; |
работает. Заходите попозже."; |
print &Include_virtual("../dimrub/db/reklama.html"); |
print &Include_virtual("../../dimrub/db/reklama.html"); |
print end_html; |
print end_html; |
die "Can't connect to DB chgk\n"; |
die "Can't connect to DB chgk\n"; |
}; |
}; |
Line 66 print header(-charset=>'koi8-r');
|
Line 66 print header(-charset=>'koi8-r');
|
################################################## |
################################################## |
print start_html(-"title"=>'Register of Clubs', |
print start_html(-"title"=>'Register of Clubs', |
-author=>'borisv@lk.net', |
-author=>'borisv@lk.net', |
-background=>"../images/map.jpg"); |
-background=>"../../images/map.jpg"); |
print &Include_virtual("../dimrub/db/reklama.html"); |
print &Include_virtual("../../dimrub/db/reklama.html"); |
print <<END; |
print <<END; |
<table> |
<table> |
<tr> |
<tr> |
<td background=../images/compass.gif valign=top> |
<td background=../../images/compass.gif valign=top> |
END |
END |
|
|
################################################ |
################################################ |
Line 86 my $self=url();
|
Line 86 my $self=url();
|
# The navigation panel has three special lines |
# The navigation panel has three special lines |
############################################### |
############################################### |
print <<END; |
print <<END; |
<dl> |
<ul> |
<dt><a href="$self">Home</a></dt> |
<li><a href="$self">Home</a></li> |
<dt><a href="$self?rid=1&level=1000&clubs=0">Все регионы</a></dt> |
<li><a href="$self?rid=1&level=1000&clubs=0">Все регионы</a></li> |
<dt><a href="$self?rid=1&level=1000&clubs=1">Все клубы</a></dt> |
<li><a href="$self?rid=1&level=1000&clubs=1">Все клубы</a></li> |
<dt><a href="$self?addclub=1">Добавить клуб</a></dt> |
<li><a href="$self?addclub=1">Добавить клуб</a></li> |
<dt><a href="$self?whoiswho=1">Кто есть кто</a></dt> |
<li><a href="$self?whoiswho=1">Кто есть кто</a></li> |
END |
END |
|
|
################################################# |
################################################# |
# And the navpanel itself |
# And the navpanel itself |
################################################## |
################################################## |
|
|
print ListRegions(dbh=>$dbh,rid=>1,level=>1,tag=>'dt', |
print ListRegions(dbh=>$dbh,rid=>1,level=>1,tag=>'li', |
self=>$self); |
self=>$self); |
|
|
print <<END; |
print <<END; |
</dl> |
</ul> |
END |
END |
|
|
|
|
Line 126 END
|
Line 126 END
|
Журнал "Игра"<br> |
Журнал "Игра"<br> |
и<br> |
и<br> |
<a href="/znatoki/klub/znat.html"><img |
<a href="/znatoki/klub/znat.html"><img |
ismap border=0 src= "../images/logo.gif" |
ismap border=0 src= "../../images/logo.gif" |
alt="Интернет Клуб Что? Где? Когда?" width=319 height=27></a> |
alt="Интернет Клуб Что? Где? Когда?" width=319 height=27></a> |
<br>ПРЕДСТАВЛЯЮТ<br> |
<br>ПРЕДСТАВЛЯЮТ<br> |
Регистр Клубов Интеллектуальных Игр |
Регистр Клубов Интеллектуальных Игр |
Line 174 END
|
Line 174 END
|
</dl> |
</dl> |
<p align=center> |
<p align=center> |
END |
END |
print &Include_virtual("../boris/register/regions.html"); |
print &Include_virtual("../../boris/register/regions.html"); |
print <<END; |
print <<END; |
</p> |
</p> |
END |
END |
Line 189 END
|
Line 189 END
|
$sth->finish; |
$sth->finish; |
|
|
print "<p align=center>"; |
print "<p align=center>"; |
print "Всего клубов: $count<br>\n"; |
print "Всего клубов: $count</p>\n"; |
print "Эту страничку посмотрели "; |
|
print `/home/piataev/public_html/cgi-bin/counter.sh /znatoki/cgi-bin/register.cgi`; |
|
print " раз(а)</p>\n"; |
|
|
|
print <<END; |
print <<END; |
<hr> |
<hr> |
<address> |
<address> |
<img width = 60 height = 80 src="../images/owl.gif" alt = "owl"> |
<img width = 60 height = 80 src="../../images/owl.gif" alt = "owl"> |
<a href="http://users.lk.net/~borisv"> |
<a href="http://users.lk.net/~borisv"> |
Boris Veytsman</a>, $date |
Boris Veytsman</a>, $date |
</address> |
</address> |
Line 271 SELECT Child FROM RegionRegion WHERE Par
|
Line 268 SELECT Child FROM RegionRegion WHERE Par
|
push @kids,"rid=$kid"; |
push @kids,"rid=$kid"; |
} |
} |
my $clause = join(' OR ', @kids); |
my $clause = join(' OR ', @kids); |
$result .= "<dl>\n"; |
$result .= "<ul>\n"; |
$sth=$args{'dbh'}->prepare(" |
$sth=$args{'dbh'}->prepare(" |
SELECT rid FROM Regions WHERE $clause ORDER BY Name"); |
SELECT rid FROM Regions WHERE $clause ORDER BY Name"); |
$sth->execute; |
$sth->execute; |
Line 279 SELECT rid FROM Regions WHERE $clause OR
|
Line 276 SELECT rid FROM Regions WHERE $clause OR
|
$result .= ListRegions( |
$result .= ListRegions( |
%args,'rid'=>$kid, |
%args,'rid'=>$kid, |
'level'=>$args{'level'}-1, |
'level'=>$args{'level'}-1, |
'tag'=>'dt'); |
'tag'=>'li'); |
} |
} |
$result .= "</dl>\n"; |
$result .= "</ul>\n"; |
} |
} |
} |
} |
return $result; |
return $result; |
Line 326 sub ListClubs {
|
Line 323 sub ListClubs {
|
my $sth; |
my $sth; |
if ($args{'cid'}) { |
if ($args{'cid'}) { |
$sth = $args{'dbh'}->prepare(" |
$sth = $args{'dbh'}->prepare(" |
SELECT Child FROM ClubClub WHERE Parent=$args{'cid'}"); |
SELECT Child, Status FROM ClubClub WHERE Parent=$args{'cid'}"); |
} else { |
} else { |
$sth = $args{'dbh'}->prepare(" |
$sth = $args{'dbh'}->prepare(" |
SELECT cid FROM ClubRegion WHERE rid=$args{'rid'}"); |
SELECT cid FROM ClubRegion WHERE rid=$args{'rid'}"); |
Line 344 SELECT cid FROM ClubRegion WHERE rid=$ar
|
Line 341 SELECT cid FROM ClubRegion WHERE rid=$ar
|
|
|
$result=<<END; |
$result=<<END; |
<h3>Клубы:</h3> |
<h3>Клубы:</h3> |
<dl>\n |
<ul>\n |
END |
END |
} else { |
} else { |
|
|
$result=<<END; |
$result=<<END; |
<dl><dt>Клубы:</dt> |
<ul>\n |
<dd><dl>\n |
|
END |
END |
} |
} |
my @clubs=(); |
my @clubs=(); |
while (my ($club)=$sth->fetchrow_array) { |
my %stat=(); |
|
while (my ($club,$status)=$sth->fetchrow_array) { |
push @clubs,"cid=$club"; |
push @clubs,"cid=$club"; |
|
if ($status) { |
|
$stat{$club}=$status; |
|
} |
} |
} |
my $clause = join(' OR ', @clubs); |
my $clause = join(' OR ', @clubs); |
$sth=$args{'dbh'}->prepare(" |
$sth=$args{'dbh'}->prepare(" |
SELECT cid, Name FROM Clubs WHERE $clause ORDER BY Name"); |
SELECT cid, Name FROM Clubs WHERE $clause ORDER BY Name"); |
$sth->execute; |
$sth->execute; |
while (my ($cid,$Name)=$sth->fetchrow_array) { |
while (my ($cid,$Name)=$sth->fetchrow_array) { |
$result .= dt("<a href=\"$self?cid=$cid\">$Name</a>\n"); |
my $res="<a href=\"$self?cid=$cid\">$Name</a>\n"; |
|
if (exists $stat{$cid}) { |
|
$res .= " ($stat{$cid})\n"; |
|
} |
|
$result .= li($res); |
} |
} |
$result .= "</dl></dd></dl>\n"; |
$result .= "</ul>\n"; |
} |
} |
|
|
|
|
Line 376 sub ListParents {
|
Line 380 sub ListParents {
|
my $sth; |
my $sth; |
|
|
$sth = $args{'dbh'}->prepare(" |
$sth = $args{'dbh'}->prepare(" |
SELECT Parent FROM ClubClub WHERE Child=$args{'cid'}"); |
SELECT Parent, Status FROM ClubClub WHERE Child=$args{'cid'}"); |
|
|
$sth->execute; |
$sth->execute; |
|
|
Line 392 SELECT Parent FROM ClubClub WHERE Child=
|
Line 396 SELECT Parent FROM ClubClub WHERE Child=
|
END |
END |
|
|
my @clubs=(); |
my @clubs=(); |
while (my ($club)=$sth->fetchrow_array) { |
my %stat=(); |
|
while (my ($club,$status)=$sth->fetchrow_array) { |
push @clubs,"cid=$club"; |
push @clubs,"cid=$club"; |
|
if ($status) { |
|
$stat{$club}=$status; |
|
} |
} |
} |
my $clause = join(' OR ', @clubs); |
my $clause = join(' OR ', @clubs); |
$sth=$args{'dbh'}->prepare(" |
$sth=$args{'dbh'}->prepare(" |
SELECT cid, Name FROM Clubs WHERE $clause ORDER BY Name"); |
SELECT cid, Name FROM Clubs WHERE $clause ORDER BY Name"); |
$sth->execute; |
$sth->execute; |
while (my ($cid,$Name)=$sth->fetchrow_array) { |
while (my ($cid,$Name)=$sth->fetchrow_array) { |
$result .= dt("<a href=\"$self?cid=$cid\">$Name</a>\n"); |
my $res = "<a href=\"$self?cid=$cid\">$Name</a>\n"; |
|
if (exists $stat{$cid}) { |
|
$res .= " ($stat{$cid})\n"; |
|
} |
|
$result .= dt($res); |
} |
} |
$result .= "</dl></dd></dl>\n"; |
$result .= "</dl></dd></dl>\n"; |
} |
} |
Line 562 SELECT * FROM People WHERE pid=$args{'pi
|
Line 574 SELECT * FROM People WHERE pid=$args{'pi
|
|
|
if (my $string=$person->{'URL'}) { |
if (my $string=$person->{'URL'}) { |
$string = htmlize($string); |
$string = htmlize($string); |
push @entries, "Домашнаяя страничка: $string"; |
push @entries, "Домашняя страничка: $string"; |
} |
} |
|
|
if (my $string=$person->{'Phone'}) { |
if (my $string=$person->{'Phone'}) { |