N
Nikos
if( param('select') ) {
$data = open_script( $host, param('select') );
} elsif( $match ) {
$data = welcome_old( $host );
} else {
$data = welcome_new( $host );
}
sub welcome_old {
my ($host) = @_;
$dbh->do( "UPDATE guestlog SET hostcount = hostcount + 1 WHERE
host='$host'" );
my $sth = $dbh->prepare( "SELECT * FROM guestlog WHERE
host='$host'" );
$sth->execute();
my $row = $sth->fetchrow_hashref;
return "Êáëþò Þëèåò " .$host. "! ×áßñïìáé ðïõ âñßóêåéò ôçÃ
óåëßäá Ã¥ÃäéáöÃñïõóá!\n".
"Ôåëåõôáßá öïñÜ Þñèåò åäþ ùò " .$row->{host}. " óôéò "
..$row->{date}. " !!\n".
"ÓýÃïëéêÃò Þñèåò åäþ " .$row->{hostcount}. " öïñÃò !!!\n".
"Ôåëåõôáßá åßäåò ôï êåßìåÃï { " .$row->{script}. " }\n".
"Ãïéü êåßìåÃï èá ìåëåôÞóåéò áõôÞà ôçà öïñÜ !?";
}
When i have '\n' then my script print blank lines, if i change it to
<br> it does not, why?
Also i have to use these if i want my script to print ok the fiel it
opens. maybe i dotn have to when <br> works!
$data =~ s/\n/\\n/g;
$data =~ s/"/\\"/g;
$data =~ tr/\cM//d;
$data = open_script( $host, param('select') );
} elsif( $match ) {
$data = welcome_old( $host );
} else {
$data = welcome_new( $host );
}
sub welcome_old {
my ($host) = @_;
$dbh->do( "UPDATE guestlog SET hostcount = hostcount + 1 WHERE
host='$host'" );
my $sth = $dbh->prepare( "SELECT * FROM guestlog WHERE
host='$host'" );
$sth->execute();
my $row = $sth->fetchrow_hashref;
return "Êáëþò Þëèåò " .$host. "! ×áßñïìáé ðïõ âñßóêåéò ôçÃ
óåëßäá Ã¥ÃäéáöÃñïõóá!\n".
"Ôåëåõôáßá öïñÜ Þñèåò åäþ ùò " .$row->{host}. " óôéò "
..$row->{date}. " !!\n".
"ÓýÃïëéêÃò Þñèåò åäþ " .$row->{hostcount}. " öïñÃò !!!\n".
"Ôåëåõôáßá åßäåò ôï êåßìåÃï { " .$row->{script}. " }\n".
"Ãïéü êåßìåÃï èá ìåëåôÞóåéò áõôÞà ôçà öïñÜ !?";
}
When i have '\n' then my script print blank lines, if i change it to
<br> it does not, why?
Also i have to use these if i want my script to print ok the fiel it
opens. maybe i dotn have to when <br> works!
$data =~ s/\n/\\n/g;
$data =~ s/"/\\"/g;
$data =~ tr/\cM//d;