if (!empty($this->options['page']['footer'])) {
$style = empty($this->options['page']['footer_style']) ? '' :
' style="' . $this->options['page']['footer_style'] . '"';
$title = empty($this->options['page']['footer_text']) ? '' :
' title="' . $this->options['page']['footer_text'] . '"';
$text = empty($this->options['page']['footer_text']) ||
!empty($this->options['page']['footer_image']) ? '' : $this->options['page']['footer_text'];
if (empty($this->options['page']['footer_image'])) {
$background_image = $background_style = '';
} else {
$background_image = str_replace($this->view->paths['full']['document_root'], "/", $this->options['css']['cachedir']) .
$this->options['page']['footer_image'];
$image_style =
'display:block;text-decoration:none;width:100px;height:100px;';
if (in_array($this->ua_mod, array('.ie5', '.ie6'))) {
$background_style = $image_style .
'filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=' .
$background_image .
',sizingMethod=\'scale\')';
} else {
$background_style = $image_style .
'background:url(' .
$background_image .
')';
}
$background_style = ' style="' . $background_style . '"';
}
if (empty($text)) {
$el = 'a href="http://www.web-optimizer.us/" rel="nofollow"';
$el_close = 'a';
} else {
$el = $el_close = 'span';
}
$stamp = '<div' .
$style .
'><' .
$el .
$title .
$background_style .
'>'.
$text .
'</' .
$el_close .
'></div>';
if ($this->options['page']['html_tidy'] &&
($bodypos = strpos($this->content, '</body>'))) {
$this->content = substr_replace($this->content,
$stamp, $bodypos, 0);
} elseif ($this->options['page']['html_tidy'] &&
($bodypos = strpos($this->content, '</BODY>'))) {
$this->content = substr_replace($this->content,
$stamp, $bodypos, 0);
} else {
$this->content = preg_replace("@</body>@i",
$stamp . "$0", $this->content);