Viewing file: global.php (1.89 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
//include_once "../link/keyThai.php";
include_once("global0.php");
$GLOBALS['DBHOST'] = "localhost";
$GLOBALS['DBNAME_EOFFICE'] = "eopbri";
$GLOBALS['DBUSER_EOFFICE'] = "eoffice";
$GLOBALS['DBPASS_EOFFICE'] = "45530577";
$GLOBALS['DBNAME_EPERSON'] = "people";
$GLOBALS['DBUSER_EPERSON'] = "eoffice";
$GLOBALS['DBPASS_EPERSON'] = "45530577";
$GLOBALS['DBNAME_UMS'] = "umseo";
$GLOBALS['DBUSER_UMS'] = "eoffice";
$GLOBALS['DBPASS_UMS'] = "45530577";
include_once "../class/clsDepartment.php";
include_once "../class/clsRunningDoc.php";
include_once "../class/clsRunningTypeDoc.php";
include_once "../class/clsSysConfig.php";
$oCe = new clsConnection($GLOBALS['DBHOST'], $GLOBALS['DBNAME_EOFFICE'], $GLOBALS['DBUSER_EOFFICE'], $GLOBALS['DBPASS_EOFFICE']);
$oDPt = new Department($oCe);
$oRd = new runningdoc($oCe);
$oRt = new runningtypedoc($oCe);
$oSys = new sysConfig($oCe);
$oSys->RSsysConfig();
$oSys->GetRecord();
//---show server path
$GLOBALS['SERVERPATH']="http://".$oSys->pbriHost."/mispbri/eoffice/admin/updatecollege.php";
//---show documents path
$GLOBALS['DOCPATH']="http://".$HOST_NAME.$ROOT_URL."eoffice/documents/";
//---check running new year
$GLOBALS['Output_Thai']=$oSys->OutputThai;
$maxGroup=$oDPt->SearchMaxDocGroup();
//-----runningdoc table
if($oSys->SearchBysysYear()!=(date('Y')+543)){
$oRd->SearchBydocGroup($maxGroup);
while($oRd->GetRecord()){
$oRd->Edit();
$oRd->DtID=$oRd->DtID;
$oRd->deptId=$oRd->deptId;
$oRd->receiveNoStart =1;
$oRd->receiveNo=0;
$oRd->sendNoStart =1;
$oRd->sendNo=0;
$oRd->regisNoStart =1;
$oRd->regisNo=0;
$oRd->docGroup=$oRd->docGroup;
$oRd->confirm=$oRd->confirm;
$oRd->Save();
}
//--update sysYear
$oSys->SearchByKey();
$oSys->GetRecord();
$oSys->Edit();
$oSys->sysYear=(date('Y')+543);
$oSys->Save();
}
?>
|