foreach ($arr as $k => $v) { $GNAME = $v['vGroupName']; $data = $v; $data['eNeedToVerify'] = 'Yes'; $data['iModifiedByID'] = $sess_id; $data['eModifiedBy'] = $_SESSION['SESS_' . PRJ_CONST_PREFIX . '_USER_TYPE_SHORT']; $data['dModifiedDate'] = calcGTzTime(date('Y-m-d H:i:s'), 'Y-m-d H:i:s'); if ($v['eStatus'] == 'Active') { $whr = " AND iGroupID=" . $v['iGroupID']; $varr = $ogrpvrfObj->getDetails('*', $whr, ' iVerifiedID DESC ', '', ' LIMIT 0,1 '); if (($varr[0]['eStatus'] == 'Active' || $varr[0]['eStatus'] == 'Inactive') && $varr[0]['eNeedToVerify'] != 'Yes') { $data['eStatus'] = 'Inactive'; //$orgGroupObj->setAllVar($data); $where = "iGroupID = " . $v['iGroupID'] . ""; //$res = $orgGroupObj->updateData($data, $where); $ogrpvrfObj->setAllVar($data); $res = $ogrpvrfObj->insert(); //$res = $ogrpvrfObj->updateData($data, $where); // $orgGroupObj->updateData(array('eStatus'=>'Modified'),$where) // $orgGroupObj->updateData(array('eNeedToVerify'=>'Yes','eStatus'=>'Inactive'),$where);; } else { $var_msg = $smarty->get_template_vars('MSG_VERIFY_NEED_TO_VERIFY_OR_MODIFIED'); echo $var_msg; exit; } } elseif ($v['eStatus'] == 'Inactive') { $whr = " AND iGroupID=" . $v['iGroupID']; $varr = $ogrpvrfObj->getDetails('*', $whr, ' iVerifiedID DESC ', '', ' LIMIT 0,1 '); if (($varr[0]['eStatus'] == 'Active' || $varr[0]['eStatus'] == 'Inactive') && $varr[0]['eNeedToVerify'] != 'Yes') { $data['eStatus'] = 'Active'; //$orgGroupObj->setAllVar($data);
exit; } else { if ($view == 'verify') { $where = " AND iGroupID='" . $iGroupID . "'"; $orderby = ' iVerifiedID Desc '; $vrfdata = $orgGroupVerifyfObj->getDetails('*', $where, $orderby, '', ' LIMIT 0,1 '); //prints($vrfdata);exit; if ($vrfdata[0]['eStatus'] == 'Delete') { $where = " AND iGroupID='" . $iGroupID . "'"; $res = $orgGroupObj->del($where); $data['eStatus'] = 'Active'; $dt['iVerifiedByID'] = $_SESSION['SESS_' . PRJ_CONST_PREFIX . '_ID']; $dt['eVerifiedBy'] = $_SESSION['SESS_' . PRJ_CONST_PREFIX . '_USER_TYPE_SHORT']; $dt['dVerifiedDate'] = calcGTzTime(date('Y-m-d H:i:s'), 'Y-m-d H:i:s'); $data['vIP'] = $_SERVER['REMOTE_ADDR']; $orgGroupVerifyfObj->setAllVar($data); $where = "iGroupID IN (" . $iGroupID . ")"; $res = $orgGroupVerifyfObj->updateData($data, $where); if ($res) { $var_msg = "rds"; } else { $var_msg = "rdserr"; } } else { if ($vrfdata[0]['eStatus'] == 'Inactive' || $vrfdata[0]['eStatus'] == 'Active') { unset($data); if ($vrfdata[0]['eStatus'] == 'Inactive') { $data['eStatus'] = 'Inactive'; } else { $data['eStatus'] = 'Active'; }