getthemes.pl
Copying Source is Forbidden
54 lines of code
1
#!/usr/local/bin/perl
2
3
# must have's!
4
use strict;
5
use warnings;
6
use CGI::Carp qw(fatalsToBrowser);
7
use DBI;
8
use URI::Escape;
9
10
use lib "/var/www/html/Pm";
11
12
use Bc_chef qw(cookie_get);
13
use Bc_misc qw(get_param);
14
use Bc_sql qw(
15
get_constant
16
sql_execute
17
user_exists
18
$QUERY_PAGE
19
$QUERY_UID
20
$LOGGEDIN
21
get_themes
22
23
$DB
24
);
25
26
use Redir qw(error_redir);
27
use Security qw(banned);
28
use Html qw(pre_html_header);
29
30
my $DEBUG = 0;
31
if (not user_exists($LOGGEDIN) or banned($LOGGEDIN)) {
32
my $msg = "Access Denied";
33
if ($DEBUG) { $msg .= " (getthemes.pl)"; }
34
print error_redir("/", $msg);
35
36
exit 1;
37
}
38
39
print pre_html_header({type=>"text/plain"});
40
41
my $editor = get_param("a");
42
my @themes = get_themes(0, $editor);
43
44
my $rv = "";
45
#$rv .= "$editor=$editor-----\n";
46
47
foreach my $t (@themes) {
48
$rv .= "$t-----";
49
}
50
$rv =~ s/-----$//;
51
print $rv;
52
53
54
exit 1;