Exemple #1
0
<?php

include S_SECTIONS . "/member/memberaccess.php";
$table = PostVar('table');
$id = PostVar('id');
$fields = PostVar('fields');
//$where = GetVar('where');
if ($fields == 'all') {
    $fields = '*';
}
if ($table != '') {
    if ($id != '') {
        $sql = "select {$fields} from {$table}  where iOrganizationID = '{$id}' ";
    }
    //echo $sql;exit;
    if ($sql != '') {
        $dtls = $dbobj->MySqlSelect($sql);
    }
}
// prints($dtls);exit;
//echo $dtls[0]['vPhone'];exit;
$Phone = array();
if (strpos($dtls[0]['vPhone'], '-') !== false) {
    $Phone = @explode('-', $dtls[0]['vPhone']);
} else {
    $Phone[0] = '';
    $Phone[1] = $dtls[0]['vPhone'];
}
if (!isset($cntstObj)) {
    include_once SITE_CLASS_GEN . "class.countrystate.php";
    $cntstObj = new CountryState();
Exemple #2
0
        $where .= " AND r2bd.eStatus='current'";
    } else {
        $where .= " AND r2bd.eStatus='outbidded'";
    }
}
if ($sess_usertype_short == 'OU' || $sess_usertype_short == 'OA') {
    $where .= " AND rpb2.iBuyer2Id={$curORGID} AND sm.vStatus_en='Verify' ";
}
/* else if($sess_usertype_short == 'OA') {
  $where .= " AND rfq2.iOrganizationID=$curORGID ";
  } */
// echo $where; exit;
### SORTING ###
$cursort = PostVar('cursort');
$cursort = stripslashes($cursort);
$cursorttype = PostVar('cursorttype');
$cursorttype = stripslashes($cursorttype);
if ($cursort != '') {
    if ($cursorttype == '1') {
        $cursort_type = 'ASC';
    } else {
        $cursort_type = 'DESC';
    }
    if (strpos($cursort, ',') !== false) {
        $cursort = str_replace(",", " {$cursort_type}, ", $cursort);
    }
    $orderBy = " {$cursort} {$cursort_type}";
} else {
    $orderBy = " r2bd.dBidDate DESC ";
}
## ENDS HERE ###
Exemple #3
0
<?php

$iProductId = PostVar('iProductId');
$iInvoiceID = PostVar('iInvoiceID');
$eType = PostVar('eType');
$iPurchaseOrderID = PostVar('iPurchaseOrderID');
$elid = PostVar('elid');
$elnm = PostVar('elnm');
$ocf = PostVar('ocf');
$ext = stripcslashes(PostVar('ext'));
$dflt = stripcslashes(PostVar('dflt'));
if (!isset($invOrdObj)) {
    include_once SITE_CLASS_APPLICATION . "user/class.InvoiceOrderHeading.php";
    $invOrdObj = new InvoiceOrderHeading();
}
if (!isset($purOrdObj)) {
    include_once SITE_CLASS_APPLICATION . "user/class.PurchaseOrderHeading.php";
    $purOrdObj = new PurchaseOrderHeading();
}
$orgas = "";
if ($eType == "Invoice") {
    $invdtls = $invOrdObj->getDetails('iBuyerOrganizationID,iSupplierOrganizationID', " AND iInvoiceID={$iInvoiceID} ");
} else {
    if ($eType == "PO") {
        $invdtls = $purOrdObj->getDetails('iBuyerOrganizationID,iSupplierOrganizationID', " AND iPurchaseOrderID={$iPurchaseOrderID} ");
    }
}
if ($invdtls[0]['iBuyerOrganizationID'] == $curORGID) {
    $orgas = "Buyer";
} else {
    if ($invdtls[0]['iSupplierOrganizationID'] == $curORGID) {
Exemple #4
0
 */
include_once SITE_CLASS_APPLICATION . 'class.AdminUser.php';
$adminUserObj = new AdminUser();
include_once SITE_CLASS_APPLICATION . 'class.AccessPerModule.php';
$accModObj = new AccessPerModule();
$mode = PostVar('mode');
$Data = PostVar('Data');
$actionfile = PostVar('actionfile');
$listArr = PostVar('listing');
$addArr = PostVar('add');
$updateArr = PostVar('update');
$DeleteArr = PostVar('delete');
$activeArr = PostVar('active');
$inactiveArr = PostVar('inactive');
$blockArr = PostVar('block');
$searchArr = PostVar('search');
$arr = $adminUserObj->select($Data['iAdminId']);
//prints($arr);exit;
$Data['eAdminType'] = $arr[0]['eType'];
if (count($_POST) > 0) {
    if (count($listArr) > 0) {
        $Data['tListing'] = @implode(",", $listArr);
    } else {
        $Data['tListing'] = "";
    }
    if (count($addArr) > 0) {
        $Data['tAdd'] = @implode(",", $addArr);
    } else {
        $Data['tAdd'] = "";
    }
    if (count($updateArr) > 0) {
}
if (!isset($emailObj)) {
    include_once SITE_CLASS_APPLICATION . 'class.EmailTemplate.php';
    $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) {
        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;
// if(count($emlar) > 0){
$data['eStatus'] = 'Need to Verify';
/*}else{
   $data['eStatus'] = 'Active';
}*/
### CHECK MULTIPLE ADMIN AVAILABLE FOR THIS ORGANIZATION OR NOT
/*$chkMulAdmin = $orgObj->ChkMultipleOrgAdmin();
if($chkMulAdmin == '1'){
   $data['eStatus'] = 'Active';
Exemple #7
0
} else {
    if (is_array($smdt)) {
        $emailArr = $smdt;
    } else {
        if (is_array($ordt)) {
            $emailArr = $ordt;
        }
    }
}
// prints($emailArr); exit;
$view = $_POST['view'];
$frmbuyer = $_POST['frmbuyer'];
$Data1 = $_POST['Data'];
$eFrom = $Data1['eFrom'];
unset($Data1['eFrom']);
$iInvoiceID = PostVar('iInvoiceID');
$generalobj->getRequestVars();
// prints($Data);exit;
$buyerOrgDtls = $orgObj->select($Data['iBuyerOrganizationID']);
// prints($buyerOrgDtls); exit;
$Data['vAssociatePOBuyerCode'] = $buyerOrgDtls[0]['vOrganizationCode'];
$Data['vBuyerName'] = $buyerOrgDtls[0]['vCompanyName'];
//$Data['vBuyerContactName'] = $_SESSION['SESS_'.PRJ_CONST_PREFIX.'_USER_NAME'];
if (isset($_SESSION['SESS_' . PRJ_CONST_PREFIX . '_ORGTYPE']) && ($_SESSION['SESS_' . PRJ_CONST_PREFIX . '_ORGTYPE'] == 'Supplier' || $_SESSION['SESS_' . PRJ_CONST_PREFIX . '_ORGTYPE'] == 'Both' && $frmbuyer != 'y') && ($view == 'add' || $view == '' || $view == 'edit')) {
    $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'];
Exemple #8
0
 $resArr = $validation->isEmpty($RequiredFiledArr);
 if ($resArr) {
     $_SESSION['Data'] = $Data;
     header("Location:" . $_SERVER['HTTP_REFERER'] . "");
     exit;
 }
 //prints($resArr);exit;
 $vPassword['vPassword'] = $Data['vPassword'];
 $cPassword['vPassword'] = $_POST['vConPassword'];
 $vldmsg = array('vPassword' => $smarty->get_template_vars('MSG_PASS_NOT_EQUEL'));
 $pass = $validation->isEqual($vPassword, $cPassword, $vldmsg);
 if ($pass == 'er') {
     header("Location:" . $_SERVER['HTTP_REFERER'] . "");
     exit;
 }
 $iMemberId = PostVar('iUserId');
 $vPassword = $generalobj->encrypt($Data['vPassword']);
 if ($sess_usertype == 'securitymanager') {
     $where = "iSMID={$iMemberId}";
     $data = array('vPassword' => $vPassword);
     $id = $dbobj->MySQLQueryPerform(PRJ_DB_PREFIX . "_security_manager", $data, 'update', $where);
     // $secManObj->updateData($data,$where);	// $secManObj->changePAssword($iMemberId,$vPassword);
 } else {
     if ($sess_usertype == 'orguser' || $sess_usertype == 'orgadmin') {
         $where = "iUserId={$iMemberId}";
         $data = array('vPassword' => $vPassword);
         $id = $dbobj->MySQLQueryPerform(PRJ_DB_PREFIX . "_organization_user", $data, 'update', $where);
         // $orgUsrObj->updateData($data,$where);	// $secManObj->changePAssword($iMemberId,$vPassword);
     }
 }
 if ($id > 0) {
Exemple #9
0
         $body_arr = array("#NAME#", "#MODIFIED_BY#", "#RFQ2CODE#", "#BIDNUM#", "#ADVANCE#", "#PRICE#", "#LINK#", "#MAIL_FOOTER#", "#SITE_URL#");
     }
 } else {
     $sts = $statusmasterObj->getDetails('iStatusID', " AND vForAuction LIKE '%RFQ2 Bid,%' AND vStatus_en='Verify' ");
     $Data['iStatusID'] = $sts[0]['iStatusID'];
     $Data['eStatus'] = 'current';
     $sub = "New Bid For RFQ2";
     $typ = "Create";
 }
 // pr($Data); exit;
 $Data['iModifiedById'] = $sess_id;
 $res = $r2bdObj->updateData($Data, " iBidId={$iBidId} ");
 $id = $iBidId;
 if ($res) {
     $files = $_FILES['files'];
     $dfid = PostVar('deleteFiles');
     if (trim($dfid) != '') {
         $dfl = $r2bdflObj->getDetails('*', " AND iBidFileId IN ({$dfid}) ");
         $drs = $r2bdflObj->del(" iBidFileId IN ({$dfid}) ");
         if ($drs) {
             if (is_array($dfl) && count($dfl) > 0) {
                 for ($l = 0; $l < count($dfl); $l++) {
                     @unlink($cfgimg['rfq2bid']['docs']['path'] . $dfl[$l]['iBidId'] . '/' . $dfl[$l]['vFile']);
                 }
             }
         }
     }
     for ($i = 0; $i < count($files['name']); $i++) {
         $flnm = '';
         if ($files['error'][$i] == 0 && $files['size'][$i] > 0) {
             $fileUpload['name'] = $files['name'][$i];
<?php

// pr($_POST); exit;
$view = PostVar('view');
$iBidId = PostVar('iBidId');
$iAwardId = PostVar('iAwardId');
if (!isset($r2bdObj)) {
    include_once SITE_CLASS_APPLICATION . "user/" . "class.Rfq2Bids.php";
    $r2bdObj = new Rfq2Bids();
}
if (!isset($r2awObj)) {
    include_once SITE_CLASS_APPLICATION . "user/" . "class.Rfq2Award.php";
    $r2awObj = new Rfq2Award();
}
if (!isset($rfq2Obj)) {
    include_once SITE_CLASS_APPLICATION . "user/class.RFQ2Master.php";
    $rfq2Obj = new RFQ2Master();
}
if (!isset($orgObj)) {
    include_once SITE_CLASS_APPLICATION . 'user/class.Organization.php';
    $orgObj = new Organization();
}
if (!isset($orgprefObj)) {
    include_once SITE_CLASS_APPLICATION . "organization/class.OrganizationPreference.php";
    $orgprefObj = new OrganizationPreference();
}
if (!isset($statusmasterObj)) {
    include_once SITE_CLASS_APPLICATION . "class.StatusMaster.php";
    $statusmasterObj = new StatusMaster();
}
if (!isset($userActionObj)) {
include SITE_CLASS_GEN . "class.sendmail.php";
$sendMail = new SendPHPMail();
if (!isset($secManObj)) {
    include_once SITE_CLASS_APPLICATION . 'securitymanager/class.SecurityManager.php';
    $secManObj = new SecurityManager();
}
$gdbobj->getRequestVars();
//prints($_POST);exit;
$password = md5(PostVar('vPassword'));
$Data['vPassword'] = $password;
$iSMID = PostVar("iSMID");
$arr = $secManObj->select($iSMID);
$secManObj->setAllVar($arr);
$secManObj->setAllVar($Data);
$where = "iSMID = '" . $iSMID . "'";
$res = $secManObj->update($where);
if ($res) {
    $NAME = $arr[0]['vFirstName'] . " " . $arr[0]['vLastName'];
    //set the valuse of the body of email format
    $body_arr = array("#NAME#", "#PASSWORD#", "#MAIL_FOOTER#", "#SITE_URL#");
    $post_arr = array($NAME, PostVar('vPassword'), $MAIL_FOOTER, SITE_URL_DUM);
    //send mail to the desired member
    $sendMail->Send("Password changed", "Security Manager", $arr[0]['vEmail'], $body_arr, $post_arr);
}
if ($res) {
    $var_msg = "Password changed Successfully.";
} else {
    $var_msg = "Eror-in password change.";
}
header("Location:index.php?file=se-smchangepass&view=edit&iSMID=" . $iSMID . "&parent=se-securitymanage&var_msg={$var_msg}");
exit;
Exemple #12
0
<?php

$userid = $_SESSION['SESS_' . PRJ_CONST_PREFIX . '_ID'];
$rfqarr = PostVar('iRFQ2Id');
if (!isset($rfq2watchlistObj)) {
    include_once SITE_CLASS_APPLICATION . "user/class.Rfq2Watchlist.php";
    $rfq2watchlistObj = new Rfq2Watchlist();
}
$rfq2ids = "";
if (is_array($rfqarr) && count($rfqarr) > 0) {
    $rfq2ids = @implode(',', $rfqarr);
}
$msg = $smarty->get_template_vars('MSG_RFQ2_REM_FROM_WATCHLIST_ERR') . ':m';
if (trim($rfq2ids) != '') {
    $where = " iRFQ2Id IN ({$rfq2ids}) AND iUserID={$userid} ";
    $rs = $rfq2watchlistObj->del($where);
    if ($rs) {
        $msg = $smarty->get_template_vars('MSG_RFQ2_REM_FROM_WATCHLIST_SUCC') . ':m';
    }
}
echo $msg;
exit;
Exemple #13
0
switch ($action) {
    case "tableBackup":
        # Variables have replaced original hard-coded values
        $dumper = new Mysqldumper(SITE_SERVER, SITE_USERNAME, SITE_PASS, SITE_DB);
        $dumper->setDBtables($chk);
        $dumpfinished = $dumper->createDump("callBack");
        $msg = rawurlencode("Database Saved Successfully ");
        header("Location:index.php?file=ge-fullbkup&view=edit&AX=Yes&var_msg={$msg}");
        exit;
    case "filedownload":
        if (!headers_sent()) {
            ob_clean();
            ob_flush();
            header('Content-type: application/download');
            header('Content-Disposition: attachment; filename=' . PostVar('filedown'));
            readfile(BACKUP_DBPATH . PostVar('filedown'));
            exit;
        }
        break;
    case "delete_db_file":
        for ($i = 0; $i < count($_POST[chkFull]); $i++) {
            $fileName = BACKUP_DBPATH . $_POST['chkFull'][$i];
            @unlink($fileName);
        }
        $msg = rawurlencode("DB backup file has been Deleted successfully.");
        header("Location:index.php?file=ge-fullbkup&view=edit&AX=Yes&var_msg={$msg}");
        exit;
        break;
    case "sourcebackup":
        source_backup("");
        $msg = rawurlencode("Files/Folders Successfully Backup ");
Exemple #14
0
include SITE_CLASS_GEN . "class.validation.php";
$validation = new Validation();
### SERVER SIDE VALIDATION ####
$RequiredFiledArr = array('vFirstName' => $smarty->get_template_vars('LBL_ENTER_FIRST_NAME'), 'vLastName' => $smarty->get_template_vars('LBL_ENTER_LAST_NAME'), 'vCountry' => $smarty->get_template_vars('LBL_ENTER_COUNTRY'), 'vState' => $smarty->get_template_vars('LBL_ENTER_STATE'), 'vZipcode' => $smarty->get_template_vars('LBL_ZIPCODE'), 'vEmail' => $smarty->get_template_vars('LBL_EMAIL_ADDRESS'), 'vCity' => $smarty->get_template_vars('LBL_ENTER_CITY'), 'vAddressLine1' => $smarty->get_template_vars('LBL_ENTER_ADDRESSLINE1'));
$resArr = $validation->isEmpty($RequiredFiledArr);
//prints($resArr);exit;
if ($resArr) {
    //echo "hi"; exit;
    header("Location:" . $_SERVER['HTTP_REFERER'] . "");
    exit;
}
if (!isset($Data['eEmailNotification'])) {
    $Data['eEmailNotification'] = 'No';
}
//prints($Data);exit;
$Data_access = PostVar("Data_access");
$curr_date = calcGTzTime(date('Y-m-d H:i:s'), 'Y-m-d H:i:s');
$arr = $secManObj->select($iSMID);
$secManObj->setAllVar($arr);
$Data = array_merge($Data, array("dLastAccessDate" => $curr_date));
//	$sql="select vLanguageCode from b2b_language where vLanguage='".$Data['vDefaltLan']."'";
//	$res=$dbobj->MySQLSelect($sql);
//	$_SESSION['SESS_B2B_LANG'] = $res[0]['vLanguageCode'];
$secManObj->setAllVar($Data);
$where = " iSMID = '" . $iSMID . "'";
$res = $secManObj->update($where);
if ($res) {
    $var_msg = "rus";
} else {
    $var_msg = "ruserr.";
}
Exemple #15
0
    $fname = 'smdashboard';
    $iPrId = 'iSMID';
}
//check customer authentification to login
$member = $memobj->checkauthentication($username, $Password, $memtype, $table, $iPrId, $orgcode);
// pr($_SESSION); exit;
// prints($member);exit;
$user = "******";
$pass = "******";
$res_lgnprm = $lgnprmobj->getLoginParameter($username, $Password, $orgcode, $loginparameter);
if (!$res_lgnprm) {
    $member = "0";
}
if ($member == '1') {
    if (PostVar('chk')) {
        if (PostVar('chk') == 'true') {
            setcookie($user, $username, time() + 2592000);
            setcookie($pass, $pswd, time() + 2592000);
        } else {
            setcookie($user, "", time() + 2592000);
            setcookie($pass, "", time() + 2592000);
        }
    }
} elseif ($member == '2') {
    setcookie($user, "", time() + 2592000);
    setcookie($pass, "", time() + 2592000);
    $msg = "loginactive";
} elseif ($member == '3') {
    setcookie($user, "", time() + 2592000);
    setcookie($pass, "", time() + 2592000);
    $msg = "loginblock";
Exemple #16
0
if (!isset($sProductOrgObj)) {
    include_once SITE_CLASS_APPLICATION . 'productorganization/class.SProductOrganization.php';
    $sProductOrgObj = new SProductOrganization();
}
include SITE_CLASS_GEN . "class.sendmail.php";
$sendMail = new SendPHPMail();
//prints($_POST);exit;
$view = PostVar("view");
$Data = PostVar("Data");
/* $dupl = PostVar('dpr');
if(!isset($Data['eEmailNotification'])) {
   $Data['eEmailNotification'] = 'No';
}*/
//$Data_access = PostVar("Data_access");
$iProductId = PostVar("iProductId");
$curr_date = date("Y-m-d h:i:s");
// $iAdminID = $_SESSION['B2B_SESS_USERID'];
/** This is for Check Duplicate Record------------------------------------------- */
$generalobj->getRequestVars();
$redirect_file = "index.php?file={$file}&view={$view}&iProductId={$iProductId}";
$generalobj->checkDuplicate('iProductId', PRJ_DB_PREFIX . "_sproduct_organization", array('vProductCode' => $Data['vProductCode']), $redirect_file, 'Record Already Exists', $iProductId);
if ($view == "add") {
    // $Data['dAddedDate'] = date("Y-m-d H:i:s");
    // $Data['vIP'] = $_SERVER[REMOTE_ADDR];
    // $Data['iAdminID'] = $_SESSION['B2B_SESS_USERID'];
    $sProductOrgObj->setAllVar($Data);
    $id = $sProductOrgObj->insert();
    if ($id) {
        $var_msg = "Record Added Successfully.";
        unset($Data);
Exemple #17
0
<?php

//get code variable /or changed language
$code = PostVar('lang_code');
//change language session variables
$_SESSION['SESS_' . PRJ_CONST_PREFIX . '_LANG'] = $code;
//include language file
includeLang($_SESSION['SESS_' . PRJ_CONST_PREFIX . '_LANG']);
//Prints($_SESSION['SESS_'.PRJ_CONST_PREFIX.'_LANG']);exit;
//redirect to that page
header("Location:" . $_SERVER["HTTP_REFERER"] . "");
exit;
Exemple #18
0
<?php

/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
*/
$id = PostVar('iRFQ2Id');
if (!isset($rfq2fObj)) {
    include_once SITE_CLASS_APPLICATION . "user/class.Rfq2Files.php";
    $rfq2fObj = new Rfq2Files();
}
if (!isset($rfq2Obj)) {
    include_once SITE_CLASS_APPLICATION . "user/class.RFQ2Master.php";
    $rfq2Obj = new RFQ2Master();
}
if (!isset($rpb2Obj)) {
    include_once SITE_CLASS_APPLICATION . "user/class.Rfq2ProductBuyer2.php";
    $rpb2Obj = new Rfq2ProductBuyer2();
}
if (!isset($r2bdObj)) {
    include_once SITE_CLASS_APPLICATION . "user/class.Rfq2Bids.php";
    $r2bdObj = new Rfq2Bids();
}
if (!isset($r2bdflObj)) {
    include_once SITE_CLASS_APPLICATION . "user/class.RFQ2BidFiles.php";
    $r2bdflObj = new RFQ2BidFiles();
}
if (!isset($orgUserPermObj)) {
    include_once SITE_CLASS_APPLICATION . "user/class.OrganizationUserPermission.php";
    $orgUserPermObj = new OrganizationUserPermission();
}
<?php

/**
 * Action file for add/Update of Country
 * @Created Date :3rd-july-08.
 * @package		addcountry_a.php
 * @section		action/general
 * @author		Pradip Kumar Dash
 */
if (!isset($secQueObj)) {
    include_once SITE_CLASS_APPLICATION . "class.SecQuestion.php";
    $secQueObj = new SecQuestion();
}
$view = PostVar("view");
$Data = PostVar("Data");
$iQuestionId = PostVar("iQuestionId");
$actionfile = GetVar("file");
/** This is for Check Duplicate Record-------------------------------------------*/
$generalobj->getRequestVars();
$redirect_file = "index.php?file={$file}&view={$view}&iQuestionId={$iQuestionId}";
$generalobj->checkDuplicate('iQuestionId', PRJ_DB_PREFIX . "_sec_question", array('tQuestion' => $Data['tQuestion']), $redirect_file, COUNTRY_ALREADY_EXISTS, $iQuestionId);
if ($view == "add") {
    //prints($Data);exit;
    $secQueObj->setAllVar($Data);
    $id = $secQueObj->insert();
    if ($id) {
        $var_msg = "Record Added Successfully.";
    } else {
        $var_msg = "Eror-in Add.";
    }
} else {
} else {
    unset($Data['vAnwser']);
}
if ($view == "add") {
    $Data['dAddedDate'] = date("Y-m-d H:i:s");
    $Data['vIP'] = $_SERVER['REMOTE_ADDR'];
    $Data['iAdminID'] = $_SESSION['B2B_SESS_USERID'];
    $Data['vPassword'] = $vPassword;
    //prints($Data);exit;
    $secManObj->setAllVar($Data);
    $id = $secManObj->insert();
    if ($id) {
        $var_msg = "Record Added Successfully.";
        $NAME = $Data['vFirstName'] . " " . $Data['vLastName'];
        $link = $Data['vEmail'];
        $password = PostVar('vPassword');
        //set the values of the body of email format
        $body_arr = array("#NAME#", "#SITE_NAME#", "#USERNAME#", "#EMAIL#", "#MAIL_FOOTER#", "#SITE_URL#");
        //		$admins = $adminUserObj->getDetails('*'," AND eStatus='Active' AND iAdminId!=".$_SESSION['B2B_SESS_USERID']);
        //		for($l=0;$l<count($admins);$l++)
        //		{
        $post_arr = array($NAME, $SITE_NAME, $Data['vUserName'], $link, $MAIL_FOOTER, SITE_URL_DUM);
        //send mail to the Admins
        $sendMail->Send("New Security Manager Added", "Admin", $ADMIN_EMAIL, $body_arr, $post_arr);
        //		}
        //set the values of the body of email format
        $body_arr = array("#NAME#", "#SITE_NAME#", "#USERNAME#", "#PASSWORD#", "#EMAIL#", "#MAIL_FOOTER#", "#SITE_URL#");
        $post_arr = array($NAME, $SITE_NAME, $Data['vUserName'], $password, $link, $MAIL_FOOTER, SITE_URL_DUM);
        // prints($post_arr); exit;
        //send mail to the desired member
        $sendMail->Send("Registration", "Member", $link, $body_arr, $post_arr);
Exemple #21
0
<?php

/**
 * Action file for add/Update of securitymanager
 *
 * @package		addsecuritymanager_a.php
 * @section		action/security_manager
 * @author		Jack Scott
*/
if (!isset($rptreportObj)) {
    include_once SITE_CLASS_APPLICATION . 'class.RPTReports.php';
    $rptreportObj = new RPTReports();
}
$view = PostVar("view");
$Data = PostVar("Data");
$iReportId = PostVar("iReportId");
$date = date("Y-m-d H:i:s");
$iAdminID = $_SESSION['B2B_SESS_USERID'];
/** This is for Check Duplicate Record------------------------------------------- */
$generalobj->getRequestVars();
$redirect_file = "index.php?file={$file}&view={$view}&iReportId={$iReportId}";
// $generalobj->checkDuplicate('iSMID', PRJ_DB_PREFIX . "_security_manager", Array('vUserName' => $Data['vUserName']), $redirect_file, USER_ALREADY_EXISTS, $iSMID);
if ($view == "add") {
    // $Data['iAdminID'] = $_SESSION['B2B_SESS_USERID'];
    //prints($Data);exit;
    $id = 0;
    if (is_array($Data) && count(array_filter($Data)) > 0) {
        $id = $rptreportObj->insert($Data);
    }
    if ($id) {
        $var_msg = "Record Added Successfully.";
Exemple #22
0
<?php

$id = GetVar('id');
$msg = GetVar('msg');
$username = $_SESSION['SESS_' . PRJ_CONST_PREFIX . '_USER_NAME'];
$view = '';
$vmsg = PostVar('var_msg');
//$msg = (trim($msg)!='')? $msg : GetVar('msg');
if ($vmsg == 'al') {
    $vmsg = $smarty->get_template_vars('LBL_BID_ADVANCE_NOT_HIGHER');
} else {
    if ($vmsg == 'pl') {
        $vmsg = $smarty->get_template_vars('LBL_BID_PRICE_NOT_LESSER');
    } else {
        if ($vmsg == 'bl') {
            $vmsg = $smarty->get_template_vars('MSG_LESSER_BID_ADVANCE_PRICE');
        } else {
            if ($vmsg == 'nl') {
                $vmsg = $smarty->get_template_vars('MSG_RFQ2_NOT_LIVE');
            } else {
                if ($msg == 'rae') {
                    $vmsg = $smarty->get_template_vars('MSG_BID_ALREADY_EXISTS');
                    $msg = '';
                }
            }
        }
    }
}
if (!isset($statusmasterObj)) {
    include_once SITE_CLASS_APPLICATION . "class.StatusMaster.php";
    $statusmasterObj = new StatusMaster();
Exemple #23
0
<?php

/**
 * Action file for add/Update of Static Pages
 *
 * @package		addstaticPages_a.php
 * @section		action/general
 */
if (!isset($stPageObj)) {
    include_once SITE_CLASS_APPLICATION . "class.StaticPage.php";
    $stPageObj = new StaticPage();
}
$view = PostVar("view");
$Data = PostVar("Data");
$iSPageId = PostVar("iSPageId");
$actionfile = GetVar("file");
$lang = $gdbobj->getLanguage();
for ($i = 0; $i < count($lang); $i++) {
    $Data['tContent_' . $lang[$i]['vLanguageCode']] = trim(stripslashes($Data['tContent_' . $lang[$i]['vLanguageCode']]));
}
/** This is for Check Duplicate Record-------------------------------------------*/
$generalobj->getRequestVars();
$redirect_file = "index.php?file={$file}&view={$view}&iSPageId={$iSPageId}";
$generalobj->checkDuplicate('iSPageId', PRJ_DB_PREFIX . "_static_pages", array('vFile' => $Data['vFile']), $redirect_file, PAGE_ALREADY_EXISTS, $iSPageId);
if ($view == "add") {
    //prints($Data);exit;
    $stPageObj->setAllVar($Data);
    $result = $stPageObj->insert();
    if ($result) {
        $var_msg = "Record Added Successfully.";
    } else {
Exemple #24
0
<?php

$view = PostVar("view");
$iMsgID = PostVar("iMsgID");
$chkCount = PostVar("chkCount");
//echo "<pre>";
//print_r($_POST);exit;
if ($view == "delete") {
    for ($i = 0; $i < $_POST['no']; $i++) {
        if ($_POST["ch" . $i]) {
            $iId = $_POST["ch" . $i];
            $id = $dbobj->MySQLDelete("" . PRJ_DB_PREFIX . "_admin_message_alert", " iMsgID = '" . $iId . "'");
        }
    }
    if ($id) {
        $var_msg = $chkCount . " conversation has been deleted.";
    } else {
        $var_msg = "Error - in Delete.";
    }
}
header("Location:index.php?file=ge-sentmails&view=edit&AX=Yes&var_msg={$var_msg}");
exit;
Exemple #25
0
 * @author		Jack Scott
 */
include_once SITE_CLASS_APPLICATION . 'class.AdminUser.php';
$adminUserObj = new AdminUser();
//prints($_POST);exit;
//prints($Data);exit;
$view = PostVar("view");
$Data = PostVar("Data");
$dupl = PostVar('dpr');
$Data_access = PostVar("Data_access");
$vPassword = md5(PostVar('vPassword'));
$iAdminId = PostVar("iAdminId");
$curr_date = date("Y-m-d h:i:s");
$Data['eType'] = "Premier Admin";
$vPhone1 = PostVar("vPhone1");
$vPhone2 = PostVar("vPhone2");
/* $vMobile1 = PostVar("vMobile1");
  $vMobile2 = PostVar("vMobile2");
  $vMobile3 = PostVar("vMobile3");

  $vFax1 = PostVar("vFax1");
  $vFax2 = PostVar("vFax2");
  $vFax3 = PostVar("vFax3");
 */
$vPhone = $vPhone1 . "-" . $vPhone2 . "-" . $vPhone3;
//$vMobile = $vMobile1."-".$vMobile2."-".$vMobile3;
//$vFax = $vFax1."-".$vFax2."-".$vFax3;
$Data = array_merge($Data, array("vPhone" => $vPhone));
$Data['vMobile'] = $_POST['vMobileCode'] . "-" . $Data['vMobile'];
//$Data	=	array_merge($Data,array("vPhone" => $vPhone,"vMobile" => $vMobile,"vFax" => $vFax));
/** This is for Check Duplicate Record------------------------------------------- */
Exemple #26
0
    $bnkObj = new BankMaster();
}
if (!isset($rfq2Obj)) {
    include_once SITE_CLASS_APPLICATION . "user/class.RFQ2Masterphp";
    $rfq2Obj = new RFQ2Master();
}
if (!isset($rfq2awObj)) {
    include_once SITE_CLASS_APPLICATION . "user/class.Rfq2Award.php";
    $rfq2awObj = new Rfq2Award();
}
if (!isset($rfq2bidObj)) {
    include_once SITE_CLASS_APPLICATION . "user/class.Rfq2Bids.php";
    $rfq2bidObj = new Rfq2Bids();
}
$iInvoiceID = PostVar('invoiceid');
$iPurchaseOrderID = PostVar('poid');
// $orgdtls = $orgObj->select($curORGID);
$dtls = array();
if (trim($iInvoiceID) != '' && $iInvoiceID > 0) {
    $dtls = $invOrdObj->select($iInvoiceID);
    $bdtls = $bnkObj->select($dtls[0]['iBankId']);
    if ($dtls[0]['iPurchaseOrderID'] != "" && $dtls[0]['iPurchaseOrderID'] != "0") {
        $rfq2_dets = $rfq2Obj->getDetails('*', " AND iPurchaseOrderID = '" . $dtls[0]['iPurchaseOrderID'] . "' ");
        if (count($rfq2_dets) > 0) {
            $awrdtls = $rfq2awObj->getDetails('*', " AND iRFQ2Id='" . $rfq2_dets[0]['iRFQ2Id'] . "' ");
            $bid_dtls = $rfq2bidObj->getDetails('*', " AND iBidId='" . $awrdtls[0]['iBidId'] . "' ");
            $dtls[0]['fPOAwardAdvace'] = $bid_dtls[0]['fBidAdvanceTotal'];
            $dtls[0]['fPOAwardPrice'] = $bid_dtls[0]['fBidPriceTotal'];
            $dtls[0]['fPOAwardAmount'] = $bid_dtls[0]['fBidAmount'];
        }
    }
Exemple #27
0
         $dt['eStatus'] = $dtv['eStatus'] = 'Inactive';
     }
     $dt['eNeedToVerify'] = $dtv['eNeedToVerify'] = 'No';
     $rs = $b2bpavObj->updateData($dtv, " iVerifiedID='" . $vasocdt[0]['iVerifiedID'] . "'");
     if ($rs) {
         // unset($dtv['iVerifiedID']);
         // unset($dtv['iAssociationId']);
         $rs = $b2bpaObj->updateData($dt, " iAssociationId={$iAssociationId} ");
     }
 } else {
     $dtv = $vasocdt = $b2bpaObj->select($iAssociationId);
     $dtv = $dtv[0];
     $dt['eRejectedBy'] = $dtv['eRejectedBy'] = $sess_usertype_short;
     $dt['iRejectedByID'] = $dtv['iRejectedByID'] = $sess_id;
     $dt['dRejectedDate'] = $dtv['dRejectedDate'] = calcGTzTime(date('Y-m-d H:i:s'), 'Y-m-d H:i:s');
     $dt['tReasonToReject'] = $dtv['tReasonToReject'] = PostVar('tReasonToReject');
     if ($dtv['eStatus'] == 'Inactive' && $dtv['eNeedToVerify'] == 'Yes') {
         $dt['eStatus'] = $dtv['eStatus'] = 'Active';
     } else {
         $dt['eStatus'] = $dtv['eStatus'] = 'Inactive';
     }
     $dt['eNeedToVerify'] = $dtv['eNeedToVerify'] = 'No';
     $rs = $b2bpaObj->updateData($dt, " iAssociationId={$iAssociationId} ");
     $dtv['iAssociationId'] = $iAssociationId;
     $r = $b2bpavObj->insert($dtv);
 }
 if ($rs) {
     $msg = 'rrs';
 } else {
     $msg = 'rerr';
 }
Exemple #28
0
<?php

/**
 * Action file for add/Update of Country
 * @Created Date :3rd-july-08.
 * @package		addcountry_a.php
 * @section		action/general
 * @author		Pradip Kumar Dash
 */
if (!isset($currencyObj)) {
    include_once SITE_CLASS_APPLICATION . "class.Currency.php";
    $currencyObj = new Currency();
}
$view = PostVar("view");
$Data = PostVar("Data");
$iCurrencyID = PostVar("iCurrencyID");
$actionfile = GetVar("file");
/** This is for Check Duplicate Record-------------------------------------------*/
$generalobj->getRequestVars();
$redirect_file = "index.php?file={$file}&view={$view}&iCurrencyID={$iCurrencyID}";
$generalobj->checkDuplicate('iCurrencyID', PRJ_DB_PREFIX . "_currency_master", array('vCode' => $Data['vCode']), $redirect_file, COUNTRY_ALREADY_EXISTS, $iCurrencyID);
if ($view == "add") {
    //prints($Data);exit;
    $currencyObj->setAllVar($Data);
    $id = $currencyObj->insert();
    if ($id) {
        $var_msg = "Record Added Successfully.";
    } else {
        $var_msg = "Eror-in Add.";
    }
} else {
<?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) != '') {
Exemple #30
0
 
6. the report template is examined, an engine object is created.
 
7. checkProperties with an engine parameter is run (see code below
   marked with STEP 3).
 
8. the report is executed, the ReportServlet sends back the binary
   data to the report viewer running in the client's HTML page.
*/
/*--------------------- The code -------------------------------------------*/
/*
 * We write our own class My_Report which extends from the
 * ClearReports_Report class. You can use your own descendant of
 * ClearReports_Report if you wish, see documentation of ClearReports_Report.
*/
$rptfile = PostVar('rptfile');
$rptfile = trim($rptfile) != '' ? $rptfile : GetVar('rptfile');
// echo $rptfile; exit;
/*$msg = GetVar('msg');
$pvar = $_POST;
$rptfile = PostVar('rptfile');
$rptfile = (trim($rptfile)!='')? $rptfile : GetVar('rptfile');
// unset($pvar['rptfile']);
$_GET['init'] = $pvar['init'];
$script = $_SERVER['SCRIPT_FILENAME'];
$_POST['report'] = "file:" . dirname($script) . "$inetreportsfiles/$rptfile.rpt";
unset($pvar['init']);
$pvar = array();
$pvar['param1'] = 'Invoice Report';
$pvar = '&'.http_build_query($pvar);*/
// pr($pvar); exit;