Beispiel #1
0
 public function actionLogin()
 {
     if (!Yii::app()->getUser()->getIsGuest()) {
         $this->redirect(Yii::app()->homeUrl);
     }
     $loginForm = new LoginForm();
     if (($post = Yii::app()->getRequest()->getPost('LoginForm')) !== null) {
         $loginForm->attributes = $post;
         if ($loginForm->process()) {
             $this->redirect(Yii::app()->homeUrl);
         }
     }
     $this->render('login', array('form' => $loginForm));
 }
echo '</style>';
?>

	</head>

	<body leftmargin = "0" topmargin = "0" marginheight = "0" marginwidth = "0">
		<script type = "text/javascript">
			if (parent.frames.length > 0) {
				parent.location.href = self.document.location;
			}
		</script>

		<table width = "100%" height = "100%" border = "0" align = "center">
			<tr>
				<TD width="100%"  valign = "middle" align="center">
					<div style="width:350px;align:center">
					<?
						$loginform = new LoginForm();
						$loginform->process();
						$loginform->draw();
						$db->close();
					?>
				  </div>
				</td>
			</tr>
		</table>
		<script language = "Javascript">
			document.loginform.login.focus();
		</script>
	</body>
</html>