Viewing file: updateDBReg.php (16.44 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?
include_once "template.php";
showHeader();
include_once "../class/clsReg_SysSemesterDes.php";
include_once "../class/clsReg_StudentMaster.php";
include_once "../class/clsReg_Level.php";
include_once "../class/clsReg_Program.php";
include_once "../class/clsReg_Prefix.php";
include_once "../class/clsReg_EnrollItem.php";
include_once "../class/clsReg_Class.php";
include_once "../class/clsReg_ClassOpenFor.php";
include_once "../class/clsReg_ClassInStructor.php";
include_once "../class/clsReg_Course.php";
include_once "../class/clsReg_Officer.php";
include_once "../class/clsReg_ClassTimeTable.php";
include_once "../class/clsReg_Day.php";
include_once "../class/clsReg_Period.php";
//include_once "../class/clsReg_AcadYearConfig.php";
include_once "../class/clsStudentAssess.php";
include_once "../class/clsRegistration.php";
include_once "../class/clsClassInStructorAssess.php";
include_once "../class/clsOfficerAssess.php";
include_once "../class/clsCourseAssess.php";
include_once "../class/clsClassAssess.php";
include_once "../class/clsClassOpenForAssess.php";
include_once "../class/clsTimeTableAssess.php";
include_once "../class/clsUpdateTable.php";
include_once "../class/clsWeekDateAssess.php";
include_once "../class/clsSysStudyTypeAssess.php";
include_once "../link/function.php";
include_once "../class/clsReg_TimeTable.php";
include_once "../class/clsReg_rg_ExternalPlace.php";
include_once "../class/clsReg_MainExternalPlace.php";
include_once "../class/clsReg_SubExternalPlace.php";
include_once "../class/clsReg_Building.php";
include_once "../class/clsReg_Room.php";
include_once "../class/clsReg_WeekDate.php";
include_once "../class/clsReg_SysStudyType.php";
include_once "../class/clsWeekDateAssess.php";
include_once "../class/clsDoAssessment.php";
include_once "../class/clsDefineAssessment.php";
include_once "../class/clsResultRQ.php";
include_once "../class/clsResultTQ.php";
include_once "../class/clsClassAssessTmp.php";
include_once "../class/clsClassInStructorAssessTmp.php";
include_once "../class/clsClassOpenForAssessTmp.php";
include_once "../class/clsTimeTableAssessTmp.php";
include_once "../class/clsRegistrationTmp.php";
include_once "../class/clsReg_rg_OFInDP.php";
include_once "../class/clsea_OFInDP.php";
include_once "../class/clsReg_rg_Department.php";
include_once "../class/clsea_Department.php";
include_once "../class/clsReg_rg_SysInstructorType.php";
include_once "../class/clsea_SysInstructorType.php";
include_once "../class/clsExternalPlace.php";
include_once "../class/clsMainExternalPlace.php";
include_once "../class/clsSubExternalPlace.php";
include_once "../class/clsBuilding.php";
include_once "../class/clsRoom.php";
$filename1 = "updateDBRegist.php";
$filename2 = "updateDBChk.php";
if(file_exists($filename1) && file_exists($filename2)) {
include_once("updateDBChk.php");
if(checkUpdateRegist()){
include_once("updateDBRegist.php");
//updateRegist();
die();
}
}
?>
<meta http-equiv="Content-Type" content="text/html; charset=tis-620">
<link href="../source/style.css" rel="stylesheet" type="text/css">
<?
if(!$acadYear)
$acadYear = $GLOBALS["ACADYEAR"];
if(!$semester)
$semester = $GLOBALS["SEMESTER"];
$oCR = new clsConnection($GLOBALS['HOST'], $GLOBALS['DB_REG'], $GLOBALS['USER_REG'], $GLOBALS['PASSWORD_REG']);
$oCA = new clsConnection($GLOBALS['HOST'], $GLOBALS['DB_EASS'], $GLOBALS['USER_EASS'], $GLOBALS['PASSWORD_EASS']);
$orDy = new Day($oCR);
$orPr = new Period($oCR);
$orPr2 = new Period($oCR);
$oWDA = new WeekDateAssess($oCA);
$oaOF = new OfficerAssess($oCA);
$orSST = new rg_SysStudyType($oCR);
$oSST = new SysStudyTypeAssess($oCA);
$oDo = new DoAssessment($oCA);
$oDA = new DefineAssessment($oCA);
$oRrq = new ResultRQ($oCA);
$oRtq = new ResultTQ($oCA);
$msgFlag = -1;
//die ("$oCR, $oCA");
//print_r($oCA);
//print_r($oCR);
include_once("processUpdateDBReg.php");
include_once("processUpdateDBRegTmp.php");
?>
<!--<form name=formdata method=post>-->
<form name=formdata method=post action="<?php echo $PHP_SELF;?>">
<input type="hidden" name="method" value="<?=$method?>">
<input type="hidden" name="formUpdate" value="<?=$formUpdate?>">
<?
$oUT = new UpdateTable($oCA);
$oUT->RSUpdateTable();
$oSse = new SysSemesterDes($oCR);
$oSse->SearchByKey($semester);
$oSse->GetRecord();
$i = 1;
?>
<br>
<table width=740 align=center border="0" cellpadding="0" cellspacing="0">
<tr><td>
<fieldset>
<legend><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="index.php?mm=1">ÿÿÿÿÿ?ÿ??ÿ?ÿ?ÿ</a>
<img src="../picture/ico3.gif" align="absmiddle" border="0">ÿÿ?ÿÿ?ÿÿÿÿÿ?ÿÿÿ?ÿ?ÿ?ÿÿ</font></legend>
<br><br>
<table width="624" align="center" border="0" cellpadding="0" cellspacing="0">
<tr >
<td width="628" height="27" class="colinput1"> <div align="center"><strong>ÿÿ?ÿÿ?ÿÿÿÿÿ?ÿÿÿ?ÿ?ÿ?ÿÿ</strong></div></tr>
</table>
<table width="623" border="0" align="center" cellspacing="1" cellpadding="2" bgcolor = "silver">
<tr class="TableHeaderBgColor">
<td height="22" align="center">ÿÿ?ÿÿ?ÿÿÿÿÿÿ</td>
<td width="103" align="center">ÿ?ÿÿÿ?ÿÿ</td>
<td width="109" align="center">ÿ?ÿÿÿÿ?ÿÿ</td>
<td align="center">ÿ?-ÿÿ?-ÿÿ / ÿÿÿÿ</td>
<td align="center">ÿÿÿ?ÿÿÿ</td>
</tr>
<?
while($oUT->GetRecord()){ ?>
<? if($method == "FormEdit$i"){ ?>
<tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_4"];?>" >
<td width="180" heigth = "22"> <span class="fontMark2">*</span> <?echo $oUT->nameTable?></td>
<td align="center">
<? if($oUT->upTid == 4){?>
<input name="inputAcadyear" type="text" value = "<? echo $acadYear ?>" size="4" maxlength="4" onKeyPress="if((event.keyCode < 48 && event.keyCode != 13) || event.keyCode > 57 ){ alert('ÿÿ?ÿÿ?ÿ?ÿÿÿ?ÿÿ?ÿÿ !!'); return false; }">
<? }else{
echo "<span class = \"fontMark4\">";
if($oUT->acadYear == '0'){ echo "-"; }else{ echo $oUT->acadYear; }
echo "</span>";
} // end else oUT->upTid == 4?> </td>
<td align="center">
<? if($oUT->upTid == 4){ ?>
<select name="selectSemester">
<?php
$oSse->RSSysSemesterDes();
while($oSse->GetRecord()) {
if($oSse->semester == $semester){
echo "<option value=\"$oSse->semester\" selected>$oSse->semesterName</option>";
}else{
echo "<option value=\"$oSse->semester\">$oSse->semesterName</option>";
}
} // end while oSse ?>
</select>
<? } else {
echo "<span class = \"fontMark4\">";
if($oUT->semester == '0'){
echo "-";
}else{
$oSse->SearchByKey($oUT->semester); $oSse->GetRecord(); echo $oSse->semesterName;
}
echo "</span>";
} // ?> </td>
<? $oSse->SearchByKey($oUT->semester);
$oSse->GetRecord();
?>
<td width="160" align="center">
<? if($oUT->dateUp == '0000-00-00'){
echo "-";
}else{
echo abbreDate2($oUT->dateUp,'/') ;
echo "(".$oUT->timeUp.")";
}
?> </td>
<td width="80" align="center">
<? if($oUT->upTid == 4){?>
<a href ="javascript:doFormMain(<? echo $i ?>,'','')"><img src="../picture/save.gif" alt="ÿ?ÿ?ÿÿÿÿ??" border="0" ></a>
<? }else{ ?>
<a href ="javascript:doFormMain(<? echo $i ?>,'<? echo $acadYear?>','<? $oSse->SearchByKey($semester); $oSse->GetRecord(); echo $oSse->semesterName ?>')"><img src="../picture/save.gif" alt="ÿ?ÿ?ÿÿÿÿ??" border="0" ></a>
<? } ?> </td>
</tr>
<? }else{ // for if method FormEdit ?>
<tr class="colinput5">
<td width="180" heigth = "22"> <span class="fontMark2">*</span> <?echo $oUT->nameTable?></td>
<td align="center"><? if($oUT->acadYear == '0'){ echo "-"; }else{ echo $oUT->acadYear; }?></td>
<td align="center"><? if($oUT->semester == '0'){
echo "-";
}else{
$oSse->SearchByKey($oUT->semester); $oSse->GetRecord(); echo $oSse->semesterName;
}?> <? //echo $oSse->semesterName; ?></td>
<td width="160" align="center">
<? if($oUT->dateUp == '0000-00-00'){
echo "-";
}else{
echo abbreDate2($oUT->dateUp,'/') ;
echo "(".$oUT->timeUp.")";
}
?> </td>
<td width="80" align="center"><a href ="javascript:doFormEdit(<? echo $i ?>)"><img src="../picture/edit1.gif" alt="ÿÿ?ÿÿÿ??" border="0" ></a></td>
</tr>
<? } // end else ?>
<? $i++;
} //end while oUT
?>
</table>
<table width="624" align="center" border="0">
<tr>
<td width="618"><font color="<?php echo $GLOBALS["COLOR_FONT_5"];?>" size="2"> <a href ="javascript:doFormMain(<? echo $i ?>,'<? echo $acadTmp ?>','<? $oSse->SearchByKey($selectSemesterTmp); $oSse->GetRecord(); echo $oSse->semesterName;?>')"><img src="../picture/info.png" border="0" ></a> <u>ÿÿÿ?ÿ</u> : ÿÿ?ÿ?ÿÿ?ÿÿÿÿÿÿÿÿ?ÿ?ÿÿÿÿ?ÿÿÿÿÿÿÿ?ÿÿÿÿ?ÿÿÿÿÿ </font></td>
</tr>
</table>
<br>
<table width=477 height="55" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#0080C0">
<? if($msgFlag == 1 ) { ?>
<tr align="center" bgcolor="#FFFFFF">
<td width="580" align="center"><span class="fontMark7">ÿÿ?ÿÿ?<font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>">
"<? echo $nameTable ?>" </font>??ÿÿÿ?ÿÿ<? echo $inputAcadyear ?>
<? $oSse->SearchByKey($selectSemester); $oSse->GetRecord(); echo $oSse->semesterName ?>
<br>
</span><span class="fontMark7">
<? $oUT->SearchByKey($upTid); $oUT->GetRecord(); ?>
ÿ ÿ?ÿÿÿ <? echo abbreDate2($oUT->dateUp,'/') ?> <? echo "ÿÿÿÿ" ?><? echo $oUT->timeUp ?></span><br>
<span class = "fontMark2"> ÿÿÿ?ÿÿÿÿÿÿÿÿ </span></td>
</tr>
<? } else if($msgFlag == 0 ) {?>
<tr align="center" bgcolor="#FFFFFF">
<td width="580"align="center"><span class="fontMark7"><b> ÿÿÿÿÿÿÿ?ÿÿ?ÿÿ?ÿÿÿÿÿÿÿÿ
</b><br>
ÿÿÿ?ÿ?ÿÿ?<font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>">
"<? echo $nameTable ?>" </font>??ÿÿÿ?ÿÿ<? echo $inputAcadyear ?>
<? $oSse->SearchByKey($selectSemester); $oSse->GetRecord(); echo $oSse->semesterName ?>
</span></td>
</tr>
<? } ?>
</table></form>
<?
$Do=1;
if($upTid == 4 && $msgFlag!=0){ ?>
<form method="POST" name="er" action="<?php echo $PHP_SELF;?>" >
<input type="hidden" name="method" value="FormStart">
<input type="hidden" name="copy" value="1">
<input type="hidden" name="inputAcadyear" value="<?=$inputAcadyear;?>">
<input type="hidden" name="selectSemester" value="<?=$selectSemester;?>">
<tr align="center">
<td align="center" colspan="6" bgcolor="#FFFFFF"><input type="submit" name="ok" value="ÿ?ÿ?ÿÿ?ÿ?ÿÿ?ÿÿÿÿÿÿ" title="ÿÿÿÿÿÿÿ?ÿ?ÿÿÿÿÿ?ÿÿÿ??ÿ?ÿÿÿÿ?ÿÿÿÿ?ÿÿÿÿ ÿ?ÿÿÿÿÿÿÿÿÿ?ÿ?ÿÿÿÿ?ÿ??ÿÿ? ÿÿÿ?ÿ??ÿÿÿÿÿÿ" />
</td>
</tr>
<?
if($Do!=0){
?>
<tr align="center">
<td align="center" colspan="6" bgcolor="#FFFFFF"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>"> " ÿÿÿÿ?ÿ?ÿÿ?ÿÿ?ÿÿÿÿÿÿ ÿ??ÿÿ?ÿ?ÿÿÿÿ?ÿÿÿÿÿ?ÿÿÿÿ ÿÿÿÿ??ÿ?ÿÿÿÿ?ÿÿÿÿ?ÿÿÿÿ <img src="../picture/warn.png" border="0" title="ÿ??ÿ?ÿÿÿÿ?ÿÿÿÿ?ÿÿÿÿ" /> <br >
ÿÿÿ??ÿÿÿÿÿÿÿÿ?ÿ?ÿÿÿÿ?ÿ??ÿÿ? "</font> </td>
</tr>
<? }else{
?>
<tr align="center">
<td align="center" colspan="6" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_4"];?>"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>"> "ÿÿ?ÿÿ?ÿ?ÿÿ?ÿÿÿÿÿ?ÿÿÿ?ÿÿÿÿÿ?ÿÿÿÿÿÿ?"</font> </td>
</tr>
<? }?>
</table>
</form>
<? }
?>
<br>
<table width="580" align="center">
<tr>
<td width="526"><input type="button" name="back2" value="ÿÿ?ÿÿÿÿÿÿ?" onClick=" location.href = 'index.php?mm=1'"></td>
</tr>
</table>
<br>
<br>
<table width="742" border="0">
<tr>
<td height="22"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>"><b>ÿÿÿÿÿ?ÿ
: </b></font></td>
<td colspan="2"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>"><img src="../picture/edit1.gif" alt="ÿÿ?ÿÿÿ??" border="0" >
ÿÿÿ?? ÿÿÿ?ÿÿÿÿÿÿÿÿÿÿÿ?ÿÿ?ÿÿ?ÿÿÿÿÿÿ ÿ?ÿÿÿÿ?ÿÿÿÿ?ÿÿ
4 ÿÿ?ÿÿÿ ÿÿÿÿÿ??ÿ?ÿÿ ÿÿÿÿÿÿÿ?ÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿ?ÿ </font></td>
</tr>
<tr>
<td> </td>
<td width="15"> </td>
<td width="651"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>">ÿÿ?ÿÿÿÿ?ÿÿ?ÿÿÿÿ?</font>
<font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>">ÿ?ÿÿÿÿ??ÿ?ÿÿ
ÿÿÿÿÿÿÿ?ÿÿÿÿ ÿÿ?ÿÿÿÿÿÿÿÿÿ???ÿ?ÿÿ?ÿ??ÿÿÿ?ÿÿÿÿÿÿ?ÿÿÿÿ?ÿ??ÿ??</font></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>">ÿÿÿÿ?ÿÿÿÿÿ?ÿÿ?ÿÿÿÿ?
ÿÿÿÿ?ÿÿÿ?ÿÿ?ÿÿ?ÿ?ÿÿÿ?ÿÿ ÿÿÿÿ?ÿÿÿÿ?ÿÿÿ?ÿÿ</font></td>
</tr>
<tr>
<td width="62"> </td>
<td colspan="2"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>"><img src="../picture/save.gif" alt="ÿ?ÿ?ÿÿÿÿ??" border="0" >
ÿÿÿ?? ÿ?ÿ?ÿÿ??ÿ?ÿÿÿÿÿÿ ÿÿÿÿÿÿÿ?ÿÿ?ÿ?ÿ?ÿÿ??ÿ?ÿ?ÿÿ?ÿÿÿÿÿÿ
ÿÿÿÿÿÿÿ?ÿ?ÿÿ?ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ?ÿÿ?ÿÿ?ÿ??ÿ?</font></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>">
ÿÿÿ?ÿÿ??ÿÿÿ?ÿÿ ÿ?ÿÿÿÿ?ÿÿ ÿÿÿÿ?ÿÿÿ/ÿÿÿ?ÿ?ÿÿ?ÿÿÿÿ? ÿ?ÿÿÿ?ÿÿ?ÿÿ
ÿÿ?ÿÿ?ÿÿÿ?ÿÿÿÿ?ÿÿÿÿ?ÿÿÿÿ?ÿÿ?</font></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>">ÿÿÿ???ÿÿÿ?ÿÿ?ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ</font></td>
</tr>
<tr>
<td> </td>
<td colspan="2"> </td>
</tr>
</table>
</td></tr></table>
<!--------------------------------------------------------------------->
<!--------------------------------------------------------------------->
<!--------------------------------------------------------------------->
<!--put javascript here-->
<script language="javascript">
function doFormEdit(i){
document.formdata.method.value="FormEdit"+i;
document.formdata.submit();
}
function doFormMain(i,txt1,txt2){
document.formdata.method.value="FormStart";
if(i==1){
if(confirm('ÿÿ?ÿÿ?ÿ?ÿÿ?ÿÿÿÿÿ??ÿ?ÿÿÿÿ '+"'ÿ?ÿÿÿ?ÿÿ"+ txt1 + " " + txt2 +"'"+' ÿÿÿÿÿÿÿÿÿ !')){
document.formdata.formUpdate.value="FormStdMaster";
document.formdata.submit();
}
}else if(i == 2){
if(confirm('ÿÿ?ÿÿ?ÿ?ÿÿ?ÿÿÿÿÿÿÿ?ÿÿÿÿÿÿ '+"'ÿ?ÿÿÿ?ÿÿ"+ txt1 + " " + txt2 +"'"+' ÿÿÿÿÿÿÿÿÿ !')){
document.formdata.formUpdate.value="FormOfficer";
document.formdata.submit();
}
}else if(i == 3){
if(confirm('ÿÿ?ÿÿ?ÿ?ÿÿ?ÿÿÿÿÿÿÿÿÿÿ?ÿÿÿ '+"'ÿ?ÿÿÿ?ÿÿ"+ txt1 + " " + txt2 +"'"+' ÿÿÿÿÿÿÿÿÿ !')){
document.formdata.formUpdate.value="FormCourse";
document.formdata.submit();
}
}else if(i == 4){
if(document.formdata.inputAcadyear.value == ""){
alert("ÿÿ??ÿ?ÿ?ÿÿÿ?ÿÿ !");
}else{
var txt3 = document.formdata.inputAcadyear.value;
var txt4 = document.formdata.selectSemester.value;
var semName; //= document.formdata.semName.value;
if(txt4 == 1){
semName = "ÿ?ÿÿÿÿ?ÿ?ÿÿ1";
}else if(txt4 == 2){
semName = "ÿ?ÿÿÿÿ?ÿ?ÿÿ2";
}else if(txt4 == 3){
semName = "ÿ??ÿÿÿ?";
}
if(confirm('ÿÿ?ÿÿ?ÿ?ÿÿ?ÿÿÿÿÿ?ÿÿ?ÿÿÿÿ?ÿ?ÿ?ÿÿÿÿ '+"'ÿ?ÿÿÿ?ÿÿ"+ txt3 + " " + semName +"'"+' ÿÿÿÿÿÿÿÿÿ !')){
document.formdata.formUpdate.value="FormReg";
document.formdata.submit();
}
}
}
}
function doFormAll(){
document.formdata.method.value="FormStartAll";
document.formdata.formUpdate.value="FormAll";
document.formdata.submit();
}
function toggle(target)
{
var row =1;
while (document.getElementById(target+row)) {
obj=document.getElementById(target+row);
obj.style.display=( (obj.style.display=='none') ? '' : 'none');
row++;
}
}
</script>
<?
$oCA->Disconnect();
$oCR->Disconnect();
showFooter();
?>
|