<div class="div_c mobi_top" >
    <table  class="table" style="font-size: 15pt">
        <tr>
            <td style="background-color: #00A000; color: white">
                您的号码
            </td>
        </tr>
        <tr>
            <td>
                <font style="font-size: 50pt; text-align: center; font-weight: bold"><center><?php echo $_COOKIE['race_no']?></center></font>
            </td>
        </tr>
        <tr>
            <td style="background-color: #00A000; font-size: 12pt; text-align: right; color: white ">
               waychar
            </td>
        </tr>
    </table>
    <h3>我的报名</h3>

        <?php
        if ($result) {
            foreach ($result as $row) {
                $race_reg_msg = $home->reg_msg($row['id']);
                //print_r($race_reg_msg);
                ?>    <table class="table">
        <tr>
            <td colspan="2"><b>
                            <b><a href="index.php?c=race&action=race_msg&id=<?php echo $row['id'] ?>" target="_blank"><?php echo  $row['race_title'] ?></a></b><br/><?php echo $row['start_time']; ?></td>
            
        </tr>
                <tr>
                    <td>
                         <img src="<?php 
                            echo $race->getimg($row['id']);
                            ?>" width="100%">
                           </td>
                    <td style="word-break: keep-all;">
                     <?php
                        //未审核 2审核未付费 3审核已付费 4 已付费未审核
                     if($race_reg_msg[0]['state']==1)
                     {
                        echo '未付款';
                    }
                    elseif($race_reg_msg[0]['state']==2)
                    {
                        echo '<h3>审核未付费</h3>
                        <a href=index.php?c=race&action=message&re_g_id='.$race_reg_msg[0]['id'].'&time='.time().'><i class="fa fa-credit-card"></i> 付款</a>';
                    }
                    elseif($race_reg_msg[0]['state']==3)
                    {
                        echo '报名成功';
                    }
                    elseif($race_reg_msg[0]['state']==4)
                    {
                        echo '已付费未审核';
                    }
                    elseif($race_reg_msg[0]['state']==5)
                    {
                        echo '审核不通过';
                    }

                    if($race_reg_msg[0]['state']==1 and $race_reg_msg[0]['sign_end_time']<date("Y-m-d h:i:s", time()) )
                        {

                            ?>
                            <?php } ?>
                            <a href="index.php?c=race&action=my_reg_msg&race_id=<?php echo $row['id'] ?>">  查看</a> 
                            <?php if($row['finish_time'])
                            {?>
                            <a href="index.php?c=race&action=race_cert_msg&regid=<?php echo $race_reg_msg[0]['id']?>">证书</a>
                            <?php 
                        }?>
                        </td>

                    </tr>
                    <?php
                }
            } else {
                ?>
                <tr>
                    <td>nothing</td><td></td><td></td>
                </tr>
                <?php
            }
            ?>
        </table>
        <br/><br/>
        <a href="index.php?c=home&action=my_setting_basic">密码重设</a> | 
        <a href="index.php?c=account&action=logout">退出登陆</a>
        <br/><br/>
    </div>
    <script language="javascript">
        $(document).ready(function () {
            dashboard_new_msg_url = "ajax?action=dashboard_new_msg";
            dashboard_dashboard_my_company = "ajax?action=dashboard_my_company";

            $.get(dashboard_new_msg_url, function (data) {
                $("#dashboard_new_msg").html(data);
            })

            $.get(dashboard_dashboard_my_company, function (data) {
                $("#dashboard_my_company").html(data);
            })
        })
    </script>
    <style type="text/css">
        .btn{background-color: #00a0e9; padding: 3px; border-radius: 2px; color: white}
    </style>