File indexing completed on 2024-12-22 05:33:23

0001 <?php
0002 
0003 include("gfx3/lib.php");
0004 
0005 $prevpage = EPageProperties::get_previous_page();
0006 
0007 $login = EHeaderDataParser::db_post("login");
0008 $password = EHeaderDataParser::db_post("password");
0009 
0010 $postdata = array(
0011   "login" => $login,
0012   "password" => $password
0013   );
0014 
0015 $client = new OCSClient(EConfig::$data["ocs"]["host"]);
0016 
0017 $check = $client->post("v1/person/check",$postdata);
0018 
0019 //ELog::pd($client->get_last_raw_result());
0020 
0021 if($check["ocs"]["meta"]["statuscode"]=="100"){
0022   EUser::login($login,$password);
0023   header("Location: $prevpage?e=Logged!");
0024 }
0025 
0026 
0027 
0028 ?>