push @targets,{Coords => $coords, Launched => $target->{launched}, Raid => $target->{raid}
, Target => $target->{id}, Tick => $target->{landingtick}, Wave => $target->{wave}
, AJAX => $self->{AJAX}, JoinName => $target->{joinable} ? 'N' : 'J'
- , Joinable => $target->{joinable} ? 'FALSE' : 'TRUE'};
+ , Joinable => $target->{joinable} ? 'FALSE' : 'TRUE', JoinableTitle => $target->{joinable} ? 'Disable join' : 'Make target joinable'};
}
my $template = HTML::Template->new(filename => "templates/targetlist.tmpl", cache => 1);
$template->param(Targets => \@targets);
$self->process;
my $type = 'text/html';
+ if ($self->{HTTP_ACCEPT} =~ m{application/xhtml\+xml}){
+ $type = 'application/xhtml+xml'
+ }
my $body;
if ($self->{XML}){
$type = 'text/xml';
$body = $self->render_body($body);
+ unless ($body){
+ return;
+ }
+
unless ($self->{XML}){
my $fleetupdate = $DBH->selectrow_array('SELECT landing_tick FROM fleets WHERE uid = ? AND fleet = 0',undef,$self->{UID});
$template->param(isHC => $self->isHC);
$template->param(isDC => $self->isDC());
$template->param(isBC => $self->isBC());
- $template->param(isIntel => $self->isBC());
+ $template->param(isIntel => $self->isIntel());
$template->param(isAttacker => $ATTACKER && (!$self->isMember() || ((($TICK - $fleetupdate < 24) || $self->isScanner()) && $self->{PLANET})));
if ($ATTACKER && (!$self->isMember() || ((($TICK - $fleetupdate < 24) || $self->isScanner()) && $self->{PLANET}))){
$template->param(Targets => $self->listTargets);
my ($css) = $DBH->selectrow_array(q{SELECT css FROM users WHERE uid = $1},undef,$ND::UID);
$template->param(CSS => $css);
$template->param(TITLE => $self->{TITLE});
-
}
$template->param(Error => $ND::ERROR);
$template->param(BODY => $body->output);
my $output = $template->output;
+ $output =~ s/[^\x{9}\x{A}\x{D}\x{20}-\x{D7FF}\x{E000}-\x{FFFD}\x{10000}-\x{10FFFF}]//g;
print header(-type=> $type, -charset => 'utf-8', -Content_Length => length $output);
print $output;
};