<?
$url_page = $_SERVER['REQUEST_URI'];
$bg = 'class="mmmenum"';
$bg1 = 'class="mmenum"';

if ( strpos( $url_page, 'mread' ) or strpos( $url_page, 'mout' ) ) {
    $btn_dialog = '<span class="mmmenum">Диалог</span>';
} else {
    $btn_dialog = '';
}
?>
<div class="member_top_menu"><a href="/msg=inbox"  onclick="Page.Go(this.href); return false;" <? if ( strpos( $url_page, 'inbox' ) ) echo $bg; else echo $bg1; ?>>Полученные</a><a href="/msg=outbox"  onclick="Page.Go(this.href); return false;" <? if ( strpos( $url_page, 'outbox' ) ) echo $bg; else echo $bg1; ?>>Отправленные</a><?=$btn_dialog?></div>