/    Sign up×
Community /Pin to ProfileBookmark

php image problem

Hi all I am using a joomla website with a live support section. The live support is by live zilla.

When you visit the site [url]www.pristine-it.ie[/url] using internet explorer the live support image that indecates either online or offline only shows when it feels like it. I dont have this problem with firefox.

Have a look at the site using IE and flick back and forth through the menus and you will see what i mean.

Here is the code used to place the image and the code from the file that determins which image to show.

This is the code entered in to the joomla site.

<!– [url]http://www.LiveZilla.net[/url] Chat Button Link Code –><a href=”javascript:void(window.open(‘http://www.pristine-it.ie/support/livezilla.php’,”,’width=600,height=600,left=0,top=0,resizable=yes,menubar=no,location=yes,status=yes,scrollbars=yes’))”><img src=”http://www.pristine-it.ie/support/image.php?id=01” width=”150″ height=”139″ border=”0″ alt=”LiveZilla Live Help”></a><noscript><div><a href=”http://www.pristine-it.ie/support/livezilla.php” target=”_blank”>Start Live Help Chat</a></div></noscript><!– [url]http://www.LiveZilla.net[/url] Chat Button Link Code –>

This is the code to retrive the appreate image.

<?php

/****************************************************************************************
*
LiveZilla image.php
*
*
Copyright 2001-2009 SPAUN Power GmbH
* All rights reserved.
*
LiveZilla is a registered trademark.
*
*
Improper changes to this file may cause critical errors. It is strongly
* recommended to desist from editing this file.
*

**
*************************************************************************************/

define(“IN_LIVEZILLA”,true);

if(!defined(“LIVEZILLA_PATH”))
define(“LIVEZILLA_PATH”,”./”);

@set_time_limit(30);

require(LIVEZILLA_PATH . “_definitions/definitions.inc.php”);
require(LIVEZILLA_PATH . “_
definitions/definitions.files.inc.php”);
require(LIVEZILLA_PATH . “_lib/objects.global.users.inc.php”);
require(LIVEZILLA_PATH . “_
config/config.inc.php”);
require(LIVEZILLA_PATH . “_definitions/definitions.dynamic.inc.php”);
require(LIVEZILLA_PATH . “_
definitions/definitions.protocol.inc.php”);
require(LIVEZILLA_PATH . “_lib/functions.global.inc.php”);

@set_error_handler(“handleError”);
@error_reporting(E_ALL);

header(“Connection: close”);
header(“Pragma: no-cache”);
header(“Cache-Control: no-cache, must-revalidate”);

setDataProvider();
$exclude = (isset($_GET[GET_EXTERN_HIDDEN_GROUPS])) ? explode(“?”,base64UrlDecode($_GET[GET_EXTERN_HIDDEN_GROUPS])) : null;
$html = “”;
if(isset($_GET[“id”]) && strpos($_GET[“id”],”..”) === false)
{
$id = $_GET[“id”];
header(“Content-Type: image/png;”);
if(operatorsAvailable(0,$exclude) > 0 && file_exists(“./banner/livezilla_
“.$id.”_1.png”))
exit(readfile(“./banner/livezilla_
“.$id.”_1.png”));
else if(file_exists(“./banner/livezilla_
“.$id.”_0.png”))
exit(readfile(“./banner/livezilla_
“.$id.”_0.png”));
else
header(“HTTP/1.0 404 Not Found”);
}
else if(isset($_
GET[“v”]))
{
$parts = explode(“<!>”,base64UrlDecode(str_replace(” “,”+”,$_GET[“v”])));
if(count($parts) > 3 && strlen($parts[3]) > 0)
$parts[0] = str_replace(“<!–class–>”,”class=“”.$parts[3].”“”,$parts[0]);
else if(count($parts) > 0)
$parts[0] = str_replace(“<!–class–>”,””,$parts[0]);

if(count($parts) > 1 && operatorsAvailable(0,$exclude) > 0)
$html = str_replace(“<!–text–>”,$parts[1],$parts[0]);
else if(count($parts) > 2)
$html = str_replace(“<!–text–>”,$parts[2],$parts[0]);
exit(“document.write(“”.$html.””);”);

}
unloadDataProvider();
?>

Any Idea Guys
Thanks

to post a comment
PHP

0Be the first to comment 😎

×

Success!

Help @aiden857181 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.6,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...