<div class="top" id="top" style="    width: 100%;    margin: 0 auto;">
    <div class="kf">
      <p style="float:left;"><i></i><span>服务热线:<?php echo configW('tel'); ?></span></p>
      <?php if(!empty($_SESSION["glo_username"])){ ?> 
          <div class="welcome"><p><a>您好，欢迎您 </a><a href="/user/index.php"><?php  echo $userConfig['username'];?></a>
          <a href="/user/msg.php">站内信(<font id="top_msg"></font>)<font id="top_playSound"></font></a>
          <a href="/action/login.php?action=loginout">退出会员中心</a><p></div>
       <?php }else{ ?>
      <p style="float:right;">欢迎您来到<?php echo configW('webname'); ?><a href="/login.php">登录</a><a href="/register.php">注册</a></p>
      <?php } ?>
    </div>
  </div>
<div class="menu-wrap">
  <div class="menu">
    <img src="/public/Front2/images/logo.png" />
    <ul>
      <?php $thisM =  $_SERVER['PHP_SELF'];?>
      <li><a href="/">首页</a></li>
      <li <?php if(checkstrMenu('project',$thisM)){ echo ' class="on"';} ?>><a href="/projectlist.php?type=rt">投资项目</a></li>
      <li <?php if(checkstrMenu('user',$thisM)){ echo ' class="on"';} ?>><a href="/user/index.php">会员中心</a></li>
      <li <?php if(checkstrMenu('safety',$thisM)){ echo ' class="on"';} ?>><a href="/safety.php">安全保障</a></li>
      <li <?php if(checkstrMenu('service',$thisM)){ echo ' class="on"';} ?>><a href="/service/jr.php?type=about">帮助中心</a></li>
      <li <?php if(checkstrMenu('aboutus',$thisM)){ echo ' class="on"';} ?>><a href="/aboutus/jianjie.php">关于我们</a></li>
    </ul>
  </div>
</div>

<script type="text/javascript">
 //播放提示音
function playSound(name,str){  
   $("#"+name+"").html('<embed width="0" height="0"  src="/public/Front/sound/'+str+'" autostart="true" loop="false">');
 }

function total() {
   $.get("/action/user.php?action=msg_Unread",function(data){
     top_msg = parseInt($("#top_msg").text()); //统计未读短信
    
  //   //赋值到模板
     $("#top_msg").html(data); //统计未读短信
    
  //   //未读站内短信提示
    if (data > 0) {
      playSound('top_playSound','msg.mp3');
    }
  });
}
total();
setInterval("total()",3000000);
</script> 