$v) if ($rw[$v]!="") $tt[] = $rw[$v]; $tit = join(" - ",$tt); if ($tit == "") $tit = "Аудиозапись"; if (!$rw[processed]) $tit.=" (аудио еще в обработке)"; if ($enable_edit && $rw[user] == $user[id]) { $service_id = mss_get_service_id("audio",0)+0; $link="редактировать"; }else { $auser = mss_get_user_info($rw[user]); $link="".mss_get_user_name($auser).""; } $out = "
$link
".$tit."
".mss_print_length($rw[length])."
"; $out.="
"; $out.=""; return $out; } function mss_get_audio_tags($aids) { global $to_id; $tags = ""; $max = 0; $min=1000000; $tag_cnt = array(); if (count($aids)>0) { $res = mysql_query_b("select tag,count(*) as cnt from audio_tags_map where audio_id in(".join(",",$aids).") group by tag"); while ($rw = mysql_fetch_array($res)) { $tag_cnt[$rw[tag]] = $rw[cnt]; } arsort($tag_cnt); $tag_cnt_out = array(); foreach ($tag_cnt as $k=>$v) if (count($tag_cnt_out)<40) { $tag_cnt_out[$k] = $v; if ($v>$max) $max = $v; if ($v<$min) $min = $v; } if ($tag_cnt_out) { $res = mysql_query_b("select * from audio_tags where id in(".join(",",array_keys($tag_cnt_out)).") order by tag"); while ($rw = mysql_fetch_array($res)) { $rw[cnt] = $tag_cnt_out[$rw[id]]; $tar[$rw[tag]] = $rw; } } }else { $res = mysql_query_b("select * from audio_tags where cnt>0 order by cnt desc limit 0,40"); while ($rw = mysql_fetch_array($res)) { $tar[$rw[tag]] = $rw; if ($rw[cnt]>$max) $max = $rw[cnt]; if ($rw[cnt]<$min) $min = $rw[cnt]; } } if ($tar && count($tar)) { ksort($tar); reset($tar); } if ($to_id>0) $url = "submode=audio&"; else $url = "mode=audio&"; if ($tar && count($tar)) { while (list($k,$rw) = each($tar)) { if ($tags!="") $tags.=" "; if ($max>$min) $class="mss_t_".((int)(($rw[cnt]-$min)*28/($max-$min)+1)); else $class="mss_t_1"; $tags.="".$rw[tag].""; } } return $tags; } function mss_get_tag_audio($id) { global $audio_tags_data; if ($audio_tags_data[$id]) return $audio_tags_data[$id][tag]; $res = mysql_query_b("select * from audio_tags where id=".$id); if ($rw = mysql_fetch_array($res)) $audio_tags_data[$id] = $rw; return $audio_tags_data[$id][tag]; } ?> Радио-новости на Findnews.ru, новости, последние события, хроники, поиск по новостям findnews.ru
Последние новости, комментарии Поиск по новостям Сегодня:
Все самые последние новости на FindNews.Ru

Радио-новости

Rambler