-
Notifications
You must be signed in to change notification settings - Fork 0
/
NOLOHBadge.php
executable file
·40 lines (38 loc) · 1.31 KB
/
NOLOHBadge.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
<?php
class NOLOHBadge extends Panel
{
private $VersionLabel;
function NOLOHBadge($left=0, $top=0, $textOnly = false, $showVersion = true)
{
parent::Panel($left, $top, null, null);
$this->ToolTip = 'powered by NOLOH';
$imagePath = GetRelativePath(dirname($_SERVER['SCRIPT_FILENAME']), dirname(__FILE__) .'Images');
if($textOnly)
{
$poweredBy = new Link('http://www.noloh.com', 'powered by noloh');
$poweredBy->Height = 18;
$poweredBy->Width = 105;
$poweredBy->CSSFontSize = '12px';
$poweredBy->CSSFontFamily = 'helvetica, arial';
}
else
{
$link = new Image(GetRelativePath(dirname($_SERVER['SCRIPT_FILENAME']), dirname(__FILE__) .'/Images') .'/PoweredBy.png');
$poweredBy = new Link('http://www.noloh.com', $link);
}
$poweredBy->Target = Link::Blank;
$this->Controls->Add($poweredBy);
if($showVersion)
{
$this->Controls->Add($this->VersionLabel = new Label(GetNOLOHVersion(), $poweredBy->Right, 0));
$this->VersionLabel->ReflectAxis('y');
$this->VersionLabel->Color = '#011f43';
$this->VersionLabel->CSSFontSize = '12px';
$this->VersionLabel->CSSFontFamily = 'helvetica, arial';
}
$this->Height = $poweredBy->Height;
$this->Width = $this->VersionLabel->Right;
}
function GetVersionLabel() {return $this->VersionLabel;}
}
?>