예제 #1
0
function display_message($title, $message, $backURL = NULL)
{
    global $LANGUAGE;
    # Depending on phone type
    if (Aastra_phone_type() != 5) {
        # non 6739i
        require_once 'AastraIPPhoneTextScreen.class.php';
        $object = new AastraIPPhoneTextScreen();
        $object->setTitle($title);
        $object->setText($message);
        $object->addSoftkey('5', Aastra_get_label('Back', $LANGUAGE), $backURL);
        $object->addSoftkey('6', Aastra_get_label('Exit', $LANGUAGE), 'SoftKey:Exit');
    } else {
        # 6739i/8000i
        require_once 'AastraIPPhoneFormattedTextScreen.class.php';
        $object = new AastraIPPhoneFormattedTextScreen();
        $object->addLine('', 'double', 'center');
        $object->addLine($title, 'double', 'center', 'red');
        $object->setScrollStart('3');
        $object->addLine('');
        $object->addLine('');
        $object->addLine($message, NULL, 'center');
        $object->setScrollEnd();
        $object->addLine('', NULL, 'center');
        $object->addSoftkey('9', Aastra_get_label('Back', $LANGUAGE), $backURL, 1);
        $object->addSoftkey('10', Aastra_get_label('Exit', $LANGUAGE), 'SoftKey:Exit', 2);
        $object->addIcon(1, 'Icon:ArrowLeft');
        $object->addIcon(2, 'Icon:CircleRed');
    }
    # Common parameters
    $object->setDestroyOnExit();
    $object->setCancelAction($backURL);
    $object->output();
    exit;
}