-
Notifications
You must be signed in to change notification settings - Fork 0
/
theme.php
57 lines (54 loc) · 1.68 KB
/
theme.php
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
48
49
50
51
52
53
54
55
56
57
<?php
include("./config.php");
$fl = new TemplatePower("./templates/theme.tpl");
require("./header.php");
$file=eregi_replace($_SERVER['SERVER_NAME'], "", $_SERVER['REQUEST_URI']);
if($fileroot!="")
{
$file=eregi_replace($fileroot, "", $file);
}
$var=explode("/", $file);
$query="SELECT name, description FROM fl_worlds WHERE approved='1' AND id='".invoer($var[2])."'";
$result=mysql_query($query);
$keywords = '';
if(mysql_num_rows($result)==1)
{
$row=mysql_fetch_row($result);
$fl->assign("_ROOT.SITENAAM", $sitenaam." / ".opmaak($row[0]));
$fl->newBlock("theme");
$fl->assign("THEME", opmaak($row[0]));
$fl->assign("DESCRIPTION", opmaak($row[1]));
$keywords.=opmaak($row[0]).", ";
$bquery="SELECT id, title FROM fl_books WHERE world='".invoer($var[2])."' AND approved!='0000-00-00 00:00:00'";
$bresult=mysql_query($bquery);
$baantal=mysql_num_rows($bresult);
if($baantal>0)
{
$fl->newBlock("bookheader");
if($baantal==1)
{
$fl->assign("BOOKHEADER", "Book with this theme");
}
else
{
$fl->assign("BOOKHEADER", "Books with this theme");
}
while($brow=mysql_fetch_row($bresult))
{
$fl->newBlock("books");
$fl->assign("BID", opmaak($brow[0]));
$fl->assign("BOOK", opmaak($brow[1]));
$keywords.=opmaak($brow[1]).", ";
}
}
}
else
{
$fl->newBlock("feedback");
$fl->assign("FEEDBACK", "Something seems to be wrong: make sure you have the correct link, or else <a href=\"".$fileroot."/themes.php\">check this list</a> to find the theme you are looking for");
$fl->assign("_ROOT.SITENAAM", $sitenaam." / Theme not found");
}
$keywords.="Theme Details";
$fl->assign("_ROOT.KEYWORDS", $keywords);
$fl->printToScreen();
?>