First pass at adding key files
This commit is contained in:
27
site/forum.slowtwitch.com/cgi-bin/widget.cgi
Executable file
27
site/forum.slowtwitch.com/cgi-bin/widget.cgi
Executable file
@ -0,0 +1,27 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
use strict;
|
||||
use lib '/var/home/slowtwitch/slowtwitch.com/cgi-bin/articles/admin';
|
||||
|
||||
use Links qw/$PLG $IN $DB/;
|
||||
use Links::User::Page;
|
||||
|
||||
local $SIG{__DIE__} = \&Links::fatal;
|
||||
|
||||
Links::init('/var/home/slowtwitch/slowtwitch.com/cgi-bin/articles/admin');
|
||||
|
||||
my $id = $IN->param('id');
|
||||
|
||||
print $IN->header;
|
||||
if ($id) {
|
||||
my $tab = $DB->table('Widgets');
|
||||
my $widget = $tab->get($id);
|
||||
|
||||
if ($widget) {
|
||||
if ($widget->{Image}) {
|
||||
my $fh = $tab->file_info('Image', $widget->{ID});
|
||||
$widget->{Image_URL} = '/images/widgets/' . $fh->File_RelativeURL;
|
||||
}
|
||||
print Links::SiteHTML::display('include_widgets', { widgets_loop => [$widget] });
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user