if (defined $post{username}) {
$cookie{login} = EncodeURI(join ':', @post{qw( username pass )});
}
if (defined $post{username}) {
$cookie{login} = EncodeURI(join ':', @post{qw( username pass )});
}
my $httpcookie = CGI::Cookie->new(
-name => 'login',
-value => join(':', @{$found}{qw( username pass )}),
my $httpcookie = CGI::Cookie->new(
-name => 'login',
-value => join(':', @{$found}{qw( username pass )}),
) or die "prepared object is empty\n";
AddCookie($httpcookie->as_string);
} or Abort(["Unable to create login cookie", $@], 403);
) or die "prepared object is empty\n";
AddCookie($httpcookie->as_string);
} or Abort(["Unable to create login cookie", $@], 403);
nl => ["\N{REGIONAL INDICATOR SYMBOL LETTER N}\N{REGIONAL INDICATOR SYMBOL LETTER L}", 'nederlands'],
en => ["\N{REGIONAL INDICATOR SYMBOL LETTER G}\N{REGIONAL INDICATOR SYMBOL LETTER B}", 'english'],
eo => [qq'<span style="color:green">\N{BLACK STAR}</span>', 'esperanto'],
nl => ["\N{REGIONAL INDICATOR SYMBOL LETTER N}\N{REGIONAL INDICATOR SYMBOL LETTER L}", 'nederlands'],
en => ["\N{REGIONAL INDICATOR SYMBOL LETTER G}\N{REGIONAL INDICATOR SYMBOL LETTER B}", 'english'],
eo => [qq'<span style="color:green">\N{BLACK STAR}</span>', 'esperanto'],
my $results = $db->select(word => '*', \%filter);
say '<h1>Search</h1><ul>';
printf("<li><small>%s</small> %s %s</li>\n",
my $results = $db->select(word => '*', \%filter);
say '<h1>Search</h1><ul>';
printf("<li><small>%s</small> %s %s</li>\n",
- $_->{id}, showlink($_->{form}, "/writer/$_->{id}"),
+ $_->{id}, showlink($_->{form}, "$editorurl/$_->{id}"),
my $imagecol = $row->{image}; # backup image subcolumns
ref $_ eq 'HASH' and $_ = encode_json($_) for values %{$row};
my $imagecol = $row->{image}; # backup image subcolumns
ref $_ eq 'HASH' and $_ = encode_json($_) for values %{$row};
$row->{$_} = $get{$_} for keys %get;
$row->{prio} = defined $row->{ref} ? undef : 1 unless exists $row->{prio};
}
eval {
$row->{$_} = $get{$_} for keys %get;
$row->{prio} = defined $row->{ref} ? undef : 1 unless exists $row->{prio};
}
eval {
'trans', 'Translations';
my @children = !$row->{id} ? () :
$db->select(word => '*', {ref => $row->{id}}, 'lang, id')->hashes;
'trans', 'Translations';
my @children = !$row->{id} ? () :
$db->select(word => '*', {ref => $row->{id}}, 'lang, id')->hashes;
printf(
$ref->{id} ? '<a id="%s" href="%s">%s</a></li>' :
'<input id="%s" name="%1$s" value="%3$s" />',
printf(
$ref->{id} ? '<a id="%s" href="%s">%s</a></li>' :
'<input id="%s" name="%1$s" value="%3$s" />',
- "trans-$ref->{lang}", "/writer/$ref->{id}", Entity($ref->{form} // ''),
+ "trans-$ref->{lang}", "$editorurl/$ref->{id}", Entity($ref->{form} // ''),
say '<ul>';
my $parents = $db->select(word => '*', [{id => $row->{cat}}, {id => $row->{ref}}]);
while (my $ref = $parents->hash) {
say '<ul>';
my $parents = $db->select(word => '*', [{id => $row->{cat}}, {id => $row->{ref}}]);
while (my $ref = $parents->hash) {
- printf '<li><a href="/writer/%d">%s</a></li>', $ref->{id}, Entity($ref->{form});
+ printf '<li><a href="%s/%d">%s</a></li>', $editorurl, $ref->{id}, Entity($ref->{form});
}
say "<li><strong>$_</strong></li>" for Entity($row->{form});
my $children = $db->select(word => '*', {cat => $row->{id}, ref => undef}, 'grade, id');
while (my $ref = $children->hash) {
}
say "<li><strong>$_</strong></li>" for Entity($row->{form});
my $children = $db->select(word => '*', {cat => $row->{id}, ref => undef}, 'grade, id');
while (my $ref = $children->hash) {
- printf '<li><a href="/writer/%d">%s</a></li>', $ref->{id}, Entity($ref->{form});
+ printf '<li><a href="%s/%d">%s</a></li>', $editorurl, $ref->{id}, Entity($ref->{form});
<input type="hidden" name="cat" value="<:= $row->{id} :>" />
<input type="hidden" name="lang" value="<:= $row->{lang} :>" />
<input type="submit" value="Add" />
<input type="hidden" name="cat" value="<:= $row->{id} :>" />
<input type="hidden" name="lang" value="<:= $row->{lang} :>" />
<input type="submit" value="Add" />