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>

<?
}

?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.