mirror of
				https://github.com/Mibew/java.git
				synced 2025-10-31 18:41:09 +03:00 
			
		
		
		
	git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@17 c66351dc-e62f-0410-b875-e3a5c0b9693f
		
			
				
	
	
		
			42 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			42 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php         
 | |
| /*
 | |
|  * This file is part of Web Instant Messenger project.
 | |
|  *
 | |
|  * Copyright (c) 2005-2007 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[] = getstring("page_login.error");
 | |
| 	}
 | |
| }
 | |
| 
 | |
| $page = array( 'backPath' => '', 'formisRemember' => true );
 | |
| start_html_output();
 | |
| require('../view/login.php');
 | |
| ?>
 |