getMessage($_SESSION["temp"]["error"]); }else{ $dis_msg = ''; } ?> mysql = $mysql; $this->val=''; $this->loc=''; $this->selected=''; } function getCountryList($parent_id) { $sql_country="select * from cart_country where active_status=1 and deleteStatus=0"; $res_country=$this->mysql->query($sql_country); if($res_country && $res_country->num_rows) { while($row_country = $res_country->fetch_object()) { $countryId = $row_country->country_id; $countryTitle = $row_country->country_name; $selected = ($countryId==$parent_id)?'selected':''; $val.='\n"; } } //$val=$this->countrylist; return $val; } function showCountryList($fieldname='',$parent_id=0) { if($fieldname!='') { $str=''; return $str; } } function getStateName($cart_state) { $sql4="select * from cart_state where state_id='$cart_state' and deleteStatus=0"; $qry4=$this->mysql->query($sql4); $row4=$qry4->fetch_object(); $cart_state=$row4->state_name; return $cart_state; } function getCountryName($cart_state) { $sql4="select * from cart_country where country_id='$cart_state'"; $qry4=$this->mysql->query($sql4); $row4=$qry4->fetch_object(); $cart_state=$row4->country_name; return $cart_state; } function getStateCode($cart_state) { $sql4="select * from cart_state where state_id='$cart_state'"; $qry4=$this->mysql->query($sql4); $row4=$qry4->fetch_object(); $cart_state=$row4->state_2_code; return $cart_state; } function getCountryCode($cart_state) { $sql4="select * from cart_country where country_id='$cart_state'"; $qry4=$this->mysql->query($sql4); $row4=$qry4->fetch_object(); $cart_state=$row4->country_2_code; return $cart_state; } function getStateList($countryId=38,$sId=0) { $sql_state="select * from cart_state where active_status=1 AND country_id=$countryId and deleteStatus=0"; $res_state=$this->mysql->query($sql_state); //$val.=''; if($res_state && $res_state->num_rows) { while($row_state = $res_state->fetch_object()) { $stateId = $row_state->state_id; $stateTitle = $row_state->state_name; $selected = ($stateId==$sId)?'selected':''; $val.='\n"; } } //$val=$this->statelist; return $val; } function showLocationList($businessId,$parentId){ $val = $this->val; $loc = $this->loc; $selected = $this->selected; $sql_country="select l.*,s.state_name from business_location l JOIN cart_state s on l.businessState=s.state_id where businessId=$businessId and activeStatus=1 and s.deleteStatus=0"; $res_country=$this->mysql->query($sql_country); if($res_country && $res_country->num_rows) { if(!empty($parentId)){ $loc=explode(",",$parentId); } while($row_country = $res_country->fetch_object()) { $countryId = $row_country->businessLocationId; //$countryTitle = $row_country->businessAddress." ,".$row_country->businessCity; $countryTitle = $row_country->businessCity.", ".$row_country->state_name; if(!empty($loc)){ $selected = (in_array($countryId,$loc))?'selected':''; } $val.='\n"; } } return $val; } function getLocationList($businessId,$parentId){ $locSelect = ''; return $locSelect; } } ?>