<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="utf-8">
    <?php if ($action != 'race_cert_msg') { ?>
        <meta name="viewport" content="width=device-width, initial-scale=1">
    <?php } ?>
    <meta name="description" content="">
    <title><?php
            if ($c != "home") {
                echo $result[0]['title'] . $result[0]['race_title'];
            }
            ?> waychar 报名系统</title>
    <link href="themes/css/bootstrap.min.css" rel="stylesheet">
    <link rel="shortcut icon" href="favicon.ico" />
    <link href="themes/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <link href="themes/css/main.css" rel="stylesheet">
    <link href="themes/css/style.css" rel="stylesheet">
    <link href="themes/css/responsive.css" rel="stylesheet">
    <link type="text/css" href="css/style.css" rel="stylesheet" />
    <script type="text/javascript" src="js/main.js"></script>
    <script language="javascript" type="text/javascript" src="plug-in/My97DatePicker/WdatePicker.js"></script>
    <script src="themes/js/modernizr.js"></script>
    <style type="text/css">
        .top_menu {
            width: 100%;
            background: #555;
            text-align: right;
            padding: 4px;
            height: 30px;
            color:white;
        }

        .top_menu a:visited{color:white}
        .top_menu a:link{color:white}

        .menu_tools a {
            color: white;
        }
    </style>

    <script src="https://libs.baidu.com/jquery/1.7.0/jquery.min.js"></script>
</head>

<body>

    <!--mobi -->
    <?php if (check_mobi() == true) { ?>
        <link type="text/css" href="css/mobi.css" rel="stylesheet" />
        <style type="text/css">
            .mobi_top {
                margin-top: 30px;
            }
        </style>
        <div class="page-group">
            <!-- 你的html代码 -->
            <div class="page">
                <header class="bar bar-nav">
                    <div class="nav_back">
                        <?php if ($back_url) { ?>
                            <a class="button button-link button-nav pull-left" href="<?php echo $back_url ?>"><span class="icon icon-left"></span><i class="fa fa-chevron-left"></i></a>
                        <?php }
                            ?>
                    </div>
                    <div class="nav_title">
                        <center>
                            <?php
                                if ($title) {
                                    echo $title;
                                } else {
                                    ?>
                                LOGO
                            <?php
                                }
                                ?>
                        </center>
                    </div>
                    <div class="nav_button">
                        <?php if ($other_button) {
                                echo $other_button;
                            } else { ?>
                            <a href='index.php?c=home&action=index'><i class="fa fa-user"></i></a>
                        <?php } ?>
                    </div>
                </header>

                <?php if ($action != 'race_msg') { ?>
                    <nav class="bar bar-tab">
                        <a href="index.php?c=home" style="color: #1d83c2">
                            <i class="fa fa-home"></i><br />
                            <span class="tab-label">首页</span>
                        </a>

                        <a href="index.php?c=race&action=race_q_list">
                            <i class="fa fa-star"></i><br />
                            <span class="tab-label">活动</span>
                        </a>
                        <a href="index.php?c=home&action=index">
                            <i class="fa fa-user"></i><br />
                            <span class="tab-label">我</span>
                        </a>
                    </nav>
                <?php }
                } else { ?>
                <style type="text/css">
                    .mobi_top {
                        margin-top: 150px;
                    }
                </style>
                <!-- desktop -->
                <div id="wrap">
                    <header>
                        <div class="top_menu">
                            <?php
                                if ($_COOKIE['id'] or $_SESSION["username"]) {
                                    ?>
                                <div id="menu_tools">
                                    <font size="-1">您好，<?php echo $_COOKIE['fullname'] ?>
                                        <a href="index.php?c=home&action=index"> <i class="fa fa-user"></i> </a>
                                        <a href="index.php?c=home&action=my_setting_basic"> <i class="fa fa-cog"></i> </a>
                                        <a href="index.php?c=account&action=logout"> <i class="fa fa-sign-out"></i> </a></font>
                                    &nbsp;
                                </div>
                            <?php
                                } else {
                                    ?>
                                <i class="fa fa-user" style="color: white"></i> <a href="index.php?c=account&action=login" style="color: white">登录</a> | <a href="index.php?c=account&action=reg" style="color: white">注册</a>
                            <?php } ?>
                        </div>
                        <div class="sticky">
                            <div class="container">

                                <!-- Logo -->
                                <div class="logo" onclick="location.href='index.php?c=home'">
                                    <h4 style="color: white">LOGO</h4>
                                </div>
                                <!-- Navigation -->
                                <nav class="navbar">
                                    <!-- NAV -->
                                    <ul class="nav ownmenu">
                                        <li> <a href="index.php?c=home">首页</a></li>
                                        <li> <a href="index.php?c=race&action=race_q_list">赛事/活动</a></li>
                                        <li><a href="index.php?c=article&action=list">资讯</a></li>
                                        <li><a href="http://bm.waychar.cn/index.php?c=race">后台管理</a></li>
                                        <li><a href="http://bm.waychar.cn/help.pdf">帮助文档</a></li>
                                    </ul>
                                </nav>
                            </div>
                        </div>
                    </header>
                    <div id="content" class="div_c">
                        <?php if ($c == 'home' && $action == '') {
                                ?>
                            <div id="sl">
                                <center><img src="themes/cc/images/loading.gif" width="200"></center>
                            </div>
                            <?php
                                } else {
                                    if ($action != 'race_msg') {
                                        ?>
                    <?php
                            }
                        }
                    } ?>