<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<%@ taglib prefix="webpath" uri="/WEB-INF/tlds/path.tld"%>
<%@ taglib prefix="webpage" uri="/WEB-INF/tlds/pageview.tld"%>

<head>
	<style type="text/css">
     	body{
			background:url(<webpath:path/>/resources/images/timg1.jpg);
			filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale')";  
			-moz-background-size:100% 100%;  
			background-size:100% 100%;  
			background-attachment: fixed;
		}
		.h22 {
			FONT-SIZE: 30px; font-family:PingFangSC,helvetica neue,hiragino sans gb,arial,microsoft yahei ui,microsoft yahei,simsun,"sans-serif" !important;font-weight: bold; COLOR: #f0f0f0; FONT-WEIGHT: 5px;
		}
		.divTityle{
			border-bottom: 1px solid rgba(255,255,255,0.3);	
		}
		label.error{
			color:#ff0000;
		}
		.text-indent{
			text-indent:7em;
		}
		.widget-main p{
			font-size: 15px;
		}
		
	</style>

</head>
		<div class="main-container col-sm-12" style="padding:0px; margin:0px;">
			<div class="main-content col-sm-12"  style="padding:0px; margin:0px;">
				<div class="row" style="width:100%;margin:0;">
					<div class="col-sm-12" style="padding:0px; margin:0px;">
						<div class="login-container divTityle" style="width:100%; height:80px;">
							<div class="left col-sm-12 " style="height:0; padding:20px;padding-left:60px;"  >
                            	<img alt="logo" src="<webpath:path/>/resources/images/logo.png" height="40" style=""/>&nbsp;&nbsp;&nbsp;
                                <img alt="wz" src="<webpath:path/>/resources/images/wz.png"  height="40" style="margin-top:5px; "/>&nbsp;&nbsp;&nbsp;
							</div>
						  <div class="col-sm-12">
                          		<div class="col-sm-1"></div>
                            	<div class="col-sm-5" style="top:40px" >
                               	  <div  class="" style="color:#f0f0f0">
                                    	<div class="">
                                        	<div class="widget-main"> 
                                            	<h2 class="h22" style=" margin-bottom:0px;">“一汽丰田杯”第二届工业工程与精益管理创新大赛</h2>                                           	
												<h5 style="line-height:30px;text-indent:2em;" class="fontColor" >
                                                	中国大学生机械工程创新创意大赛——工业工程与精益管理创新大赛由中国机械工程学会和教育部高等学校工业工程类专业教学指导委员会联合主办，力求深入推进工业工程与精益管理创新方法技术的普及与应用，拓宽大学生的科技创新视野，为高校师生和社会各界搭建工业工程与精益管理创新成果的展示和经验交流平台。<br/><a href="<webpath:path/>/match" target="_blank" style="float:right;color:#ff0000;font-size:18px;font-weight: bolder;">详细内容...</a><br/>
                                               	</h5>
                                               	
                                               	
                                                <p>大赛主办单位：中国机械工程学会 </p>
												<p class="text-indent">教育部高等学校工业工程类专业教学指导委员会 </p>
												<p>大赛承办单位：中国机械工程学会工业工程分会 </p>
												<p>大赛协办单位：管理科学与工程学会工业工程与管理研究会 </p>
												<p class="text-indent">天津市精益管理创新学会 </p>
												<p class="text-indent">天津市工业工程学会 </p>
												<p>决赛承办单位：天津大学管理与经济学部 </p>
												<p>大赛冠名单位：天津一汽丰田汽车有限公司</p>
                                                	
                                                	       
                                           		<br/><br/>
                                           		
                                           		<br/><br/>
                                           		<br/><br/>
                                            </div>
                                         </div>
                                    </div>
                            	</div>
                                <div class="col-sm-4 login-layout" style="margin-left:9%"  >
                                    <div id="login-box" class="login-box visible widget-box no-border  " style="width:380px; top:70px; padding:0px; ">
                                        <div class="widget-body" >
                                            <div class="widget-main" style="padding-bottom: 50px;">
                                                <h4 class="header blue lighter bigger">
                                                   	用户登录
                                                </h4>
                                                <div class="space-6"></div>
                                                <form action="#" id="login_form" name="login_form">
                                                    <fieldset>
                                                        <label class="block clearfix">
                                                            <span class="block ">
                                                                <input type="text" class="form-control" placeholder="手机号" id="mobile" name="mobile" style="height:50px;"/>
                                                                
                                                            </span>
                                                        </label>
                                                        <label class="block clearfix">
                                                            <span class="block ">
                                                                <input type="password" class="form-control" placeholder="密码" id="pwd" name="pwd" style="height:50px;"/>
                                                                
                                                            </span>
                                                        </label>
                                                        <div class="space"></div>
                                                        <div class="clearfix">
                                                        	<button type="button" class="pull-right btn btn-sm btn-primary col-sm-5" onclick="window.location.href='<webpath:path/>/reg'" style="height:50px;">
                                                                	注册
                                                            </button>
                                                            <button type="submit" class="pull-left btn btn-sm btn-primary col-sm-5" style="height:50px;">
                                                                	登录
                                                            </button>
                                                        </div>
                                                        
                                                        
                                                    </fieldset>
                                                </form>
                                            </div><!-- /widget-main -->
                                        </div><!-- /widget-body -->
                                    </div><!-- /login-box -->
                            	</div>
							</div><!-- /position-relative -->
						</div>
					</div><!-- /.col -->		
				</div><!-- /.row -->
			</div>
		</div><!-- /.amin-container -->
		
	<script type="text/javascript">
			if("ontouchend" in document)
				document.write("<script src='resources/assets/js/jquery.mobile.custom.min.js'>"+"<"+"/script>");
		</script>
		<script type="text/javascript" src="resources/js/tools/jquerysession.js"></script>
	
		<script type="text/javascript">
			$().ready(function() {
				$("#login_form").validate({
					rules:{
						mobile:{
							required: true
					      	},
					    pwd:{
							required:true
						    }
						},
					messages:{
						mobile:{
							required:"请填写用户名!"
					      	},
					    pwd:{
							required:"请填写密码!"
					      	}
						},
					submitHandler:function(form){
						var mobile=$('#mobile').val();
						var pwd=$('#pwd').val();
						$.ajax({
							  type: 'POST',
							  url: '/api/signin',
							  dataType:'json',
							  data: {
								  mobile:mobile,
								  pwd:pwd
							  },
							  success: function(data){
								  var status = data.status;
									if(status == 1){//注册成功
										window.location.href = webPath + "/profile";
									}else if(status == 0){
										bootbox.dialog({
											message:"请核对用户名或密码是否正确！",
											buttons:{
												"success":{
													"label":"OK",
													"className":"btn-sm btn-primary"
													}
												}
											});
									} else if (status == 2){
										window.location.href = webPath + "/api/user/list";
									}
								  }
							});
					}
				});
			});
		</script>



