0) && ($tmp != "")) { $result .= "=\"$tmp\""; } $tmp=""; $attrib=-1; } break; case "=": # an equal - attrib delimiter if ($quote==0) { # Is it found in a string ? $attrib=1; if ($tmp!="") $result.=" $tmp"; $tmp=""; } else $tmp .= '='; break; case " ": # a blank ? if ($attrib>0) { # add it to the string, if one opened. $tmp .= $string[$i]; } break; default: # Other if ($attrib<0) # If we weren't in an attrib, set attrib to 0 $attrib=0; $tmp .= $string[$i]; break; } $i++; } if (($quote!=0) && ($tmp != "")) { if ($attrib==1) $result .= "="; /* If it is the value of an atrib, add the '=' */ $result .= "\"$tmp\""; /* Add quote if needed (the reason of the function ;-) */ } return $result; } function check_html ($str, $strip="") { /* The core of this code has been lifted from phpslash */ /* which is licenced under the GPL. */ include("config.php"); if ($strip == "nohtml") $AllowableHTML=array(''); $str = stripslashes($str); $str = eregi_replace("<[[:space:]]*([^>]*)[[:space:]]*>", '<\\1>', $str); // Delete all spaces from html tags . $str = eregi_replace("]*href[[:space:]]*=[[:space:]]*\"?[[:space:]]*([^\" >]*)[[:space:]]*\"?[^>]*>", '', $str); # " // Delete all attribs from Anchor, except an href, double quoted. $str = eregi_replace("]*)>",$str,$reg)) { $i = strpos($str,$reg[0]); $l = strlen($reg[0]); if ($reg[1][0] == "/") $tag = strtolower(substr($reg[1],1)); else $tag = strtolower($reg[1]); if ($a = $AllowableHTML[$tag]) if ($reg[1][0] == "/") $tag = ""; elseif (($a == 1) || ($reg[2] == "")) $tag = "<$tag>"; else { # Place here the double quote fix function. $attrb_list=delQuotes($reg[2]); // A VER $attrb_list = ereg_replace("&","&",$attrb_list); $tag = "<$tag" . $attrb_list . ">"; } # Attribs in tag allowed else $tag = ""; $tmp .= substr($str,0,$i) . $tag; $str = substr($str,$i+$l); } $str = $tmp . $str; return $str; exit; /* Squash PHP tags unconditionally */ $str = ereg_replace("<\?","",$str); return $str; } function filter_text($Message, $strip="") { global $EditedMessage; check_words($Message); $EditedMessage=check_html($EditedMessage, $strip); return ($EditedMessage); } ############################################## //functions ############################################## ##footer_links function footer_msg(){ ?> o $cat_name
"; } */ $result=mysql_query("select feeds_category.id as cat_id, feeds_category.category, count(feed.id) from feeds_category, feed where feed.cat_id=feeds_category.id and feed.accepted=1 group by feeds_category.category"); while(list($cat_id,$cat_name, $cat_total)= mysql_fetch_array($result)) { echo"$cat_name
"; } } ##latest feeds function newfeeds(){ $result=mysql_query(" select feed.id, feed.title, feed.link, feed.description, feed.date, feed.votes, feed.votes_total, feed.hits, feed.rss, feed.atom, feed.pod, feed.blog, feeds_category.category, feeds_category.id as cat_id from feed, feeds_category where feeds_category.id=feed.cat_id and feed.accepted=1 order by feed.id DESC limit 10 "); ?>






Categories


feedNuts.com 2010