<!DOCTYPE html>
    <html>
    <head>
        <meta charset="UTF-8">
        <title>WMS</title>
        <link rel="stylesheet" type="text/css" href="static/easyui1552/themes/default/easyui.css">
        <link rel="stylesheet" type="text/css" href="static/easyui1552/themes/icon.css">

        <script type="text/javascript" src="static/easyui1552/jquery.min.js"></script>
        <script type="text/javascript" src="static/easyui1552/jquery.easyui.min.js"></script>
         <script type="text/javascript" src="static/easyui1552/locale/easyui-lang-zh_CN.js"></script>
    </head>
    <body style="background:#ccc; padding:50px;" >

        <div class="easyui-panel" title="Login" iconCls="icon-man"   style="width:400px;padding:30px 60px;">
            <form id="ff" class="easyui-form" method="post" data-options="novalidate:true" name="login" action="'<?php echo $url?>login">
                <div style="margin-bottom:20px">
                    <input class="easyui-textbox" name="name" style="width:100%" data-options="label:'Name:',required:true">
                </div>
                <div style="margin-bottom:20px">
                    <input class="easyui-passwordbox" prompt="Password" name="password" style="width:100%" data-options="label:'password:',required:true">
                </div>
            </form>
            <div style="text-align:center;padding:5px 0">
                <a href="javascript:void(0)" class="easyui-linkbutton" onclick="submitForm()" style="width:80px">Submit</a>
                <a href="javascript:void(0)" class="easyui-linkbutton" onclick="clearForm()" style="width:80px">Clear</a>
            </div>
        </div>
        <script>
            function submitForm(){
                $('#ff').form('submit',{
                	url : '<?php echo $url?>login',
                    onSubmit:function(){
                        	return $(this).form('enableValidation').form('validate');
                    },
                    success:function(data){   
                    	//$.messager.alert('Info', data, 'info');
                        var data = eval('(' + data + ')');     
                        if (data.success){    
                     	 	 $.messager.alert('提示',data.message,'info');                             
                             location.href = '<?php echo $url?>login';     
                        }else{
                       	 	 $.messager.alert('提示',data.message,'info');   
                        }                   	
                    }  
                });
            }
            function clearForm(){
                $('#ff').form('clear');
            }
        </script>
    </body>
</html>