Jump to content

Parse error: syntax error, unexpected $end in C:\xampp\xampp\htdocs\admin\auth.p


kanada1986

Recommended Posts

Hello,

Pls can sombody told me what i make wrong? Sorry for my bad english!

And can somebody pls correkt it?

 

<?php

include_once("./../includes/config.php");
session_start();

if($_SESSION['sess_type'] == "admin") {

	header("Location: index.php");
	die();

} else if($_SESSION['sess_type'] == "guest") {

	header("Location: guest.php");
	die();

}

if($_POST['password'] AND $_POST['username']) {

		$sess_pass = $_POST['password'];
		$sess_name = $_POST['username'];

	if($sess_pass == $password AND $sess_name == $username) {

		$_SESSION['password'] = $password;
		$_SESSION['alang'] = $_POST['alang'];
		$_SESSION['sess_type'] = "admin";

		header("Location: index.php");

	} else if($sess_pass == $guest_password AND $sess_name == $guest_username) {

		$_SESSION['password'] = $guest_password;
		$_SESSION['alang'] = $_POST['alang'];
		$_SESSION['sess_type'] = "guest";

		header("Location: guest.php");

	} else {

		header("Location: auth.php");

	}

} else {

?>
	<html>
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
	<title>Admin System</title>

	<link rel="stylesheet" type="text/css" href="img/style.css">

	</head>

	<body>
	<center>
	<p>




	</center>
	<div align="center">
	 </div>
        <td>
					<p align="center">
					<img border="0" src="img/logo.png" width="256" height="256"></td>

	<table border="0" width="100%" cellspacing="0" cellpadding="0" height="100%" id="table1">
		<tr>
			<td align="center">
			<table border="0" id="table2" cellspacing="0" cellpadding="0" width="539">
				<tr>
					<td>
					  <p align="center"></td>
				</tr>
				<tr>
					<td>


			  <form id="form1" name="form1" method="post" action="auth.php">
			  <p align="center">
			  <label>

			  <input class=m4 size="161" type="text" name="username"  />
			  <p align="center">
			  <br>
<input class=m4 size="161" type="password" name="password"  />

			  </label>
				</p>
				<p align="center"><label>

			 <input type="hidden" value="" id="hfield" name="alang"/>
			 <input class=cssbutton type="submit" id="lbut" name="Submit" value="Enter" /><br><br>
			 <br>

                  </label>
			    ~ ©  Veni ~</p>
				<p align="center">~ /Private Release/ ~</p>
			  </form>

					</td>
				</tr>
			</table>
			</td>
		</tr>
	</table>

	</body>
	</html>

	<script>

                function changelang(tlang) {

   				var hfield = document.getElementById('hfield');
   				var hlang = document.getElementById('tlang');
   				var hbut = document.getElementById('lbut');

				hfield.value = tlang;

				if(tlang == 'en') {

					hlang.innerHTML = "English";
					hbut.value = "Enter";

				} else {

					hlang.innerHTML = "Russian";
					hbut.value = "Âîéòè";

				}
			}



	</script>

<?
}

?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.