sub getalert {
my ( $borrowernumber, $type, $externalid ) = @_;
my $dbh = C4::Context->dbh;
- my $query = "SELECT a.*, b.branchcode FROM alert a JOIN borrowers b USING(borrowernumber) WHERE";
+ my $query = "SELECT a.*, b.branchcode FROM alert a JOIN borrowers b USING(borrowernumber) WHERE 1";
my @bind;
if ($borrowernumber and $borrowernumber =~ /^\d+$/) {
- $query .= " borrowernumber=? AND ";
+ $query .= " AND borrowernumber=?";
push @bind, $borrowernumber;
}
if ($type) {
- $query .= " type=? AND ";
+ $query .= " AND type=?";
push @bind, $type;
}
if ($externalid) {
- $query .= " externalid=? AND ";
+ $query .= " AND externalid=?";
push @bind, $externalid;
}
- $query =~ s/ AND $//;
my $sth = $dbh->prepare($query);
$sth->execute(@bind);
return $sth->fetchall_arrayref({});
</div>
<div class="span10">
<div id="userdetails" class="maincontent">
+
+ [% IF adminWarning %]
+ <div id="adminwarning" class="dialog alert">
+ <p>
+<strong><i class="fa fa-exclamation-triangle"> </i> Warning:</strong>
+Using this account is not recommended because some parts of Koha will not function as expected. Instead, please log in with a different account.
+<a class="btn btn-small" href="/cgi-bin/koha/opac-main.pl?logout.x=1">
+<i class="fa fa-sign-out"> </i> Log out</a>
+ </p>
+ </div>
+ [% END %]
+
[% IF ( bor_messages ) %]
<div class="alert alert-info">
<h3>Messages for you</h3>
$template->param( shibbolethAuthentication => C4::Context->config('useshibboleth') );
+if (!$borrowernumber) {
+ $template->param( adminWarning => 1 );
+}
+
# get borrower information ....
my ( $borr ) = GetMemberDetails( $borrowernumber );