mirror of
https://github.com/Mibew/tray.git
synced 2025-04-01 10:27:12 +03:00
git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@64 c66351dc-e62f-0410-b875-e3a5c0b9693f
42 lines
1.2 KiB
PHP
42 lines
1.2 KiB
PHP
<?php
|
|
/*
|
|
* This file is part of Web Instant Messenger project.
|
|
*
|
|
* Copyright (c) 2005-2008 Internet Services Ltd.
|
|
* All rights reserved. This program and the accompanying materials
|
|
* are made available under the terms of the Eclipse Public License v1.0
|
|
* which accompanies this distribution, and is available at
|
|
* http://www.eclipse.org/legal/epl-v10.html
|
|
*
|
|
* Contributors:
|
|
* Evgeny Gryaznov - initial API and implementation
|
|
*/
|
|
|
|
require('../libs/common.php');
|
|
require('../libs/operator.php');
|
|
|
|
$errors = array();
|
|
if( isset($_POST['login']) && isset($_POST['password']) ) {
|
|
$login = getparam('login');
|
|
$password = getparam('password');
|
|
$remember = isset($_POST['isRemember']) && $_POST['isRemember'] == "on";
|
|
|
|
$operator = operator_by_login( $login );
|
|
if( $operator && isset($operator['vcpassword']) && $operator['vcpassword'] == md5($password) ) {
|
|
|
|
$target = isset($_SESSION['backpath'])
|
|
? $_SESSION['backpath']
|
|
: dirname($_SERVER['PHP_SELF'])."/index.php";
|
|
|
|
login_operator($operator,$remember);
|
|
header("Location: $target");
|
|
exit;
|
|
} else {
|
|
$errors[] = getlocal("page_login.error");
|
|
}
|
|
}
|
|
|
|
$page = array( 'backPath' => '', 'formisRemember' => true );
|
|
start_html_output();
|
|
require('../view/login.php');
|
|
?>
|