当前位置: 首页>>代码示例>>PHP>>正文


PHP Aastra_getvar_safe函数代码示例

本文整理汇总了PHP中Aastra_getvar_safe函数的典型用法代码示例。如果您正苦于以下问题:PHP Aastra_getvar_safe函数的具体用法?PHP Aastra_getvar_safe怎么用?PHP Aastra_getvar_safe使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了Aastra_getvar_safe函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: unset

        if (!$allowed) {
            unset($queues[$key]);
        }
    }
    # Return updated queues
    return $queues;
}
#############################################################################
# Body
#############################################################################
$action = Aastra_getvar_safe('action', 'show_queues');
$user = Aastra_getvar_safe('user');
$q_desc = Aastra_getvar_safe('q_desc');
$queue = Aastra_getvar_safe('queue');
$member = Aastra_getvar_safe('member');
$page = Aastra_getvar_safe('page', '1');
# Trace
Aastra_trace_call('queues_asterisk', 'action=' . $action . ', user=' . $user . ', queue=' . $queue . ', member=' . $member);
# Test User Agent
Aastra_test_phone_versions(array('1' => '', '2' => '1.4.2', '3' => '', '4' => '2.5.3.', '5' => '3.0.1.'), '0');
# Get Language
$language = Aastra_get_language();
# Global compatibility
$nb_softkeys = Aastra_number_softkeys_supported();
$is_color_ftextscreen = Aastra_is_formattedtextscreen_color_supported();
# Check user mode
if ($user == '') {
    # Display error
    require_once 'AastraIPPhoneTextScreen.class.php';
    $object = new AastraIPPhoneTextScreen();
    $object->setDestroyOnExit();
开发者ID:jamesrusso,项目名称:Aastra_Scripts,代码行数:31,代码来源:queues.php

示例2: error_reporting

error_reporting(E_ERROR | E_PARSE);
#############################################################################
# Includes
#############################################################################
require_once 'AastraCommon.php';
require_once 'AastraAsterisk.php';
#############################################################################
# Body
#############################################################################
# Retrieve parameters
$user = Aastra_getvar_safe('user');
$action = Aastra_getvar_safe('action');
$value = Aastra_getvar_safe('value');
$selection = Aastra_getvar_safe('selection');
$page = Aastra_getvar_safe('page', '1');
$type = Aastra_getvar_safe('type');
# Maximum number of phones in the follow-me list
$MAX_NUMBERS = 10;
# Trace
Aastra_trace_call('follow_asterisk', 'user=' . $user . ', action=' . $action . ', value=' . $value . ', selection=' . $selection);
# Test User Agent
Aastra_test_phone_versions(array('1' => '1.4.2.', '2' => '1.4.2.', '3' => '2.5.3.', '4' => '2.5.3.', '5' => '3.0.1.'), '0');
# Get global compatibility
$nb_softkeys = Aastra_number_softkeys_supported();
$is_icons = Aastra_is_icons_supported();
$is_style_textmenu = Aastra_is_style_textmenu_supported();
# Initial call
if ($action == '') {
    if ($nb_softkeys) {
        $action = 'main';
    } else {
开发者ID:jamesrusso,项目名称:Aastra_Scripts,代码行数:31,代码来源:follow.php

示例3: Aastra_decode_HTTP_header

function Aastra_decode_HTTP_header()
{
    global $TEST;
    # Debug mode
    if ($TEST) {
        # Calculate fake mac address suffix based on client's source address
        $fake_mac_suffix = strtoupper(substr(md5(Aastra_getvar_safe('REMOTE_ADDR', '', 'SERVER')), 0, 6));
        $array = array('model' => 'Aastra57i', 'mac' => '00085D' . $fake_mac_suffix, 'firmware' => '2.5.3.26', 'ip' => Aastra_getvar_safe('REMOTE_ADDR', '', 'SERVER'), 'language' => 'en', 'rp' => False);
        return $array;
    }
    # User Agent
    $user_agent = Aastra_getvar_safe('HTTP_USER_AGENT', '', 'SERVER');
    if (stristr($user_agent, 'Aastra')) {
        $value = preg_split('/ MAC:/', $user_agent);
        $fin = preg_split('/ /', $value[1]);
        $value[1] = preg_replace('/\\-/', '', $fin[0]);
        $value[2] = preg_replace('/V:/', '', $fin[1]);
    } else {
        $value[0] = 'MSIE';
        $value[1] = 'NA';
        $value[2] = 'NA';
    }
    # Modification for RP phones
    $rp = False;
    if (strstr($value[0], 'RP')) {
        $rp = True;
        $value[0] = preg_replace(array('/67/', '/ RP/'), array('', ''), $value[0]);
    }
    # Modules
    $module[1] = Aastra_getvar_safe('HTTP_X_AASTRA_EXPMOD1', '', 'SERVER');
    $module[2] = Aastra_getvar_safe('HTTP_X_AASTRA_EXPMOD2', '', 'SERVER');
    $module[3] = Aastra_getvar_safe('HTTP_X_AASTRA_EXPMOD3', '', 'SERVER');
    # Create array
    $array = array('model' => $value[0], 'mac' => $value[1], 'firmware' => $value[2], 'ip' => Aastra_getvar_safe('REMOTE_ADDR', '', 'SERVER'), 'module' => $module, 'language' => Aastra_getvar_safe('HTTP_ACCEPT_LANGUAGE', '', 'SERVER'), 'rp' => $rp);
    return $array;
}
开发者ID:jamesrusso,项目名称:Aastra_Scripts,代码行数:36,代码来源:AastraIPPhone.php

示例4: Aastra_decode_HTTP_header

if ($user == '') {
    $header = Aastra_decode_HTTP_header();
    $user = $header['mac'];
}
$action = Aastra_getvar_safe('action', 'input');
$source = Aastra_getvar_safe('source');
$lastn = Aastra_getvar_safe('lastn');
$firstn = Aastra_getvar_safe('firstn');
$company = Aastra_getvar_safe('company');
$lookup = Aastra_getvar_safe('lookup');
$index = Aastra_getvar_safe('index');
$page = Aastra_getvar_safe('page', '1');
$speed = Aastra_getvar_safe('speed');
$back = Aastra_getvar_safe('back');
$mode = Aastra_getvar_safe('mode');
$passwd = Aastra_getvar_safe('passwd');
# Test if Asterisk mode
$asterisk = False;
if (file_exists('../include/AastraAsterisk.php')) {
    $asterisk = True;
    require_once 'AastraAsterisk.php';
}
# Log call to the application
if ($asterisk) {
    Aastra_trace_call('asterisk_csv_dir', 'action=' . $action . ', lookup=' . $lookup . ', page=' . $page . ', index=' . $index . ', lastn=' . $lastn . ', firstn=' . $firstn . ', user=' . $user . ', speed=' . $speed);
} else {
    Aastra_trace_call('csv_directory', 'action=' . $action . ', lookup=' . $lookup . ', page=' . $page . ', index=' . $index . ', lastn=' . $lastn . ', firstn=' . $firstn . ', user=' . $user . ', speed=' . $speed);
}
# Test User Agent
Aastra_test_phone_versions(array('1' => '', '2' => '1.4.2.', '3' => '2.5.3.', '4' => '2.5.3.', '5' => '3.0.1.'), '0');
# Get Language
开发者ID:jamesrusso,项目名称:Aastra_Scripts,代码行数:31,代码来源:csv_directory.php

示例5: Aastra_getvar_safe

#############################################################################
# Includes
#############################################################################
require_once 'AastraAsterisk.php';
#############################################################################
# Main code
#############################################################################
# Retrieve parameters
$user = Aastra_getvar_safe('user');
$page = Aastra_getvar_safe('page', '1');
$action = Aastra_getvar_safe('action', 'init');
$speed = Aastra_getvar_safe('speed');
$selection = Aastra_getvar_safe('selection');
$origin = Aastra_getvar_safe('origin');
$orig_s = Aastra_getvar_safe('orig_s');
$lookup = Aastra_getvar_safe('lookup', '');
# Trace
Aastra_trace_call('directory_5_asterisk', 'user=' . $user . ', action=' . $action . ', speed=' . $speed . ', selection=' . $selection);
# Test User Agent
Aastra_test_phone_versions(array('1' => '', '2' => '', '3' => '', '4' => '', '5' => '3.0.1.'), '0');
# Get Language
$language = Aastra_get_language();
# Save return URI
$XML_SERVER .= '?user=' . $user . '&origin=' . $origin;
# Compute MaxLines
$MaxLines = AASTRA_MAXLINES;
# Initial call
if ($action == 'init') {
    # Retrieve current configuration
    $mode = Aastra_get_user_context(Aastra_get_userdevice_Asterisk($user), 'pbx_directory');
    if ($mode == '') {
开发者ID:jamesrusso,项目名称:Aastra_Scripts,代码行数:31,代码来源:directory_5.php

示例6: array

    $search = array('@<script[^>]*?>.*?</script>@si', '@<[\\/\\!]*?[^<>]*?>@si', '@([\\r\\n])[\\s]+@', '@&(quot|#34);@i', '@&(amp|#38);@i', '@&(lt|#60);@i', '@&(gt|#62);@i', '@&(nbsp|#160);@i', '@&(iexcl|#161);@i', '@&(cent|#162);@i', '@&(pound|#163);@i', '@&(copy|#169);@i', '@&#(\\d+);@e');
    // evaluate as php
    $replace = array('', '', '\\1', '"', '&', '<', '>', ' ', chr(161), chr(162), chr(163), chr(169), 'chr(\\1)');
    $string = preg_replace($search, $replace, $string);
    $string = preg_replace($search, $replace, $string);
    $string = preg_replace('/\\n/', ' ', $string);
    return $string;
}
#############################################################################
# Beginning of the active code
#############################################################################
# Collect parameters
$header = Aastra_decode_HTTP_header();
$user = Aastra_getvar_safe('user', $header['mac']);
$index = Aastra_getvar_safe('index');
$zip = Aastra_getvar_safe('zip');
# Trace
Aastra_trace_call('weather', 'zip=' . $zip . ', index=' . $index);
# Test User Agent
Aastra_test_phone_version('1.4.2.', 0);
# Get Language
$language = Aastra_get_language();
# Get global compatibility
$nb_softkeys = Aastra_number_softkeys_supported();
# Callback
$XML_SERVER .= '?user=' . $user;
# No ZIP yet
if ($zip == '') {
    # Input zip code
    $object = new AastraIPPhoneInputScreen();
    $object->setTitle(Aastra_get_label('US Local Weather', $language));
开发者ID:jamesrusso,项目名称:Aastra_Scripts,代码行数:31,代码来源:weather_us.php

示例7: ini_set

    ini_set('include_path', ini_get('include_path') . ':include:../include');
} else {
    ini_set('include_path', ini_get('include_path') . ';include;..\\include');
}
error_reporting(E_ERROR | E_PARSE);
#############################################################################
# Includes
#############################################################################
require_once 'AastraCommon.php';
require_once 'AastraIPPhoneTextScreen.class.php';
require_once 'AastraIPPhoneInputScreen.class.php';
#############################################################################
# Beginning of the active code
#############################################################################
# Retrieve parameters
$area = Aastra_getvar_safe('area');
# Trace
Aastra_trace_call('area', 'area=' . $area);
# Test User Agent
Aastra_test_phone_version('1.4.2.', 0);
# Get language
$language = Aastra_get_language();
# Global compatibility
$nb_softkeys = Aastra_number_softkeys_supported();
# Test parameter
if ($area) {
    # Load area codes
    $array = Aastra_readINIfile('area_codes.txt', '#', '=');
    $object = new AastraIPPhoneTextScreen();
    $object->setDestroyOnExit();
    $object->setTitle(sprintf(Aastra_get_label('Area code %s', $language), $area));
开发者ID:jamesrusso,项目名称:Aastra_Scripts,代码行数:31,代码来源:area.php

示例8: Aastra_getvar_safe

    } else {
        $return = $hour . ':' . $minute;
    }
    # Return formatted text
    return $return;
}
#############################################################################
# Body
#############################################################################
# Retrieve parameters
$user = Aastra_getvar_safe('user');
$password = Aastra_getvar_safe('password');
$action = Aastra_getvar_safe('action', 'input');
$page = Aastra_getvar_safe('page', '1');
$value = Aastra_getvar_safe('value');
$origin = Aastra_getvar_safe('origin');
# Trace
Aastra_trace_call('logout_asterisk', 'user=' . $user . ', password=' . $password . ', action=' . $action);
# Test User Agent
Aastra_test_phone_versions(array('1' => '1.4.2.', '2' => '1.4.2.', '3' => '2.5.3.', '4' => '2.5.3.', '5' => '3.0.1.'), '0');
# Get MAC address and type of phone
$header = Aastra_decode_HTTP_header();
# Save return URI
$XML_SERVER .= '?user=' . $user;
# Get Language
$language = Aastra_get_language();
# Compatibility
$nb_softkeys = Aastra_number_softkeys_supported();
$is_sip_notify = Aastra_is_sip_notify_supported();
# Device must be ad-hoc
if ($AA_FREEPBX_MODE == '2') {
开发者ID:jamesrusso,项目名称:Aastra_Scripts,代码行数:31,代码来源:logout.php

示例9: Aastra_delete_temp_message_Asterisk

     Aastra_delete_temp_message_Asterisk($user);
     # Send message notifications if needed
     if ($away['notifym'] != '') {
         $explode = explode(',', $away['notifym']);
         $long = sprintf(Aastra_get_label('%s is back', $language), Aastra_get_callerid_Asterisk(Aastra_get_userdevice_Asterisk($user)));
         $short = sprintf(Aastra_get_label('%s is back', $language), Aastra_get_userdevice_Asterisk($user));
         foreach ($explode as $data) {
             Aastra_send_message_Asterisk($data, $long, $short, 'Dial:' . Aastra_get_userdevice_Asterisk($user));
         }
     }
     # Send voice notifications if needed
     if ($away['notifyv'] != '') {
         # Retrieve name recording
         $name_recording = Aastra_get_greeting_name_Asterisk($user);
         # Run in background so we aren't waiting for a response
         $cmd = '/usr/bin/php ' . Aastra_getvar_safe('DOCUMENT_ROOT', '', 'SERVER') . '/' . $AA_XMLDIRECTORY . '/asterisk/notify.php ' . $away['notifyv'] . ' ' . Aastra_get_userdevice_Asterisk($user) . ' ' . $name_recording;
         $cmd = escapeshellcmd($cmd);
         $cmd = '(' . $cmd . ') >/dev/null &';
         system($cmd);
     }
 }
 # Update LED and idle screen
 if ($is_sip_notify and $AA_ISYMPHONY) {
     # Send a user event to aastra-daemon1 to update status
     Aastra_send_userevent_Asterisk('PresenceStatusChanged', Aastra_get_userdevice_Asterisk($user) . ',' . $value1);
 } else {
     $object->addEntry($XML_SERVER . '&action=check');
 }
 # Reset return date/time
 if ($AA_ISYMPHONY and $value1 == AA_PRESENCE_AVAILABLE) {
     Aastra_send_userevent_Asterisk('PresenceReturnChanged', Aastra_get_userdevice_Asterisk($user) . ',0');
开发者ID:jamesrusso,项目名称:Aastra_Scripts,代码行数:31,代码来源:away.php

示例10: Aastra_getvar_safe

#############################################################################
# Main code
#############################################################################
# Retrieve parameters
$confno = Aastra_getvar_safe('confno');
$action = Aastra_getvar_safe('action', 'select');
$page = Aastra_getvar_safe('page', '1');
$user_id = Aastra_getvar_safe('user_id');
$ext = Aastra_getvar_safe('ext');
$number = Aastra_getvar_safe('number', '');
$selection = Aastra_getvar_safe('selection');
if ($confno == '' and $selection != '') {
    $confno = $selection;
}
$pin = Aastra_getvar_safe('pin');
$mode = Aastra_getvar_safe('mode');
# Local variables
$refresh = 1;
# Trace
Aastra_trace_call('meetme_asterisk', 'confno=' . $confno . ', action=' . $action . ', user_id=' . $user_id . ',selection=' . $selection . ',ext=' . $ext . ', mode=' . $mode . ', number=' . $number);
# Retrieve phone information
$header = Aastra_decode_HTTP_header();
# Test User Agent
Aastra_test_phone_versions(array('1' => '', '2' => '1.4.2.', '3' => '', '4' => '2.5.3.', '5' => '3.0.1.'), '0');
# Get Language
$language = Aastra_get_language();
# Keep callback URI
$XML_SERVER .= '?ext=' . $ext;
# Authenticate user
Aastra_check_signature_Asterisk($ext);
# Compatibility
开发者ID:jamesrusso,项目名称:Aastra_Scripts,代码行数:31,代码来源:meetme.php

示例11: ini_set

    ini_set('include_path', ini_get('include_path') . ':include:../include');
} else {
    ini_set('include_path', ini_get('include_path') . ';include;..\\include');
}
error_reporting(E_ERROR | E_PARSE);
#############################################################################
# Includes
#############################################################################
require_once 'AastraAsterisk.php';
#############################################################################
# Active code
#############################################################################
# Retrieve parameters
$user = Aastra_getvar_safe('user');
$action = Aastra_getvar_safe('action', 'change');
$status = Aastra_getvar_safe('status');
# Trace
Aastra_trace_call('dnd_asterisk', 'user=' . $user . ', action=' . $action . ', status=' . $status);
# Test User Agent
Aastra_test_phone_versions(array('1' => '1.4.2.', '2' => '1.4.2.', '3' => '2.5.3.', '4' => '2.5.3.', '5' => '3.0.1.'), '0');
# Authenticate user
if ($action == 'change') {
    Aastra_check_signature_Asterisk($user);
}
# Get language
$language = Aastra_get_language();
# Update callback
$XML_SERVER .= '?user=' . $user;
# Depending on action
switch ($action) {
    # Update Message status
开发者ID:jamesrusso,项目名称:Aastra_Scripts,代码行数:31,代码来源:dnd.php

示例12: Aastra_getvar_safe

        if ($parameters['Event'] = 'QueueMember') {
            $queue_members[] = $parameters;
        }
    }
}
#############################################################################
# Body
#############################################################################
$action = Aastra_getvar_safe('action', 'show_queues');
$agent = Aastra_getvar_safe('agent');
$password = Aastra_getvar_safe('password');
$q_pass = Aastra_getvar_safe('q_pass');
$q_desc = Aastra_getvar_safe('q_desc');
$queue = Aastra_getvar_safe('queue');
$page = Aastra_getvar_safe('page', '1');
$menu_set = Aastra_getvar_safe('menu_set', '1');
# Trace
Aastra_trace_call('agent_asterisk', 'agent=' . $agent . ', action=' . $action . ', queue=' . $queue . ', page=' . $page);
# Test User Agent
Aastra_test_phone_versions(array('1' => '1.4.2.', '2' => '1.4.2.', '3' => '2.5.3.', '4' => '2.5.3.', '5' => '3.0.1.'), '0');
# Get Language
$language = Aastra_get_language();
# Keep callback
$XML_SERVER .= '?agent=' . $agent;
# Local variables
$refresh = 1;
$header = Aastra_decode_HTTP_header();
# Compatibility
$is_icons = Aastra_is_icons_supported();
$nb_softkeys = Aastra_number_softkeys_supported();
if ($nb_softkeys) {
开发者ID:jamesrusso,项目名称:Aastra_Scripts,代码行数:31,代码来源:agent.php

示例13: trim

#############################################################################
# Main code
#############################################################################
# Collect parameters
$action = trim(Aastra_getvar_safe('action'));
$user = trim(Aastra_getvar_safe('user'));
if ($user == '') {
    $header = Aastra_decode_HTTP_header();
    $user = $header['mac'];
}
$lookup = trim(Aastra_getvar_safe('lookup'));
$lastname = trim(Aastra_getvar_safe('lastname'));
$firstname = trim(Aastra_getvar_safe('firstname'));
$source = trim(Aastra_getvar_safe('source'));
$back = trim(Aastra_getvar_safe('back'));
$passwd = trim(Aastra_getvar_safe('passwd'));
# Set custom error handler for E_WARNING errors in order to catch LDAP errors
set_error_handler('WARNINGErrorHandler', E_WARNING);
# Test if Asterisk mode
$asterisk = False;
if (file_exists('../include/AastraAsterisk.php')) {
    $asterisk = True;
    require_once 'AastraAsterisk.php';
}
# Log call to the application
if ($asterisk) {
    Aastra_trace_call('asterisk_LDAP_dir', 'source=' . $source . ', action=' . $action . ', user=' . $user . ', lookup=' . $lookup . ', lastname=' . $lastname . ', firstname=' . $firstname);
} else {
    Aastra_trace_call('LDAP_directory', 'source=' . $source . ', action=' . $action . ', user=' . $user . ', lookup=' . $lookup . ', lastname=' . $lastname . ', firstname=' . $firstname);
}
# Test User Agent
开发者ID:jamesrusso,项目名称:Aastra_Scripts,代码行数:31,代码来源:ldap_directory.php

示例14: Aastra_getvar_safe

# Retrieve parsed data
$user = Aastra_getvar_safe('user');
if ($user == '') {
    $header = Aastra_decode_HTTP_header();
    $user = $header['mac'];
}
$action = Aastra_getvar_safe('action', 'list');
$selection = Aastra_getvar_safe('selection');
$value = Aastra_getvar_safe('value');
$step = Aastra_getvar_safe('step', '1');
$input1 = Aastra_getvar_safe('input1');
$input2 = Aastra_getvar_safe('input2');
$input3 = Aastra_getvar_safe('input3');
$input4 = Aastra_getvar_safe('input4');
$input5 = Aastra_getvar_safe('input5');
$mode = Aastra_getvar_safe('mode', 'dynamic');
# Check if in Asterisk mode
$asterisk = False;
if (file_exists('../include/AastraAsterisk.php')) {
    $asterisk = True;
    require_once 'AastraAsterisk.php';
}
# Log call to the application
if ($asterisk) {
    Aastra_trace_call('asterisk_speed', 'user=' . $user . ', action=' . $action . ', selection=' . $selection . ', value=' . $value . ', step=' . $step);
} else {
    Aastra_trace_call('speed', 'user=' . $user . ', action=' . $action . ', selection=' . $selection . ', value=' . $value . ', step=' . $step);
}
# Test User Agent
Aastra_test_phone_versions(array('1' => '1.4.2.', '2' => '1.4.2.', '3' => '2.5.3.', '4' => '2.5.3.', '5' => '3.0.1.'), '0');
# Global data
开发者ID:jamesrusso,项目名称:Aastra_Scripts,代码行数:31,代码来源:speed.php

示例15: error_reporting

}
error_reporting(E_ERROR | E_PARSE);
#############################################################################
# Includes
#############################################################################
require_once 'AastraAsterisk.php';
#############################################################################
# Active code
#############################################################################
# Retrieve parameters
$user = Aastra_getvar_safe('user');
$action = Aastra_getvar_safe('action');
$status = Aastra_getvar_safe('status');
$index = Aastra_getvar_safe('index');
$mode = Aastra_getvar_safe('mode');
$password = Aastra_getvar_safe('password');
# Trace
Aastra_trace_call('day/night_asterisk', 'user=' . $user . ', action=' . $action . ', index=' . $index . ', status=' . $status . ', password=' . $password);
# Test User Agent
Aastra_test_phone_versions(array('1' => '1.4.2.', '2' => '1.4.2.', '3' => '2.5.3.', '4' => '2.5.3.', '5' => '3.0.1.'), '0');
# Get language
$language = Aastra_get_language();
# Global compatibility
$nb_softkeys = Aastra_number_softkeys_supported();
$is_icons = Aastra_is_icons_supported();
# Initial action
if ($action == '') {
    # Set mode
    if ($index == '') {
        $mode = 'ALL';
    } else {
开发者ID:jamesrusso,项目名称:Aastra_Scripts,代码行数:31,代码来源:daynight.php


注:本文中的Aastra_getvar_safe函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。