예제 #1
0
<?php

$mode = PostVar('mode');
$val = PostVar('val');
if (trim($val) == '' || $val < 1 || trim($mode) == '') {
    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();
}
if (!isset($emailObj)) {
    include_once SITE_CLASS_APPLICATION . 'class.EmailTemplate.php';
    $emailObj = new EmailTemplate();
}
$flds = "b2ba.*, (Select vCompanyName from " . PRJ_DB_PREFIX . "_organization_master where iOrganizationID=b2ba.iBuyer2Id) as vBuyer2,\r\n\t\t\t\t\t(Select vCompanyName from " . PRJ_DB_PREFIX . "_organization_master where iOrganizationID=b2ba.iBuyerId) as vBuyer";
$assocs = $b2baObj->getDetails($flds, " AND b2ba.eStatus IN ('Active','Inactive') AND b2ba.eNeedToVerify!='Yes' AND b2ba.iAssociationId IN ({$val}) ");
// pr($assocs); exit;
$assocsids = multi21Array($assocs, 'iAssociationId');
$vl = '';
if (is_array($assocsids) && count($assocsids) > 0) {
    $vl = @implode(',', $assocsids);
}
$rs = false;
$type = '';
$esubtyp = '';
if ($mode == 'status' && trim($vl) != '') {
예제 #2
0
<?php

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();
}
$iAssociationId = GetVar('id');
// $msg = GetVar('msg');
$mod = '';
$flds = " b2bav.*, org.vCompanyName as vBuyer2, org.vCompCode, bo.vCompanyName as vBuyer, bo.vCompCode ";
$jtbl = " LEFT JOIN " . PRJ_DB_PREFIX . "_organization_master bo on bo.iOrganizationID=b2bav.iBuyerId\r\n            LEFT JOIN " . PRJ_DB_PREFIX . "_organization_master org on org.iOrganizationID=b2bav.iBuyer2Id ";
$vb2bydtls = $b2bavObj->getJoinTableInfo($jtbl, $flds, " AND b2bav.iAssociationId={$iAssociationId} ", ' b2bav.iVerifiedID DESC ', '', ' LIMIT 0,1');
// pr($vb2bydtls); exit;
$vrq = $b2bavObj->isVerifyReq($vb2bydtls);
$vsts = '';
if ($vrq == 'vreq') {
    $vsts = $b2bavObj->chkRecVrf($vb2bydtls);
    if ($vsts == 'nr' || $vsts == 'om') {
        header('Location: ' . SITE_URL_DUM . 'b2buyerasoclist');
        exit;
    }
} else {
    if ($vrq == 'nr') {
        $flds = " b2bpa.*, org.vCompanyName as vBuyer2, org.vCompCode, bo.vCompanyName as vBuyer, bo.vCompCode ";
        $jtbl = " LEFT JOIN " . PRJ_DB_PREFIX . "_organization_master bo on bo.iOrganizationID=b2bpa.iBuyerId\r\n               LEFT JOIN " . PRJ_DB_PREFIX . "_organization_master org on org.iOrganizationID=b2bpa.iBuyer2Id ";
        $vb2bydtls = $b2baObj->getJoinTableInfo($jtbl, $flds, " AND iAssociationId={$iAssociationId} ");
        $vrq = $b2bavObj->isVerifyReq($vb2bydtls);
예제 #3
0
<?php

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();
}
if (!isset($emailObj)) {
    include_once SITE_CLASS_APPLICATION . 'class.EmailTemplate.php';
    $emailObj = new EmailTemplate();
}
$mod = PostVar('mod');
$admr = PostVar('admr');
$iAssociationId = PostVar('iAssociationId');
$Data = PostVar('Data');
$body_arr = '';
$type = '';
$post_data = $_POST;
// pr($_POST); exit;
if ($mod == 'verify') {
    $dtv = $vasocdt = $b2bavObj->getDetails('*', " AND iAssociationId={$iAssociationId} ", ' iVerifiedID DESC ', '', ' LIMIT 0,1');
    $dtv = $dtv[0];
    if (is_array($vasocdt) && count($vasocdt) > 0 && isset($vasocdt[0]['iAssociationId']) && isset($vasocdt[0]['iVerifiedID'])) {
        $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') )) {
        if (!(($dtv['eStatus'] == 'Active' || $dtv['eStatus'] == 'Inactive' || $dtv['eStatus'] == 'Delete') && $dtv['eNeedToVerify'] == 'Yes')) {
예제 #4
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);
예제 #5
0
$buyer2 = isset($_POST['buyer2']) ? $_POST['buyer2'] : '';
$code = isset($_POST['code']) ? $_POST['code'] : '';
$buyer = isset($_POST['buyer']) ? $_POST['buyer'] : '';
$stype = isset($_POST['styp']) ? $_POST['styp'] : '';
$page = $_POST['page'];
if (trim($page) == '' || trim($page) < 1) {
    $page = 1;
}
// prints($_POST); exit;
if (!isset($orgObj)) {
    include_once SITE_CLASS_APPLICATION . "organization/class.Organization.php";
    $orgObj = new Organization();
}
if (!isset($assObj)) {
    include_once SITE_CLASS_APPLICATION . "organization/class.Buyer2_Buyer_Association_ToVerify.php";
    $assObj = new Buyer2_Buyer_Association_ToVerify();
}
$where = "";
$_POST['srchval'] = isset($_POST['srchval']) ? $_POST['srchval'] : '';
if ($_POST['srchval'] == 'act') {
    $where .= " AND b2bav.eStatus='Active' ";
} else {
    if ($_POST['srchval'] == 'inact') {
        $where .= " AND b2bav.eStatus='Inactive' ";
    }
}
if ($mode == 'all') {
    if ($val != '') {
        $where = " AND ((Select vCompanyName from " . PRJ_DB_PREFIX . "_organization_master where iOrganizationID=b2bav.iBuyer2Id) LIKE '%{$val}%' OR\r\n\t\t\t\t\t\t(Select vCompanyName from " . PRJ_DB_PREFIX . "_organization_master where iOrganizationID=b2bav.iBuyerId) LIKE '%{$val}%' OR vACode LIKE '%{$val}%' )";
    }
    // echo $where; exit;