Viewing file: changedept.php (1.47 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<? include_once "template.php"; include_once "../class/clsTable.php"; include_once "../class/clsDepartment.php"; include_once "../class/clsPerson.php"; include_once "../link/function.php";
$oC = new clsConnection($GLOBALS['DBHOST'], $GLOBALS['DBNAME_EPERSON'], $GLOBALS['DBUSER_EPERSON'], $GLOBALS['DBPASS_EPERSON']);
$oDpT = new Department($oC); $oDp = new Department($oC); $oDP = new Department($oC); $oDP2 = new Department($oC); $oDP3 = new Department($oC); $oPS = new Person($oC); $maxdate = $oDP3->MaxDate(); list($yy, $mm, $dd) = split("[-]", $maxdate); $yy=($yy-543); $maxdate2="$yy$mm$dd"; echo "tgtrgtrg";
echo "regergrge";
$oPS->RSPersonf1(); while($oPS->GetRecord()){ $oPS->Edit(); $oPS->personId=$oPS->personId; echo "personId=".$oPS->personId."<br>"; $oDp->SearchNewdept($oPS->deptId); if($oDp->GetRecord()==1){ $oPS->deptId=$oDp->deptId; echo "deptId=".$oPS->deptId."<br>"; }else{ $oPS->deptId=$oPS->deptId; echo "deptId=".$oPS->deptId."<br>"; } $oPS->workGpId=$oPS->workGpId; $oPS->prefixId=$oPS->prefixId; $oPS->fName=$oPS->fName; $oPS->lName=$oPS->lName; $oPS->fStatus=$oPS->fStatus; $oPS->adminId=$oPS->adminId; $oPS->fRetire=$oPS->fRetire; $oPS->hireId=$oPS->hireId; //echo "เจอ=update=".$oPS->fName."".$oPS->lName."fstatus=".$oPS->fStatus."<br>"; $oPS->Save(); echo "-----------------<br>"; }
?> <?php //$oC->Disconnect(); showFooter(); ?>
|