<?php if (!defined('ROOT')) exit; ?>
<!DOCTYPE html>
<html>

	<head>
		<title>举报</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link rel="stylesheet" type="text/css" href="/static/public/css/mui/3.7.0/css/mui.min.css">
		<link rel="stylesheet" type="text/css" href="/static/public/css/wap.1.0.0.css">
		<link rel="stylesheet" type="text/css" href="/static/public/css/flexcss/flex.css">
		<link rel="stylesheet" type="text/css" href="http://static.523w.cn/js/form/wap.css">
		<style type="text/css">
		#boot{ position: fixed; bottom: 0; width: 100%; background:#16a085; height: 50px; line-height: 50px; text-align: center; color: #fff; z-index: 999;}
		#boot .c1{ background:#1abc9c;}
		</style>
	</head>
	<body>
		<nav id="boot">
		    <div  class="c1 btn_submit1 blur">确认提交</div>
		</nav>
		<div class="mui-content">
			<form action="/v/add" method="post"  id="pay" >
				<input type="hidden" name="model_id" value="40" />
	        	<input type="hidden" name="uid" value="<?php echo I('uid');?>" />
	        	<input type="hidden" name="pk" value="<?php echo I('pk');?>" />
	        	<input type="hidden" name="ctime" value="<?php echo time();?>" />
				<ul class="mui-input-group">
					<li class="mui-input-row radio">
						<div class="mui-navigate-right">
							<label>举报类型</label>
							<span class="blur" data-radio='{menu:".radio-menu",must:true}'>点击选择</span>
						</div>
						<div class="mui-backdrop radio-menu">
							<ul>
								<?php 
	                        	$extra=M('attribute')->where(array('model_id'=>40,'name'=>type))->getField('extra');
	                        	$extra=preg_split("/[\r\n]+/s",$extra,-1,PREG_SPLIT_NO_EMPTY);
	                    		foreach($extra as $k=>&$v){
	                    			$v = preg_split("/[:]+/s", $v,-1,PREG_SPLIT_NO_EMPTY);
	                    		}
	                        	?>
								<?php foreach($extra as $k=>&$v){?>
								<li class="mui-input-row mui-radio mui-left" flex>
									<label flex-box="1"><?php echo $v[1];?></label>
									<input name="radio1" value="<?php echo $v[0];?>" type="radio" />
								</li>
								<?php }?>
							</ul>
						</div>
					</li>
					<li class="mui-input-row" flex="box:justify">
						<label>联系信息</label>
						<input type="text" class="mui-input-clear tr" name="linkinfo" placeholder="联系QQ或联系手机" />
					</li>
					<li class="mui-input-row textarea">
						<label>说明</label>
						<textarea name="notes" placeholder="点击输入" rows="5" maxlength="200"></textarea>
						<div>0/200</div>
					</li>
				</ul>
			</form>
		</div>
		<script src="/static/public/js/jquery.2.1.4.mui.3.7.0.angular.1.2.16.sonar.js" type="text/javascript" charset="utf-8"></script>
		<script src="/static/public/js/jquery.cookie.js" type="text/javascript" charset="utf-8"></script>
		<script src="/static/public/js/wap.1.0.0.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
		mui(document).on("tap",".btn_submit1",function () {
		    var the=jQuery(this);
		    jQuery.ajax({
		    	url:"/v/add",
		        data:jQuery('form').serializeArray(),
		        dataType: "json",
		        type: "post",
		        timeout: 10000,
		        success: function(data) {
		        	if (data.status==1) {
		        		location.href='http://www.<?php echo C('BEN_BZUSR')?>/pub/reminder/success/info/举报成功，我们将尽快处理';
		        	}else{
		        		mui.toast(data.info);
		        	}
		        	setTimeout(function () {
		        		parent.$.fancybox.close();
		        	},2000);
		        },
		        error: function() {
		            mui.toast("网络连接超时");
		        }
		    });          
		})
		</script>
	</body>
</html>