Location: PHPKode > scripts > WH Board > wh_board/admin/signin.php
<?php

    session_start();

    include_once('../framework/constants.php');
	include_once('../framework/config.php');
	include_once('../framework/mysql.php');
	include_once('../framework/language_admin.php');
	include_once('../framework/cache.php'); no_cache();

	if(isset($_REQUEST['signin'])) {

	$user_name = mysql_real_escape_string($_POST['user_name']);
	$user_pass = sha1(mysql_real_escape_string($_POST['user_pass']));

	$query = mysql_query("SELECT
							  user_id,
							  user_name,
							  user_pass,
							  user_level
						  FROM
							  users
						  WHERE
							  user_name = '" . $user_name . "'
						  AND
							  user_pass = '" . $user_pass . "'
						  AND
							  user_level = '1'
                          LIMIT
                              1") or die(mysql_error());

	$total = mysql_num_rows($query);

	if($total > 0) {

	session_start();

	$_SESSION['admin'] = 'admin';
	header("Location: index.php");

		}else{
		$error = '<p class="false">' . $lang['false_logindatas'] . '!</p>';
		}
	}

?>
<?php require('management/admin_layout/header.php'); ?>

    <div class="clear_blog"></div>

    <?php if($error) echo $error; ?>

    <form action="signin.php?verify" method="post" name="admin-login">
    <table width="400" border="0" align="center" class="tables">
        <tr>
            <td colspan="2"><h5><?php echo $lang['signin']; ?></h5></td>
        </tr>
        <tr>
            <td width="80">User Name</span></td>
            <td width="320"><label><input type="text" name="user_name" id="user_name" class="textfields" size="35" maxlength="35"></label></td>
        </tr>
        <tr>
            <td width="80"><?php echo $lang['password']; ?></td>
            <td width="320"><label><input type="password" name="user_pass" id="user_pass" class="textfields" size="35" maxlength="35"></label></td>
        </tr>
        <tr>
            <td width="80">&nbsp;</td>
            <td width="320"><input type="submit" name="signin" id="signin" value="<?php echo $lang['signin']; ?>" class="buttons"></td>
        </tr>
    </table>
    </form>

<?php require('management/admin_layout/footer.php'); ?>
Return current item: WH Board