setDestroyOnExit(); # $ftext->addLine('Formatted Screen','double','center'); # $ftext->setScrollStart('2'); # $ftext->addLine('Scrolled text1'); # $ftext->addLine('Scrolled text2'); # $ftext->addLine('Scrolled text3'); # $ftext->addLine('Scrolled text4'); # $ftext->addLine('Scrolled text5'); # $ftext->setScrollEnd(); # $ftext->addLine('Footer',NULL,'center'); # $ftext->addSoftkey('1', 'Label', 'http://myserver.com/script.php?action=1','1'); # $ftext->addSoftkey('6', 'Exit', 'SoftKey:Exit'); # $ftext->addIcon('1', 'Icon:Envelope'); # $ftext->output(); # ######################################################################################################## require_once('AastraIPPhone.class.php'); require_once('AastraIPPhoneFormattedTextScreenEntry.class.php'); class AastraIPPhoneFormattedTextScreen extends AastraIPPhone { var $_doneAction=""; function addLine($text, $size=NULL, $align=NULL) { $this->_entries[] = new AastraIPPhoneFormattedTextScreenEntry($text, $size, $align, 'normal'); } function setScrollStart($height) { $this->_entries[] = new AastraIPPhoneFormattedTextScreenEntry(NULL, $height, NULL, 'scrollstart'); } function setScrollEnd() { $this->_entries[] = new AastraIPPhoneFormattedTextScreenEntry(NULL, NULL, NULL, 'scrollend'); } function setDoneAction($uri) { $this->_doneAction = $uri; } function render() { $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->_lockin=='yes') $out .= " LockIn=\"yes\""; if($this->_allowAnswer == 'yes') $out .= " allowAnswer=\"yes\""; if($this->_timeout!=0) $out .= " Timeout=\"{$this->_timeout}\""; $out .= ">\n"; foreach ($this->_entries as $entry) $out .= $entry->render(); 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; } } ?>