Viewing file: stdGrade.php (2.38 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
include("rg_controller.php");
class stdGrade extends Rg_controller {
function __construct() {
parent::__construct();
}
function std_showResStudy() {
$this->load->model($this->config->item("rg_folder").'mo_rg_student','std');
$this->load->model($this->config->item("rg_folder").'mo_rg_studentsummary','ssm');
$this->load->model($this->config->item("rg_folder").'mo_rg_registdetails','rd');
$this->load->model($this->config->item("rg_folder").'mo_rg_regist','rg');
$stdCode = $this->input->post('stdCode') ? $this->input->post('stdCode') : $this->session->userdata('UsPsCode');
$con_qu_std = array('stdCode' => $stdCode,
'stdGenStatus' => 'Y'
);
$qu_std = $this->std->qryStd($con_qu_std);
if ($qu_std->num_rows()) {
$forceAssess = $this->forceAssess();
if ($forceAssess) {
$row_std = $qu_std->row();
$con_qu_std = array('stdId' => $row_std->stdId);
$this->contents['qu_std'] = $this->std->qryStdJoinSdtPfCurSySstElv($con_qu_std);
$i = 0;
$arr = array();
$con_rs_ssm = array('ssmStdId' => $row_std->stdId);
$rs_ssm = $this->ssm->qrySsm($con_rs_ssm);
foreach ($rs_ssm->result() as $row_ssm) {
$con_qu_ssm = array('ssmStdId' => $row_ssm->ssmStdId,
'ssmTmId' => $row_ssm->ssmTmId,
'ssmAcY' => $row_ssm->ssmAcY);
$arr[$i]['qu_ssm'] = $this->ssm->qrySsmJoinTm($con_qu_ssm);
$con_rs_rd = array('rdStdId' => $row_std->stdId,
'rdAcY' => $row_ssm->ssmAcY,
'rdTmId' => $row_ssm->ssmTmId
);
$arr[$i]['rs_rd'] = $this->rd->qryRdJoinCoCrs($con_rs_rd);
$con_qu_rg = array('rgStdId' => $row_std->stdId,
'rgAcY' => $row_ssm->ssmAcY,
'rgTmId' => $row_ssm->ssmTmId,
'rgStatus' => 'K'
);
$qu_rg = $this->rg->qryRg($con_qu_rg);
if ($qu_rg->num_rows()) {
$arr[$i]['kssFlag'] = "** รักษาสถานภาพการเป็นนักศึกษา **";
}
$arr[$i]['sumCrAt'] = $this->rd->getSumCrAtByStdIdAcYTmId($row_std->stdId, $row_ssm->ssmAcY, $row_ssm->ssmTmId);
$i++;
}
$this->contents['rs'] = $arr;
}
} else {
$this->contents['err_msg'] = "** ไม่ปรากฏรหัสนักศึกษาดังกล่าวในฐานข้อมูล **";
}
$this->output($this->config->item("rg_folder")."v_std_showResStudy");
}
}
?>
|