You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
993 B
PHTML

14 years ago
<?php
14 years ago
require_once ('../bootstrap.php');
14 years ago
14 years ago
header("Content-Type: application/json");
14 years ago
14 years ago
include "includes/config.php";
include "includes/config_db.php";
14 years ago
14 years ago
$User = $_POST['user'];
$Pass = $_POST['pw'];
$SourceOuth = $_POST['so'];
14 years ago
14 years ago
if (isset ($CurrentExternAuthPass) && $SourceOuth == $CurrentExternAuthPass) {
$sql = "SELECT * FROM `User` WHERE `Nick`='" . $User . "'";
$Erg = mysql_query($sql, $con);
14 years ago
14 years ago
if (mysql_num_rows($Erg) == 1) {
if (mysql_result($Erg, 0, "Passwort") == $Pass) {
$UID = mysql_result($Erg, 0, "UID");
14 years ago
14 years ago
// 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'
));
14 years ago
?>