Пример #1
0
<?php

$iAssociationId = GetVar('id');
/*if($sess_usertype == 'orgadmin' && $asoc != $iAssociationId) {
   header("Location: ".SITE_URL_DUM."oadashboard");
   exit;
}*/
if (!isset($b2baObj)) {
    include_once SITE_CLASS_APPLICATION . "organization/class.Buyer2_Buyer_Association.php";
    $b2baObj = new Buyer2_Buyer_Association();
}
if (!isset($b2bavObj)) {
    include_once SITE_CLASS_APPLICATION . "organization/class.Buyer2_Buyer_Association_ToVerify.php";
    $b2bavObj = new Buyer2_Buyer_Association_ToVerify();
}
$b2bprdtls = $b2baObj->select($iAssociationId);
$b2bprdthistory = $b2bavObj->getHistory($iAssociationId);
// prints($b2bprdthistory); exit;
$smarty->assign('b2bprdtls', $b2bprdtls);
$smarty->assign('b2bprdthistory', $b2bprdthistory);
Пример #2
0
     if (!(($dtv['eStatus'] == 'Active' || $dtv['eStatus'] == 'Inactive' || $dtv['eStatus'] == 'Delete') && $dtv['eNeedToVerify'] == 'Yes')) {
         $dtv['eStatus'] = 'Active';
     }
     $dtv['eNeedToVerify'] = 'No';
     $rs = $b2bavObj->updateData($dtv, " iVerifiedID='" . $vasocdt[0]['iVerifiedID'] . "'");
     if ($rs) {
         unset($dtv['iVerifiedID']);
         unset($dtv['iAssociationId']);
         if ($vasocdt[0]['eStatus'] == 'Delete' && $vasocdt[0]['eNeedToVerify'] == 'Yes') {
             $rs = $b2baObj->delete($iAssociationId);
         } else {
             $rs = $b2baObj->updateData($dtv, " iAssociationId={$iAssociationId} ");
         }
     }
 } else {
     $dtv = $vasocdt = $b2baObj->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') {
         $rs = $b2baObj->delete($iAssociationId);
     } else {
         $rs = $b2baObj->updateData($dtv, " iAssociationId={$iAssociationId} ");
         $dtv['iAssociationId'] = $iAssociationId;
         $r = $b2bavObj->insert($dtv);
     }