summaryrefslogtreecommitdiff
path: root/demos/currency-converter/protected/pages/Home.php
diff options
context:
space:
mode:
Diffstat (limited to 'demos/currency-converter/protected/pages/Home.php')
-rw-r--r--demos/currency-converter/protected/pages/Home.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/demos/currency-converter/protected/pages/Home.php b/demos/currency-converter/protected/pages/Home.php
new file mode 100644
index 00000000..dcf9339e
--- /dev/null
+++ b/demos/currency-converter/protected/pages/Home.php
@@ -0,0 +1,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;
+ }
+ }
+}
+?> \ No newline at end of file