<?php require_once 'head.html';?>                                                                
                    
                    <div class="container">
                                                
                       

                        <div class="row">
                            <div class="col-md-12">
                                <div class="block">
                                    <div class="head">
                                        <h2>资源管理</h2>
                                    </div>                  
                                    <div class="content tabable np">
    
                                        <ul class="nav nav-tabs">
                                            <li class="active"><a href="#btab-1" data-toggle="tab">音乐上传</a></li>
                                            <li><a href="#btab-2" data-toggle="tab">视频上传</a></li>
                                        
                                           
                                        </ul>
                                        <div class="tab-content">
                                            <div class="tab-pane active" id="btab-1">
                                                
                                                
                                                 <div class="row-fluid">
		
			<?php if(count($music)){?>
			<table class="table table-striped table-bordered table-condensed">
				<thead>
					<tr>
						<th>序号</th>
						<th>音乐外链</th>
						<th>文件信息</th>
						<th>上传时间</th>
						<th>上传作者</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
				<script>			
								</script>
				<?php  $i=1; foreach($music as $mp3){?>
				<tr class="list-upload">
					<td><?php echo $i;?></td>
					<td><input style="width: 100%;margin:0px;padding:0px;" type="text" value="http://<?php echo $_SERVER['HTTP_HOST']  .  @trim($mp3['rlink'] ,  '..');?>" /></td>
					<td><?php echo $mp3['title'];?><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="20" height="20"
    codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">
    <param name="movie" value="Delivery/js/mp3/EasyMp3Player.swf?showDownload=false&file=<?php echo $mp3['rlink']?>" />
    <param name="wmode" value="transparent" />
    <embed wmode="transparent" width="25" height="20" src="Delivery/js/mp3/EasyMp3Player.swf?showDownload=false&file=<?php echo $mp3['rlink']?>"
    type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object></td>
					<td><?php echo date('Y-m-d h:i:s', $mp3['times']);?></td>
					<td><?php echo $mp3['athor'];?></td>
					<td><a style="text-decoration:none;cursor:pointer;" onclick='if (confirm("确定删除？") == true){location.href="?c=upload&ip=del&id=<?php echo $mp3['id'];?>&file=<?php echo $mp3['rlink']?>";}'>删除</a></td>
				</tr>
				<?php $i++;}?>
					
				</tbody>
			</table>
			
				<div class="side fr" style="margin-top:6px;">
                                            <ul class="pagination">   
				<?php if ($p !== 1){?>
					<li><a href="?c=upload&p=<?php echo $break;?>">上页</a></li><?php }?>
					
				  <?php pagenum($pageCount, $p, 10);?>
				
					<?php if ($p !== $pageCount){?><li><a href="?c=upload&p=<?php echo $next;?>">下页</a></li><?php }?>

				</ul>
				
			</div>
			<?php }else{?>
			<p>没有记录哦，请上传一个音乐吧~</p><hr>
			<?php }?>
			
			
			<form class="form-horizontal" action="?c=upload" method="post" enctype="multipart/form-data">
			<div class="block">
                                    <div class="head">
                                        <h2>音乐上传</h2>
                                    </div>
                                    <div class="content np">                                        
                                        <div class="controls-row">
                                            <div class="col-md-3">文件选择:</div>
                                            <div class="col-md-9">
                                                <input type="file" class="form-control" name="rlink"/>
                                            </div>
                                        </div>
                                        <div class="controls-row">
                                            <div class="col-md-3">音乐名称:</div>
                                            <div class="col-md-9">
                                                <div class="input-group file">
                                                    <input type="text" name="title" placeholder="输入一个标题,用于分辨文件.."  class="form-control"/>
                                                    <div class="input-group-btn">
                                                        <input class="btn btn-default" name="upload_music" type="submit" value="开始上传" >
                                                    </div>
                                                </div>
                                            </div>
                                        </div>                          
                                                                      
                                    </div>                                    
                                </div>
			</form>
			
			
			
		  </div>
                                                
                                                
                                            </div>
                                            <div class="tab-pane" id="btab-2">
                                              <p>由于视频上传，文件太大，所以推荐使用以下系统上传：</p>
			<a href="http://ugc.taobao.com/video/uploadVideo.htm?spm=0.0.0.0.o33dyJ" target="_blank"><button type="button" class="btn btn-info">淘宝高清视频上传(推荐)</button></a>
                                            </div>
                                                                            
                                        </div>
                                                                             
                                    </div>
                                </div>                
                            </div>
                        </div>                         
                     
                        
                                          
                        
                    </div>                    
                    
                </div>
                
            </div>
            
        </div>

    </div>
  
    
</body>
</html>
