4 use lib '/srv/koha_ffzg';
6 $ENV{KOHA_CONF} = '/etc/koha/sites/ffzg/koha-conf.xml';
10 use Data::Dump qw(dump);
17 join biblio on biblio.biblionumber = items.biblionumber where barcode = ?
20 my $dbh = C4::Context->dbh;
21 my $sth = $dbh->prepare($sql);
23 my $sth_update = $dbh->prepare(qq{
24 update items set datelastseen = now() where barcode = ?
30 my $barcode = $c->param('barcode');
32 $sth->execute( $barcode );
33 while ( my $row = $sth->fetchrow_hashref ) {
34 warn "# row ",dump($row);
35 $c->stash( $_ => $row->{$_} ) foreach keys %$row;
37 $sth_update->execute( $barcode );
38 $c->render(template => 'index');
47 %= form_for '/' => begin
48 %#= text_field 'barcode'
49 <input name=barcode size=10 autofocus>
50 %= submit_button 'Scan'
53 <%= stash('author') %>
54 <b><%= stash('title') %></b>
56 @@ layouts/default.html.ep
65 <title>Inventura</title>
67 <body><%= content %></body>