Esempio n. 1
0
}
if ($show == 'redirect' || $show == 'redirected' || $show == 'agentchat' || $show == 'agentrochat') {
    setup_chatview_for_operator(array('threadid' => 0, 'userName' => getstring("chat.default.username"), 'remote' => "1.2.3.4", 'agentId' => 1, 'groupid' => 0, 'userid' => 'visitor1', 'locale' => $current_locale, 'ltoken' => $show == 'agentrochat' ? 124 : 123), array('operatorid' => $show == 'agentrochat' ? 2 : 1));
    if ($show == 'redirect') {
        setup_redirect_links(0, $show == 'agentrochat' ? 124 : 123);
    } elseif ($show == 'redirected') {
        $page['message'] = getlocal2("chat.redirected.content", array("Administrator"));
    }
    $page['redirectLink'] = "{$webimroot}/operator/themes.php?preview={$preview}&show=redirect";
    expand("../styles", "{$preview}", "{$show}.tpl");
    exit;
}
$templateList = array(array('label' => getlocal("page.preview.userchat"), 'id' => 'chat', 'h' => 480, 'w' => 640), array('label' => getlocal("page.preview.chatsimple"), 'id' => 'chatsimple', 'h' => 480, 'w' => 640), array('label' => getlocal("page.preview.nochat"), 'id' => 'nochat', 'h' => 480, 'w' => 640), array('label' => getlocal("page.preview.survey"), 'id' => 'survey', 'h' => 480, 'w' => 640), array('label' => getlocal("page.preview.leavemessage"), 'id' => 'leavemessage', 'h' => 480, 'w' => 640), array('label' => getlocal("page.preview.leavemessagesent"), 'id' => 'leavemessagesent', 'h' => 480, 'w' => 640), array('label' => getlocal("page.preview.mail"), 'id' => 'mail', 'h' => 254, 'w' => 603), array('label' => getlocal("page.preview.mailsent"), 'id' => 'mailsent', 'h' => 254, 'w' => 603), array('label' => getlocal("page.preview.redirect"), 'id' => 'redirect', 'h' => 480, 'w' => 640), array('label' => getlocal("page.preview.redirected"), 'id' => 'redirected', 'h' => 480, 'w' => 640), array('label' => getlocal("page.preview.agentchat"), 'id' => 'agentchat', 'h' => 480, 'w' => 640), array('label' => getlocal("page.preview.agentrochat"), 'id' => 'agentrochat', 'h' => 480, 'w' => 640), array('label' => getlocal("page.preview.error"), 'id' => 'error', 'h' => 480, 'w' => 640));
$template = verifyparam("template", "/^\\w+\$/", "chat");
$page['formpreview'] = $preview;
$page['formtemplate'] = $template;
$page['canshowerrors'] = $template == 'leavemessage' || $template == 'mail' || $template == 'all';
$page['formshowerr'] = $showerrors;
$page['availablePreviews'] = $stylelist;
$page['availableTemplates'] = array("chat", "chatsimple", "nochat", "survey", "leavemessage", "leavemessagesent", "mail", "mailsent", "redirect", "redirected", "agentchat", "agentrochat", "error", "all");
$page['showlink'] = "{$webimroot}/operator/themes.php?preview={$preview}&" . ($showerrors ? "showerr=on&" : "") . "show=";
$page['previewList'] = array();
foreach ($templateList as $tpl) {
    if ($tpl['id'] == $template || $template == 'all') {
        $page['previewList'][] = $tpl;
    }
}
prepare_menu($operator);
start_html_output();
setup_settings_tabs(3);
require '../view/themes.php';
Esempio n. 2
0
$options = array('enableban', 'usercanchangename', 'enablegroups', 'enablestatistics', 'enablejabber', 'enablessl', 'forcessl', 'enablepresurvey', 'surveyaskmail', 'surveyaskgroup', 'surveyaskmessage', 'surveyaskcaptcha', 'enablepopupnotification', 'showonlineoperators', 'enablecaptcha');
loadsettings();
if ($settings['featuresversion'] != $featuresversion) {
    $settings['featuresversion'] = $featuresversion;
    update_settings();
}
$params = array();
foreach ($options as $opt) {
    $params[$opt] = $settings[$opt];
}
if (isset($_POST['sent'])) {
    if (is_capable($can_administrate, $operator)) {
        foreach ($options as $opt) {
            $settings[$opt] = verifyparam($opt, "/^on\$/", "") == "on" ? "1" : "0";
        }
        update_settings();
        header("Location: {$mibewroot}/operator/features.php?stored");
        exit;
    } else {
        $errors[] = "Not an administrator";
    }
}
$page['canmodify'] = is_capable($can_administrate, $operator);
$page['stored'] = isset($_GET['stored']);
foreach ($options as $opt) {
    $page["form{$opt}"] = $params[$opt] == "1";
}
prepare_menu($operator);
setup_settings_tabs(1);
start_html_output();
require '../view/features.php';
Esempio n. 3
0
        foreach (preg_split("/,/", $params['geolinkparams']) as $oneparam) {
            if (!preg_match("/^\\s*(toolbar|scrollbars|location|status|menubar|width|height|resizable)=\\d{1,4}\$/", $oneparam)) {
                $errors[] = "Wrong link parameter: \"{$oneparam}\", should be one of 'toolbar, scrollbars, location, status, menubar, width, height or resizable'";
            }
        }
    }
    if (count($errors) == 0) {
        foreach ($options as $opt) {
            $settings[$opt] = $params[$opt];
        }
        update_settings();
        header("Location: {$webimroot}/operator/settings.php?stored");
        exit;
    }
}
$page['formemail'] = topage($params['email']);
$page['formtitle'] = topage($params['title']);
$page['formlogo'] = topage($params['logo']);
$page['formhosturl'] = topage($params['hosturl']);
$page['formgeolink'] = topage($params['geolink']);
$page['formgeolinkparams'] = topage($params['geolinkparams']);
$page['formusernamepattern'] = topage($params['usernamepattern']);
$page['formchatstyle'] = $params['chatstyle'];
$page['formchattitle'] = topage($params['chattitle']);
$page['formsendmessagekey'] = $params['sendmessagekey'];
$page['availableStyles'] = $stylelist;
$page['stored'] = isset($_GET['stored']);
prepare_menu($operator);
setup_settings_tabs(0);
start_html_output();
require '../view/settings.php';
Esempio n. 4
0
    $params['updatefrequency_chat'] = getparam('frequencychat');
    if (!is_numeric($params['updatefrequency_chat'])) {
        $errors[] = wrong_field("settings.frequencychat");
    }
    $params['updatefrequency_oldchat'] = getparam('frequencyoldchat');
    if (!is_numeric($params['updatefrequency_oldchat'])) {
        $errors[] = wrong_field("settings.frequencyoldchat");
    }
    $params['max_connections_from_one_host'] = getparam('onehostconnections');
    if (!is_numeric($params['max_connections_from_one_host'])) {
        $errors[] = getlocal("settings.wrong.onehostconnections");
    }
    if (count($errors) == 0) {
        foreach ($options as $opt) {
            $settings[$opt] = $params[$opt];
        }
        update_settings();
        header("Location: {$webimroot}/operator/performance.php?stored");
        exit;
    }
}
$page['formonlinetimeout'] = $params['online_timeout'];
$page['formfrequencyoperator'] = $params['updatefrequency_operator'];
$page['formfrequencychat'] = $params['updatefrequency_chat'];
$page['formfrequencyoldchat'] = $params['updatefrequency_oldchat'];
$page['formonehostconnections'] = $params['max_connections_from_one_host'];
$page['stored'] = isset($_GET['stored']);
prepare_menu($operator);
setup_settings_tabs(2);
start_html_output();
require '../view/performance.php';