setTitle('Title'); # $text->setText('Text to be displayed.'); # $text->setDestroyOnExit(); # $text->addSoftkey('1', 'Mail', 'http://myserver.com/script.php?action=1','1'); # $text->addSoftkey('6', 'Exit', 'SoftKey:Exit'); # $text->addIcon('1', 'Icon:Envelope'); # $text->output(); # ######################################################################################################## require_once('AastraIPPhone.class.php'); class AastraIPPhoneTextScreen extends AastraIPPhone { var $_text; var $_doneAction=""; function setText($text) { $this->_text = $text; } function setDoneAction($uri) { $this->_doneAction = $uri; } function render() { $title = $this->escape($this->_title); $text = $this->escape($this->_text); $out = ''; $out .= "_destroyOnExit == 'yes') $out .= " destroyOnExit=\"yes\""; if($this->_cancelAction != "") { $cancelAction = $this->escape($this->_cancelAction); $out .= " cancelAction=\"{$cancelAction}\""; } if($this->_doneAction != "") { $doneAction = $this->escape($this->_doneAction); $out .= " doneAction=\"{$doneAction}\""; } if($this->_beep=='yes') $out .= " Beep=\"yes\""; if($this->_allowAnswer == 'yes') $out .= " allowAnswer=\"yes\""; $out .= ">\n"; if ($this->_title!='') { $title = $this->escape($this->_title); $out .= "_title_wrap=='yes') $out .= " wrap=\"yes\""; $out .= ">".$title."\n"; } $out .= "{$text}\n"; foreach ($this->_softkeys as $softkey) $out .= $softkey->render(); $IconList=0; foreach ($this->_icons as $icon) { if($IconList==0) { $out .= "\n"; $IconList=1; } $out .= $icon->render(); } if($IconList!=0) $out .= "\n"; $out .= "\n"; return $out; } } ?>