getListSQL("ma_vendor_member_code_int=". $varcode); sqlToUI($strsql,$tmpl); } //Fill all the masters here function initializeUI($varmode,$tmpl) { //do any assignments that are to be done prelist to smarty list template $strconcern = "select concern_code_int as 'code', concern_name_vc as 'valfield' from ma_concern order by concern_code_int"; $arrconcern = db_get_all($strconcern); $tmpl->assign('arrconcern',$arrconcern); $strregtype = "select registrationtype_code_int as 'code', registrationtype_name_vc as 'valfield' from ma_registrationtype order by registrationtype_code_int"; $arrregtype = db_get_all($strregtype); $tmpl->assign('arrregtype',$arrregtype); global $odata; $strcountry = "select country_code_int as 'code', country_name as 'valfield' from ma_country order by country_code_int"; $arrcountry = db_get_all($strcountry); // if($varmode=="Edit") // { // $varcode = $_GET["Code"]; // $arrdata = $odata->getList(0,0," member.ma_vendor_member_code_int=" . $varcode); // $country = $arrdata[0]["country_code_int"]; // $statecode = $arrdata[0]["state_code_int"]; // $districtcode = $arrdata[0]["district_code_int"]; // //get the value for the State and populate the drop down // $strstate = "SELECT state_code_int as 'code', state_name_vc as 'valfield' FROM ma_state where country_code_int= " . $country; // $arrstate = db_get_all($strstate); // $tmpl->assign('recstate',$arrstate); // $strdistrict = "SELECT district_code_int as 'code', district_name_vc as 'valfield' FROM ma_district where state_code_int= '$statecode'"; // $arrdistrict = db_get_all($strdistrict); // $tmpl->assign('recdistrict',$arrdistrict); // //get the value for the area based on city // $strcity = "select city_code_int as 'code', city_name_vc as 'valfield' from ma_city where district_code_int=" . $districtcode; // $arrcity = db_get_all($strcity); // $tmpl->assign('reccity',$arrcity); // } $tmpl->assign('reccountry',$arrcountry); } //before the list is being called if some assignments are to be done //then write here with $smarty object name function getPreListAssignToSmarty($tmpl) { } //Fill the data by getting the data from the database. It will be called only in edit mode //called when the edit button is pressed function setDataOnEdit($varcode,$odt,$tmpl) { dbToUI("ma_vendor_member","ma_vendor_member_code_int",$varcode,$tmpl); } //set the template data //called when the data is duplicate and the record is to be displayed function setDataToTemplate($mode,$tmpl) { } // $length = 5; // $randomString = substr(str_shuffle(md5(time())),0,$length); // $smarty->assign('randomString',$randomString); include "upageflow.inc"; ?>