aboutsummaryrefslogtreecommitdiffstats
path: root/MainView.php
diff options
context:
space:
mode:
Diffstat (limited to 'MainView.php')
-rw-r--r--MainView.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/MainView.php b/MainView.php
index 2e5ad0c..2c3be45 100644
--- a/MainView.php
+++ b/MainView.php
@@ -32,6 +32,20 @@ class MainView
}
+ // $this->mainView->form('/some/save')->
+ function action($action)
+ {
+ $port = ($_SERVER['SERVER_PORT'] > 80) ? ':'.$_SERVER['SERVER_PORT'] : '';
+ $base = str_replace('index.php', '', $_SERVER['PHP_SELF']);
+ return 'action="'.$base.$action.$port.'"';
+ }
+
+ function form($action)
+ {
+ $port = ($_SERVER['SERVER_PORT'] > 80) ? ':'.$_SERVER['SERVER_PORT'] : '';
+ $out = '<form action="'.$action.$port.'" accept-charset="utf-8"';
+ }
+
function input($params)
{
return $this->tag('input', $params);