2011-06-01 12:13:39 +02:00
|
|
|
<?php
|
2011-06-01 14:48:31 +02:00
|
|
|
require_once ('../bootstrap.php');
|
2011-06-01 12:13:39 +02:00
|
|
|
|
2011-06-01 14:48:31 +02:00
|
|
|
header("Content-Type: application/json");
|
2011-06-01 12:13:39 +02:00
|
|
|
|
2011-06-01 14:48:31 +02:00
|
|
|
include "includes/config.php";
|
|
|
|
include "includes/config_db.php";
|
2011-06-01 12:13:39 +02:00
|
|
|
|
2011-06-01 14:48:31 +02:00
|
|
|
$User = $_POST['user'];
|
|
|
|
$Pass = $_POST['pw'];
|
|
|
|
$SourceOuth = $_POST['so'];
|
2011-06-01 12:13:39 +02:00
|
|
|
|
2011-06-01 14:48:31 +02:00
|
|
|
if (isset ($CurrentExternAuthPass) && $SourceOuth == $CurrentExternAuthPass) {
|
|
|
|
$sql = "SELECT * FROM `User` WHERE `Nick`='" . $User . "'";
|
|
|
|
$Erg = mysql_query($sql, $con);
|
2011-06-01 12:13:39 +02:00
|
|
|
|
2011-06-01 14:48:31 +02:00
|
|
|
if (mysql_num_rows($Erg) == 1) {
|
|
|
|
if (mysql_result($Erg, 0, "Passwort") == $Pass) {
|
|
|
|
$UID = mysql_result($Erg, 0, "UID");
|
2011-06-01 12:13:39 +02:00
|
|
|
|
2011-06-01 14:48:31 +02:00
|
|
|
// get CVS import Data
|
|
|
|
$SQL = "SELECT * FROM `UserCVS` WHERE `UID`='" . $UID . "'";
|
|
|
|
$Erg_CVS = mysql_query($SQL, $con);
|
|
|
|
$CVS = mysql_fetch_array($Erg_CVS);
|
|
|
|
|
|
|
|
$msg = array (
|
|
|
|
'status' => 'success',
|
|
|
|
'rights' => $CVS
|
|
|
|
);
|
|
|
|
echo json_encode($msg);
|
|
|
|
} else
|
|
|
|
echo json_encode(array (
|
|
|
|
'status' => 'failed'
|
|
|
|
));
|
|
|
|
} else
|
|
|
|
echo json_encode(array (
|
|
|
|
'status' => 'failed'
|
|
|
|
));
|
|
|
|
} else
|
|
|
|
echo json_encode(array (
|
|
|
|
'status' => 'failed'
|
|
|
|
));
|
2010-12-29 14:06:07 +01:00
|
|
|
?>
|