} // prints($assarr);exit; // prints($_POST);exit; // echo $view; exit; if ($view == 'reject') { $reasonToReject = $_POST['tReasonToReject']; $dt['eNeedToVerify'] = $dts['eNeedToVerify'] = 'No'; $dt['eStatus'] = $dts['eStatus'] = "Active"; $asorgdtls = $orgAssocObj->getDetails('*', " AND iAsociationID={$iAsociationID} "); $where = " AND vAssociationCode='" . $asorgdtls[0]['vAssociationCode'] . "'"; $updt = $orgAssocObj->getDetails('*', $where); $aAssocArr = $_POST['vSupplierOrg']; // prints($updt); exit; if (is_array($aAssocArr)) { for ($ln = 0; $ln < count($updt); $ln++) { $avrdt = $orgAssocVerifyObj->getDetails("*", " AND iAsociationID=" . $updt[$ln]['iAsociationID'] . "", " iVerifiedID DESC "); if (in_array($updt[$ln]['iAsociationID'], $aAssocArr)) { if ($updt[$ln]['eStatus'] == 'Need to Verify') { $dt['eStatus'] = $dts['eStatus'] = "Delete"; } else { if ($avrdt[0]['eStatus'] == 'Inactive' && $avrdt[0]['eNeedToVerify'] == 'Yes') { $dt['eNeedToVerify'] = $dts['eNeedToVerify'] = "No"; $dt['eStatus'] = $dts['eStatus'] = "Active"; } else { if ($avrdt[0]['eStatus'] == 'Active' && $avrdt[0]['eNeedToVerify'] == 'Yes') { $dt['eNeedToVerify'] = $dts['eNeedToVerify'] = "No"; $dt['eStatus'] = $dts['eStatus'] = "Inactive"; } else { if ($updt[$ln]['eStatus'] == 'Modified') { $dt['eStatus'] = $dts['eStatus'] = "Active"; $dts['iModifiedByID'] = "";
$verifyreq = 'Yes'; } /*if($assorgdt[$l]['eStatus'] == 'Modified' || (($assorgdt[$l]['eStatus'] == 'Active' || $assorgdt[$l]['eStatus'] == 'Inactive') && $assorgdt[$l]['eNeedToVerify'] == 'Yes')) { $verifyAssocreq='Yes'; }*/ } //print "a".$verifyreq; // prints($Oassorgdt); $verifyreq = isset($verifyreq) ? $verifyreq : ''; if ($verifyreq == 'Yes') { $orgAssocVerifyObj->setiAsociationID($iAsociationID); $asocdt = $orgAssocObj->select(); $vAsocode = $asocdt[0]['vAssociationCode']; $fields = " *, SUBSTRING_INDEX(group_concat(vsuppliercode order by iverifiedid desc),',',1) AS vSupplierCode, (Select vCompanyName from b2b_organization_master where iOrganizationID=iBuyerOrganizationID) as vBuyerOrg,\r\n (Select vCompanyName from b2b_organization_master where iOrganizationID=iSupplierAssocationID) as vSupplierOrg "; $assorgdt = $orgAssocVerifyObj->getDetails($fields, " AND vAssociationCode='{$vAsocode}' and (eStatus='Need to Verify' OR eStatus='Modified' OR eStatus='Delete' OR eNeedToVerify='Yes') AND eStatus!='' ", 'iVerifiedID Desc', ' vSupplierOrg ', ''); /* SELECT *,SUBSTRING_INDEX(group_concat(vsuppliercode order by iverifiedid desc),",",1) AS vSupplierCode, (Select vCompanyName from b2b_organization_master where iOrganizationID=iBuyerOrganizationID) as vBuyerOrg, (Select vCompanyName from b2b_organization_master where iOrganizationID=iSupplierAssocationID) as vSupplierOrg FROM b2b_organization_association_toverify Where 1 AND vAssociationCode='AS0000014' Group By vsupplierorg order by iverifiedid desc */ // print "ab"; } // prints($assorgdt); exit; if ($assorgdt[0]['eStatus'] == 'Need to Verify') { switch ($sess_usertype) { case 'securitymanager': if ($assorgdt[0]['eCreatedBy'] == 'SM') { if ($assorgdt[0]['iCreatedBy'] != $sess_id) { $verify = 'yes'; } else {
} */ /* //$res = $assObj->updateData($data, $where); $assvrfObj->setAllVar($data); $res = $assvrfObj->updateData($data, $where); $assObj->updateData(array("eNeedToVerify"=>'Yes'), $where); */ } elseif ($v['eStatus'] == 'Modified' || $v['eStatus'] == 'Need to Verify') { $var_msg = $smarty->get_template_vars('MSG_VERIFY_NEED_TO_VERIFY_OR_MODIFIED'); echo $var_msg; exit; } $where = 'AND iAsociationID = ' . $v['iAsociationID'] . ''; $orderby = ' iVerifiedID Desc'; $vrfid = $assvrfObj->getDetails('iVerifiedID', $where, $orderby); // --------------------- ORGANIZATION DATA FETCHED ------------------------------------------// $orgdata = $orgObj->select($v['iBuyerOrganizationID']); $ORGNAME = $orgdata[0]['vCompanyName']; $CODE = $orgdata[0]['vOrganizationCode']; $where = 'AND iSMID != ' . $_SESSION['SESS_' . PRJ_CONST_PREFIX . '_ID'] . ' AND eStatus = "Active"'; $smdtls = $secManObj->getDetails('*', $where); // --------------------- $where = 'AND vType="Association Status Changed" AND eSection = "Member"'; $db_email = $emailObj->getDetails('*', $where); $link = SITE_URL_DUM . "associationview/" . $v['iAsociationID']; $body = array("#ORGNAME#", "#ACODE#", "#LINK#", "#MODIFIED_BY#"); $post = array($ORGNAME, $CODE, $link, $sess_user_name . "({$sess_usertype_short})"); $rplarr = array("Hello #SMNAME#,", "background-color: rgb(239, 239, 239);", "Regards,", "#MAIL_FOOTER#", "#SITE_URL#"); $tbody_en = str_replace($rplarr, " ", $db_email[0]['tBody_en']); $emailContent_en = trim(str_replace($body, $post, $tbody_en));