コード例 #1
0
ファイル: b2buyerasoc.php プロジェクト: nstungxd/F2CA5
    $msg = $smarty->get_template_vars('MSG_DEL_SUCC');
} elseif ($msg == 'derr') {
    $msg = $smarty->get_template_vars('MSG_DEL_ERR');
} elseif ($msg == 'rss') {
    $msg = $smarty->get_template_vars('MSG_STATUS_SUCC');
} elseif ($msg == 'rserr') {
    $msg = $smarty->get_template_vars('MSG_STATUS_ERR');
} else {
    $msg = '';
}
$arr = array();
if (trim($iAssociationId) != '' && $iAssociationId > 0) {
    $mod = 'edit';
    $flds = " b2ba.*, org.vCompanyName as vBuyer2, bo.vCompanyName as vBuyer";
    $jtbl = " LEFT JOIN " . PRJ_DB_PREFIX . "_organization_master bo on bo.iOrganizationID=b2ba.iBuyerId\r\n               LEFT JOIN " . PRJ_DB_PREFIX . "_organization_master org on org.iOrganizationID=b2ba.iBuyer2Id ";
    $arr = $b2baObj->getJoinTableInfo($jtbl, $flds, " AND b2ba.iAssociationId={$iAssociationId} ");
    //	pr($arr); exit;
    if (!(is_array($arr) && count($arr) > 0)) {
        header('Location: ' . SITE_URL_DUM . 'b2buyerasoclist');
        exit;
    } else {
        if (!(isset($arr[0]['eStatus']) && (($arr[0]['eStatus'] == 'Active' || $arr[0]['eStatus'] == 'Inactive') && $arr[0]['eNeedToVerify'] != 'Yes'))) {
            header('Location: ' . SITE_URL_DUM . 'b2buyerasocview/' . $iAssociationId);
            exit;
        }
    }
    if (count($arr) < 1 || $arr[0]['eStatus'] == 'Delete' && $arr[0]['eNeedToVerify'] != 'Yes') {
        header('Location: ' . SITE_URL_DUM . 'b2buyerasoclist/rnme');
        exit;
    }
} else {
コード例 #2
0
ファイル: b2buyerasocview.php プロジェクト: nstungxd/F2CA5
$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);
        if ($vrq == 'vreq') {
            $vsts = $b2bavObj->chkRecVrf($vb2bydtls);
            if ($vsts == 'nr' || $vsts == 'om') {
                header('Location: ' . SITE_URL_DUM . 'b2buyserasoclist');
                exit;
            }
        } else {
            if ($vrq == 'nr') {
                header('Location: ' . SITE_URL_DUM . 'b2buyerasoclist');
                exit;
            }
        }
    }
}
コード例 #3
0
ファイル: aj_b2buyerasoclist.php プロジェクト: nstungxd/F2CA5
$cursort = $_POST['cursort'];
$cursorttype = $_POST['cursorttype'];
if ($cursort != '') {
    if ($cursorttype == '1') {
        $cursort_type = 'ASC';
    } else {
        $cursort_type = 'DESC';
    }
    $orderBy = " {$cursort} {$cursort_type}";
} else {
    $orderBy = " b2ba.dADate DESC ";
}
## ENDS HERE ###
$where .= " AND NOT (b2ba.eStatus='Delete' AND b2ba.eNeedToVerify!='Yes') ";
$limit = " LIMIT " . ($page - 1) * $REC_LIMIT_FRONT . ", " . $REC_LIMIT_FRONT . " ";
$jtbl = "";
$fields = "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";
$asocs = $assObj->getJoinTableInfo($jtbl, $fields, $where, $orderBy, $groupBy, $limit, 'yes');
// prints($asocs); exit;
$count = $asocs['tot'];
unset($asocs['tot']);
if (!isset($pgajxobj)) {
    require_once SITE_CLASS_GEN . "class.paging-ajax.php";
}
$pgajxobj = new Paging($count, $page, "listb2buyerassocs", $REC_LIMIT_FRONT);
$paging = $pgajxobj->getListPG($page);
$pgmsg = $pgajxobj->setMessage("Records");
$smarty->assign('count', $count);
$smarty->assign('asocs', $asocs);
$smarty->assign('paging', $paging);
$smarty->assign('pgmsg', $pgmsg);