function Aastra_test_phone_versions($versions, $type, $header = NULL)
{
    # Start with the HTTP header
    if (!$header) {
        $header = Aastra_decode_HTTP_header();
    }
    # Retrieve phone type and requested version
    $model_type = Aastra_phone_type($header);
    # Perform the check
    if ($versions[$model_type] or $model_type == '0') {
        return Aastra_test_phone_version($versions[$model_type], $type, $header);
    } else {
        switch ($model_type) {
            case '1':
                $models = array('Aastra9112i', 'Aastra9133i');
                break;
            case '2':
                $models = array('Aastra480i', 'Aastra480i Cordless');
                break;
            case '3':
                $models = array('Aastra6730i', 'Aastra6731i', 'Aastra51i', 'Aastra53i');
                break;
            case '4':
                $models = array('Aastra55i', 'Aastra57iCTi', 'Aastra9480i', 'Aastra9480iCT', 'Aastra6735i', 'Aastra6737i');
                break;
            case '5':
                $models = array('Aastra6739i', 'Aastra8000i');
                break;
        }
        return Aastra_test_phone_model($models, False, $type);
    }
}
 function output($page = NULL)
 {
     # Test phone firmware / model
     Aastra_test_phone_version('1.4.2.', 0);
     Aastra_test_phone_model(array('Aastra9112i', 'Aastra9133i'), False, 0);
     # Force destroyOnExit
     $this->_destroyOnExit = 'yes';
     # Initial call?
     if (!isset($page)) {
         # Count number of entries in list
         $this->_count = count($this->_list);
         # Setup icons
         $this->_setupIcons();
         # Setup Softkeys
         $this->_setupSoftKeys();
         # Set Cancel URI
         if (!empty($this->_backCancelURL)) {
             parent::setCancelAction($this->_backCancelURL);
         }
         # Do some security / compliancy checks
         # Protect against wrap list bug in FW < R2.4.0
         if (Aastra_test_phone_version('2.4.0.', 1)) {
             $this->_wraplist = 'no';
         }
         if (!Aastra_is_wrap_title_supported()) {
             $this->_wraplist = 'no';
         }
         if (!Aastra_is_textmenu_wrapitem_supported()) {
             $this->_title_wrap = 'no';
         }
         if (!Aastra_is_style_textmenu_supported()) {
             $this->_style = '';
         }
         if (!Aastra_is_lockin_supported()) {
             $this->_lockin = 'no';
         }
         # Save object in user context (context = mac address)
         Aastra_save_user_context($this->_header['mac'], 'scrollableTextMenuData', $this);
     } else {
         # If beep is set, only beep during initial call
         $this->_beep = 'no';
     }
     # Generate the actual items of the menu for the given page
     $this->_generatePage($page);
     parent::output();
 }
Esempio n. 3
0
# Body
#############################################################################
# Retrieve parameters
$user = $_GET['user'];
$action = $_GET['action'];
$value = $_GET['value'];
$page = $_GET['page'];
$score = $_GET['score'];
if ($page == '') {
    $page = 1;
}
# Trace
Aastra_trace_call('Yahtzee', 'user='******', action=' . $action . ', value=' . $value);
# Test User Agent
Aastra_test_phone_version('2.2.0.', 0);
Aastra_test_phone_model(array('Aastra55i', 'Aastra57i', 'Aastra57iCT', 'Aastra8000i'), True, 0);
Aastra_test_php_function('imagecreate', 'PHP-GD extension not installed.');
# Get Language
$language = Aastra_get_language();
# Retrieve phone information
$header = Aastra_decode_HTTP_header();
if ($user == '') {
    $user = $header['mac'];
}
# Keep return URI
$XML_SERVER .= '?user=' . $user;
# Number of softkeys
$nb_softkeys = Aastra_number_softkeys_supported($header);
# Get user context
$yahtzee = get_user_context($user);
# Init XML object
Esempio n. 4
0
    return $query['COUNT(id)'];
}
#############################################################
# Global Variables
# Collect parameters
$lookup = Aastra_getvar_safe('lookup');
$page = Aastra_getvar_safe('page', '1');
$index = Aastra_getvar_safe('index');
$selection = Aastra_getvar_safe('selection');
$action = Aastra_getvar_safe('action', 'input');
# Log call to the application
Aastra_trace_call('sugarCRM', 'lookup=' . $lookup . ', action=' . $action);
# Test User Agent
Aastra_test_phone_version('1.4.2.', 0);
# Test phone type
Aastra_test_phone_model(array('Aastra9112i', 'Aastra9133i'), False, 0);
# Retrieve phone information
$header = Aastra_decode_HTTP_header();
# Get Language
$language = Aastra_get_language();
# Get global compatibility
$is_softkeys = Aastra_is_softkeys_supported();
$is_icons = Aastra_is_icons_supported();
$is_style_textmenu = Aastra_is_style_textmenu_supported();
# Compute MaxLines
if ($is_softkeys) {
    $MaxLines = AASTRA_MAXLINES;
} else {
    $MaxLines = AASTRA_MAXLINES - 2;
}
# PROCESS Action