summaryrefslogtreecommitdiff
path: root/demos/currency-converter/protected/pages/Home.php
diff options
context:
space:
mode:
authorwei <>2006-12-23 00:22:48 +0000
committerwei <>2006-12-23 00:22:48 +0000
commit6b685cc4e496c5eabbb3e6415fb7fdf0474bf0f1 (patch)
tree7a5859c07da28454b894a3ca003fede8880da4e4 /demos/currency-converter/protected/pages/Home.php
parent2c221ea67d0512961beea8fbcb30b23865c16bb0 (diff)
add currency-converter tutorial
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