<!DOCTYPE html>
<html>
	<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" href="themes/jquery/css/themes/default/jquery.mobile-1.4.5.min.css">
	<link rel="stylesheet" href="themes/home/css/fonts/font-awesome.min.css">
    <link rel="stylesheet" href="themes/home/css/ui-box.css">
    <link rel="stylesheet" href="themes/home/css/ui-base.css">
    <link rel="stylesheet" href="themes/home/css/ui-color.css">
    <link rel="stylesheet" href="themes/home/css/icon.css">
    <link rel="stylesheet" href="themes/home/css/control.css">
    <link rel="stylesheet" href="themes/home/css/main.css">
	<script src="themes/jquery/js/jquery.js"></script>
	<script src="themes/jquery/js/jquery.mobile-1.4.5.min.js"></script>
</head>
<body class="um-vp c-wh " ontouchstart>
	<div data-role="page" data-quicklinks="true" class="ub ub-ver ">
      <div data-role="header" id="header" data-position="fixed" data-fullscreen="true" data-tap-toggle="false" >
	  <div class="uh bc-text-head ub bc-head">
                <div class="nav-btn" id="nav-left" onClick="javascript:window.location='index.php?ac=<?php echo $ac;?>&fileurl=plugin&type=<?php echo $type;?>'">
                    <div class="fa fa-angle-left fa-2x"></div>
                </div>
                <h1 class="ut ub-f1 ulev-3 ut-s tx-c" tabindex="0">投票记录</h1>
				
                <div class="nav-btn nav-bt" id="nav-right">
					<?php if($app_log["user"]==''){?>
                    <div class="ub-img icon-edit umw2 umh4" onClick="javascript:window.location='index.php?ac=<?php echo $ac;?>&fileurl=plugin&do=add&id=<?php echo $row['id'];?>&type=<?php echo $type;?>'"></div>
					<?php }?>
                </div>
				
       </div>
	  
</div>
		<!-- /header -->
  <div data-role="content" id="content">
				
				<div class="ub ub-ver">
				
					
					<div class="uinn-a6 sc-text  ulev-app1">
						<?php echo trim($row['title']);?>
					</div>
					<div class="ub ub-ver uinn-a1 ub-f1">
						<div class="uba bc-border c-wh">
							<ul class="ubb ub bc-border bc-text ub-ac uinn-a9">
								<li class="uw-infor ut-s sc-text  umar-r-infor ulev-app1">
									发布人
								</li>
								<li class="ub-f1 ulev-app1">
								<?php echo get_realname($row['uid']);?>
								</li>
							</ul>
							<ul class="ubb ub bc-border bc-text ub-ac uinn-a9">
								<li class="uw-infor ut-s sc-text  umar-r-infor ulev-app1">
									发布时间
								</li>
								<li class="ub-f1 ulev-app1">
									<?php echo trim($row['date']);?>
								</li>
							</ul>
							<ul class="ubb ub bc-border bc-text ub-ac uinn-a9">
								<li class="uw-infor ut-s sc-text  umar-r-infor ulev-app1">
									截止日期
								</li>
								<li class="ub-f1 ulev-app1">
									<?php echo trim($row['untildate']);?>
								</li>
							</ul>
							<ul class=" ub bc-text ub-ac uinn-a9">
								<li class="uw-infor ut-s sc-text  umar-r-infor ulev-app1">
									描述
								</li>
								<li class="ub-f1 ulev-app1">
									<?php echo $row['content'];?>
								</li>
							</ul>
							
						</div>
					</div>
				<div data-role="collapsible" data-content-theme="a" style="margin-left:9px; margin-right:9px;">
				<h4>投票记录</h4>
				 <p>
				 <ul data-role="listview" data-inset="true" data-divider-theme="a" data-count-theme="a" data-theme="b">
				 <?php
				   foreach ($result as $rowlog) {
					   $ksql="SELECT COUNT(*) as app_option_id FROM ".DB_TABLEPRE."app_log";
					   $ksql.=" WHERE app_option_id='".$rowlog["id"]."' ";
					   $key1 = $db->fetch_one_array($ksql);
					   $ksql2="SELECT COUNT(*) as app_id FROM ".DB_TABLEPRE."app_log ";
					   $ksql2.=" WHERE app_id='".$rowlog["app_id"]."' ";
					   $key2 = $db->fetch_one_array($ksql2);
					   $appnumber=2;
					   $appnum=$key1['app_option_id']/$key2['app_id']*100;
				   ?>
				   <li><?php echo $rowlog["title"]?> <span class="ui-li-count"><?php echo $key1[app_option_id]?></span></li>
					<?php }?>
				 </ul>
				 
				 </p>
				 </div>
				 <?php if($app_log["user"]!='' || $row['uid']==$_USER->id){?>
				 <div data-role="collapsible" data-content-theme="a" style="margin-left:9px; margin-right:9px;">
				<h4>大家对投票的评论 </h4>
				 <p>
				 
				 <?php foreach ($relog as $rowc) {?>
				 <?php echo get_realname($rowc['user'])?>说：
				  <div class="ui-body ui-body-a ui-corner-all" style="margin-top:10px; text-align:left;">
				 <p><?php echo $rowc['content'];?></p>
				 </div>
					<?php }?>
				
				 
				 </p>
				 </div>
				 <?php }?>

		</div>
  </div>


	</div><!-- /page -->
 <script type="text/javascript"> 
    window.onload = function(){ 
        var heg=document.getElementById("header").offsetHeight;
		var content=document.getElementById("content"); 
		content.style.cssText="margin-top:"+heg+"px;";
    }
</script> 
</body>
</html>
