<?php

class View
{
    private $model;
    private $controller;
 
    public function __construct($controller,$model) {
        $this->controller = $controller;
        $this->model = $model;
    }
 
    public function output() {
        $outis = "<h1>" . $this->model->h1string . "</h1><br>";
        $outis .= "<p>" . $this->model->pstring . "</p><br>";
        $outis .= '<a title="' . $this->model->linkstring . '" href="mvc.php?action=clicked">' . $this->model->linkstring . "</a><br>";
        $outis .= '<input type="text" size=100 style="display:' .  $this->model->myifdisplay . ';" value="' .  $this->model->myifsrc . '" id="mybut" onchange=" window.location = ' . "'" . 'mvc.php?action=changed&to=' . "' + this.value" . '; "></input><br>';
        $outis .= '<iframe id="myif" style="width:100%;height:900px;border:7px solid green; background-color: yellow; display:' .  $this->model->myifdisplay . ';" src="' .  $this->model->myifsrc . '"></iframe><br>';
        return $outis;
    }
}
?>
