'activeHelper_liveHelp_agentsList', 'edit' => 'activeHelper_liveHelp_agentsRegister', 'register' => 'activeHelper_liveHelp_agentsRegister', 'settings' => 'activeHelper_liveHelp_agentsSettings', 'info' => 'activeHelper_liveHelp_agentsInfo' ); if (!empty($_REQUEST['action']) && isset($actions[$_REQUEST['action']])) return $actions[$_REQUEST['action']](); return $actions['list'](); } function activeHelper_liveHelp_agentsPost() { $actions = array( 'delete' => 'activeHelper_liveHelp_agentsDeletePost', 'edit' => 'activeHelper_liveHelp_agentsEditPost', 'settings' => 'activeHelper_liveHelp_agentsSettingsPost', 'register' => 'activeHelper_liveHelp_agentsRegisterPost' ); if (!empty($_REQUEST['action']) && isset($actions[$_REQUEST['action']])) return $actions[$_REQUEST['action']](); } function activeHelper_liveHelp_agentsDeletePost() { global $wpdb, $activeHelper_liveHelp; $_REQUEST['id'] = !empty($_REQUEST['id']) ? (int) $_REQUEST['id'] : 0; if (empty($_REQUEST['id'])) { wp_redirect('admin.php?page=' . strtolower('activeHelper_liveHelp_agents') . '&miss'); exit; } $agent = $wpdb->get_row(" SELECT username AS agent_username, firstname AS agent_firstname, lastname AS agent_lastname, email AS agent_email, department AS agent_department, privilege AS agent_privilege, status AS agent_status, answers AS agent_answers FROM {$wpdb->prefix}livehelp_users WHERE id = '{$_REQUEST['id']}' LIMIT 1 ", ARRAY_A); if (empty($agent)) { wp_redirect('admin.php?page=' . strtolower('activeHelper_liveHelp_agent') . '&miss'); exit; } // delete domain relationships $wpdb->query(" DELETE FROM {$wpdb->prefix}livehelp_users WHERE id = '{$_REQUEST['id']}' "); $wpdb->query(" DELETE FROM {$wpdb->prefix}livehelp_users WHERE id = '{$_REQUEST['id']}' "); $wpdb->query(" DELETE FROM {$wpdb->prefix}livehelp_users WHERE id = '{$_REQUEST['id']}' "); wp_redirect('admin.php?page=' . strtolower('activeHelper_liveHelp_agent') . '&delete'); exit; } function activeHelper_liveHelp_agentsList() { global $wpdb, $activeHelper_liveHelp; $agentsList = $wpdb->get_results(" SELECT id AS ID, username AS agent_username, status AS agent_status, department AS agent_department, email AS agent_email, answers AS agent_answers FROM {$wpdb->prefix}livehelp_users ORDER BY id ", ARRAY_A); echo '

LiveHelp » ' . __('Agents', 'activehelper_livehelp') . ' ' . __('add new', 'activehelper_livehelp') . '

'; if (isset($_GET['register'])) echo '

' . sprintf(__('The %s was successfully registered.', 'activehelper_livehelp'), __('agent', 'activehelper_livehelp')) . '

'; if (isset($_GET['update'])) echo '

' . sprintf(__('The %s was successfully updated.', 'activehelper_livehelp'), __('agent', 'activehelper_livehelp')) . '

'; if (isset($_GET['delete'])) echo '

' . sprintf(__('The %s was deleted permanently.', 'activehelper_livehelp'), __('agent', 'activehelper_livehelp')) . '

'; if (isset($_GET['miss'])) echo '

' . sprintf(__('The %s was not found.', 'activehelper_livehelp'), __('agent', 'activehelper_livehelp')) . '

'; echo '
'; if (empty($agentsList)) echo ' '; else { $alternate = false; foreach ($agentsList as $agent) { echo ' '; $alternate = !$alternate; } } echo '
' . __('ID', 'activehelper_livehelp') . ' ' . __('Username', 'activehelper_livehelp') . ' ' . __('Email', 'activehelper_livehelp') . ' ' . __('Department', 'activehelper_livehelp') . ' ' . __('Status', 'activehelper_livehelp') . '
' . __('ID', 'activehelper_livehelp') . ' ' . __('Username', 'activehelper_livehelp') . ' ' . __('Email', 'activehelper_livehelp') . ' ' . __('Department', 'activehelper_livehelp') . ' ' . __('Status', 'activehelper_livehelp') . '

' . sprintf(__('No %s found.', 'activehelper_livehelp'), __('agents', 'activehelper_livehelp')) . '

' . $agent['ID'] . ' ' . $agent['agent_username'] . ' ' . $agent['agent_email'] . ' ' . $agent['agent_department'] . ' ' . ($agent['agent_status'] == 1 ? __('Enable', 'activehelper_livehelp') : __('Disable', 'activehelper_livehelp')) . '
'; } function activeHelper_liveHelp_agentsRegisterPost() { global $wpdb, $activeHelper_liveHelp; $_POST['agent_username'] = !empty($_POST['agent_username']) ? (string) $_POST['agent_username'] : ''; $_POST['agent_password'] = !empty($_POST['agent_password']) ? (string) $_POST['agent_password'] : ''; $_POST['agent_firstname'] = !empty($_POST['agent_firstname']) ? (string) $_POST['agent_firstname'] : ''; $_POST['agent_lastname'] = !empty($_POST['agent_lastname']) ? (string) $_POST['agent_lastname'] : ''; $_POST['agent_email'] = !empty($_POST['agent_email']) ? (string) $_POST['agent_email'] : ''; $_POST['agent_department'] = !empty($_POST['agent_department']) ? (string) $_POST['agent_department'] : ''; $_POST['agent_status'] = !empty($_POST['agent_status']) ? 1 : 0; $_POST['agent_privilege'] = !empty($_POST['agent_privilege']) ? 1 : 0; $_POST['agent_answers'] = !empty($_POST['agent_answers']) ? (int) $_POST['agent_answers'] : 1; $_POST['agent_domains'] = !empty($_POST['agent_domains']) ? (array) $_POST['agent_domains'] : array(); $errors = array(); $activeHelper_liveHelp['errors'] = &$errors; while (isset($_POST['submit'])) { unset($_POST['submit']); if (empty($_POST['agent_username'])) $errors['agent_username'] = sprintf(__('You must insert a %s', 'activehelper_livehelp'), __('user name', 'activehelper_livehelp')); // error if (empty($_POST['agent_email'])) $errors['agent_email'] = sprintf(__('You must insert an %s', 'activehelper_livehelp'), __('email', 'activehelper_livehelp')); // error // errors ... if (!empty($errors)) break; if ($agent['agent_username'] != $_POST['agent_username']) { $agent_exists = $wpdb->get_var(" SELECT id FROM {$wpdb->prefix}livehelp_users WHERE username = '{$_POST['agent_username']}' LIMIT 1 "); if (!empty($agent_exists)) $errors['agent_username'] = __('The username is already in use', 'activehelper_livehelp'); // error } // errors ... if (!empty($errors)) break; $_POST['agent_password'] = !empty($_POST['agent_password']) ? md5($_POST['agent_password']) : ''; $wpdb->query(" INSERT INTO {$wpdb->prefix}livehelp_users (username, password, firstname, lastname, email, department, privilege, status, answers) VALUES ('{$_POST['agent_username']}', '{$_POST['agent_password']}', '{$_POST['agent_firstname']}', '{$_POST['agent_lastname']}', '{$_POST['agent_email']}', '{$_POST['agent_department']}', '{$_POST['agent_privilege']}', '{$_POST['agent_status']}', '{$_POST['agent_answers']}') "); $agent_ID = $wpdb->get_var(" SELECT MAX(id) FROM {$wpdb->prefix}livehelp_users "); foreach ($_POST['agent_domains'] as $domain_ID => $domain_status) { if (empty($domain_status)) continue; $wpdb->query(" INSERT INTO {$wpdb->prefix}livehelp_domain_user (id_domain, id_user, status) VALUES ('{$domain_ID}', '{$agent_ID}', '1') "); $relation_ID = $wpdb->get_var(" SELECT MAX(id_domain_user) FROM {$wpdb->prefix}livehelp_domain_user "); $wpdb->query(" INSERT INTO {$wpdb->prefix}livehelp_sa_domain_user_role (id_domain_user, id_role) VALUES ('{$relation_ID}', '1') "); } // Duplicate agent folder with id 0 for this new agent. activeHelper_liveHelp_filesDuplicate($activeHelper_liveHelp['agentsDir'] . '/0', $activeHelper_liveHelp['agentsDir'] . '/' . $agent_ID); $agent_picture = ''; while (!empty($_FILES['agent_picture']['tmp_name'])) { $image = activeHelper_liveHelp_imagesUpload($activeHelper_liveHelp['agentsDir'] . '/' . $agent_ID, 'a' . $agent_ID, $_FILES['agent_picture']); unset($_FILES['agent_picture']); if ($image === false) break; $agent_picture = $image; } $wpdb->query(" UPDATE {$wpdb->prefix}livehelp_users SET photo = '{$agent_picture}' WHERE id = '{$agent_ID}' "); wp_redirect('admin.php?page=' . strtolower('activeHelper_liveHelp_agents') . '&action=info&id=' . $agent_ID); exit; } } function activeHelper_liveHelp_agentsEditPost() { global $wpdb, $activeHelper_liveHelp; $_REQUEST['id'] = !empty($_REQUEST['id']) ? (int) $_REQUEST['id'] : 0; $_POST['agent_username'] = !empty($_POST['agent_username']) ? (string) $_POST['agent_username'] : ''; $_POST['agent_password'] = !empty($_POST['agent_password']) ? (string) $_POST['agent_password'] : ''; $_POST['agent_firstname'] = !empty($_POST['agent_firstname']) ? (string) $_POST['agent_firstname'] : ''; $_POST['agent_lastname'] = !empty($_POST['agent_lastname']) ? (string) $_POST['agent_lastname'] : ''; $_POST['agent_email'] = !empty($_POST['agent_email']) ? (string) $_POST['agent_email'] : ''; $_POST['agent_department'] = !empty($_POST['agent_department']) ? (string) $_POST['agent_department'] : ''; $_POST['agent_status'] = !empty($_POST['agent_status']) ? 1 : 0; $_POST['agent_privilege'] = !empty($_POST['agent_privilege']) ? 1 : 0; $_POST['agent_answers'] = !empty($_POST['agent_answers']) ? (int) $_POST['agent_answers'] : 1; $_POST['agent_domains'] = !empty($_POST['agent_domains']) ? (array) $_POST['agent_domains'] : array(); if (empty($_REQUEST['id'])) { wp_redirect('admin.php?page=' . strtolower('activeHelper_liveHelp_agents') . '&miss'); exit; } $errors = array(); $activeHelper_liveHelp['errors'] = &$errors; $agent = $wpdb->get_row(" SELECT username AS agent_username, firstname AS agent_firstname, lastname AS agent_lastname, email AS agent_email, department AS agent_department, privilege AS agent_privilege, status AS agent_status, photo AS agent_picture, answers AS agent_answers FROM {$wpdb->prefix}livehelp_users WHERE id = '{$_REQUEST['id']}' LIMIT 1 ", ARRAY_A); if (empty($agent)) { wp_redirect('admin.php?page=' . strtolower('activeHelper_liveHelp_agent') . '&miss'); exit; } $agents_domains = $wpdb->get_results(" SELECT id_domain, status FROM {$wpdb->prefix}livehelp_domain_user WHERE id_user = '{$_REQUEST['id']}' ", ARRAY_A); $_POST['agent_domains_old'] = array(); foreach ($agents_domains as $agents_domain) if ($agents_domain['status'] == 1) $_POST['agent_domains_old'][$agents_domain['id_domain']] = 1; if (!isset($_POST['submit'])) { $_POST = array_merge($_POST, $agent); $_POST['agent_domains'] = $_POST['agent_domains_old']; } $_POST['agent_picture'] = $agent['agent_picture']; while (isset($_POST['submit'])) { unset($_POST['submit']); if (empty($_POST['agent_username'])) $errors['agent_username'] = sprintf(__('You must insert a %s', 'activehelper_livehelp'), __('user name', 'activehelper_livehelp')); // error if (empty($_POST['agent_email'])) $errors['agent_email'] = sprintf(__('You must insert an %s', 'activehelper_livehelp'), __('email', 'activehelper_livehelp')); // error // errors ... if (!empty($errors)) break; if ($agent['agent_username'] != $_POST['agent_username']) { $agent_exists = $wpdb->get_var(" SELECT id FROM {$wpdb->prefix}livehelp_users WHERE username = '{$_POST['agent_username']}' LIMIT 1 "); if (!empty($agent_exists)) $errors['agent_username'] = __('The username is already in use', 'activehelper_livehelp'); // error } // errors ... if (!empty($errors)) break; $_POST['agent_password'] = !empty($_POST['agent_password']) ? "'" . md5($_POST['agent_password']) . "'" : 'password'; $agent_picture = ''; while (!empty($_FILES['agent_picture']['tmp_name'])) { if (!empty($_POST['agent_picture'])) activeHelper_liveHelp_imagesDelete($activeHelper_liveHelp['agentsDir'] . '/' . $_REQUEST['id'], $_POST['agent_picture']); $image = activeHelper_liveHelp_imagesUpload($activeHelper_liveHelp['agentsDir'] . '/' . $_REQUEST['id'], 'a' . $_REQUEST['id'], $_FILES['agent_picture']); unset($_FILES['agent_picture']); if ($image === false) break; $agent_picture = $image; } $now_time = current_time( 'mysql', false ); $wpdb->query(" UPDATE {$wpdb->prefix}livehelp_users SET username = '{$_POST['agent_username']}', password = {$_POST['agent_password']}, firstname = '{$_POST['agent_firstname']}', lastname = '{$_POST['agent_lastname']}', email = '{$_POST['agent_email']}', department = '{$_POST['agent_department']}', datetime = '{$now_time}', refresh = '{$now_time}', privilege = '{$_POST['agent_privilege']}', answers = '{$_POST['agent_answers']}', status = '{$_POST['agent_status']}'" . (!empty($agent_picture) ? ", photo = '{$agent_picture}'" : "") . " WHERE id = '{$_REQUEST['id']}' LIMIT 1 "); $_POST['agent_domains_change'] = array(); foreach ($_POST['agent_domains'] as $domain_ID => $domain_status) if (isset($_POST['agent_domains_old'][$domain_ID]) && empty($domain_status)) $_POST['agent_domains_change'][$domain_ID] = 0; else if (!isset($_POST['agent_domains_old'][$domain_ID]) && !empty($domain_status)) $_POST['agent_domains_change'][$domain_ID] = 1; foreach ($_POST['agent_domains_change'] as $domain_ID => $domain_status) if (!empty($domain_status)) { $wpdb->query(" INSERT INTO {$wpdb->prefix}livehelp_domain_user (id_domain, id_user, status) VALUES ('{$domain_ID}', '{$_REQUEST['id']}', '1') "); $relation_ID = $wpdb->get_var(" SELECT MAX(id_domain_user) FROM {$wpdb->prefix}livehelp_domain_user "); $wpdb->query(" INSERT INTO {$wpdb->prefix}livehelp_sa_domain_user_role (id_domain_user, id_role) VALUES ('{$relation_ID}', '1') "); } else { $relation_ID = $wpdb->get_var(" SELECT id_domain_user FROM {$wpdb->prefix}livehelp_domain_user WHERE id_domain = '{$domain_ID}' AND id_user = '{$_REQUEST['id']}' LIMIT 1 "); $wpdb->query(" DELETE FROM {$wpdb->prefix}livehelp_sa_domain_user_role WHERE id_domain_user = '{$relation_ID}' LIMIT 1 "); $wpdb->query(" DELETE FROM {$wpdb->prefix}livehelp_domain_user WHERE id_domain = '{$domain_ID}' AND id_user = '{$_REQUEST['id']}' LIMIT 1 "); } wp_redirect('admin.php?page=' . strtolower('activeHelper_liveHelp_agents') . '&update'); exit; } } function activeHelper_liveHelp_agentsRegister() { global $wpdb, $activeHelper_liveHelp; if (!empty($activeHelper_liveHelp['errors'])) $errors = $activeHelper_liveHelp['errors']; $domainsList = $wpdb->get_results(" SELECT id_domain AS ID, name AS domain_name, status AS domain_status, configuration AS domain_global_configuration FROM {$wpdb->prefix}livehelp_domains ORDER BY id_domain ", ARRAY_A); $tabindex = 1; echo '

LiveHelp » ' . __('Agents', 'activehelper_livehelp') . (!empty($_REQUEST['id']) ? ' (' . $_POST['agent_username'] . ')' : '') . ' » ' . (!empty($_REQUEST['id']) ? __('Edit', 'activehelper_livehelp') : __('Add new', 'activehelper_livehelp')) . '


' . (!empty($_REQUEST['id']) ? __('Update', 'activehelper_livehelp') : __('Add new', 'activehelper_livehelp')) . '


' . __('Username', 'activehelper_livehelp') . '

' . (isset($errors['agent_username']) ? '

' . __('Error', 'activehelper_livehelp') . ': ' . $errors['agent_username'] . '

' : '') . '

' . __('Password', 'activehelper_livehelp') . '

' . (isset($errors['agent_password']) ? '

' . __('Error', 'activehelper_livehelp') . ': ' . $errors['agent_password'] . '

' : '') . '

' . __('Email', 'activehelper_livehelp') . '

' . (isset($errors['agent_email']) ? '

' . __('Error', 'activehelper_livehelp') . ': ' . $errors['agent_email'] . '

' : '') . '

' . __('Information', 'activehelper_livehelp') . '


' . __('Active domains', 'activehelper_livehelp') . '

'; $first = true; foreach ($domainsList as $domain) { echo '
' . $domain['domain_name'] . '
'; $first = false; } echo '

'; if (!empty($_REQUEST['id'])) echo ' '; echo '
'; } function activeHelper_liveHelp_agentsInfo() { global $wpdb, $activeHelper_liveHelp; $_REQUEST['id'] = !empty($_REQUEST['id']) ? (int) $_REQUEST['id'] : 0; $agent = $wpdb->get_row(" SELECT username AS agent_username, firstname AS agent_firstname, lastname AS agent_lastname, email AS agent_email, department AS agent_department, privilege AS agent_privilege, status AS agent_status, photo AS agent_picture FROM {$wpdb->prefix}livehelp_users WHERE id = '{$_REQUEST['id']}' LIMIT 1 ", ARRAY_A); $_POST = array_merge($_POST, $agent); $tabindex = 1; $parseUrl = parse_url(get_bloginfo('url')); $clientInfo_server = $parseUrl['scheme'] . '://' . $parseUrl['host']; $clientInfo_serverPath = str_replace($clientInfo_server, '', $activeHelper_liveHelp['serverUrl']) . '/'; $clientInfo_login = $agent['agent_username']; $clientInfo_ssl = $parseUrl['scheme'] == 'http' ? 'OFF' : 'ON'; echo '

LiveHelp » ' . __('Agents', 'activehelper_livehelp') . (!empty($_REQUEST['id']) ? ' (' . $_POST['agent_username'] . ')' : '') . ' » ' . __('Client info', 'activehelper_livehelp') . '


' . __('Client info', 'activehelper_livehelp') . '


' . __('Client info', 'activehelper_livehelp') . '

' . __('Server', 'activehelper_livehelp') . '
' . __('Server Path', 'activehelper_livehelp') . '
' . __('Account', 'activehelper_livehelp') . '
' . __('Login', 'activehelper_livehelp') . '
' . __('SSL', 'activehelper_livehelp') . '

' . __('Downloads', 'activehelper_livehelp') . '

' . __('Support Panel Desktop for Windows : ', 'activehelper_livehelp') . ' ' . __('Download', 'activehelper_livehelp') . ' ' . __('User Guide', 'activehelper_livehelp') . '
' . __('Support Panel Desktop for MAC : ', 'activehelper_livehelp') . ' ' . __('Download', 'activehelper_livehelp') . ' ' . __('User Guide', 'activehelper_livehelp') . '
' . __('Support Panel Mobile for IOS : ', 'activehelper_livehelp') . ' ' . __('Download', 'activehelper_livehelp') . ' ' . __('User Guide', 'activehelper_livehelp') . '
' . __('Support Panel mobile for Android : ', 'activehelper_livehelp') . ' ' . __('Download', 'activehelper_livehelp') . ' ' . __('User Guide', 'activehelper_livehelp') . '

'; if (!empty($_REQUEST['id'])) echo ' '; echo '
'; } function activeHelper_liveHelp_agentsSettingsPost() { global $wpdb, $activeHelper_liveHelp; $_REQUEST['id'] = !empty($_REQUEST['id']) ? (int) $_REQUEST['id'] : 0; $_REQUEST['lang'] = !empty($_REQUEST['lang']) ? (string) $_REQUEST['lang'] : 'en'; $activeHelper_liveHelp['agent'] = $wpdb->get_row(" SELECT username AS agent_username, firstname AS agent_firstname, lastname AS agent_lastname, email AS agent_email, department AS agent_department, privilege AS agent_privilege, status AS agent_status, photo AS agent_picture, answers AS agent_answers FROM {$wpdb->prefix}livehelp_users WHERE id = '{$_REQUEST['id']}' LIMIT 1 ", ARRAY_A); $agent_dir = $activeHelper_liveHelp['agentsDir'] . '/' . $_REQUEST['id'] . '/i18n/' . $_REQUEST['lang']; if (isset($_POST['submit'])) { include($activeHelper_liveHelp['importDir'] . '/constants.php'); } while (!empty($_FILES['online']['tmp_name'])) { activeHelper_liveHelp_imagesDelete($agent_dir, 'online.' .$status_indicator_img_type); activeHelper_liveHelp_imagesUpload($agent_dir, 'online', $_FILES['online'], '.' . $status_indicator_img_type); unset($_FILES['online']); } while (!empty($_FILES['offline']['tmp_name'])) { activeHelper_liveHelp_imagesDelete($agent_dir, 'offline.' .$status_indicator_img_type ); activeHelper_liveHelp_imagesUpload($agent_dir, 'offline', $_FILES['offline'], '.' . $status_indicator_img_type); unset($_FILES['offline']); } while (!empty($_FILES['away']['tmp_name'])) { activeHelper_liveHelp_imagesDelete($agent_dir, 'away.' .$status_indicator_img_type ); activeHelper_liveHelp_imagesUpload($agent_dir, 'away', $_FILES['away'], '.' . $status_indicator_img_type); unset($_FILES['away']); } while (!empty($_FILES['brb']['tmp_name'])) { activeHelper_liveHelp_imagesDelete($agent_dir, 'brb.' .$status_indicator_img_type); activeHelper_liveHelp_imagesUpload($agent_dir, 'brb', $_FILES['brb'], '.' . $status_indicator_img_type); unset($_FILES['brb']); } // update Time_schedule while (!empty($_POST['int_time']['end_time'])) { $wpdb->query(" UPDATE {$wpdb->prefix}livehelp_users SET schedule = '{$_POST['schedule']}', initial_time = '{$_POST['int_time']}', final_time = '{$_POST['end_time']}' WHERE id = '{$_REQUEST['id']}' "); unset($_POST['int_time']); } } function activeHelper_liveHelp_agentsSettings() { global $wpdb, $activeHelper_liveHelp; // status indicator file type if (!isset($_POST['submit'])) { include($activeHelper_liveHelp['importDir'] . '/constants.php'); $f_online = "online." . $status_indicator_img_type; $f_offline = "offline." . $status_indicator_img_type; $f_away = "away." . $status_indicator_img_type; $f_brb = "brb." . $status_indicator_img_type; } $_REQUEST['id'] = !empty($_REQUEST['id']) ? (int) $_REQUEST['id'] : 0; $_REQUEST['lang'] = !empty($_REQUEST['lang']) ? (string) $_REQUEST['lang'] : 'en'; $agent_url = $activeHelper_liveHelp['serverUrl'] . '/agents/' . $_REQUEST['id'] . '/i18n/' . $_REQUEST['lang'] . '/'; $agent_dir = $activeHelper_liveHelp['agentsDir'] . '/' . $_REQUEST['id']; $agent_imgs_paths = array_filter(glob($agent_dir . '/i18n/' . $_REQUEST['lang'] . '/*'), 'is_file'); $agent_imgs = array(); foreach ($agent_imgs_paths as $path) { $agent_imgs[basename($path, '.' .$status_indicator_img_type)] = basename($path, '.' .$status_indicator_img_type); } $tabindex = 1; $agent_schedule = $wpdb->get_row(" SELECT schedule, initial_time as int_time, final_time as end_time FROM {$wpdb->prefix}livehelp_users WHERE id = '{$_REQUEST['id']}' LIMIT 1 ", ARRAY_A); echo '

LiveHelp » ' . __('Agents', 'activehelper_livehelp') . (!empty($_REQUEST['id']) ? ' (' . $activeHelper_liveHelp['agent']['agent_username'] . ')' : '') . ' » ' . __('Settings', 'activehelper_livehelp') . '


' . __('Settings', 'activehelper_livehelp') . '


' . __('Settings', 'activehelper_livehelp') . '

' . __('Language', 'activehelper_livehelp') . '
' . __('', 'activehelper_livehelp') . ' ' . __(' Get more chat buttons here', 'activehelper_livehelp') . '
' . __('Online image (' .$status_indicator_img_type .')', 'activehelper_livehelp') . '
' . (!empty($agent_imgs['online']) ? '
' : '') . '
' . __('Offline image (' . $status_indicator_img_type .')', 'activehelper_livehelp') . '
' . (!empty($agent_imgs['offline']) ? '
' : '') . '
' . __('Away image ('.$status_indicator_img_type.')', 'activehelper_livehelp') . '
' . (!empty($agent_imgs['away']) ? '
' : '') . '
' . __('BRB image ('.$status_indicator_img_type.')', 'activehelper_livehelp') . '
' . (!empty($agent_imgs['brb']) ? '
' : '') . '

' . __('Time Schedule', 'activehelper_livehelp') . '

' . __('Allow to sign in only for an specific time', 'activehelper_livehelp') . '
' . (isset($errors['int_time']) ? '

' . __('Error', 'activehelper_livehelp') . ': ' . $errors['int_time'] . '

' : '') . '
' . (isset($errors['end_time']) ? '

' . __('Error', 'activehelper_livehelp') . ': ' . $errors['end_time'] . '

' : '') . '

'; if (!empty($_REQUEST['id'])) echo ' '; echo '
'; if (isset($_POST['submit'])) { wp_redirect('admin.php?page=' . strtolower('activeHelper_liveHelp_agents')); exit; } }