mirror of
https://gitlab.com/harald.mueller/aktuelle.kurse.git
synced 2024-10-20 02:05:05 +02:00
56 lines
1.5 KiB
PHP
56 lines
1.5 KiB
PHP
|
<?php
|
|||
|
|
|||
|
/*************************************************/
|
|||
|
/** M151 DB Multi DB Connection **/
|
|||
|
/** Author: M. von Orelli **/
|
|||
|
/** Datum: 5. 3.2014 **/
|
|||
|
/** Version: 1.0 **/
|
|||
|
/** Applikation:Theorie **/
|
|||
|
/** **/
|
|||
|
/** Filename: function.inc **/
|
|||
|
/** Include Files:5_tier.php **/
|
|||
|
/*************************************************/
|
|||
|
|
|||
|
/*************************************************/
|
|||
|
/* Datum <20> Aenderung **/
|
|||
|
/* 3.03.14<EFBFBD> **/
|
|||
|
/* <20> **/
|
|||
|
/* <20> **/
|
|||
|
/* <20> **/
|
|||
|
/* <20> **/
|
|||
|
/*************************************************/
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
function check_user_password($cConnection, $cName, $cPassword)
|
|||
|
{
|
|||
|
// Check User Password conbination
|
|||
|
// Return Value is true for valid User, Password Combination
|
|||
|
// is false for invalid User, Password combination
|
|||
|
|
|||
|
// $Query = "CALL sps_check_login('". $cName. "','". $cPassword."')"; //MySQL Ausfuehrung
|
|||
|
$Query = "EXEC sps_check_login '". $cName. "','". $cPassword."'"; //MSSQL Ausfuehrung
|
|||
|
// echo $Query;
|
|||
|
//Execution of Querry
|
|||
|
$result = odbc_exec($cConnection,$Query );
|
|||
|
|
|||
|
//Read database date
|
|||
|
while($row= odbc_fetch_array($result))
|
|||
|
{
|
|||
|
$logon_status = $row["logon_status"];
|
|||
|
}
|
|||
|
|
|||
|
// Verify User, Password combination
|
|||
|
if ($logon_status > 0)
|
|||
|
{
|
|||
|
return 1;
|
|||
|
}
|
|||
|
|
|||
|
return -1;
|
|||
|
}
|
|||
|
|
|||
|
?>
|
|||
|
|
|||
|
|