SearchMaxDocGroup();
if($method=="setFlagread2"){
$oRs->SearchByKey($DrsID);
$oRs->GetRecord();
$oRs->Edit();
$oRs->DrsflagRead="N";
$oRs->Save();
echo "";
}else if($method=="setFlagread3"){
$oRs->SearchByKey($DrsID);
$oRs->GetRecord();
$oRs->Edit();
$oRs->DrsflagRead=" ";
$oRs->Save();
echo "";
}else if($method=="setFlagread4"){
$oRs->SearchByKey($DrsID);
$oRs->GetRecord();
$oRs->Edit();
$oRs->DrsflagRead=" ";
$oRs->Save();
echo "";
}else if($method=="updateDoc5"){
$timesend=getNowDateTh()." ".date('H:i:s');
$oRs->SearchByKey($DrsID);
$oRs->GetRecord();
$oRs->Edit();
$oRs->DsID=5;
//----update DrsReadDoc
if($DaSeq!=0){
$count=strlen($DrsReadDoc);
if($count!=$DaSeq){
$newDrsReadDoc = substr_replace($DrsReadDoc, "1", $DaSeq-1,-($count-1-($DaSeq-1)));
}else{
$newDrsReadDoc = substr_replace($DrsReadDoc, "1", $count-1);
}
$oRs->DrsReadDoc=$newDrsReadDoc;
}
//-----------------------
$oRs->Save();
?>
echo "";
}else if($method=="updateDoc6"){
$timesend=getNowDateTh()." ".date('H:i:s');
$oRs->SearchByKey($DrsID);
$oRs->GetRecord();
$oRs->Edit();
$oRs->DsID=5;
$oRs->Save();
?>
echo "";
}else if($method=="acceptDoc"){
$timesend=getNowDateTh()." ".date('H:i:s');
$oRs->SearchByKey($DrsID);
$oRs->GetRecord();
$oRs->Edit();
$oRs->DsID=5;
$oRs->Save();
//echo "";
echo "";
}else if($method=="SendBack"){
$timesend=getNowDateTh()." ".date('H:i:s');
$oDoc2->SearchByKeyName($DocID,'DocID');
$oDoc2->GetRecord();
$oRs3->SearchDlcIDByDocIDDsID3Docgroup($oDoc2->DocID,$MaxDocGroup);
$oRs3->GetRecord();
$oRs->SearchByKey($DrsID);
$oRs->GetRecord();
$oRs->Edit();
$oRs->DsID=7;
$oRs->DrsDocReceiveDate=$timesend;
$oRs->DrsSendBack=$DrsSendBack;
$oRs->DrsSendBackDlcID=$oRs3->DlcID;
$oRs->Save();
echo "";
}else if($method=="acceptDoc2"){
$timesend=getNowDateTh()." ".date('H:i:s');
$oRs->SearchByKey($DrsID);
$oRs->GetRecord();
$oRs->Edit();
$oRs->DsID=5;
$oRs->DrsDocReceiveDate=$timesend;
$oRs->Save();
echo "";
}else if($method=="setDelete"){
$oRs->SearchByKey($DrsID);
$oRs->GetRecord();
$oRs->Edit();
$oRs->DrsDelete="Y";
$oRs->Save();
echo "";
}else if($method=="resetFlagreadAll"){
for($k=0;$k<=$z;$k++){
if($unread2[$k]!=""){
$oRs->SearchByKey($unread2[$k]);
$oRs->GetRecord();
$oRs->Edit();
$oRs->DrsflagRead=" ";
$oRs->Save();
}
}
echo "";
}else if($method=="setFlagreadAll2"){
$flagCommit = true;
$checkflagCommit= true;
$oC->BeginTrans();
for($k=0;$k<=$i;$k++){
if($unread[$k]!=""){
//echo "--".$unread[$k]."
";
$oRs->SearchByKey($unread[$k]);
$oRs->GetRecord();
$oRs->Edit();
$oRs->DrsflagRead="N";
$checkflagCommit = $oRs->Save();
if(!$checkflagCommit){ $flagCommit=$checkflagCommit; }
}
}
if($flagCommit)
$oC->CommitTrans();
else
$oC->RollbackTrans();
echo "";
}else if($method=="resetFlagreadAll2"){
$flagCommit = true;
$checkflagCommit= true;
$oC->BeginTrans();
for($k=0;$k<=$z;$k++){
if($unread2[$k]!=""){
//echo "--".$unread2[$k]."
";
$oRs->SearchByKey($unread2[$k]);
$oRs->GetRecord();
$oRs->Edit();
$oRs->DrsflagRead=" ";
$checkflagCommit = $oRs->Save();
if(!$checkflagCommit){ $flagCommit=$checkflagCommit; }
}
}
if($flagCommit)
$oC->CommitTrans();
else
$oC->RollbackTrans();
echo "";
}else if($method=="deldoc"){
$flagCommit = true;
$checkflagCommit= true;
$oC->BeginTrans();
for($k=0;$k<=$i;$k++){
if($unread[$k]!=""){
$oRs->SearchByKey($unread[$k]);
$oRs->GetRecord();
$oRs->Edit();
$oRs->DrsDelete="Y";
$checkflagCommit = $oRs->Save();
if(!$checkflagCommit){ $flagCommit=$checkflagCommit; }
}
}
if($flagCommit)
$oC->CommitTrans();
else
$oC->RollbackTrans();
echo "";
}else if($method=="deldoc2"){
$flagCommit = true;
$checkflagCommit= true;
$oC->BeginTrans();
for($k=0;$k<=$z;$k++){
if($unread2[$k]!=""){
$oRs->SearchByKey($unread2[$k]);
$oRs->GetRecord();
$oRs->Edit();
$oRs->DrsDelete="Y";
$checkflagCommit = $oRs->Save();
if(!$checkflagCommit){ $flagCommit=$checkflagCommit; }
}
}
if($flagCommit)
$oC->CommitTrans();
else
$oC->RollbackTrans();
echo "";
}else if($method=="showdoc"){
echo "";
}else if($method=="setDrsInboxID"){
$flagCommit = true;
$checkflagCommit= true;
$oC->BeginTrans();
for($k=0;$k<=$i;$k++){
if($unread[$k]!=""){
$oRs->SearchByKey($unread[$k]);
$oRs->GetRecord();
$oRs->Edit();
$oRs->DrsflagRead="N";
$oRs->DrsInboxID=$selectdo;
$checkflagCommit = $oRs->Save();
if(!$checkflagCommit){ $flagCommit=$checkflagCommit; }
}
}
if($flagCommit)
$oC->CommitTrans();
else
$oC->RollbackTrans();
echo "";
}else if($method=="setDrsInboxID2"){
$flagCommit = true;
$checkflagCommit= true;
$oC->BeginTrans();
for($k=0;$k<=$z;$k++){
if($unread2[$k]!=""){
$oRs->SearchByKey($unread2[$k]);
$oRs->GetRecord();
$oRs->Edit();
$oRs->DrsflagRead="N";
$oRs->DrsInboxID=$selectdo2;
$checkflagCommit = $oRs->Save();
if(!$checkflagCommit){ $flagCommit=$checkflagCommit; }
}
}
if($flagCommit)
$oC->CommitTrans();
else
$oC->RollbackTrans();
echo "";
}else if($method=="addfolder"){
$oDbx->SearchBypersonIdInboxNamenotdel($personId,$foldernew);
if($oDbx->GetRecord()=="1"){
?>