mirror of
https://github.com/Mibew/tray.git
synced 2025-01-22 18:10:34 +03:00
The pre-chat survey in no longer displayed for an invited visitors.
This commit is contained in:
parent
cf374158a8
commit
fca74ed824
@ -97,18 +97,21 @@ if( !isset($_GET['token']) || !isset($_GET['thread']) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if($settings['enablepresurvey'] == '1' && !(isset($_POST['survey']) && $_POST['survey'] == 'on')) {
|
||||
$link = connect();
|
||||
$invitation_state = invitation_state($_SESSION['visitorid'], $link);
|
||||
$visitor_is_invited = $settings['enabletracking'] && $invitation_state['invited'] && !$invitation_state['threadid'];
|
||||
if($settings['enablepresurvey'] == '1' && !(isset($_POST['survey']) && $_POST['survey'] == 'on') && !$visitor_is_invited) {
|
||||
$page = array();
|
||||
setup_logo();
|
||||
setup_survey($visitor['name'], $email, $groupid, $info, $referrer);
|
||||
expand("styles/dialogs", getchatstyle(), "survey.tpl");
|
||||
close_connection($link);
|
||||
exit;
|
||||
}
|
||||
|
||||
$remoteHost = get_remote_host();
|
||||
$userbrowser = $_SERVER['HTTP_USER_AGENT'];
|
||||
|
||||
$link = connect();
|
||||
if(!check_connections_from_remote($remoteHost, $link)) {
|
||||
close_connection($link);
|
||||
die("number of connections from your IP is exceeded, try again later");
|
||||
|
Loading…
Reference in New Issue
Block a user