function __construct() { $this->page = array("title" => "iRail.be", "subtitle" => "Mobile"); $stationsinput = new StationsInput(); $this->page["stationarray"] = $stationsinput->generate_js_array(parent::newRequestInstance()); $this->page["date"] = date("D d/m/Y H:i"); if (isset($_COOKIE["from"])) { $this->page["from"] = $_COOKIE["from"]; } else { $this->page["from"] = ""; } if (isset($_COOKIE["to"])) { $this->page["to"] = $_COOKIE["to"]; } else { $this->page["to"] = ""; } }