summaryrefslogtreecommitdiff
path: root/demos/currency-converter/protected/pages/Home.php
blob: 7aadd89f3f2672562b2b10bed3c05f69f284f00d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?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;
		}
	}
}