summaryrefslogtreecommitdiff
path: root/cgi-bin/mat.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'cgi-bin/mat.cgi')
-rwxr-xr-xcgi-bin/mat.cgi18
1 files changed, 15 insertions, 3 deletions
diff --git a/cgi-bin/mat.cgi b/cgi-bin/mat.cgi
index d6e3d2d..793671a 100755
--- a/cgi-bin/mat.cgi
+++ b/cgi-bin/mat.cgi
@@ -40,7 +40,7 @@ sub unauthorized()
sub send_cookie()
{
- print $session->header(-type => 'text/plain', -charset => 'utf8');
+ print $session->header(-type => 'text/html', -charset => 'utf8');
}
sub cmd_view($)
@@ -54,8 +54,20 @@ sub cmd_view($)
"recipes AS r JOIN inventory AS i ON i.recipe_id=r.id WHERE i.id=".$id.
";");
- print $id, "\n", $$recipe_row[0], "\n", $$recipe_row[1], "\n",
- $$recipe_row[2], "\n";
+ print $id, "<br />", $$recipe_row[0], "<br />", $$recipe_row[1], "<br />";
+ if(substr($$recipe_row[2], 0, 4) eq "http") {
+ print '<a href="'.$$recipe_row[2].'">'.$$recipe_row[2].'</a>', "<br />";
+ } else {
+ print $$recipe_row[2], "<br />";
+ }
+ if ($session->param('authenticated') eq "yes") {
+ print "<font size=20>\n";
+ for my $store ( split(" ", $Config{'relocate_stores'}) ) {
+ print " <a href=".$Config{'label_id_prefix'}."$id/relocate/$store>".
+ "$store</a> \n";
+ }
+ print "</font>";
+ }
}
sub cmd_relocate($$)