$sql="select r.cs_code,c.course_nam,r.lc_section,r.lb_section from register r,all_course c where";
$sql="$sql r.cs_code=c.cs_code ";
$sql="$sql and r.sm_yr='$toYear2' and r.sm_sem='$toSem' and r.std_id='$std_id' ";
$sql="$sql and c.yr='$toYear2' and c.sm='$toSem' ";
$sql="$sql order by r.cs_code ";
//echo $sql;
$cn_dbu=ora_open($fn);
$pn_u=ora_parse($cn_dbu,$sql);
$rn_u=ora_exec($cn_dbu);
if ($type_form==1) //======= start นิสิตประเมินผู้สอน
{
?>
ลำดับที่
รหัสวิชา
ชื่อวิชา
ประเภทหมู่
หมู่เรียน
ชื่ออาจารย์ผู้สอน
$i=0;
$cs_code="";
$bg[0]="#E6FFFF";
$bg[1]="#CCFFCC";
$col=0;
while(ora_fetch_into($cn_dbu,&$result))
{
if($cs_code!= $result[0])
{
$col++;
$cs_code= $result[0];
}
//หมู่เรียนบรรยายอย่างเดียว
if ($result[2] > 0 and $result[3]==0)
{
$sql="select a.first_name,a.last_name,a.advisor_id,a.efirst_name,a.elast_name from teacher t,advisor a where";
$sql="$sql t.advisor_id=a.advisor_id ";
$sql="$sql and t.yr='$toYear2' and t.semester='$toSem'";
$sql="$sql and t.q_code=$result[0] and q_sec=$result[2] and q_type='1' ";
$cn_dbuLec=ora_open($fn);
$pn_uLec=ora_parse($cn_dbuLec,$sql);
$rn_uLec=ora_exec($cn_dbuLec);
//echo $sql;
$k=0;
$Teacher_Teach=false;
while(ora_fetch_into($cn_dbuLec,&$resultLec))
{
$i++;
$Teacher_Teach=true;
echo '
";
//ตรวจสอบการประเมิน
// $sql="select * from check_assess where type_form=$type_form and a_yr='$toYear2' and a_semester='$toSem' and std_id='$std_id' and cs_code='$result[0]' and type_section='1' and section=$result[2] and advisor_id='$resultLec[2]' ";
$sql=" select distinct a.assess_id from check_assess c,assess_score a where a_yr='$toYear2' and a_semester='$toSem' and c.type_form=$type_form and cs_Code='$result[0]' and std_id='$std_id' and advisor_id='$resultLec[2]' and type_section='1' and section=$result[2] and times='$times' and c.assess_id=a.assess_id ";
$cn_dbuTmp=ora_open($fn);
$pn_uTmp=ora_parse($cn_dbuTmp,$sql);
$rn_uTmp=ora_exec($cn_dbuTmp);
if(ora_fetch_into($cn_dbuTmp,&$resultTmp))
echo "
ประเมินแล้ว
";
else
{
echo "
";
//ไม่ประเมินวิชา Seminar และ Thesis(xxxx97,xxxx99) //substr($result[0],6,2)>='95' and substr($result[0],6,2)<='99' and substr($result[0],0,5)!='01372'
if (substr($result[0],6,2)=='95' or substr($result[0],6,2)=='99' )
{
//ตรวจสอบการอนุญาติให้ประเมิน
$sql_permit="select * from permit_code9599 where q_code='$result[0]' and yr=$toYear2 and semester=$toSem and advisor_id='$resultLec[2]' and q_type='1' and q_sec='$result[2]' ";
// echo $sql_permit;
$cn_permit=ora_open($fn);
$pn_permit=ora_parse($cn_permit,$sql_permit);
$rn_permit=ora_exec($cn_permit);
$permit=false;
if(ora_fetch_into($cn_permit,&$result_permit))
$permit=true;
//echo $sql_permit;
ora_close($cn_permit);
if ($permit)
{
if ($btmp and $btmp2){
//($curr_date>=$start_date and $curr_date<=$end_date)
//echo "";
// echo " ";
} // if ($btmp and $btmp2)
else
{
if ($btmp and $btmp2){
//$curr_date>=$start_date and $curr_date<=$end_date)
echo "หมดเขตการประเมิน";
}
else
{
echo "ยังไม่ถึงช่วงเวลาประเมิน";
}
} // else
} // if ($permit)
else
{
echo "ไม่ประเมินรายวิชา";
}
} // ไม่ประเมินวิชา Seminar และ Thesis(xxxx97,xxxx99)
else // ประเมินรายวิชา
{
if ($btmp and $btmp2)
{
//($curr_date>=$start_date and $curr_date<=$end_date)
// echo " ";
echo "";
} //if ($btmp and $btmp2)
else
{
if ($btmp and $btmp2)
{ //($curr_date>=$start_date and $curr_date<=$end_date)
echo "หมดเขตการประเมิน";
}
else
{
echo "ยังไม่ถึงช่วงเวลาประเมิน";
}
} // else
} // ประเมินรายวิชา
} // while
echo "
";
//ตรวจสอบการประเมิน
// $sql="select * from check_assess where type_form=$type_form and a_yr='$toYear2' and a_semester='$toSem' and std_id='$std_id' and cs_code='$result[0]' and type_section='1' and section=$result[2] and advisor_id is null ";
$sql=" select distinct a.assess_id from check_assess c,assess_score a where a_yr='$toYear2' and a_semester='$toSem' and c.type_form=$type_form and cs_code='$result[0]' and std_id='$std_id' and type_section='1' and section=$result[2] and advisor_id is null and times='$times' and c.assess_id=a.assess_id ";
$cn_dbuTmp=ora_open($fn);
$pn_uTmp=ora_parse($cn_dbuTmp,$sql);
$rn_uTmp=ora_exec($cn_dbuTmp);
if(ora_fetch_into($cn_dbuTmp,&$resultTmp))
echo "
ประเมินแล้ว
";
else
{
echo "
";
//ไม่ประเมินวิชา Seminar และ Thesis(xxxx97,xxxx99)
if (substr($result[0],4,2)=='95' or substr($result[0],4,2)=='99')
{
echo "ไม่ประเมินรายวิชา";
}
else
{
if ($btmp and $btmp2)
{ //($curr_date>=$start_date and $curr_date<=$end_date)
//echo "";
// echo "";
}
else
{
if($btmp and $btmp2)
{ //($curr_date>=$start_date and $curr_date<=$end_date)
echo "หมดเขตการประเมิน";
}
else
{
echo "ยังไม่ถึงช่วงเวลาประเมิน";
}
}
}
}
echo "
";
ora_close($cn_dbuTmp);
echo '
';
}
ora_close($cn_dbuLec);
}
//หมู่เรียนปฏิบัติอย่างเดียว
else if ($result[2]==0 and $result[3]>0)
{
$sql="select a.first_name,a.last_name,a.advisor_id from teacher t,advisor a where";
$sql="$sql t.advisor_id=a.advisor_id ";
$sql="$sql and t.yr='$toYear2' and t.semester='$toSem'";
$sql="$sql and t.q_code=$result[0] and q_sec=$result[3] and q_type='2' ";
$cn_dbuLab=ora_open($fn);
$pn_uLab=ora_parse($cn_dbuLab,$sql);
$rn_uLab=ora_exec($cn_dbuLab);
$Teacher_Teach=false;
while(ora_fetch_into($cn_dbuLab,&$resultLab))
{
$i++;
$Teacher_Teach=true;
echo '
";
//ตรวจสอบการประเมิน
//$sql="select * from check_assess where type_form=$type_form and a_yr='$toYear2' and a_semester='$toSem' and std_id='$std_id' and cs_code='$result[0]' and type_section='2' and section=$result[3] and advisor_id='$resultLab[2]' ";
$sql=" select distinct a.assess_id from check_assess c,assess_score a where c.type_form=$type_form and a_yr='$toYear2' and a_semester='$toSem' and std_id='$std_id' and cs_code='$result[0]' and type_section='2' and section=$result[3] and advisor_id='$resultLab[2]' and times='$times' and c.assess_id=a.assess_id ";
// echo $sql;
$cn_dbuTmp=ora_open($fn);
$pn_uTmp=ora_parse($cn_dbuTmp,$sql);
$rn_uTmp=ora_exec($cn_dbuTmp);
if(ora_fetch_into($cn_dbuTmp,&$resultTmp))
echo "
ประเมินแล้ว
";
else
{
echo "
";
//ไม่ประเมินวิชา Seminar และ Thesis(xxxx97,xxxx99)
if (substr($result[0],6,2)=='95' or substr($result[0],6,2)=='99' ) //if (substr($result[0],4,2)>='95' and substr($result[0],4,2)<='99')
{
//ตรวจสอบการอนุญาติให้ประเมิน
$sql_permit="select * from permit_code9599 where q_code='$result[0]' and yr=$toYear2 and semester=$toSem and advisor_id='$resultLab[2]' and q_type='2' and q_sec='$result[3]' ";
// echo $sql_permit;
$cn_permit=ora_open($fn);
$pn_permit=ora_parse($cn_permit,$sql_permit);
$rn_permit=ora_exec($cn_permit);
$permit=false;
if(ora_fetch_into($cn_permit,&$result_permit))
$permit=true;
//echo $sql_permit;
ora_close($cn_permit);
if ($permit)
{
if ($btmp and $btmp2)
{ //($curr_date>=$start_date and $curr_date<=$end_date)
//echo "";
// echo " ";
}
else
{
if ($btmp and $btmp2)
{ //($curr_date>=$start_date and $curr_date<=$end_date)
echo "หมดเขตการประเมิน";
}
else
{
echo "ยังไม่ถึงช่วงเวลาประเมิน";
}
}
}
else
{
echo "ไม่ประเมินรายวิชา";
}
}
else
{
if ($btmp and $btmp2)
{ // ($curr_date>=$start_date and $curr_date<=$end_date)
//echo "";
}
else
{
if ($btmp and $btmp2)
{ //($curr_date>=$start_date and $curr_date<=$end_date)
echo "หมดเขตการประเมิน";
}
else
{
echo "ยังไม่ถึงช่วงเวลาประเมิน";
}
}
}
}
echo "
";
//ตรวจสอบการประเมิน
//$sql="select * from check_assess where type_form=$type_form and a_yr='$toYear2' and a_semester='$toSem' and std_id='$std_id' and cs_code='$result[0]' and type_section='2' and section=$result[3] and advisor_id is null ";
$sql=" select distinct a.assess_id from check_assess c,assess_score a where c.type_form=$type_form and a_yr='$toYear2' and a_semester='$toSem' and std_id='$std_id' and cs_code='$result[0]' and type_section='2' and section=$result[3] and advisor_id is null and times='$times' and c.assess_id=a.assess_id ";
$cn_dbuTmp=ora_open($fn);
$pn_uTmp=ora_parse($cn_dbuTmp,$sql);
$rn_uTmp=ora_exec($cn_dbuTmp);
if(ora_fetch_into($cn_dbuTmp,&$resultTmp))
echo "
ประเมินแล้ว
";
else
{
echo "
";
//ไม่ประเมินวิชา Seminar และ Thesis(xxxx97,xxxx99)
if (substr($result[0],4,2)=='95' or substr($result[0],4,2)=='99')
{
echo "ไม่ประเมินรายวิชา";
}
else
{
if ($btmp and $btmp2)
{ //($curr_date>=$start_date and $curr_date<=$end_date)
//echo "";
// echo "";
}
else
{
if ($btmp and $btmp2)
{ //($curr_date>=$start_date and $curr_date<=$end_date)
echo "หมดเขตการประเมิน";
}
else
{
echo "ยังไม่ถึงช่วงเวลาประเมิน";
}
}
}
}
echo "
";
ora_close($cn_dbuTmp);
echo '
';
}
}
//หมู่เรียนบรรยายและปฏิบัต
else
{
//Lecture
$sql="select a.first_name,a.last_name,a.advisor_id from teacher t,advisor a where";
$sql="$sql t.advisor_id=a.advisor_id ";
$sql="$sql and t.yr='$toYear2' and t.semester='$toSem' ";
$sql="$sql and t.q_code=$result[0] and q_sec=$result[2] and q_type='1' ";
$cn_dbuLec=ora_open($fn);
$pn_uLec=ora_parse($cn_dbuLec,$sql);
$rn_uLec=ora_exec($cn_dbuLec);
$Teacher_Teach=false;
while(ora_fetch_into($cn_dbuLec,&$resultLec))
{
$Teacher_Teach=true;
$i++;
echo '
";
//ตรวจสอบการประเมิน
//$sql="select * from check_assess where type_form=$type_form and a_yr='$toYear2' and a_semester='$toSem' and std_id='$std_id' and cs_code='$result[0]' and type_section='1' and section=$result[2] and advisor_id='$resultLec[2]' ";
$sql=" select distinct a.assess_id from check_assess c,assess_score a where c.type_form=$type_form and a_yr='$toYear2' and a_semester='$toSem' and std_id='$std_id' and cs_code='$result[0]' and type_section='1' and section=$result[2] and advisor_id='$resultLec[2]' and times='$times' and c.assess_id=a.assess_id ";
$cn_dbuTmp=ora_open($fn);
$pn_uTmp=ora_parse($cn_dbuTmp,$sql);
$rn_uTmp=ora_exec($cn_dbuTmp);
if(ora_fetch_into($cn_dbuTmp,&$resultTmp))
echo "
ประเมินแล้ว
";
else
{
echo "
";
//ไม่ประเมินวิชา Seminar และ Thesis(xxxx97,xxxx99)
if (substr($result[0],6,2)=='95' or substr($result[0],6,2)=='99' )
{
//ตรวจสอบการอนุญาติให้ประเมิน
$sql_permit="select * from permit_code9599 where q_code='$result[0]' and yr=$toYear2 and semester=$toSem and advisor_id='$resultLec[2]' and q_type='1' and q_sec='$result[2]'";
// echo $sql_permit;
$cn_permit=ora_open($fn);
$pn_permit=ora_parse($cn_permit,$sql_permit);
$rn_permit=ora_exec($cn_permit);
$permit=false;
if(ora_fetch_into($cn_permit,&$result_permit))
$permit=true;
//echo $sql_permit;
ora_close($cn_permit);
if ($permit)
{
if ($btmp and $btmp2)
{ //($curr_date>=$start_date and $curr_date<=$end_date)
//echo "";
}
}
}
else
{
if ($btmp and $btmp2)
{ //($curr_date>=$start_date and $curr_date<=$end_date)
// echo "";
// echo " ";
}
else
{
if ($btmp and $btmp2)
{ //($curr_date>=$start_date and $curr_date<=$end_date)
echo "หมดเขตการประเมิน";
}
else
{
echo "ยังไม่ถึงช่วงเวลาประเมิน";
}
}
}
}
echo "
";
//ตรวจสอบการประเมิน
// $sql="select * from check_assess where type_form=$type_form and a_yr='$toYear2' and a_semester='$toSem' and std_id='$std_id' and cs_code='$result[0]' and type_section='1' and section=$result[2] and advisor_id is null ";
$sql=" select distinct a.assess_id from check_assess c,assess_score a where c.type_form=$type_form and a_yr='$toYear2' and a_semester='$toSem' and std_id='$std_id' and cs_code='$result[0]' and type_section='1' and section=$result[2] and advisor_id is null and times='$times' and c.assess_id=a.assess_id";
$cn_dbuTmp=ora_open($fn);
$pn_uTmp=ora_parse($cn_dbuTmp,$sql);
$rn_uTmp=ora_exec($cn_dbuTmp);
if(ora_fetch_into($cn_dbuTmp,&$resultTmp))
echo "
ประเมินแล้ว
";
else
{
echo "
";
//ไม่ประเมินวิชา Seminar และ Thesis(xxxx97,xxxx99)
if (substr($result[0],4,2)=='95' or substr($result[0],4,2)=='99')
{
echo "ไม่ประเมินรายวิชา";
}
else
{
if($btmp and $btmp2)
{ // ($curr_date>=$start_date and $curr_date<=$end_date)
//echo "";
// echo "";
}
else
{
if ($btmp and $btmp2)
{ //($curr_date>=$start_date and $curr_date<=$end_date)
echo "หมดเขตการประเมิน";
}
else
{
echo "ยังไม่ถึงช่วงเวลาประเมิน";
}
}
}
}
echo "
";
ora_close($cn_dbuTmp);
echo '
';
}
//หมู่ปฏิบัติ
$sql="select a.first_name,a.last_name,a.advisor_id from teacher t,advisor a where";
$sql="$sql t.advisor_id=a.advisor_id ";
$sql="$sql and t.yr='$toYear2' and t.semester='$toSem'";
$sql="$sql and t.q_code=$result[0] and q_sec=$result[3] and q_type='2' ";
$cn_dbuLab=ora_open($fn);
$pn_uLab=ora_parse($cn_dbuLab,$sql);
$rn_uLab=ora_exec($cn_dbuLab);
$Teacher_Teach=false;
while(ora_fetch_into($cn_dbuLab,&$resultLab))
{
$Teacher_Teach=true;
$i++;
echo '
";
//ตรวจสอบการประเมิน
//$sql="select * from check_assess where type_form=$type_form and a_yr='$toYear2' and a_semester='$toSem' and std_id='$std_id' and cs_code='$result[0]' and type_section='2' and section=$result[3] and advisor_id='$resultLab[2]' ";
$sql=" select distinct a.assess_id from check_assess c,assess_score a where c.type_form=$type_form and a_yr='$toYear2' and a_semester='$toSem' and std_id='$std_id' and cs_code='$result[0]' and type_section='2' and section=$result[3] and advisor_id='$resultLab[2]' and times='$times' and c.assess_id=a.assess_id ";
$cn_dbuTmp=ora_open($fn);
$pn_uTmp=ora_parse($cn_dbuTmp,$sql);
$rn_uTmp=ora_exec($cn_dbuTmp);
if(ora_fetch_into($cn_dbuTmp,&$resultTmp))
echo "
ประเมินแล้ว
";
else
{
echo "
";
//ไม่ประเมินวิชา Seminar และ Thesis(xxxx97,xxxx99)
if (substr($result[0],6,2)=='95' or substr($result[0],6,2)=='99' )
{
//ตรวจสอบการอนุญาติให้ประเมิน
$sql_permit="select * from permit_code9599 where q_code='$result[0]' and yr=$toYear2 and semester=$toSem and advisor_id='$resultLec[2]' and q_type='2' and q_sec='$result[3]'";
$cn_permit=ora_open($fn);
$pn_permit=ora_parse($cn_permit,$sql_permit);
$rn_permit=ora_exec($cn_permit);
$permit=false;
if(ora_fetch_into($cn_permit,&$result_permit))
$permit=true;
//echo $sql_permit;
ora_close($cn_permit);
if ($permit)
{
if ($btmp and $btmp2)
{ //($curr_date>=$start_date and $curr_date<=$end_date)
//echo "";
}
}
}
else
{
if ($btmp and $btmp2)
{ //($curr_date>=$start_date and $curr_date<=$end_date)
//echo "";
// echo "";
}
else
{
if ($btmp and $btmp2)
{ //($curr_date>=$start_date and $curr_date<=$end_date)
echo "หมดเขตการประเมิน";
}
else
{
echo "ยังไม่ถึงช่วงเวลาประเมิน";
}
}
}
}
echo "
";
//ตรวจสอบการประเมิน
// $sql="select * from check_assess where type_form=$type_form and a_yr='$toYear2' and a_semester='$toSem' and std_id='$std_id' and cs_code='$result[0]' and type_section='2' and section=$result[3] and advisor_id is null ";
$sql=" select distinct a.assess_id from check_assess c,assess_score a where c.type_form=$type_form and a_yr='$toYear2' and a_semester='$toSem' and std_id='$std_id' and cs_code='$result[0]' and type_section='2' and section=$result[3] and advisor_id is null and times='$times' and c.assess_id=a.assess_id ";
$cn_dbuTmp=ora_open($fn);
$pn_uTmp=ora_parse($cn_dbuTmp,$sql);
$rn_uTmp=ora_exec($cn_dbuTmp);
if(ora_fetch_into($cn_dbuTmp,&$resultTmp))
echo "
ประเมินแล้ว
";
else
{
echo "
";
//ไม่ประเมินวิชา Seminar และ Thesis(xxxx97,xxxx99)
if (substr($result[0],4,2)=='95' or substr($result[0],4,2)=='99')
{
echo "ไม่ประเมินรายวิชา";
}
else
{
if ($btmp and $btmp2)
{ //($curr_date>=$start_date and $curr_date<=$end_date)
//echo "";
// echo "";
}
else
{
if ($btmp and $btmp2)
{ //($curr_date>=$start_date and $curr_date<=$end_date)
echo "หมดเขตการประเมิน";
}
else
{
echo "ยังไม่ถึงช่วงเวลาประเมิน";
}
}
}
}
echo "
';
//ตรวจสอบการประเมิน
//$sql="select * from check_assess where type_form=$type_form and a_yr='$toYear2' and a_semester='$toSem' and std_id='$std_id' and cs_code='$result[0]' ";
$sql=" select distinct a.assess_id from check_assess c,assess_score a where c.type_form=$type_form and a_yr='$toYear2' and a_semester='$toSem' and std_id='$std_id' and cs_code='$result[0]' and times='$times' and c.assess_id=a.assess_id ";
$cn_dbuTmp=ora_open($fn);
$pn_uTmp=ora_parse($cn_dbuTmp,$sql);
$rn_uTmp=ora_exec($cn_dbuTmp);
if(ora_fetch_into($cn_dbuTmp,&$resultTmp))
echo "
ประเมินแล้ว
";
else
{
echo "
";
//ไม่ประเมินวิชา Seminar และ Thesis(xxxx97,xxxx99)
if (substr($result[0],6,2)=='95' or substr($result[0],6,2)=='99' )
{
//ตรวจสอบการอนุญาติให้ประเมิน
$sql_permit="select distinct q_code from permit_code9599 where q_code='$result[0]' and yr=$toYear2 and semester=$toSem";
$cn_permit=ora_open($fn);
$pn_permit=ora_parse($cn_permit,$sql_permit);
$rn_permit=ora_exec($cn_permit);
if(ora_fetch_into($cn_permit,&$result_permit))
$permit=true;
ora_close($cn_permit);
if ($permit)
{
if ($btmp and $btmp2)
{ //($curr_date>=$start_date and $curr_date<=$end_date)
//echo "";
// echo "";
}
else
{
if ($btmp and $btmp2)
{ //($curr_date>=$start_date and $curr_date<=$end_date)
echo "หมดเขตการประเมิน";
}
else
{
echo "ยังไม่ถึงช่วงเวลาประเมิน";
}
}
}
else
{
echo "ไม่ประเมินรายวิชา";
}
}
else
{
if ($btmp and $btmp2)
{ //($curr_date>=$start_date and $curr_date<=$end_date)
//echo "";
// echo "";
}
else
{
if ($btmp and $btmp2)
{ //($curr_date>=$start_date and $curr_date<=$end_date)
echo "หมดเขตการประเมิน";
}
else
{
echo "ยังไม่ถึงช่วงเวลาประเมิน";
}
}
}
echo "
";
}
ora_close($cn_dbuTmp);
echo '
';
}
ora_close($cn_dbu);
echo "
";
}
// อาจารย์ประเมินตนเอง
else if ($type_form==2)
{
$sql="select distinct t.q_code,c.course_nam,a.first_name,a.last_name,a.advisor_id,t.q_type,t.q_sec from teacher t,advisor a,course c where";
$sql="$sql t.advisor_id='$adv_id'";
$sql="$sql and t.advisor_id=a.advisor_id";
$sql="$sql and t.yr='$toYear2' and t.semester='$toSem' ";
$sql="$sql and t.q_code=c.cs_code and t.semester=c.semester order by q_code ";
$cn_adv=ora_open($fn);
$pn_adv=ora_parse($cn_adv,$sql);
$rn_adv=ora_exec($cn_adv);
?>
';
//ตรวจสอบการประเมิน
//$sql="select * from check_assess where type_form=$type_form and a_yr='$toYear2' and a_semester='$toSem' and advisor_id='$adv_id' and cs_code='$result[0]' and type_section='$result[5]' and section=$result[6] ";
$sql=" select distinct a.assess_id from check_assess c,assess_score a where c.type_form=$type_form and a_yr='$toYear2' and a_semester='$toSem' and advisor_id='$adv_id' and cs_code='$result[0]' and type_section='$result[5]' and section=$result[6] and times='$times' and c.assess_id=a.assess_id ";
$cn_dbuTmp=ora_open($fn);
$pn_uTmp=ora_parse($cn_dbuTmp,$sql);
$rn_uTmp=ora_exec($cn_dbuTmp);
if(ora_fetch_into($cn_dbuTmp,&$resultTmp))
echo "
ประเมินแล้ว
";
else
{
echo "
";
//ไม่ประเมินวิชา Seminar และ Thesis(xxxx97,xxxx99)
// if (substr($result[0],6,2)=='95' or substr($result[0],6,2)=='99' ) // 18/01/2555
//=============== สำหรับให้ วข บางเขน เข้าประเมิน ปลาย 54 -- 16/02/2555 (หมดปี ปลาย 54ต้องเอาออก) // or $campCode=='K'
if (substr($result[0],6,2)=='95' or substr($result[0],6,2)=='99' )
{
//ตรวจสอบการอนุญาติให้ประเมิน
$sql_permit="select * from permit_code9599 where q_code='$result[0]' and yr=$toYear2 and semester=$toSem and advisor_id='$adv_id' and q_type='$result[5]' and q_sec='$result[6]'";
$cn_permit=ora_open($fn);
$pn_permit=ora_parse($cn_permit,$sql_permit);
$rn_permit=ora_exec($cn_permit);
if(ora_fetch_into($cn_permit,&$result_permit))
$permit=true;
ora_close($cn_permit);
if ($permit)
{
if ($btmp and $btmp3)
{ //($curr_date>=$start_date and $curr_date<=$end_date)
//echo "";
// echo "";
}
else
{
if ($btmp and $btmp3)
{ //($curr_date>=$start_date and $curr_date<=$end_date)
echo "หมดเขตการประเมิน";
}
else
{
echo "ยังไม่ถึงช่วงเวลาประเมิน";
}
}
}
else
{
echo "ไม่ประเมินรายวิชา"; // 18/01/2555
//=============== สำหรับให้ วข บางเขน เข้าประเมิน ปลาย 54 -- 18/01/2555 (หมดปี ปลาย 54ต้องเอาออก)
/*if($campCode=='K')
echo "หมดช่วงเวลาประเมิน";
else
echo "ไม่ประเมินรายวิชา";*/
//============== สำหรับให้ วข บางเขน เข้าประเมิน ปลาย 54 -- 18/01/2555 (หมดปี ปลาย 54ต้องเอาออก)
}
}
else
{
if ($btmp and $btmp3)
{ //($curr_date>=$start_date and $curr_date<=$end_date)
//echo "";
// echo "";
}
else
{
if ($btmp and $btmp3)
{ // ($curr_date>=$start_date and $curr_date<=$end_date)
echo "หมดเขตการประเมิน";
}
else
{
echo "ยังไม่ถึงช่วงเวลาประเมิน";
}
}
}
echo "
";
}
ora_close($cn_dbuTmp);
echo '
';
}
echo "
";
}
}
// นิสิตประเมินอาจารย์ที่ปรึกษา
if ($type_form==4){
?>
ลำดับที่
ชื่ออาจารย์ที่ปรึกษา
include "connet.php";
if ($btmp and $btmp2) { //ช่วงเวลาประเมิน
//ตรวจสอบการประเมิน
//$sql_chk=" select count(std_id) CSTD from check_advisor where std_id='$std_id' and a_yr='$toYear2' and a_semester='$toSem' ";
$sql_chk="select count(distinct(c.assess_id)) CSTD from check_advisor c,assess_advisor a where std_id='$std_id' and a_yr='$toYear2' and a_semester='$toSem' and times='$times' and c.assess_id=a.assess_id ";
$stmt=ociparse($conn,$sql_chk);
ociexecute($stmt);
ocifetch($stmt);
$chk=ociresult($stmt,"CSTD");
$sel="select s.std_id,a.advisor_id,a.first_name,a.last_name,substr(dept_id_new,0,1) CAM from student s,advisor a where std_id='$std_id' and s.advisor_id=a.advisor_id(+) ";
$stmt=ociparse($conn,$sel);
ociexecute($stmt);
while(ocifetch($stmt)){
//echo ociresult($stmt,"STD_NAME");
?>
1
()
if($chk == 0){ ?>
} else if($chk >=1 ){ ?>
ประเมินแล้ว
} ?>
}
echo '
';
} ///ช่วงเวลาประเมิน
} // if ($type_form==4) นิสิตประเมินอาจารย์ที่ปรึกษา
?>