예제 #1
0
if (trim($aptlvl) && strpos($aptlvl, ';') !== false) {
    $aptlvl = @explode(';', $aptlvl);
    $invUserAcpt = str_replace('inv:', '', $aptlvl[0]);
    $poUserAcpt = str_replace('po:', '', $aptlvl[1]);
}
$invUserStatus = @explode(',', $invUserStatus);
$invUserAcpt = @explode(',', $invUserAcpt);
$poUserStatus = @explode(',', $poUserStatus);
$poUserAcpt = @explode(',', $poUserAcpt);
// $where = " AND iGroupID = '".$iId."'";
// $res = $orgPerObj->getDetails('iGroupID,iStatusID,ePermissionType,iPermissionID as Id',$where);
$orderStatus = $invoiceStatus = array();
$res = array();
if ($fromtype == 'user') {
    $where = " AND iUserID = '" . $iId . "'";
    $res = $orgUserPerObj->getDetails('*', $where);
    $orgdtl = $orgObj->select($res[0]['iOrganizationID']);
    $orgtype = $orgdtl[0]['eOrganizationType'];
    $permission = @explode(';', $res[0]['tPermission']);
    $inv = @explode('inv:', $permission[0]);
    $po = @explode('po:', $permission[1]);
    $res[0]['vInvoiceStatusLevel'] = $inv[1];
    $res[0]['vOrderStatusLevel'] = $po[1];
} else {
    $where = " AND iOrganizationID = '" . $iId . "'";
    $res = $orgPrefObj->getDetails('iOrganizationID,vOrderStatusLevel,vInvoiceStatusLevel,vOrderAcceptanceLevel,vInvoiceAcceptanceLevel,iAdditionalInfoID as Id', $where);
    $orgdtl = $orgObj->select($iId);
    $orgtype = $orgdtl[0]['eOrganizationType'];
}
$res[0]['vOrderStatusLevel'] = isset($res[0]['vOrderStatusLevel']) ? $res[0]['vOrderStatusLevel'] : '';
$res[0]['vInvoiceAcceptanceLevel'] = isset($res[0]['vInvoiceAcceptanceLevel']) ? $res[0]['vInvoiceAcceptanceLevel'] : '';
예제 #2
0
    $orgUserPermVerifyObj = new OrganizationUserPermissionToVerify();
}
$uprmts = array();
if ($iUserID != '') {
    $view = 'verify';
    $OuserData = $userData = $orgUserObj->select($iUserID);
    if ($sess_usertype_short == 'OA' && $userData[0]['iOrganizationID'] != $curORGID) {
        header("Location: " . SITE_URL_DUM . "organizationuserlist");
        exit;
    }
    $fields = " *, grp.vGroupName ";
    $jtbl = " LEFT JOIN " . PRJ_DB_PREFIX . "_organization_group grp on ou.iGroupID=grp.iGroupID ";
    $OuserData = $orgUserObj->getJoinTableInfo($jtbl, $fields, " AND ou.iUserID={$iUserID} ");
    // $iUserID
    $OuserData = $userData = $userData[0];
    $uprmts = $orgUserPerObj->getDetails('*', " AND iUserID={$iUserID} ");
    $vuprmts = $orgUserPermVerifyObj->getDetails('*', " AND iUserID={$iUserID} ", ' iVerifiedID DESC ', '', ' LIMIT 0,1 ');
}
$state = $cntstObj->getgeneralArr(PRJ_DB_PREFIX . "_state_master", " AND eStatus='Active'", "vStateCode", "vState", "vCountryCode", "vStateCode,vState,vCountryCode");
$stateArr = $state[0];
//$stateArr	=	array($stateArr);
//echo $stateArr[0][2];
//prints($stateArr);exit;
$groupArr = $cntstObj->getgeneralArr(PRJ_DB_PREFIX . "_organization_group", " AND eStatus='Active' ", "iGroupID", "vGroupName", "iOrganizationID", "iGroupID,vGroupName,iOrganizationID");
$groupArr = $groupArr[0];
$db_country = $countryObj->getCountryDetail("iCountryId,vCountry,vCountryCode", "AND eStatus = 'Active'");
//prints($db_country);exit;
$db_state = $stateObj->getStateDetail("iStateId, vStateCode, vState", "AND eStatus = 'Active' AND vCountryCode = '" . $userData['vCountry'] . "'", "vState");
$where = " AND iOrganizationID=" . $OuserData['iOrganizationID'] . "";
$organization = $orgObj->getDetails('*', $where);
// prints($organization); exit;
예제 #3
0
    $sendMail = new SendPHPMail();
}
if (!isset($statusmasterObj)) {
    include_once SITE_CLASS_APPLICATION . "class.StatusMaster.php";
    $statusmasterObj = new StatusMaster();
}
$Data = $_POST['Data'];
$iUserId = $Data['iUserID'];
$iPermissionID = isset($_POST['iPermissionID']) ? $_POST['iPermissionID'] : '';
$view = $_POST['view'];
$usrdt = $orgUsrObj->getDetails('*', " AND iUserID={$iUserId}");
$orgdt = $orgObj->getDetails('*', " AND iOrganizationID=" . $usrdt[0]['iOrganizationID'] . "");
// prints($orgdt);exit;
// pr($_POST); exit;
if ($iUserId != '') {
    $uprmt = $orgUserPermObj->getDetails('*', " AND iUserID={$iUserId}");
    if (is_array($uprmt) && count($uprmt) > 0) {
        if (($uprmt[0]['eStatus'] == 'Active' || $uprmt[0]['eStatus'] == 'Inactive') && $uprmt[0]['eNeedToVerify'] != 'Yes') {
            // prints($orgdt); exit;
        } else {
            if (($view == 'edit' || $view == 'add' || $view == '') && count($uprmt) > 0 && $_SESSION['from'] != 'usr') {
                header('Location:' . SITE_URL_DUM . 'organizationuserlist');
                exit;
            }
        }
    }
}
if ($_SESSION['SESS_' . PRJ_CONST_PREFIX . '_USER_TYPE_SHORT'] == 'SM') {
    $smdt = $secManObj->getDetails('*', " AND iSMID!=" . $_SESSION['SESS_' . PRJ_CONST_PREFIX . '_ID'] . " AND eStatus='Active' AND eEmailNotification='Yes' ");
    $ordt = $orgUsrObj->getDetails('*', " AND eStatus='Active' AND eEmailNotification='Yes' AND eUserType='Admin' AND iOrganizationID=" . $usrdt[0]['iOrganizationID']);
} else {
예제 #4
0
                     $dt['eStatus'] = $dts['eStatus'] = "Active";
                     $dts['iModifiedByID'] = "";
                     $dts['eModifiedBy'] = "";
                 }
             }
         }
     }
 }
 $res = $orgUserObj->updateData($dts, " iUserID={$iUserID} ");
 $iVerifiedID = $userToVerifyObj->getDetails('*', " AND iUserID={$iUserID} ", " iVerifiedID DESC ", '', " LIMIT 0,1");
 if (is_array($iVerifiedID) && count($iVerifiedID) > 0) {
     $iVerifiedID = $iVerifiedID[0]['iVerifiedID'];
     $rs = $userToVerifyObj->updateData($dt, " iVerifiedID={$iVerifiedID} ");
 }
 if ($res) {
     $usrprmtdtls = $orgUserPermObj->getDetails('*', " AND iUserID={$iUserID} ");
     $vudtl = $orgUserPermVerifyObj->getDetails('*', " AND iUserID={$iUserID} ", " iVerifiedID DESC ", '', " LIMIT 0,1");
     if ($usrprmtdtls[0]['eStatus'] == 'Need to Verify' || $usrprmtdtls[0]['eStatus'] == 'Modified' || $usrprmtdtls[0]['eStatus'] == 'Delete' || $usrprmtdtls[0]['eNeedToVerify'] == 'Yes') {
         $rs = $orgUserPermObj->updateData($dts, " iUserID={$iUserID} ");
         if ($vudtl[0]['iVerifiedID'] > 0) {
             $rs = $orgUserPermVerifyObj->updateData($dt, " iVerifiedID=" . $vudtl[0]['iVerifiedID']);
         }
     }
 }
 // $res = $orgUserPermObj->updateData($dts," iUserID=$iUserID ");
 // $pVerifiedID = $orgUserPermVerifyObj->getDetails('iVerifiedID'," AND iUserID=$iUserID ",' iVerifiedID DESC','',' LIMIT 0,1 ');
 // $pVerifiedID = $pVerifiedID[0]['iVerifiedID'];
 // $rs = $userToVerifyObj->updateData($dt," iVerifiedID=$pVerifiedID ");
 if ($res) {
     $msg = "rus";
 } else {
예제 #5
0
         // CHANGE STATUS IN ORGANIZATION MASTER
         //	$rs = $orgObj->updateData($dt,$where);
         if ($res) {
             $msg = "orgvrfy";
         } else {
             $msg = "orgvrfyer";
         }
     }
 }
 // exit;
 // $eOrganizationType = "Buyer";
 //   print $vrfdata[0]['eOrganizationType'].",$eOrganizationType";
 // exit;
 if (count($vrfdata) > 0 && isset($vrfdata[0]['eOrganizationType']) && $vrfdata[0]['eOrganizationType'] != $eOrganizationType) {
     //$usql = "Select * from ".PRJ_DB_PREFIX."_organization_user_permission where iUserID IN (Select iUserID from ".PRJ_DB_PREFIX."_organization_user where iOrganizationID=$iOrgId)";
     $usr = $orgUserPermObj->getDetails('*', " AND iUserID IN (Select iUserID from " . PRJ_DB_PREFIX . "_organization_user where iOrganizationID={$iOrganizationID})");
     //prints($usr);exit;
     if ($eOrganizationType == "Both") {
     } else {
         if ($eOrganizationType == "Buyer") {
             for ($l = 0; $l < count($usr); $l++) {
                 if (trim($usr[$l]['tPermission']) != '') {
                     //$usr[$l]['tPermission'] = preg_replace('/inv:(.*);/','inv:5,6;',$usr[$l]['tPermission']);
                     $tempPermission = @explode(";", $usr[$l]['tPermission']);
                     //prints($tempPermission);
                     $usr[$l]['tPermission'] = "inv:5,6;" . $tempPermission[1];
                     //$sql = "Update ".PRJ_DB_PREFIX."_organization_user_permission set tPermission='".$usr[$l]['tPermission']."' where iUserID=".$usr[$l]['iUserID'];
                     $pData['tPermission'] = $usr[$l]['tPermission'];
                     $pWhere = " iUserID='" . $usr[$l]['iUserID'] . "'";
                     //prints($pData);
                     $row = $orgUserPermObj->updateData($pData, $pWhere);
예제 #6
0
파일: common.php 프로젝트: nstungxd/F2CA5
$poUserStatusIds = $poUserStatus = $invUserStatusIds = $invUserStatus = $poUserAcptIds = $invUserAcptIds = $poUserAcpt = $invUserAcpt = "";
switch ($sess_usertype) {
    case 'securitymanager':
        $usersec = 'securitymanager';
        $_SESSION['SESS_' . PRJ_CONST_PREFIX . '_USER_TYPE_SHORT'] = 'SM';
        break;
    case 'orguser':
        $usersec = 'user';
        $_SESSION['SESS_' . PRJ_CONST_PREFIX . '_USER_TYPE_SHORT'] = 'OU';
        $usrdtls = $orgUsrObj->select($sess_id);
        $odt = $orgObj->select($curORGID);
        $opf = $orgprefObj->getDetails('*', " AND iOrganizationID={$curORGID} ");
        //					 if($odt[0]['eReqVerification'] == 'Yes') {
        if ($usrdtls[0]['ePermissionType'] == 'Individual') {
            $uWhere = " AND iUserID='" . $sess_id . "' AND eStatus!='Need to Verify' ";
            $ures = $orgUserPerObj->getDetails('*', $uWhere);
        } else {
            if ($usrdtls[0]['ePermissionType'] == 'Group') {
                $gwhere .= " AND iGroupID=" . $usrdtls[0]['iGroupID'] . " AND eStatus!='Need to Verify' ";
                $ures = $orgGrpObj->getDetails('*', $gwhere);
                // prints($ures); exit;
            }
        }
        //
        if (!isset($userStatusObj)) {
            require_once SITE_CLASS_APPLICATION . "class.StatusMaster.php";
            $userStatusObj = new StatusMaster();
        }
        // prints($opf); exit;
        $poOrgStatus = @explode(",", $opf[0]['vOrderStatusLevel']);
        $invOrgStatus = @explode(",", $opf[0]['vInvoiceStatusLevel']);