Ejemplo n.º 1
0
        }
    }
    $object->setCancelAction($XML_SERVER);
} else {
    # Input area code
    $object = new AastraIPPhoneInputScreen();
    $object->setTitle(Aastra_get_label('Area code finder', $language));
    $object->setPrompt(Aastra_get_label('Enter area code', $language));
    $object->setParameter('area');
    $object->setType('number');
    $object->setURL($XML_SERVER);
    $object->setDestroyOnExit();
    # Softkeys
    if ($nb_softkeys > 0) {
        if ($nb_softkeys < 7) {
            $object->addSoftkey('1', Aastra_get_label('Backspace', $language), 'SoftKey:BackSpace');
            $object->addSoftkey('5', Aastra_get_label('Lookup', $language), 'SoftKey:Submit');
            $object->addSoftkey('6', Aastra_get_label('Exit', $language), 'SoftKey:Exit');
        } else {
            $object->addSoftkey('10', Aastra_get_label('Exit', $language), 'SoftKey:Exit');
        }
    }
}
# Top title
if (Aastra_is_top_title_supported()) {
    $object->setTopTitle(Aastra_get_label('Area code lookup'), '', '1');
    $object->addIcon('1', 'http://' . $AA_XML_SERVER . '/' . $AA_XMLDIRECTORY . '/icons/area.png');
}
# Display object
$object->output();
exit;
Ejemplo n.º 2
0
     $db->query($sql, array($user, 'searchmethod'));
     $sql = 'INSERT INTO contactdir_details (extension, type, val) VALUES (?, ?, ?)';
     $db->query($sql, array($user, 'searchmethod', 't9'));
     $input->setTitle('Contact Directory');
     $input->setPrompt('Enter first three chars.');
     $input->setType('string');
     $input->setParameter('search');
     $input->setDefault($searchterm);
     $input->setURL($XML_SERVER_PATH . 'contactdir.php?searchmethod=t9');
     $input->setDestroyOnExit();
     $input->addSoftkey('1', 'One-Touch', $XML_SERVER_PATH . 'contactdir.php?user='******'&searchmethod=onetouch');
     $input->addSoftkey('5', 'Back', $XML_SERVER_PATH . 'contactdir.php');
     $input->addSoftkey('4', 'Search', 'SoftKey:Submit');
     $input->addSoftkey('6', 'BKSpace', 'SoftKey:BackSpace');
     $input->addSoftkey('3', 'Exit', 'SoftKey:Exit');
     $input->output();
     break;
 case 'onetouch':
     $sql = 'DELETE FROM contactdir_details WHERE extension = ? and type = ?';
     $db->query($sql, array($user, 'searchmethod'));
     $sql = 'INSERT INTO contactdir_details (extension, type, val) VALUES (?, ?, ?)';
     $db->query($sql, array($user, 'searchmethod', 'onetouch'));
     $input->setTitle('Contact Directory');
     $input->setPrompt('Enter first three chars.');
     $input->setType('number');
     $input->setParameter('search');
     $input->setDefault($searchterm);
     $input->setURL($XML_SERVER_PATH . 'contactdir.php?user='******'&searchmethod=onetouch');
     $input->addSoftkey('1', 'T9', $XML_SERVER_PATH . 'contactdir.php?user='******'&searchmethod=t9');
     //$input->addSoftkey('2', 'History', $XML_SERVER_PATH.'contactdir.php?user='******'&searchmethod=t9&history=show');
     $input->addSoftkey('5', 'Back', $XML_SERVER_PATH . 'contactdir.php?user=' . $user);