<div id="maincon" class="analytics">
    <?php echo $menu; ?>
    
    <div id="rightcon">
        <div class="title"> <h2 class="edit">生成统计代码</h2></div>
        <div class="view_log_box clear">
            <form class="well form-inline" method="GET" action="">
                <select name="site" class="L100">
                    <?php
                    foreach ($sites as $site):
                        ?>
                        <option value="<?php echo $site; ?>" <?php if ($site === $cur_site): ?>selected="selected"<?php endif; ?> >
                            <?php echo $site; ?>
                        </option>
                    <?php endforeach; ?>
                </select>

                <button class="btn btn-primary" type="submit">点击生成</button>
            </form>

            <?php if(isset($code)):?>
            <p>站点 <strong><?php echo $cur_site; ?></strong> 的统计代码, 请将其放到页面底部 -- &lt;/body&gt;之前:</p>
                <textarea id="site_analytics_code" style="width: 100%; height: 160px"><?php echo htmlentities($code); ?></textarea>
            <?php endif; ?>
        </div>
    </div>   
    
    <div class="clear"></div>
</div>