$view = 'edit';
}
$view = isset($view) ? $view : '';
### CREATE SERVER SIDE VALIDATION MESSAGE ###
$vldmsg = "";
if (isset($_SESSION['SESS_' . PRJ_CONST_PREFIX . '_VALIDATION']) && $_SESSION['SESS_' . PRJ_CONST_PREFIX . '_VALIDATION'] != '') {
    include SITE_CLASS_GEN . "class.validation.php";
    $validation = new Validation();
    $vldmsg = $validation->CreateHtmlMsg($_SESSION['SESS_' . PRJ_CONST_PREFIX . '_VALIDATION']);
    unset($_SESSION['SESS_' . PRJ_CONST_PREFIX . '_VALIDATION']);
}
#### ENDS HERE ###
// prints($vldmsg); exit;
$state = $cntstObj->getgeneralArr(PRJ_DB_PREFIX . "_state_master", " AND eStatus='Active'", "vStateCode", "vState", "vCountryCode", "vStateCode,vState,vCountryCode");
$stateArr = $state[0];
$db_country = $countryObj->getCountryDetail("iCountryId,vCountry,vCountryCode,iCountryISD,iCurrencyID", "AND eStatus = 'Active'");
//prints($db_country);exit;
$db_state = $stateObj->getStateDetail("iStateId, vStateCode, vState", "AND eStatus = 'Active'", "vState");
//$sql="select vOrganizationCode, vCompanyName from b2b_organization_master org,b2b_organization_user user where org.iOrganizationId=user.iOrganizationId and user.vUserName='******'";
//$sql="select vOrganizationCode, vCompanyName from b2b_organization_master org where org.iOrganizationId=$curORGID";
//$res=$dbobj->MySqlSelect($sql); //$curORGID
$orgdtls = $orgObj->select($curORGID);
$orgname = $orgdtls[0]['vCompanyName'];
$OrgCode = $orgdtls[0]['vOrganizationCode'];
// prints($orgname);exit;
$poad = isset($_SESSION['poadd']) ? $_SESSION['poadd'] : '';
$podtls = array();
$asocdtls = array();
$sorgdtls = array();
$invdl = array();
$poAttachments = array();
Exemple #2
0
            $arr[0]['vMobileCode'] = $phoneData[0];
            $arr[0]['vMobile'] = $phoneData[1];
        }
        //prints($arr);
    } else {
        $view = "add";
    }
}
$arr[0]['iQuestionId'] = isset($arr[0]['iQuestionId']) ? $arr[0]['iQuestionId'] : '';
$arr[0]['var_msg'] = isset($arr[0]['var_msg']) ? $arr[0]['var_msg'] : '';
/* Array For Creating Security Question Combo */
$seqCombArr = array("ID" => "iQuestionId", "Name" => "Data[iQuestionId]", "Type" => "Query", "tableName" => "" . PRJ_DB_PREFIX . "_seq_question", "fieldId" => "iQuestionId", "fieldName" => "vQuestion", "extVal" => '', "selectedVal" => $arr[0]['iQuestionId'], "width" => '216px', "height" => '', "onchange" => '', "selectText" => "---Select security question---", "where" => " eStatus = 'Active'", "multiple_select" => "", "orderby" => 'vQuestion', "validationmsg" => 'Select security question.', "extra" => "tabIndex=24");
//Get State Array
$state = $cntstObj->getgeneralArr(PRJ_DB_PREFIX . "_state_master", " AND eStatus='Active'", "vStateCode", "vState", "vCountryCode", "vStateCode,vState,vCountryCode");
$stateArr = $state[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");
//prints($db_state);exit;
//end here
?>
<script language="JavaScript1.2" >
	stateArr = new Array(<?php 
echo $stateArr;
?>
);
</script>
<form name="frmadd" id="frmadd" action="index.php?file=<?php 
echo $file;
?>
&view=action" method="post">
Exemple #3
0
 * @author		Pradip Kumar Dash
*/
if (!isset($countryObj)) {
    include_once SITE_CLASS_APPLICATION . "class.Country.php";
    $countryObj = new Country();
}
$gdbobj->getRequestVars();
$view = GetVar("view");
$iCountryId = GetVar("iCountryId");
$actionfile = GetVar("file");
if (count($_POST) > 0) {
    $arr = array();
    $arr[0] = $_POST;
} else {
    if ($view == 'edit') {
        $arr = $countryObj->getCountryDetail("*", "AND iCountryId = '{$iCountryId}'");
        //prints($arr);exit;
    } else {
        $view = "add";
    }
}
/* Array For Creating Country Combo */
$currencyCombArr = array("ID" => "iCurrencyID", "Name" => "Data[iCurrencyID]", "Type" => "Query", "tableName" => "" . PRJ_DB_PREFIX . "_currency_master", "fieldId" => "iCurrencyID", "fieldName" => "vCode", "extVal" => '', "selectedVal" => isset($arr[0]['iCurrencyID']) ? $arr[0]['iCurrencyID'] : '', "width" => '216px', "height" => '', "onchange" => '', "selectText" => "---Select Currency---", "where" => " eStatus = 'Active'", "multiple_select" => "", "orderby" => 'vCode', "validationmsg" => 'Select Currency.', "class" => 'required', "extra" => "tabIndex='4'");
/* end here */
?>
<form name="frmadd" id="frmadd" action="index.php?file=<?php 
echo $actionfile;
?>
&view=action" method="post" enctype="multipart/form-data">
<?php 
echo $generalobj->PrintElement("view", "view", $view, "Hidden");
Exemple #4
0
<?php

//prints($_GET);exit;
$val = GetVar('val');
if (!isset($countryObj)) {
    include_once SITE_CLASS_APPLICATION . "class.Country.php";
    $countryObj = new Country();
}
if ($val != '') {
    $where = "AND BINARY vCountryCode LIKE '{$val}'";
    $arr = $countryObj->getCountryDetail("iCountryISD as code", $where);
    // prints($arr);exit;
    $arr[0]['iCountryISD'] = isset($arr[0]['iCountryISD']) ? $arr[0]['iCountryISD'] : '';
    $code = isset($arr[0]['code']) ? $arr[0]['code'] : $arr[0]['iCountryISD'];
} else {
    $code = '';
}
echo "{$code}";
//exit;
Exemple #5
0
 * @Created Date :3rd-july-08.
 * @package		addstate_a.php
 * @section		action/general
 */
if (!isset($stateObj)) {
    include_once SITE_CLASS_APPLICATION . "class.State.php";
    $stateObj = new State();
}
if (!isset($countryObj)) {
    include_once SITE_CLASS_APPLICATION . "class.Country.php";
    $countryObj = new Country();
}
$view = PostVar("view");
$Data = PostVar("Data");
$iStateId = PostVar("iStateId");
$cntcode = $countryObj->getCountryDetail("vCountryCode", "AND iCountryId = '{$Data['iCountryId']}'");
$Data['vCountryCode'] = $cntcode[0]['vCountryCode'];
/** This is for Check Duplicate Record-------------------------------------------*/
$generalobj->getRequestVars();
$redirect_file = "index.php?file={$file}&view={$view}&iStateId={$iStateId}";
$generalobj->checkDuplicate('iStateId', PRJ_DB_PREFIX . "_state_master", array('vState' => $Data['vState']), $redirect_file, STATE_ALREADY_EXISTS, $iStateId);
if ($view == "add") {
    //prints($Data);exit;
    $stateObj->setAllVar($Data);
    $id = $stateObj->insert();
    if ($id) {
        $var_msg = "Record Added Successfully.";
    } else {
        $var_msg = "Eror-in Add.";
    }
} else {