<php
$fields = !empty($fields) ? explode( ',',$fields ) : array();
if(count($fields)>0){
$xfields = xfieldsload();
$newxfields = array();
foreach($xfields as $val){if(in_array($val[0], $fields) && $val[6]==1) {$newxfields[] = str_replace("\r\n", ",", $val[4] );}}
if(count($newxfields)>0){
$value3 = array();
foreach($newxfields as $val){
$temp_array = explode(",", $val );
foreach ($temp_array as $value2) {
$value2 = trim($value2);
$value2 = str_replace("'", "'", $value2);
if( $config['allow_alt_url'] ) $value3[] = " <li><a href=\"/xfsearch/" . urlencode( $value2 ) . "/\">" . $value2 . "</a>";
else $value3[] = "<a href=\"index.php?do=xfsearch&xf=" . urlencode( $value2 ) . "\">" . $value2 . "</a></li> ";
}
$content = implode(" ", $value3);
}
echo $content;
}
}
?>