View Single Post
Old July 20th, 2005, 01:58 PM   #17 (permalink)
prodigy
Member
Verified Customer
 
Join Date: Jul 2005
Posts: 53
Is this code working for mine ???

if ( $action == "catopts" ) {
// Lets check the need to expand/collapse categories
if ( isset($expand) || isset($implode) ) {
if ( is_numeric($expand) ) {
if ( $expand > 0 && strstr($cpcollapse, ",$expand,") ) {
$cpcollapse = str_replace( ",$expand,", "", $cpcollapse );
setcookie( "cpcollapse", $cpcollapse, time()+2592000 );
}
}

if ( is_numeric($implode) ) {
if ( $implode > 0 && !strstr($cpcollapse, ",$implode,") ) {
$cpcollapse .= ",$implode,";
setcookie( "cpcollapse", $cpcollapse, time()+2592000 );
}
}
}

$more = ( isset($cat) ? "?cat=$cat" : "" );
header( "Location: $script.php$more" );
}
prodigy is offline   Reply With Quote