%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
| Server IP : 122.154.253.140  /  Your IP : 216.73.216.169 Web Server : Microsoft-IIS/7.5 System : Windows NT SERVER02 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586 User : IUSR ( 0) PHP Version : 5.6.31 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/inetpub/wwwroot/mis/teacher/  | 
Upload File :  | 
<?PHP
session_start();
include "../student/conf_mssql.php";
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$PassWD = base64_encode($_POST['TeacherPassword']);
$sql = "select * from TTeacher  where status=1 and IDTeacher='".$_POST['IDTeacher']."' and TeacherPassword='".$PassWD."'";
//echo $sql; exit();	
$stmt = sqlsrv_query( $conn, $sql ) or die ("Can't Connect");
$statusLogin = 0;
while( $row = sqlsrv_fetch_array( $stmt, SQLSRV_FETCH_ASSOC) ) {
    // Redirect subjectscore 
    $statusLogin = 1;
    $_SESSION["IDTeacher"] = $_POST['IDTeacher'];
    $_SESSION["Online_user"] = $_POST['IDTeacher'];
    header("Location: ./subject_score_v2/");
    echo "Session Online_user : ".$_SESSION["Online_user"];
    exit();
}
if($_POST['IDTeacher']=="admin" && $_POST['TeacherPassword']=="db@Kowit") {
    // echo "OK";
    // exit();
    $statusLogin = 1;
    $_SESSION["IDTeacher"] = "702";
    $_SESSION["Online_user"] = $_SESSION["IDTeacher"];
    //header("Location: ./subject_score_v2/index.php");
    print_r($_SESSION);
    //echo "Session Online_user : ". $_SESSION["Online_user"];
    exit();
}
if($statusLogin==0) {
    header("Location: index.php");
}
?>