-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathheader.php
More file actions
executable file
·112 lines (97 loc) · 3.51 KB
/
header.php
File metadata and controls
executable file
·112 lines (97 loc) · 3.51 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<?php
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2 of the License, or (at your
// option) any later version.
//
// File: header.php
if (preg_match("/header.php/i", $_SERVER['PHP_SELF']))
{
echo "You can not access this file directly!";
die();
}
get_post_ifset("no_body");
// Defines to avoid warnings
if ((!isset($no_body)) || ($no_body == ''))
{
$no_body = '';
}
$banner_top = "";
$lines = @file ("config/banner_top.inc");
for($i=0; $i<count($lines); $i++){
$banner_top .= $lines[$i];
}
$lines = file ("templates/" . $templatename . "base_template_list.inc");
for($i = 0; $i < count($lines); $i++){
$lines[$i] = trim($lines[$i]);
if($lines[$i] != "done"){
$base_template[$lines[$i]] = 1;
}
else
{
break;
}
}
function insert_img($params, &$tpl)
{
$class = (isset($params['class']) ? " class=\"iehax " . $params['class'] . "\" " : " class=\"iehax\" ");
$id = (isset($params['id']) ? " id=\"" . $params['id'] . "\" " : "");
$style = (isset($params['style']) ? " style=\"" . $params['style'] . "\" " : " ");
$border = (isset($params['border']) ? $params['border'] : 0);
$alt = (isset($params['alt']) ? $params['alt'] : "image");
static $firsttime = 0;
$str = '';
if($firsttime == 0)
{
$firsttime = 1;
$str = '
<style type="text/css">
<!--
span.iehax { display: none; }
img.iehaxblank { display: none; }
-->
</style>
<!--[if IE]>
<style type="text/css">
<!--
img.iehaxblank { display: inline ! important }
img.iehaximg { display: none ! important }
-->
</style>
<![endif]-->
';
}
$str .= '
<!--[if IE]>
<span ' . $id . $class . '
style="height: ' . $params['height'] . 'px;
width: ' . $params['width'] . 'px;
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'' .
$params['src'] . '\',sizingMethod=\'scale\');
display:inline; position:absolute; ">
</span>
<![endif]-->
<img class="iehaxblank" width="' . $params['width'] . '" height="' . $params['height'] . '"
src="images/spacer.gif" alt="." border="' . $border . '"/>
<img class="iehaximg" src="' . $params['src'] . '" alt="' . $params['alt'] . '"
width="' . $params['width'] . '" height="' . $params['height'] . '" border="' . $border . '"/>';
//return $str;
return "IAMHERE";
}
$currentprogram = basename($_SERVER['PHP_SELF']);
$currentprogram = str_replace(".php", ".inc", $currentprogram);
$template_object->assign("currentprogram", $currentprogram);
$template_object->assign("game_charset", $game_charset);
$template_object->assign("banner_top", $banner_top);
$template_object->assign("templatename", $templatename);
$template_object->assign("full_url", "http://" . $gameurl . $gamepath . ($gamepath == "/" ? "" : "/") );
$template_object->assign("player_id", $playerinfo['player_id']);
$template_object->assign("gameroot", $gameroot);
$template_object->assign("spiral_arm", $sectorinfo['spiral_arm']);
$template_object->assign("style_sheet_file", "templates/".$templatename."style.css");
$template_object->assign("Title", $title);
$template_object->assign("no_body", $no_body);
$template_object->send_now = 1 - $template_object->enable_gzip;
//$template_object->send_now = 1;
$template_object->display($templatename."header.tpl");
?>