示例#1
0
 $dtv = $dtv[0];
 if (is_array($vasocdt) && count($vasocdt) > 0 && isset($vasocdt[0]['iAssociationId']) && isset($vasocdt[0]['iVerifiedID'])) {
     $dtv['eVerifiedBy'] = $sess_usertype_short;
     $dtv['iVerifiedByID'] = $sess_id;
     $dtv['dVerifiedDate'] = calcGTzTime(date('Y-m-d H:i:s'), 'Y-m-d H:i:s');
     // if(! (($dtv['eStatus']=='Active' || $dtv['eStatus']=='Inactive' || $dtv['eStatus']=='Delete') )) {
     if (!(($dtv['eStatus'] == 'Active' || $dtv['eStatus'] == 'Inactive' || $dtv['eStatus'] == 'Delete') && $dtv['eNeedToVerify'] == 'Yes')) {
         $dtv['eStatus'] = 'Active';
     }
     $dtv['eNeedToVerify'] = 'No';
     $rs = $b2savObj->updateData($dtv, " iVerifiedID='" . $vasocdt[0]['iVerifiedID'] . "'");
     if ($rs) {
         unset($dtv['iVerifiedID']);
         unset($dtv['iAssociationId']);
         if ($vasocdt[0]['eStatus'] == 'Delete' && $vasocdt[0]['eNeedToVerify'] == 'Yes') {
             $rs = $b2saObj->delete($iAssociationId);
         } else {
             $rs = $b2saObj->updateData($dtv, " iAssociationId={$iAssociationId} ");
         }
     }
 } else {
     $dtv = $vasocdt = $b2saObj->select($iAssociationId);
     $dtv = $dtv[0];
     $dtv['eVerifiedBy'] = $sess_usertype_short;
     $dtv['iVerifiedByID'] = $sess_id;
     $dtv['dVerifiedDate'] = calcGTzTime(date('Y-m-d H:i:s'), 'Y-m-d H:i:s');
     if (!(($dtv['eStatus'] == 'Active' || $dtv['eStatus'] == 'Inactive' || $dtv['eStatus'] == 'Delete') && $dtv['eNeedToVerify'] == 'Yes')) {
         $dtv['eStatus'] = 'Active';
     }
     $dtv['eNeedToVerify'] = 'No';
     if ($vasocdt[0]['eStatus'] == 'Delete' && $vasocdt[0]['eNeedToVerify'] == 'Yes') {