Esempio n. 1
0
<?php

$mode = PostVar('mode');
$val = PostVar('val');
if (trim($val) == '' || $val < 1 || trim($mode) == '') {
    exit;
}
if (!isset($b2spaObj)) {
    include_once SITE_CLASS_APPLICATION . "organization/class.Buyer2_SProduct_Association.php";
    $b2spaObj = new Buyer2_SProduct_Association();
}
if (!isset($b2spavObj)) {
    include_once SITE_CLASS_APPLICATION . "organization/class.Buyer2_SProduct_Association_ToVerify.php";
    $b2spavObj = new Buyer2_SProduct_Association_ToVerify();
}
if (!isset($emailObj)) {
    include_once SITE_CLASS_APPLICATION . 'class.EmailTemplate.php';
    $emailObj = new EmailTemplate();
}
$flds = "b2spa.*, (Select vCompanyName from " . PRJ_DB_PREFIX . "_organization_master where iOrganizationID=b2spa.iBuyer2Id) as vBuyer2,\r\n\t\t\t\t\t(Select vProductName from " . PRJ_DB_PREFIX . "_sproduct_organization where iProductId=b2spa.iProductId) as vProduct";
$assocs = $b2spaObj->getDetails($flds, " AND b2spa.eStatus IN ('Active','Inactive') AND b2spa.eNeedToVerify!='Yes' AND b2spa.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) != '') {
Esempio n. 2
0
<?php

if (!isset($b2spaObj)) {
    include_once SITE_CLASS_APPLICATION . "organization/class.Buyer2_SProduct_Association.php";
    $b2spaObj = new Buyer2_SProduct_Association();
}
if (!isset($b2spavObj)) {
    include_once SITE_CLASS_APPLICATION . "organization/class.Buyer2_SProduct_Association_ToVerify.php";
    $b2spavObj = new Buyer2_SProduct_Association_ToVerify();
}
$iAssociationId = GetVar('id');
// $msg = GetVar('msg');
$mod = '';
$flds = " b2spav.*, org.vCompanyName as vBuyer2, org.vCompCode, spo.vProductName as vProduct, spo.vProductCode ";
$jtbl = " LEFT JOIN " . PRJ_DB_PREFIX . "_sproduct_organization spo on spo.iProductId=b2spav.iProductId\r\n            LEFT JOIN " . PRJ_DB_PREFIX . "_organization_master org on org.iOrganizationID=b2spav.iBuyer2Id ";
$vb2sprdtls = $b2spavObj->getJoinTableInfo($jtbl, $flds, " AND b2spav.iAssociationId={$iAssociationId} ", ' b2spav.iVerifiedID DESC ', '', ' LIMIT 0,1');
$vrq = $b2spavObj->isVerifyReq($vb2sprdtls);
$vsts = '';
if ($vrq == 'vreq') {
    $vsts = $b2spavObj->chkRecVrf($vb2sprdtls);
    if ($vsts == 'nr' || $vsts == 'om') {
        header('Location: ' . SITE_URL_DUM . 'b2sprodtasoclist');
        exit;
    }
} else {
    if ($vrq == 'nr') {
        $flds = " b2spa.*, org.vCompanyName as vBuyer2, org.vCompCode, spo.vProductName as vProduct, spo.vProductCode ";
        $jtbl = " LEFT JOIN " . PRJ_DB_PREFIX . "_sproduct_organization spo on spo.iProductId=b2spa.iProductId\r\n               LEFT JOIN " . PRJ_DB_PREFIX . "_organization_master org on org.iOrganizationID=b2spa.iBuyer2Id ";
        $vb2sprdtls = $b2spaObj->getJoinTableInfo($jtbl, $flds, " AND iAssociationId={$iAssociationId} ");
        $vrq = $b2spavObj->isVerifyReq($vb2sprdtls);
        if ($vrq == 'vreq') {
Esempio n. 3
0
<?php

$iAssociationId = GetVar('id');
/*if($sess_usertype == 'orgadmin' && $asoc != $iAssociationId) {
   header("Location: ".SITE_URL_DUM."oadashboard");
   exit;
}*/
if (!isset($b2spaObj)) {
    include_once SITE_CLASS_APPLICATION . "organization/class.Buyer2_SProduct_Association.php";
    $b2spaObj = new Buyer2_SProduct_Association();
}
if (!isset($b2spavObj)) {
    include_once SITE_CLASS_APPLICATION . "organization/class.Buyer2_SProduct_Association_ToVerify.php";
    $b2spavObj = new Buyer2_SProduct_Association_ToVerify();
}
$b2sprdtls = $b2spaObj->select($iAssociationId);
$b2sprdthistory = $b2spavObj->getHistory($iAssociationId);
// prints($b2sprdthistory); exit;
$smarty->assign('b2sprdtls', $b2sprdtls);
$smarty->assign('b2sprdthistory', $b2sprdthistory);
Esempio n. 4
0
$buyer2 = isset($_POST['buyer2']) ? $_POST['buyer2'] : '';
$code = isset($_POST['code']) ? $_POST['code'] : '';
$product = isset($_POST['product']) ? $_POST['product'] : '';
$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_SProduct_Association.php";
    $assObj = new Buyer2_SProduct_Association();
}
$where = "";
$_POST['srchval'] = isset($_POST['srchval']) ? $_POST['srchval'] : '';
if ($_POST['srchval'] == 'act') {
    $where .= " AND b2spa.eStatus='Active' ";
} else {
    if ($_POST['srchval'] == 'inact') {
        $where .= " AND b2spa.eStatus='Inactive' ";
    }
}
if ($mode == 'all') {
    if ($val != '') {
        $where .= " AND ((Select vCompanyName from " . PRJ_DB_PREFIX . "_organization_master where iOrganizationID=b2spa.iBuyer2Id) LIKE '%{$val}%' OR\r\n                     (Select vProductName from " . PRJ_DB_PREFIX . "_sproduct_organization where iProductId=b2spa.iProductId) LIKE '%{$val}%' OR vACode LIKE '%{$val}%' )";
    }
    // echo $where; exit;