I've posted this elsewhere but I got no help >.>;
I have a system for it set-up on my site and it works fine on the main page but when I go to like /members/ or /ucp/ it stops working and reverts to the old images that were used. Any help? and Yes I've changed them.
Or not...?
That is my code. ._. Its working on /home/ and / but no where else.
I have a system for it set-up on my site and it works fine on the main page but when I go to like /members/ or /ucp/ it stops working and reverts to the old images that were used. Any help? and Yes I've changed them.
Or not...?
PHP:
<?php
header("Content-Type: application/javascript; charset=UTF-8");
require("../configuration.db.php");
?>
$(document).ready(function() {
<?php
foreach($_SESSION as $key => $value){
?>
//alert('<?=$key?>: <?=$value?>');
<?
if($value == 'Disabled'){
?>
$("#<?=$key?>").toggle();
document.<?=$key?>_Click.src = '<?=SITE_LINK?>img/Icons/show.png';
<?php
}else{
?>
$("#<?=$key?>").toggle();
document.<?=$key?>_Click.src = '<?=SITE_LINK?>img/Icons/hide.png';
<?php
}
}
?>
<?php
$getBlocks = $db->dbQuery("SELECT * FROM `".DB_PREFIX."blocks` WHERE `side` = 'left' OR `side` = 'right';");
while($getBlks = $db->dbFetch($getBlocks)){
?>
$("#<?=$Functions->replaceSpaces($getBlks->title)?>_Click").click(function() {
$("#<?=$Functions->replaceSpaces($getBlks->title)?>").slideToggle("normal");
if(document.<?=$Functions->replaceSpaces($getBlks->title)?>_Click.src == '<?=SITE_LINK?>img/Icons/show.png'){
document.<?=$Functions->replaceSpaces($getBlks->title)?>_Click.src = '<?=SITE_LINK?>img/Icons/hide.png';
<?php
$_SESSION[$Functions->replaceSpaces($getBlks->title)] = "Enabled";
?>
}else{
document.<?=$Functions->replaceSpaces($getBlks->title)?>_Click.src = '<?=SITE_LINK?>img/Icons/show.png';
<?php
$_SESSION[$Functions->replaceSpaces($getBlks->title)] = "Disabled";
?>
}
});
<?php
}
?>
/*
REGULAR CONTENT FRONT PAGE
*/
$("#Greetings_Content_Click").click(function() {
$("#Greetings_Content").slideToggle("normal");
if(document.Greetings_Content_Click.src == '<?=SITE_LINK?>img/Icons/show.png'){
document.Greetings_Content_Click.src = '<?=SITE_LINK?>img/Icons/hide.png';
<?php
$_SESSION['Greetings_Content'] = "Enabled";
?>
}else{
document.Greetings_Content_Click.src = '<?=SITE_LINK?>img/Icons/show.png';
<?php
$_SESSION['Greetings_Content'] = "Disabled";
?>
}
});
$("#Whats_In_Store_Click").click(function() {
$("#Whats_In_Store").slideToggle("normal");
if(document.Whats_In_Store_Click.src == '<?=SITE_LINK?>img/Icons/show.png'){
document.Whats_In_Store_Click.src = '<?=SITE_LINK?>img/Icons/hide.png';
<?php
$_SESSION['Whats_In_Store'] = "Enabled";
?>
}else{
document.Whats_In_Store_Click.src = '<?=SITE_LINK?>img/Icons/show.png';
<?php
$_SESSION['Whats_In_Store'] = "Disabled";
?>
}
});
});
That is my code. ._. Its working on /home/ and / but no where else.