Merge branch 'master' of https://github.com/jgoodman/Freeside
[freeside.git] / httemplate / search / sql.html
1 <& elements/search.html,
2                'title' => 'Query Results',
3                'name'  => 'rows',
4                'query' => "SELECT $sql",
5           
6 &>
7 <%init>
8
9 die "access denied"
10   unless $FS::CurrentUser::CurrentUser->access_right('Raw SQL');
11
12 my $sql = $cgi->param('sql') or errorpage('Empty query');
13 $sql =~ s/;+\s*$//; #remove trailing ;
14
15 </%init>