예제 #1
0
/*if($userData['eStatus']!='')
     $statusVal=$userData['eStatus'];
else
     $statusVal='Need to Verify';
*/
$userData['eUserType'] = isset($userData['eUserType']) ? $userData['eUserType'] : '';
if ($userData['eUserType'] == '') {
    $userData['eUserType'] = 'User';
}
$userTypes = $gdbobj->getEnumSelect("" . PRJ_DB_PREFIX . "_organization_user", "eUserType", "Data[eUserType]", "eUserType", "", $userData['eUserType'], "class='drop-down' onchange='showHidePermission(this.value)' ", "Select User Type");
//$eStatus = $gdbobj->getEnumSelect("".PRJ_DB_PREFIX."_organization_user", "eStatus","Data[eStatus]", "eStatus","",$statusVal,"style='width:200px;' class='drop-down' ","Select Status");
$view = isset($view) ? $view : '';
if ($view != 'edit') {
    if ($sess_usertype != 'SM') {
        // prints($udts); exit;
        $orgdetails = $orgObj->select($curORGID);
        //prints($orgdetails);exit;
    }
}
$userData['iOrganizationID'] = isset($userData['iOrganizationID']) ? $userData['iOrganizationID'] : '';
if ($userData['iOrganizationID'] != '') {
    // $orgdtls = $orgObj->select($userData[iOrganizationID]);
    $orgdetails = $orgObj->select($userData['iOrganizationID']);
}
// prints($orgdetails); exit;
$userData['vPhone'] = isset($userData['vPhone']) ? $userData['vPhone'] : '';
$phoneData = explode("-", $userData['vPhone']);
if (count($phoneData) == 1) {
    $userData['vPhone'] = $phoneData[0];
} else {
    $userData['vPhoneCode'] = $phoneData[0];
예제 #2
0
// For OAs
if (isset($_SESSION['SESS_' . PRJ_CONST_PREFIX . '_ORGTYPE']) && $_SESSION['SESS_' . PRJ_CONST_PREFIX . '_ORGTYPE'] != 'Buyer2' && $_SESSION['SESS_' . PRJ_CONST_PREFIX . '_USRTYPE'] != 'SM') {
    if ($iAssociationId > 0) {
        header("Location: " . SITE_URL_DUM . "b2bprodtasocview/{$iAssociationId}");
    } else {
        header("Location: " . SITE_URL_DUM . "b2bprodtasoclist");
    }
    exit;
} else {
    if (isset($_SESSION['SESS_' . PRJ_CONST_PREFIX . '_ORGTYPE']) && $_SESSION['SESS_' . PRJ_CONST_PREFIX . '_ORGTYPE'] == 'Buyer2') {
        if (trim($iAssociationId) == '' || $iAssociationId < 1) {
            if (!isset($orgObj)) {
                include_once SITE_CLASS_APPLICATION . "organization/class.Organization.php";
                $orgObj = new Organization();
            }
            $b2orgdtls = $orgObj->select($curORGID);
            if (is_array($b2orgdtls) && count($b2orgdtls) > 0) {
                $arr[0]['iBuyer2Id'] = $curORGID;
                $arr[0]['vBuyer2'] = isset($b2orgdtls[0]['vCompanyName']) ? $b2orgdtls[0]['vCompanyName'] : '';
                $arr[0]['vB2Code'] = isset($b2orgdtls[0]['vCompCode']) ? $b2orgdtls[0]['vCompCode'] : '';
            }
        }
    }
}
if (isset($arr[0]['iBuyer2Id']) && trim($arr[0]['iBuyer2Id']) != '' && $arr[0]['iBuyer2Id'] > 0 && $arr[0]['iBuyer2Id'] != $curORGID && $_SESSION['SESS_' . PRJ_CONST_PREFIX . '_USRTYPE'] != 'SM') {
    header("Location: " . SITE_URL_DUM . "b2bprodtasoclist");
    exit;
}
$smarty->assign('mod', $mod);
$smarty->assign('arr', $arr);
$smarty->assign('msg', $msg);
예제 #3
0
if (!isset($poLineObj)) {
    include_once SITE_CLASS_APPLICATION . "user/class.PurchaseOrderLine.php";
    $poLineObj = new PurchaseOrderLine();
}
if (!isset($invAttachmentObj)) {
    include_once SITE_CLASS_APPLICATION . "user/class.InvoiceOrderAttachment.php";
    $invAttachmentObj = new InvoiceOrderAttachment();
}
if (!isset($imgObj)) {
    include_once SITE_CLASS_GEN . "class.imagecrop.php";
    $imgObj = new imagecrop();
}
$totusrs = $orgUsrObj->getDetails(" COUNT(*) as tot ", " AND iOrganizationID={$curORGID} AND eUserType='User'");
$totusrs = $totusrs[0]['tot'];
$ordt = $orgUsrObj->getDetails('*', " AND iOrganizationID={$curORGID} AND eUserType='Admin' AND eStatus='Active'");
$org = $orgObj->select($curORGID);
$smdt = $secManObj->getDetails('*', " AND iASMID=" . $org[0]['iASMID'] . " AND eStatus='Active'");
if (is_array($smdt) && is_array($ordt)) {
    $emailArr = array_merge($smdt, $ordt);
} else {
    if (is_array($smdt)) {
        $emailArr = $smdt;
    } else {
        if (is_array($ordt)) {
            $emailArr = $ordt;
        }
    }
}
// prints($emailArr); exit;
$view = $_POST['view'];
$frmbuyer = $_POST['frmbuyer'];
예제 #4
0
<?php

include S_SECTIONS . "/member/memberaccess.php";
$iOrganizationID = GetVar('id');
if ($sess_usertype == 'orgadmin' && $orgid != $iOrganizationID) {
    header("Location: " . SITE_URL_DUM . "oadashboard");
    exit;
}
if (!isset($orgprefObj)) {
    include_once SITE_CLASS_APPLICATION . "organization/class.OrganizationPreference.php";
    $orgprefObj = new OrganizationPreference();
}
if (!isset($orgPrefVrfObj)) {
    include_once SITE_CLASS_APPLICATION . "organization/class.OrganizationPreferenceToverify.php";
    $orgPrefVrfObj = new OrganizationPreferenceToverify();
}
if (!isset($orgObj)) {
    require_once SITE_CLASS_APPLICATION . "organization/class.Organization.php";
    $orgObj = new Organization();
}
$orgdtls = $orgObj->select($iOrganizationID);
$orgprefhistory = $orgprefObj->getHistory($iOrganizationID);
// prints($orgprefhistory); exit;
$smarty->assign('orgdtls', $orgdtls);
$smarty->assign('orgprefhistory', $orgprefhistory);
예제 #5
0
$fromtype = isset($_GET['fromtype']) ? $_GET['fromtype'] : '';
$type = $_GET['type'];
$iId = $_GET['iId'];
$prms = $_GET['prms'];
$acpt = $_GET['acpt'];
$grpid = $_GET['grpid'];
$prmsarr = @explode(',', $prms);
$grpdt = array();
if (trim($grpid) != '' && is_numeric($grpid) && $grpid > 0) {
    $grpdt = $orgGroupObj->select($grpid);
}
$view = isset($view) ? $view : '';
$ores = array();
if (trim($view) == 'undefined' || trim($view) == '') {
    $ores = $orgPrefObj->getDetails('*', " AND iOrganizationId=" . $iId);
    $orgdtl = $orgObj->select($iId);
    $orgtype = $orgdtl[0]['eOrganizationType'];
}
if ($orgtype == 'Buyer2') {
    include_once 'aj_getB2OrgStatus.php';
}
// prints($ores); exit;
//
$ecreate = array();
$eimport = array();
$everify = array();
$grpdt[0]['eFormCreation'] = isset($grpdt[0]['eFormCreation']) ? $grpdt[0]['eFormCreation'] : '';
if (strpos($grpdt[0]['eFormCreation'], 'po') !== false) {
    //	$ecreate['po'] = 'Yes';
    $ecreate['po'] = "checked='checked'";
}
예제 #6
0
    $where = " AND ioh.iInvoiceID IN ({$invs})";
}
// echo $where; exit;
//$enc = $_POST['enc'];
//$enc=$encInvoice;
//if($enc == 'y')
//{
$opf = $orgprefObj->getDetails('*', " AND iOrganizationID={$curORGID} ");
if ($opf[0]['eSecureExportInvoice'] == 'Yes') {
    $arr_loaded_ext = get_loaded_extensions();
    if (in_array('mcrypt', $arr_loaded_ext)) {
        $enc = 'y';
        //
        $encKey = $opf[0]['vEncryptionKey'];
        $encAlgo = $opf[0]['eCryptAlgo'];
        $orgdt = $orgObj->select($curORGID);
        $code[] = $orgdt[0]['vOrganizationCode'] . $orgdt[0]['iOrganizationID'];
        $code[] = $orgdt[0]['dCreatedDate'];
        //
        $iv_val = $encobj->setEncValues($encKey, $encAlgo, $code, '');
    }
}
//}
// $limit = " LIMIT ".($page-1)*$REC_LIMIT_FRONT.", ".$REC_LIMIT_FRONT." ";
// print $where;
// and poh.iStatusID in (".$poUserStatusIds.")
$orderBy = " ioh.iInvoiceID ";
$jtbl .= " LEFT JOIN " . PRJ_DB_PREFIX . "_status_master sm on sm.iStatusID = ioh.iStatusID";
$jtbl .= " LEFT JOIN " . PRJ_DB_PREFIX . "_organization_user ou on ou.iUserID = ioh.iBuyerID";
$jtbl .= " LEFT JOIN " . PRJ_DB_PREFIX . "_purchase_order_heading poh on poh.iPurchaseOrderID = ioh.iPurchaseOrderID";
$jtbl .= " LEFT JOIN " . PRJ_DB_PREFIX . "_invoice_otherinformation ioi on ioh.iInvoiceID=ioi.iInvoiceID ";
예제 #7
0
    include_once SITE_CLASS_APPLICATION . "user/class.InvoiceOrderAttachment.php";
    $invAttachmentObj = new InvoiceOrderAttachment();
}
if (!isset($pohObj)) {
    include_once SITE_CLASS_APPLICATION . "user/class.PurchaseOrderHeading.php";
    $pohObj = new PurchaseOrderHeading();
}
if (!isset($bnkObj)) {
    include_once SITE_CLASS_APPLICATION . "class.BankMaster.php";
    $bnkObj = new BankMaster();
}
// prints($invUserStatusIds); exit;
if (trim($invUserStatusIds) != '') {
    $uinvprmt_ary = @explode(',', $invUserStatusIds);
}
$orgdtls = $orgObj->select($curORGID);
if ($orgdtls[0]['eCreateMethodAllowed'] == 'File Import' || $sess_usertype_short != 'OU') {
    if ($sess_usertype_short == 'SM') {
        header("Location: " . SITE_URL_DUM . "smdashboard/all");
    } else {
        if (trim($iInvoiceID) != '' && is_numeric($iInvoiceID)) {
            header("Location: " . SITE_URL_DUM . "invoiceview/{$iInvoiceID}");
        } else {
            header("Location: " . SITE_URL_DUM . "invoicelist/all");
        }
    }
    exit;
}
$binvp = '';
if ($uorg_type == 'Buyer') {
    // echo $uorg_type; exit;
예제 #8
0
파일: invpref.php 프로젝트: nstungxd/F2CA5
     $msg = $smarty->get_template_vars('MSG_ADD_SUCC');
} elseif($msg == 'raserr') {
     $msg = $smarty->get_template_vars('MSG_ADD_ERR');
} elseif($msg == 'tmm') {
     $mmsg = $smarty->get_template_vars('LBL_PO_TOTAL_MISMATCH');
} else{ $msg=''; }*/
$UserName = $_SESSION['SESS_' . PRJ_CONST_PREFIX . '_USER_NAME'];
//$msg=$_REQUEST['msg'];
if (isset($_SESSION['SESS_' . PRJ_CONST_PREFIX . '_MSG']) && $_SESSION['SESS_' . PRJ_CONST_PREFIX . '_MSG'] != '') {
    $msg = $_SESSION['SESS_' . PRJ_CONST_PREFIX . '_MSG'];
    unset($_SESSION['SESS_' . PRJ_CONST_PREFIX . '_MSG']);
}
$invad = isset($_SESSION['invadd']) ? $_SESSION['invadd'] : '';
$iInvoiceID = $_GET['id'];
$msg = '';
$orgdtls = $orgObj->select($curORGID);
if ($orgdtls[0]['eCreateMethodAllowed'] == 'File Import' || $sess_usertype_short != 'OU') {
    if ($sess_usertype_short == 'SM') {
        header("Location: " . SITE_URL_DUM . "smdashboard/all");
    } else {
        if (trim($iInvoiceID) != '' && is_numeric($iInvoiceID)) {
            header("Location: " . SITE_URL_DUM . "invoiceview/{$iInvoiceID}");
        } else {
            header("Location: " . SITE_URL_DUM . "polist/all");
        }
    }
    exit;
}
$binvp = '';
if ($uorg_type == 'Buyer') {
    // echo $uorg_type; exit;
예제 #9
0
if (!isset($countryObj)) {
    include_once SITE_CLASS_APPLICATION . "class.Country.php";
    $countryObj = new Country();
}
if (!isset($stateObj)) {
    include_once SITE_CLASS_APPLICATION . "class.State.php";
    $stateObj = new State();
}
if (!isset($cntstObj)) {
    include_once SITE_CLASS_GEN . "class.countrystate.php";
    $cntstObj = new CountryState();
}
if ($iOrganizationID != '') {
    $view = 'edit';
    $orgObj->setiOrganizationID($iOrganizationID);
    $orgdtls = $orgObj->select('');
    if ($pg == 'verify') {
        $Oarr = $arr = $orgPrefVrfObj->getDetails('*', " AND iOrganizationID={$iOrganizationID}");
        $OiAdditionalInfoID = $iAdditionalInfoID = $arr[0]['iAdditionalInfoID'];
        //          $where = 'AND iVerifiedID = "'.$iAdditionalInfoID.'"';
        //          $arr = $orgPrefVrfObj->getDetails('*',$where);
    } else {
        $Oarr = $arr = $orgprefObj->getDetails('*', " AND iOrganizationID={$iOrganizationID}");
        $OiAdditionalInfoID = $iAdditionalInfoID = $arr[0]['iAdditionalInfoID'];
        //          $where = 'AND iAdditionalInfoID = "'.$iAdditionalInfoID.'"';
        //$arr = $orgprefObj->getDetails('*',$where);
    }
    //prints($arr);exit;
}
//Get State Array
$state = $cntstObj->getgeneralArr(PRJ_DB_PREFIX . "_state_master", " AND eStatus='Active'", "vStateCode", "vState", "vCountryCode", "vStateCode,vState,vCountryCode");
예제 #10
0
$newarr = array();
if ($iAsociationID != '') {
    $view = 'edit';
    $orgAssocObj->setiAsociationID($iAsociationID);
    $fields = " *, (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 = $orgAssocObj->getDetails($fields, " AND iAsociationID={$iAsociationID}", '', '', '');
    if ($sess_usertype_short == 'OA' && $assorgdt[0]['iBuyerOrganizationID'] != $curORGID) {
        header("Location: " . SITE_URL_DUM . "associationlist");
        exit;
    }
    // prints($assorgdt);exit;
    if ($assorgdt[0]['eStatus'] == 'Need to Verify' || $assorgdt[0]['eStatus'] == 'Modified') {
        header('Location:' . SITE_URL_DUM . 'associationview/' . $iAsociationID);
        exit;
    }
    $orgdata = $orgObj->select($assorgdt[0]['iBuyerOrganizationID']);
    $orgdata[0]['iBuyerOrganizationID'] = $assorgdt[0]['iBuyerOrganizationID'];
    $where .= " AND  eOrganizationType!='Buyer' AND iOrganizationID!='" . $assorgdt[0]['iBuyerOrganizationID'] . "'";
    $sellerorgs = $orgAssocObj->getDetails('iSupplierAssocationID,vSupplierCode', " AND iBuyerOrganizationID='" . $assorgdt[0]['iBuyerOrganizationID'] . "' AND vAssociationCode='" . $assorgdt[0]['vAssociationCode'] . "' AND ((eStatus='Active' || eStatus='Inactive') AND eNeedToVerify!='Yes')");
    // exit;
    foreach ($sellerorgs as $k => $v) {
        if ($v['iSupplierAssocationID'] != 0) {
            $newarr[$v['iSupplierAssocationID']]['vSupplierCode'] = $v['vSupplierCode'];
        }
        $starr[] = $v['iSupplierAssocationID'];
    }
    if (is_array($sellerorgs) && count($sellerorgs) > 0) {
        $iSellerOrgs = @implode(',', $starr);
    } else {
        if (trim($sellerorgs[0]['iSupplierAssocationID']) != '') {
            $iSellerOrgs = $sellerorgs[0]['iSupplierAssocationID'];
예제 #11
0
     $Data_pref[$pref_ary[$l]] = $Data[$pref_ary[$l]];
     unset($Data[$pref_ary[$l]]);
 }
 // prints($Data); exit;
 $Data['dCreatedDate'] = date('Y-m-d H:i:s');
 $Data['vFromIP'] = $_SERVER['REMOTE_ADDR'];
 $stsdtls = $statusmasterObj->getDetails('iStatusID', " AND eFor='Invoice' AND vStatus_en='Create' ");
 if ($reqVerification == 'Yes') {
     $Data['iStatusID'] = 0;
 } else {
     $Data['iStatusID'] = $stsdtls[0]['iStatusID'];
 }
 $Data['iSupplierOrganizationID'] = $curORGID;
 $Data['iSupplierID'] = $_SESSION['SESS_' . PRJ_CONST_PREFIX . '_ID'];
 $Data['vSupplierContactParty'] = $_SESSION['SESS_' . PRJ_CONST_PREFIX . '_USER_NAME'];
 $supplierOrgDtls = $orgObj->select($curORGID);
 $Data['vSupplierName'] = $supplierOrgDtls[0]['vCompanyName'];
 $Data['vSupplierAddLine1'] = $supplierOrgDtls[0]['vAddressLine1'];
 $Data['vSupplierAddLine2'] = $supplierOrgDtls[0]['vAddressLine2'];
 $Data['vSupplierZipCode'] = $supplierOrgDtls[0]['vZipcode'];
 $Data['vSupplierState'] = $supplierOrgDtls[0]['vState'];
 $Data['vSupplierCountry'] = $supplierOrgDtls[0]['vCountry'];
 $Data['vInvoiceSupplierCode'] = $supplierOrgDtls[0]['vOrganizationCode'];
 $Data['vSupplierContactTelephone'] = $supplierOrgDtls[0]['vPhone'];
 $vItmCode = $pohObj->getUniqueCode();
 $Data['vInvoiceCode'] = $vItmCode;
 $vInvoiceNumber = "INV" . $vItmCode . "-" . trim($Data['vInvoiceSupplierCode']);
 $Data['vInvoiceNumber'] = $vInvoiceNumber;
 if (trim($Data['eSaved']) == '') {
     $Data['eSaved'] = 'No';
 }
예제 #12
0
파일: delasso.php 프로젝트: nstungxd/F2CA5
 // prints($where); exit;
 $res = $assObj->updateData($dlts, $where);
 //$assvrfObj->setAllVar($dlts);
 //$res = $assvrfObj->updateData($dlts, $where);
 $where = ' AND iAsociationID = ' . $v['iAsociationID'] . '';
 $dts = $v;
 $dts['iModifiedByID'] = $sess_id;
 $dts['eModifiedBy'] = $_SESSION['SESS_' . PRJ_CONST_PREFIX . '_USER_TYPE_SHORT'];
 $dts['dModifiedDate'] = date('Y-m-d H:i:s');
 $dts['eStatus'] = 'Delete';
 $assvrfObj->setAllVar($dts);
 $rs = $assvrfObj->insert();
 $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 Deleted" AND eSection = "Member"';
 $db_email = $emailObj->getDetails('*', $where);
 $link = SITE_URL_DUM . "associationview/" . $v['iAsociationID'];
 $body = array("#ORGNAME#", "#ACODE#", "#LINK#", "#DELETE_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));
 $tbody_fr = str_replace($rplarr, " ", $db_email[0]['tBody_fr']);
 $emailContent_fr = trim(str_replace($body, $post, $tbody_fr));
예제 #13
0
파일: common.php 프로젝트: nstungxd/F2CA5
    $orgGrpObj = new OrganizationGroup();
}
// set folder struct for users
$usersec = "";
$orderStatus = $invoiceStatus = $ures = array();
$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";
$type = $_GET['type'];
$iId = $_GET['iId'];
$orgUsrObj->setiUserID($iId);
$userdtls = $orgUsrObj->select($iId);
// prints($userdtls); exit;
if (!(is_array($userdtls) && count($userdtls) > 0)) {
    echo $smarty->get_template_vars('MSG_SELECT_ORG_USER') . " " . $smarty->get_template_vars('LBL_TO_PROCEED') . " !";
    exit;
}
if ($userdtls[0]['eUserType'] == 'Admin') {
    echo $smarty->get_template_vars('MSG_ADMIN_RIGHTS_NOT_REQ');
    exit;
}
//$where = " AND iGroupID = '".$iId."'";
$ores = $orgPrefObj->getDetails('*', " AND iOrganizationId=" . $userdtls[0]['iOrganizationID']);
$orgdtl = $orgObj->select($userdtls[0]['iOrganizationID']);
$orgtype = $orgdtl[0]['eOrganizationType'];
if ($orgtype == 'Buyer2') {
    include_once 'aj_getB2OrgUserStatus.php';
}
$orderStatus = $invoiceStatus = array();
$where = " AND iUserID='" . $iId . "'";
$ures = $orgUserPerObj->getDetails('*', $where);
// prints($ures);exit;
$poisusts = $orgStaObj->getDetails('vStatus_' . LANG . ' as title,vStatusMsg_' . LANG . ',iStatusID as Id,eFor,eType,vStatusMsg_en as msg,vStatus_en as status', " AND vStatus_en='Issue' AND eFor='PO' ", '', '');
// $orderStatus .= ",".$poisusts[0]['iStatusID'];
//$ores[0]['vOrderStatusLevel'] .= ",".$poisusts[0]['iStatusID'];
$poacptsts = $orgStaObj->getDetails('vStatus_' . LANG . ' as title,vStatusMsg_' . LANG . ',iStatusID as Id,eFor,eType,vStatusMsg_en as msg,vStatus_en as status', " AND vStatus_en='Accepted' AND eFor='PO' ", '', '');
// $ordacptStatus .= ",".$poacptsts[0]['iStatusID'];
//$ores[0]['vOrderAcceptanceLevel'] .= ",".$poacptsts[0]['iStatusID'];
$invisusts = $orgStaObj->getDetails('vStatus_' . LANG . ' as title,vStatusMsg_' . LANG . ',iStatusID as Id,eFor,eType,vStatusMsg_en as msg,vStatus_en as status', " AND vStatus_en='Issue' AND eFor='Invoice' ", '', '');
예제 #15
0
파일: importpo.php 프로젝트: nstungxd/F2CA5
     unset($Data[$pref_ary[$l]]);
 }
 // prints($Data); exit;
 $Data['dCreateDate'] = date('Y-m-d H:i:s');
 $Data['vFromIP'] = $_SERVER['REMOTE_ADDR'];
 $stsdtls = $statusmasterObj->getDetails('iStatusID', " AND eFor='PO' AND vStatus_en='Create' ");
 if ($reqVerification == 'Yes') {
     $Data['iStatusID'] = 0;
 } else {
     $Data['iStatusID'] = $stsdtls[0]['iStatusID'];
 }
 //$Data['iStatusID'] = $stsdtls[0]['iStatusID'];
 $Data['iBuyerOrganizationID'] = $curORGID;
 $Data['iBuyerID'] = $_SESSION['SESS_' . PRJ_CONST_PREFIX . '_ID'];
 $Data['vBuyerContactName'] = $_SESSION['SESS_' . PRJ_CONST_PREFIX . '_USER_NAME'];
 $buyerOrgDtls = $orgObj->select($curORGID);
 $Data['vBuyerCode'] = $buyerOrgDtls[0]['vOrganizationCode'];
 $Data['vBuyerCompanyName'] = $buyerOrgDtls[0]['vCompanyName'];
 $Data['vBuyerContactTelephone'] = $buyerOrgDtls[0]['vPhone'];
 $Data['vBuyerContactEmail'] = $buyerOrgDtls[0]['vEmail'];
 $vItmCode = $pohObj->getUniqueCode();
 $Data['vPOCode'] = $vItmCode;
 $Data['vPONumber'] = "PO" . $Data['vPOCode'] . "-" . trim($Data['vBuyerCode']);
 if (trim($Data['eSaved']) == '') {
     $Data['eSaved'] = 'No';
 }
 //prints($Data); exit;
 $pohObj->setAllVar($Data);
 $dup = $pohObj->chkDuplicate('vPONumber', $Data);
 if ($dup > 0) {
     $ids = $pohObj->updateData($Data, " iPurchaseOrderID = {$dup} ");
예제 #16
0
if (trim($grpid) != '' && is_numeric($grpid) && $grpid > 0) {
    $grpdt = $orgGroupObj->select($grpid);
    if (is_array($grpdt) && count($grpdt) > 0) {
        if (trim($grpdt[0]['vRFQ2AwardAcceptPermits']) != '') {
            $grfq2awrdacpt = @explode(',', $grpdt[0]['vRFQ2AwardAcceptPermits']);
        }
        if (trim($grpdt[0]['vRFQ2BidPermits']) != '') {
            $grfq2bid = @explode(',', $grpdt[0]['vRFQ2BidPermits']);
        }
    }
}
$view = isset($view) ? $view : '';
$ores = array();
// if(trim($view) == 'undefined' || trim($view) == '') {
$ores = $orgPrefObj->getDetails('*', " AND iOrganizationId=" . $iId);
$orgdtl = $orgObj->select($iId);
$orgtype = $orgdtl[0]['eOrganizationType'];
$org_rfq2AwardAcptStatus = array();
if (trim($ores[0]['vRFQ2AwardAcceptLevel']) != '') {
    $org_rfq2AwardAcptStatus = @explode(',', $ores[0]['vRFQ2AwardAcceptLevel']);
}
// }
// prints($grpdt); exit;
$rfq2awardacceptsts = $orgStaObj->getDetails('vStatus_' . LANG . ' as title,vStatusMsg_' . LANG . ',iStatusID as Id,eFor,eType,vStatusMsg_en as msg,vStatus_en as status', " AND vStatus_en NOT IN ('Create','Verify','Accepted','Rejected') AND eType='Optional' AND vForAuction LIKE '%RFQ2 Award Acceptance%' ", '', '');
// prints($rfq2awardacceptsts); exit;
$codsts = $orgStaObj->getDetails('vStatus_' . LANG . ' as title,vStatusMsg_' . LANG . ',iStatusID as Id,eFor,eType,vStatusMsg_en as msg,vStatus_en as status', " AND vStatus_en='Create' AND vForAuction!='' ", '', '');
$vodsts = $orgStaObj->getDetails('vStatus_' . LANG . ' as title,vStatusMsg_' . LANG . ',iStatusID as Id,eFor,eType,vStatusMsg_en as msg,vStatus_en as status', " AND vStatus_en='Verify' AND vForAuction!='' ", '', '');
$aodsts = $orgStaObj->getDetails('vStatus_' . LANG . ' as title,vStatusMsg_' . LANG . ',iStatusID as Id,eFor,eType,vStatusMsg_en as msg,vStatus_en as status', " AND vStatus_en='Accepted' AND vForAuction!='' ", '', '');
$rodsts = $orgStaObj->getDetails('vStatus_' . LANG . ' as title,vStatusMsg_' . LANG . ',iStatusID as Id,eFor,eType,vStatusMsg_en as msg,vStatus_en as status', " AND vStatus_en='Rejected' AND vForAuction!='' ", '', '');
$html = '';
$dis = '';
예제 #17
0
if (!isset($orgPrefObj)) {
    require_once SITE_CLASS_APPLICATION . "organization/class.OrganizationPreference.php";
    $orgPrefObj = new OrganizationPreference();
    //$sess_id
}
if ($iGroupID != '') {
    $view = 'verify';
    $OgrpData = $grpData = $orgGroupObj->select($iGroupID);
    if ($sess_usertype_short == 'OA' && $grpData[0]['iOrganizationID'] != $curORGID) {
        header("Location: " . SITE_URL_DUM . "grouplist");
        exit;
    }
    // $msg = $smarty->get_template_vars('MSG_NEED_VERIFY');
    // prints($grpData);exit;
    $OuserStatus = $userStatus = @explode(";", $grpData[0]['tPermission']);
    $Oorgdata = $orgdata = $orgObj->select($grpData[0]['iOrganizationID']);
    $where = ' AND iUserID IN (' . $grpData[0]['tUserID'] . ')';
    $Ouserdata = $userdata = $UsrObj->getDetails("CONCAT(vFirstName,' ',vLastName) as vTitle,iUserID as Id", $where);
    $where = " ";
    $Ostatus = $status = $orgStaObj->getDetails('vStatus_' . LANG . ' as title,vStatusMsg_' . LANG . ',iStatusID as Id,eFor,eType,vStatus_en as status', $where, 'iDisplayOrder', '');
    //prints($status);exit;
    $where = 'AND iGroupID = ' . $iGroupID . '';
    $gdts = $orgGroupVerifyfObj->getDetails('*', $where, ' iVerifiedID desc ', '', ' LIMIT 0,1 ');
    if ($gdts[0]['eStatus'] == 'Modified' || $gdts[0]['eNeedToVerify'] == 'Yes' || $gdts[0]['eStatus'] == 'Inactive') {
        $where = 'AND iGroupID = ' . $iGroupID . '';
        $orderby = ' iVerifiedID Desc';
        $grpData = $orgGroupVerifyfObj->getDetails('*', $where, $orderby);
        $orgdata = $orgObj->select($grpData[0]['iOrganizationID']);
        $where = ' AND iUserID IN (' . $grpData[0]['tUserID'] . ')';
        $userdata = $UsrObj->getDetails("CONCAT(vFirstName,' ',vLastName) as vTitle,iUserID as Id", $where);
        //prints($userdata);exit;
예제 #18
0
//prints($groupArr);
$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'", "vState");
//print_r($_SESSION);
$sql = "select vLanguageCode,vLanguage from b2b_language";
$res = $dbobj->MySQLSelect($sql);
$secQueArr1 = array("ID" => "iSecretQuestion1ID", "Name" => "Data[iSecretQuestion1ID]", "Type" => "Query", "tableName" => PRJ_DB_PREFIX . "_sec_question", "fieldId" => "iQuestionId", "fieldName" => "vQuestion_" . $_SESSION['SESS_' . PRJ_CONST_PREFIX . '_LANG'], "extVal" => '', "selectedVal" => $userData['iSecretQuestion1ID'], "width" => '200px', "height" => '', "onchange" => '', "selectText" => "---Select Secret Question---", "where" => "eStatus ='Active' ", "multiple_select" => "", "orderby" => '', "extra" => "", "validationmsg" => "");
$secQueArr2 = array("ID" => "iSecretQuestion2ID", "Name" => "Data[iSecretQuestion2ID]", "Type" => "Query", "tableName" => PRJ_DB_PREFIX . "_sec_question", "fieldId" => "iQuestionId", "fieldName" => "vQuestion_" . $_SESSION['SESS_' . PRJ_CONST_PREFIX . '_LANG'], "extVal" => '', "selectedVal" => $userData['iSecretQuestion2ID'], "width" => '200px', "height" => '', "onchange" => '', "selectText" => "---Select Secret Question---", "where" => "eStatus ='Active' ", "multiple_select" => "", "orderby" => '', "extra" => "", "validationmsg" => "");
$secQuestion1 = $gdbobj->DynamicDropDown($secQueArr1);
$secQuestion1 = str_replace("class=\"input1\"", "class='required' title='Select Secret Question' tabindex='18'", $secQuestion1);
$secQuestion2 = $gdbobj->DynamicDropDown($secQueArr2);
$secQuestion2 = str_replace("class=\"input1\"", "tabindex='20'", $secQuestion2);
if ($userData['iOrganizationID'] != '') {
    $orgdtls = $orgObj->select($userData['iOrganizationID']);
}
$phoneData = explode("-", $userData['vPhone']);
if (count($phoneData) == 1) {
    $userData['vPhone'] = $phoneData[0];
} else {
    $userData['vPhoneCode'] = $phoneData[0];
    $userData['vPhone'] = $phoneData[1];
}
$phoneData = explode("-", $userData['vMobile']);
if (count($phoneData) == 1) {
    $userData['vMobile'] = $phoneData[0];
} else {
    $userData['vMobileCode'] = $phoneData[0];
    $userData['vMobile'] = $phoneData[1];
}
예제 #19
0
        } else {
            $msg = 'rrer';
        }
    }
}
if (trim(strtolower($view)) == 'award') {
    //
    $jtbl = " LEFT JOIN " . PRJ_DB_PREFIX . "_status_master sm on r2bd.iStatusID=sm.iStatusID\r\n\t\t\t\t\tLEFT JOIN " . PRJ_DB_PREFIX . "_rfq2_master rfq2 on r2bd.iRFQ2Id=rfq2.iRFQ2Id ";
    $where .= " AND r2bd.iBidId={$iBidId} ";
    $fields = " r2bd.*, rfq2.*, sm.vStatus_en as vStatus, r2bd.eSaved ";
    $dtls = $r2bdObj->getJoinTableInfo($jtbl, $fields, $where, '', '', '', '');
    //
    if ($sacpt == 'y') {
        //
        $db_email = $emailObj->getDetails('*', " AND vType='New RFQ2 Award' AND eSection='Member' ");
        $orgdtls = $orgObj->select($dtls[0]['iOrganizationID']);
        $link = SITE_URL . "b2rfq2awardview/" . $id;
        $body_arr = array("#CREATED_BY#", "#RFQ2CODE#", "#BIDNUM#", "#ADVANCE#", "#PRICE#", "#LINK#");
        $post = array($orgdtls[0]['vCompanyName'] . '(' . $orgdtls[0]['vOrganizationCode'] . ')', $dtls[0]['vRFQ2Code'], $dtls[0]['vBidNum'], $dtls[0]['fBidAdvanceTotal'], $dtls[0]['fBidPriceTotal'], $link);
        $rplarr = array("Hello #NAME#,", "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));
        $tbody_fr = str_replace($rplarr, " ", $db_email[0]['tBody_fr']);
        $emailContent_fr = trim(str_replace($body, $post, $tbody_fr));
        $dt = array();
        $dt['iItemID'] = $id;
        $dt['iOrganizationID'] = $dtls[0]['iBuyer2Id'];
        $dt['vMailSubject_en'] = $db_email[0]['vSub_en'];
        $dt['vMailSubject_fr'] = $db_email[0]['vSub_fr'];
        $dt['tMailContent_en'] = $emailContent_en;
        $dt['tMailContent_fr'] = $emailContent_fr;
예제 #20
0
$where = $whu . ' AND eStatus="Active" AND eUserType="Admin" AND iOrganizationID=' . $curORGID . ' ';
$uar = $orgUsrObj->getDetails('*', $where);
// prints($uarr); exit;
if (is_array($sar) && is_array($uar)) {
    $emlar = array_merge($sar, $uar);
} else {
    if (is_array($sar)) {
        $emlar = $sar;
    } else {
        if (is_array($uar)) {
            $emlar = $uar;
        }
    }
}
// $orgObj->setiOrganizationID($dt['iBuyerOrganizationID']);
$dt = $orgObj->select($iBuyerOrganizationID);
$vBuyerCode = $dt[0]['vOrganizationCode'];
// $orgObj->getvOrganizationCode();
$vBuyerName = $dt[0]['vCompanyName'];
$iSupplierAssocationID = PostVar('assocorgs');
$del = PostVar('del');
// prints($_POST); exit;
// $arr=$orgAssocObj->getDetails('iBuyerOrganizationID',' AND iAsociationID="'.$iAsociationID.'" and eStatus != "Inactive" ');
//$vSupplierCode = PostVar('suporgcode');
$vSupplierCode = PostVar('assocCode');
$data['iBuyerOrganizationID'] = $iBuyerOrganizationID;
$data['vAssociationCode'] = $vAssociationCode;
$data['vBuyerCode'] = $vBuyerCode;
$data['iCreatedBy'] = $_SESSION['SESS_' . PRJ_CONST_PREFIX . '_ID'];
$data['eCreatedBy'] = $_SESSION['SESS_' . PRJ_CONST_PREFIX . '_USER_TYPE_SHORT'];
// pr($data); exit;
예제 #21
0
                $msg = "rrs";
            } else {
                $msg = "rrer";
            }
        } else {
            $msg = "rrer";
        }
    }
}
if ($res && trim($sub) != '' && $sub != 'New Bid For RFQ2') {
    $jtbl = " LEFT JOIN " . PRJ_DB_PREFIX . "_status_master sm on r2bd.iStatusID=sm.iStatusID\r\n\t\t\t\t\tLEFT JOIN " . PRJ_DB_PREFIX . "_rfq2_master rfq2 on r2bd.iRFQ2Id=rfq2.iRFQ2Id ";
    $where .= " AND r2bd.iBidId={$id} ";
    $fields = " r2bd.*, rfq2.*, sm.vStatus_en as vStatus, r2bd.eSaved ";
    $dtls = $r2bdObj->getJoinTableInfo($jtbl, $fields, $where, '', '', '', '');
    //
    $orgdtls = $orgObj->select($dtls[0]['iBuyer2Id']);
    if (is_array($dtls) && count($dtls) > 0 && is_array($orgdtls) && count($orgdtls) > 0) {
        $db_email = $emailObj->getDetails('*', " AND vType='{$sub}' AND eSection='Member' ");
        $link = SITE_URL . "viewsrfq2bid/" . $id;
        // $body
        $post = array($sess_user_name . "({$sess_usertype_short})", $dtls[0]['vRFQ2Code'], $dtls[0]['vBidNum'], $dtls[0]['fBidAdvanceTotal'], $dtls[0]['fBidPriceTotal'], $link);
        $rplarr = array("Hello #NAME#,", "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));
        $tbody_fr = str_replace($rplarr, " ", $db_email[0]['tBody_fr']);
        $emailContent_fr = trim(str_replace($body, $post, $tbody_fr));
        $dt['iItemID'] = $id;
        $dt['iOrganizationID'] = $dtls[0]['iBuyer2Id'];
        $dt['vMailSubject_en'] = $db_email[0]['vSub_en'];
        $dt['vMailSubject_fr'] = $db_email[0]['vSub_fr'];
        $dt['tMailContent_en'] = $emailContent_en;
예제 #22
0
         $smname = $arr[$i]['vFirstName'] . ' ' . $arr[$i]['vLastName'];
         $email = $arr[$i]['vEmail'];
         //set the values of the body of email format
         $body_arr = array("#SMNAME#", "#CNAME#", "#LINK#", "#ADDED_BY#", "#REGNO#", "#ORGCODE#", "#COMPCODE#", "#MAIL_FOOTER#", "#SITE_URL#");
         $post_arr = array($smname, $cname, $link, $smarty->get_template_vars('LBL_SELF_REGISTRATION'), $regno, $code, $compcode, $MAIL_FOOTER, SITE_URL_DUM);
         //send mail to the Admin
         $sendMail->Send("New Organization Added", "Member", $email, $body_arr, $post_arr);
     }
 }
 //
 if ($uid && count($arr) > 0) {
     $userName = $_POST['vUserName'];
     $userEmail = $_POST['vpEmail'];
     $link = SITE_URL_DUM . "organizationuserview/" . $uid;
     $body_arr = array("#SMNAME#", "#USERNAME#", "#USEREMAIL#", "#CNAME#", "#COMPCODE#", "#LINK#", "#ADDED_BY#", "#MAIL_FOOTER#", "#SITE_URL#");
     $orgDetail = $orgObj->select($oid);
     $compname = $orgDetail[0]['vCompanyName'];
     $compcode = $orgDetail[0]['vCompCode'];
     $emailTo = '';
     //set the values of the body of email format
     $post_arr = array('', $userName, $userEmail, $smname, $compname, $compcode, $link, $smarty->get_template_vars('LBL_SELF_REGISTRATION'), $MAIL_FOOTER, SITE_URL_DUM);
     $where = " AND vType='New Organization Admin Added' AND eSection='Member' ";
     $db_email = $emailObj->getDetails('*', $where);
     $body = array("#USERNAME#", "#USEREMAIL#", "#CNAME#", "#COMPCODE#", "#LINK#", "#ADDED_BY#");
     $post = array($userName, $userEmail, $compname, $compcode, $link, $smarty->get_template_vars('LBL_SELF_REGISTRATION'));
     $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));
     $tbody_fr = str_replace($rplarr, " ", $db_email[0]['tBody_fr']);
     $emailContent_fr = trim(str_replace($body, $post, $tbody_fr));
     $Data = array();
예제 #23
0
         // $orgGroupObj->updateData(array('eNeedToVerify'=>'Yes'),$where);
     } else {
         $var_msg = $smarty->get_template_vars('MSG_VERIFY_NEED_TO_VERIFY_OR_MODIFIED');
         echo $var_msg;
         exit;
     }
 } 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 iGroupID = " . $v['iGroupID'] . "";
 $orderby = ' iVerifiedID Desc';
 $vrfid = $ogrpvrfObj->getDetails('iVerifiedID', $where, $orderby);
 // ---------------------  ORGANIZATION DATA FETCHED ------------------------------------------//
 $orgdata = $orgObj->select($v['iOrganizationID']);
 $GNAME = $v['vGroupName'];
 $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="Group Status Changed" AND eSection = "Member"';
 $db_email = $emailObj->getDetails('*', $where);
 $link = SITE_URL_DUM . "groupview/" . $v['iGroupID'];
 $body = array("#GNAME#", "#ORGNAME#", "#CODE#", "#LINK#", "#MODIFIED_BY#");
 $post = array($GNAME, $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));
 $tbody_fr = str_replace($rplarr, " ", $db_email[0]['tBody_fr']);
예제 #24
0
} elseif($msg == 'raserr') {
     $msg = $smarty->get_template_vars('MSG_ADD_ERR');
} else*/
if ($msg == 'tmm') {
    $mmsg = $smarty->get_template_vars('LBL_PO_TOTAL_MISMATCH');
    $msg = '';
}
/* else{ $msg=''; }*/
$UserName = $_SESSION['SESS_' . PRJ_CONST_PREFIX . '_USER_NAME'];
//$msg=$_REQUEST['msg'];
if (isset($_SESSION['SESS_' . PRJ_CONST_PREFIX . '_MSG']) && $_SESSION['SESS_' . PRJ_CONST_PREFIX . '_MSG'] != '') {
    $msg = $_SESSION['SESS_' . PRJ_CONST_PREFIX . '_MSG'];
    unset($_SESSION['SESS_' . PRJ_CONST_PREFIX . '_MSG']);
}
$iPurchaseOrderID = $_GET['id'];
$orgdtls = $orgObj->select($curORGID);
if ($orgdtls[0]['eCreateMethodAllowed'] == 'File Import' || $sess_usertype_short != 'OU') {
    if ($sess_usertype_short == 'SM') {
        header("Location: " . SITE_URL_DUM . "smdashboard/all");
    } else {
        if (trim($iPurchaseOrderID) != '' && is_numeric($iPurchaseOrderID)) {
            header("Location: " . SITE_URL_DUM . "purchaseorderview/{$iPurchaseOrderID}");
        } else {
            header("Location: " . SITE_URL_DUM . "polist/all");
        }
    }
    exit;
}
if ($sess_usertype_short == 'OU' && $poCreate != 'Yes') {
    header("Location: " . SITE_URL_DUM . "polist/all");
    exit;
예제 #25
0
     $id = $secManObj->updateData($data, $where);
 } else {
     if ($memtype == 'orguser') {
         if (!isset($orgUsrObj)) {
             require_once SITE_CLASS_APPLICATION . "user/class.OrganizationUser.php";
             $orgUsrObj = new OrganizationUser();
         }
         $where = " (vUserName='******') ";
         $data['vActivationCode'] = '';
         $data['vPassword'] = $generalobj->encrypt($newpass);
         $id = $orgUsrObj->updateData($data, $where);
         if (!isset($orgObj)) {
             include_once SITE_CLASS_APPLICATION . "organization/class.Organization.php";
             $orgObj = new Organization();
         }
         $orgDetail = $orgObj->select($memArr[0]['iOrganizationID']);
     }
 }
 $name = $memArr[0]['vFirstName'] . " " . $memArr[0]['vLastName'];
 if (!isset($sendMail)) {
     require_once SITE_CLASS_GEN . "class.sendmail.php";
     $sendMail = new SendPHPMail();
 }
 /*if($memtype == 'orguser')
   {
       $compname=$orgDetail[0]['vCompanyName'];
       $compcode=$orgDetail[0]['vCompCode'];
      	//assign values of the Body of the Email Format
      	$bodyarray = array("#SITE_NAME#","#NAME#","#USERNAME#","#EMAIL#","#PASSWORD#","#CNAME#","#COMPCODE#","#MAIL_FOOTER#","#SITE_URL#");
      	$postarray = array($SITE_NAME,$name,$memArr[0]['vUserName'],$memArr[0]['vEmail'],$newpass,$compname,$compcode,$MAIL_FOOTER,SITE_URL_DUM);
    	//echo $email;
예제 #26
0
    $emailObj = new EmailTemplate();
}
$Data = PostVar("Data");
if (is_array($Data['vCurrency'])) {
    $Data['vCurrency'] = @implode(',', $Data['vCurrency']);
}
if (trim($Data['eSecureImportExport']) != 'Yes') {
    $Data['eSecureImportExport'] = 'No';
}
$iAdditionalInfoID = PostVar("iAdditionalInfoID");
$iOrganizationID = PostVar("iOrganizationID");
$iASMID = PostVar("iASMID");
$view = PostVar("view");
if ($iOrganizationID != '') {
    //$orgObj->setiOrganizationID($iOrganizationID);
    $orgdtls = $orgObj->select($iOrganizationID);
    $arr = $orgprefObj->getDetails('*', " AND iOrganizationID={$iOrganizationID}");
    if ($arr[0]['iAdditionalInfoID'] != '') {
        $view = 'edit';
    } else {
        $view = 'add';
    }
}
//------------------------DEFALT VALUES OF PURCHASE ORDER -----------------------------------------//
if ($orgdtls[0]['eOrganizationType'] != 'Supplier') {
    $where = ' AND eFor = "PO"  AND eType = "Default" AND eStatus = "Active"';
    $postatus = $stMstrObj->getDetails('*', $where);
    foreach ($postatus as $k => $v) {
        $poarr[] = $v['iStatusID'];
    }
    $postatus = @implode(',', $poarr);
예제 #27
0
 $emailArr = $orgUsrObj->getPermittedUsers($curORGID, "%{$csts}%", '', 'vRFQ2AwardPermits', " AND ou.eEmailNotification='Yes' AND ou.eStatus='Active' ");
 $body_arr = array("#NAME#", "#MODIFIED_BY#", "#RFQ2CODE#", "#BIDNUM#", "#ADVANCE#", "#PRICE#", "#LINK#", "#MAIL_FOOTER#", "#SITE_URL#");
 if (is_array($emailArr) && count($emailArr) > 0) {
     for ($i = 0; $i < count($emailArr); $i++) {
         $smname = $emailArr[$i]['vFirstName'] . ' ' . $emailArr[$i]['vLastName'];
         $email = $emailArr[$i]['vEmail'];
         $post_arr = array($smname, $sess_user_name . "({$sess_usertype_short})", $prv_dtls[0]['vRFQ2Code'], $prv_dtls[0]['vBidNum'], $prv_dtls[0]['fBidAdvanceTotal'], $prv_dtls[0]['fBidPriceTotal'], $link, $MAIL_FOOTER, SITE_URL);
         $sendMail->Send("RFQ2 Award Status Changed", "Member", $email, $body_arr, $post_arr);
     }
 }
 // }
 // else
 if ($nstatus[0]['vStatus_en'] == 'Auth3' || $nstatus[0]['vStatus_en'] == 'Accepted') {
     if ($nstatus[0]['vStatus_en'] == 'Auth3' && $data['iStatusID'] != $asts[0]['iStatusID']) {
         $db_email = $emailObj->getDetails('*', " AND vType='New RFQ2 Award' AND eSection='Member' ");
         $oth_org = $orgObj->select($prv_dtls[0]['iOrganizationID']);
         $link = SITE_URL . "b2rfq2awardview/" . $iAwardId;
         $body_arr = array("#BY#", "#RFQ2CODE#", "#BIDNUM#", "#ADVANCE#", "#PRICE#", "#LINK#");
         $post = array($oth_org[0]['vCompanyName'] . '(' . $oth_org[0]['vOrganizationCode'] . ')', $prv_dtls[0]['vRFQ2Code'], $prv_dtls[0]['vBidNum'], $prv_dtls[0]['fBidAdvanceTotal'], $prv_dtls[0]['fBidPriceTotal'], $link);
         $rplarr = array("Hello #NAME#,", "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));
         $tbody_fr = str_replace($rplarr, " ", $db_email[0]['tBody_fr']);
         $emailContent_fr = trim(str_replace($body, $post, $tbody_fr));
         $dt = array();
         $dt['iItemID'] = $iAwardId;
         $dt['iOrganizationID'] = $prv_dtls[0]['iBuyer2Id'];
         $dt['vMailSubject_en'] = $db_email[0]['vSub_en'];
         $dt['vMailSubject_fr'] = $db_email[0]['vSub_fr'];
         $dt['tMailContent_en'] = $emailContent_en;
         $dt['tMailContent_fr'] = $emailContent_fr;