1 <&| SELF:wrapper, title => "odin.gg Paste Bin" &>
2 <h1><tt>odin.gg</tt> Paste Bin</h1>
4 % my $sep = "<div class=menu>\n";
8 <span class="item"><a href="<% "$Odin::PASTEBIN/$tag" %>">View</a></span>
9 <span class="item"><a href="<% "$Odin::PASTEBIN/$tag?edit=$edit;op=del" %>">Delete</a></span>
10 <span class="item"><a href="<% "$Odin::PASTEBIN/" %>">New</a></span>
11 % $sep = ""; $end = "</div>\n";
15 <form method="POST" action="<% "$Odin::PASTEBIN/$tag" %>"
16 accept-charset="UTF-8" enctype="multipart/form-data">
17 <div class="pastebin">
18 % if (defined $edit) {
19 <input type="hidden" name="edit" value="<% $edit |h %>">
22 <label class="invis" for="content" accesskey="c"><u>C</u>ontent</label>
23 <textarea id="content" name="content" rows=48 cols=80><%
24 $content |h %></textarea>
26 <div class="paste-widgets">
28 <label class="invis" for="lang" accesskey="l"><u>L</u>abel</label>
29 <select id="lang" name="lang" default="txt">
30 % my $lh = $db->selectall_hashref
31 % ("SELECT lang, descr FROM odin_pastebin_lang", "descr");
32 % for my $d (sort { Odin::nice_name $a cmp Odin::nice_name $b }
34 % my $l = $lh->{$d}{lang};
35 <option value="<% $l %>"<%
36 $l eq $lang ? " selected" : "" %>><%
41 <label class="invis" for="title" accesskey="t"><u>T</u>itle</label>
42 <input id="title" name="title" value="<% $title |h %>">
44 <button type="submit">Go</button>
56 $title => "(untitled)"
60 my $db = Odin::open_db;