version 1.3, 2000/10/17 02:24:47
|
version 1.4, 2000/10/17 16:56:09
|
Line 27 Dmitry Rubinstein
|
Line 27 Dmitry Rubinstein
|
=cut |
=cut |
|
|
my (%RevMonths) = |
my (%RevMonths) = |
('Jan', '1', 'Feb', '2', 'Mar', '3', 'Apr', '4', 'May', '5', 'Jun', '6', |
('Jan', '1', 'Feb', '2', 'Mar', '3', 'Apr', '4', 'May', '5', 'Jun', '6', |
'Jul', '7', 'Aug', '8', 'Sep', '9', 'Oct', '10', 'Nov', '11', |
'Jul', '7', 'Aug', '8', 'Sep', '9', 'Oct', '10', 'Nov', '11', |
'Dec', '12', |
'Dec', '12', |
|
'JAN', '1', 'FEB', '2', 'MAR', '3', 'APR', '4', 'MAY', '5', 'JUN', '6', |
|
'JUL', '7', 'AUG', '8', 'SEP', '9', 'OCT', '10', 'NOV', '11', |
|
'DEC', '12', |
'ñÎ×', '0', 'æÅ×', 1, 'íÁÒ', 2, 'áÐÒ', 3, 'íÁÊ', '4', |
'ñÎ×', '0', 'æÅ×', 1, 'íÁÒ', 2, 'áÐÒ', 3, 'íÁÊ', '4', |
'éÀÎ', '5', 'éÀÌ', 6, 'á×Ç', '7', 'óÅÎ', '8', |
'éÀÎ', '5', 'éÀÌ', 6, 'á×Ç', '7', 'óÅÎ', '8', |
'ïËÔ', '9', 'îÏÑ', '19', 'äÅË', '11'); |
'ïËÔ', '9', 'îÏÑ', '19', 'äÅË', '11'); |
Line 37 my ($sth);
|
Line 40 my ($sth);
|
|
|
use vars qw($/); |
use vars qw($/); |
|
|
$/=/\n
*/; |
|
|
|
use DBI; |
use DBI; |
use strict; |
use strict; |
Line 99 sub SelectGroup {
|
Line 102 sub SelectGroup {
|
Tournaments WHERE Type = 'ç'"); |
Tournaments WHERE Type = 'ç'"); |
$sth->execute; |
$sth->execute; |
print "÷ÙÂÅÒÉÔÅ ÇÒÕÐÐÕ ÄÌÑ ÔÕÒÎÉÒÁ:\n$TourName\n\n"; |
print "÷ÙÂÅÒÉÔÅ ÇÒÕÐÐÕ ÄÌÑ ÔÕÒÎÉÒÁ:\n$TourName\n\n"; |
for ($i = 0; $i < $sth->numrows; $i++) { |
while (@arr=$sth->fetchrow) { |
@arr = $sth->fetchrow; |
|
print "[$arr[0]] $arr[1]\n"; |
print "[$arr[0]] $arr[1]\n"; |
} |
} |
$ParentId = <STDIN>; |
$ParentId = <STDIN>; |
Line 136 MAIN:
|
Line 138 MAIN:
|
my($tournum, $qnum, $all_qnum, $qtype) = (0, 0, 0, 'þ'); |
my($tournum, $qnum, $all_qnum, $qtype) = (0, 0, 0, 'þ'); |
my (@d) = (localtime((stat($source))[9]))[5,4,3]; |
my (@d) = (localtime((stat($source))[9]))[5,4,3]; |
$d[1]++; |
$d[1]++; |
|
$d[0]+=1900; |
my ($CreatedAt) = $dbh->quote( join('-', @d)); |
my ($CreatedAt) = $dbh->quote( join('-', @d)); |
print "File created on: $CreatedAt\n"; |
print "File created on: $CreatedAt\n"; |
|
|
Line 175 MAIN:
|
Line 178 MAIN:
|
WHERE Id=$TourId"); |
WHERE Id=$TourId"); |
} |
} |
$qnum = 0; |
$qnum = 0; |
$qtype = "þ"; |
$qtype = 'þ'; |
$sth = $dbh->prepare("INSERT INTO Tournaments |
$sth = $dbh->prepare("INSERT INTO Tournaments |
(Title, Type, ParentId, CreatedAt) |
(Title, Type, ParentId, CreatedAt) |
VALUES ($value, 'ô', $TournamentId, $CreatedAt)"); |
VALUES ($value, 'ô', $TournamentId, $CreatedAt)"); |
Line 185 MAIN:
|
Line 188 MAIN:
|
} |
} |
if ($key =~ /÷ÉÄ/) { |
if ($key =~ /÷ÉÄ/) { |
$qtype = $value; |
$qtype = $value; |
|
$qtype =~ s/'//g; |
next; |
next; |
} |
} |
if ($key =~ /÷ÏÐÒÏÓ/) { |
if ($key =~ /÷ÏÐÒÏÓ/) { |
$sth = $dbh->prepare("INSERT INTO Questions |
my $query = "INSERT INTO Questions |
(ParentId, Number, Type) |
(ParentId, Number, Type) |
VALUES ($TourId, $qnum+1, $qtype)"); |
VALUES ($TourId, $qnum+1, \'$qtype\')"; |
$sth->execute or print "Problem at $qnum"; |
$sth = $dbh->prepare($query); |
|
$sth->execute or print $query;; |
$QuestionId = $sth->{mysql_insertid}; |
$QuestionId = $sth->{mysql_insertid}; |
&UpdateQuestion($dbh, $QuestionId, "Question", $value); |
&UpdateQuestion($dbh, $QuestionId, "Question", $value); |
$qnum++; |
$qnum++; |