<?php if ($loadtotal==1) { ?>
<a class="pull-right" href="#myModal" data-toggle="modal" onClick="get_analytics_ajax('get-analytic-form','analytics-content','0');">>>详细</a>
<span class="pull-right" title="entrances">Ent:<?php echo $total_visit['entrances']; ?>　</span>
<span class="pull-right" title="avgtimeonpage">Avg.time:<?php echo $total_visit['agv_time']; ?>　</span>
<span class="pull-right" title="uniquepageviews">UV:<?php echo $total_visit['uv']; ?>　</span>                 
<span class="pull-right" title="pageviews">PV:<?php echo $total_visit['pv']; ?>　</span>
<?php }else{ ?>
<div class="row-fluid" id="analytics-data">
  <div id="analytic-total">
    <span><strong>总访问量：</strong></span>
    <span class="">pageviews:<?php echo $total_visit['pv']; ?>，　</span>
    <span class="">uniquepageviews:<?php echo $total_visit['uv']; ?>，　</span>                 
    <span class="">avgtimeonpage:<?php echo gmstrftime('%H:%M:%S',$total_visit['agv_time']); ?>，　</span>
    <span class="">entrances:<?php echo $total_visit['entrances']; ?>　</span>
  </div>
<br>
<table class="table table-striped">
      <thead>
        <tr>
          <th>#</th>
          <th>source</th>
          <th>keyword</th>
          <th>pageviews</th>
          <th>uniquepageviews</th>
          <th>avgtimeonpage</th>
          <th>entrances</th>
          <th>exitrate</th>
          <th>pageValue</th>
          <th>date</th>
        </tr>
      </thead>
      <tbody>
        <?php if(!empty($analytics_list)){ ?>
        <?php foreach ($analytics_list as $key_a => $analytics) { ?>
        <tr>
          <td><?php echo $key_a+1; ?></td>
          <td><?php echo $analytics->kwa_source; ?></td>
          <td><?php echo $analytics->kwa_keyword; ?></td>
          <td><?php echo $analytics->kwa_pageviews; ?></td>
          <td><?php echo $analytics->kwa_uniquepageviews; ?></td>
          <td><?php echo gmstrftime('%H:%M:%S',ceil($analytics->kwa_avgtimeonpage)); ?></td>
          <td><?php echo $analytics->kwa_entrances; ?></td>
          <td><?php echo number_format($analytics->kwa_exitrate,1); ?>%</td>
          <td>$<?php echo number_format($analytics->kwa_conversionrate,2); ?></td>
          <td><?php echo date('Y年n月d',$analytics->kwa_datetime-7*24*60*60); ?>~<?php echo date('n月d',$analytics->kwa_datetime); ?></td>
        </tr>
        <?php } ?>
        <?php } ?>
      </tbody>
    </table>
</div>
<?php } ?>