-
Notifications
You must be signed in to change notification settings - Fork 0
/
Post.pl
executable file
·47 lines (37 loc) · 952 Bytes
/
Post.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/perl
use strict;
use warnings;
use Template;
use CGI;
use Blog;
use User;
use Post;
use Category;
use Data::Dumper;
print "Content-type:text/html\n\n";
print "<html><head><title>DedicatedToServers</title>";
print "<link rel='stylesheet' type='text/css' href='css/style.css' version=01>";
print "</head>\n\n";
print "<body>\n";
my $template = Template->new();
my $Blog = Blog->new();
my $User = User->new();
my $Posts = Post->new();
my $Category = Category->new();
my ($Cats,@arrRtn) = $Category->GetCategories();
my $Users = $User->GetUsers();
my $req = new CGI;
my $ActivePost = $req->param("pid");
my $Post = $Posts->GetPost($ActivePost);
my $Top3 = $Posts->GetTop3Posts();
my $WhoAmI = $Posts->WhoAmI();
my $vars = {
categories => $Cats,
users => $Users,
post => $Post,
top3 => $Top3,
page => "Post",
whoami => $WhoAmI,
};
$template->process('views/Layout.tt', $vars);
print "</body></html>";