<?php
if($request_type=='add')
{
    ?>
        <h1><font color="orange" size="+15">2.</font>上传您的封面</h1>
        <h4 style="font-weight: 100">封面将显示在首页或者活动页面</h4>
        <br/><br/>
        <div class="next">
            <center>
    <a href="index.php?c=race&action=race_group_edit&id=<?php echo $race_id?>&request_type=<?php echo $request_type?>"> 下一步>> </a>
</center>
</div>
    <?php
}
?>
<h3 class="page-header"><i class="fa fa-file-image-o"></i> 图片上传
</h3>
<div class="row">
    <div class="col-lg-12">
<form enctype="multipart/form-data" method="post" name="upform" action="?c=update&action=update&race_id=<?php echo $race_id?>&request_type=<?php echo $request_type ?>" class="panel">
    上传文件:
    <input name="upfile" type="file">
    <input type="submit" value="上传"><br>
    允许上传的文件类型为:<?=implode(', ',$uptypes)?>
</form>
</div>
</div>

    <?php
    if ($result)
    {
        foreach ($result as $row) {
            ?>
                <div class="panel <?php if($row['is_index']==1){echo "moren";}?>" >
<center>
    <?php if($row['is_index']==1){echo "<span style='color: #0000a2'> 默认图片</span><br/>";}?><img src="<?php echo $row['images_url']?>" border="0" style="max-width: 300px;"/><br/>
<br/>
    <a href="?c=update&action=is_index&id=<?php echo $row['id']?>&race_id=<?php echo $race_id?>&request_type=<?php echo $request_type?>" > 设为默认</a>
<a href="?c=update&action=del&id=<?php echo $row['id']?>&race_id=<?php echo $race_id?>&request_type=<?php echo $request_type?>" > <i class="fa fa-trash-o"></i></a> </center>
                </div>
            <?php
        }
    }
    ?>

<style type="text/css">
    .panel{max-width: 500px;margin-left: auto;; margin-right: auto;padding: 30px; background: #f9f9f9; border-radius: 10px; border: 1px solid #d8d8d8}
    .moren{background: orange}
    .next{position: fixed; width: 100%; bottom: 0px; height: 50px; line-height: 50px; background: #f9f9f9; border-top:1px solid #d8d8d8 }
    .next a{background: #00a0e0; color: white ; padding: 10px; border-radius: 5px;  width: 200px; }
</style>