|
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" );
}
|