newdb = $newdb; $this->default_language = $default_language; $this->default_country_id = $default_country_id; } function SetDefaultCountry($default_country_id) { $this->default_country_id = $default_country_id; } function SetDefaultLanguage($default_language) { $this->default_language = $default_language; } function Render() { $this->country = new Select('country_id'); $this->result = $this->newdb->query("SELECT * from cllrnet.country order by country_id"); if($this->newdb->isError($this->result)) { die("Error on Select of Country...".$this->result->message); } while($this->row = $this->result->fetchRow(DB_FETCHMODE_ASSOC)) { if($this->row['country_id'] == $this->default_country_id) { if($this->default_language = "en") { $this->country->AddOptionSelected($this->row['country_id'],$this->row['citizenship_english']); } else { $this->country->AddOptionSelected($this->row['country_id'],$this->row['citizenship_french']); } } else { if($this->default_language = "en") { $this->country->AddOption($this->row['country_id'],$this->row['citizenship_english']); } else { $this->country->AddOption($this->row['country_id'],$this->row['citizenship_french']); } } } $this->country->SetSize(1); $this->country->Render(); } }