summaryrefslogtreecommitdiff
path: root/demos/currency-converter/protected/pages/Home.php
blob: dcf9339e49e5d9567dce1b6784b0a3efef76eb9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php
Prado::using('System.Web.UI.ActiveControls.*');
class Home extends TPage
{
	public function convert_clicked($sender, $param)
	{
		if($this->Page->IsValid)
		{
			$rate = floatval($this->currencyRate->Text);
			$dollars = floatval($this->dollars->Text);
			$this->total->Text = $rate * $dollars;
		}
	}
}
?>