<div id="leftmenu">

    <div class="title"><h1>统计分析导航</h1></div>
    <dl>
        <dt>筛选统计</dt>
        <div id="analytics_search_box">
            <form id="form_analytics" method="GET" action="<?php echo site_url('analytics'); ?>">
                <label>网站:</label>
                <select name="site_code" class="L160">
                    <option value="">所有网站</option>
                    <?php
                    foreach ($sites as $site):
                        ?>
                        <option value="<?php echo $site; ?>" <?php if ($site === $cur_site_code): ?>selected="selected"<?php endif; ?> >
                            <?php echo $site; ?>
                        </option>
                    <?php endforeach; ?>
                </select>

                <br/>
                <label>作者:</label>
                <select name="author" class="L160">
                    <option value="">所有作者</option>
                    <?php
                    foreach ($authors as $author):
                        ?>
                        <option value="<?php echo $author; ?>" <?php if ($author === $cur_author): ?>selected="selected"<?php endif; ?> >
                            <?php echo $author; ?>
                        </option>
                    <?php endforeach; ?>
                </select>

                <br/>
                <label>排序:</label>
                <select name="order" class="L160">
                    <option value="">排序方式</option>
                    <option value="order" <?php if ('order' === $cur_order): ?>selected="selected"<?php endif; ?>>按订单</option>
                    <option value="hit" <?php if ('hit' === $cur_order): ?>selected="selected"<?php endif; ?>>按访问量</option>
                </select>

                <br/>
                <label>时间:</label>
                <input type="text" name="start" value="<?php
                    if ($cur_start)
                    {
                        echo date('Y-m-d', $cur_start);
                    }
                    ?>" placeholder="开始时间" class="L75 datepicker">
                <input type="text" name="end" value="<?php
                    if ($cur_start)
                    {
                        echo date('Y-m-d', $cur_end);
                    }
                    ?>" placeholder="结束时间" class="L75 datepicker">

                <br/>
                <label>URL:</label>
                <input type="text" class="L160" name="url" value="<?php echo $cur_url; ?>">

                <br/>
                <input class="fR" type="submit" value="搜索" />
            </form>
        </div>

    </dl>

    <dl>
        <dt>首访统计功能导航</dt>
        <dd><a href="<?php echo site_url('analytics'); ?>">统计分析</a></dd>  
        <dd><a href="<?php echo site_url('analytics/visit'); ?>">访客列表</a></dd>
        <dd><a href="<?php echo site_url('analytics/leave'); ?>">常见退出页面</a></dd>
        <dd><a href="<?php echo site_url('analytics/mine'); ?>">我的统计</a></dd>
        <dd><a href="<?php echo site_url('analytics/code'); ?>">统计代码</a></dd>
    </dl>
</div>